@holmes-lab/holmes-kit 0.29.0 → 0.31.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 (169) hide show
  1. package/CHANGELOG.md +556 -0
  2. package/README.md +15 -5
  3. package/bin/holmes-hook-antigravity.js +4 -0
  4. package/bin/holmes-kit.js +4 -0
  5. package/bin/holmes-pre-push.js +3 -0
  6. package/bin/holmes-stop-antigravity.js +4 -0
  7. package/dist/.build-id +1 -1
  8. package/dist/holmes/cli/agents-guidance-history.d.ts +1 -1
  9. package/dist/holmes/cli/agents-guidance-history.js +11 -2
  10. package/dist/holmes/cli/agents-guidance.d.ts +1 -0
  11. package/dist/holmes/cli/agents-guidance.js +11 -8
  12. package/dist/holmes/cli/agents.d.ts +41 -0
  13. package/dist/holmes/cli/agents.js +382 -2
  14. package/dist/holmes/cli/attest.d.ts +2 -0
  15. package/dist/holmes/cli/attest.js +66 -15
  16. package/dist/holmes/cli/ci-gate.js +16 -1
  17. package/dist/holmes/cli/claude-switches.d.ts +95 -0
  18. package/dist/holmes/cli/claude-switches.js +967 -0
  19. package/dist/holmes/cli/codex-hooks.d.ts +77 -0
  20. package/dist/holmes/cli/codex-hooks.js +802 -0
  21. package/dist/holmes/cli/codex-oracle.d.ts +194 -0
  22. package/dist/holmes/cli/codex-oracle.js +1245 -0
  23. package/dist/holmes/cli/codex-toml.d.ts +58 -1
  24. package/dist/holmes/cli/codex-toml.js +456 -40
  25. package/dist/holmes/cli/doctor.d.ts +108 -8
  26. package/dist/holmes/cli/doctor.js +1408 -98
  27. package/dist/holmes/cli/index.js +23 -11
  28. package/dist/holmes/cli/init.d.ts +13 -0
  29. package/dist/holmes/cli/init.js +749 -77
  30. package/dist/holmes/cli/interactive-prompt.js +2 -2
  31. package/dist/holmes/cli/mcp-launcher.d.ts +64 -6
  32. package/dist/holmes/cli/mcp-launcher.js +189 -6
  33. package/dist/holmes/cli/mcp-version.js +13 -2
  34. package/dist/holmes/cli/settings-merge.js +8 -2
  35. package/dist/holmes/cli/upgrade.d.ts +13 -0
  36. package/dist/holmes/cli/upgrade.js +116 -23
  37. package/dist/holmes/cli/workspace-scope.d.ts +22 -0
  38. package/dist/holmes/cli/workspace-scope.js +375 -0
  39. package/dist/holmes/cli/worktree-readiness.d.ts +1 -0
  40. package/dist/holmes/cli/worktree-readiness.js +17 -3
  41. package/dist/holmes/cpg/cpg-scanner.d.ts +29 -0
  42. package/dist/holmes/cpg/cpg-scanner.js +403 -3
  43. package/dist/holmes/cpg/cycle-detect.js +2 -1
  44. package/dist/holmes/cpg/forbidden-edges.js +9 -2
  45. package/dist/holmes/cpg/required-calls.js +8 -1
  46. package/dist/holmes/governance/autonomy.d.ts +9 -0
  47. package/dist/holmes/governance/autonomy.js +28 -1
  48. package/dist/holmes/governance/constitution-debt.js +3 -2
  49. package/dist/holmes/governance/constitution.js +15 -3
  50. package/dist/holmes/governance/provenance-chain.js +3 -2
  51. package/dist/holmes/governance/push-gate-runner.js +4 -3
  52. package/dist/holmes/guardrail/dependency-delta.js +4 -3
  53. package/dist/holmes/guardrail/linear-match.d.ts +57 -0
  54. package/dist/holmes/guardrail/linear-match.js +256 -0
  55. package/dist/holmes/guardrail/risk-classifier.d.ts +6 -7
  56. package/dist/holmes/guardrail/risk-classifier.js +931 -44
  57. package/dist/holmes/guardrail/risk-types.d.ts +6 -0
  58. package/dist/holmes/guardrail/scope-judgment.d.ts +4 -24
  59. package/dist/holmes/guardrail/scope-judgment.js +100 -23
  60. package/dist/holmes/guardrail/shell-words.d.ts +42 -0
  61. package/dist/holmes/guardrail/shell-words.js +1720 -0
  62. package/dist/holmes/guardrail/write-target.d.ts +168 -3
  63. package/dist/holmes/guardrail/write-target.js +2379 -87
  64. package/dist/holmes/hooks/adapters/antigravity.d.ts +3 -1
  65. package/dist/holmes/hooks/adapters/antigravity.js +115 -11
  66. package/dist/holmes/hooks/pre-tool-use.d.ts +32 -6
  67. package/dist/holmes/hooks/pre-tool-use.js +923 -87
  68. package/dist/holmes/hooks/rtm-refresh-child.d.ts +22 -1
  69. package/dist/holmes/hooks/rtm-refresh-child.js +102 -18
  70. package/dist/holmes/hooks/rtm-refresh.d.ts +20 -1
  71. package/dist/holmes/hooks/rtm-refresh.js +60 -15
  72. package/dist/holmes/hooks/session-start.d.ts +10 -0
  73. package/dist/holmes/hooks/session-start.js +31 -7
  74. package/dist/holmes/hooks/stop.d.ts +2 -1
  75. package/dist/holmes/hooks/stop.js +197 -91
  76. package/dist/holmes/mcp/approval-adapters.d.ts +22 -0
  77. package/dist/holmes/mcp/approval-adapters.js +21 -0
  78. package/dist/holmes/mcp/approval-commit.d.ts +20 -0
  79. package/dist/holmes/mcp/approval-commit.js +108 -0
  80. package/dist/holmes/mcp/approval-intent.d.ts +44 -0
  81. package/dist/holmes/mcp/approval-intent.js +67 -0
  82. package/dist/holmes/mcp/approval-policy.d.ts +14 -0
  83. package/dist/holmes/mcp/approval-policy.js +18 -0
  84. package/dist/holmes/mcp/elicit-approval.d.ts +2 -0
  85. package/dist/holmes/mcp/elicit-approval.js +8 -3
  86. package/dist/holmes/mcp/handlers/graph-operations.d.ts +17 -1
  87. package/dist/holmes/mcp/handlers/graph-operations.js +15 -6
  88. package/dist/holmes/mcp/handlers/maintenance-analysis.js +11 -5
  89. package/dist/holmes/mcp/handlers/maintenance-evidence.js +3 -2
  90. package/dist/holmes/mcp/handlers/phase-queries.d.ts +22 -7
  91. package/dist/holmes/mcp/handlers/phase-queries.js +81 -2
  92. package/dist/holmes/mcp/handlers/requirement-triage.d.ts +26 -0
  93. package/dist/holmes/mcp/handlers/requirement-triage.js +48 -11
  94. package/dist/holmes/mcp/handlers/review-evidence.d.ts +2 -1
  95. package/dist/holmes/mcp/handlers/review-evidence.js +15 -5
  96. package/dist/holmes/mcp/handlers/slice-orchestration.d.ts +18 -0
  97. package/dist/holmes/mcp/handlers/slice-orchestration.js +122 -16
  98. package/dist/holmes/mcp/handlers/spec-approval.d.ts +35 -2
  99. package/dist/holmes/mcp/handlers/spec-approval.js +175 -57
  100. package/dist/holmes/mcp/handlers/spec-authoring.js +36 -3
  101. package/dist/holmes/mcp/handlers/spec-queries.d.ts +39 -3
  102. package/dist/holmes/mcp/handlers/spec-queries.js +114 -7
  103. package/dist/holmes/mcp/handlers/test-execution.js +9 -3
  104. package/dist/holmes/mcp/handlers.d.ts +126 -8
  105. package/dist/holmes/mcp/handlers.js +109 -18
  106. package/dist/holmes/mcp/harness-attestation.d.ts +20 -0
  107. package/dist/holmes/mcp/harness-attestation.js +179 -0
  108. package/dist/holmes/mcp/maintenance-analyze.js +28 -4
  109. package/dist/holmes/mcp/maintenance-evidence.js +1 -1
  110. package/dist/holmes/mcp/requirement-triage-evidence.d.ts +72 -2
  111. package/dist/holmes/mcp/requirement-triage-evidence.js +227 -1
  112. package/dist/holmes/mcp/server.js +24 -3
  113. package/dist/holmes/mcp/supervisor.js +7 -3
  114. package/dist/holmes/mcp/tool-schemas.d.ts +8 -0
  115. package/dist/holmes/mcp/tool-schemas.js +54 -7
  116. package/dist/holmes/mcp/validate-args.js +12 -0
  117. package/dist/holmes/project/bounded-io.d.ts +102 -0
  118. package/dist/holmes/project/bounded-io.js +212 -0
  119. package/dist/holmes/project/change-source.js +3 -1
  120. package/dist/holmes/project/ci-runs.js +3 -2
  121. package/dist/holmes/project/ignore.d.ts +31 -2
  122. package/dist/holmes/project/ignore.js +409 -50
  123. package/dist/holmes/project/regular-file-guard.d.ts +13 -0
  124. package/dist/holmes/project/regular-file-guard.js +149 -0
  125. package/dist/holmes/project/root.js +12 -3
  126. package/dist/holmes/refresh/freshness-coordinator.d.ts +67 -0
  127. package/dist/holmes/refresh/freshness-coordinator.js +230 -0
  128. package/dist/holmes/reverse/anchor.js +4 -3
  129. package/dist/holmes/reverse/scan.js +6 -2
  130. package/dist/holmes/review/commit-text.js +3 -2
  131. package/dist/holmes/review/condition-hunk-replay.d.ts +12 -0
  132. package/dist/holmes/review/condition-hunk-replay.js +13 -2
  133. package/dist/holmes/review/condition-hunk-resolution.js +59 -8
  134. package/dist/holmes/review/failed-test-names.js +13 -10
  135. package/dist/holmes/review/findings.js +3 -1
  136. package/dist/holmes/review/kills-check.js +6 -1
  137. package/dist/holmes/review/point-in-time-replay.js +5 -4
  138. package/dist/holmes/review/replay-corpus.js +5 -4
  139. package/dist/holmes/review/requirement-triage-human-records.d.ts +59 -0
  140. package/dist/holmes/review/requirement-triage-human-records.js +119 -0
  141. package/dist/holmes/review/run-replay.js +3 -2
  142. package/dist/holmes/review/scope.js +6 -1
  143. package/dist/holmes/review/temporal-prior.js +3 -2
  144. package/dist/holmes/review/test-evidence.js +3 -2
  145. package/dist/holmes/review/test-outcomes.d.ts +28 -0
  146. package/dist/holmes/review/test-outcomes.js +92 -2
  147. package/dist/holmes/review/test-runner.d.ts +6 -0
  148. package/dist/holmes/review/test-runner.js +36 -15
  149. package/dist/holmes/rtm/advisory-outcomes.js +3 -2
  150. package/dist/holmes/rtm/anchor-ids.js +42 -2
  151. package/dist/holmes/rtm/file-anchors.js +4 -1
  152. package/dist/holmes/rtm/ftt-fulfilment.js +8 -3
  153. package/dist/holmes/rtm/git-changes.js +3 -1
  154. package/dist/holmes/rtm/graph-store.js +3 -2
  155. package/dist/holmes/rtm/test-scope.js +9 -4
  156. package/dist/holmes/spec/compat-impact.d.ts +25 -4
  157. package/dist/holmes/spec/compat-impact.js +682 -11
  158. package/dist/holmes/spec/entity-git-snapshot.js +3 -2
  159. package/dist/holmes/spec/entity-integration.js +3 -2
  160. package/dist/holmes/spec/entity-renumber-transaction.d.ts +19 -0
  161. package/dist/holmes/spec/entity-renumber-transaction.js +79 -6
  162. package/dist/holmes/spec/remote-spec-refs.js +3 -2
  163. package/dist/holmes/spec/renumber.js +25 -10
  164. package/dist/holmes/spec/spec-parser.js +9 -3
  165. package/dist/holmes/spec/yaml-scalar.js +2 -2
  166. package/dist/holmes/update/refresh.js +3 -1
  167. package/dist/holmes/update/update-notice.d.ts +6 -0
  168. package/dist/holmes/update/update-notice.js +18 -1
  169. package/package.json +11 -4
package/CHANGELOG.md CHANGED
@@ -5,6 +5,562 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
  <!-- @implements A-SPEC-209 -->
8
+ ## [0.31.0] - 2026-09-29
9
+
10
+ Post-0.30 hardening (H1–H12) and a new rule for Codex: whether Codex loads its own files is now
11
+ Codex's answer. Every item went through its own REQ and repeated adversarial review waves. The
12
+ shell gate and its walkers were reviewed in 51 waves and ended with two consecutive waves on the
13
+ same code that found nothing CRITICAL or HIGH (waves 50 and 51); the install wiring and diagnosis
14
+ (`init`, `doctor`, `upgrade`) in 65 waves, ending likewise (waves 64 and 65). "HIGH" there follows
15
+ owner decisions recorded in the goal log: a gate miss is at most MEDIUM; doctor or init starting a
16
+ program the workspace controls is HIGH in an ordinary environment and MEDIUM where a variable, PATH
17
+ or install path must be arranged; a contrived oversized input's time-out is at most MEDIUM. The
18
+ MEDIUM and LOW findings of those last waves are listed under Known limitations
19
+ (`docs/goals/GOAL-post-0.30-hardening-2026-09-23.md`).
20
+
21
+ ### Added
22
+
23
+ - **Codex load verdicts come from the installed Codex** (REQ-738, A-SPEC-738). Where `codex` is on PATH,
24
+ `holmes-kit init` and `doctor` copy only `config.toml` and `hooks.json` into a temporary
25
+ `CODEX_HOME` and ask a short-lived local `codex app-server` (`config/read`, `hooks/list`) whether
26
+ they load. Measured isolation: plugin sync off (`--disable plugins --disable remote_plugin`),
27
+ telemetry exporters and analytics off, `sqlite_home` pinned to the copy, an environment allowlist,
28
+ every proxy pointed at a closed local port, and the whole process group killed — no connection and
29
+ no file outside the copy. Without codex, the previous reading is used and every Codex line says it
30
+ is `approximate`. Hook trust stays unverifiable (Codex keys it by the real path).
31
+ - **`phase_status` answers a bounded summary** (REQ-735, A-SPEC-735): counts by type and status, filters
32
+ (`ids`/`type`/`status`) and cursor pages; this repository's default response went from 153,888 to
33
+ ~8,900 characters.
34
+ - **`spec_next` names the slice's next actions** (REQ-736, A-SPEC-736): seal (only where `spec_approve` would),
35
+ fill-then-seal, fix-then-seal, after-parent, create-parent, author-tspec.
36
+
37
+ ### Changed
38
+
39
+ - **The gate only ever denies — an action it does not deny goes through your harness's own permission flow**
40
+ (REQ-739, A-SPEC-739; owner decision). The PreToolUse hook used to answer `permissionDecision: "allow"` for every
41
+ action it did not deny, and Claude Code handles a hook allow as "Hook approved tool use …, bypassing permission
42
+ prompt" (read from the installed 2.1.281 binary): every command the shell model missed —
43
+ `{rm,-rf,/usr/local}`, `/bin/[r]m -rf .git`, `x=rm; $x -rf /usr/local`, `find .ax … -exec rm {} +` — ran without
44
+ asking, so installing Holmes made Claude ask less. Now a deny is still a deny with its reason, and anything else
45
+ carries no permission decision for Claude Code and Codex (Codex already ignored `allow`; a warning travels as
46
+ `additionalContext`); Antigravity, whose hook contract requires a decision, gets `ask` (your Always-Allow still
47
+ applies), or `allow` only for a read inside the workspace that git does not ignore — resolved as the kernel resolves
48
+ it (a workspace link followed by `..` reads outside) and by the tool's own path argument; its `run_command` is judged
49
+ in the `Cwd` it runs in (a removal inside `.ax` through `Cwd` was not). **Cost:** in Claude Code's default mode you see its own confirmations
50
+ again for Bash, edits and Holmes's MCP tools, as you would without Holmes — use your harness's allow rules or
51
+ modes for the ones you trust.
52
+
53
+ - **An install is wired with `node`, not `npx`** (REQ-251, A-SPEC-251.1/.2). `init` from a global or
54
+ project-local install writes `node <install>/bin/holmes-mcp.js` for Claude, Codex and Antigravity; only a
55
+ zero-install run from a temporary exec cache (npm `_npx`, pnpm `dlx`, bun, yarn) is wired through `npx`,
56
+ and `init` says what that hands the workspace; a temporary cache is recognised by its shape (`_npx/<hash>`,
57
+ `pnpm…/dlx/`, `bunx-<uid>-…`, `xfs-<8 hex>/dlx-<n>`), not by a directory name. `holmes-kit upgrade` lets the new
58
+ install choose (it forced `--mcp-launcher npx`) and re-pins only the project a project-local install went into.
59
+ doctor's version drift check covers the Codex and Antigravity wirings too; a project-local upgrade re-pins the
60
+ workspaces that resolve to the new install (the nearest `node_modules/@holmes-lab/holmes-kit`) and leaves Codex's
61
+ user-level wiring alone (it is shared by every workspace), saying so; the plan shown before "Continue?" is the
62
+ run's own decisions, names the install location, and re-pins only after checking that the planned version landed
63
+ there. `init` refuses any file it reads before writing that it cannot read (a directory, a link to a device)
64
+ instead of crashing, and claims nothing when it refuses — the two Claude settings files and `.mcp.json` included,
65
+ which it refuses before writing anything; a write that fails part way names the files already written, only
66
+ files actually written are reported, and harness links are made in the write phase. doctor's wiring handshake
67
+ starts the server with its update check off (the probe reached the registry), and every npm child doctor and
68
+ `upgrade` start runs with `--no-update-notifier` (npm's own update check raced each command and reached the
69
+ registry a target's `.npmrc` named); `upgrade --yes` works (it was refused as a flag missing its value). `init` never
70
+ writes, removes or links through a symlink that leads out of the target — skills included, whether or not the
71
+ repository tracks it (a cloned repo's `.agents -> ../../.codex`, and then a case-variant `.AGENTS` and a submodule's
72
+ link, turned the Codex gate off everywhere); the one exception is a Claude settings file linked to your own dotfiles
73
+ — a settings file by name, outside every harness configuration home, not carried by the repository (a git that is
74
+ missing where `.git` exists refuses).
75
+ It refuses an unreadable Codex `config.toml` before writing, claims Codex's tools only when their registration was
76
+ written, and honours `--no-mcp` for Antigravity. The update cache and `upgrade` accept only a plain semver as the latest
77
+ version — no build metadata, nothing npm reads as a file name (`9.0.0.tgz` and `9.0.0-x.tgz` were installed as local
78
+ packages and ran their install scripts). doctor runs a Claude, Antigravity or Codex node wiring only when it is
79
+ exactly `node <this install's bin/holmes-mcp.js>`, however it is spelled otherwise (`/opt/homebrew/bin/node`, `sh`,
80
+ `env`, a script, a workspace program named `node` or `npx`): a workspace file in its place is a FAIL, another install
81
+ a WARN, and neither is run. The command is found where the launcher finds it — a bare name along PATH from the
82
+ target (a `.` entry ran the target's `node`; on Windows the target directory comes first), a relative path is always
83
+ the workspace's (`sl/../node`, `../../tools/node` from a monorepo, submodule or archive package ran a wrapper), and an
84
+ absolute path is node only when its real file is node or the very file a bare `node` finds (a committed link
85
+ `bin/node -> …/make` ran the repository's Makefile; Volta and mise shims still work), a process-dependent path such
86
+ as `/proc/self/cwd/…` counts as relative however it is spelled (`//proc`, `/usr/../proc`) — and "the workspace" is
87
+ every repository around the target plus the one owning a submodule's `.git` file and every checkout whose `.git` shares
88
+ its common git directory, found from the command's own directories (a symlinked `.git` followed) and, only when needed, from
89
+ the common directory's own worktree list (the 65th sibling worktree's wrapper ran; a 200,000-entry listing took 88 s), and
90
+ never a repository at or above the home directory (a dotfiles repository made nvm's `node` "the workspace's"); the walk
91
+ stays bounded (`.git` files pointing at one `.git`-less directory took minutes; `.git` files are read to 64 KiB; the
92
+ worktree list is matched as written first and walked parent by parent within a 20,000-component budget — walked entry
93
+ by entry, 1,250 worktrees used it up and turned every node wiring into a FAIL; entries that are links are walked within
94
+ the same kind of budget, 4,096 of them took 53 s). A path read from a wiring or a
95
+ `.git` file, and its arguments, is walked one component at a time and never looked up on the network (`/net/<host>`,
96
+ `//host`, `\\host`, or a committed link to one) — its last component too: a worktree's `gitdir` and `commondir` files, the
97
+ `package.json` beside a node wiring argument and the hook scripts every harness's wiring names were opened through links
98
+ to `/net`, and a hook path or node wiring is judged by its walked form (`lnk/../x` was re-resolved through the link);
99
+ such a command is not run. A wiring or settings file that is itself a
100
+ link to the network, and PATH look-ups, are named residuals. init reads an empty or BOM-only settings file as `{}` and
101
+ refuses to write one Claude would not read (over 2 MiB). A new `claude hook switches` check reads Claude's `disableAllHooks` (in
102
+ managed, user, project and local settings — a committed one switched every hook off while init said "enforced" and
103
+ doctor passed), a managed `allowManagedHooksOnly` (a non-boolean one too) or `strictPluginOnlyCustomization`, and
104
+ `disabledMcpjsonServers` / `permissions.deny` / MCP allow and deny lists for Holmes's tools, where Holmes's Claude
105
+ wiring is, read as Claude 2.1.281 reads them (an invalid allow list is an empty one; a list with command entries
106
+ admits Holmes only by its exact command; `managed-mcp.json` takes exclusive control; a user or project list that is not
107
+ an array is dropped), and a settings file Claude drops — judged by Claude 2.1.281's own loader, transcribed: a
108
+ PreToolUse/PermissionRequest entry it cannot load (`"type": "comand"`, `timeout: 0`, `shell: "zsh"`, `matcher: null`, a
109
+ prompt without `prompt`) or one declared outside `hooks` (24 such shapes read PASS), while what Claude only warns about
110
+ (an unknown event, a stray `"matcher"` key) no longer fails or refuses init — read after Claude's own cleaning (`isolation`,
111
+ the marketplace aliases, non-string permission entries), with zod v4's URL trimming, `__proto__` skipping and finite numbers
112
+ (`"timeout": 1e999` drops a file), never for a managed file (Claude salvages those), and for a file over 2 MiB, which Claude
113
+ does not read; a dropped file's own switches do not count, and it is a FAIL only when no applied file holds Holmes's gate
114
+ in a PreToolUse group Claude loads (an unrelated `holmes-kit status` hook no longer hides it). A gate entry Claude does not
115
+ wait for is not enforcing: `async`/`asyncRewake` runs it in the background and a non-empty `if` condition runs it only
116
+ when the condition matches, so a target whose only gates are such entries is a FAIL (it passed and init said
117
+ "enforced"). Only the gate entry init writes is confirmed to block — any other shape of it (a later async copy, a
118
+ `shell`, another launcher, the exec form) or a `CLAUDE_CODE_SHELL_PREFIX` in settings or the environment is reported
119
+ as not confirmed (WARN), and init does not say "enforced" over it: doctor does not transcribe Claude's hook runner. So is
120
+ any settings or global `env` key outside a list of harmless ones — Claude's own model, authentication, time-limit,
121
+ telemetry and output settings, display keys and proxies (`SHELLOPTS=noexec`, an empty `PATH`, `NODE_OPTIONS` and a `TZ`
122
+ naming a FIFO each kept the gate from blocking); the global config is the one file Claude reads — `.config.json` in its
123
+ config home (`~/.claude`) when it exists, else `.claude.json` — and the key list is capped (a 70,000-character key cut
124
+ `doctor --json` mid-object) — a matcher that does not see every tool, a path the shell rewrites (`$`, backticks, a UNC
125
+ `\\host`), or a script named by a relative path, which each harness resolves against the session's current directory
126
+ (after `cd src` the gate failed to load; the three wiring checks also flipped with doctor's own directory); Holmes's other
127
+ hooks with no gate, or a gate running a missing script, are a FAIL, a script on a network path doctor does not look up is
128
+ a WARN, and a managed gate under a switch that spares managed hooks is a WARN, not a FAIL. The Antigravity wiring is judged
129
+ by the command string agy runs (it ignores `args` and keeps quotes — a command running another file passed on its
130
+ `args`); each wiring-derived script is walked once, at most 4,096 components and 16 distinct scripts per check (1,000
131
+ committed gate entries behind a link chain held doctor for 106 s); the global config home is computed from the raw
132
+ `CLAUDE_CONFIG_DIR` as Claude computes it (an empty value is the session's directory), the user settings file too;
133
+ control characters, line separators and bidirectional controls from a file are escaped in doctor's and init's output
134
+ and in `doctor --json`. A walk past its bound is never opened as spelled (a twelve-link chain ending on `/net` was
135
+ opened), wiring arguments are walked at most 16 (4,000 through a link chain took 25.6 s), the Antigravity PreToolUse and
136
+ Stop entries must run this install's own two scripts (the Stop script as the gate read PASS), and the SessionStart
137
+ version nudge reads a node wiring's `package.json` only above its walked local path, each `package.json` at its walked
138
+ path (a committed link to `/net` was opened). Antigravity runs a hook command through `sh -c` (`cmd /c` on Windows), so
139
+ only an install path of characters both shells read literally is confirmed and init warns that the gate is NOT enforced
140
+ otherwise (`inst'q` was an sh syntax error and `R&D` two commands, both read PASS); an entry switched off with
141
+ `"enabled": false` is FAIL; an install on a path doctor never looks up is judged by its spelling (a false FAIL). Every
142
+ `..` of a wiring command shares one walk budget (300 `L/..` pairs through a self-looping link held doctor for 26.8 s),
143
+ and values quoted from a file — including init's preview lines — have control, line-separator and bidirectional
144
+ characters escaped (a newline in a wiring value printed a forged PASS line). An Antigravity hooks file is confirmed only
145
+ when the whole file is in the shape agy's parser loads — agy drops every hook of a file one named hook of which fails
146
+ (a sibling's `"timeout": "10"` read PASS) and reads field names case-insensitively (`"ENABLED": false` read PASS); a
147
+ `holmes-kit` entry switched off in the user-level `~/.gemini/config/hooks.json` is FAIL; a gate `node` the launcher finds
148
+ inside the workspace (agy runs hooks from `.agents`, Claude from the target) is FAIL and init says the gate is NOT
149
+ enforced; managed Claude settings whose value 2.1.281 and 2.1.283 read differently are "not confirmed"; `upgrade`'s plan
150
+ escapes registry values. agy's `SessionStart` event and its other workspace roots (`.agent`, `_agents`, `_agent`, up to the
151
+ repository root) are read too; a switch counts only in a file agy loads; hooks files are read up to 2 MiB; a gate `node`
152
+ found through a relative PATH entry is FAIL, one inside the workspace through an absolute entry "not confirmed". By owner
153
+ decision Antigravity is confirmed as Claude is: only the hooks file `holmes-kit init` writes reads PASS — other named hooks,
154
+ other keys or values, a hooks file in another agy root or a `holmes-kit` entry in the user-level file read "not confirmed"
155
+ (WARN), and evidence that no gate runs stays FAIL. init and doctor judge the gate's `node` by one workspace rule (the
156
+ target, the repository around it, its worktrees), by where the file lies as well as what it is, and say "not confirmed"
157
+ when no `node` is on PATH; doctor starts its wiring probes through its own node (the word `node` is the file that runs
158
+ doctor), and the children of the wiring probe and of the 'MCP server' check get doctor's node's directory and the
159
+ absolute PATH entries outside the workspace, and no `HOLMES_MCP_AUTORELOAD` (a probe starts no supervisor). **doctor no
160
+ longer starts an npx wiring** (owner decision): the npx launch `init` writes reads PASS by its shape, any other npx
161
+ launch WARN — npx runs npm, and npm read the `.npmrc` and `node_modules/.bin` of wherever doctor started it (the target,
162
+ a shared temporary directory). An `npm-cli.js` inside the workspace is not taken. What the harness would find on its own
163
+ PATH is said without running it, and so is a PATH that holds no launcher; init judges the Claude settings it is about to
164
+ write; doctor starts one wiring launch once per run; on Windows agy's user-level file is looked for under
165
+ `USERPROFILE`. The local settings of the
166
+ canonical git root (a monorepo root, a worktree's main checkout) are read as Claude 2.1.281 finds it — a usable `.git`, and
167
+ for a worktree plain `commondir`/`gitdir` files under `<common>/worktrees/` whose back-pointer is this checkout, compared as text as Claude compares them (a moved
168
+ worktree and a `--separate-git-dir` directory are not canonical).
169
+ init no longer says
170
+ "enforced" under such a switch, over a settings file it cannot read, or for a harness whose hooks file it refused,
171
+ and refuses by name a settings file or `.mcp.json` whose shape it cannot merge (they crashed with a TypeError or were
172
+ rewritten into index keys), reading a null `hooks` as empty as Claude does. `$CLAUDE_CONFIG_DIR` is a harness home for the settings
173
+ link exception, and a missing git is also looked for from the link's real directory.
174
+ Doctor reads wiring files as untrusted input: a non-string argument, a deeply nested `cmd /c` or a very long
175
+ node path neither crashes nor stalls it. Measured: the npx launch runs npm in each session
176
+ workspace, and that workspace's `.npmrc` (`node-options=--require ./evil.js`) or a package planted in
177
+ its `node_modules` ran in place of the Holmes server; an `npm_config_node_options=""` override does not
178
+ help (npm reads an empty value as unset). `doctor` WARNs every Holmes wiring launched through a package runner
179
+ (`npx`, `bunx`, `npm exec`, `pnpm dlx`, `yarn dlx`, `cmd /c npx`) as `<harness> wiring launcher`, and a
180
+ trusted Codex layer's npx launch is a FAIL (REQ-738). Existing wirings change when `init --force` is re-run.
181
+ - **Codex gate on codex-cli 0.155** (REQ-727, A-SPEC-727): plugin hooks were removed upstream; `init --agent
182
+ codex` wires the PreToolUse and Stop kernels into the user-level `$CODEX_HOME/hooks.json`,
183
+ preserving foreign hooks and trust identities.
184
+ - **In-session approval is offered only to an attested harness** (REQ-732, A-SPEC-732): the MCP server's parent
185
+ must be the harness's own executable image (native claude/codex/agy), not a name; the slice and
186
+ remediation tools act only on the bound store; `spec_remediate` writes only a spec id, never into
187
+ `.ax/`, through a symlink or a hard link. Named residual: a binary copied under a harness name.
188
+ - **Requirement triage evidence is ledger-issued and single-use** (REQ-729, A-SPEC-729); a REQ's first seal is
189
+ read from the ledger and follows recorded renames.
190
+ - **Compatibility cross-check** (REQ-733, A-SPEC-733): refusals carry the accepted vocabulary and the matched
191
+ line; OS signals are judged by language and shape (JS/TS, Python, Go, Rust, Java/Kotlin, C#, C/C++,
192
+ Swift, Ruby, shell, Makefile, PowerShell); the check reads what the edit gate admits.
193
+ - **`.ax` read loops are reads** (REQ-737, A-SPEC-737; the A-SPEC-226 loop pin is amended); programmable readers that write (`sed w`, `awk >`,
194
+ `sort -o`, `find -fprint`, `git --output`, `perl`) are not, in every spelling getopt and BSD accept (`sed -E -i.bak`, `sed -I ''`,
195
+ `sed --in`, `sort --o=`, `sort --outp=` edited `.ax/specs` while read as reads — measured on macOS).
196
+ - **Walkers skip nested git working trees** (REQ-734, A-SPEC-734) — only when git says the directory is not the
197
+ project's (tracks nothing under it, and ignores it or registered it as a worktree).
198
+ - ART-6 clears when a later current-build record answers a diverged finding (REQ-726, A-SPEC-726); REQ intake
199
+ names the freshness cause and recovery (REQ-730, A-SPEC-730); protected harness configuration
200
+ includes the active Codex config (REQ-728, A-SPEC-728).
201
+ - **The shell gate judges by identity, and a `cd` moves its base only when certain** (REQ-728):
202
+ wiring files and directories (`.mcp.json`, `.claude/settings*.json`, `.agents/*`, `.codex/*`,
203
+ `~/.codex/config.toml|hooks.json`, `~/.claude/settings*.json`) and **`.ax` as a whole** are judged
204
+ as shell words after quoting, brace lists, `$HOME`/`$CODEX_HOME`, wrappers, `find`/`xargs`, `git`,
205
+ archive and copy forms; a `cd` the shell may skip, fail, run in a subshell or resolve elsewhere
206
+ (`cd /nope && true;`, `false && cd`, `(cd …);`, `true | cd`, `~-`, `pushd +1`, `CDPATH`, a link
207
+ made in the same command, `then cd`, `eval`, `source`) leaves the base unknown, where wiring and
208
+ code writes are refused by name. Every evaluation runs under a deadline wall (20 s, 2 GB) whose
209
+ overrun is the gate-error decision — deny where governed, never allow.
210
+ The `.ax` text rules follow every certain `cd` (a second `cd` into `.ax` was flattened only for
211
+ the first), and an uncertain `cd` still contributes its lexical target as a possible base, so a
212
+ relative write after `git log; cd sub; cd ../.ax` is refused as well.
213
+ - **Every trailing-run trim on a gate path is linear** (`trimTrailing`): 17 sites that took 2.8–3.7 s
214
+ on an 80 KB run (approval blockers, the C-SPEC rule readers, the spec parser, `.gitignore`); the spec
215
+ heading, the hook's quote scan, the `.gitignore` class test and `**` matcher, `posix.normalize` on
216
+ `../` runs and the redirect strip are linear too.
217
+ - **Every gate verdict up to the 256 KB parse limit arrives within 2 s** (A-SPEC-728 rule 37, measured on the built
218
+ hook): a glob is matched by simulating its automaton (22 `**/` groups in a deletion glob took the 20 s deadline); a brace
219
+ body holding a comma skips the cubic range test; loop expansion has one budget per command, past which a loop too large
220
+ to judge is refused (four nested 64-word loops reached the deadline); `cd` look-ups, the segment flattening's `realpath`
221
+ and the shell-write patterns are made once per command (131,000 lines took 4.8 s); `open(…, 'w')` evidence is read
222
+ linearly and an interpreter program's call arguments within one 16 MiB budget; and a missing path's nearest real
223
+ ancestor is found by halving (a 200 KB Write `file_path` took 6.6 s). Named residual: a command naming `/net/<host>`
224
+ is looked up before the user is asked. Whenever the gate cannot place a command's directories, a literal `cd` that lands in
225
+ the `.ax` store (a link to it included) still makes the writes it recognises be judged there, glob words too (64 no-op
226
+ `cd`s before `eval 'cd axl/specs/01_req'` let `sed -i` into the store; reading the store for every command with many
227
+ `cd`s refused `(cd client && npm test) && … | tee test.log`); the call-argument
228
+ budget is the whole command's; trailing-slash trims, the self-approval `status: approved` test and the store-candidate
229
+ ancestor search are linear (a 96 KB slash run, 48 KB of blank lines and 16,000 missing components took seconds or ran
230
+ out of heap); a refusal of an input too large to judge says so. A spec edit is judged on its result — an Edit of `draft`
231
+ into `approved` no longer self-approves, and a MultiEdit whose result would pass 16 MiB is refused instead of aborting
232
+ the hook; the result is computed once, within a work budget across all its edits (a 2.9 KB MultiEdit of length-preserving
233
+ `replace_all` edits took 16 s with no verdict); Antigravity's `replace_file_content` is judged on its result too (its
234
+ replacement was read as the whole file, so `draft` → `approved` was `ask` there and a deny for Claude — a target not in the
235
+ file, and a Write carrying a stray pair, are still judged on the content as a whole file); the curl/wget URL
236
+ tail strip is linear, and a glob like `[(])` is literal text again instead of a thrown error. Every verdict up to the
237
+ 256 KB parse limit arrives within 2 s again: the string-literal strip every anchor rule shares and the `.ax` scope
238
+ rewrite are linear scanners equal to the regexes they replace (48 KB of `\"` in a code Write took 3.5 s, 256 KB of
239
+ `=/` met the 20 s wall); a shell command is split once and refused past 4,096 segments or 4,096 distinct write targets
240
+ (seventeen shapes of repeated separators took 2.4–6.1 s — the refusal says to split the command, and an ungoverned project
241
+ is not refused for code targets it never judges); the children of one stdin or `-c` program share their possible bases,
242
+ whether a text names wiring is remembered per text, and `git -C` values are resolved once (each took seconds to the 20 s
243
+ wall; a base unknown past 4,096 characters on the way let a 17-hop walk back into `.ax` through); `tar`'s `-C` values
244
+ compose as `cd`s do — by position, as bsdtar and GNU tar each read them, and an empty `-C ""` changes nothing — and a
245
+ composed directory past 4,096 characters is refused where pathspecs or members land in it; answers about a text are kept
246
+ for the 256 most recently asked long texts (257 quoted literals evicted the whole command's answer: 10.7 s), and a quoted
247
+ shell command inside a program is judged once, at most 4,096 of them; identical words are judged once; `git --work-tree`
248
+ is judged beside the `-C` directory, not instead of it; tar's old-style bundles (`tar xfC e.tar dir`) and glued `-f` values
249
+ are read; a path that passed is not judged again within one command (16 loops over one tar command took 10.6 s), and a
250
+ command naming more than 65,536 distinct paths, or more than 16 MiB of path text, is refused as too large to judge; with
251
+ `--strip-components`, `--transform` or `-s` a tar member holding a wiring file's or directory's name is refused by name,
252
+ wherever it lands (a harmless `tar -xzf theme.tgz --strip-components=1 -C dist package/settings.json` needs an approval);
253
+ a tar `-C` directory is not composed past 4,096 characters; under an
254
+ unknowable `git -C` the work tree is resolved from the command's own directory; a candidate's place under `.ax` is computed once per
255
+ judgement; whether a `find` runs unfiltered is decided in one pass; a segment is judged at no more than 8 climb bases, and
256
+ the classifier's per-segment flattening stays within 32 MiB — past either the command is refused as too large to judge;
257
+ a long pattern in a spec edit is searched linearly; and an Antigravity read is auto-allowed only without `Includes` (one
258
+ can name an ignored file), with plain relative `Excludes`, and with no key that differs from the one it reads only in case.
259
+ - **The files inside `.ax` are protected by identity, not spelling** (REQ-728): a quoted, escaped,
260
+ globbed or case-variant path, reached through any `cd` — certain or not — is resolved against the
261
+ segment's real or possible base; a `#` comment no longer opens a quote for the next line. A
262
+ segment whose base is unknown is judged at every `.ax` base the command could have produced,
263
+ keyed by the store's layout (bounded whatever the command's length); a `cd` whose target cannot
264
+ be resolved, in a command that mentions `.ax` (a link made in the same command, `X=.ax; cd "$X"`),
265
+ is judged inside `.ax`; and a mention is a **spelling** — `.a?`, `.[a]x`, `$'\056ax'`, `"."ax`,
266
+ `.\ax`, `{.ax,}`, `.{a..z}x` — as bash and zsh read it, while `[.]ax`, `?ax`, `*` and a numeric
267
+ `{1..3}` are not. A `cd` argument the shell would EXPAND (`cd .a?`, `cd .ax/led*`) has an
268
+ unknowable target (it resolved to a literal `<root>/.a?` and the store was deleted through it —
269
+ measured); a candidate base is placed by identity first (a link `axlink → .ax` already on disk,
270
+ reached by an uncertain cd, was dropped for its spelling); and the shell base is the directory
271
+ the harness RUNS the command in — the payload `cwd`, or a Codex `tool_input.workdir` — when it
272
+ lies inside the project, so `rm ../.mcp.json` from `sub/` is refused (it was judged at the root,
273
+ where `..` leaves the project); a relative `workdir` is anchored at the `cwd`. A wrapper that
274
+ changes directory for the command it runs (`env -C DIR`, `env --chdir=DIR`, `sudo -D DIR`) moves
275
+ that command's base like a `cd` — the option used to be stripped as a wrapper argument, and
276
+ `env -C .ax rm ledger/provenance.jsonl` deleted the ledger while judged at the root (measured);
277
+ nested wrappers compose (`env -C .ax env -C ledger …` runs in `.ax/ledger`), an `env -S` string
278
+ is read in place and split by env's own grammar (a `#` comment, `\c`, `\_`; a `${VAR}` leaves the
279
+ base unknown), several `-C` in one `env` leave the base unknown, wrapper options are read the way
280
+ getopt reads them (`timeout -s KILL 5`, bundled `env -iC`, `env -P`, `sudo -R`, `--ch=` prefixes; an
281
+ option the gate does not know leaves the base unknown), and redirects are judged at the shell's own
282
+ directory wherever they sit in the command.
283
+ - **Every walker that reads source, tests or specs skips nested trees and reads regular files only**
284
+ (REQ-734): the Stop hook's known-defect walk (an un-ignored agent worktree's expired
285
+ `@known-defect` blocked the root session, 2–7 s per Stop), `entity_renumber`'s source plan, the seal's
286
+ kills advisory, `test_run`'s mutation target and the hooks' spec reader; renumber reads `.gitignore`
287
+ through the same non-blocking, capped reader as `loadIgnore`. Every git child of the Stop hook, and
288
+ the work-tree reads of `maintenance_analyze` and `attest`, run under a 5 s timeout (a FIFO
289
+ `.gitignore` kept `git status` blocked: the Stop hook never finished and `maintenance_analyze` wedged
290
+ the MCP server — measured); a timed-out query is remembered, so a walk waits at most once; a file git
291
+ lists is read only when it is a regular file; worktrees are listed with `-z`; and a link into a
292
+ skipped nested tree is not followed. Every git child in the source tree now carries a timeout and a
293
+ 256 MiB output buffer (a census test reads the tree): Node's 1 MiB default made the Stop hook's
294
+ ART-1/ART-2 checks read "no signal" on a large repository — this repository's own 15.3 MB ledger
295
+ was never checked for rollback. A root whose git timed out is remembered once for the hooks, the
296
+ walkers and `maintenance_analyze`; a Stop signal that could not be judged is named on stderr; the
297
+ `.ax` state files and `reverse_anchor`'s mapped files are read as regular files only (a FIFO in
298
+ their place hung the hooks and the MCP server).
299
+ - **No product process blocks on a file that is not a regular file** (REQ-734, round 13). The hooks
300
+ (both PreToolUse threads, Stop, SessionStart, the refresh child, the Antigravity entry points), the MCP
301
+ server and the CLI install one guard at start: `readFileSync`, `writeFileSync` and `appendFileSync` of a
302
+ path open it non-blocking and refuse anything but a regular file, and `openSync` never waits. Measured
303
+ before: a FIFO at `ax.config.json`, the Write target, `go.mod`, a ledger, `.ax/state/replica-id`,
304
+ `.ax/ledger/stop-guard.json` or `.mcp.json` held a hook past its deadline — the PreToolUse worker printed
305
+ its deadline deny and the process still did not exit. A test traces every path each hook opens and puts
306
+ a FIFO at each one in turn. The git timeout memory is kept per kind of query (a slow `status` no longer
307
+ silences `worktree list`, which had the Stop hook judge three agent worktrees' files), every Stop git child
308
+ goes through it (one wait per kind; `include.path` → FIFO took 27–32 s), every article the Stop hook
309
+ could not judge is named, `test_run`'s runners are bounded (30 min; jest `--forceExit`; an open handle
310
+ after a passing test wedged the server; a stopped run says so at the end of its result), and doctor's
311
+ `npm config get prefix` has a timeout. The shipped `bin/holmes-kit.js` and `bin/holmes-pre-push.js` install the
312
+ guard too. Index-only git queries skip the `core.fsmonitor` hook (a slow hook made the Stop hook judge a
313
+ registered worktree again), and when git does not answer, PreToolUse judges every `rm` target as tracked in
314
+ the project instead of treating the tree as "not a repository" (`rm -r <tracked dir>` was allowed silently).
315
+ Only a git that says "not a git repository" (or no git) counts as no repository: a refusal inside one —
316
+ dubious ownership (common with container bind mounts), an unknown `extensions.*`, a corrupt index — is "did
317
+ not answer", judged strictly and named. A directory holding `.git` whose nesting git cannot answer is skipped
318
+ by every walker and named, and what was skipped is not called judged: `ci` fails and names it, `attest` marks the
319
+ commit `+unknown` (walking it instead let `entity_renumber` plan a registered worktree's files and `test_run`'s
320
+ scope take its tests). `attest` marks a commit `+unknown` when the status did not answer, and says `unknown` for a
321
+ repository git refuses to read. Whether a directory is a repository is read from the tree
322
+ (a `.git` above it), not from git's message, which is translated under a non-English locale; every product
323
+ process drops `GIT_DIR`-style variables from its own environment at start (the scanner kept an exported
324
+ `GIT_DIR` and listed a registered worktree's files). The rm gate takes a signal that makes it stricter (tracked,
325
+ outside the repository) from any repository, and "ignored ⇒ regenerable" only from the repository that tracks the
326
+ project's specs (a parent ignoring `*` — the dotfiles pattern — allowed `rm -rf src`); it compares NFC and
327
+ case-folded paths, treats a target under a submodule as tracked, and judges each relative target from every
328
+ directory the command may run any part in — a flow-insensitive set (loops, functions, `trap` strings and variables
329
+ run text after a later `cd`; `cd src && rm -r lib` and `for …; do rm -r lib; cd src; done` deleted tracked `src/lib`
330
+ unasked), with the literal `cd`s of a loop, function or trap applied until the set settles (`until [ -d .git ]; do
331
+ cd ..; done && rm -r src` climbed past a single pass), unknown (and so strict) only where a `cd` cannot be placed
332
+ (`cd${IFS}src` included), so ordinary cleanups such as `source .venv/bin/activate && rm -rf build` stay allowed;
333
+ a segment the model places with certainty keeps its own directory (`rm -rf build; cd ..` was refused as
334
+ out-of-project), one it cannot place is judged from the whole set, a backtick next to a cd argument is unknown, and
335
+ any function definition and zsh `repeat`/`foreach` repeat (`repeat 2 cd ..; rm -r .ax` was allowed; quoted text
336
+ such as `git commit -m "call build()"` does not count), a removal of an ordered command is judged from where the cds
337
+ written before it can lead (`cd web && npm ci && cd .. && rm -rf build` was refused), the unknown-set store rule
338
+ applies to a command the gate recognises as writing — a writer by name behind any wrappers, precommands or leading
339
+ redirects, a programmable reader's write form, a tree-writing `git`, an interpreter's own one-liner flag, a shell running
340
+ a program in any spelling (`bash -lc`, `su -c`, a here-string, `eval`), and every stage of a pipeline into a shell or an
341
+ `xargs` that runs a shell or a writer (`echo rm ledger/x | sh`), and a `>`, `>>` or `<>` redirect into the store; a segment
342
+ recognised only by its redirect has only the redirect's target read (`terraform plan -state=state/x > plan.txt` passes) —
343
+ while a command it does not recognise passes to the harness, an unrecognised wrapper or runner (`taskset`, `script -c`,
344
+ `tmux`) included (owner decision:
345
+ `npx playwright test specs/…`, `git add specs` and `ls specs 2>/dev/null` were refused, and a listed-verbs version let
346
+ `perl -pi`, `/bin/rm` and `git checkout -- ./specs` through), a relative `cd` after one the model cannot place is
347
+ unknown too (`cd nope; cd src && rm -r lib` deleted `src/lib`), a physical `cd -P`/`set -P`
348
+ and a harness working directory go through links as the kernel does, an `&&` chain's failed cd stops its
349
+ successors, and a subshell's `)` is not part of an rm target — and
350
+ by its real path too (an untracked link aliasing a tracked directory). The shell model reads a quoted or escaped
351
+ `cd`/`pushd`/`env`/`eval` word (`\cd`, `"cd"`, `$'\x63d'`), a backslash-newline, a brace-listed `{cd,…}` and zsh's
352
+ `noglob`/`nocorrect` as the shell does, and a command word the shell expands (`$C`) as a possible cd; every rule reads
353
+ a quote-removed plain word as itself and an escaped `eval`/`sh -c` program as the one program it is (`r''m -rf
354
+ /usr/local`, `r\m -rf .git`, `g''it reset --hard`, `eval rm\ -rf\ src` were allowed while their plain forms were
355
+ denied); the `.ax` rules judge every segment from every `.ax` directory the command may visit, and, where that set is
356
+ unknown, a path starting with a protected `.ax` child under `.ax` too (`cd "$(printf '.%s' ax)" && echo x >
357
+ ledger/provenance.jsonl`). Each of these deleted `.ax/specs`, the ledger or tracked source unasked before; the
358
+ brace reading is linear (a 200 KB minified-JSON heredoc hit the hook's deadline). A governed monorepo package is
359
+ judged on its own paths: the Stop hook's and `attest`'s status is read relative to the package and limited to it
360
+ (the whole-repository status of a 200k-file monorepo cost 20–25×), its prefix matched NFC and case-folded (ART-1/5/8
361
+ returned nothing and `attest` called a dirty tree clean, also after a case-only rename of the package directory),
362
+ and the status is read with `-z` (a name holding ` -> ` or a quote was read as another path); `attest` counts a
363
+ deleted source and a spec renamed out of the store as dirty. The Stop hook resolves its project root once (1,000 test files took
364
+ 16.7 s; now 0.75 s) and reads tests from the project root. The Antigravity adapters relay the hooks' notices.
365
+ - **`.gitignore` matching memory and fairness are bounded** (REQ-733): the required-literal index keeps
366
+ at most 16 characters per distinct literal (a shared-literal file built 407 MB), a query visits each
367
+ index node once and confirms a rule's full literal before charging it (9,996 rules sharing a literal
368
+ cost 11.6 s over 1,000 paths; 120 generated-stub names tripped the budget), the per-path budget is
369
+ spent only on candidates that survive the prefix test and scales with the path length, a darwin path is ignored only when both its
370
+ given and its NFC spelling are (git precomposes only under `core.precomposeunicode`), and OS signals are read
371
+ at every shell command position (`if`/`while`/`!`, behind `nohup`/`time`/`env VAR=`/`xargs`/`sudo -E`,
372
+ inside `$(…)`), for `require('os').userInfo` and namespace `os` bindings, and for Ruby backticks
373
+ outside strings; Python's `from platform import (` scan is linear.
374
+ - **Walkers read gitlinks by mode** (REQ-734, A-SPEC-734): only a mode-160000 entry is a submodule; a tracked file
375
+ whose case-fold equals a directory's no longer hides that directory's tracked code.
376
+ - **The Codex oracle attributes a layer's refusal by asking again from a neutral cwd**, exits only
377
+ after its answer is flushed (answers over 64 KiB were cut on macOS), reads `[hooks.state]` in `init`
378
+ as `doctor` does, points a kept user-level `[otel]` exporter endpoint at a closed address without
379
+ changing its shape (project-layer `otel` is ignored, as Codex ignores it), asks about the target by
380
+ its real path, and names the LAYER — not the user file — when a trusted project's
381
+ `.codex/config.toml` refuses, disables or overrides the server; every claim `init` makes without
382
+ Codex is labelled `approximate`. The oracle no longer imitates Codex's URI parser: a kept
383
+ `[otel]` exporter is redirected only when it is `http(s)://host[:port][/path]` with exactly one
384
+ kind (and `protocol` `binary`/`json` for `otlp-http`); any other exporter table means Codex is not
385
+ started and the verdict is `approximate`. Its answer is decoded across chunk boundaries (a
386
+ multi-megabyte Hangul `hooks.json` came back intact), it sweeps only temporary homes carrying its
387
+ own marker, it dies with its parent, and it asks about the target by both the given and the real
388
+ path, keeping the stricter answer (the Holmes PreToolUse hook's absence counts) and naming both
389
+ refusals. `sqlite_home` and `analytics` isolation is judged from the USER COPY alone; a workspace
390
+ layer carrying a value Codex would refuse (a non-string `sqlite_home`) makes the oracle decline
391
+ before codex starts, labelled approximate — an untrusted layer's `sqlite_home = 5` had skipped the
392
+ override and Codex created and migrated its SQLite databases at the user's absolute path
393
+ (measured). The user file itself is not a workspace layer, the worker forwards only the fields
394
+ the verdict reads (a 25 MB hooks file overflowed the pipe buffer), doctor and init name
395
+ `[features] hooks = false`, and `_` is allowed in a collector's host label. Isolation cannot be
396
+ repaired by a layer: when the user copy's `sqlite_home` (or `analytics.enabled`) is a value the
397
+ override must not mask, any workspace layer setting that key makes the oracle decline — Codex
398
+ merged a trusted layer's valid path over the copy's invalid one and created its databases there
399
+ (measured). Layers are read for both spellings of the target, an unreadable or oversized layer
400
+ declines rather than reading as absent, and of the two asks (as given, by real path) the stricter
401
+ answer is kept per aspect, a replaced server table included. The entry Codex will run is judged
402
+ beyond `command`/`args`: a trusted layer's `env.HOLMES_SPECS` or `cwd` (which bind the server's
403
+ spec store elsewhere) is a `codex wiring env` WARN naming the layer, and a `disabled_tools` (or a
404
+ non-empty `enabled_tools`) that takes a gate tool away is a FAIL — Codex deep-merges these and
405
+ doctor said PASS (measured). init prints a layer's refusal only while it still holds after the
406
+ write; a copy the oracle cannot parse that Codex loads declines; the copy is capped at 1 MiB.
407
+ Authority is judged in the environment Codex hands the server: a layer's approval, autonomy, gate
408
+ or egress-consent key (`HOLMES_APPROVAL`, `HOLMES_AUTONOMOUS_APPROVAL`, `GEMINI_API_KEY` …, compared
409
+ without case), in `env` or in `env_vars` of either form, is a FAIL and init does not say "active";
410
+ one the user file carries itself is a WARN. Every other enabled MCP server handed such a key is
411
+ judged whatever its command, a Holmes table only a layer provides is judged instead of reported
412
+ "not active", both spellings' environments are merged, and a relative `HOLMES_SPECS` or a
413
+ `CLAUDE_PROJECT_DIR` from a layer is a redirect WARN. A trusted layer's server runs arbitrary code, so
414
+ launches and environments are judged by class: a Holmes server launch another layer provides or
415
+ changes must be one of the two shapes init writes (and, for `node`, this install's entry) — an
416
+ `env` wrapper, `--env-file` or `--require` handed a recording server a forged key (measured) — and a
417
+ changed launch makes every authority key the server holds the layer's; any other key a layer puts in
418
+ a Holmes server's environment (`HOME`, `PATH`, `NODE_OPTIONS`, proxies, and every `HOLMES_*` key
419
+ that does not merely switch a feature off — `HOLMES_PYTHON` picked `test_run`'s interpreter) is a
420
+ FAIL, judged by the name the process receives (a key `"HOLMES_AUTONOMOUS_APPROVAL=1"` reached the
421
+ server as `HOLMES_AUTONOMOUS_APPROVAL`); every layer-provided `node` launch — second servers and a
422
+ layer-only table included — must resolve to this install's entry. Holmes servers are recognised
423
+ lexically and no file is opened for that (a real-path check took 46 s on a symlink chain).
424
+ A layer's `npx` launch must pin exactly this install's version (a layer pinning `0.20.0+x` read PASS);
425
+ a layer's `node` launch path is resolved the way node resolves `argv[1]` — `.`/`..` removed as text,
426
+ then links walked one component at a time, never into a network or automounter path (`/net`, `//`,
427
+ `\\?\`), at most 4,096 characters — so `<ws>/link/../bin/holmes-mcp.js` pointing at a wrapper is not
428
+ "this install"; every value a layer or Codex supplies in a doctor or init line is clipped; the user's own
429
+ `/opt/homebrew/bin/node` launch is node (`.exe`/`.cmd` only on Windows).
430
+ - **Walkers and readers are linear** (REQ-733/734): `.gitignore` patterns match by a token
431
+ table-walk (a `**`-heavy pattern no longer backtracks; star runs coalesce into single sweeps —
432
+ 20 KB of `*` cost 138 ms per file), a class the engine refuses (`[a-Z]`) makes one line
433
+ unsupported instead of dropping every rule of the file, the hook's top-level splitter is comment
434
+ aware, the redirect strip scans by index, the Files-to-Touch normalizer is a linear segment stack
435
+ (`x/` + 170,000 `../` took 5 s per Edit through the gate), and an OS signal needs a real `os`
436
+ binding (`'os'` in a string is none).
437
+ - **Walkers read regular files only, and ask git once** (REQ-734): a FIFO named `src/pipe.ts`
438
+ blocked the graph scan and test discovery forever (a non-regular entry is now a recorded skip);
439
+ the ignored-directory question is answered once per root from `git ls-files -o -i --directory`
440
+ (NFC on both sides) instead of one `check-ignore` spawn per directory holding a `.git` entry
441
+ (2,000 planted `.git` files: 26 s per scan); worktrees are matched by on-disk case; `..x/` is
442
+ inside the root; the file-anchor census skips nested trees; and Jest collects tests from
443
+ `roots: ["<rootDir>/src"]` — the earlier unanchored ignore pattern excluded every test when the
444
+ project root itself was an agent worktree, and a `<rootDir>`-anchored one broke under a path
445
+ holding `+` or `(`.
446
+ - **`.gitignore` matching is linear in the rule count and bounded at the reader** (REQ-733):
447
+ rules are tried last-to-first with early exit and indexed by their literal tail (100,000 rules
448
+ cost 387 ms per file), `loadIgnore` reads a regular file non-blocking under a 2 MB cap (a FIFO
449
+ named `.gitignore` blocked every act), `**` follows git (a double star only when bounded by `/`),
450
+ and a class starting with `]` keeps it literal.
451
+ - **The compatibility cross-check knows the wiring and more shapes** (REQ-733): `.codex/`,
452
+ `.claude/settings|hooks|skills`, `.agents/`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` are harness
453
+ surfaces; OS signals cover `shelljs`/`zx`/`execa` imports and bindings, tagged-template process
454
+ calls, named `os`/`path`/`process`/`fs` imports across lines, POSIX signals, Python
455
+ `os.popen|fork|exec*` and platform-only modules, Rust `std::os`/`libc`, Go `syscall`, and more;
456
+ measured false signals are gone (clap's `Command::new`, a Django `platform` instance, `path.posix`,
457
+ a method `.system(`, the `os.type` property, docstrings and `=begin` blocks); refusals quote at
458
+ most 200 characters of a token.
459
+
460
+ ### Fixed
461
+
462
+ - The edit gate's Files-to-Touch extractor was quadratic (a 160 KB section took 15 s); it is linear
463
+ and returns exactly the previous matches.
464
+ - Codex `config.toml`/`hooks.json` readers: escaped keys, multi-line pins, CRLF, BOMs, depth,
465
+ integer ranges, `env_vars` tables (REQ-731, A-SPEC-731, rounds 1–10).
466
+
467
+ ### Known limitations
468
+
469
+ - Hook trust in Codex cannot be verified offline.
470
+ - A binary copied or hard-linked under a harness name still attests (a code-signature check was
471
+ declined).
472
+ - Directory or glob Files-to-Touch entries are not read for OS signals.
473
+ - **doctor does not start an npx wiring** (owner decision): the npx launch `init` writes reads PASS by
474
+ its shape, so a canonical npx wiring that pins a version the registry does not have, or whose local
475
+ npx cache entry is damaged beyond its root `package.json`, reads PASS ('mcp server version' still
476
+ compares the pin with this CLI; the 'npx cache' check reads only Claude's pin).
477
+ - Shell gate (MEDIUM, named): a colon in a tar bundle (`tar -:xf`), `-W` inside bundles, a directory
478
+ member under a strip option inside a wiring directory, location-only targets after a literal `cd`,
479
+ bash `$"…"`, GNU `--one-top-level`/`--to-command`, interpreter one-liners that run tar or unzip, tar's
480
+ neighbours (`unzip -j`, `pax -s`, `git archive -o`, gunzip, cpio); under a strip option a value of
481
+ another option (`--exclude settings.json`) is read as a member and refused (over-refusal).
482
+ - doctor and init (MEDIUM, named): the `git` doctor finds through PATH; a PATH entry on a network path
483
+ (`/net/…`, `\\server\…`) is resolved when the probe environment is built; run through `npm run
484
+ doctor`, the `npm_config_*` and `INIT_CWD` npm exports reach doctor's children; a wiring naming the
485
+ user's version-manager shim by absolute path is started in the target; a PATH entry whose directory
486
+ part passes through a workspace link and lands outside reads PASS; on Windows the bare words
487
+ `taskkill.exe`, `where.exe`, `powershell.exe` and `cmd` (a requirement of its own, to be measured on
488
+ Windows — nothing of the Windows paths in this release was measured on Windows); doctor's npm probes
489
+ fall back to the bare word `npm`; init's keychain query.
490
+ - Named residuals: `entity_integrate`'s destination walk still reports an un-ignored foreign worktree's
491
+ files as untracked conflicts; `.gitignore` re-inclusion under an excluded directory and `core.ignorecase` err toward
492
+ scanning more; the Codex oracle does not judge an ancestor layer of a target that is not wired for
493
+ Codex, `tool_timeout_sec = 0`, or a trusted layer's `[hooks.state]`; a Holmes server launched through
494
+ a path that names neither `holmes-mcp`, its dist entry nor the package is recognised only by its
495
+ `HOLMES_*` keys; after a `cd` the shell gate cannot resolve (`cd "$X"`, `source`/`.` of a script,
496
+ `eval`) in a command that does not spell `.ax`, a bare relative path into a store child
497
+ (`ledger/…`) is judged at the project root only; the compatibility check's OS signals miss a
498
+ paren-less Ruby `system "…"`, a tool behind value-taking wrapper options (`sudo -u X`, `timeout N`,
499
+ `xargs -n N`) or inside `{ …; }`, and an `os` default import under another name, and count backticks
500
+ inside Ruby heredoc prose.
501
+
502
+ ## [0.30.0] - 2026-09-23
503
+
504
+ New requirements now start from fresh, prompt-bound triage evidence in every supported harness,
505
+ Codex binds to the session workspace, and approvals are negotiated in-session where the client can
506
+ show them. Four adversarial review rounds and a live three-harness run preceded this release
507
+ (`docs/goals/EVIDENCE-live-sessions-2026-09-23.md`).
508
+
509
+ ### Added
510
+
511
+ - **Fresh-evidence requirement intake** (A-SPEC-719, A-SPEC-723). A receipt-bearing refresh
512
+ coordinator (`.ax/state/fresh-evidence.json`) leases one detached refresh per workspace and HEAD,
513
+ coalesces concurrent requests, records retry state for failed workers, and re-refreshes a usable
514
+ receipt after 30 minutes so uncommitted work keeps the graph fresh. `requirement_triage` persists a
515
+ v2 artifact bound to prompt, workspace, HEAD and receipt generation, and requests the same
516
+ background refresh when evidence is not current. New REQ creation — through `spec_create` **and**
517
+ `spec_slice_init` — validates that artifact at one shared MCP boundary (A-SPEC-724).
518
+ - **Lexical-only intake** (owner decision). A workspace with no semantic tier, or with
519
+ `HOLMES_NO_SEMANTIC_WARM` set, can still create a REQ; triage and its evidence say
520
+ `lexicalOnly: true`. The switch now also stops the background refresh from embedding requirement
521
+ documents and stops triage from embedding the prompt.
522
+ - **In-session approval UX for all three harnesses** (A-SPEC-718, A-SPEC-720): native MCP form
523
+ approval negotiated from the client's advertised capability, a timeout policy, and the approval
524
+ queue as the fallback; no tool annotation is claimed to guarantee a human prompt.
525
+ - **Explicit release test lane** (A-SPEC-714): `prepublishOnly` verifies a HEAD-bound, local,
526
+ scoped test-lane receipt instead of launching external-project tests.
527
+ - **Requirement-triage human-model measurement** (A-SPEC-715) and a conservative condition-hunk
528
+ advisory extension (A-SPEC-717).
529
+
530
+ ### Changed
531
+
532
+ - **Codex uses the configuration it actually loads** (A-SPEC-721): init/doctor wire and judge
533
+ `$CODEX_HOME/config.toml` (normally `~/.codex/config.toml`) without a fixed `HOLMES_SPECS`. Doctor
534
+ warns on a pinned `HOLMES_SPECS`, stays silent about Codex for Claude/Antigravity-only workspaces,
535
+ names Holmes settings written in a shape init does not own, and init refuses to rewrite such a file
536
+ rather than corrupt the shared config. `init --remove --agent codex` states that it disables Holmes
537
+ MCP for every Codex workspace.
538
+ - **H-SPEC obligations are shared by approved sibling slices** (A-SPEC-724.2); release reconciliation
539
+ observability is bound to the existing receipt, outcome and maintenance records (A-SPEC-724.1).
540
+ - **Replay recall** (A-SPEC-725): a cited request with an underfull window may admit a direct,
541
+ scanned importer of the lexical leader; the HOLMES/60 and JARVIS/30 pins are unchanged.
542
+
543
+ ### Fixed
544
+
545
+ - The Codex MCP server bound to the package directory instead of the session workspace: the
546
+ autoreload supervisor started its child in the package root (found only in a live `codex exec`).
547
+ - A freshness lease written with `head: null` in a git workspace could only ever complete as stale,
548
+ so new REQ creation was permanently refused; the lease now binds the git HEAD.
549
+ - The source-semantic lane no longer withholds currentness; the refresh child checks its lease
550
+ before every phase that writes and records synchronous failures as bounded retry.
551
+ - `.ax/evidence/release-test-lane.json` is ignored so the publish gate no longer refuses its own
552
+ receipt as a dirty tree.
553
+
554
+ ### Known limitations
555
+
556
+ - **Codex pre-tool gate on codex-cli 0.155.x**: Codex removed plugin hooks (`plugin_hooks: removed`),
557
+ so the Holmes gate hook does not load there; MCP tools and MCP-side enforcement still apply. Named
558
+ gap REQ-248; measured in `docs/goals/EVIDENCE-live-sessions-2026-09-23.md`.
559
+ - Triage evidence is a provenance guard, not a security boundary: an artifact is not consumed on use
560
+ and is not bound to the REQ title, and a local writer can fabricate one. A dedicated REQ follows.
561
+ - A HOLMES_SPECS pin written as a TOML multi-line string, and unicode-escaped Holmes keys, are not
562
+ recognised by doctor/init.
563
+
8
564
  ## [0.29.0] - 2026-09-22
9
565
 
10
566
  Holmes-Kit now prepares a local semantic layer by default and can compare a