Skip to content

Releases

Herd 0.18.0

Choose a tag to compare

@Beovulfo Beovulfo released this 30 Nov 07:33
7411d8a

Version 0.18.0 is the v0.15.0 plugin plus the 0.16.1 and 0.16.2 guard fixes.

Why, as given in issue #221: v0.15.0 scored 9 of 9 fully correct runs (48.0 of 48 stores, 6 of 6 bad inputs, $0.50), and every later version scored lower in quality. The published table in examples/supermarket-route/BENCHMARK.md covers 6 runs of v0.15.0 ($0.48 per run) and no later version.

Removed

  • The narrowings list in task.toml, with its quote check (0.17.0, #216).
  • The "Limits the design adds" and "Hand-solved cases" sections in evidence.md and the pull request description (0.17.0, #216).
  • The pull request opened by default: herd pr needs [pr] open = true or --yes again (0.16.0, #202).

Herd 0.17.0

Choose a tag to compare

@Beovulfo Beovulfo released this 29 Nov 22:38
e0a6190

Limits the designer adds to a valid input now have a place in task.toml, and every one shows in the report under "Limits the design adds", with its quote when it has one (issue #216).

  • Added: a top-level narrowings list in task.toml. Each entry is a table with limit and an optional quote, which must be a literal substring of the stored request. narrowings = [] says there are none. A quote that is not in the request, a missing key, a bad shape or an unknown key fails herd check, which names the entry. The quick route needs no list, but a present one is checked.
  • Added: herd verify records the same problems as warnings, and every narrowing as assumptions: the limit, then its quote, marked as in the request or as not in your request. evidence.md and the PR description show a "Limits the design adds" section above the results when there are any, listing every narrowing, quoted or not.
  • Changed: the designer brief and the criteria skill ask for the narrowings list.
  • Added: evidence.md and the PR description show a "Hand-solved cases" section right after the limits: every case's name, input and expected output in code blocks, each cut to its first 40 lines with a line saying how many were left out. In a benchmark run the frozen case had one line per pick while the request asks for a step-by-step simulation, and nothing showed it to the human.
  • Changed: that section replaces the single "Hand case" (20 lines) near the end of both texts; the list of case names and hashes stays.
  • Known limits: Herd cannot tell whether the list is complete: a designer can still leave a limit out. herd done does not refuse a missing key; only herd check fails, and herd verify warns. A quote must match the request byte for byte. The quote check only proves the quote text is in the request, not that it allows the limit, so the human judges every limit in the section. Long single lines are not cut, and many large cases could exceed GitHub's PR body limit.

Herd 0.16.2

Choose a tag to compare

@Beovulfo Beovulfo released this 29 Nov 21:02
2cfbc06

An interactive terminal omits run_in_background on an Agent call, so the guard denied every Herd designer and builder spawn (issue #213).

  • Fixed: the guard allows a Herd subagent spawn that omits run_in_background, except in headless (CLAUDE_CODE_ENTRYPOINT=sdk-cli) sessions, which offer the parameter. false is allowed and true is denied everywhere. Spike S7 (Claude Code 2.1.332, docs/spikes/s7-interactive-spawn.md) showed that the interactive default runs the spawn in the background, and that CLAUDE_CODE_FORK_SUBAGENT=0 runs it in the foreground. A false sent when the tool does not offer the parameter does not change that.
  • Changed: the Stop gate allows the stop and writes nothing while a Herd subagent is running in the Stop input's background_tasks, with or without a task, so the session waits for it.
  • Changed: the run skill's spawn lines and the agent descriptions say to pass run_in_background: false. When the Agent tool offers no such parameter, they say to spawn, end the turn and wait for the completion notification.
  • Changed: the run skill's word budget rose from 1060 to 1080 for this rule.
  • Known limits: observed on Claude Code 2.1.332 only. While a Herd subagent runs in the background, every stop of that session is allowed. A session that is not sdk-cli and offers the parameter but omits it is allowed in the background.

Herd 0.16.1

Choose a tag to compare

@Beovulfo Beovulfo released this 29 Nov 15:51
1c59049

A first run showed a guard denial for Herd's own designer or builder spawn, because the run skill said "in the foreground" without naming the parameter, and an omitted run_in_background means background (issue #199).

  • Fixed: the run skill's two spawn lines and the designer and builder agent descriptions say to call the Agent tool with run_in_background: false. The guard still denies an omitted value and true, because omitted means background.
  • Fixed: a denied Herd agent call that the session retries in the foreground is noted as Agent: recovered background <kind>, one per allowed retry. The final report lists it as recovered, for example Guard: 1 recovered (background herd:herd-designer x1), and a denial that was not retried stays denied. The raw guard notes keep both.
  • Known limits: Herd cannot force the model to pass the value; the text asks for it. recovered means the retry was allowed, not that it succeeded. The guard still denies an omitted value because omitted means background.
  • Measured: one headless run on 2026-11-29 (Claude Code 2.1.332, Haiku, 0.16.1 loaded with --plugin-dir, the README's example request on a three-row fixture): the one designer call passed run_in_background: false, permission_denials was empty, no guard note; $0.15, 99 s. One run, and the builder was not spawned (the session model matched build).

Herd 0.16.0

Choose a tag to compare

@Beovulfo Beovulfo released this 29 Nov 15:42
bbb72d4

A pull request was opt-in, so a finished GitHub task usually ended with no PR. herd pr now opens the evidence PR by default (issue #202).

  • Changed: herd pr opens the PR unless herd.toml has [pr] open = false. With no GitHub origin, or no gh on PATH, it prints one line (no pull request: ... (set [pr] open = false to silence this)), exits 0 and pushes nothing. herd done names the same reason in its Proven: line and in evidence.md.
  • Changed: herd done and the Stop gate ask for a commit only where a PR is on and can open, so a local-only repository finishes uncommitted as before. [pr] open = true and --yes still fail as before when there is no remote or no gh.
  • Changed: a broken herd.toml, a non-boolean open or a non-table pr counts as off, and herd pr without --yes refuses it, naming herd.toml, since a push cannot be undone. A missing file is the default.
  • Changed: the README Quickstart states the requirements on their own line: Claude Code, Python 3.11+ as python3, a git repository, and for the pull request a GitHub remote and gh.
  • Changed: herd init outside a git repository refuses with one line, exit 1, and creates nothing. It used to create the task.
  • Changed: the README first screen and Quickstart say the pull request is the default; [pr] open = false turns it off.
  • Known limits: GitHub means origin's host is exactly github.com or ssh.github.com (https, http, ssh or git URL, or scp form; any letter case; insteadOf expanded). GitHub Enterprise hosts and SSH host aliases skip by default: [pr] open = true pushes to them. Only origin's fetch URL is read. gh that is present but not logged in still fails at herd pr. Tested with a fake gh and a bare repository, not against real GitHub. This repository's own herd.toml still has a comment that says herd pr is off by default; a human edits it.

Herd 0.15.0

Choose a tag to compare

@Beovulfo Beovulfo released this 29 Nov 10:31
988fb50

The designer's hand-solved cases bind the builder: herd verify runs the program on each case and compares the whole output, so a coarser or narrower reading fails a check the builder cannot rewrite (issue #190).

  • Added: owned/cases in the task folder: <name>.in and <name>.out pairs, written by the designer before any code. herd note --tried --attack other-reading --example "prog {in}" --cases <folder> runs the program once per case, by name, and compares the whole stdout line by line (trailing blank lines and line ends aside). The first failing case is the fault, with its input and both outputs.
  • Added: the owned folder and the other-reading note are frozen at the first herd verify (owned.json). A change fails the attack, the guard denies writes to the folder, and a line added since the start that names the owned cases fails verify. herd note --owned-changed "<reason>" re-freezes at the next full verify, and the report shows the reason first under "Changed after red". At high risk the human's own message must state the reason before herd done passes.
  • Changed: on the standard route, tasks at medium and high risk need --cases for the other-reading attack; --expect stays for low risk and for tasks started before this version. --cases and --expect cannot be logged together.
  • Changed: the skills (adversarial, run, designer) say to write the cases before any code. No TestBudgets word budget changed.
  • Known limits: the reach check reads text lines only (not .md, .rst, .txt, or binary files), so an encoded path is not seen. The guard sees only the writes it detects. Generated cases from a reference (issue #191) are not built. The hand answers are the designer's claim, shown in the report. At high risk the confirmation is read from the session logs herd init and herd reopen recorded: an agent that reopens the task from its own claude -p session could state the reason itself. Not tried in a live session.

Also in this release: 0.14.14 (never released on its own)

A check, attack command, --refuses or --example that was only printf ... counted as evidence, while the same command with echo was refused as running no project code (issue #173).

  • Fixed: printf is vacuous like echo for herd check, herd verify, herd note and herd done. As with echo, a --refuses or --example command that pipes into a program (printf 'milk\n' | python3 prog.py) still counts.
  • Changed: the test fixtures that used printf as a passing attack command now run expr and ls.
  • Fixed: a check made of echo or printf followed by real code (printf x && python3 -m unittest, echo start; pytest, echo a || make test) counted as running no project code, because the shape list matched everything after echo. Now every command of a chain (split on &&, ||, ;, |, & and newlines outside quotes) must be true, :, exit N, echo, printf or test -f/-e PATH, and a $(...) or backtick outside single quotes always runs a command. exit N joins exit 0 so echo no >&2; exit 1 stays vacuous. The --refuses/--example pipe exception is unchanged.
  • Known limits: the rule is a short list of command shapes: sh -c 'printf ok' or cat file runs no project code and is not refused. Not tried in a live session.
  • Known limits: an escaped \$( is still read as a substitution; sh -c '...' and scripts are not looked into. Not tried in a live session.

The attack lines in herd verify and evidence.md joined an attack's check and its --refuses or --example command into one string, python3 -m unittest t.BadInput --refuses python3 -m textutil, so a reader could not copy either command on its own (issue #142).

  • Changed: each part of an attack is a labelled field. herd verify prints attack bad-input failing: check python3 -m unittest t.BadInput; refuses python3 -m textutil: exit 0, needs 1 to 125, with why a part failed after that part. evidence.md and the PR body print bad-input passing (check `python3 -m unittest t.BadInput`, refuses `python3 -m textutil`), each command in its own backticks. --example and --expect show as example and expect fields the same way.
  • Changed: a --covered-by attack shows covered by C1, plain text, since a criterion id is not a command. A collision --refuses "n/a: <reason>" shows its reason without backticks.
  • Known limits: output format only; no benchmark leg was run. The wiki page Example.md still shows the old format: refreshing it needs a new paid run.

Red first, the herd verify before any code, exited 1 when it went as planned: every check failing is the expected result, but the agent and the demo GIF (#116) saw "Error: Exit code 1" (issue #118).

  • Added: herd verify --red exits 0 and prints "N of N criteria failing, as expected before the build" when every criterion with a check fails. It exits 1 with "red first not met: C1 already passes" (or "C1 ran zero tests", or "no criterion has a check") otherwise. Attack results do not change its exit code: attacks may fail before the code too. Without --red, herd verify exits as before.
  • Changed: the run skill (step 4), the quick route and herd-designer run herd verify --red and drop the "checks must fail, tighten it" text, which the exit code now enforces.
  • Fixed: herd verify --red exited 0 with "N of N criteria failing, as expected before the build" even when code existed before the first verify. It now exits 1 with "red first not met: code already existed before the first verify: ".
  • Fixed: herd verify --only <id> --red ignored --red, and herd verify --red --only <id> took --red as the slug. Both orders are now refused with one line and exit 1.
  • Known limits: for a failing check, "ran zero tests" is read from the stored output tail only. Not tried in a live session.

The guard allowed (cd sub); git push, x=$(date); git push --force, x="$(echo ")"; git push)", git clean --f, git clean --fo and chmod -w .herd/active during a task. Mutation testing found it (issue #178, part of #157).

  • Fixed: an operator glued to a parenthesis ();, )&&, )|) splits the command, as ; alone did: shlex returns it as one token. <( and >( (process substitution) start a new command too.
  • Fixed: the body of a $(...) is found by a scan that skips quotes and nested parentheses, so a quoted ) no longer ends it. An unclosed $( is checked to the end of the line.
  • Fixed: a long flag of 3 or more characters counts as a prefix, so --f and --fo match --force, as git takes them. An ambiguous prefix is denied too; git refuses it anyway.
  • Fixed: chmod's mode is the first word after chmod's own options (-R, -f, -v, ...), so a mode such as -w or a-w no longer hides the path. With --reference=FILE every other word is a path.
  • Known limits: the guard still reads command text only: bash -c, eval, scripts and aliases pass (a Non-Goal of the guardrails design). A $(...) inside single quotes is checked as if it ran, so it can over-deny. A case pattern's unmatched ) inside $(...) ends the body early. Not tried in a live session.

After herd cancel, herd init recorded the cancelled task's unpushed branch as the PR base, and trusted a base that no longer existed (issue #184).

  • Fixed: herd init after herd cancel recorded the cancelled task's unpushed branch herd/<slug> as the PR base, so herd pr failed with "Base ref must be a branch" (issue #184). A task cut from an unpushed herd/<slug> branch now takes the base that task recorded (main, or the upstream name of the #148 case); a pushed herd/<slug> branch stays the base.
  • Fixed: herd init trusted the base a cancelled task recorded even when that branch no longer existed, and crashed on an unreadable base file. A base that is neither a local nor a remote-tracking branch, or that cannot be read, is ignored and the upstream rule decides.

A /herd:run handed to a subagent: a report said the guard denied a foreground herd:herd-designer call (issue #181).

  • Fixed: a /herd:run handed to a subagent is now recorded and its denial says what it received. Spike S6 (Claude Code 2.1.332, docs/spikes/s6-subagent-agent-call.md) recorded the PreToolUse input of a foreground herd:herd-designer call from a subagent: it carries run_in_background: false plus agent_id and agent_type, and the guard allows it. The denial reported in #181 did not reproduce, so the guard's decision is unchanged. A denial now says what it received (received \run_in_background: true`orreceived no `run_in_background`), and the run skill and docs/how-it-works.mdname the proven route for an orchestrating agent: a headlessclaude -p "/herd:run ..."session in the project. Not proven: a nested/herd:runending in a passingherd done`.

Mutation testing of the rule-enforcing code (issue #157). A green suite shows the tests pass, not that they would fail on a bug.

  • Added: tests/mutate.py GROUP (gate, guard, done, verify, triage) runs mutmut 3.9.0 through uvx, so nothing is added to the project and the standard-library rule holds. It mutates one group's functions in a copy of the repository and prints each surviving mutant at its source line. Not in CI: a group takes 1 to 30 minutes, and verify takes longer, so it is sampled. How to run it and the scope: docs/how-it-works.md, "Mutation testing".
  • Added: tests for the survivors in gate (tests/test_gate_mutants.py), guard (tests/test_guard_mutants.py), done (tests/test_done_mutants.py) and triage (tests/test_herd_triage.py). Before, no test covered the guard's session-log rule, and most of the Stop gate's and herd done's messages were not checked word for word.
  • Found: the guard allows (cd sub); git push, x=$(date); git push --force, a git push inside a...
Read more

Latest Stable

Choose a tag to compare

@tonialmagro-tomtom tonialmagro-tomtom released this 27 Nov 08:15
3a2689d

What's Changed

Full Changelog: v0.14.12...0.14.13

What's Changed

Full Changelog: v0.14.12...v0.14.13

Herd 0.14.12

Choose a tag to compare

@Beovulfo Beovulfo released this 26 Nov 23:53
c3324dd

A new /herd:run session that continued a task finished in an earlier session (to merge the base branch or fix review comments on its PR) was blocked at 3 stops with "no Herd task was started": start.json named only the session that ran herd init, and there was no way to take the task up again (issue #145).

  • Changed: herd reopen <slug> makes a finished task in this checkout active again. start.json keeps the session that ran herd init and adds the session the pre-init hook last saw run a herd command here to a sessions list. The block counters (gate_blocks, done_blocks) are reset.
  • Changed: the Stop gate (with or without an active task) and the design hook count a session in sessions as the task's, like the init session.
  • Changed: a reopened task must pass herd done again. The evidence is tied to the work by its content id, so an edit after the reopen makes it stale until herd verify runs. Since start.json changed, the next herd verify runs every check instead of skipping an unchanged tree.
  • Changed: herd reopen refuses a cancelled task, a task that does not exist, a task whose start.json is missing or unreadable, and any reopen while another task is active in the checkout.
  • Changed: the run skill tells an agent continuing a finished task to run herd reopen <slug> instead of herd init.
  • Known limits: without the pre-init hook (such as in a terminal) no session is recorded, and the task is active but its gate may not block the new session. A session that continues a finished task without herd reopen is still blocked as before. Not tried in a live session.

Herd 0.14.11

Choose a tag to compare

@Beovulfo Beovulfo released this 26 Nov 21:12
00211fa

The 0.14.10 Stop gate blocked a finished task. In the 0.14.10 benchmark, 1 of 3 Haiku runs ran herd init as H=.../herd.py; python3 "$H" init ... and passed herd done, and the gate then blocked 3 stops with "no Herd task was started": the command check only knows a literal herd.py init.

  • Fixed: with no active task, the gate also reads .herd/tasks/*/start.json. A task whose recorded session is this session's log counts as an init, however the command was written. The command check stays for a task folder that is gone.

Herd 0.14.10

Choose a tag to compare

@Beovulfo Beovulfo released this 26 Nov 20:01
0db38f2

A session started with /herd:run could skip Herd entirely: with no active task the Stop gate allowed every stop. In field use, 1 of 36 sessions (Haiku, a docs-only request) ran herd status, edited 3 files and opened a pull request with no .herd/tasks folder; the rerun on Sonnet cost $0.43 instead of $0.01 (issue #124, part of #121).

  • Changed: with no active task, herd gate reads the hook's transcript_path. It blocks the stop when the log has a /herd:run message with arguments (the parser herd init already uses), an Edit, Write, MultiEdit or NotebookEdit call (also in subagent logs), and no Bash command that ran herd.py init (in the session's log or its subagents' logs, since the designer subagent runs it). The reason says to run herd init <slug> "<goal>".
  • Changed: the same MAX_BLOCKS (3) circuit breaker applies, per session log. The count and the release are recorded in herd-noinit.json in the checkout's git dir, never in the work tree.
  • Changed: sessions without a /herd:run message, without an edit, or that ran herd init (a task done or cancelled since) stop freely, as before. A missing or unreadable log allows the stop.
  • Fixed: a non-object item in a log message's content (a string, a number or null) no longer crashes the preinit hook or the Stop gate while they look for edits.
  • Known limits: edits made through Bash (sed, cat >) are not seen, so a session that edits only that way still stops freely. A failed herd init command counts as run. herd cancel needs a task, so a session whose human dropped the request is released only after 3 blocks. Not tried in a live session.