@holmes-lab/holmes-kit 0.39.0 → 0.40.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 (298) hide show
  1. package/CHANGELOG.md +344 -6
  2. package/README.md +54 -41
  3. package/dist/.build-id +1 -1
  4. package/dist/holmes/admission/core/admission-policy.d.ts +37 -0
  5. package/dist/holmes/admission/core/admission-policy.js +147 -0
  6. package/dist/holmes/admission/core/bounded-reader.d.ts +56 -0
  7. package/dist/holmes/admission/core/bounded-reader.js +135 -0
  8. package/dist/holmes/admission/core/change-classifier.d.ts +34 -0
  9. package/dist/holmes/admission/core/change-classifier.js +278 -0
  10. package/dist/holmes/admission/core/config-loader.d.ts +30 -0
  11. package/dist/holmes/admission/core/config-loader.js +145 -0
  12. package/dist/holmes/admission/core/event-judgement.d.ts +37 -0
  13. package/dist/holmes/admission/core/event-judgement.js +251 -0
  14. package/dist/holmes/admission/core/path-rules.d.ts +35 -0
  15. package/dist/holmes/admission/core/path-rules.js +88 -0
  16. package/dist/holmes/admission/core/pin.d.ts +7 -0
  17. package/dist/holmes/admission/core/pin.js +29 -0
  18. package/dist/holmes/admission/core/ports.d.ts +48 -0
  19. package/dist/holmes/admission/core/ports.js +11 -0
  20. package/dist/holmes/admission/core/range-resolver.d.ts +32 -0
  21. package/dist/holmes/admission/core/range-resolver.js +51 -0
  22. package/dist/holmes/admission/core/self-containment.d.ts +1 -0
  23. package/dist/holmes/admission/core/self-containment.js +125 -0
  24. package/dist/holmes/admission/core/signature-source.d.ts +9 -0
  25. package/dist/holmes/admission/core/signature-source.js +4 -0
  26. package/dist/holmes/admission/core/transition-planner.d.ts +15 -0
  27. package/dist/holmes/admission/core/transition-planner.js +14 -0
  28. package/dist/holmes/admission/core/verdict.d.ts +38 -0
  29. package/dist/holmes/admission/core/verdict.js +17 -0
  30. package/dist/holmes/admission/core/wiring.d.ts +44 -0
  31. package/dist/holmes/admission/core/wiring.js +618 -0
  32. package/dist/holmes/admission/forge/git-object-port.d.ts +4 -0
  33. package/dist/holmes/admission/forge/git-object-port.js +132 -0
  34. package/dist/holmes/assoc/assoc-arm.d.ts +1 -1
  35. package/dist/holmes/assoc/assoc-arm.js +1 -1
  36. package/dist/holmes/cli/agents.d.ts +8 -0
  37. package/dist/holmes/cli/agents.js +9 -5
  38. package/dist/holmes/cli/approve-cli.d.ts +2 -0
  39. package/dist/holmes/cli/approve-cli.js +392 -0
  40. package/dist/holmes/cli/approve-ref.d.ts +13 -7
  41. package/dist/holmes/cli/approve-ref.js +30 -10
  42. package/dist/holmes/cli/approve-status.d.ts +26 -2
  43. package/dist/holmes/cli/approve-status.js +98 -18
  44. package/dist/holmes/cli/approve-watch.d.ts +5 -0
  45. package/dist/holmes/cli/approve-watch.js +10 -5
  46. package/dist/holmes/cli/approve.d.ts +49 -13
  47. package/dist/holmes/cli/approve.js +249 -67
  48. package/dist/holmes/cli/attest.js +2 -1
  49. package/dist/holmes/cli/autonomy.d.ts +4 -1
  50. package/dist/holmes/cli/autonomy.js +17 -10
  51. package/dist/holmes/cli/codex-oracle.d.ts +11 -0
  52. package/dist/holmes/cli/codex-oracle.js +5 -1
  53. package/dist/holmes/cli/codex-toml.d.ts +10 -0
  54. package/dist/holmes/cli/codex-toml.js +36 -2
  55. package/dist/holmes/cli/doctor-boundary.d.ts +76 -0
  56. package/dist/holmes/cli/doctor-boundary.js +308 -0
  57. package/dist/holmes/cli/doctor-locks.d.ts +15 -0
  58. package/dist/holmes/cli/doctor-locks.js +119 -0
  59. package/dist/holmes/cli/doctor.d.ts +2 -0
  60. package/dist/holmes/cli/doctor.js +34 -5
  61. package/dist/holmes/cli/flags.d.ts +23 -0
  62. package/dist/holmes/cli/flags.js +89 -0
  63. package/dist/holmes/cli/index.d.ts +5 -1
  64. package/dist/holmes/cli/index.js +202 -424
  65. package/dist/holmes/cli/init.js +33 -0
  66. package/dist/holmes/cli/lock-recover.d.ts +5 -0
  67. package/dist/holmes/cli/lock-recover.js +126 -0
  68. package/dist/holmes/cli/mcp-processes.js +1 -1
  69. package/dist/holmes/cli/release-docs.js +1 -1
  70. package/dist/holmes/cli/run-exec.d.ts +141 -0
  71. package/dist/holmes/cli/run-exec.js +1435 -0
  72. package/dist/holmes/cli/run-provision.d.ts +3 -1
  73. package/dist/holmes/cli/run-provision.js +255 -44
  74. package/dist/holmes/cli/run-wiring.d.ts +69 -0
  75. package/dist/holmes/cli/run-wiring.js +270 -0
  76. package/dist/holmes/cli/run.d.ts +21 -0
  77. package/dist/holmes/cli/run.js +341 -92
  78. package/dist/holmes/cli/runtime-binding-approval.js +32 -19
  79. package/dist/holmes/cli/screen-safe.d.ts +3 -92
  80. package/dist/holmes/cli/screen-safe.js +18 -756
  81. package/dist/holmes/config/config.d.ts +2 -0
  82. package/dist/holmes/config/config.js +5 -2
  83. package/dist/holmes/cpg/foundation/language-matrix.js +2 -2
  84. package/dist/holmes/cpg/import-resolver.js +1 -1
  85. package/dist/holmes/governance/approval-decisions.d.ts +47 -0
  86. package/dist/holmes/governance/approval-decisions.js +29 -0
  87. package/dist/holmes/governance/approval-grants.d.ts +220 -1
  88. package/dist/holmes/governance/approval-grants.js +612 -33
  89. package/dist/holmes/governance/approval-queue.d.ts +26 -0
  90. package/dist/holmes/governance/approval-queue.js +109 -11
  91. package/dist/holmes/governance/approval-spend.d.ts +95 -0
  92. package/dist/holmes/governance/approval-spend.js +191 -0
  93. package/dist/holmes/governance/autonomous-shell.d.ts +61 -0
  94. package/dist/holmes/governance/autonomous-shell.js +332 -0
  95. package/dist/holmes/governance/autonomy.d.ts +5 -0
  96. package/dist/holmes/governance/autonomy.js +16 -11
  97. package/dist/holmes/governance/constitution.d.ts +5 -0
  98. package/dist/holmes/governance/constitution.js +32 -12
  99. package/dist/holmes/governance/full-autonomy.d.ts +10 -0
  100. package/dist/holmes/governance/full-autonomy.js +103 -7
  101. package/dist/holmes/governance/harness-catalog.d.ts +103 -0
  102. package/dist/holmes/governance/harness-catalog.js +348 -0
  103. package/dist/holmes/governance/human-channel.d.ts +38 -0
  104. package/dist/holmes/governance/human-channel.js +49 -0
  105. package/dist/holmes/governance/install-manifest.d.ts +22 -0
  106. package/dist/holmes/governance/install-manifest.js +160 -0
  107. package/dist/holmes/governance/ledger-rechain.js +2 -0
  108. package/dist/holmes/governance/ledger-store.conformance.d.ts +7 -1
  109. package/dist/holmes/governance/ledger-store.conformance.js +66 -0
  110. package/dist/holmes/governance/ledger-store.d.ts +88 -11
  111. package/dist/holmes/governance/ledger-store.js +186 -8
  112. package/dist/holmes/governance/provenance-chain.d.ts +16 -4
  113. package/dist/holmes/governance/provenance-chain.js +19 -4
  114. package/dist/holmes/governance/provenance-ledger.d.ts +6 -3
  115. package/dist/holmes/governance/provenance-ledger.js +53 -18
  116. package/dist/holmes/governance/push-gate-runner.js +11 -7
  117. package/dist/holmes/governance/recorded-pairs.d.ts +96 -0
  118. package/dist/holmes/governance/recorded-pairs.js +522 -0
  119. package/dist/holmes/governance/replica-id.d.ts +1 -1
  120. package/dist/holmes/governance/replica-id.js +1 -1
  121. package/dist/holmes/governance/spec-seam.d.ts +59 -0
  122. package/dist/holmes/governance/spec-seam.js +587 -0
  123. package/dist/holmes/governance/spend-kinds.d.ts +16 -0
  124. package/dist/holmes/governance/spend-kinds.js +18 -0
  125. package/dist/holmes/guardrail/decision-ledger.d.ts +2 -1
  126. package/dist/holmes/guardrail/decision-ledger.js +2 -1
  127. package/dist/holmes/guardrail/impact-gate.d.ts +1 -0
  128. package/dist/holmes/guardrail/impact-gate.js +1 -1
  129. package/dist/holmes/guardrail/line-continuation.d.ts +8 -0
  130. package/dist/holmes/guardrail/line-continuation.js +39 -0
  131. package/dist/holmes/guardrail/operator-person.d.ts +28 -4
  132. package/dist/holmes/guardrail/operator-person.js +57 -11
  133. package/dist/holmes/guardrail/refusal-codes.d.ts +8 -3
  134. package/dist/holmes/guardrail/refusal-codes.js +64 -10
  135. package/dist/holmes/guardrail/risk-classifier.d.ts +15 -9
  136. package/dist/holmes/guardrail/risk-classifier.js +228 -16
  137. package/dist/holmes/guardrail/risk-gate.d.ts +2 -8
  138. package/dist/holmes/guardrail/risk-gate.js +7 -34
  139. package/dist/holmes/guardrail/risk-types.d.ts +10 -0
  140. package/dist/holmes/guardrail/run-plan-scope.js +3 -1
  141. package/dist/holmes/guardrail/run-refusals.js +24 -8
  142. package/dist/holmes/guardrail/run-stages.d.ts +5 -0
  143. package/dist/holmes/guardrail/run-stages.js +25 -5
  144. package/dist/holmes/guardrail/scope-judgment.js +1 -1
  145. package/dist/holmes/guardrail/shell-words.js +24 -3
  146. package/dist/holmes/guardrail/unresolved-write.d.ts +40 -0
  147. package/dist/holmes/guardrail/unresolved-write.js +556 -0
  148. package/dist/holmes/guardrail/write-target.d.ts +3 -0
  149. package/dist/holmes/guardrail/write-target.js +26 -5
  150. package/dist/holmes/hooks/pre-tool-use.d.ts +105 -1
  151. package/dist/holmes/hooks/pre-tool-use.js +1134 -167
  152. package/dist/holmes/hooks/rtm-refresh-child.d.ts +1 -1
  153. package/dist/holmes/hooks/rtm-refresh-child.js +1 -1
  154. package/dist/holmes/hooks/stop.d.ts +23 -0
  155. package/dist/holmes/hooks/stop.js +86 -33
  156. package/dist/holmes/mcp/approval-adapters.js +3 -1
  157. package/dist/holmes/mcp/approval-commit.js +3 -2
  158. package/dist/holmes/mcp/approval-policy.d.ts +2 -1
  159. package/dist/holmes/mcp/approval-policy.js +3 -1
  160. package/dist/holmes/mcp/handlers/adoption.d.ts +1 -1
  161. package/dist/holmes/mcp/handlers/approval-ask.d.ts +3 -0
  162. package/dist/holmes/mcp/handlers/approval-ask.js +18 -7
  163. package/dist/holmes/mcp/handlers/entity-integration.d.ts +3 -3
  164. package/dist/holmes/mcp/handlers/entity-integration.js +29 -11
  165. package/dist/holmes/mcp/handlers/entity-renumber.d.ts +4 -4
  166. package/dist/holmes/mcp/handlers/entity-renumber.js +29 -11
  167. package/dist/holmes/mcp/handlers/entity-store.d.ts +2 -2
  168. package/dist/holmes/mcp/handlers/entity-store.js +133 -59
  169. package/dist/holmes/mcp/handlers/operator-inspection.d.ts +9 -5
  170. package/dist/holmes/mcp/handlers/operator-inspection.js +79 -16
  171. package/dist/holmes/mcp/handlers/phase-queries.d.ts +1 -1
  172. package/dist/holmes/mcp/handlers/requirement-triage.d.ts +4 -4
  173. package/dist/holmes/mcp/handlers/review-evidence.d.ts +2 -2
  174. package/dist/holmes/mcp/handlers/review-evidence.js +35 -11
  175. package/dist/holmes/mcp/handlers/review-queries.d.ts +5 -0
  176. package/dist/holmes/mcp/handlers/review-queries.js +8 -1
  177. package/dist/holmes/mcp/handlers/review-verdict.d.ts +3 -0
  178. package/dist/holmes/mcp/handlers/review-verdict.js +10 -3
  179. package/dist/holmes/mcp/handlers/risk-assessment.d.ts +7 -2
  180. package/dist/holmes/mcp/handlers/risk-assessment.js +34 -12
  181. package/dist/holmes/mcp/handlers/runtime-binding-tool.d.ts +2 -2
  182. package/dist/holmes/mcp/handlers/slice-orchestration.d.ts +6 -1
  183. package/dist/holmes/mcp/handlers/slice-orchestration.js +14 -1
  184. package/dist/holmes/mcp/handlers/spec-approval.d.ts +15 -3
  185. package/dist/holmes/mcp/handlers/spec-approval.js +32 -5
  186. package/dist/holmes/mcp/handlers/spec-authoring.d.ts +2 -2
  187. package/dist/holmes/mcp/handlers/spec-authoring.js +19 -2
  188. package/dist/holmes/mcp/handlers/spec-lifecycle.d.ts +11 -38
  189. package/dist/holmes/mcp/handlers/spec-lifecycle.js +441 -94
  190. package/dist/holmes/mcp/handlers/spec-queries.d.ts +2 -2
  191. package/dist/holmes/mcp/handlers/taint-screening.d.ts +1 -1
  192. package/dist/holmes/mcp/handlers/taint-screening.js +2 -2
  193. package/dist/holmes/mcp/handlers/test-execution.d.ts +1 -1
  194. package/dist/holmes/mcp/handlers/workspace-queries.d.ts +2 -2
  195. package/dist/holmes/mcp/handlers.d.ts +89 -79
  196. package/dist/holmes/mcp/handlers.js +69 -22
  197. package/dist/holmes/mcp/harness-attestation.d.ts +78 -5
  198. package/dist/holmes/mcp/harness-attestation.js +325 -53
  199. package/dist/holmes/mcp/maintenance-analyze.d.ts +1 -1
  200. package/dist/holmes/mcp/maintenance-analyze.js +9 -9
  201. package/dist/holmes/mcp/maintenance-evidence.js +31 -2
  202. package/dist/holmes/mcp/requirement-triage-evidence.js +22 -13
  203. package/dist/holmes/mcp/server-staleness.js +1 -1
  204. package/dist/holmes/mcp/server.js +9 -8
  205. package/dist/holmes/mcp/spec-id-guard.js +1 -1
  206. package/dist/holmes/mcp/tool-schemas.d.ts +13 -0
  207. package/dist/holmes/mcp/tool-schemas.js +29 -2
  208. package/dist/holmes/project/act-root.d.ts +19 -0
  209. package/dist/holmes/project/act-root.js +100 -0
  210. package/dist/holmes/project/baseline.js +4 -3
  211. package/dist/holmes/project/bounded-group.d.ts +47 -0
  212. package/dist/holmes/project/bounded-group.js +140 -0
  213. package/dist/holmes/project/bounded-io.d.ts +50 -2
  214. package/dist/holmes/project/bounded-io.js +138 -6
  215. package/dist/holmes/project/change-source.js +2 -2
  216. package/dist/holmes/project/instance-id.d.ts +10 -0
  217. package/dist/holmes/project/instance-id.js +233 -0
  218. package/dist/holmes/project/machine-identity.d.ts +25 -0
  219. package/dist/holmes/project/machine-identity.js +133 -0
  220. package/dist/holmes/project/owned-lock.d.ts +84 -0
  221. package/dist/holmes/project/owned-lock.js +263 -0
  222. package/dist/holmes/project/plain-lock-fs.d.ts +2 -0
  223. package/dist/holmes/project/plain-lock-fs.js +126 -0
  224. package/dist/holmes/project/request-lock.d.ts +85 -0
  225. package/dist/holmes/project/request-lock.js +459 -0
  226. package/dist/holmes/project/root.d.ts +12 -4
  227. package/dist/holmes/project/root.js +26 -7
  228. package/dist/holmes/project/run-records.d.ts +19 -0
  229. package/dist/holmes/project/run-records.js +94 -12
  230. package/dist/holmes/project/screen-text.d.ts +94 -0
  231. package/dist/holmes/project/screen-text.js +763 -0
  232. package/dist/holmes/project/spend-lock.d.ts +82 -0
  233. package/dist/holmes/project/spend-lock.js +413 -0
  234. package/dist/holmes/refresh/freshness-coordinator.d.ts +1 -1
  235. package/dist/holmes/refresh/freshness-coordinator.js +1 -1
  236. package/dist/holmes/review/condition-hunk-replay.js +4 -2
  237. package/dist/holmes/review/confidence-calibration.d.ts +1 -1
  238. package/dist/holmes/review/confidence-calibration.js +1 -1
  239. package/dist/holmes/review/content-verify.js +1 -1
  240. package/dist/holmes/review/hop-ablation.d.ts +4 -4
  241. package/dist/holmes/review/hop-ablation.js +5 -5
  242. package/dist/holmes/review/point-in-time-replay.js +12 -3
  243. package/dist/holmes/review/rank-diagnosis.d.ts +2 -2
  244. package/dist/holmes/review/rank-diagnosis.js +1 -1
  245. package/dist/holmes/review/replay-corpus.d.ts +10 -4
  246. package/dist/holmes/review/replay-corpus.js +25 -9
  247. package/dist/holmes/review/requirement-triage.js +2 -2
  248. package/dist/holmes/review/semantic-arm.d.ts +3 -3
  249. package/dist/holmes/review/semantic-arm.js +3 -3
  250. package/dist/holmes/review/test-outcomes.js +3 -1
  251. package/dist/holmes/review/test-runner.d.ts +11 -0
  252. package/dist/holmes/review/test-runner.js +31 -10
  253. package/dist/holmes/review/test-selection-breadth.js +2 -2
  254. package/dist/holmes/review/verdicts.d.ts +105 -8
  255. package/dist/holmes/review/verdicts.js +640 -36
  256. package/dist/holmes/rtm/anchor-census.d.ts +9 -0
  257. package/dist/holmes/rtm/anchor-census.js +151 -0
  258. package/dist/holmes/rtm/anchor-ids.d.ts +25 -1
  259. package/dist/holmes/rtm/anchor-ids.js +45 -2
  260. package/dist/holmes/rtm/comment-ranges.d.ts +2 -0
  261. package/dist/holmes/rtm/comment-ranges.js +104 -0
  262. package/dist/holmes/rtm/counted-tests.d.ts +1 -0
  263. package/dist/holmes/rtm/counted-tests.js +63 -0
  264. package/dist/holmes/rtm/impact-advisory.d.ts +1 -1
  265. package/dist/holmes/rtm/known-defects.js +1 -1
  266. package/dist/holmes/rtm/localize.js +1 -1
  267. package/dist/holmes/rtm/taint-benchmark.d.ts +1 -1
  268. package/dist/holmes/rtm/taint-vocabulary.d.ts +1 -1
  269. package/dist/holmes/rtm/test-scope.d.ts +31 -0
  270. package/dist/holmes/rtm/test-scope.js +166 -5
  271. package/dist/holmes/rtm/trace-gaps.js +1 -1
  272. package/dist/holmes/runtime/dispatch.d.ts +10 -0
  273. package/dist/holmes/runtime/dispatch.js +12 -1
  274. package/dist/holmes/semantic/cloud-usage.d.ts +1 -1
  275. package/dist/holmes/semantic/cloud-usage.js +1 -1
  276. package/dist/holmes/semantic/unreadable-paths.d.ts +1 -1
  277. package/dist/holmes/semantic/unreadable-paths.js +1 -1
  278. package/dist/holmes/spec/approval-blockers.js +1 -1
  279. package/dist/holmes/spec/entity-store.d.ts +6 -1
  280. package/dist/holmes/spec/entity-store.js +16 -2
  281. package/dist/holmes/spec/entity-transaction.d.ts +7 -2
  282. package/dist/holmes/spec/entity-transaction.js +87 -170
  283. package/dist/holmes/spec/spec-store.d.ts +12 -6
  284. package/dist/holmes/spec/spec-store.js +4 -2
  285. package/dist/holmes/spec/spec-types.js +1 -1
  286. package/dist/holmes/spec/succession-guard.d.ts +56 -0
  287. package/dist/holmes/spec/succession-guard.js +187 -0
  288. package/dist/holmes/spec/succession.d.ts +70 -0
  289. package/dist/holmes/spec/succession.js +171 -0
  290. package/dist/holmes/spec/transition-policy.d.ts +2 -2
  291. package/docs/install-guide.md +9 -3
  292. package/docs/language-support.md +78 -0
  293. package/package.json +4 -3
  294. package/playbooks/author-slice/PLAYBOOK.md +1 -1
  295. package/playbooks/promote-slice/PLAYBOOK.md +5 -1
  296. package/playbooks/publish/PLAYBOOK.md +45 -33
  297. package/dist/holmes/review/manual-baseline.d.ts +0 -209
  298. package/dist/holmes/review/manual-baseline.js +0 -2847
package/CHANGELOG.md CHANGED
@@ -7,6 +7,328 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
  <!-- @implements A-SPEC-209 -->
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.40.0] - 2026-11-03
11
+
12
+ The orchestration hardening, the full profile's push and publish flags, the gate's reading of commands that build a path into `.ax`, the full profile named where people look, and a published package that names no consumer workspace or personal host. The hook prevents accidents; its forgery resistance is not verified (Known limitations).
13
+
14
+ Homepage: https://holmes-lab.web.app (the npm package's Homepage link from 0.40.0; A-SPEC-575.2).
15
+
16
+ ### Known limitations
17
+ - **This hook is not a security boundary against the same user's agent shell.** Its goal is to prevent accidents. Resistance to forgery has not been verified and is not claimed; the structural change is 0.41's. A grant the agent itself produced is not told apart from an operator's. The gate judges only the command text (A-SPEC-794.37, 794.38): a path into `.ax` that reaches the command from outside its text is outside what it judges. The everyday-command corpus ran on the Claude Code input shape only; on Codex and Antigravity only the form suite ran. The 0.40.0 gate rules as a whole have not been measured on Windows. They have not been measured on Linux either (A-SPEC-794.61): the per-commit Linux judgement described under 0.23.0 is that release's record, not this one's. The root fix, grant files kept where the agent cannot write, is planned as a follow-up in the next version (0.41).
18
+ - **The full profile does not refuse a plain write outside its scope (A-SPEC-794.47).** REQ-792's criterion that an act outside the scope is refused with a route is not met in 0.40.0: a plain write to a home path or a `..` path gets no decision (measured on a full-profile fixture). A recursive delete outside the scope is refused. The repair is planned for 0.41.
19
+ - **The push and publish flags judge the clause forms the gate reads (A-SPEC-794.49 to 794.52).** Not read: what a runner, a substitution or a package script runs inside; a command word before them outside the ones it knows; syntax outside its control-word table, and function bodies; some shell operator forms; other package tools and git sub-tools; an option before the subcommand outside the ones it knows. Text that only names an act passes when the gate reads the whole command with certainty and no earlier check refuses; otherwise all of it is read, and such text can be refused. A help or dry-run form of a force push is still refused while the push flag is off. The goal is to prevent an accident; resistance to forgery is not claimed. Measured on the Claude Code, Codex and Antigravity hook input shapes; the Codex and Antigravity CLIs were not run.
20
+ - **A refusal's prose can name the main checkout from a worktree under the store.** Its structured first step does not (A-SPEC-794.45), but the reason's sentence still says to change directory to the project root. Read from inside such a worktree, that root is the main checkout.
21
+ - **The staging gate prevents accidents; it does not guarantee that specs are staged only with an approval.** It judges the staging forms it recognises. One form that takes its paths from elsewhere than the command text passed the hook where the same paths written out are refused. This was measured once on a scratch project without a full profile, judged and not run. Whether Stop's ART-5 then catches the commit is read from the code, not measured. The repair is planned for 0.41.
22
+ - **The in-session approval form is not strong proof against an agent of the same user (A-SPEC-732.9, 732.10).** A process an agent starts from its own shell tool can attest as the harness and answer a form it opens; neither the process chain nor the environment markers tell it apart. A check that the other end of the server's stdio is held by the harness process itself is the candidate fix, planned for 0.41.
23
+ - **cursor-agent and opencode are recognised from their published package and source, not from an install (A-SPEC-102.27, 102.28).** Their markers (`CURSOR_AGENT`; `OPENCODE`, `OPENCODE_SESSION_ID`, `AI_AGENT`) and process names come from cursor-agent 2026.10.22 and opencode dev 822594b9. A later version that renames them is not recognised until the harness catalog is updated. A marker is the agent's to unset; the parent-process check is what an agent that does not also detach from the hook's view cannot avoid.
24
+ - **A harness catalog file can lock a person's own terminal (A-SPEC-102.28).** A user or project file that adds a marker such as `PATH` or an ancestor such as `zsh` refuses every operator act there. It can never admit an agent; the refusal names the file that added it, and `holmes-kit doctor` shows a file it refused.
25
+ - **An agent running under gemini-cli looks like a person to the operator judgement (gemini-cli is not a supported harness).** Measured on gemini 0.52.0: its shell tool sets `GEMINI_CLI=1` and leaves the process title `node`, and neither is recognised. On a machine where agents run under gemini-cli, do not rely on the person-only approval surfaces (`approve --grant`, the approval screens, `lock recover`, review independence).
26
+ - **The approval queue is 0.39's: a decision is not bound to the request it was shown for (A-SPEC-794.30).** A request id names one entry per target. A re-filing with another subject joins it, and a decision names the id, not the request as the person read it. Two clones' queues merge as a union of lines with no request identity. The redesign that binds a decision to what was shown is 0.41's, with a record the agent cannot write. A grant file an unreleased 0.40 development build wrote stays usable until its first use or its expiry (A-SPEC-794.31): it is a person's decision, read apart from the queue, and `--revoke` withdraws it. Further limits (A-SPEC-794.32, A-SPEC-794.33):
27
+ - A decision names its request by id. A prefix is checked against every id the queue has seen, but a request filed after the command was typed is not among them; the decision line names the subject it acted on. The full id is exact.
28
+ - `--deny` leaves a live grant file usable; `--revoke` withdraws it.
29
+ - The agent's own shell can run the `approve` acts that do not grant: the gate does not refuse them. They are recorded under the OS user name, so a record does not show whether a person made it; separating them is 0.41's. With them it can close a request, remove a person's hold, put a question in a person's name, and withdraw a live grant. `approve` refuses its granting acts from a process it judges to be an agent's (A-SPEC-779.4), within the limits named under `lock recover` below; a grant the agent itself produced is not told apart from an operator's either (the first Known limitation above).
30
+ - A grant the agent itself produced is not told apart from an operator's: see the first limitation above (not a security boundary; root fix planned for 0.41).
31
+ - Queue rows that carry `gen`, `hv`, `instance`, `prev`, `prevCause`, `cause` or `legacy` are read as rows of an unreleased 0.40 development build. A later writer must not put these names on queue rows a 0.40 reader folds.
32
+ - A shell-kind request a development build filed, filed again, goes to this machine's refusal log and can be granted there; the development note counts it until that grant.
33
+ - The in-session approval form is refused while the running claude's version file has been removed by its updater: measured on a long session whose 2.1.310 image was gone. A restarted session attests.
34
+ - **Autonomous approval does not cover the spec-store paths (A-SPEC-792.31).** That stop is the shipped behaviour: under a full profile, spec staging in a form the gate recognises still asks for an approval (the staging limitation above), and a grant the agent itself produced is not told apart from an operator's (the first limitation above: not a security boundary). Other governance records stay in autonomous approval's scope, and the client gate is detection.
35
+ - **Under the full-autonomy profile an agent has no way to ask for a person's approval (planned for 0.41).** `spec_approve` seals at once whatever the spec's grade, so a sealed-contract amendment that must carry a human approval is sealed by `full-autonomy:*`. The planned repair is either a `requireHuman` flag on `spec_approve`, or forced HITL for sealed-contract amendments.
36
+ - **The server detector is report-only, so it is no boundary under any condition.** With direct pushes, write access alone can change or cancel it, and a same-uid forge admin can change its rules.
37
+ - **A grant spent by an allowed Bash or Write whose tool then fails, or which the user rejects, stays spent (A-SPEC-245.2, A-SPEC-245.4).** The PreToolUse hook settles grants at its final decision, after the plan-scope, stage, role and run-refusal passes and before the tool runs. A process that dies while holding a claim leaves a `.claimed.*` file, which covers nothing; `doctor` lists it.
38
+ - **The entity store, renumber and integration acts spend their grants after the store lock is released (A-SPEC-245.6, not in 0.40.0).** Two such acts running at once on one hand-written wildcard grant can both succeed. A minted grant is exact, so this needs a hand-written one.
39
+ - **Spending through `spendApprovals` detects what it cannot prevent (A-SPEC-245.11, A-SPEC-245.12).** An older writer that begins a new replica chain after the spend's last look at the ledger can still spend the same approval; the spend then finds it (`conflict`) or, when that chain cannot be read in time, says the spend is not confirmed single (`unconfirmed`), records `spend-conflict-detected` in words that tell the two apart, and runs no commit. Either way the approval is used. An older writer that writes a chain without its append lock is not seen.
40
+ - **Restart MCP servers after upgrading (A-SPEC-245.8, 245.9).** Grants and approvals now spend through `spendApprovals` under a workspace spend lock. A server still running the older code spends as before, under the limit above.
41
+ - **Holmes's git fails where a container or CI passes `safe.directory` through `GIT_CONFIG_*` (A-SPEC-792.43).** Holmes's git drops every inherited `GIT_*` variable, so it sees "dubious ownership" there. It fails closed: the act is not judged.
42
+ - **The staging rule does not read every shell expansion spelling of a git staging command (A-SPEC-792.40); the repair is planned for 0.41.**
43
+ - A spec change that arrives this way has taken no approval path. The Stop seam detects it afterwards, within its defined scope. The Stop seam is after-the-fact detection, not a boundary.
44
+ - Two related judgements wait with it: glob handling in the output-target write check, and a gap in the `.ax` mention pre-check.
45
+ - **BREAKING — user impact.** Editing `.gitattributes` or `.git/info/exclude`, and staging evidence in a form the gate recognises, now needs an approval.
46
+ - **A 0.39.0 install shows a grant with no time limit as `valid until 9999-12-31T23:59:59.999Z` until it is upgraded (A-SPEC-245.9 item 8).** From this release every line that reports a decided grant — `approve --grant`, `approve --watch`, `approve --status`, the session form's result (`approval_ask`) and `approval_status` — says `single use, until <time>` or `single use, no time limit`; a grant is spent by the act it allowed, and an expired one is reported `expired`.
47
+ - **`holmes-kit lock recover` is the operator's act: the CLI refuses it from an agent session, and the gate refuses its direct forms early (A-SPEC-245.9 item 7, A-SPEC-245.17 to 245.20).**
48
+ - **The firmer check is the CLI's, within the limits named below.** `holmes-kit lock recover` refuses to run when the inherited harness marker (CLAUDECODE, CLAUDE_CODE_ENTRYPOINT, CODEX_SANDBOX, an ANTIGRAVITY_ variable) or a harness among its parent processes points at an agent — the judgement `approve --grant`, `autonomy` and the run delegation use. A command that defeats one of the two signals is still refused; one that defeats both is not (named below). The parents are read with the system's `/bin/ps`, never one placed on `PATH`, and a parent chain longer than the walk refuses (A-SPEC-245.20).
49
+ - **The gate is early refusal.** It reads the command through its shell reading — wrappers, `sh -c` bodies, `eval`, grouping, quoting, package runners, a versioned package such as `npx @holmes-lab/holmes-kit@0.40.0`, options before `recover` read with the CLI's own flag parser, `xargs`/`parallel`, a relative `node index.js`, a `git -c alias.…='!holmes-kit …'` — and refuses the direct forms. Text that only names the act is not refused, apart from the `sed` case named below: it carries an advisory or is read as data.
50
+ - **Named limits:** the gate does not read interpreter source, package scripts, aliases or run-time words. The CLI's check stops an agent that does not detach from both of its signals: a process that detaches from the hook's view is not told apart from the owner's own background jobs (A-SPEC-245.22). A command run through a daemon or a multiplexer the operator started is not told apart from the operator either. On Windows, `powershell.exe`, which reads the parents there, is still found on `PATH`. A parent chain that loops, names itself as its parent, or cannot be read because `ps` failed refuses. A reused process id can lead the walk into another process's chain once the real parent has exited (POSIX rows carry no creation time), and on Windows a parent created after its child ends the walk as a person's (A-SPEC-779.6) (A-SPEC-245.23). The gate's early refusal of `sed` covers the forms it refused in 245.19; others are refused by the CLI only, and the early refusal can refuse `sed` data that names the act.
51
+ - **A refusal's code comes from the gate's own decision**, not from words the agent chose (A-SPEC-245.23, A-SPEC-245.24): every deny the gate, the run path and the dispatcher make names its `[holmes-refusal]` code where it is made, and a census test holds every deny site to it. An alias, hook or tool name, a path or a tool's output quoted in a refusal no longer changes its code or class (an approval request stays `approval.required`, needs_hitl); the run log and its stop count use the same code. Matching the refusal's words remains only for a reason that reaches the harness without a code. A new `evidence.missing` code (permanent) marks the pre-edit impact evidence gate's denial under `block`.
52
+ - **The early sed refusal does not fall below 0.39.x's on the recorded corpus (A-SPEC-245.24, A-SPEC-245.25, A-SPEC-245.27):** the verdicts of the 245.19 build on a 6,466-input corpus of sed commands that run the lock recover act are recorded in the repository (`scripts/sed-differential.js` records and compares them). On that corpus, no input that build refused early passes now, except one class of `s` commands (12 inputs). The claim covers the recorded corpus only, and random inputs find more. To keep the judgement from taking quadratic time, the early refusal reads only some `s` commands; this narrows what it detects, it does not widen it (A-SPEC-245.26). Other `sed` spellings are refused by the CLI only. **Frozen (A-SPEC-222.9):** the early refusal stays at the 245.19 baseline, and its expression changes only if the recorded fixture shows a regression. The firmer check is the CLI's. A failed `ps` or `lsof` read now refuses an operator act instead of passing it.
53
+ - **The CLI's refusal lines name their code too (A-SPEC-245.25):** `autonomy on`/`full`, the run delegation and `approve --grant` write `grant.operator-only`, `grant.in-use` or `approval.required` whatever `--scope` or path their message quotes, and a code that is not registered — or a refusal field left unset — is reported as `gate.unclassified` rather than matched by its words (A-SPEC-245.26). A run waits only on an approval request the gate filed, never on one quoted in a refusal's text; that wait and the lock-recover advisory both reach the hook every harness runs (A-SPEC-245.26).
54
+ - **A grant whose expiry is empty or not a date is reported expired (A-SPEC-245.18)** by `approval_status`, `approve --status` and every decision line.
55
+ - **A successor and a staging proof come only from trusted ledger events (A-SPEC-222.9).** This affects the code gate's anchor move, `spec_retire`'s after-the-fact record and its autonomous retirement, and autonomous staging's provenance proof. An event counts only when all three hold:
56
+ - its replica file is this writer's own, or one git tracks (with no repository, only the writer's own);
57
+ - its chain verifies;
58
+ - its actor is a tool (`holmes-kit`, `holmes-kit init`, `full-autonomy:*`), or it carries a person's authorization.
59
+
60
+ Two measured forms no longer pass, which does not make the ledger forgery-resistant (see "Residual risk" below): a line appended without its chain, and a new untracked `provenance.*.jsonl` that carries a chain of its own. Each used to move an anchor to any Y, and the second also used to prove a hand-written draft for staging. The refusal names the entries it ignored. A retired spec is judged as it was sealed, so a retired X that was never sealed or was edited after its seal goes to a person. **User impact:** a `spec-retired` row written as `unattributed` with no authorization no longer names a successor or proves a retirement. On this repository that is 11 rows: owner-approved retirements of sealed specs written before retirements recorded who decided them.
61
+
62
+ **Tightened (A-SPEC-222.10):**
63
+ - Another replica's rows count only as they stand in `HEAD`. A staged-only file, and rows appended after the commit, do not count.
64
+ - Autonomous staging proves only this writer's own ledger file. Staging another replica's file goes to a person.
65
+ - A retired spec's seal counts only when a trusted `spec-approved` event records `[id, digest]`, and an edit to a retired spec's sealed content or seal fields is refused.
66
+ - Every ledger reader that needs trust reads through the same port, held by a census: the spec seam, the install-manifest check, the test-scope baseline, triage evidence, the red-first aliases, grant spends and entity audits. An entity audit row that is not trusted is a conflict.
67
+ - An `unattested:` authorization, or one that does not name its row's actor, never counts.
68
+ - The constitution's ART-4 exit hint no longer offers a T retirement when the retired A-SPEC holds no seal.
69
+ - A run's own replica counts once its file is committed.
70
+
71
+ **Tightened (A-SPEC-222.12):**
72
+ - **The spec seam fails closed.** When this writer's chain does not verify, or the seam's baseline is only in rows that are not trusted, the seam reports a scan finding and writes nothing. Before, it re-baselined and explained a hand-written spec commit.
73
+ - **BREAKING: staging another replica's ledger file is a person's act.** `git add -A`, `git add .` and `git commit -a` that reach another replica's `provenance*.jsonl` are hard-hitl. The seam also reports such a file in the index or in a commit, at Stop and at push, unless a person's staging granted it.
74
+ - **BREAKING: a spec leaves or enters `outdated` only through the tools.** An edit that changes that status is refused.
75
+ - **ART-5 reads only trusted `spec-approved` rows.** A hand-written line no longer clears an unrecorded approval. A function that reads ledger files itself is held by the reader census.
76
+ - **One git read per commit.** Other replicas' HEAD blobs are read with one `git cat-file --batch`, shared with the Stop hook's rollback check. HEAD is resolved from packed refs and linked worktrees too.
77
+ - **An entity audit refused on an untrusted row names the replica file and the recovery:** a person commits it, or an old replica of this machine is committed or removed.
78
+
79
+ **Tightened (A-SPEC-222.13):**
80
+ - **A cut, emptied or deleted ledger no longer re-baselines the seam.** When this writer's ledger file is no longer an extension of its file in `HEAD`, the spec seam fails closed. This is the same judgement the Stop hook's rollback check makes. The seam also keeps a mark of its last event outside the ledger (`.ax/state/spec-seam-mark.json`), and a ledger that no longer holds that event fails closed too.
81
+ - **A HEAD that cannot be read is never "absent".** A failed git read is reported with that reason and is not remembered. A non-ASCII ledger is read at git's byte offsets, and paths are NFC-normalised. The seam's refusal names its recovery by reason.
82
+ - **A new spec file written as `outdated` is refused,** like an edit that moves a spec into or out of that status.
83
+ - **One `git cat-file --batch` per commit** serves the port, the seam and the Stop rollback check, including this writer's own file when it was deleted. A test holds that count from git's argument log.
84
+
85
+ **Cleaned up, with limits named and no new defence (A-SPEC-222.14):**
86
+ - **The seam's mark is kept per branch.** Before, a baseline left on a feat branch with its ledger committed failed the seam closed after `git checkout main`, with no spec change, and push was refused.
87
+ - The key is git's own answer: the ref `HEAD` names, or `detached:<commit>`. A project in a subdirectory of its repository, a reftable repository and each detached commit each get their own key (A-SPEC-222.15).
88
+ - A 222.13 mark moves to the current branch when the ledger holds its row, and is dropped when it does not.
89
+ - Keys of deleted branches are dropped once the map holds 16.
90
+ - **A scan finding at Stop or push names its reason only (A-SPEC-222.15).** Unstage or reset advice is given only for a spec change that entered the index or a commit. The mark's recovery removes this branch's entry, not the file.
91
+ - **A `HEAD` that git cannot read is reported as "retry when git answers"**, not as a shortened ledger. Before, its restore advice dropped uncommitted rows.
92
+ - **Recovery names this writer's own file, not the ledger directory.** Restoring the directory dropped other files' uncommitted rows, and the mark refusal followed it. The seam's text is no longer cut at 120 characters.
93
+ - **An outdated spec whose YAML does not parse can be repaired, back to its recorded seal only (A-SPEC-222.15).** A file counts as new only when nothing is on disk. The status, `superseded_by` and `replaces` of a file that does not parse are read from its first frontmatter block, and a trailing `# comment` is allowed there. The repaired result must parse, and its body digest must equal its `approved_digest` and a seal that a trusted `spec-approved` event records. A rewrite with a recomputed digest is refused. This holds with or without a successor.
94
+ - **Limits, as measured — tamper evidence, not prevention:**
95
+ - The local ledger, the mark and the seam detect mistakes and ordinary tool paths. Code running as the same user can defeat them together. The real defence is a key the agent cannot read, planned for 0.41.
96
+ - Changes to a branch's identity and edits to the mark itself are not detected, nor are the parent digests of a repaired retired spec compared with its seal.
97
+ - The mark is checked only while the replica id is unchanged.
98
+ - After `holmes-kit ledger rechain` the mark's hash no longer matches, and the seam fails closed until a person removes this branch's entry from `.ax/state/spec-seam-mark.json`.
99
+ - **Recovery, by the reason the seam names:**
100
+ - *`HEAD` could not be read:* retry. Nothing needs restoring.
101
+ - *This writer's chain does not verify:* review the uncommitted ledger first, because it is re-chained whole. Then run `holmes-kit ledger rechain` from a terminal, and a person removes this branch's entry from `.ax/state/spec-seam-mark.json`.
102
+ - *The ledger is shorter than `HEAD` holds it:* restore this writer's own file only (`git checkout -- .ax/ledger/provenance.<replica>.jsonl`). Rows `HEAD` does not hold are lost. If the mark is named next, a person who reviewed the ledger removes this branch's entry from `.ax/state/spec-seam-mark.json`.
103
+ - *This writer's replica id could not be read:* retry. Nothing needs restoring.
104
+ - *The ledger no longer holds the seam's last record on this branch:* if the ledger was cut, restore this writer's own file. After a review, a rechain or another rewrite you made, a person removes the mark.
105
+ - *The baseline is only in rows that are not trusted:* a replica id change (a new host name) leaves this while the old replica's seam rows are uncommitted. A scan finding is reported each turn until a person commits the old replica's ledger file. That is a person's act, because it stages another replica's file.
106
+
107
+ **Legacy seals and other limits:**
108
+ - A spec sealed before seals were recorded is no basis for a successor. Migrate it with `spec_unseal`, then `spec_approve` (a person's approval).
109
+ - Renumber's prose rewrite of a retired spec needs `spec_unseal` first.
110
+
111
+ **Residual risk:** with no ledger key set, code running as the same user can append a well-formed row to this writer's own replica file. A commit can also put a forged replica into `HEAD`; the seam reports it, but nothing prevents it. A signing key is planned for 0.41.
112
+
113
+ ### Changed
114
+ - **Release verification refuses a listed name inside a longer word, and texts say what the code does (A-SPEC-794.59).** On the publish path a listed name found anywhere in a packed file, joined into an identifier or not, refuses the publish, and a missing list's refusal names the path it looked for. 0.40.0 refuses any exception line: a non-empty line in the exception file next to the name list (`<list>.allow`) refuses the publish, and a missing file or one of blank or `#` comment lines only has no effect; exceptions are planned for 0.41 (A-SPEC-794.62, replacing the exception rules of 794.59–794.61, which failed open). A list whose lines name nothing is no list. The development test keeps its word rule and prints what the publish path would refuse. Release verification also refuses when README.md's attest region has not changed since the previous release. `approve --status` prints the full profile's meaning before its scope, so a long scope does not cut it, and a Windows path keeps single backslashes. `--help` states `init`'s default as the code does: at a terminal a menu with every harness checked, otherwise claude and antigravity. `doctor`'s untracked-ledger fix names staging the files first. README's English-surface line names what is not yet English.
115
+ - **The full profile is named where people look (A-SPEC-794.55, 794.57).** `--help` and `autonomy` usage name `autonomy full` and its flags. `approve --status` (through its screen-safe field) and `doctor` show the profile covering the workspace, and the posture line beside it no longer says each spec waits for a grant. A spec staging refusal leads with the person's approval route, in its prose and in its structured first step. Under a full profile, a staging that sweeps changed spec files names the order that works: the person stages the spec files by their paths, then the same sweep no longer reaches them. Product files are reported as `(staged)` by the command or `(already in the index)`. `--refusals` names how many of its rows are still open. No verdict changes.
116
+ - **The published package names no consumer workspace and no personal host (A-SPEC-794.56, 794.57).** Research corpora are named by environment variables: `HOLMES_CONSUMER_CORPUS` and `HOLMES_GEMINI_CLI_CORPUS` point the replay benchmarks at a checkout, and a test that finds none prints that it did not check it. A test reads the files `npm pack` would publish against a name list kept outside the repository (`HOLMES_PRIVATE_NAMES`, or `~/.holmes/private-names.txt`); without a list it prints that it checked nothing. Release verification refuses to publish without that list, with a listed name in a packed file, with a pack that holds no `dist/`, or with a packed file it cannot read (A-SPEC-794.58); after its build it removes every `dist` file the build did not write, so a file whose source is gone does not ship and `dist` is never empty while it builds. An evaluation record that held a consumer's commit subjects and paths no longer ships; only its test reads it. **BREAKING (deep imports only):** the replay corpus export for the consumer corpus is renamed `CONSUMER_CORPUS`.
117
+ - **BREAKING: under a full profile, push and publish follow the profile's flags (A-SPEC-794.49 to 794.53).** REQ-792 said so since 0.38.0, and the flags decided only force pushes. A `git push` without `--allow-push` and an `npm publish` without `--allow-publish`, on their own, in a subshell, a brace group, after `then` or `do`, or across a line continuation, are now refused with a route to ask the owner or to issue the profile again, under the code `full-autonomy.refused`; no request is filed and a grant does not lift it. A help or dry-run form passes, except of a force push while the push flag is off. Issuing a profile again replaces every flag, so name each one it should keep: `--no-architecture` is not remembered. Outside a profile the flag judgement changes nothing.
118
+ - **The push spec-change check (A-SPEC-792.14) reads a push written across a line continuation, with or without a profile (A-SPEC-794.52, 794.53).** Comments and here-document bodies are left out first, so a push named only in a comment no longer triggers it. A backslash before a carriage return is not a continuation, as in bash. The remediation of `full-autonomy.refused` now says that nothing was filed, not that no person decides. A profile issued without the flags now stops an agent's push: issue it again with the flag, or push yourself.
119
+ - **The in-session approval form opens for a session started through Claude Code's native version path (A-SPEC-732.1).**
120
+ - **Recognised now.** A claude process whose argv0 or executable is `…/claude/versions/<version>` attests as the claude harness. Before, it was "not a harness" and no approval form was shown (measured on a background session).
121
+ - The path counts only when it sits directly inside the native install directory: `$XDG_DATA_HOME/claude/versions`, or `~/.local/share/claude/versions`.
122
+ - A version path anywhere else is still not a harness.
123
+ - **Refused now.** The image is also inspected: an empty file, a file without an execute bit (POSIX), or a file that is not regular does not attest.
124
+ - **Clearer refusals.** "could not be read" always names its cause.
125
+ - **An agent under a version-path claude session is no longer taken for the operator (A-SPEC-732.2).**
126
+ - **Refused now.** The operator acts (grant, the approval screens, lock recover) and review independence count a process `…/claude/versions/<version>` among the parents as the claude harness, wherever that path lies. Before, with the environment markers removed and no parent named `claude`, such a chain read as a person's (reproduced on a synthetic chain).
127
+ - **Stricter attestation.** An image on the version layout attests only when its real path lies directly inside an install directory. A copy at `<anywhere>/claude/versions/<n>` no longer attests, whatever argv0 says.
128
+ - Install directories are compared by realpath, so a symlinked `XDG_DATA_HOME` works.
129
+ - On Windows the comparison ignores case, decided by the platform rather than by the path's shape.
130
+ - **Version grammar.** A version is a semver version: `2.1.310-beta.1+build.5` counts, and `2.1`, `02.1.0` and `2.1.0.1` do not.
131
+ - **Harness attestation hardening (A-SPEC-732.5).**
132
+ - **BREAKING — changed.** A node launcher that carries an option other than `--no-warnings`, `--no-deprecation` or `--enable-source-maps` is no longer taken for the registered dispatcher. For example, `--env-file` can preload code through NODE_OPTIONS, and `--inspect` opens a debugger. The in-session approval form is then not offered, and the request goes to the operator queue.
133
+ - **Changed.** A server whose home directory is not an absolute path attests nothing.
134
+ - **Tests.** The server's wiring is now held by a behaviour test.
135
+ - **The MCP server's harness attestation is built in one entry that tests reach (A-SPEC-732.4).** No behaviour changes.
136
+ - The install directories, the runtime dispatcher and the walk depth were held by no test.
137
+ - The operator walk's process lookup now uses the walk's own rule. The walk judges by name, so no judgement changed.
138
+ - **Server detector wiring judgement (A-SPEC-792.50).**
139
+ - **Fixed.** An environment assignment naming `HOLMES_*` or `CLAUDE_PROJECT_DIR` in an array element (an `args` token, an `sh -c` string) is now non-canonical, as it already was as an object member value.
140
+ - **Fixed.** A parsed value that is not text (an object where a command or argument is read) is judged by the grammar instead of throwing a TypeError, so the event names the breach.
141
+ - **A worktree pointer to the main checkout's own `.git` reads that checkout again, and the checkout forgeries are named as limits (A-SPEC-102.32).**
142
+ - **Fixed (a regression of 102.31).** A worktree whose `.git` pointer names the main checkout's own `.git` directory (no `commondir`) read the main checkout's catalog additions before 102.31; 102.31 read the worktree as its own main checkout, dropped them, and `holmes-kit doctor` said PASS. The gitdir is again its own common directory when `commondir` is absent, and the back reference is checked only when `commondir` exists.
143
+ - **Fixed.** A main-side nested project whose `.ax` cannot be stat'ed was dropped silently with doctor at PASS. Only an absent `.ax` is no project now; any other error refuses the act and makes doctor's row WARN.
144
+ - **Fixed.** `lock recover` parsed the guard's sentence for the harness, so a path could change the cause it showed. The guard now returns the harness apart from its text (`operatorActVerdict`).
145
+ - **Corrected.** The runs' own reading of a `.git` pointer (`mainCheckoutOf`, used by the run gates, the stop and push gates and the review verdicts) was described as "not a worktree" for a pointer it cannot use. It is the reading of before 102.30: a pointer it cannot open throws (EACCES), and a pointer it reads but cannot follow, or a `commondir` it cannot read (a link), answers the worktree as its own main checkout. Each of its 19 callers now says in a comment what that does there.
146
+ - **Known limitations (measured).**
147
+ - An agent of the same user that rewrites a worktree's `.git` can make it read as its own main checkout, or make a directory it chose the main checkout, with doctor at PASS (A-SPEC-102.33). The catalog and the run subcommands then read there, so the run gates are off for such a worktree (read from the code).
148
+ - A project's and a user's catalog additions can be avoided by an agent of the same user that edits files. Only the default markers cannot be removed by a file. The root fix compares against a record the agent cannot write, and is planned for 0.41.
149
+ - **A rewritten worktree checkout refuses, and every project around an act is read (A-SPEC-102.31).**
150
+ - **Fixed.** A worktree whose `.git` was rewritten was read as "not a worktree", so the main checkout's catalog additions were dropped and `holmes-kit doctor` said PASS. The rewrites this slice names now refuse the act and make doctor's row WARN, and so does a worktree whose entry under `<common>/worktrees/` does not point back at it. See the 102.32 limits above; the root fix compares against a record the agent cannot write.
151
+ - **Fixed (a regression of 102.30).** Inside a nested project (`pkg/.ax`) only the nearest project was read, so `cd pkg` stepped around the outer project's additions. Every project from the act's directory up to the checkout top is now read, both in the worktree and at the same place under the main checkout.
152
+ - **Changed.** What a project is has one rule: `.ax` is a directory, or a link to one. `resolveProjectRoot` and the autonomy scope search both use it. A regular file named `.ax` is no project, and the search now finds `.AX` (on a case-folding disk) and a linked `.ax`.
153
+ - **Changed.** A root that cannot be resolved has its own sentence and remedy, the same as doctor's. Before, it was worded as "runs under an agent harness". Text escaping now covers every Unicode control, format and separator character (soft hyphen, BOM, tag characters). The asking root of the autonomy acts and the usage text follow the one act root.
154
+ - **Fixed (a regression of 102.30).** The runs' `mainCheckoutOf` reads a linked or oversized `.git` pointer as before 102.30, instead of throwing.
155
+ - **Known limitations.** `autonomy full` refuses a scope deeper than 16 levels, wider than 10,000 directories, or holding a directory it cannot read; `--scope ~` is in practice refused on macOS (protected folders). Verdicts recorded by 102.29 carry `harnessSource` (a string), and later ones carry `harnessSources` (a list); nothing in the package reads either field.
156
+ - **The operator acts are judged by the project they act on, and a project that cannot be found refuses (A-SPEC-102.30).**
157
+ - **Fixed (a regression of 102.29).** With no `--target`, `approve` and `lock recover` act on the working directory's project, but their guard was handed no root. So `approve --grant` run inside a project issued a grant without that project's catalog additions. One function now decides the act's root (`--target`, else the working directory's `.ax` project), and the queue and the guard both use it. The autonomy acts use it too.
158
+ - **Fixed.** `autonomy full --scope <a directory above a project>` skipped the additions of the projects it covers. It is now judged by the union of the scope's project, the working directory's project and every `.ax` project under the scope. A scope too large to search (16 levels or 10,000 directories) or holding a directory that cannot be read is refused. The search does not enter `.git`, `node_modules` or `.ax`, and does not follow links.
159
+ - **Fixed.** A root whose project could not be resolved dropped the project's additions with no signal, and `holmes-kit doctor` said PASS. The act is now refused with the path and the error, and doctor's row is WARN.
160
+ - **Fixed.** The user file was found through `$HOME`, which the caller chooses. It is now read from both `$HOME` and the home in the account's passwd entry.
161
+ - **Changed.**
162
+ - A project nested inside a repository (`pkg/.ax`) has its file read, in a worktree too.
163
+ - Escaping now covers bidi controls, zero-width marks, line separators and an environment variable's name, in refusals, verdicts and doctor.
164
+ - A default marker or prefix never names a file as its source. Every file that adds a name is listed, and a verdict records them as `harnessSources`.
165
+ - The `.git` pointer, `commondir` and the catalog files are read on one descriptor, checked by `fstat`.
166
+ - **The harness catalog is read from the act's own project, once per judgement (A-SPEC-102.29).**
167
+ - **Fixed.** `recordVerdict` read its marker from the verdict root's catalog, but walked its ancestors with the working directory's. Both now use one catalog, resolved once from the root.
168
+ - **Fixed.** The operator guard read the catalog of the project in the working directory, so an act run from elsewhere stepped around that project's additions. The guard now reads the project of the act itself: `approve --target`, `lock recover --target`, and the autonomy acts' own project. (102.29 then judged an act without `--target` by the defaults and the account's file only; 102.30 corrected this.)
169
+ - **Changed.**
170
+ - The judgements take their catalog from the caller; no judgement reads the working directory.
171
+ - A refusal names the file of an added prefix too, and never names a file for a built-in harness.
172
+ - The file that added a marker is recorded with a verdict (`harnessSource`, a list `harnessSources` from 102.30).
173
+ - Control characters in a refused file's key or path are escaped in doctor and in the refusal.
174
+ - doctor's row is computed inside its own error handling.
175
+ - A worktree's `commondir` is read only when it is a regular file.
176
+ - **The harness catalog reaches the live judgement (A-SPEC-102.28).**
177
+ - **Fixed.** The project's catalog file (`.ax/harness-catalog.json`) was never read by the live operator judgement or by `recordVerdict`, though 102.27 described it. It is now read from the main checkout of the working directory, or of the verdict's root.
178
+ - **New.** A refusal caused by an added marker or name names the file that added it, and `holmes-kit doctor` has a `harness catalog` row that warns about a refused file and its reason. `OPENCODE_SESSION_ID` is a default marker.
179
+ - **The MCP server's operating lookups are pinned, and the 732.11 texts are corrected (A-SPEC-732.12).** No judgement changes.
180
+ - **Tests.** The paths operation actually takes are pinned: `serverAttestation` with no lookup maker and `operatorLookup()` with its default, with `child_process.spawnSync` replaced by a module mock. Every ps call gets an empty environment, on both paths (lsof, which reads the image, is given the server's environment), an empty trailing argument still refuses the dispatcher with the walk stopping at the node row, and the operator lookup keeps a trailing blank. The case that builds a POSIX home runs on POSIX only (A-SPEC-732.13: on Windows its `C:\` home failed the darwin rule). Before, only an injected maker was pinned, so a trimming default maker, an environment handed to ps, or a trimming operator spawn left every test green.
181
+ - **Known limitations (measured).** The 732.11 limitation below holds for any node-family name.
182
+ - **Corrected.** On macOS `ps -o comm=` prints argv0, which the launcher chooses, and on Linux the task name, which the process can set (PR_SET_NAME); the comments no longer call it the executable path. The 732.11 entry below now says what was skipped, and that the removed title match changed no judgement.
183
+ - The attestation work pauses here. How strong its proof must be is 0.41's.
184
+ - **The MCP server's attestation: comments, tests and limits brought to what was measured (A-SPEC-732.11).** No judgement changes.
185
+ - **Known limitations (measured).** A process that chooses its own argv0 can show as the dispatcher. It is the same class as the shell-tool limitation above. The root fix (reading the arguments from the kernel) is planned for 0.41 with it. On Linux, whether procps escapes control characters in the arguments is not measured.
186
+ - **Removed, no judgement change.** isLauncher's separate `npm exec` title match is gone. The name check it duplicated decides the same, as before: ` npx …` and ` npm exec …` were and are launchers alike, and a test pins it (equivalence measured: 64 named inputs, 600,000 random ones and 9 real children, no difference).
187
+ - **Tests.** These are now pinned: the spawn the live lookup receives, the line-end cases each on their own, and the harness-catalog cases on every platform. Skipped off POSIX or as root: the chmod 000 and mkfifo assertions, and the default-walk wiring case, which reads the parent's name with /bin/ps.
188
+ - **The MCP server's attestation: what ps cannot show, as measured (A-SPEC-732.10).**
189
+ - **Changed.** The process lookup removes every trailing line end, and nothing else. A `\r\n\r\n` from CIM no longer refuses a normal launch.
190
+ - **Tests.** These forms are now pinned: a trailing non-breaking space on Windows (an argument to the C runtime), an empty argv0 and a double space in a ps line, and fake ps text reaching `serverAttestation` through `systemProcLookup`.
191
+ - **Known limitations (measured).**
192
+ - What ps shows is not what runs: on macOS a process can make ps show a command line of its choosing. This is the same class as the shell-tool limitation above: an agent's own process under the harness. The root fix reads the arguments from the kernel and is planned for 0.41.
193
+ - The dispatcher hop does not check the executable image.
194
+ - A home path holding a space, or holding non-ASCII characters, gives no in-session approval: the space splits the script's path, and ps run with an empty environment prints non-ASCII as `M-…`. Both fail closed.
195
+ - On Linux, the single space procps prints after the pid column is assumed, not measured.
196
+ - **The MCP server's attestation: the process lookup keeps the text it reads (A-SPEC-732.9).**
197
+ - **Fixed (measured).** An empty or white-space argument after the script attested, because the lookup trimmed trailing spaces from what `ps` printed; the 732.8 limitation had said it was refused. The lookup now removes the line end only.
198
+ - **Fixed (from the C runtime's documented rule; unverified on Windows).** A Windows command line that starts with white space has an empty argv0, and node.exe then runs the next word. The lookup and the program-name reader dropped that space, so it was walked through as the dispatcher. It is now refused.
199
+ - **Tests.** These forms are now pinned: the default Windows install (`"C:\Program Files\nodejs\node.exe" <script>`), a quote inside argv0 (`"C:\node"x.exe` is the program `nodex`), an option after the script, a registry link alone, and the Windows backslash rules one by one.
200
+ - **Not changed.** The launcher check (`npm exec`, `npx`, a `node` whose arguments hold `bin/holmes-mcp`) still steps over a launcher without verifying it. It is held together with the shell-tool limitation under Known limitations, for 0.41.
201
+ - **The MCP server's attestation: one reader of a program name, and the dispatcher script is the last word (A-SPEC-732.8).**
202
+ - **Fixed (a regression of 732.7).** On Windows, argv0 was read with the argument rule's backslash escapes, so a command line that runs another file could be walked through as the dispatcher. argv0 is now read on every platform by the program-name rule, as the C runtime reads it: quotes toggle and backslashes are literal.
203
+ - **Fixed.** A word after the dispatcher script is no longer walked through. The runtime binding launches the script alone.
204
+ - **Changed.** `ps` is asked for the whole command line (`-ww`). An allowlisted node option must match exactly (`--no-warnings=x` is refused).
205
+ - **The MCP server's attestation: empty and white-space arguments before the script are refused (A-SPEC-732.7).**
206
+ - **Fixed (reproduced with a real node).** `ps` joins argv with single spaces, so an empty or white-space argument before the script was read away and the command walked through as the registered dispatcher. The words are now split on single spaces, so that argument is the word read as the script, and the verifier refuses it.
207
+ - **Fixed.** On Windows, the command line is now read by CommandLineToArgvW's rules: backslashes before a quote, `""` inside quotes. A single quote is an ordinary character, as the C runtime keeps it, so `node '<script>'` is no dispatcher.
208
+ - **Known limitations (after A-SPEC-732.9).**
209
+ - Empty and white-space arguments before or after the script, a word after the script, and a single argument holding a space (shown as two words) are refused. Before 732.9, the lookup trimmed away an empty or white-space argument after the script.
210
+ - The dispatcher's environment is not visible in `ps` and is not judged. The root fix reads it from the kernel and is left for later.
211
+ - argv0 and the name a process shows are chosen by whoever launches it.
212
+ - **The operator judgement knows cursor-agent and opencode, from a harness catalog (A-SPEC-102.27).**
213
+ - **Fixed.** An operator act (grant, autonomy, lock recover, review independence) is now refused in a shell started by cursor-agent or opencode. Both are recognised by their environment markers (`CURSOR_AGENT`, `OPENCODE`, and `AI_AGENT`, which Claude Code sets too) and by their process among the parents (`opencode`, or `cursor-agent` and its `cursor-agent/versions/…/index.js` layout). Before, such a shell was judged a person's whenever the TTY check let it through.
214
+ - **New.** The markers and agent names live in a harness catalog the package holds. A user (`~/.holmes/harness-catalog.json`) or a project (`.ax/harness-catalog.json`) may only add to it, with `{"add": {"markers": [...], "markerPrefixes": [...], "ancestors": [...]}}`. A file that tries to remove or replace a default, or holds a malformed name, is refused whole.
215
+ - `AGENT=1` is deliberately not a marker. Other tools set it, so a person's terminal could inherit it.
216
+ - **Known limitations.** The two CLIs' markers and layouts come from their published package and source (cursor-agent 2026.10.22, opencode dev 822594b9); they were not measured on an install. An agent can unset an environment marker in its own shell, so a marker counts only beside the parent-process check, and that check too is passed by a process that detaches from the hook's view (A-SPEC-245.22).
217
+ - **The MCP server's attestation: quotes are not read off POSIX process arguments, and the dead defaults are removed (A-SPEC-732.6).**
218
+ - **Fixed.** `ps` prints argv without quotes, but the walk read them as quotes and stripped them, so what the verifier checked was not what node ran. Quotes are now read only on Windows, where CIM prints them. Elsewhere a quoted script word is not absolute and is no dispatcher.
219
+ - **Changed.** `attestHarness` and `systemProcLookup` take their install rule from the caller. Neither builds a default one any more; only tests used it.
220
+ - **Tests.** These are now held by tests: a false or throwing attestation, the env before load, the default platform reaching the lookup, the allowlist of node options, and the elicit gate.
221
+ - **Known limitation.** The dispatcher process's own environment (NODE_OPTIONS and the like) is not visible in `ps` and is not judged.
222
+ - **The approval queue keeps its 0.39 behaviour in 0.40.0 (A-SPEC-794.30).** The work on generation cycles (A-SPEC-794.1, 794.8 to 794.29) is not in this release. The queue's redesign moves to 0.41, together with a record the agent cannot write.
223
+ - **Breaking (A-SPEC-794.33).** `approve --grant|--deny|--ask|--withdraw` take an id or a unique id prefix only. A list number is refused, and the refusal names the id at that row now: a number names whatever row holds it when the command runs, and the agent can move rows (close a request above it, file a new one), so `--grant 2` could grant a request no one read. There is no `<id>#<gen>` reference and no cycle id in the queue rows this version writes.
224
+ - `approve --list` prints requests in filing order, with requests idle past 24 hours folded out; `[n]` marks a row for reading only.
225
+ - Kept: the nonce spend-kind table, the request lock and instance id skeleton, the operator acts' act root (A-SPEC-102.29 to 102.32) and the attestation work (A-SPEC-732.x).
226
+ - **Changed (A-SPEC-794.31, A-SPEC-794.32).** Queue rows that unreleased 0.40 development builds wrote carry any of `gen`, `hv`, `instance`, `prev`, `prevCause`, `cause` or `legacy`.
227
+ - Such a request is not listed and cannot be granted or held, from the CLI or the session form; a person may deny it by its id and its filer may withdraw it (below). The surface says it was filed by an unreleased 0.40 development build and that the agent's next attempt files it again.
228
+ - `approve --list`, `--status` and the `--watch` header end with a count of such requests.
229
+ - The next filing of the act is a plain request, decided as usual.
230
+ - Such a build's decisions (grant, denial, revocation, withdrawal, spend) are a person's and are applied, so a live grant it wrote is listed and can be revoked.
231
+ - Its legacy closing (`superseded`, `legacy: true`) closes the plain request it superseded.
232
+ - Its holds change nothing. A person's own hold on such a request is kept, and the agent's next attempt files the request again, pending with that hold (A-SPEC-794.33).
233
+ - A person may deny such a request by its id, and the run or session that filed it may withdraw it; neither row is a grant (A-SPEC-794.33).
234
+ - **Fixed (A-SPEC-794.33).**
235
+ - Every screen folds alike: `--status`, `--watch` and the interactive screen fold requests idle past the window as `--list` does. `--stale-hours` takes a number ≥ 0 and refuses anything else; `--all` and `--stale-hours` beside a decision flag are refused.
236
+ - The `--target` in a pasted hint is single-quoted (PowerShell-literal on Windows) unless the path is plain characters, so pasting it runs nothing.
237
+ - `--revoke` finds a grant by its request id or its file name, by a prefix of eight or more characters, by a claimed copy and as a symbolic link, and prints what it names screen-safe. A queue `consumed` row no longer blocks revoking a grant whose file is still there.
238
+ - `approval_status` reports a granted request with no grant file as `unusable`, not "call spec_approve now".
239
+ - A person's hold lasts until a decision, whatever the row order; a held request with nothing pending is filed again by the next attempt, so it can be decided.
240
+ - A prefix that names several requests is reported as ambiguous, development-build ones included; two or more development-build matches are named in words.
241
+ - **BREAKING:** a shell command that builds a path into `.ax` while it runs is judged, over the pipelines that path reaches, by the same not-a-read rule as one that names a protected `.ax` path (A-SPEC-794.34, 794.35; it replaces 794.33's narrower rule). Comments, here-document bodies and literal message text do not count when the whole command was read with certainty and nothing in it runs text; otherwise, and past a bound on its length, the command is judged whole with a comment or a body in it counting; past a bound on stages it is judged whole without them. Either way the refusal says so and names removing the `.ax` mention or splitting the command first, in its text and its structured remediation; inside `.ax` it names the command that leaves it; a command that only mentions a protected path is told to leave the mention out (A-SPEC-794.38 to 794.42). Inner programs nested past a bound count as building a path. That has an intended cost on everyday commands that name `.ax` in such a command: a note written by a here-document before a script run by its path, a commit through a here-document beside a path ending in `/sh`, and a message with a quote inside `${…}`; the same commands without `.ax` pass. Replaying 1,000 commands agents really wrote against 0.39's rules on the real hook, two samples drawn from the growing transcripts gave 1 and 4 newly refused (0.1% and 0.4%): a loop with `gh api` over a `.ax` path in both, and in the second, three that change into `.ax` and loop or chain reads. It newly refuses, beside forged writes: a word that spells `.ax/` and completes the path with an expansion; a command that builds a path into `.ax` beside something the read allowlist does not know, even when that write lands elsewhere; and a command that changes into `.ax` and then runs something that is not a read, a subshell's `cd` included. A project reached through a directory named like the store counts as inside that store (A-SPEC-191), so an absolute path to it names the store. This rule prevents accidents. It narrows the first limitation above; it does not remove it, and its resistance to forgery has not been verified (A-SPEC-794.37).
242
+ - Every grant file beyond a request's own exact grant is named by `--list` and shown by `--status`, with its scope, whether it covers an act now and a word to revoke it; `--revoke` removes a request's files, then asks the resolver again and fails, naming the file, while another grant still covers the act; a granted request's state on `approval_status` and `--status` is what the resolver says of its act now (`claimed` while a live process holds it; `unusable` when nothing covers it, naming `doctor` when a process that ended left its claim); a decision prefix needs eight characters; the decision line and `--list` name the subject digest the id carries; `--stale-hours` refuses a value that is not a finite number (A-SPEC-794.34, 794.35).
243
+ - The fold's word is now idle, not expired: `[idle]` and "folded as idle (…, still pending)" on `--list`, `--status` and `--watch`, since such a request is still pending and can be decided; the refusal log does not fold, and the `--all` help says so. `--status` carries the refusal footer `--list` carries; `asked by` names the MCP server that filed a request; a withdrawal refused because the filing session is gone names the operator's denial as the next act; `approval_status` given a request id says it takes a spec id and where a request is seen (A-SPEC-794.40, 794.41).
244
+ - `holmes-kit --help` names `HOLMES_SKIP_MODEL_INSTALL=1` under `init`.
245
+ - **Fixed (A-SPEC-794.32).**
246
+ - `approve` accepts `--all` and `--stale-hours <h>` again. A queue holding only requests idle past 24 hours prints their count.
247
+ - The non-TTY hint names `--target` on every command.
248
+ - The top-level help no longer names `<id>#<gen>`.
249
+ - A reference that names a decidable request is no longer refused because a development-build id shares its prefix.
250
+ - `--revoke` finds a grant whose `granted` row is unreadable, by its grant file.
251
+ - A grant-file rename failure no longer says "run this again", which then failed.
252
+ - **Attestation (A-SPEC-732.3).** `attestHarness` accepts an `InstalledRule` as `options.rule`, so its directories and the lookup's are one value. The operator judgement's two live seams are now held by tests through them.
253
+ - The MCP server builds that one rule (`liveAttestation`) and hands it to the process lookup and to the walk.
254
+ - The walk reads its platform from the rule only.
255
+ - **Approval queue consistency: spend kinds (A-SPEC-794.4):**
256
+ - Every reader and writer of nonce spends and revocations names the ledger kind through one namespace table (`governance/spend-kinds.ts`). A census test holds that no other source spells it.
257
+ - The spend-facts cache is now `.ax/state/ledger-facts.v2.json`. An older holmes keeps its own `ledger-facts.json`, and the two never rewrite each other.
258
+ - `risk-gate`'s single-file `isNonceConsumed`, which had no production caller and read the raw nonce in one chain only, is removed.
259
+ - A runtime-binding plan now sees a request spent under an `.rN` nonce, after its first nonce was revoked.
260
+ - The decision screen's text renderer moved to `project/screen-text.ts` (`cli/screen-safe.ts` re-exports it), so no governance module imports the CLI layer. A test holds this transitively.
261
+ - **Approval queue consistency: the moved renderer (A-SPEC-794.5):**
262
+ - The moved renderer's source holds its `\u` escapes again; the move had decoded them into invisible characters. A census test keeps invisible and odd-space code points out of the renderer's source.
263
+ - The spend port refuses a row whose kind is not its namespace's (`SpendKindMismatch`).
264
+ - The CLI's fresh nonce and runtime-binding's "ever spent" use one nonce walk, which reads the ledger once.
265
+ - The import and spend-kind censuses read the TypeScript AST: side-effect imports, `.js` specifiers and template literals included.
266
+ - **BREAKING (deep imports only):** `dist/holmes/guardrail/risk-gate` no longer exports `isNonceConsumed`. Use the ledger store's `isNonceConsumed`.
267
+ - The v1 cache `.ax/state/ledger-facts.json` can be removed by hand once no older holmes runs in the workspace.
268
+ - **BREAKING: run start judges what wiring launches, not whether it names holmes (A-SPEC-774.30).**
269
+ - `mcp` passes only for holmes-kit's own MCP entry: `node <pkg>/bin/holmes-mcp.js` or `dist/holmes/mcp/server.js` inside a `@holmes-lab/holmes-kit` package, an npx pinned to the package, or the `holmes-mcp` bin on PATH (version unreadable).
270
+ - `gate` passes only when a PreToolUse hook and a Stop hook each run an existing script inside such a package.
271
+ - Wiring that only names holmes, such as `command: holmes-kit` or a `settings.json` holding the word, now fails run start.
272
+ - **BREAKING: agy run start is refused until agy's loading of a linked worktree's `.agents` is measured (A-SPEC-774.31).** `--provision` writes nothing for agy, and the gate check fails naming the gap.
273
+ - **The author of a reviewed range is the run that made its commits (A-SPEC-102.11).**
274
+ - `run stop` records the run's authored commits to `.ax/reviews/authors.jsonl`: reflog entries since start that made a commit, plus `base..HEAD` off every branch.
275
+ - Authors are matched over `base..head` by commit and by stable patch-id, so a rebase keeps them.
276
+ - A review run of an author's engine is refused as self-review.
277
+ - A review run sitting on a stopped run's head is no longer its author, so another engine's independent pass can be recorded.
278
+
279
+ ### Added
280
+ - **Server admission detector: the pure core (A-SPEC-792.50, design draft A-SPEC-792.37).** **Nothing calls it in 0.40.0**: no workflow, report or audit ships with it.
281
+ - `src/holmes/admission/core/`: given a push or pull-request event and git objects, it gives each protected change a verdict — `admit`, `needs-signature`, `refused`, or `incomplete` with a reason. The conclusion is always neutral.
282
+ - It judges by the state-pair table (rows 1–16), a force push on both its introduction and rollback axes, and branch creation with no configuration.
283
+ - It reads Holmes's own `parseSpec` and `specDigest`, adds ten stricter YAML and encoding pre-checks, and its parent and relation rules are no looser than the spec validator's.
284
+ - Ledgers and the queue are checked as streamed appends with no size cap. A union merge is refused with its own reason and remedy (only provenance ledgers have `ledger rechain`).
285
+ - The harness wiring is never interpreted. It must match a closed canonical grammar at every judged head, or the event is incomplete ("non-canonical harness wiring").
286
+ - Caps: a parsed document over 1 MiB, more than 10,000 protected entries, and 120 s.
287
+ - `src/holmes/admission/forge/git-object-port.ts`: reads git objects with replace objects off, and computes prefix hashes in a child process.
288
+ - Its rules:
289
+ - **Wiring grammar:** `config.toml` with a `\u`/`\U` escape, a quoted key or a quoted table header is refused, and the holmes block is read both line by line and by a core tokenizer that is differentially tested against `smol-toml`.
290
+ - **Wiring shape:** a wiring file that is a symlink or executable, and a wiring directory (`.claude`, `.codex`, `.agents`, …) that is not a directory, make the event incomplete.
291
+ - **Specs:** paths fold fully (NFC, upper, lower), and specs are indexed by their frontmatter id. Every member of a collision is refused, unchanged ones included.
292
+ - **Ports and order:** any exception from the object port is the event's incomplete. The event is judged in the order pin, range, configuration, wiring.
293
+ - **Census:** it checks the whole import closure against a whitelist.
294
+ - **Self-containment:** a workflow's run lines are an allowlist.
295
+ - **Entries:** each entry carries its decision basis.
296
+ - **The 120 s cap is inclusive.**
297
+ - **`config.toml`:** a multi-line string (`'''` or `"""`) is refused, because one could hide the holmes header from the line reading. The tokenizer also yields each string value with its path. A string naming holmes stands only as the holmes args or an allowed env value, and both readings must place every key in the same block.
298
+ - **JSON wiring:** paths are compared as arrays, so a key spelled `mcpServers.holmes-kit` is not the holmes entry's path.
299
+ - **Detector workflows:** their keys are a closed set.
300
+ - Refused: a step `shell` or `working-directory`, `defaults`, `strategy`, an `env` setting a loader, shell start-up, home or git key, and a `container` or `services` image not pinned by digest.
301
+ - A document the pre-checks refuse stays row 2.
302
+ - **The object port:** it is guarded by its fixed method list, so a class-instance port's exception is the event's incomplete too.
303
+ - **Path folding:** it lowers first. An APFS scan of every code point found no character that APFS opens as a protected name and that folds elsewhere.
304
+ - **Detector workflow `env`:** an allow list of the token keys (`GH_TOKEN`, `GITHUB_TOKEN`).
305
+ - **"Names holmes":** judged on the folded text, in TOML, `.mcp.json` and settings hooks.
306
+ - **`config.toml` speed:** reading it is linear (1 MiB: 92 ms).
307
+ - **Exceptions:** a prototype-member env key (`toString`, `constructor`, …) is judged instead of thrown. An exception in the wiring grammar is the event's incomplete, and its reason names its kind (`non-canonical harness wiring (the grammar threw TypeError)`).
308
+ - **The clock:** a clock that throws, answers NaN or steps back is the event's incomplete ("clock failed").
309
+ - **`config.toml` key paths:** a key path longer than 8 segments is non-canonical. The canonical block's deepest is 5.
310
+ - **JSON wiring:** objects nested below the parser's own limit are walked without recursion, and nesting past 64 levels is non-canonical.
311
+ - **JSON wiring memory:** the walk keeps one cursor per open container and builds a path only when it needs one. A 1 MiB `.mcp.json` holding one wide array peaks at 174 MB, against 143 MB for a flat document of the same size.
312
+ - **Breach order:** the order in which breaches are found is pinned.
313
+ - `cli/agents.ts` exports `AGY_ROOT_NAMES` and `CODEX_MARKETPLACE_PATHS`; their values and uses are unchanged.
314
+ - **Approval queue consistency: the request lock skeleton (A-SPEC-794.2, 794.6):** the parts of the request lock that do not depend on generation cycles. **Nothing calls them in 0.40.0 yet.**
315
+ - `project/request-lock.ts`: one holder per approval request id at `.ax/state/request-locks/<id>`, on the owned-lock protocol.
316
+ - Its place in the lock order is entity-store → request → spend → chain.
317
+ - A fence is checked before every write: the owner token, the lock directory's inode, and no successor claim naming the token.
318
+ - A grant publish links a temp file to its name, so it never replaces a file.
319
+ - `nextLockEpoch` is 1 + the largest epoch recorded for the id, below 2^32.
320
+ - A holder whose liveness cannot be judged (another or an unknown host, an unknown boot, an earlier boot on macOS) is recovered once held longer than 4x its bound. A holder judged alive never is.
321
+ - `holmes-kit lock recover request <req-id> [--confirm-holder-dead]`: the operator's recovery of one request lock, under the same operator judgement and ledger rows as `lock recover spend`.
322
+ - `doctor` lists held request locks, and names this route once a lock is past 4x its bound.
323
+ - `project/instance-id.ts`: this clone's instance id in `.ax/state/instance-id.json`.
324
+ - A read never creates it. Concurrent creators agree on one id: a stale file is repaired under a repair lock, by the inode it was judged through.
325
+ - A copied or moved `.ax/state` (another device or inode) reads as none and gets a new id. The old file is kept aside as `instance-id.json.stale-*`.
326
+ - `governance/approval-decisions.ts`: the reconcile judgement (excluded, complete, settled, finish-publish or revoke) as a pure function, over witnesses bound to the granted nonce.
327
+ - **`run start --provision` for Codex (A-SPEC-774.30).** It writes only the worktree's git-ignored `.codex/config.toml` MCP table. The gate stays the user-level `$CODEX_HOME/hooks.json`.
328
+ - A new `codex-trust` check needs the main checkout or the worktree to be trusted. Measured with codex-cli 0.163: a linked worktree's project table loads when the main checkout is trusted.
329
+ - Provisioning writes through no symbolic link and replaces files by rename.
330
+ - **`run start --review-base <rev>` (A-SPEC-102.12).** It declares the task's base, which must be an ancestor of the worktree HEAD. Transitions, Stop and push then judge `review-base..HEAD`, and `--review-rounds` counts the failing rounds on that base across the task's runs.
331
+
10
332
  ## [0.39.0] - 2026-10-23
11
333
 
12
334
  Orchestration hardening, for the reference orchestrator's staged multi-agent runs (supervisor directive of 2026-10-23, items D1, D2, D4 and D11), plus the fixes G0 round 5 found before the SDLC comparison pilot.
@@ -27,7 +349,23 @@ Orchestration hardening, for the reference orchestrator's staged multi-agent run
27
349
  - `workspace_preflight` gains an `mcp-build` check. Servers write a heartbeat.
28
350
  - `doctor` (row `mcp server processes`) and the SessionStart banner name every running holmes-kit MCP server that started before its install was last written. That includes servers older than the self-check.
29
351
 
352
+ ### Added
353
+ - **The workspace spend lock, and the operator's `holmes-kit lock recover spend` (A-SPEC-245.8).** The entity store's lock protocol now lives in one module that the entity lock and a new workspace spend lock share; the entity lock's behaviour, holder record and messages are unchanged.
354
+ - The spend lock recovers a holder on its own only when it is certainly dead: the same host and boot with its process gone, or an earlier boot of this host (not on macOS yet). A holder on another host, or with an unknown host or boot identity, waits for the operator.
355
+ - `holmes-kit lock recover spend` refuses a running holder and, from an agent session, refuses before reading any flag; a holder it cannot judge needs `--confirm-holder-dead`. It records `lock-recovered` in the ledger, with host and boot identifiers only as keyed hashes.
356
+ - `doctor` prints a WARN line for a held spend lock (pid, host match, age, and an alarm past four times its bound), for recorded leaks, and for a lock path git does not ignore; with none of these it prints nothing new, and its exit code does not change.
357
+ - After review (A-SPEC-245.10): a hold by another thread or another copy of the module in the same process is never taken; waiting for the lock never runs past its budget; the operator retires only the holder it judged; a holder whose process answers can be recovered by the operator only with `--confirm-holder-dead` once it has been held past four times its bound; the ledger records the recovery's intent before it and the outcome after it.
358
+
30
359
  ### Fixed
360
+ - **An approval grant is spent only by the decision that allowed its act (A-SPEC-245.4).** A run-stage, role or plan-scope deny after the judgement no longer spends the grant, and the hook's audit re-reading spends nothing. A grant revoked while an act held it is not brought back when that act returns it, and a newer grant under the same name is kept. A grant another act holds is refused with the retryable code `grant.in-use`. An act a grant unlocked is audited under the grant's actor.
361
+ - **doctor names the server detector's boundary conditions and claims no boundary (A-SPEC-792.46).** In a governed repository with a github.com remote, `doctor` reports whether the report-only detector is present (configuration, workflow, rulesets, environment, the App's check run, quota, a hosted runner), and names each condition that is missing or unknown. It says when the detector definition is changeable and the App key is reachable from pushed definitions, whether the default branch forbids force push and deletion, and which credential sources it checked (values never printed; "same-uid forge admin" when an admin scope is found). It also compares the verifier pin's `classifier` with the installed version. Only the `doctor` command reads the forge, through `gh api`: at most six calls, each bounded to 8 s and all within a 10 s budget. After the first timeout every further call is unknown (A-SPEC-792.48). A fact that was not confirmed is reported as unknown, never as PASS:
362
+ - the required workflow must be the detector's own, in this repository;
363
+ - credentials with neither the permission nor the scopes read give "admin status unknown";
364
+ - a 403, a 429 or a malformed answer is unknown;
365
+ - only GitHub-hosted runner labels count as hosted;
366
+ - an unread admin permission is "admin status unknown" whatever the scopes, unless a scope shows admin (A-SPEC-792.49);
367
+ - unread rules give a WARN history line that does not say rulesets were read, and a broken `admission.json` leaves the check run unknown.
368
+ A governed repository with no remote, or a remote on another forge, gets a "no detector" line. The host is matched in any letter case.
31
369
  - **A spec write the store could not read (A-SPEC-792.9).** A Write, Edit or MultiEdit that would leave a spec file unreadable to the store is now refused with the parse error (`spec.unreadable`, permanent). Before, a headless session could break a spec's frontmatter into a state only a person could repair, and that deadlocked a G0 run at Stop.
32
370
  - **Interpreter environment reads (A-SPEC-163.9).** An interpreter command counts as an environment read only when `environ`, `environb` or `ENVIRON` stands as a whole identifier. `pytest tests/test_environment.py` and `import sphinx.environment` are no longer refused as dumps.
33
371
  - **Refusals from a working directory inside `.ax` (A-SPEC-773.5).** A refusal judged over `.ax` only because the shell's working directory is inside `.ax` now says so, and names `cd <workspace root>` on its own as the way out.
@@ -461,7 +799,7 @@ Every judgement in a run fails closed and names what it could not read. Child ag
461
799
  ### Known issues
462
800
 
463
801
  - **G7 and G6 are not done.** The acceptance scenario and its record (run ledger, MRP, refusal log) do not exist yet,
464
- nor does the integration guide `docs/integration/jarvis-role-phase.md`. No commit in this release implements the run
802
+ nor does the integration guide for a consumer workspace's role/phase setup. No commit in this release implements the run
465
803
  token (G2.4), the event stream (G9.17), the ACP extension (G2.7) or design-principle blocking (G5).
466
804
  - **Codex and Antigravity shell text on Windows** (A-SPEC-790.2, draft). Both harnesses send shell commands under a Bash
467
805
  name. Which shell runs that text on Windows is unmeasured. If it is PowerShell, it is judged with Bash rules today.
@@ -805,7 +1143,7 @@ from the copy it installs), and trust the rewritten Codex Stop hook once with `/
805
1143
  and `activation`; `doctor` reads the harness identity from the router rows. A receipt that differs only because
806
1144
  the operator edited `~/.claude/settings.json` stays a conflict as A-SPEC-752.5/752.6 pin it (owner decision pending).
807
1145
  - **A refusal written to the refusal log is answerable from its own hint** (A-SPEC-770, 770.1). Field report
808
- 2026-10-12 (jarvis): "approval impossible" — the design was intact (REQ-563/690: a refusal outside the inbox is
1146
+ 2026-10-12 (a consumer workspace): "approval impossible" — the design was intact (REQ-563/690: a refusal outside the inbox is
809
1147
  granted with `approve --grant <id>`), but the hint carried no id and the inbox never said such requests existed.
810
1148
  Every refusal line now ends with `run: holmes-kit approve --grant <id> --target <root>` carrying the actual id, the
811
1149
  inbox (`--list`, `--watch`) prints a footer counting requests outside the inbox, and the `--refusals` closing line
@@ -2034,7 +2372,7 @@ show them. Four adversarial review rounds and a live three-harness run preceded
2034
2372
  - **H-SPEC obligations are shared by approved sibling slices** (A-SPEC-724.2); release reconciliation
2035
2373
  observability is bound to the existing receipt, outcome and maintenance records (A-SPEC-724.1).
2036
2374
  - **Replay recall** (A-SPEC-725): a cited request with an underfull window may admit a direct,
2037
- scanned importer of the lexical leader; the HOLMES/60 and JARVIS/30 pins are unchanged.
2375
+ scanned importer of the lexical leader; the HOLMES/60 and consumer-corpus/30 pins are unchanged.
2038
2376
 
2039
2377
  ### Fixed
2040
2378
 
@@ -2299,7 +2637,7 @@ moved from REQ-674–678 to REQ-688–692 because `main` had already published t
2299
2637
  candidates rather than granting. The inbox list is unchanged.
2300
2638
  - **The same Windows directory read as a foreign workspace** (A-SPEC-692). Three root comparisons
2301
2639
  put one side through `realpathSync.native` and the other through the JS `realpathSync`, which
2302
- leaves an 8.3 alias (`SUNGNA~1`) spelled as it arrived. Both sides go through one canonicaliser.
2640
+ leaves an 8.3 alias (`FIRSTL~1`) spelled as it arrived. Both sides go through one canonicaliser.
2303
2641
  - **A kind-blind `scope`** (A-SPEC-693). With an `import` rule beside an `inherits` rule, an
2304
2642
  extension that showed only imports read as *judged*. Scope is now asked per rule kind
2305
2643
  (`scopeByKind`), over the files a rule of that kind actually judges; the flat lists fold toward the
@@ -2772,7 +3110,7 @@ POSIX suite. Eighteen A-SPECs (651.1–651.5, 652.1–652.6, 653), each RED-firs
2772
3110
  global config at `\\.\nul`, which Windows git cannot open, so each merge reported
2773
3111
  `merge-tool-failure`. It now uses `NUL` on win32 (`os.devNull` elsewhere).
2774
3112
  - **One path, two spellings** (A-SPEC-651.1). Reaching a workspace through an 8.3 short name
2775
- (`C:\Users\SUNGNA~1\…`) made entity adoption refuse its own store as `foreign-store` and keyed pytest
3113
+ (`C:\Users\FIRSTL~1\…`) made entity adoption refuse its own store as `foreign-store` and keyed pytest
2776
3114
  outcomes by a `../../…` path. Entity binding, execution context and the pytest cwd now judge with the
2777
3115
  same canonical spelling `resolveProjectRoot` uses.
2778
3116
  - **The MCP server opens the right spec store** (A-SPEC-652.2). The store is resolved from
@@ -3065,7 +3403,7 @@ required dependency broke on every operating system, found by reviewing that wor
3065
3403
  Not the writer (0.19.1's note — `tomlStr` escapes correctly) and not cwd (0.19.2's hypothesis —
3066
3404
  `doctor` now answers the same from `C:\` and the repo root): the test fixture wrote a Windows path
3067
3405
  with raw backslashes into a TOML basic string, and the reader folded every unknown escape to its
3068
- bare letter, so `C:\ai_project\…` became `C:ai_project…` and doctor judged a path nobody wrote. A
3406
+ bare letter, so `C:\workspace\…` became `C:workspace…` and doctor judged a path nobody wrote. A
3069
3407
  hand-written `config.toml` does the same, and Codex refuses such a file outright. The reader now
3070
3408
  accepts only the escapes TOML defines (`\b \t \n \f \r \" \\ \uXXXX \UXXXXXXXX`), an invalid one
3071
3409
  makes the entry unreadable, and `codex wiring` names the escape and its line with the two valid