@lannguyensi/harness 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cli/approve/branch-protection.js +1 -1
  3. package/dist/cli/approve/branch-protection.js.map +1 -1
  4. package/dist/cli/dry-run.js +13 -1
  5. package/dist/cli/dry-run.js.map +1 -1
  6. package/dist/cli/init/composer.js +6 -6
  7. package/dist/cli/init/composer.js.map +1 -1
  8. package/dist/cli/init/profiles.d.ts +1 -1
  9. package/dist/cli/init/profiles.js +1 -1
  10. package/dist/cli/init/templates.d.ts +1 -1
  11. package/dist/cli/init/templates.js +47 -27
  12. package/dist/cli/init/templates.js.map +1 -1
  13. package/dist/cli/pack/hook-branch-protection.js +1 -1
  14. package/dist/cli/pack/hook-branch-protection.js.map +1 -1
  15. package/dist/cli/pack/hook-solution-acceptance-writeguard.js +1 -1
  16. package/dist/cli/pack/hook-solution-acceptance-writeguard.js.map +1 -1
  17. package/dist/cli/pack/hook-solution-acceptance.js +1 -1
  18. package/dist/cli/pack/hook-solution-acceptance.js.map +1 -1
  19. package/dist/cli/policy/intercept.js +77 -10
  20. package/dist/cli/policy/intercept.js.map +1 -1
  21. package/dist/cli/validate/checks.js +2 -2
  22. package/dist/cli/validate/checks.js.map +1 -1
  23. package/dist/policy-packs/builtin/branch-protection-runtime.d.ts +1 -1
  24. package/dist/policy-packs/builtin/branch-protection-runtime.js +1 -1
  25. package/dist/policy-packs/builtin/branch-protection.js +2 -2
  26. package/dist/policy-packs/builtin/branch-protection.js.map +1 -1
  27. package/dist/policy-packs/builtin/post-merge-gate.js +1 -1
  28. package/dist/policy-packs/builtin/solution-acceptance-runtime.js +1 -1
  29. package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +1 -1
  30. package/dist/policy-packs/builtin/solution-acceptance.js +1 -1
  31. package/dist/runtime/bash-match-facts.d.ts +58 -0
  32. package/dist/runtime/bash-match-facts.js +194 -0
  33. package/dist/runtime/bash-match-facts.js.map +1 -0
  34. package/dist/runtime/bash-match-registry.d.ts +75 -0
  35. package/dist/runtime/bash-match-registry.js +359 -0
  36. package/dist/runtime/bash-match-registry.js.map +1 -0
  37. package/dist/runtime/bash-prefix-parse.js +23 -0
  38. package/dist/runtime/bash-prefix-parse.js.map +1 -1
  39. package/dist/runtime/command-normalize.d.ts +92 -0
  40. package/dist/runtime/command-normalize.js +1182 -0
  41. package/dist/runtime/command-normalize.js.map +1 -0
  42. package/dist/runtime/intercept.d.ts +39 -1
  43. package/dist/runtime/intercept.js +33 -4
  44. package/dist/runtime/intercept.js.map +1 -1
  45. package/dist/runtime/read-only-bash.d.ts +43 -0
  46. package/dist/runtime/read-only-bash.js +15 -3
  47. package/dist/runtime/read-only-bash.js.map +1 -1
  48. package/dist/schema/policies.js +1 -1
  49. package/dist/schema/policies.js.map +1 -1
  50. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.43.0] - 2026-08-01
11
+
12
+ > **Upgrade note:** the template-level changes in this release — the single-`&` trigger boundary (including the `operator_only` kill-switch deny) and the `mcp__grounding-mcp__` tool-prefix rename — live in the manifest templates, so an EXISTING install keeps its old `harness.yaml` triggers until the operator re-runs `harness init` (or edits the manifest by hand). The engine-side normaliser fixes below apply on package upgrade with no manifest change.
13
+
14
+ ### Security
15
+
16
+ - **A single `&` was not a command boundary to any policy trigger, so a gated verb placed after one reached no gate at all, including an `operator_only` deny** (task `d834a065`). bash starts a new command after `&`, but the alternation every shipped `policies[].trigger.bash_match` shares listed only `&&`. Measured through the real prediction path against `docs/examples/full-manifest.yaml`, with each policy plain form as its own positive control and a PATH shim proving the verb really executed: `A=x&git status`, `A=x&git push`, `A=x&gh pr merge` and `A=x&harness pause` all missed their trigger, and `sleep 0 & git status` misses with no assignment prefix at all, so this is a boundary-alphabet gap rather than a quote-model one. The `harness pause` case is the sharpest: `deny-kill-switch-bypass` is `operator_only: true`, which no in-session evidence can open, and one character walked around it. Fix: the `&&` alternative becomes `&` in every policy trigger across `src/cli/init/templates.ts` and `docs/examples/full-manifest.yaml`. `&&` is subsumed rather than dropped, since in `A=x&&git status` the second `&` serves as the boundary, so the change is strictly more permissive and is pinned in both directions. **Cost, measured rather than argued** (the analysis that found this could not measure precision at all, 75 of 75 axes without a reference): a false-alarm corpus with bash deciding whether the verb really runs reports 3 pre-existing false alarms and 6 new ones, every new one of the shape "gated verb mentioned as text after a literal `&`" (`echo "a & git status"`, the same string inside a heredoc body, after a `#` comment, as a `grep` pattern, or as an assignment value). One more spelling outside that corpus behaves the same way: `sed -i 's/foo/& git status/' notes.md`, since `&` is sed's whole-match backreference. That is the already-open `dbc6d303` class, which fires on `&&` in text today, widened by one spelling; the direction is fail-closed. **Which policy a false alarm lands on matters, so it is recorded rather than averaged:** most land on `requires:`-gated policies an agent can satisfy itself, but a mention of `harness pause` after an `&` now trips `deny-kill-switch-bypass`, which is `operator_only: true` and has NO in-session recovery path. Writing prose that quotes this very fix in a Bash heredoc is enough to hit it. Measured live twice while reviewing this change. **Surfaces deliberately left on the old alphabet, named rather than swept:** three policy-pack runtime regexes (`CURATED_MUTATION_BASH_RE` and `GH_PR_MERGE_BASH_RE` in `src/policy-packs/builtin/post-merge-gate-runtime.ts`, `DEFAULT_PUSH_BASH_RE` in `src/policy-packs/builtin/solution-acceptance-runtime.ts`) and this repo's own `dogfood/harness.yaml`. They carry the identical gap on live gate surfaces, but a blanket sweep would be wrong: `ESCAPE_GIT_BASH_RE` / `ESCAPE_HARNESS_BASH_RE` in the same pack file are ALLOW-lists checked first, so widening those would LOOSEN a gate instead of hardening it. Tracked as follow-up `76671e5a` so the per-surface direction is decided rather than assumed. **What this does NOT touch:** `expire_on_bash_match` is a separate anchored family (`^gh pr (merge|close)`, `^git push origin (master|main)`) with no boundary alternation, deliberately left alone because widening it would change ledger-expiry semantics, and now pinned to stay anchored and alternation-free. Also unchanged: the quote-model bypasses (`cf3dff51`, `b093911d`) that survive this fix, and the head-spelling gaps (`"git" status`, `\git status`). A second emitter carried the same hole and is fixed here too, found by review rather than by the original sweep: `src/cli/init/composer.ts`, the `harness init --interactive` Custom profile, six patterns, so the bypass stayed live for every operator who picked Custom. Loss for the trigger layer was measured against the previous patterns with a passing positive control: **0 of 7,764 old matches lost** across all 15 shipped patterns, 900 newly matched, over a 68,040-string corpus of assignment prefixes, separators, wrappers and gated verbs. That number covers the RAW trigger layer only.
17
+
18
+ **A third change was attempted, measured, and REVERTED, recorded here because the attempt is the useful part.** `BOUNDARY_RE` in `src/runtime/command-normalize.ts` has the same gap, and leaving it means the adjacent spelling `A=x&env -C /tmp git status` stays ungated (a wrapper can only be peeled after a recognised boundary). Adding `&` there closed that and 259 similar spellings, but review measured what the first corpus never sampled: `BOUNDARY_RE` is quote-unaware, `&` inside a quoted assignment value is common, and the split lands mid-quote so the value continuation never engages. Independently reproduced with a passing positive control: **140 of 140** sampled `<wrapper> FOO='a&b' <gated verb>` spellings LOST a gate they held before, including the `operator_only` kill-switch deny. Closing one bypass while opening a wider one is not a trade worth shipping, so the edit is reverted and the module now carries the measurement so the next attempt starts from it. The remaining `A=x&env ...` gap is tracked separately; it needs a design that does not regress the quoted-value case, not another character in that alternation. New tests in `tests/cli/init-full-template-pins.test.ts` (data-driven over all three profile templates plus `composeCustom()` output, asserting that EVERY declared trigger is exercised rather than merely one, and a negative pin that no shipped `bash_match` string in the templates, the composer, the example manifests or the docs still carries the old alternative, scanning each file as one whitespace-collapsed string because a per-line scan went blind to the four prettier-wrapped composer values, which a mutation confirmed) and `tests/cli/init-full-template-kill-switch-deny.test.ts`. The docs that taught the vulnerable anchor (`docs/writing-custom-policies.md`, `docs/ARCHITECTURE.md`, `docs/examples/policies/02-clean-check-before-push.yaml`) are updated, since they were the propagation vector.
19
+
20
+ - **A git-verb `bash_match` policy trigger could be silently defeated by wrapping the command, and the bypass left NO audit trail at all — no ledger query, no decision, no `harness audit` row** (task `ea8becf5`). `preflight-before-investigation`'s trigger was a raw regex requiring the literal token `git` at a shell boundary, optionally preceded by `VAR=value` tokens; `env`/`nice`/`command`/`sudo`/`doas`/`time`/`timeout`/`stdbuf`/`setsid` wrappers, any git global option other than `-C`, a path-qualified `git` binary, or even a doubled space between `git` and its subcommand all defeated it. Reproduced live: `env -C <repo> git status` reached an un-preflighted repository while `cd <repo>; git status` was correctly blocked. Fix: a new pure normaliser, `src/runtime/command-normalize.ts`, peels the wrapper prefixes above (matching the git token by basename, e.g. `/usr/bin/git`) and canonicalises a git invocation's own global options (`-C`, `-c`, `--git-dir`, `--work-tree`, `--no-pager`, `--exec-path`, `--namespace`, …) down to `git <subcommand>`; `policyMatchesEvent` (`src/runtime/intercept.ts`) now tests each `bash_match` regex against the raw command and, only on a raw miss, against the normalised one — additive by construction, so nothing gated before this can become ungated, pinned by a superset test. This change lives entirely in the engine, so an already-installed manifest is fixed on upgrade — no `harness apply` or manifest edit required. **What this does NOT close, so no doc or commit claims it does:** only a `bash_match` whose peeled head token is literally `git` benefits at all. `review-before-merge-bash`'s `gh pr merge` trigger, `review-subagent-before-pr-create-bash`'s `gh pr create` trigger, `dogfood-before-release`'s `npm publish` half (its `git tag v` half IS covered), and all three `deny-*` operator-only kill switches (`harness pause`/`resume`/`gate`, the session-env-strip pattern, the pause-sentinel-write pattern) remain exactly as wrapper-bypassable as before this change — do not read it as having hardened those (since narrowed in this same Unreleased batch by task `432db3d3`, see below: the `gh`/`npm publish`/`harness` head tokens are now covered, while `deny-session-env-strip` and `deny-pause-sentinel-forgery` remain open there too). Also still open: `xargs git status` (deliberately excluded — `xargs` can invoke its wrapped command zero, one, or many times, unlike a transparent wrapper), a quoted subcommand (`git "status"`), backtick command substitution (`` echo `env -C /tmp git status` ``), `sh -c`, heredocs, `eval`, base64-decoded payloads, and quoted paths containing whitespace. **Correction (review round 2): `$(...)` command substitution is NOT open, unlike the backtick case right before it** — `echo $(env -C /tmp git status)` demonstrably blocks today, ACCIDENTALLY: `$(...)`'s opening paren happens to be the exact `(` character this module already treats as a shell boundary for the `(cd X && ...)` leading-subshell case, so it falls out of that, not a deliberate feature, and is now pinned by a dedicated test so an unrelated future edit can't silently drop the coincidence. Ten more measured bypasses found in the same review round (G2 finding, 2026-07-27), none of them peeled wrapper prefixes or a recognised `git` spelling: `exec`/`nohup`/`ionice`/`flock`/`script`/`chrt`/`taskset` wrapping `git status`, a backslash-escaped `git` token (`\git status`), a quoted git BINARY name (`"git" status` — the mirror image of the quoted-subcommand gap above), and `env -S "git status"` (the split-string flag hands off to a fresh, deliberately-opaque re-parse). An eleventh, `nice -10 git status` (the bare-dash form `nice(1)` documents as its PRIMARY spelling), was measured as a bypass in the same pass but is now CLOSED (G3 fix, review round 2): `nice` stays in the peeled-wrapper list, this just widens which of its own spellings are recognised. And an `env`-argument spelling like `--default-signal=INT`, which only one of the two independent env-peelers previously recognised, is ALSO now closed (G6 fix, review round 2): the earlier fix here (sharing the flag-NAME enumerations via exported constants in `src/runtime/read-only-bash.ts`) had only closed the flag-name-SET drift, not this specific bypass, which needed its own generic glued-`--long=value` catch-all mirrored into this module too. Separately (G4 finding, review round 2): above `MAX_NORMALIZE_LENGTH` (100,000 chars), normalisation used to skip SILENTLY — no stderr line, no audit row; `harness policy intercept` now emits one stderr line reporting the skip, and `docs/okf/gate-fail-posture-matrix.md` gained a matching row. **Newly widened false positives** (pre-existing class, task `dbc6d303`): quoted or heredoc text mentioning a wrapped git verb can now trigger where it previously did not — but only when the mention sits at a shell-boundary position (line start, or after `;` / `|` / `&&` / `(`), which is narrower than "anywhere in quoted text": measured, `echo "a; env git status"` blocks while `echo "env -C /tmp git status"` does not. Hit three times live during this fix's own development: an Understanding Report heredoc, a commit message containing an `&& git push` example, and a reviewer's own probe script whose case labels contained the literal verbs. `harness dry-run`'s trigger prediction now matches raw-or-normalised the same way `policy intercept` does, closing a debug-verb/runtime prediction mismatch on the identical spellings above.
21
+ - **Per-repository target resolution is explicitly NOT part of this task, and no doc or commit claims otherwise.** `${REPO}`/`${BRANCH}` (`src/cli/policy/intercept.ts`) still resolve from the hook's own cwd alone, exactly as in 0.42.0: a command that explicitly names a different repository (`git -C <B>`, `env -C <B>`, a leading `cd <B> &&`) does not change what `${REPO}`/`${BRANCH}` name. A `preflight:<repo>` fact recorded for repository A therefore still authorises a command that explicitly reads (or, chained, mutates) repository B — unchanged from the shipped 0.42.0 behaviour, not a new gap introduced here. A per-command target-directory resolution for these builtins was built and reviewed on this same task, but was found to regress security in three consecutive review rounds — Risk Gate risk declassification, a push-gate multi-invocation fail-open, and (found twice: first fixed via `&&`-chain coverage, then found still open via `|`/`||` chaining) a non-git gated verb inheriting a decoy repo's target from an unrelated, `-C`-scoped git call sharing the same command line (e.g. `git -C <decoy> rev-parse HEAD | gh pr merge`) — and was removed before shipping rather than patched a fourth time. Each fix was only ever partial because a single `targetDir` per event cannot express "this invocation targets repo B, but the gated verb after it runs in the caller's own cwd"; the correct fix needs to attribute a target to the SEGMENT that actually satisfies a policy's own trigger, which means the policy builtins becoming per-policy instead of per-event — an architectural change out of scope for this task, tracked as follow-up task `98ad072f`. The extraction this would have been built on (`command-normalize.ts`'s `targetDir`/`targetBase`, including its own git-vs-git and git-vs-non-git ambiguity rules) stays in the tree, fully tested but unwired, as that follow-up's foundation. New tests: `tests/runtime/command-normalize.test.ts`, new suites in `tests/runtime/intercept-cli.test.ts` and `tests/cli/dry-run.test.ts` (the G1 git-vs-non-git-verb ambiguity cases through the real `review-before-merge-bash`/`review-subagent-before-pr-create-bash`/`dogfood-before-release` triggers, the G2 ten-spelling ceiling plus the `$(...)` accidental-coverage pin, the G3 `nice` bare-form cases, the G6 `env --default-signal=INT` case, a `policy intercept` end-to-end pin on the G4 stderr line, and an explicit regression test that a command naming a foreign target repo resolves `${REPO}`/`${BRANCH}` to the CWD repo, not the named target, so a future reintroduction of target resolution cannot land unnoticed). Docs: `docs/okf/gate-fail-posture-matrix.md`, `docs/okf/debug-verb-selection.md`, `docs/okf/policy-engine-producer-wiring.md`, `docs/okf/codex-adapter-parity-gaps.md`, `docs/okf/pause-vs-gate-kill-switch.md`.
22
+
23
+ - **Non-git `bash_match` triggers no longer lose to a one-word wrapper: `command-normalize.ts`'s head-token condition widened from literally-`git` to the closed set `git`/`gh`/`npm`/`harness`** (task `432db3d3`, follow-up to the `ea8becf5` entry above). Measured closed, per spelling through the real hook entry point with the shipped 0.42.0 binary as negative control: `env` / `env -C <dir>` / `nice` wrapping the `gh pr merge` verb, `env` wrapping `gh pr create`, `env` / `nice` wrapping `npm publish`, `env` / `nice` / `command` / `env -C <dir>` wrapping `harness pause`, plus whitespace-run spellings (`gh pr merge`, `gh pr merge`, tab forms, `npm publish`) — the interior-run group via a full-segment single-space rejoin for set heads, because collapsing only the head-adjacent gap measurably left `gh pr merge` open (review finding). Matching stays raw-OR-normalised and therefore strictly additive (superset pinned), with a new ordering pin: `env -u CLAUDE_CODE_SESSION_ID npm publish` must keep blocking `deny-session-env-strip` via the RAW match — the one shipped shape where the normalised form erases what another policy keys on, so this single test goes red if raw-first matching is ever collapsed to normalised-only. **What this does NOT close, measured and pinned rather than implied: only one of the three operator-only kill switches benefits.** `deny-session-env-strip` keys on `env`/`unset` head tokens and is structurally out of the normaliser's reach (its peel loop consumes `env -u <VAR>` while hunting for a gated command behind it, erasing the very text that trigger keys on); `deny-pause-sentinel-forgery` keys on `tee`/`cp`; both remain one-wrapper-word bypassable (`nice env -u CLAUDE_CODE_SESSION_ID ls`, `nice tee <sentinel>`), pinned as explicit not-covered tests. Also uncovered and pinned: tool-specific flags between head token and subcommand (`gh -R`, `npm --loglevel`) and path-qualified `gh`/`npm` spellings (byte-identical through the normaliser; a path-qualified `harness pause` still denies via the trigger regex's own `\S*/` alternative at the raw level). New false-positive class recorded: introspection spellings (`command -v harness pause`, `sudo -l harness pause`) now deny — over-block direction, distinct from the quoted/heredoc class (task `dbc6d303`), which this change widens twice: to wrapped non-git verb mentions at shell-boundary positions, and — via the full-segment rejoin — to whitespace-run spellings of them inside quoted text (measured example: `harness explain-policy --command "( npm publish )"` now matches where only its single-spaced variant did before). A new drift guard, `tests/runtime/bash-match-head-token-drift.test.ts`, couples the engine's head-token set to `FULL_TEMPLATE`'s actual `bash_match` policies (policy inventory plus per-token spelling presence), so the next policy gating a new head token turns a test red instead of staying silently uncovered; the guard's own residual — a new alternative added ALONGSIDE a still-correct token inside an existing policy's regex escapes both checks — is stated in the test file header. Docs: the `deny-kill-switch-bypass` UPDATE comment in `src/cli/init/templates.ts` and `docs/okf/pause-vs-gate-kill-switch.md` now state the partial closure precisely instead of the pre-fix "no-op unless `git`" claim.
24
+
25
+ - **SECURITY: a quoted env-assignment value with embedded whitespace (`VAR='hello world' git push`) bypassed every `bash_match` gate on BOTH matching layers — closed by continuing the assignment's value across tokens in the normaliser** (task `13e55484`, found by a read-only explorer during `d977ad58` and verified against the shipped binary, not derived). Measured at the real hook entry point with shipped 0.42.0 as control: `VAR='hello world' git push origin master` and `VAR='hello world' gh pr merge 4242 --squash` both produced "no policy matched" while their plain spellings blocked. The two layers failed on the same character: the raw regex's `(\w+=\S+\s+)*` cannot span an embedded space, and `command-normalize.ts`'s whitespace tokenizer split the assignment into `VAR='hello` + `world'`, the second token aborting the wrapper-peel loop so the segment came back byte-identical. Fix: a `consumeAssignment` helper continues an assignment's VALUE across whitespace-split tokens while an opening quote from that assignment stays unbalanced at a token's end AND a matching close exists in a later token, used by both the top-level peel loop and `peelEnv`'s own assignment scan (`env VAR='a b' git push` was the same bypass one wrapper deep) — deliberately NOT a general quote-aware tokenizer. **Review round 1 found the first version's load-bearing claim ("additive by construction") FALSE by measurement (CRITICAL, fixed before merge):** a 30k-case seeded differential fuzz against a master worktree surfaced 482 lost matches, rooted in ANSI-C quoting — bash escapes `\'` inside `$'...'`, a plain-`'...'` scanner closes on it — so `A=$'don\'t' env harness pause # '` left a phantom-open state that swallowed the gated head token and turned three MASTER-BLOCKED commands (push gate, merge gate, and the operator-only kill-switch deny) into "no policy matched", PATH-shim-verified as real invocations. Closed with a ONE-DIRECTIONAL GUARD: the continuation abandons back to the byte-exact pre-task one-token consume the moment the token it would consume next matches `GIT_TOKEN_RE` or `NON_GIT_HEAD_TOKENS`. **Scope of the guarantee, corrected in round 2 after the first re-wording overclaimed again:** the guard closes the HEAD-SWALLOW channel specifically (a diverging quote state can never swallow or re-target a recognised head token — round-2 re-verified: the round-1-style differential fuzz lost 0 of 19,994 cases). It is NOT universal monotonicity: a second, round-2-measured channel remains where the continuation closes on a wrapper's glued flag token and the peel resumes at that wrapper's next argument (`A='x timeout --signal=INT' 5 git push` matched on master, does not here — 550 of 41,440 adversarial cases). Every found member is a MASTER FALSE POSITIVE, PATH-shim-verified (110 are `bash -n` syntax errors, the other 440 execute the next word — `5`, `-e0` — never the gated verb), so no gated invocation is lost and the branch is the more bash-accurate side; the class is pinned so it cannot silently widen. Differential regression pins: the three ANSI-C repros, a wrapper-swallow case (`env VAR='a git push origin master' foo`), the wrapper-argument-list class above, and a path-qualified-glued-quote case (`VAR='a /usr/bin/git' git push` — the guard's exact-spelling check does not abandon there, and the REAL invocation behind it now matches, a measured fail-closed gain). An UNTERMINATED quote (`VAR='a git push`) keeps its pre-task normalised match, and the engagement assurance was re-scoped after being measured not load-bearing (the whole-corpus ≥8 threshold stayed green with every quoted entry deleted): every quoted-assign corpus entry must now match ONLY via normalisation, ≥4 entries, so disabling the continuation reddens the assertion itself — the dbc6d303 lesson applied twice. Closure pinned per variant: double quotes, multiple mixed-quoting assignments, assignment+wrapper, env-internal assignment, tab-in-value, chained quote runs (`'a b'"c d"`), and the second gated verb; mutation-probed both ways (guard removed → exactly the 4 differential pins red; both call sites reverted → 11 red: the 8 closure pins, the over-block pin, the corpus property, and the family engagement). **What this does NOT close, pinned as still-open rather than implied:** a shell-boundary character INSIDE the quoted value (`VAR='a; b' git push origin master` — quote-unaware `BOUNDARY_RE` splits the segment before tokenisation ever runs; measured bypass on both master and branch, outside this task's pre-declared budget per its halt criterion); a quoted value containing the literal word `git`/`gh`/`npm`/`harness` as its own token (`VAR='a git b' git push` — the guard's honest cost; byte-identical to master's behaviour, so nothing regressed); backslash-escaped whitespace without quotes (`VAR=a\ b git push`, task `b093911d`'s class); and the RAW regex half, deliberately unchanged (the engine-level fix heals installed manifests on upgrade — note the shipped 0.42.0 binary has NO normaliser at all, so every wrapped spelling here is 0.42.0-bypassable until the next release ships this whole Unreleased batch). **New accepted over-block, decided not discovered:** a quoted assignment inside TEXT at a segment-start position now matches (`echo "a; VAR='x y' git push"` blocks where master allowed) — fail-closed direction, same class the module's KNOWN OVER-MATCHING section documents, pinned as a boundary assertion. Latency (corrected twice in review — the first entry claimed sub-microsecond, the second gave numbers without naming the input shape, which varies the cost by >2x at the same length): 0.6-2µs per `normalizeCommand` call on typical spellings; at `MAX_NORMALIZE_LENGTH` (100k chars) the cost ranges by shape from ~1.2ms (plain command, both sides identical) through ~0.85ms master / ~1.09ms branch (assignment-heavy) to ~2.0ms master / ~2.3ms branch on the worst adversarial quoting shape — linear scaling on every shape, against a 1000ms hook budget.
26
+
27
+ ### Added
28
+
29
+ - **Cross-build measurements of the Bash prefix parser's cd-target extraction now have a permanent, self-testing instrument: `scripts/measure-bash-prefix-parse.mjs` (`npm run measure:bash-prefix-parse -- --self-test`, then with `--baseline name=path` builds for a real run)** (task `47297478`). The `b093911d` run produced three consecutive measurement corpora that reported "0 lost cd targets" while being structurally incapable of reporting a loss (round 3: the separator-less arm rendered `A=xcd /tmp` and a non-writable cwd silently killed every redirect shape; round 4: exactly the one spelling per separator where the baseline is also null), each time turning into a false safety claim that cost a full review round. The tool hardens that run's `final-audit.mjs` into repo infrastructure: a candidate build of `src/runtime/bash-prefix-parse.ts` is measured against real bash (resolved once to an absolute path with execvp-faithful file/executable checks; the corpus children get a PATH containing ONLY the probe-shim directory, so no corpus command can resolve a real binary via PATH — that constrains lookups, not absolute paths, and the generator emitting no absolute binary paths is what makes "today nothing but the probe shim executes" true; the workspace also runs the shim once up front and fails with a self-naming error if the interpreter path is broken) and at least two baseline builds — duplicate baseline names are rejected instead of silently merging counter buckets. PER-ARM GATE: an arm whose shapes never ran, never entered the target, or whose baseline never hit is reported as proving nothing and is never folded into a total zero; a total that excludes such arms says so instead of printing a bare 0, and the baseline-independent candidate table (per-arm hits, phantoms, wrong targets — attribution down to the spelling) carries the same qualifier for arms that were never observed at all. A rendered legend states what a phantom is (bash did not enter the target ON THIS RUN, which includes a statically present `cd` on a short-circuited `||` branch — conservative for a risk gate, not by itself a parser defect). Both residual weaknesses the run's reviewer named in `final-audit.mjs` are fixed: every baseline keeps independent counters (a loss against two baselines counts against both, no `else if` folding), and a non-null-but-WRONG target is its own failure class for candidate and baselines alike, never a hit — so a wrong-target baseline cannot satisfy the gate either. The instrument proves it can fail before it is believed: the self-test (always run first; `--self-test` runs it alone) rebuilds the round-3 defect on purpose and requires the gate to flag the sabotaged arm as evidence-free via an entered-based delta that parser state cannot satisfy, carries a deliberately blind baseline as a positive control that the BASELINE-NEVER-HIT rung (the round-4 countermeasure) can fire, requires executed redirect shapes (writable-cwd control), and treats a candidate regression on the canonical arm as a loud warning rather than misdiagnosing it as a broken environment. The assertion set is a pure exported function (`evaluateSelfTest`) with its own failure-path unit tests, so a deleted assertion cannot vanish silently. New tests: `tests/scripts/measure-bash-prefix-parse.test.ts` (hermetic audit-core + self-test-assertion + arg-parsing suites with injected referee/parsers, plus a real-bash CLI self-test e2e via the INFRA-allowlisted `node`; the grandchild route is recorded at the spawn guard's residual-exposure note). `bash-prefix-parse.ts` and `command-normalize.ts` carry a MEASUREMENT RULE header pointer scoped to what the tool actually measures — `cdTarget` only; inline-env extraction and `command-normalize.ts`'s target extraction have NO instrument yet and say so. The parser itself is untouched.
30
+
31
+ - **The drift guard that couples engine-side constants to the shipped manifest is now general, after the same defect shipped twice one day and one file apart** (task `074acf5d`). `432db3d3`'s guard checked one set in one file; `dbc6d303` then put `harness` — itself the gated head token of `deny-kill-switch-bypass` — into a NEW module's inert-consumer allowlist, reverting that policy's quoted-spelling hardening, and the existing guard structurally could not see it. `src/runtime/bash-match-facts.ts` derives the shipped manifest's `bash_match` facts live (which policies declare one, which literal head tokens each anchors on, which verbs) and answers "is this token gated by any shipped policy?" in one call; it throws at module-evaluation time when a policy is added, removed or renamed, so the curated map cannot drift silently. `src/runtime/bash-match-registry.ts` registers each engine-side set with a declared intent (`covers-gated-head-tokens` or `must-not-contain-gated-head-token`) and checks every registration against those facts. Both historical incidents are pinned as regressions and were re-verified by an independent reviewer against the REAL registrations, not fixtures. An unregistered exported set in the runtime layer reddens the guard, and the scan carries fixture-tree positive controls so it cannot rot into a no-op unnoticed. No runtime matching path changed. **What this does NOT catch, named verbatim in the module's LIMITS section rather than implied:** three independent adversarial review passes each found a way to register a set the registry accepts and should not, and the fix rounds were stopped after the third on a pre-declared criterion rather than adding a fourth check. Open and measured end to end: a covers registration declaring only `documented-uncovered` gated tokens (`env`, `unset`, `tee`, `cp` — four of the eight) passes every check with an entirely honest, live-coupled registration, which is precisely the `dbc6d303` shape; a registration's `has()` predicate is never cross-checked against the constant its `id`/`module` names, and the `must-not-contain` arm — where that shape lives — has no predicate check at all; `members` may declare coverage the predicate rejects, and `members: []` typechecks; a registration may name a module or id no exported constant matches. The redundancy check additionally forbids legitimate defence-in-depth double coverage, and five `new Set([...])` spellings (`as const`, a comment between `(` and `[`, backtick-quoted elements, union-literal annotations, a trailing comma) escape the scan by design rather than by oversight. Treat the registry as a tripwire for the accidental case, never as a boundary against a determined one; the registration surface is being redesigned to derive from the constant instead of accepting a self-description (follow-ups `209e6dc4`, `26c1d33e`).
32
+
33
+ ### Changed
34
+
35
+ - **All agent-facing references to the grounding MCP tool prefix renamed from `mcp__agent-grounding__*` to `mcp__grounding-mcp__*`, matching the canonical registration name `grounding-mcp` that 0.42.0's doctor convention checks** (task `ca9b0026`). Since 0.42.0 stopped emitting `mcpServers` into `settings.json`, the documented registration path is `claude mcp add-json --scope user grounding-mcp ...`, and a session registered that way exposes its tools as `mcp__grounding-mcp__*` — but every `verb:`/`producers[].example`/`ux.run` line in `FULL_TEMPLATE` and the profiles, plus the solution-acceptance deny/guidance strings, still named the legacy `mcp__agent-grounding__*` prefix from the pre-0.42 project-scope registration, so a canonically-registered session was told to call a tool name it does not have. All 92 references across `src/`, `tests/`, and `docs/` renamed in one sweep. This is presentational only, verified before the change: no PreToolUse matcher, hook, or engine path keys on the tool NAME (the ledger gates read ledger content, which both registrations write identically, since both names spawn the same `grounding-mcp` binary) — so a still-legacy-registered session keeps satisfying every gate after this change, and the only behavioural effect is that guidance now names the tool a doctor-green session actually has. **What this does NOT rename:** references to `agent-grounding` as the REPO/package name in comments and docs, the `VERDICT_DIR_TAIL` filesystem path (`agent-grounding/solution-verdicts` — an on-disk state path, renaming it would orphan existing verdicts), uninstall's recognition of the legacy registration name (`name === "agent-grounding"` in `src/cli/uninstall/index.ts` — needed precisely to clean up pre-0.42 installs), and historical CHANGELOG entries. Existing tests updated in place (same sweep); the FULL_TEMPLATE surface was already pinned (the parity and composer tests now assert the new spelling), and a new repo-wide guard test (`tests/no-legacy-mcp-prefix.test.ts`) asserts the literal legacy prefix does not reappear anywhere under `src/` — added after review measured that a partial revert of the non-template surfaces (profiles, hook guidance strings) would otherwise ship green. Operator action (corrected in review: `harness apply` does NOT do this — it never rewrites `harness.yaml`, and the deny-time guidance is rendered straight from the loaded manifest): the pack-hook messages update on package upgrade with no operator step, but an EXISTING manifest keeps the legacy `verb:`/`producers[].example`/`ux.run` spellings until the operator re-runs `harness init` or edits `harness.yaml` by hand; sessions still on the legacy project-scope registration should re-register per `harness doctor` and drop the legacy entry.
36
+
10
37
  ## [0.42.0] - 2026-07-27
11
38
 
12
39
  ### Security
@@ -3,7 +3,7 @@
3
3
  // The operator's deliberate blessing of a protected-branch edit (version
4
4
  // bumps, CI workflow patches, hotfixes) for one session. Audit finding
5
5
  // #39: the old override was a `branch-protection-ack:` ledger tag, but the
6
- // agent has direct `mcp__agent-grounding__ledger_add` access and could
6
+ // agent has direct `mcp__grounding-mcp__ledger_add` access and could
7
7
  // self-write that tag to bless its own edit. This verb instead writes the
8
8
  // canonical operator-only approval MARKER under
9
9
  // `harness.generated/.approvals/branch-protection-<sessionId>` (the same
@@ -1 +1 @@
1
- {"version":3,"file":"branch-protection.js","sourceRoot":"","sources":["../../../src/cli/approve/branch-protection.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,yEAAyE;AACzE,uEAAuE;AACvE,2EAA2E;AAC3E,uEAAuE;AACvE,0EAA0E;AAC1E,gDAAgD;AAChD,yEAAyE;AACzE,0EAA0E;AAC1E,mEAAmE;AACnE,yEAAyE;AACzE,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AAEzE,OAAO,EACL,cAAc,EACd,2BAA2B,GAC5B,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAsB,MAAM,cAAc,CAAC;AA8C9E,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAClD,MAAM,cAAc,GAAG,qCAAqC,CAAC;AAE7D,SAAS,gBAAgB,CAAC,QAAkB;IAC1C,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,IAAI,CAAC;AAC5E,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,sBAAsB,CAAC,MAAc;IACnD,OAAO,GAAG,cAAc,IAAI,MAAM,EAAE,CAAC;AACv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AC,MAAM,cAAc,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC;QACtD,CAAC,CAAC,EAAE,EAAE,EAAE,KAAc,EAAE,MAAM,EAAE,2CAA2C,EAAE,CAAC;IAEhF,OAAO;QACL,SAAS;QACT,aAAa;QACb,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,YAAY,CAAC,EAAE;YACrB,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;YACnB,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE;KACpD,CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { stringify as stringifyYaml } from "yaml";
2
2
  import { evaluateExtract, substituteTemplate, } from "../policies/index.js";
3
+ import { normalizeCommand } from "../runtime/command-normalize.js";
3
4
  import { resolveGitContext } from "../runtime/git-context.js";
4
5
  import { EX_USAGE, HarnessExitError } from "./exit-codes.js";
5
6
  import { loadManifest } from "./loader.js";
@@ -52,7 +53,18 @@ function policyMatchesTool(policy, tool, toolInput) {
52
53
  catch {
53
54
  return { matched: false, reason: `trigger.bash_match is not a valid regex` };
54
55
  }
55
- if (!re.test(args.command)) {
56
+ // Raw-OR-normalised, mirroring `policyMatchesEvent`'s real evaluation
57
+ // path exactly: dry-run used to test only the RAW command, so it
58
+ // predicted `env -C /tmp git status` as NOT matching
59
+ // `preflight-before-investigation` while `policy intercept` actually
60
+ // blocks it — a debug verb contradicting the runtime it exists to
61
+ // predict (its own comment above and docs/okf/debug-verb-selection.md
62
+ // both assert parity). The REPO/BRANCH half of this file
63
+ // (`builtinsFor`, cwd-only) stays in parity with the runtime, which
64
+ // is also cwd-only for `${REPO}`/`${BRANCH}` — see
65
+ // `src/cli/policy/intercept.ts`'s comment above `cwdGitContext` for
66
+ // why a per-command target directory is deliberately not consulted.
67
+ if (!re.test(args.command) && !re.test(normalizeCommand(args.command).normalized)) {
56
68
  return {
57
69
  matched: false,
58
70
  reason: `bash_match "${policy.trigger.bash_match}" did not match`,
@@ -1 +1 @@
1
- {"version":3,"file":"dry-run.js","sourceRoot":"","sources":["../../src/cli/dry-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EACL,eAAe,EACf,kBAAkB,GAGnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAC;AAmD/D,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC,CAAC;AAEpE,SAAS,WAAW,CAAC,IAAmB,EAAE,IAAmB;IAC3D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACrC,uEAAuE;IACvE,sEAAsE;IACtE,8CAA8C;IAC9C,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1C,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,UAAU,IAAI,SAAS;QAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI;QACtC,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM;QAC5C,SAAS,EAAE,QAAQ,CAAC,SAAS,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC7C,GAAG,EAAE,GAAG;KACT,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAc,EAAE,MAAc;IACzD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CA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+)* (status|log|diff|branch)\\b",
103
+ bash_match: "(^|\\n|;|\\||&|\\()\\s*(\\w+=\\S+\\s+)*git( -C \\S+)* (status|log|diff|branch)\\b",
104
104
  command: "harness policy intercept",
105
105
  blocking: "hard",
106
106
  budget_ms: 1000,
@@ -117,7 +117,7 @@ const HOOK_FOR_POLICY = {
117
117
  name: "require-preflight-push-evidence",
118
118
  event: "PreToolUse",
119
119
  match: "Bash",
120
- bash_match: "(^|\\n|;|\\||&&|\\()\\s*(\\w+=\\S+\\s+)*git( -C \\S+)* push\\b",
120
+ bash_match: "(^|\\n|;|\\||&|\\()\\s*(\\w+=\\S+\\s+)*git( -C \\S+)* push\\b",
121
121
  command: "harness policy intercept",
122
122
  blocking: "hard",
123
123
  budget_ms: 1000,
@@ -126,7 +126,7 @@ const HOOK_FOR_POLICY = {
126
126
  name: "require-dogfood-evidence",
127
127
  event: "PreToolUse",
128
128
  match: "Bash",
129
- bash_match: "(^|\\n|;|\\||&&|\\()\\s*(\\w+=\\S+\\s+)*(npm publish\\b|git( -C \\S+)* tag v)",
129
+ bash_match: "(^|\\n|;|\\||&|\\()\\s*(\\w+=\\S+\\s+)*(npm publish\\b|git( -C \\S+)* tag v)",
130
130
  command: "harness policy intercept",
131
131
  blocking: "hard",
132
132
  budget_ms: 2000,
@@ -169,7 +169,7 @@ const POLICY = {
169
169
  trigger: {
170
170
  event: "PreToolUse",
171
171
  match: "Bash",
172
- bash_match: "(^|\\n|;|\\||&&|\\()\\s*(\\w+=\\S+\\s+)*git( -C \\S+)* (status|log|diff|branch)\\b",
172
+ bash_match: "(^|\\n|;|\\||&|\\()\\s*(\\w+=\\S+\\s+)*git( -C \\S+)* (status|log|diff|branch)\\b",
173
173
  },
174
174
  requires: { ledger_tag: "preflight:${REPO}", within: "1h" },
175
175
  hook: "require-preflight-evidence",
@@ -206,7 +206,7 @@ const POLICY = {
206
206
  trigger: {
207
207
  event: "PreToolUse",
208
208
  match: "Bash",
209
- bash_match: "(^|\\n|;|\\||&&|\\()\\s*(\\w+=\\S+\\s+)*git( -C \\S+)* push\\b",
209
+ bash_match: "(^|\\n|;|\\||&|\\()\\s*(\\w+=\\S+\\s+)*git( -C \\S+)* push\\b",
210
210
  },
211
211
  requires: {
212
212
  ledger_tag: "preflight:${BRANCH}",
@@ -234,7 +234,7 @@ const POLICY = {
234
234
  trigger: {
235
235
  event: "PreToolUse",
236
236
  match: "Bash",
237
- bash_match: "(^|\\n|;|\\||&&|\\()\\s*(\\w+=\\S+\\s+)*(npm publish\\b|git( -C \\S+)* tag v)",
237
+ bash_match: "(^|\\n|;|\\||&|\\()\\s*(\\w+=\\S+\\s+)*(npm publish\\b|git( -C \\S+)* tag v)",
238
238
  },
239
239
  requires: { ledger_tag: "dogfood:${SESSION_ID}", within: "24h" },
240
240
  hook: "require-dogfood-evidence",
@@ -1 +1 @@
1
- {"version":3,"file":"composer.js","sourceRoot":"","sources":["../../../src/cli/init/composer.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,qEAAqE;AACrE,kEAAkE;AAClE,WAAW;AACX,EAAE;AACF,+DAA+D;AAC/D,4DAA4D;AAC5D,gEAAgE;AAChE,iEAAiE;AACjE,wDAAwD;AACxD,2DAA2D;AAC3D,qEAAqE;AACrE,uEAAuE;AACvE,gCAAgC;AAChC,EAAE;AACF,kEAAkE;AAClE,6DAA6D;AAC7D,wEAAwE;AACxE,yDAAyD;AACzD,kBAAkB;AAElB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EACL,gBAAgB,IAAI,6BAA6B,EACjD,SAAS,IAAI,sBAAsB,GAEpC,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,SAAS,IAAI,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAsBzG,MAAM,CAAC,MAAM,gBAAgB,GAAmD;IAC9E;QACE,GAAG,EAAE,gCAAgC;QACrC,KAAK,EAAE,gCAAgC;QACvC,WAAW,EACT,wGAAwG;KAC3G;IACD;QACE,GA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AAC;IACrE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export declare const SOLO_TEMPLATE = "# ~/.harness/harness.yaml (legacy: ~/.claude/harness.yaml)\n#\n# Bootstrapped by `harness init --template solo`.\n#\n# Single-operator profile: memory-router for cross-conversation memory\n# routing + understanding-before-execution policy pack to force an\n# explicit interpretation confirmation before any write-capable tool\n# fires. No agent-tasks loop (use --template team if you want PR\n# review-gating).\n#\n# Adapt the paths under `command:` to your install layout, or move\n# host-specific paths to ~/.harness/machines/<host>.harness.overrides.yaml.\n\nversion: 1\n\ngrounding:\n session:\n auto_start: true\n id_format: \"gs-{repo}-{rand:8}\"\n evidence_ledger:\n path: ~/.evidence-ledger/ledger.db\n retention_days: 90\n\ntools:\n builtin:\n known: [Read, Edit, Write, Bash, Agent, Skill, TaskCreate, Glob, Grep]\n\nmemory:\n directories:\n - path: ~/.claude/projects/{project}/memory\n scope: project\n router:\n # `memory-router-user-prompt-submit` is the published bin from\n # `@lannguyensi/memory-router`. `harness init` offers to\n # `npm i -g` it for you; doctor expects it on PATH.\n command: [memory-router-user-prompt-submit]\n enabled: true\n retention:\n staleness_days: 180\n broken_refs: warn\n scopes:\n default: project\n allowed: [project, user]\n\npolicy_packs:\n - name: understanding-before-execution\n source: builtin\n enabled: true\n description: Force agents to expose their task interpretation and wait for explicit human approval before any write-capable tool fires.\n config:\n mode: grill_me\n # ux (agent-tasks/60bc93e5): replaces the legacy engine-vocabulary\n # deny envelope with the plain-language { cannot, required, run }\n # shape. Engine details still land in stderr for operator audit;\n # the agent only sees this.\n #\n # KEEP IN SYNC (task 68b9ad9c): this text must match\n # defaultUx(\"grill_me\") in\n # src/policy-packs/builtin/understanding-before-execution.ts \u2014 that\n # function is what `harness pack reseed` / `harness doctor`'s\n # divergence warning treat as \"the shipped template\". Pinned by\n # tests/cli/init-templates-ux-parity.test.ts.\n ux:\n cannot: \"You cannot use write-capable tools yet.\"\n required:\n - \"an approved Understanding Report for this session\"\n run:\n - \"Write an Understanding Report covering: Current Understanding, Intended Outcome, Derived Todos, Acceptance Criteria, Assumptions, Open Questions, Out Of Scope, Risks, Verification Plan, Prior Art (state what you searched for an existing solution and what you found, with an explicit adopt-or-build judgment)\"\n - \"Run `harness approve understanding` with the report attached as a quoted heredoc (harness approve understanding <<'UNDERSTANDING_REPORT' ...report... UNDERSTANDING_REPORT) so it is persisted for audit, then approve the prompt; the heredoc is the only extra shell shape the gate allows (no pipes, chaining, or other redirection)\"\n # approval_lifecycle (agent-tasks/d8ee60ca + harness/f54e0ecb,\n # v0.18.0+): expire the approval marker on task-completion\n # boundaries. Solo wires no agent-tasks MCP, so\n # `expire_on_tool_match` would be dead weight; we list Bash\n # boundaries instead (PR merges via gh-cli, pushes to the\n # protected branch). Operators on other CLIs override this list\n # with their own regexes. `max_age` is the safety net for\n # sessions that never hit a listed command. Opt out entirely\n # with `approval_lifecycle: { mode: session }`.\n approval_lifecycle:\n expire_on_bash_match:\n - '^gh pr (merge|close)\\b'\n - '^git push origin (master|main)\\b'\n max_age: 1h\n";
2
- export declare const TEAM_TEMPLATE = "# ~/.harness/harness.yaml (legacy: ~/.claude/harness.yaml)\n#\n# Bootstrapped by `harness init --template team`.\n#\n# Solo profile + agent-tasks MCP + the review-before-merge policy. Block\n# pull_requests_merge MCP calls unless a ledger entry tagged\n# review:<pr-number> exists for the current grounding session, the\n# standard team workflow where every PR gets a review-subagent pass\n# before it can land.\n#\n# Adapt the paths under `command:` to your install layout, or move\n# host-specific paths to ~/.harness/machines/<host>.harness.overrides.yaml.\n\nversion: 1\n\ngrounding:\n session:\n auto_start: true\n id_format: \"gs-{repo}-{rand:8}\"\n evidence_ledger:\n path: ~/.evidence-ledger/ledger.db\n retention_days: 90\n\ntools:\n mcp:\n - name: agent-tasks\n # Zero-setup entry: `@agent-tasks/mcp-bridge` exposes the\n # `agent-tasks-mcp-bridge` binary on PATH after\n # `npm i -g @agent-tasks/mcp-bridge`. The bridge owns token\n # storage (OS keychain or file fallback) and defaults the base\n # URL to https://agent-tasks.opentriologue.ai, so no env is\n # required here. Override with `AGENT_TASKS_BASE_URL` /\n # `AGENT_TASKS_TOKEN` if you self-host or want explicit creds.\n command: [agent-tasks-mcp-bridge]\n health:\n verb: projects_list\n timeout_ms: 5000\n enabled: true\n - name: grounding-mcp\n # `grounding-mcp` bin is published in `@lannguyensi/grounding-mcp`.\n # `harness init` offers to `npm i -g` it for you. No env is set:\n # the bundled default resolves to `~/.evidence-ledger/ledger.db`\n # via os.homedir() at startup. Passing a literal tilde in env\n # bypasses shell expansion and creates rogue cwd-relative DB files\n # (see agent-tasks/42d224a6 incident).\n command: [grounding-mcp]\n health:\n verb: ledger_status\n timeout_ms: 5000\n enabled: true\n builtin:\n known: [Read, Edit, Write, Bash, Agent, Skill, TaskCreate, Glob, Grep]\n\nmemory:\n directories:\n - path: ~/.claude/projects/{project}/memory\n scope: project\n router:\n # `memory-router-user-prompt-submit` is the published bin from\n # `@lannguyensi/memory-router`. `harness init` offers to\n # `npm i -g` it for you; doctor expects it on PATH.\n command: [memory-router-user-prompt-submit]\n enabled: true\n retention:\n staleness_days: 180\n broken_refs: warn\n scopes:\n default: project\n allowed: [project, user]\n\nhooks:\n - name: require-review-evidence\n event: PreToolUse\n match: \"mcp__agent-tasks__pull_requests_merge\"\n # The built-in `harness policy intercept` CLI verb is the generic\n # deny-on-missing-evidence hook entrypoint. It reads the tool event\n # JSON on stdin, evaluates all policies whose triggers match, emits\n # Claude Code's deny envelope on block. Using it here removes the\n # need to ship a per-policy shell script under ~/.claude/hooks/ for\n # the team setup; operators with custom logic can swap in their own\n # script path.\n command: harness policy intercept\n blocking: hard\n budget_ms: 2000\n\npolicies:\n - name: review-before-merge\n description: Block PR merges unless a ledger entry tagged review:<pr-number> exists for this session.\n trigger:\n event: PreToolUse\n match: \"mcp__agent-tasks__pull_requests_merge\"\n extract:\n PR_NUMBER: \"toolArgs.prNumber\"\n requires:\n ledger_tag: \"review:${PR_NUMBER}\"\n hook: require-review-evidence\n enforcement: block\n # producers: documents the intended evidence flow (see\n # docs/writing-custom-policies.md, \"The trust model\"): this is a\n # deliberate process gate \u2014 the agent records the review subagent's\n # verdict itself, so against the agent the gate is advisory by design.\n producers:\n - kind: mcp\n verb: mcp__agent-grounding__ledger_add\n example: '{sessionId:\"${SESSION_ID}\", type:\"fact\", content:\"review:${PR_NUMBER} \u2014 <verdict + key findings + nits>\", source:\"Agent(general-purpose) review\"}'\n description: Spawn a review subagent against the PR diff, capture its verdict, then persist a ledger entry tagged with the PR number.\n ux:\n cannot: \"You cannot merge PR #${PR_NUMBER} yet.\"\n required:\n - \"a recorded review of PR #${PR_NUMBER}\"\n run:\n - 'harness record review --pr ${PR_NUMBER} \"<summary>\"'\n\npolicy_packs:\n - name: understanding-before-execution\n source: builtin\n enabled: true\n description: Force agents to expose their task interpretation and wait for explicit human approval before any write-capable tool fires.\n config:\n mode: grill_me\n # ux (agent-tasks/60bc93e5): same shape as Solo's pack ux.\n # KEEP IN SYNC (task 68b9ad9c): see the identical note on Solo's\n # copy above \u2014 must match defaultUx(\"grill_me\").\n ux:\n cannot: \"You cannot use write-capable tools yet.\"\n required:\n - \"an approved Understanding Report for this session\"\n run:\n - \"Write an Understanding Report covering: Current Understanding, Intended Outcome, Derived Todos, Acceptance Criteria, Assumptions, Open Questions, Out Of Scope, Risks, Verification Plan, Prior Art (state what you searched for an existing solution and what you found, with an explicit adopt-or-build judgment)\"\n - \"Run `harness approve understanding` with the report attached as a quoted heredoc (harness approve understanding <<'UNDERSTANDING_REPORT' ...report... UNDERSTANDING_REPORT) so it is persisted for audit, then approve the prompt; the heredoc is the only extra shell shape the gate allows (no pipes, chaining, or other redirection)\"\n # approval_lifecycle (agent-tasks/d8ee60ca + harness/f54e0ecb,\n # v0.18.0+): expire the approval marker on task-completion\n # boundaries. Team wires agent-tasks, so the MCP task verbs are\n # the primary boundary; the Bash list catches operators who use\n # gh-cli in parallel (hybrid workflow). `max_age` is the safety\n # net. Opt out entirely with\n # `approval_lifecycle: { mode: session }`.\n approval_lifecycle:\n expire_on_tool_match:\n - mcp__agent-tasks__task_finish\n - mcp__agent-tasks__task_abandon\n - mcp__agent-tasks__pull_requests_merge\n - mcp__agent-tasks__tasks_transition\n expire_on_bash_match:\n - '^gh pr (merge|close)\\b'\n - '^git push origin (master|main)\\b'\n max_age: 4h\n";
2
+ export declare const TEAM_TEMPLATE = "# ~/.harness/harness.yaml (legacy: ~/.claude/harness.yaml)\n#\n# Bootstrapped by `harness init --template team`.\n#\n# Solo profile + agent-tasks MCP + the review-before-merge policy. Block\n# pull_requests_merge MCP calls unless a ledger entry tagged\n# review:<pr-number> exists for the current grounding session, the\n# standard team workflow where every PR gets a review-subagent pass\n# before it can land.\n#\n# Adapt the paths under `command:` to your install layout, or move\n# host-specific paths to ~/.harness/machines/<host>.harness.overrides.yaml.\n\nversion: 1\n\ngrounding:\n session:\n auto_start: true\n id_format: \"gs-{repo}-{rand:8}\"\n evidence_ledger:\n path: ~/.evidence-ledger/ledger.db\n retention_days: 90\n\ntools:\n mcp:\n - name: agent-tasks\n # Zero-setup entry: `@agent-tasks/mcp-bridge` exposes the\n # `agent-tasks-mcp-bridge` binary on PATH after\n # `npm i -g @agent-tasks/mcp-bridge`. The bridge owns token\n # storage (OS keychain or file fallback) and defaults the base\n # URL to https://agent-tasks.opentriologue.ai, so no env is\n # required here. Override with `AGENT_TASKS_BASE_URL` /\n # `AGENT_TASKS_TOKEN` if you self-host or want explicit creds.\n command: [agent-tasks-mcp-bridge]\n health:\n verb: projects_list\n timeout_ms: 5000\n enabled: true\n - name: grounding-mcp\n # `grounding-mcp` bin is published in `@lannguyensi/grounding-mcp`.\n # `harness init` offers to `npm i -g` it for you. No env is set:\n # the bundled default resolves to `~/.evidence-ledger/ledger.db`\n # via os.homedir() at startup. Passing a literal tilde in env\n # bypasses shell expansion and creates rogue cwd-relative DB files\n # (see agent-tasks/42d224a6 incident).\n command: [grounding-mcp]\n health:\n verb: ledger_status\n timeout_ms: 5000\n enabled: true\n builtin:\n known: [Read, Edit, Write, Bash, Agent, Skill, TaskCreate, Glob, Grep]\n\nmemory:\n directories:\n - path: ~/.claude/projects/{project}/memory\n scope: project\n router:\n # `memory-router-user-prompt-submit` is the published bin from\n # `@lannguyensi/memory-router`. `harness init` offers to\n # `npm i -g` it for you; doctor expects it on PATH.\n command: [memory-router-user-prompt-submit]\n enabled: true\n retention:\n staleness_days: 180\n broken_refs: warn\n scopes:\n default: project\n allowed: [project, user]\n\nhooks:\n - name: require-review-evidence\n event: PreToolUse\n match: \"mcp__agent-tasks__pull_requests_merge\"\n # The built-in `harness policy intercept` CLI verb is the generic\n # deny-on-missing-evidence hook entrypoint. It reads the tool event\n # JSON on stdin, evaluates all policies whose triggers match, emits\n # Claude Code's deny envelope on block. Using it here removes the\n # need to ship a per-policy shell script under ~/.claude/hooks/ for\n # the team setup; operators with custom logic can swap in their own\n # script path.\n command: harness policy intercept\n blocking: hard\n budget_ms: 2000\n\npolicies:\n - name: review-before-merge\n description: Block PR merges unless a ledger entry tagged review:<pr-number> exists for this session.\n trigger:\n event: PreToolUse\n match: \"mcp__agent-tasks__pull_requests_merge\"\n extract:\n PR_NUMBER: \"toolArgs.prNumber\"\n requires:\n ledger_tag: \"review:${PR_NUMBER}\"\n hook: require-review-evidence\n enforcement: block\n # producers: documents the intended evidence flow (see\n # docs/writing-custom-policies.md, \"The trust model\"): this is a\n # deliberate process gate \u2014 the agent records the review subagent's\n # verdict itself, so against the agent the gate is advisory by design.\n producers:\n - kind: mcp\n verb: mcp__grounding-mcp__ledger_add\n example: '{sessionId:\"${SESSION_ID}\", type:\"fact\", content:\"review:${PR_NUMBER} \u2014 <verdict + key findings + nits>\", source:\"Agent(general-purpose) review\"}'\n description: Spawn a review subagent against the PR diff, capture its verdict, then persist a ledger entry tagged with the PR number.\n ux:\n cannot: \"You cannot merge PR #${PR_NUMBER} yet.\"\n required:\n - \"a recorded review of PR #${PR_NUMBER}\"\n run:\n - 'harness record review --pr ${PR_NUMBER} \"<summary>\"'\n\npolicy_packs:\n - name: understanding-before-execution\n source: builtin\n enabled: true\n description: Force agents to expose their task interpretation and wait for explicit human approval before any write-capable tool fires.\n config:\n mode: grill_me\n # ux (agent-tasks/60bc93e5): same shape as Solo's pack ux.\n # KEEP IN SYNC (task 68b9ad9c): see the identical note on Solo's\n # copy above \u2014 must match defaultUx(\"grill_me\").\n ux:\n cannot: \"You cannot use write-capable tools yet.\"\n required:\n - \"an approved Understanding Report for this session\"\n run:\n - \"Write an Understanding Report covering: Current Understanding, Intended Outcome, Derived Todos, Acceptance Criteria, Assumptions, Open Questions, Out Of Scope, Risks, Verification Plan, Prior Art (state what you searched for an existing solution and what you found, with an explicit adopt-or-build judgment)\"\n - \"Run `harness approve understanding` with the report attached as a quoted heredoc (harness approve understanding <<'UNDERSTANDING_REPORT' ...report... UNDERSTANDING_REPORT) so it is persisted for audit, then approve the prompt; the heredoc is the only extra shell shape the gate allows (no pipes, chaining, or other redirection)\"\n # approval_lifecycle (agent-tasks/d8ee60ca + harness/f54e0ecb,\n # v0.18.0+): expire the approval marker on task-completion\n # boundaries. Team wires agent-tasks, so the MCP task verbs are\n # the primary boundary; the Bash list catches operators who use\n # gh-cli in parallel (hybrid workflow). `max_age` is the safety\n # net. Opt out entirely with\n # `approval_lifecycle: { mode: session }`.\n approval_lifecycle:\n expire_on_tool_match:\n - mcp__agent-tasks__task_finish\n - mcp__agent-tasks__task_abandon\n - mcp__agent-tasks__pull_requests_merge\n - mcp__agent-tasks__tasks_transition\n expire_on_bash_match:\n - '^gh pr (merge|close)\\b'\n - '^git push origin (master|main)\\b'\n max_age: 4h\n";
@@ -204,7 +204,7 @@ policies:
204
204
  # verdict itself, so against the agent the gate is advisory by design.
205
205
  producers:
206
206
  - kind: mcp
207
- verb: mcp__agent-grounding__ledger_add
207
+ verb: mcp__grounding-mcp__ledger_add
208
208
  example: '{sessionId:"\${SESSION_ID}", type:"fact", content:"review:\${PR_NUMBER} — <verdict + key findings + nits>", source:"Agent(general-purpose) review"}'
209
209
  description: Spawn a review subagent against the PR diff, capture its verdict, then persist a ledger entry tagged with the PR number.
210
210
  ux: