Repository navigation
Why Herd
An AI coding agent says "done" when it believes it is done. Herd makes it prove it. You give a goal and, if you like, what "done" means. The agent plans, builds, tries to break its own work, and can only finish when commands show that every criterion passes. You get the code plus the evidence: the command output, the commit and the time it ran.
Review evidence, not process. You should not have to watch an agent work or read its whole transcript to trust the result. Herd puts what matters on one page: what is proven, by which command, and what is not proven.
The agent is not the judge. The skills tell the agent what to do. A small command-line tool, herd, decides whether it worked, and it decides only from exit codes, never from what the agent says. A Stop hook refuses to let the session end while a check fails.
Your words stay yours. Criteria you write are copied word for word. herd done refuses a "human" criterion that is not a quote of your request, so the agent cannot quietly narrow "every file" to "the files in the test folder".
Shift left. The hard questions come before the code. Herd writes the checks first and runs them to see them fail. It plans six ways to break the program, and takes a second, more specific look at the design, all before any code exists. Problems found while planning are cheap. Problems found in review are not.
Fill the gaps, never block. Most requests leave things out. Herd does not stop to ask about each one. It makes a choice, writes it down with the reason and how to override it, and shows you. It asks only for an irreversible action or a real trade-off. How Herd fills the gaps explains each mechanism.
Small and plain. A small Python CLI on the standard library, no dependencies, plain-text task files in your repository. You can read, diff or delete everything Herd writes.
| A plain agent session | With Herd |
|---|---|
| The agent decides when it is done. | A Stop hook blocks finishing until every check passes on the current code. |
| Tests are written after the code, often to fit it. | Checks are written first and must fail before the work starts. |
| A test that runs nothing still "passes". | A check that ran zero tests, or runs no project code (true, echo), is flagged. |
| Your requirements can be reworded along the way. | Your criteria are frozen at the first run. Changing one needs your own words on record. |
| Edge cases get tested if the agent thinks of them. | Six standard attacks run on every task: bad input, collisions, one broken part, recounting numbers, refusals, and other ways to read your input. |
| Limits are found by users. | The agent must say what each check does not prove and what it left untested. |
| One model does everything. | A stronger model designs (default Sonnet), a cheaper one builds (default Haiku). |
| The PR description is a summary. | With herd pr, the PR description is the evidence, refreshed on every verify. |
- Features and fixes you can check with a command. CLIs, libraries, HTTP APIs, data pipelines, scripts. If you can say "given X, then Y", Herd can prove it.
- Work you hand over and review later. Headless runs, several agents in parallel (each in its own worktree), or a task you want back as a pull request with its proof.
- When you want a cheaper model to do the build. On the benchmark, Haiku with Herd handled 6 of 6 bad inputs and 47.3 of 48 stores, against 4.3 and 41.7 for Haiku alone (Benchmark).
-
Changes where a quiet mistake is expensive. Paths like
migrations/**,auth/**andbilling/**get a high risk floor: more required evidence and one approval question before the build. - When the request has words like "every", "any" or "large". Herd turns them into generated, random and scale tests instead of one happy example.
-
The result cannot be checked by a command. Visual design, UX copy, "make it feel faster". Herd can use a proxy check (a screenshot diff, a timing) or leave a criterion
unchecked, but an unchecked criterion is never counted as met. A human eye is still the real check. - Exploration and spikes. If you do not know yet what you want, criteria get in the way. Explore first, then use Herd to build the version you keep.
- Tiny edits. A typo or a rename does not need six attacks. Say "quick fix" for the short route (one check, still red first), or skip Herd.
- Cost and time. Proof is not free. On the benchmark a Herd run cost $0.61 with Sonnet against $0.29 without, and $0.35 with Haiku against $0.04. The quality went up, but so did the bill.
- It does not catch everything. No second model reviews the change. Bugs outside the criteria and the attacks are not caught. The report lists what was not proven.
-
Checks run with your permissions. A check is a shell command in
task.toml. Read a task file the way you read code, especially in a repository you do not trust. - Early days. Herd runs in Claude Code only. The benchmark covers one main task with six runs per arm, and GitHub issue-to-PR automation is still on the roadmap.
Ready to try it? Quickstart. Want to see a full run? Example.