Skip to content

Example

Beovulfo edited this page Nov 25, 2026 · 5 revisions

See it work

A task is a goal plus criteria, each with a runnable check:

goal = "Add a slugify(text) function"
test_budget = "Unit tests for the basic, empty and bad-input cases; no property tests"
known_limits = "ASCII text only; non-Latin scripts are not handled"

[[inputs]]
human = "a piece of text"
program = "a string, as typed"
readings = ["one line of typed text", "text pasted with newlines and tabs"]

[[criteria]]
id = "C1"
text = "Given 'Hello, World!', when slugify runs, then it returns 'hello-world'"
source = "human"
coverage = "proves the basic case and punctuation; does not prove accents or very long input"
check = "python3 -m unittest test_textutil.TestSlugify.test_basic"

[[criteria]]
id = "C2"
text = "Given only punctuation, when slugify runs, then it returns an empty string"
source = "agent-proposed"
check = "python3 -m unittest test_textutil.TestSlugify.test_empty"

Before any work, both checks fail, which proves they test something. After the work (output abridged):

$ herd verify
2 passing, 0 failing, 0 unchecked

$ herd done
done: evidence is fresh and passing (2 of 2 criteria proven)
report: .herd/tasks/slugify/evidence.md

herd verify lists a criterion only when it needs attention (failing, unchecked, or ran zero tests); --verbose lists all. The report in evidence.md (also herd done --verbose):

# Evidence: slugify
Result: 2 passing, 0 failing, 0 unchecked
First verify: 2 of 2 checks failed before the work
Elapsed: 2m 05s from herd init to this verify; first verify at 0m 40s (wall clock, includes any waiting on the human)
Test budget: Unit tests for the basic, empty and bad-input cases; no property tests
Known limits: ASCII text only; non-Latin scripts are not handled
Inputs (as you described them -> as the program receives them): a piece of text -> a string, as typed (readings: one line of typed text; text pasted with newlines and tabs)
Adversarial pass: 6 attempts recorded; bad-input passing (`python3 -m unittest test_textutil.TestBadInput`); collision n/a: one value in, one value out; one-bad-part n/a: one value, no parts; recount passing (`python3 -m unittest test_textutil.TestRecount`); refusal passing (`python3 -m unittest test_textutil.TestBadInput`); other-reading passing (`python3 -m unittest test_textutil.TestReadings`)
| id | status | source | check |
| C1 | passing | human | `python3 -m unittest test_textutil.TestSlugify.test_basic` |
| C2 | passing | agent-proposed | `python3 -m unittest test_textutil.TestSlugify.test_empty` |

The agent's final message to you is six lines, filled from the report and linking it instead of repeating it:

Done: Add a slugify(text) function; committed on herd/slugify at 80f0fb5.
Proven: 2 of 2 criteria; evidence in .herd/tasks/slugify/evidence.md.
Not proven: nothing open.
Caveats: found at 50s: an empty string crashed; fixed at 1m 10s: an empty string returns an empty string.
Decisions: none recorded.
Limits: ASCII text only; non-Latin scripts are not handled.

With herd pr, the same evidence becomes the pull request description (abridged):

# Evidence: slugify

**Result:** 2 of 2 criteria proven by a passing check (0 failing, 0 unchecked).

The evidence is fresh: the checks ran at 2026-11-23T10:02:11Z on commit `4cd7bd83130f`.

## What is proven
| id | source | criterion | proof: the check that passed |
| C1 | human | Given 'Hello, World!', when slugify runs, then it returns 'hello-world' | `python3 -m unittest test_textutil.TestSlugify.test_basic` exit 0 |

## What is not proven
- C1, what its check proves and does not: proves the basic case and punctuation; does not prove accents or very long input
- Known limits: ASCII text only; non-Latin scripts are not handled
- Attack collision marked n/a: one value in, one value out
- Attack one-bad-part marked n/a: one value, no parts

<details><summary>Run details and caveat log (6 tried, 1 found, 1 fixed)</summary> ... </details>
<details><summary>Reproduce: run from the repository root</summary> ... </details>

Long check commands are cut in the table and shown in full under Reproduce.

If the agent tries to finish while a check is failing, the Stop hook answers instead:

{"decision": "block", "reason": "Herd task `slugify` is not done (1/3 stop attempts blocked).
 C1 is failing: Given 'Hello, World!', ... Run `python3 .../scripts/herd.py verify` after fixing. ..."}

Clone this wiki locally