@event4u/agent-config 9.33.0 → 9.34.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 (60) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +85 -167
  3. package/dist/agent-src/commands/agent-handoff.md +15 -3
  4. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +35 -1
  5. package/dist/agent-src/skills/corpus-grounding/SKILL.md +21 -12
  6. package/dist/agent-src/skills/design-tokens/SKILL.md +15 -0
  7. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +24 -0
  8. package/dist/agent-src/skills/rule-writing/SKILL.md +23 -0
  9. package/dist/agent-src/skills/skill-writing/SKILL.md +80 -2
  10. package/dist/agent-src/skills/systematic-debugging/SKILL.md +5 -3
  11. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +24 -0
  12. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  13. package/dist/cli-delegate/{chunk-2WELHO3P.js → chunk-I5EAFRII.js} +35 -0
  14. package/dist/cli-delegate/{chunk-PMQ6Z3T3.js → chunk-REMEZSVP.js} +9 -2
  15. package/dist/cli-delegate/{chunk-3EWYC3YK.js → chunk-UEZ7D35A.js} +4 -3
  16. package/dist/cli-delegate/cmd_conformance.js +1 -1
  17. package/dist/cli-delegate/cmd_doctor.js +1 -1
  18. package/dist/cli-delegate/cmd_handoff.js +2 -2
  19. package/dist/cli-delegate/cmd_memory_get.js +1 -1
  20. package/dist/cli-delegate/cmd_route_audit.js +1 -1
  21. package/dist/cli-delegate/cmd_session_recycle.js +7 -2
  22. package/dist/discovery/deprecation-report.md +1 -1
  23. package/dist/discovery/discovery-manifest.json +11 -11
  24. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  25. package/dist/discovery/discovery-manifest.summary.md +2 -2
  26. package/dist/discovery/dormancy-report.md +17 -0
  27. package/dist/discovery/orphan-report.md +1 -1
  28. package/dist/discovery/packs.json +3 -3
  29. package/dist/discovery/trust-report.md +1 -1
  30. package/dist/discovery/workspaces.json +3 -3
  31. package/dist/hooks/dispatch.js +96 -7
  32. package/dist/mcp/registry-manifest.json +2 -2
  33. package/dist/mcp/server.json +2 -2
  34. package/dist/mcp/server.mjs +118 -10
  35. package/docs/guidelines/agent-infra/failure-signatures.md +47 -12
  36. package/package.json +2 -2
  37. package/src/agent-src/scripts/archive_completed_roadmaps.ts +35 -1
  38. package/src/config/quorum-attendance-budget.json +1 -1
  39. package/src/scripts/_cli/cmd_session_recycle.ts +6 -1
  40. package/src/scripts/_lib/env_kill_switch.ts +37 -0
  41. package/src/scripts/_lib/security_lint.ts +18 -4
  42. package/src/scripts/_lib/self_repair.ts +60 -0
  43. package/src/scripts/_lib/self_repair_store.ts +65 -5
  44. package/src/scripts/_lib/subagent_capsule.ts +78 -1
  45. package/src/scripts/ai_council/events_log.ts +2 -2
  46. package/src/scripts/ai_council/orchestrator.ts +38 -0
  47. package/src/scripts/ai_council/prompts.ts +165 -3
  48. package/src/scripts/ai_council/quorum.ts +10 -0
  49. package/src/scripts/ai_team/review_gate.ts +2 -2
  50. package/src/scripts/build_discovery_manifest.ts +165 -0
  51. package/src/scripts/check_claims.ts +51 -2
  52. package/src/scripts/ci_time_ratio.ts +3 -1
  53. package/src/scripts/discovery_graph.ts +201 -27
  54. package/src/scripts/dispatch_r2_reviewer.ts +102 -1
  55. package/src/scripts/lint_handoffs.ts +92 -2
  56. package/src/scripts/lint_hedge_words.ts +317 -0
  57. package/src/scripts/lint_mcp_config_security.ts +1 -1
  58. package/src/scripts/lint_skill_frontmatter_safety.ts +1 -1
  59. package/src/scripts/self_repair_cli.ts +26 -1
  60. package/src/scripts/skill_linter.ts +58 -2
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Bootstrap shim for the event4u agent-config suite. This plugin ships ONLY the dispatcher hooks plus one install-pointer skill — ALL content (skills, rules, commands) is installed via `npx -y @event4u/agent-config init`, which writes the file projection AND registers the same hooks in ~/.claude/settings.json. DEPRECATED as a content channel; kept so the marketplace listing stays discoverable and existing installs keep working hooks.",
9
- "version": "9.33.0",
9
+ "version": "9.34.0",
10
10
  "keywords": [
11
11
  "agent-config",
12
12
  "skills",
package/CHANGELOG.md CHANGED
@@ -314,202 +314,120 @@ Entry-shape contract: [`docs/contracts/CHANGELOG-conventions.md`](docs/contracts
314
314
  > keeps the active era under the 250-line drift cap enforced by
315
315
  > `tests/test_changelog_eras.py`.
316
316
 
317
- # Era: 9.31.x — current
317
+ # Era: pre-9.34.0 — archived
318
318
 
319
- > Started at `9.31.0`. Full entries live inline below.
320
- > The drift test caps this era at 250 lines of entry body; growth past
321
- > that forces a new era split (`# Era: 9.32.x`, etc.) — see
322
- > [`docs/contracts/CHANGELOG-conventions.md § Era splits`](docs/contracts/CHANGELOG-conventions.md).
323
-
324
- ## [9.33.0](https://github.com/event4u-app/agent-config/compare/9.32.0...9.33.0) (2026-08-11)
325
-
326
- ### Release highlights
327
-
328
- <!-- Curated head: fill before merge, keep it under 10 lines, and leave `_none_` where it is genuinely the answer. The generated log below is unchanged. -->
329
- - **Behaviour changes:** _auto-derived, rewrite before merge:_ rule/schema diffs, breaking commits or removed public surface in e625e69, 9ec8042.
330
- - **Default changes + migration:** _auto-derived, rewrite before merge:_ commits naming a default, migration or migrate in 2588c5b.
331
- - **Security and correctness:** _auto-derived, rewrite before merge:_ security-scoped commits in b17d1f3.
332
- - **Honest nulls:** _auto-derived, rewrite before merge:_ commits carrying an honest-null marker in 9e999d6, b86a4a9.
333
- - **Known limitations:** _none_
334
-
335
- ### Features
336
-
337
- * **gates:** add --reply, the reply-close projection over open blockers ([dd88d21](https://github.com/event4u-app/agent-config/commit/dd88d2116dcc73a1351e292047c0b22a8f84fdd7))
338
- * **funnel:** the missing Opportunity stage ([ca5aabd](https://github.com/event4u-app/agent-config/commit/ca5aabd834db73755f2a6eba8efa5dc2edd2bb1b))
339
- * **recycle:** --verify validates without writing, plus an envelope mutation suite ([a9ad7d8](https://github.com/event4u-app/agent-config/commit/a9ad7d88ea214f2eb9dd12e406f93e9cbfb7bc17))
340
- * **conformance:** --why <id> traces one conformance check ([807a85c](https://github.com/event4u-app/agent-config/commit/807a85caed1a7b79499f1071d4202ed17142b6e2))
341
- * **doctor:** --anatomy renders the injection anatomy from existing measurements ([6ed0aac](https://github.com/event4u-app/agent-config/commit/6ed0aac994ef14b42d5e65bd86a5c4734648cceb))
342
- * **cost-summary:** report what caching bought, when spend happened, and where input went ([3dbc570](https://github.com/event4u-app/agent-config/commit/3dbc57082506a00a51dca76fdb06610e720a754d))
343
- * **cost-ledger:** record the model that actually answered, not the one asked for ([8b79067](https://github.com/event4u-app/agent-config/commit/8b790671bb780629fd30a06a47dacf957da93c3d))
344
- * **council:** mark a solo-concluded pass in the rendered quorum line ([b6a90ab](https://github.com/event4u-app/agent-config/commit/b6a90ab405a2d0a5bdee655f8fa34f45b3ae4d74))
345
- * **ci:** resolve workflow path filters against the tree, and repair 20 dead ones ([77f200f](https://github.com/event4u-app/agent-config/commit/77f200f0885d5ac6b28c9d5b98d737665d847954))
346
- * **council:** make a solo-concluded quorum distinguishable in the event log ([5addcd0](https://github.com/event4u-app/agent-config/commit/5addcd0a9bee200ec2fbc529a6365254c397e68f))
347
- * **budget:** register the three attendance metrics before any data exists ([b6bf44d](https://github.com/event4u-app/agent-config/commit/b6bf44dd799c2854e7caa576ca3cd2d29889f560))
348
- * **council:** make a solo-concluded pass visible in the event log ([ec8ede6](https://github.com/event4u-app/agent-config/commit/ec8ede6ec50b8aa5e9daecfcc35c26486ad1bb14))
349
- * **budget:** the cost-parity target table, with a gate that refuses an untraceable number ([b86a4a9](https://github.com/event4u-app/agent-config/commit/b86a4a9d4efc2ab1dff74ba56724b07061850b8e))
350
-
351
- ### Bug Fixes
352
-
353
- * **cost-ledger:** repair the seven findings from the R2 completion review ([4204a99](https://github.com/event4u-app/agent-config/commit/4204a99a118ab8e8ed04fb3674821b69c0616f1a))
354
- * **changelog:** curate the shipped v9.32.0 head, record the cadence decision ([27616e6](https://github.com/event4u-app/agent-config/commit/27616e6046424b12d5b203399dbd3435fb535c48))
355
- * **install:** record the .vscode bridge merge, surface trampoline removal failures ([c1f15c1](https://github.com/event4u-app/agent-config/commit/c1f15c18f1da0d6e079a2bc4e16f311af6b1ccba))
356
- * **pricing:** stop pricing a dated model alias at nothing, and stop hiding it ([3fbcc52](https://github.com/event4u-app/agent-config/commit/3fbcc52c436bbdc063aa1476b9a3dc281b38180e))
357
- * **wedge:** regenerate the production-validator projection after the pragma ([8ab3012](https://github.com/event4u-app/agent-config/commit/8ab3012ab40a54d228d11fadfd0ba072a0fa08fa))
358
- * **security-lint:** the bare-shell detector had never read a subagent ([b17d1f3](https://github.com/event4u-app/agent-config/commit/b17d1f33653438ab6489c64f33dce403a4f8d2c1))
359
- * **test:** drop the last v1 label the schema bump left behind ([6f53010](https://github.com/event4u-app/agent-config/commit/6f530100a3b2af7cc4b43b7e58fcb2862df9a48a))
360
- * **council:** measure the dispatch shape, and stop dividing entries by clients ([d716386](https://github.com/event4u-app/agent-config/commit/d7163864715e15d879ce6af1c1f6db028832d824))
361
- * **council:** make the attendance metrics able to answer their own questions ([8f92902](https://github.com/event4u-app/agent-config/commit/8f929020301bfdb50e6d788a71e1050f9ff58d43))
362
- * **ci:** describe the retired tree without naming its dead path ([bd2e726](https://github.com/event4u-app/agent-config/commit/bd2e726883aecf5106522fa7324c1d11aa3a0473))
363
- * **roadmap:** re-date the index risk review after the substantial rewrite ([6f71cb4](https://github.com/event4u-app/agent-config/commit/6f71cb4f23cfbf2eb344be4a070281e45b2c1fdf))
364
- * **schema:** let a subagent express the scoped tool grant tool-safety asks for ([9ec8042](https://github.com/event4u-app/agent-config/commit/9ec8042d2c73162931c0d7900826934fdaafccfa))
365
- * **review-routing:** give the role vocabulary a home that exists ([ec4d392](https://github.com/event4u-app/agent-config/commit/ec4d392faf4feaaf5fbf0694bc028b6e54d0fe2c))
366
- * **skills:** re-home two sections the rule migration dropped ([2588c5b](https://github.com/event4u-app/agent-config/commit/2588c5be9f82bab41ebedcddd0ad4302dbfc245a))
367
- * **review:** name the skip artefact so the gate can discover it ([b693b61](https://github.com/event4u-app/agent-config/commit/b693b61e94e5ded5463c22124acb20a1ca776d00))
368
- * **roadmap:** correct three false premises in the gate-integrity kernel blocker ([2e6c07e](https://github.com/event4u-app/agent-config/commit/2e6c07e66eec04ddf8afb8e233340c2e628141fa))
369
- * **roadmap:** stop two sub-headings from parsing as phantom phases ([05ed949](https://github.com/event4u-app/agent-config/commit/05ed9493b153c19253fcad3c98a939d76dd09f31))
370
-
371
- ### Documentation
372
-
373
- * **adr:** ADR-222 — blocker handover is delivered, not remembered ([961ac12](https://github.com/event4u-app/agent-config/commit/961ac12705db642f54119f39dfef9ac5cbea870c))
374
- * **reply-close:** state the blocker handover as part of the one summary ([ec761e0](https://github.com/event4u-app/agent-config/commit/ec761e04b13e05ea671ba906bfbfd05999e25563))
375
- * **review:** re-bind the completion review to the repaired scope ([0a585db](https://github.com/event4u-app/agent-config/commit/0a585db2279c83bbf09a1b3afd18852833795c89))
376
- * **roadmap:** release-surface integrity, 11 of 12 steps closed ([70cec30](https://github.com/event4u-app/agent-config/commit/70cec30255f61de1aeaa39551e008992c63f606c))
377
- * **context:** Continuation Protocol v1 decided, the runtime graph deferred ([3bafcc0](https://github.com/event4u-app/agent-config/commit/3bafcc075c6db2bcaf9a9725ee87fdb190bd7a73))
378
- * **contracts:** the model ceiling escalates, never silently degrades ([e625e69](https://github.com/event4u-app/agent-config/commit/e625e696fb4f2d90110f8678dd86e208ec0f4729))
379
- * **cli:** name the three new flags in the registry synopses and dispatcher help ([1f43731](https://github.com/event4u-app/agent-config/commit/1f4373195ca2d477d06e1fcaa467df2120d8043b))
380
- * **context:** give the corrected carrier-divergence figure a stable surface ([4812f9d](https://github.com/event4u-app/agent-config/commit/4812f9de9d6bd96b6109776001191a8fbb95feb9))
381
- * **proof:** re-render after the surgical-uninstall claim moved to exec evidence ([5e489ee](https://github.com/event4u-app/agent-config/commit/5e489ee7b58428f79fc211d07fda754c76efda0e))
382
- * **review:** record the R2 completion-review findings before any fix ([2954d66](https://github.com/event4u-app/agent-config/commit/2954d663fa26980113331653c31d3dc3ef88c649))
383
- * **roadmap:** restore install-lifecycle 2.3 to open-and-blocked ([4b61e7f](https://github.com/event4u-app/agent-config/commit/4b61e7f4ba61c560bd3a836368ebb73864e0d285))
384
- * **roadmap:** land the org-pack reopening brief, close install-lifecycle Phase 2 ([b172d28](https://github.com/event4u-app/agent-config/commit/b172d28ed0a8f2f112a3b0fb43c4e5fe9c54edd6))
385
- * **roadmap:** close install-lifecycle Phase 1, cancel 1.2 on a failed premise ([920910b](https://github.com/event4u-app/agent-config/commit/920910bc2d6acf978ebe70f5fdb844420b2002c4))
386
- * **install-layout:** correct the untracked-surfaces list and the vscode pointer shape ([26982c6](https://github.com/event4u-app/agent-config/commit/26982c62eafd452f4c2cf6cd929a7a74dd68dbc6))
387
- * **roadmap:** record the unapplied Phase 1 implementation and its two open calls ([25fc56d](https://github.com/event4u-app/agent-config/commit/25fc56da7356e446f13bbb1da866a4ddc70091d1))
388
- * **roadmap:** carry the re-homing the merge commit described but did not contain ([a7a469f](https://github.com/event4u-app/agent-config/commit/a7a469f87592580fab38a1180e17d2320e861337))
389
- * **roadmap:** council dispositions and four cited corrections ([10c25c4](https://github.com/event4u-app/agent-config/commit/10c25c4753212c2c4b93e972707b3090e06cb431))
390
- * **review:** re-bind round 2 — six fixed, one accepted as debt ([7b451cb](https://github.com/event4u-app/agent-config/commit/7b451cb75f65b787f4c5ebf3903b49e90382c98a))
391
- * **review:** record round 2 — the fixes introduced two of their own ([4a0504c](https://github.com/event4u-app/agent-config/commit/4a0504cfcf302b00a3f9773ba89eb284f2b7f573))
392
- * **review:** re-bind the findings to what the fixes actually did ([baba417](https://github.com/event4u-app/agent-config/commit/baba417297bbb6db0d0d250785e3c049f7e33fd7))
393
- * **review:** record the completion review before any fix lands ([7dc1f1f](https://github.com/event4u-app/agent-config/commit/7dc1f1f4ea511bcd30a67ac416937511c6420721))
394
- * **roadmap:** split the 2026-08-10 harvest into eight executable roadmaps ([72a1078](https://github.com/event4u-app/agent-config/commit/72a10788336fc54cff25833ae1568328765f4011))
395
- * **roadmap:** close Phase 1 and steps 3.2 / 3.5 / 3.8, and re-frame 3.6 ([dc12894](https://github.com/event4u-app/agent-config/commit/dc128947b844d0afb147b9e413c12c1dadbc7346))
396
- * **roadmap:** close Phase 1 — the quorum-attendance defect ([12e0bc1](https://github.com/event4u-app/agent-config/commit/12e0bc14f7813691c8708d25b6eb23c8bcf4f116))
397
- * **review:** declare the no-code-surface skip for this completion ([3771eaf](https://github.com/event4u-app/agent-config/commit/3771eafda510306cf238539f3c910481f7e36b1a))
398
- * **ledger:** record that the three dangling pointers were repaired ([03cf5f8](https://github.com/event4u-app/agent-config/commit/03cf5f8699dce20224479a58a6ece39509deb6a0))
399
- * **roadmap:** triage the 2026-08-10 inbox batch ([9e999d6](https://github.com/event4u-app/agent-config/commit/9e999d64eb3b34612bcbe7d8d4e91bad56c7cc54))
400
- * **roadmap:** correct two roadmap claims the tree contradicts ([e1f271e](https://github.com/event4u-app/agent-config/commit/e1f271e6bbe50f9ebaf9814ce47b83bc4111d871))
401
- * **roadmap:** add the risk register the telemetry record made due ([82268d7](https://github.com/event4u-app/agent-config/commit/82268d7e4e417e688bfb453d9c75f0ded1b0991e))
402
- * **roadmap:** record the measured telemetry state on both orchestration blockers ([10a2790](https://github.com/event4u-app/agent-config/commit/10a2790e19b245280dd5764cdbfcb873ff586be7))
403
- * **roadmap:** close and archive the cost-parity program — 23 steps, 6 criteria, every claim re-verified ([af57abf](https://github.com/event4u-app/agent-config/commit/af57abf96ae30234de73446f965d93eba45423f7))
404
- * **decision:** give the router-is-unused finding an owner before someone acts on it ([bf70104](https://github.com/event4u-app/agent-config/commit/bf701040cf44e873b4fb1eb115a599ed39f7190f))
405
- * **cost-parity:** one ledger for the family's order, and the per-host table the diet actually needs ([fa188ee](https://github.com/event4u-app/agent-config/commit/fa188ee44ecddf4898abf8feea3c4a12155b1f29))
406
-
407
- ### Tests
408
-
409
- * **subagent:** assert the tool-grant behaviour, not which keyword rejected it ([59ee093](https://github.com/event4u-app/agent-config/commit/59ee0938eac9289a7f711600eb3bf45500ded1d4))
410
- * **workspace-inbox:** re-record the inline snapshot that embeds the docker skill ([f395d79](https://github.com/event4u-app/agent-config/commit/f395d79dec3d7e5e39cded83871d384f1008594e))
411
- * **pricing:** cross-check the two cache-rate tables that nothing compared ([e623e0c](https://github.com/event4u-app/agent-config/commit/e623e0c8fe285dd5ff8e824ac58b7a7cf2d222b0))
412
-
413
- ### Build
319
+ > All entries before `9.34.0` live in
320
+ > [`docs/archive/CHANGELOG-pre-9.34.0.md`](docs/archive/CHANGELOG-pre-9.34.0.md).
321
+ > The archive is read-only; git tags remain the canonical
322
+ > source for what shipped. Splitting them out of the main file
323
+ > keeps the active era under the 250-line drift cap enforced by
324
+ > `tests/test_changelog_eras.py`.
414
325
 
415
- * **install:** refresh dist/install/install.mjs for the vscode bridge and trampoline warning ([440b046](https://github.com/event4u-app/agent-config/commit/440b046fb75448bfbe6cf854f0084ae19fd9c8f4))
326
+ # Era: 9.34.x — current
416
327
 
417
- Tests: 12935 (+117 since 9.32.0)
328
+ > Started at `9.34.0`. Full entries live inline below.
329
+ > The drift test caps this era at 250 lines of entry body; growth past
330
+ > that forces a new era split (`# Era: 9.35.x`, etc.) — see
331
+ > [`docs/contracts/CHANGELOG-conventions.md § Era splits`](docs/contracts/CHANGELOG-conventions.md).
418
332
 
419
- ## [9.32.0](https://github.com/event4u-app/agent-config/compare/9.31.0...9.32.0) (2026-08-10)
333
+ ## [9.34.0](https://github.com/event4u-app/agent-config/compare/9.33.0...9.34.0) (2026-08-11)
420
334
 
421
335
  ### Release highlights
422
336
 
423
337
  <!-- Curated head: fill before merge, keep it under 10 lines, and leave `_none_` where it is genuinely the answer. The generated log below is unchanged. -->
424
- - **Behaviour changes:** the work-engine's two red-check lanes now run a bounded self-fix loop before halting to `BLOCKED` — at most three attempts per validation target, stopped early when a verdict signature repeats (1f01490, wired in 10c8f7e). e05de77 edits a rule file only and changes no behaviour.
425
- - **Default changes + migration:** _none_
426
- - **Security and correctness:** _none_
338
+ - **Behaviour changes:** _none_
339
+ - **Default changes + migration:** _auto-derived, rewrite before merge:_ commits naming a default, migration or migrate in 4420340.
340
+ - **Security and correctness:** _auto-derived, rewrite before merge:_ security-scoped commits in 4420340, b2fc429.
427
341
  - **Honest nulls:** _none_
428
342
  - **Known limitations:** _none_
429
343
 
430
344
  ### Features
431
345
 
432
- * **work-engine:** route both red-check lanes through the self-fix loop ([10c8f7e](https://github.com/event4u-app/agent-config/commit/10c8f7eafbf21fc03a5f301163c941a20df4a885))
433
- * **work-engine:** bounded self-fix loop primitive + executable dod schema ([1f01490](https://github.com/event4u-app/agent-config/commit/1f0149035c1a27729b729dab1dedd861ccdf9812))
434
- * **envelope:** drift anchor, scripted grounding, verbatim error strings ([6c9187e](https://github.com/event4u-app/agent-config/commit/6c9187e30f41c87553764759096a3f7f4d19a126))
435
- * **envelope:** successor tailoring, mandatory failed_approaches, data-never-instruction boundary ([b03beac](https://github.com/event4u-app/agent-config/commit/b03beac1ad1325253c89a63eac9abc9f051269d3))
436
- * **orchestration:** report per-field provenance for host capabilities ([f4958de](https://github.com/event4u-app/agent-config/commit/f4958decf4a70b445a38747bff768ab449877d52))
346
+ * **handoff-envelope:** a checkable off-limits path list, and a validated reversibility tag ([33fd14c](https://github.com/event4u-app/agent-config/commit/33fd14ca8c8aa3ade0081e5f5bf33b6baef6f3f7))
347
+ * **r2-dispatch:** tell the three stale-artefact states apart, and route each to its contract path ([ca417a1](https://github.com/event4u-app/agent-config/commit/ca417a13ebd7890bbefedec89399add96a3f8eca))
348
+ * **lint-handoffs:** make a blank Open-questions section a finding, not a pass ([a22534b](https://github.com/event4u-app/agent-config/commit/a22534bbf8e80eb5e32d7e547651b8efa55a47dc))
349
+ * **self-repair:** bound record creation per source, and count what the cap refuses ([76aa7b5](https://github.com/event4u-app/agent-config/commit/76aa7b56dd53212f0b4f5d556cae27054bb2a358))
350
+ * **discovery:** add a dormancy report that names an unavailable signal ([99cfa2f](https://github.com/event4u-app/agent-config/commit/99cfa2f632320b7e1300e0d539292e1c038437a6))
351
+ * **discovery-graph:** add a zero-inbound query, per-pass stats and error containment ([ed3d532](https://github.com/event4u-app/agent-config/commit/ed3d5325285476e86fae62c679b6d20cbbff923f))
352
+ * **lint-hedge-words:** diff-scoped advisory hedge lint with a declared stage ([364ef70](https://github.com/event4u-app/agent-config/commit/364ef707dce9e29917d4bc9f5d2b2aeedc4572da))
353
+ * **claims:** bind six external research cites, gate the successor pointer ([37cc8fe](https://github.com/event4u-app/agent-config/commit/37cc8fee84343b8cb92edf7778b97ce235086dc8))
354
+ * **skill-linter:** gate Security constraints on script-bearing skills ([b2fc429](https://github.com/event4u-app/agent-config/commit/b2fc4292540fe140ca9ead90b32bebaac133d2d0))
355
+ * **council:** check a synthesis verdict against its own stance tally ([37103c3](https://github.com/event4u-app/agent-config/commit/37103c3e68efd749dd1d386f3402b8bc0679255d))
437
356
 
438
357
  ### Bug Fixes
439
358
 
440
- * **gates:** stop the R2 review-input copy from laundering fixture secrets ([c63d350](https://github.com/event4u-app/agent-config/commit/c63d3502013e7bc261096d02e2c102a52e2f1ec7))
441
- * **golden:** teach the replay the delegated bad-verdict surface, re-lock baselines ([1ff480c](https://github.com/event4u-app/agent-config/commit/1ff480c6adeb88af32198a19d41838e2f9f5dcc0))
442
- * **envelope:** close the eight R2 review findings ([b0d153c](https://github.com/event4u-app/agent-config/commit/b0d153cb3084dac2a20093b73d28a3ce3c12324c))
443
- * **tests:** type the self-fix state helpers against the wire types ([60d2724](https://github.com/event4u-app/agent-config/commit/60d272419b07b5abea1ce6ffa430faf127fcde4a))
444
- * **handoff:** stop offering the caller its own empty session ([b72f772](https://github.com/event4u-app/agent-config/commit/b72f772a03207aa4feeded3acd5b68823e3fd79c))
445
- * **tests:** narrow regex captures in the capability parity block ([6f27615](https://github.com/event4u-app/agent-config/commit/6f276154b83781404d6551113c6d43e5cf040423))
446
- * **carrier:** a paths: disagreement is a delivery defect, not inert metadata ([318fb81](https://github.com/event4u-app/agent-config/commit/318fb818eb543f27fc4c3b138ce762dc8c9e9640))
447
-
448
- ### Documentation
449
-
450
- * **review:** re-bind the findings artefact to the post-fix scope ([7a9bbbb](https://github.com/event4u-app/agent-config/commit/7a9bbbb2d7f4f04786771914bf7b3b68aba23e10))
451
- * **review:** record the R2 completion-review findings before fixing them ([27322e8](https://github.com/event4u-app/agent-config/commit/27322e876c76f96d6a67131f9e96a1759290a8f5))
452
- * **roadmap:** P2.2 build half shipped, its threshold unevaluated with a blocker ([1e478fd](https://github.com/event4u-app/agent-config/commit/1e478fdc317fdf12df001c1b98ef264df54a3742))
453
- * **contracts:** the flow contract documents the self-fix loop and the dod slot ([0ebaaba](https://github.com/event4u-app/agent-config/commit/0ebaabae9e12c75446efefc5be6f6b33b9d0435f))
454
- * **roadmap:** capability-answerability Phase 1 closed, blocker narrowed to one question ([c37af04](https://github.com/event4u-app/agent-config/commit/c37af045ecbf62b31e6878befdc88d763498d7a9))
455
- * **rules:** delegation-policy names the capability provenance check ([e05de77](https://github.com/event4u-app/agent-config/commit/e05de771d74e8284e2e64e91e33be66b1bd15e23))
456
- * **contracts:** the host-capability contract documents six fields, not five ([566b984](https://github.com/event4u-app/agent-config/commit/566b984681d1a1a5ef76643fa6f90f297c284e81))
359
+ * **tests:** satisfy exactOptionalPropertyTypes in the two new spec files ([4f9cd9b](https://github.com/event4u-app/agent-config/commit/4f9cd9b46370920daa0a39aa5cb10a65b70e70a4))
360
+ * **security-lint:** report the corpus a gate actually walked, not the shared default ([4420340](https://github.com/event4u-app/agent-config/commit/4420340cba6f5f091d2b836f21e747878fd71ed3))
361
+ * **roadmap-archival:** never rewrite path strings inside frozen records ([8805814](https://github.com/event4u-app/agent-config/commit/88058140884f14c275737e0e612daee005db2bd7))
362
+ * **review:** re-align the round-3 dispositions and escape the table pipes ([c569ba5](https://github.com/event4u-app/agent-config/commit/c569ba54c95e0d16ab315cb7a5223a33d34f3268))
363
+ * **review:** close the round-3 findings, including four npm ci sites the verify regex could not see ([57867df](https://github.com/event4u-app/agent-config/commit/57867dfd5dbb2d00bbc02deace9c0312e999b423))
364
+ * **review:** repair the round-2 findings, including a self-falsifying cost table ([90cb3ca](https://github.com/event4u-app/agent-config/commit/90cb3caff641d4bb4ef515813b7ec44af92d6636))
365
+ * **lint-hedge-words:** harden the gate scope so the coverage ratchet holds ([d0c9d9e](https://github.com/event4u-app/agent-config/commit/d0c9d9e9b6812d59a7a89e8287bc4b89800aa28d))
366
+ * **council:** let the reserved split label yield to a real option ([30328d8](https://github.com/event4u-app/agent-config/commit/30328d8811bd65f35f2bf42bc6b4fbe8cc76fa4c))
367
+ * **council:** address the R2 completion-review findings ([02c786c](https://github.com/event4u-app/agent-config/commit/02c786c28646da19e8c9cee94ab49b826f91a611))
368
+ * **review:** repair the seven completion-review findings ([efa7cc1](https://github.com/event4u-app/agent-config/commit/efa7cc1d150e0679678db22252dedbbcb838051f))
369
+ * address the nine R2 completion-review findings ([02cdfbb](https://github.com/event4u-app/agent-config/commit/02cdfbb28f04e432cccff7c14ba9f12e177feb0e))
370
+ * **ci-time-ratio:** correct the output-path docstring and register a task target ([1e28e18](https://github.com/event4u-app/agent-config/commit/1e28e1884ea8be49f6b8412e3b1c2d8c7240e9c9))
457
371
 
458
- ### Tests
459
-
460
- * **work-engine:** pin the loop contract and update the changed halt shapes ([eb88aa6](https://github.com/event4u-app/agent-config/commit/eb88aa695121a01c0c1e10de9804f1df3424c334))
461
-
462
- ### Other
372
+ ### Performance
463
373
 
464
- * **carrier:** re-bind to the post-merge scope — the fixed point ([884104c](https://github.com/event4u-app/agent-config/commit/884104c15d8257579a320932c671b489d96e7b06))
465
- * **carrier:** re-bind the R2 round to the shipping content, all 6 terminal ([9bbfbc3](https://github.com/event4u-app/agent-config/commit/9bbfbc35388f54c77fdae27315025843a6ea79f5))
466
- * **carrier:** R2 completion review round 1 — 6 findings, all open ([75be940](https://github.com/event4u-app/agent-config/commit/75be940f4f9bcbf71e1f1248467637fc51c6b63b))
374
+ * **tests:** render the proof page once in build_proof.test.ts ([c4d699b](https://github.com/event4u-app/agent-config/commit/c4d699ba61c4ad5a1a19ca292b4d3218748069b5))
467
375
 
468
- Tests: 12818 (+89 since 9.31.0)
469
-
470
- ## [9.31.0](https://github.com/event4u-app/agent-config/compare/9.30.0...9.31.0) (2026-08-10)
471
-
472
- ### Release highlights
473
-
474
- <!-- Curated head: fill before merge, keep it under 10 lines, and leave `_none_` where it is genuinely the answer. The generated log below is unchanged. -->
475
- - **Behaviour changes:** _none_
476
- - **Default changes + migration:** _none_
477
- - **Security and correctness:** _none_
478
- - **Honest nulls:** _none_
479
- - **Known limitations:** _none_
480
-
481
- ### Features
376
+ ### Documentation
482
377
 
483
- * **settings:** give the scripts read path the template-defaults layer ([a67a640](https://github.com/event4u-app/agent-config/commit/a67a640cbf64262d07026853b7b5ead21b509e5d))
378
+ * **dispatch-safety:** close 3.1, 3.2 and 3.3, and record why 3.4 waits for producers ([9efe07e](https://github.com/event4u-app/agent-config/commit/9efe07e11b40eb5231d267f89968045af87163d9))
379
+ * **dispatch-safety:** ADR-109 amendment 4, and close 1.3, 1.4 and 4.1 ([5f7e83a](https://github.com/event4u-app/agent-config/commit/5f7e83ad61488c1098ce5696731664b24a13ac2f))
380
+ * **review:** declare the no-code-surface skip for the org-pack decision ([4a573c0](https://github.com/event4u-app/agent-config/commit/4a573c0565854f0f561de8258eb776b1f51eb1fd))
381
+ * **council:** record the gate-scoped solo-attendance floor as ADR-224 ([686c23d](https://github.com/event4u-app/agent-config/commit/686c23df83b84c33f5bfac5257d1b187a0174f73))
382
+ * **roadmap:** close estate-lifecycle Phases 2-4 and record the two refusals ([f64b7fc](https://github.com/event4u-app/agent-config/commit/f64b7fc87fd6c0701ff5601676f067af2fe024fe))
383
+ * **governance:** separate the two lifecycle vocabularies and answer the deferred field ([212a38c](https://github.com/event4u-app/agent-config/commit/212a38c45622b9ee2329fe2929db2949a2c612de))
384
+ * **decision:** decline the external pack source root ([87f8943](https://github.com/event4u-app/agent-config/commit/87f894310ec1b07d64d86cef7d9b8a3cb5595a0a))
385
+ * **review:** disposition the round-3 findings ([c78afd5](https://github.com/event4u-app/agent-config/commit/c78afd510497d08b3684fc5fe42230b7a82b2af3))
386
+ * **review:** disposition the round-2 findings and preserve both rounds ([59b4561](https://github.com/event4u-app/agent-config/commit/59b45613fdd7eb3ffef275b5062f36c366428015))
387
+ * **review:** re-bind the findings after the gate-hardening fix ([0928422](https://github.com/event4u-app/agent-config/commit/092842250cb6b861e9cc217e0708bc63d411513b))
388
+ * **review:** disposition the seven findings against the repair commit ([910f7c4](https://github.com/event4u-app/agent-config/commit/910f7c4e85886f194f214ceeafe06c2b479b154e))
389
+ * **review:** record the completion-review findings for ci-economy ([d5e1fbd](https://github.com/event4u-app/agent-config/commit/d5e1fbdd3184adc4cd0c4f2a88776ae475e99422))
390
+ * **roadmap:** resolve the council-integrity deferral into a READY follow-up ([94f25c2](https://github.com/event4u-app/agent-config/commit/94f25c25d7911ef9fc177db21dba0e294e7e143a))
391
+ * **review:** re-bind the completion-review findings to the post-fix scope ([0208175](https://github.com/event4u-app/agent-config/commit/0208175e677af8db7632be58e7384209dceae45e))
392
+ * **roadmap:** close 15 of 16 ci-economy steps, cancel the build fan-out ([3a3523d](https://github.com/event4u-app/agent-config/commit/3a3523de29b269b9b580fd9bd071d94cafa0a2cd))
393
+ * **adr:** ADR-223 records no required-check demotion on cost grounds ([6e0d45a](https://github.com/event4u-app/agent-config/commit/6e0d45ae673f2cd8fa8c0e36f09110b4a573de7e))
394
+ * **development:** correct the testing section and document the in-process runner ([53ce1f6](https://github.com/event4u-app/agent-config/commit/53ce1f6fa2ef56ff3bc1737c987dd6e918c81928))
395
+ * **ci-cost-budget:** re-anchor the baseline to CI-recorded figures ([2972545](https://github.com/event4u-app/agent-config/commit/2972545e966319ebf4c632e1931ebc8c084b8816))
396
+ * **review:** R2 completion-review findings for the authoring-contract branch ([d97c428](https://github.com/event4u-app/agent-config/commit/d97c42860ea1ce4b6b63a347c824f00a536d853f))
397
+ * **failure-signatures:** stable ids, per-row drills, capability-claim row ([c18295e](https://github.com/event4u-app/agent-config/commit/c18295e0108955418eabf064502b591432cdeb1a))
398
+ * **skill-writing:** reclassify two unenforced sections, add three patterns ([07d8ce1](https://github.com/event4u-app/agent-config/commit/07d8ce1198699833f0154112831ae7fcf4703ba0))
399
+ * **roadmap:** close council-integrity 2.1 and 3.1, record two premise corrections ([088f7ab](https://github.com/event4u-app/agent-config/commit/088f7ab87de41ecbe21c46d7efefef1ed5f04a60))
400
+
401
+ ### Refactoring
402
+
403
+ * one definition of the env kill-switch predicate ([689cc55](https://github.com/event4u-app/agent-config/commit/689cc5558a55ccab4728175955459973a5b03e4e))
484
404
 
485
- ### Bug Fixes
405
+ ### Build
486
406
 
487
- * **carrier:** a frontmatter-only difference is not body divergence ([c48b6c8](https://github.com/event4u-app/agent-config/commit/c48b6c88cf274e3e24b0795d8fb4d19be7637557))
488
- * **hooks:** replace the fence regex with a scanner, and stop shipping a moving figure ([2fe01e7](https://github.com/event4u-app/agent-config/commit/2fe01e79804c37380e8c968b6efdf71b7d9d33fa))
489
- * **hooks:** per-session pin marker, atomic write, enforced read cap ([67abbb6](https://github.com/event4u-app/agent-config/commit/67abbb63028ab79fa6d04083523fbb6ffb9033c3))
490
- * **scripts:** measure the gate per TURN, and withdraw the figures that were not ([313e665](https://github.com/event4u-app/agent-config/commit/313e665354c1dd0512aceb21475dbc532f6b9ba5))
491
- * **hooks:** turn-end-gate — key the guard on the turn, not the prompt text ([b3392e6](https://github.com/event4u-app/agent-config/commit/b3392e60ceeae500b639040e8849b801fc661008))
407
+ * **toolchain:** enable tsc incremental buildinfo and the eslint cache ([344bf97](https://github.com/event4u-app/agent-config/commit/344bf979e7c355c1a97d7407706f198fd5bf78ee))
492
408
 
493
- ### Documentation
409
+ ### CI
494
410
 
495
- * **carrier:** the header says three classes and there are now four ([1955234](https://github.com/event4u-app/agent-config/commit/195523465db8fabb84be3f4ad27f8293cf5e4ac5))
496
- * **evidence:** classify the 109 carrier divergences, and correct two records ([c2fc109](https://github.com/event4u-app/agent-config/commit/c2fc109f7ca30f621455a9a754803055a0b1a0d9))
497
- * **evidence:** map the scripts settings read path against the server one ([858a256](https://github.com/event4u-app/agent-config/commit/858a25646352fd3603800e5657527591a00e16ae))
498
- * **review:** record the R2 findings on the fix pass, before touching it ([65aee68](https://github.com/event4u-app/agent-config/commit/65aee68691d85bdba928b4de65f4e28025c80852))
499
- * **review:** record the R2 findings for turn-end-gate before fixing anything ([9f204c5](https://github.com/event4u-app/agent-config/commit/9f204c55a73a45bada0baa7925bc000df7bee912))
411
+ * **workflows:** add PR-scoped concurrency and flag the bare npm ci calls ([522c052](https://github.com/event4u-app/agent-config/commit/522c05283ea2f5d4b7ca65c5862d21520291f0db))
500
412
 
501
- ### Build
413
+ ### Chores
502
414
 
503
- * **install:** rebuild the bundle without the worktree symlink poison ([741806c](https://github.com/event4u-app/agent-config/commit/741806c91a9774b1b521ae34487d271d0c5dee93))
504
- * **install:** refresh the committed install bundle ([7bbcfdc](https://github.com/event4u-app/agent-config/commit/7bbcfdce9355708ef6785ec640af64d23a5ac4a0))
415
+ * **roadmap:** regenerate the dashboard after the second main merge ([92bf6fb](https://github.com/event4u-app/agent-config/commit/92bf6fb58e50170176a76d5892098b0d19d21e8c))
416
+ * **dist:** project the reversibility-tag paragraphs into the command tree ([2d33951](https://github.com/event4u-app/agent-config/commit/2d339519eee0dd84b4b876de8222e5503c08d04c))
417
+ * **tests:** drop two dead symbols left by the py2ts parity teardown ([cfecb9d](https://github.com/event4u-app/agent-config/commit/cfecb9dd1466af91791ad60fcdb768a85ab5cf4f))
418
+ * **roadmap:** close council-integrity-followup, open the implementation plan ([6efce85](https://github.com/event4u-app/agent-config/commit/6efce8541f6e3ec48789d2e4dc6333adcfb8148d))
419
+ * **roadmap:** archive install-lifecycle and re-depth its moved links ([6790d85](https://github.com/event4u-app/agent-config/commit/6790d857c0869cf2d08c8d74c149d94dcf0a346b))
420
+ * **tests:** drop the dead tail in the discovery-manifest test ([fe258f9](https://github.com/event4u-app/agent-config/commit/fe258f9da91b594f06837694619a5f6934e5a0dc))
421
+ * **roadmap:** archive the authoring-contract roadmap ([4aea8f7](https://github.com/event4u-app/agent-config/commit/4aea8f7a241a063ed371edd1f53fad31e56340a4))
505
422
 
506
- ### Chores
423
+ ### Other
507
424
 
508
- * **roadmap:** close carrier-layer-convergence Phases 1-2 on the measurement ([bc42809](https://github.com/event4u-app/agent-config/commit/bc42809689634578e52501470f299822624e15ae))
509
- * **roadmap:** archive road-to-scripts-settings-defaults, complete ([e3af4c5](https://github.com/event4u-app/agent-config/commit/e3af4c56c1149a96254f1e7e3c1807a8f53744b5))
510
- * **budget:** re-baseline the packed-tarball cap, 6.9 to 7.8, maintainer-decided ([04ca7d8](https://github.com/event4u-app/agent-config/commit/04ca7d84f93c33999b02361c9baa4e61a181a07c))
425
+ * **council-integrity:** re-bind after merging origin/main a second time ([dd58e0c](https://github.com/event4u-app/agent-config/commit/dd58e0c7c46c27ec0784621096c7f091fd29c44e))
426
+ * **council-integrity:** re-bind after merging origin/main ([eb84ecb](https://github.com/event4u-app/agent-config/commit/eb84ecb6c0bee33c4d9ec43b85b50493badf4b26))
427
+ * **council-integrity:** re-bind the findings artefact to the fixed scope ([267ff3f](https://github.com/event4u-app/agent-config/commit/267ff3f3b4dae46a82bc38a4d1399d93b0304e57))
428
+ * **council-integrity:** record R2 completion-review findings before any fix ([ccf6650](https://github.com/event4u-app/agent-config/commit/ccf6650bbe7287a92e58177d6fe9ef8fc1cbb6a3))
511
429
 
512
- Tests: 12729 (+38 since 9.30.0)
430
+ Tests: 13068 (+133 since 9.33.0)
513
431
 
514
432
  # Era: pre-4.0.0 — archived
515
433
 
@@ -167,9 +167,11 @@ Markdown, no host API). Required fields, in order:
167
167
  ## Contract owed
168
168
  {what the current phase must produce before yielding}
169
169
  ## Decisions
170
- - {decisions taken, with one-line rationale}
170
+ - {decision taken, with one-line rationale} {optionally close the line with
171
+ `[reversible]` or `[irreversible]` — those two spellings exactly}
171
172
  ## Open questions
172
- - {unresolved items the next session must not silently drop}
173
+ - {unresolved items the next session must not silently drop — each as a
174
+ question ending in `?`; write `none` when there genuinely are none}
173
175
  ## Next command
174
176
  {the single command or step to run first on resume}
175
177
  ```
@@ -177,7 +179,11 @@ Markdown, no host API). Required fields, in order:
177
179
  **Resume rule:** a workflow skill's step 0 checks for this file and resumes
178
180
  from its contract (mode-inference table) instead of re-deriving state; a
179
181
  long phase refreshes the file before yielding. Validated by
180
- `lint_handoffs.ts` when present — a missing required field is red.
182
+ `lint_handoffs.ts` when present — a missing required field is red, and so is an
183
+ `## Open questions` section that answers neither way (blank, or a bare `TBD` /
184
+ `TODO` / `...`). A `?`-terminated question passes; so does an explicit `none` —
185
+ the check exists to stop a blank section reading as an all-clear, not to force a
186
+ question where there is none.
181
187
 
182
188
  **Critical-planning-file safety protocol** (applies to HANDOFF.md and agent
183
189
  roadmap edits): read the current file FIRST; take a timestamped backup copy
@@ -225,6 +231,12 @@ do not auto-execute.
225
231
  - **Branch name is critical** — always include it.
226
232
  - **Open tasks are critical** — the new chat needs to know what's left.
227
233
  - **Decisions are important** — prevents the new chat from re-asking settled questions.
234
+ A decision line may close with `[reversible]` or `[irreversible]`, which tells the
235
+ successor "we picked A over B, easy to revisit" apart from "we already migrated the
236
+ data". The tag is optional; those two spellings are the only accepted ones, and a
237
+ near-miss (`[reversble]`, `[Irreversible]`) is a validation error rather than a
238
+ silently untagged line. No claim is made that tagging improves resumption — that
239
+ stays the registered, unmeasured `envelope_resume_success` metric.
228
240
  - **File list is optional** — only include if the new chat will need to edit specific files.
229
241
  - **NEVER render a printed handoff as live markdown** — see Iron Law above.
230
242
 
@@ -128,12 +128,42 @@ function _branch_touched_paths(root: string, base: string): Set<string> | null {
128
128
  return out;
129
129
  }
130
130
 
131
+ /**
132
+ * Paths where a repo-relative path is DATA, not a live reference — so
133
+ * rewriting it falsifies a record instead of keeping a link resolvable.
134
+ *
135
+ * Two classes, and the second is why this predicate exists at all:
136
+ *
137
+ * - `agents/evidence/**` — a committed record of what was true, or of what a
138
+ * reviewer was shown, at one point in time. Retroactively editing it makes it
139
+ * claim something that did not happen, which is the failure
140
+ * `evaluator-independence` exists to prevent ("the prompt ships with the
141
+ * verdict" is worthless if a later sweep can edit the prompt).
142
+ * - `*.patch` anywhere — a patch's `diff --git a/… b/…` and `+++ b/…` lines are
143
+ * the payload. Rewriting them detaches the patch from the commit it records
144
+ * AND makes `git apply` target a path the diff never created.
145
+ *
146
+ * Measured 2026-08-11: archiving one roadmap rewrote four frozen artefacts
147
+ * under `agents/evidence/reviews/`, including the `diff.patch` headers of a
148
+ * recorded review input. Nothing caught it — the sweep reported it as
149
+ * "4 ref(s) migrated", which reads like success.
150
+ */
151
+ const _FROZEN_RECORD_PREFIXES: readonly string[] = ['agents/evidence/'];
152
+
153
+ /** Is `rel` a frozen record whose path strings must not be rewritten? */
154
+ export function _is_frozen_record(rel: string): boolean {
155
+ const norm = rel.split(path.sep).join('/');
156
+ return _FROZEN_RECORD_PREFIXES.some((p) => norm.startsWith(p)) || norm.endsWith('.patch');
157
+ }
158
+
131
159
  /**
132
160
  * Rewrite full-path references `old_rel` → `new_rel` in tracked files.
133
161
  *
134
162
  * Only the exact repo-relative path is rewritten (bare-filename mentions are
135
163
  * left alone). The archived file's own path never matches because the search
136
- * string is the un-archived path.
164
+ * string is the un-archived path. Frozen records are skipped — see
165
+ * `_is_frozen_record`; a link left dangling in a historical record is correct,
166
+ * because the record describes a tree that no longer exists.
137
167
  */
138
168
  function _inbound_ref_rewrite(
139
169
  root: string,
@@ -165,6 +195,10 @@ function _inbound_ref_rewrite(
165
195
  // skip the roadmap file itself
166
196
  continue;
167
197
  }
198
+ if (_is_frozen_record(rel)) {
199
+ // A record of a past state — rewriting it falsifies the record.
200
+ continue;
201
+ }
168
202
  const fp = path.join(root, rel);
169
203
  let text: string;
170
204
  try {
@@ -184,18 +184,27 @@ Each domain ships `data/manifest.json` beside its CSVs — declaring its
184
184
  - BM25 tokenizer drops tokens ≤2 chars — "UI", "a11y" style queries need
185
185
  longer companions.
186
186
 
187
- ## Runtime-safety review (Step 1.6 record)
188
-
189
- - **Read-only by default** — the engine opens corpus CSVs under the
190
- manifest's directory only (`resolve_data_path` refuses absolute paths
191
- and `..` escapes).
192
- - **Single write surface** — `--persist DIR` (opt-in) writes markdown
193
- under the caller-chosen `DIR`; nothing else writes.
194
- - **No network, no subprocess, no secrets** — pure stdlib; embeddings /
195
- remote retrievers are intentionally not implemented (ADR-061 §2).
196
- - `rules_module` executes a manifest-adjacent TypeScript module (dynamic
197
- `import()`) — same trust domain as the skill that ships the manifest;
198
- containment enforced by `resolve_data_path`.
187
+ ## Security constraints (Step 1.6 runtime-safety record)
188
+
189
+ Four scripts ship under `scripts/`: `ground.ts` (CLI), `bm25_search.ts`,
190
+ `decision_engine.ts`, `schema_validator.ts`.
191
+
192
+ - **What they may touch** — corpus CSVs and the manifest under the
193
+ manifest's own directory. `resolve_data_path` refuses absolute paths and
194
+ `..` escapes, so the manifest directory is the read boundary.
195
+ - **What they must never do** — read outside that directory, reach the
196
+ network, or spawn a subprocess. Embeddings and remote retrievers are
197
+ intentionally not implemented (ADR-061 §2), and that is a containment
198
+ decision, not a missing feature.
199
+ - **Default invocation** — read-only. The single write surface is opt-in
200
+ `--persist DIR`, which writes `MASTER.md` (and `pages/<page>.md` when
201
+ `--page` is given) under `DIR/design-system/<project-slug>/`. Nothing
202
+ else writes.
203
+ - **Outbound** — nothing. No network access at all.
204
+
205
+ One qualified exception: `rules_module` executes a manifest-adjacent
206
+ TypeScript module via dynamic `import()`. That is the same trust domain as
207
+ the skill shipping the manifest, and its containment is `resolve_data_path`.
199
208
 
200
209
  ## See also
201
210
 
@@ -113,6 +113,21 @@ four-operation split assigns to *rules/linters*, not the corpus).
113
113
  3. `validate` report — exit 0 evidence, or the violations list handed to
114
114
  the polish round as `token_violation` findings.
115
115
 
116
+ ## Security constraints
117
+
118
+ `scripts/tokens.ts` is the only shipped script.
119
+
120
+ - **What it may touch** — the `tokens.json` config path it is given, the
121
+ directory it is asked to `validate`, and the `--output` path it is asked
122
+ to write. Nothing outside the paths named on the command line.
123
+ - **What it must never do** — reach the network, spawn a subprocess, or
124
+ write to a path the caller did not name. It never edits the generated CSS
125
+ it produced earlier; regeneration replaces, it does not patch.
126
+ - **Default invocation** — read-only. `generate` prints to stdout unless
127
+ `--output PATH` is passed; `--output` is the flag that makes it mutating,
128
+ and it creates only that file's parent directory. `validate` never writes.
129
+ - **Outbound** — nothing. No network access.
130
+
116
131
  ## Do NOT
117
132
 
118
133
  - Do NOT hand-edit generated CSS — `tokens.json` is the single source.
@@ -299,6 +299,30 @@ carve-out for the tool-specific part.
299
299
  values the component no longer accepts is stale documentation; keep them beside
300
300
  the component and update them in the same change.
301
301
 
302
+ ## Security constraints
303
+
304
+ `scripts/shadcn_add.ts` is the only shipped script, and it is the single
305
+ subprocess-plus-network surface in this suite — treat it accordingly.
306
+
307
+ - **What it may touch** — the project rooted at `--project-root` (default
308
+ `cwd`): it reads `components.json` there and lets the upstream CLI write
309
+ the generated primitives under that root. Nothing outside it.
310
+ - **What it must never do** — run without the exact `npx` command and the
311
+ component list having been shown to the user first, per the gate above.
312
+ Never pass `--overwrite` unprompted; never treat a non-zero exit as
313
+ success; never work around a missing `npx` silently
314
+ ([`missing-tool-handling`](../../rules/missing-tool-handling.md)).
315
+ - **Default invocation** — mutating. A bare `shadcn_add <component>`
316
+ spawns `npx shadcn@latest add <component>` and writes into the project.
317
+ `--dry-run` is the read-only path and prints the command it would run;
318
+ `--list` is read-only too. Use `--dry-run` for the proposal step.
319
+ - **Outbound** — yes, and this is the point of the gate: `npx` resolves
320
+ `shadcn@latest` from the public npm registry on every live run, so both
321
+ the code fetched and the components written are chosen upstream, at run
322
+ time, not pinned here. That is the egress leg of the lethal trifecta
323
+ ([`lethal-trifecta-guard`](../../rules/lethal-trifecta-guard.md)); the
324
+ human confirmation is what keeps it off an autonomous path.
325
+
302
326
  ## Do NOT
303
327
 
304
328
  - Do NOT install `shadcn-ui` from npm — primitives are scaffolded.
@@ -355,3 +355,26 @@ Good description (trigger-shaped, names domain + symptoms):
355
355
  Bad description (no trigger, too vague):
356
356
 
357
357
  > "Commit conventions"
358
+
359
+ ### Contrastive-example slot (optional, for the rule body)
360
+
361
+ The pair above governs descriptions. A rule whose obligation is easy to agree
362
+ with and hard to apply — what counts as a cheap question, when an interrupt is
363
+ an interrupt, which reply mirrors the user's language — needs the same treatment
364
+ for the **behaviour**, not just the frontmatter.
365
+
366
+ Six live corpora already carry those pairs:
367
+ [`direct-answers-demos`](../../../docs/guidelines/agent-infra/direct-answers-demos.md),
368
+ [`asking-and-brevity-examples`](../../../docs/guidelines/agent-infra/asking-and-brevity-examples.md),
369
+ [`language-and-tone-examples`](../../../docs/guidelines/agent-infra/language-and-tone-examples.md),
370
+ and `autonomy-examples` / `interrupt-examples` / `cheap-question-mechanics` under
371
+ `src/agent-src/contexts/execution/`. Follow one; do not invent a format.
372
+
373
+ The shape they share: the **wrong** version in the form it actually gets
374
+ written, the **right** version, and one line of **why** — the why is what makes
375
+ it a rule rather than a memorised case.
376
+
377
+ Where the pairs go is a size decision, not a taste one. A rule body is capped at
378
+ 200 lines hard / 120 soft, so more than two or three pairs belong in a guideline
379
+ or context file the rule points at — same split
380
+ [`skill-writing`](../skill-writing/SKILL.md) § Contrastive-example slot uses.