@event4u/agent-config 9.28.0 → 9.30.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 (209) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +6 -6
  3. package/CHANGELOG.md +172 -5
  4. package/README.md +2 -1
  5. package/agents/templates/.ai-council.yml.example +55 -24
  6. package/dist/agent-src/commands/analyze/inbox.md +22 -1
  7. package/dist/agent-src/commands/cost/report.md +2 -2
  8. package/dist/agent-src/commands/explain-run.md +31 -1
  9. package/dist/agent-src/commands/team/adversarial.md +8 -7
  10. package/dist/agent-src/commands/team/delegate.md +14 -12
  11. package/dist/agent-src/commands/team/review.md +9 -8
  12. package/dist/agent-src/commands/team/status.md +9 -8
  13. package/dist/agent-src/commands/team.md +29 -19
  14. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +88 -2
  15. package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +29 -21
  16. package/dist/agent-src/contexts/execution/host-capability-manifest.md +26 -15
  17. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +22 -1
  18. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +17 -0
  19. package/dist/agent-src/contexts/execution/subagent-response-contract.md +65 -1
  20. package/dist/agent-src/contexts/execution/subagent-routing.md +13 -11
  21. package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +25 -0
  22. package/dist/agent-src/contexts/execution/subagent-steering.md +6 -3
  23. package/dist/agent-src/rules/delegation-policy.md +11 -7
  24. package/dist/agent-src/rules/preservation-guard.md +9 -0
  25. package/dist/agent-src/rules/settings-ask-protocol.md +8 -7
  26. package/dist/agent-src/rules/token-budget-discipline.md +1 -1
  27. package/dist/agent-src/scripts/roadmap_gates.ts +312 -0
  28. package/dist/agent-src/scripts/update_roadmap_progress.ts +72 -4
  29. package/dist/agent-src/skills/forensics-report/SKILL.md +114 -0
  30. package/dist/agent-src/skills/forensics-report/evals/triggers.json +17 -0
  31. package/dist/agent-src/skills/premortem/SKILL.md +30 -1
  32. package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +2 -1
  33. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +17 -5
  34. package/dist/agent-src/skills/subagent-orchestration/schemas/subagent-status.json +61 -3
  35. package/dist/agent-src/skills/test-case-discovery/SKILL.md +1 -1
  36. package/dist/agent-src/templates/AGENTS.md +4 -4
  37. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  38. package/dist/agent-src/templates/roadmaps.md +23 -0
  39. package/dist/cli/registry.js +2 -0
  40. package/dist/cli/registry.js.map +1 -1
  41. package/dist/cli-delegate/{chunk-22GCIJ2O.js → chunk-66OVWGB5.js} +1 -1
  42. package/dist/cli-delegate/{chunk-7OMQCH4V.js → chunk-BTJNRUX3.js} +22 -35
  43. package/dist/cli-delegate/{chunk-DVRS2KVR.js → chunk-DDUNNFYX.js} +24 -17
  44. package/dist/cli-delegate/{chunk-PQSAQKHW.js → chunk-EQY4FLJB.js} +3 -3
  45. package/dist/cli-delegate/{chunk-2BE5I2MN.js → chunk-IYTGIG2Y.js} +155 -91
  46. package/dist/cli-delegate/{chunk-GB2FSUEE.js → chunk-LCFJIQ4J.js} +32 -0
  47. package/dist/cli-delegate/{chunk-VSYT7OHO.js → chunk-LVRYBKTI.js} +31 -2
  48. package/dist/cli-delegate/chunk-MMJL4TIX.js +18 -0
  49. package/dist/cli-delegate/{chunk-JXARCGVN.js → chunk-MP3JT3IU.js} +1 -1
  50. package/dist/cli-delegate/chunk-O3CO5BFB.js +161 -0
  51. package/dist/cli-delegate/{chunk-REKCMYOU.js → chunk-PFBV6XRT.js} +36 -20
  52. package/dist/cli-delegate/chunk-RVGBH4XK.js +142 -0
  53. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  54. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  55. package/dist/cli-delegate/cmd_conformance.js +2803 -137
  56. package/dist/cli-delegate/cmd_doctor.js +10 -5
  57. package/dist/cli-delegate/cmd_explain.js +2 -2
  58. package/dist/cli-delegate/cmd_export.js +4 -4
  59. package/dist/cli-delegate/cmd_handoff.js +88 -8
  60. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  61. package/dist/cli-delegate/cmd_migrate.js +2 -2
  62. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  63. package/dist/cli-delegate/cmd_prune.js +4 -4
  64. package/dist/cli-delegate/cmd_route_audit.js +3 -2
  65. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  66. package/dist/cli-delegate/cmd_session_recycle.js +177 -0
  67. package/dist/cli-delegate/cmd_settings_get.js +2 -8
  68. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  69. package/dist/cli-delegate/cmd_settings_set.js +2 -2
  70. package/dist/cli-delegate/cmd_sync.js +4 -4
  71. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  72. package/dist/cli-delegate/cmd_update.js +1 -1
  73. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  74. package/dist/cli-delegate/cmd_validate.js +4 -4
  75. package/dist/cli-delegate/cmd_versions.js +1 -1
  76. package/dist/discovery/deprecation-report.md +1 -1
  77. package/dist/discovery/discovery-manifest.json +72 -23
  78. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  79. package/dist/discovery/discovery-manifest.summary.md +3 -2
  80. package/dist/discovery/orphan-report.md +1 -1
  81. package/dist/discovery/packs.json +39 -2
  82. package/dist/discovery/trust-report.md +2 -2
  83. package/dist/discovery/workspaces.json +12 -4
  84. package/dist/hooks/dispatch.js +2278 -611
  85. package/dist/install/install.mjs +56 -17
  86. package/dist/mcp/registry-manifest.json +3 -3
  87. package/dist/mcp/server.json +2 -2
  88. package/dist/mcp/server.mjs +4122 -699
  89. package/dist/router.json +1 -1
  90. package/dist/scripts/_lib/agent_settings.js +54 -0
  91. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  92. package/dist/scripts/condense.js +147 -2
  93. package/dist/scripts/condense.js.map +1 -1
  94. package/dist/server/schemas/settings.js +12 -7
  95. package/dist/server/schemas/settings.js.map +1 -1
  96. package/dist/shared/settingsCarveOut.js +0 -9
  97. package/dist/shared/settingsCarveOut.js.map +1 -1
  98. package/dist/shared/settingsClasses.js +11 -9
  99. package/dist/shared/settingsClasses.js.map +1 -1
  100. package/dist/ui/assets/index-B5qGYOJo.js +26 -0
  101. package/dist/ui/assets/index-B5qGYOJo.js.map +1 -0
  102. package/dist/ui/index.html +1 -1
  103. package/docs/contracts/settings-classes.md +58 -12
  104. package/package.json +1 -1
  105. package/src/agent-src/scripts/roadmap_gates.ts +312 -0
  106. package/src/agent-src/scripts/update_roadmap_progress.ts +72 -4
  107. package/src/agent-src/templates/AGENTS.md +4 -4
  108. package/src/config/agent-settings.template.yml +88 -66
  109. package/src/config/discovery/packs.yml +11 -0
  110. package/src/config/discovery/workspaces.yml +1 -1
  111. package/src/config/dispatch-economy-metrics.json +61 -0
  112. package/src/config/evaluator-budgets.json +4 -4
  113. package/src/config/gate-violation-baselines.json +3 -3
  114. package/src/config/hook-token-budget.json +91 -0
  115. package/src/config/recycle-threshold-budget.json +12 -0
  116. package/src/config/rule-enforcement-baseline.json +86 -0
  117. package/src/scripts/_cli/cmd_conformance.ts +31 -44
  118. package/src/scripts/_cli/cmd_doctor.ts +65 -48
  119. package/src/scripts/_cli/cmd_session_recycle.ts +226 -0
  120. package/src/scripts/_dispatch.bash +23 -0
  121. package/src/scripts/_lib/agent_settings.ts +58 -0
  122. package/src/scripts/_lib/auto_dispatch.corpus.test.ts +1 -1
  123. package/src/scripts/_lib/auto_dispatch.ts +23 -18
  124. package/src/scripts/_lib/capsule_trigger.ts +124 -0
  125. package/src/scripts/_lib/host_capability.ts +63 -6
  126. package/src/scripts/_lib/judgment_ladder.ts +634 -0
  127. package/src/scripts/_lib/orchestration_gate.ts +8 -0
  128. package/src/scripts/_lib/orchestration_record.ts +78 -10
  129. package/src/scripts/_lib/orchestration_savings.ts +1 -1
  130. package/src/scripts/_lib/recycle_envelope_paths.ts +35 -0
  131. package/src/scripts/_lib/self_repair.ts +354 -13
  132. package/src/scripts/_lib/self_repair_store.ts +28 -0
  133. package/src/scripts/_lib/session_eol.ts +230 -0
  134. package/src/scripts/_lib/session_role.ts +42 -0
  135. package/src/scripts/_lib/subagent_capsule.ts +341 -0
  136. package/src/scripts/_lib/subagent_response.ts +94 -0
  137. package/src/scripts/_lib/subagent_spawn.ts +13 -0
  138. package/src/scripts/_lib/subagent_steering.ts +9 -4
  139. package/src/scripts/_lib/tier_budget_routing.ts +6 -1
  140. package/src/scripts/_lib/worker_budget.ts +37 -2
  141. package/src/scripts/ai_council/clients.ts +126 -55
  142. package/src/scripts/ai_council/config.ts +94 -6
  143. package/src/scripts/ai_council/handoff.ts +113 -0
  144. package/src/scripts/ai_council/modes.ts +19 -4
  145. package/src/scripts/ai_council/orchestrator.ts +105 -0
  146. package/src/scripts/ai_council/quorum.ts +84 -0
  147. package/src/scripts/ai_council/session.ts +44 -0
  148. package/src/scripts/ai_council/transport_resolver.ts +127 -1
  149. package/src/scripts/ai_team/availability.ts +110 -0
  150. package/src/scripts/ai_team/config.ts +34 -14
  151. package/src/scripts/ai_team/team_dispatch.ts +71 -29
  152. package/src/scripts/ask_transport.ts +221 -0
  153. package/src/scripts/bench_critic_protocol.ts +396 -0
  154. package/src/scripts/bench_hook_injection.ts +234 -0
  155. package/src/scripts/check_adr_frontmatter.ts +84 -40
  156. package/src/scripts/check_branch_freshness.ts +1 -0
  157. package/src/scripts/check_corpus_staleness.ts +18 -4
  158. package/src/scripts/check_detector_corpus.ts +219 -0
  159. package/src/scripts/check_gitignore_freshness.ts +42 -8
  160. package/src/scripts/check_hook_bundle_freshness.ts +24 -1
  161. package/src/scripts/check_kernel_prefix_stability.ts +1 -0
  162. package/src/scripts/check_standing_rule_delivery.ts +73 -32
  163. package/src/scripts/check_static_layer_stability.ts +154 -0
  164. package/src/scripts/check_suppression_hygiene.ts +48 -0
  165. package/src/scripts/condense.ts +162 -2
  166. package/src/scripts/council_cli.ts +401 -25
  167. package/src/scripts/dispatch_economy_report.ts +448 -0
  168. package/src/scripts/dispatch_r2_reviewer.ts +15 -2
  169. package/src/scripts/explain_run.ts +206 -4
  170. package/src/scripts/forensics_report.ts +333 -0
  171. package/src/scripts/generate_settings_reference.ts +1 -0
  172. package/src/scripts/handoff_context_hook.ts +112 -4
  173. package/src/scripts/hook_manifest.yaml +117 -10
  174. package/src/scripts/hooks/concern_registry.ts +8 -0
  175. package/src/scripts/hooks/delegation_nudge_hook.ts +106 -35
  176. package/src/scripts/hooks/dispatch_hook.ts +39 -2
  177. package/src/scripts/hooks/edit_shape_hook.ts +303 -0
  178. package/src/scripts/hooks/orchestration_record_hook.ts +19 -1
  179. package/src/scripts/hooks/reread_guard_hook.ts +314 -0
  180. package/src/scripts/hooks/rtk_wrap_hook.ts +133 -14
  181. package/src/scripts/hooks/session_eol_hook.ts +268 -0
  182. package/src/scripts/hooks/turn_end_gate_hook.ts +507 -0
  183. package/src/scripts/install-hooks.sh +1 -1
  184. package/src/scripts/language_mirror_hook.ts +89 -0
  185. package/src/scripts/lint_decision_impact.ts +14 -1
  186. package/src/scripts/lint_discovery_vocabulary.ts +2 -0
  187. package/src/scripts/lint_hook_manifest.ts +82 -0
  188. package/src/scripts/lint_never_silent.ts +276 -0
  189. package/src/scripts/lint_no_activation_gates.ts +271 -0
  190. package/src/scripts/lint_readme_serial_comma.ts +1 -0
  191. package/src/scripts/lint_rule_enforcement_declaration.ts +347 -0
  192. package/src/scripts/measure_turn_end_gate.ts +194 -0
  193. package/src/scripts/orchestration_record.ts +12 -1
  194. package/src/scripts/rebuild_hook_bundle.ts +178 -0
  195. package/src/scripts/release.ts +74 -2
  196. package/src/scripts/report_conformance_funnel.ts +284 -0
  197. package/src/scripts/report_imperative_density.ts +1 -0
  198. package/src/scripts/routing_doctor.ts +118 -36
  199. package/src/scripts/score_skill_selection.ts +19 -5
  200. package/src/scripts/self_repair_cli.ts +337 -59
  201. package/src/scripts/session_eol_report.ts +261 -0
  202. package/src/scripts/team_events_spike.ts +271 -0
  203. package/src/scripts/team_review_gate_hook.ts +31 -9
  204. package/src/server/schemas/settings.ts +24 -17
  205. package/src/shared/settingsCarveOut.ts +0 -10
  206. package/src/shared/settingsClasses.ts +11 -9
  207. package/src/templates/compact-instructions.md +40 -0
  208. package/dist/ui/assets/index-DmR0mbk4.js +0 -26
  209. package/dist/ui/assets/index-DmR0mbk4.js.map +0 -1
@@ -231,7 +231,8 @@ cost:
231
231
  # separate tier cap — the global ceilings above still apply and the
232
232
  # budget-routing relation works purely off them. Set a value to cap one
233
233
  # tier (e.g. cheap: 10 keeps haiku-class delegation under $10/day-window
234
- # of the ledger). Consumed by subagents.budget_routing below.
234
+ # of the ledger). Informational since the budget_routing key was removed
235
+ # (always-on orchestration): routing is judgment-ladder-driven.
235
236
  per_tier:
236
237
  cheap: null
237
238
  medium: null
@@ -743,60 +744,27 @@ code_style:
743
744
 
744
745
  # --- Subagent orchestration ---
745
746
  #
746
- # Controls model selection, parallelism, and AUTOMATIC orchestration for
747
- # subagent-based workflows (/do-and-judge, /do-in-steps, /judge, and the
748
- # auto-dispatch layer). Empty values fall back to the runtime defaults
749
- # described in .augment/contexts/subagent-configuration.md and
747
+ # Always-on orchestration (road-to-always-on-orchestration Phase 1): the
748
+ # subagent layer carries no per-run on/off setting. `subagents.enabled`,
749
+ # `subagents.auto`, and `subagents.host_capabilities` were REMOVED — a fresh
750
+ # install with this section untouched still activates auto-dispatch on any
751
+ # host whose capability probe reports a subagent primitive. Capability is a
752
+ # fact resolved from the host (registry + a live environment probe), never a
753
+ # setting; the one surviving incident-only control is `emergency.
754
+ # orchestration_halt` below. A leftover `subagents.enabled` / `subagents.auto`
755
+ # / `subagents.host_capabilities` key from an older install is ignored (one
756
+ # deprecation-warning line on load, per-key, per run).
757
+ #
758
+ # What remains below tunes HOW a delegated sub-task runs, never WHETHER the
759
+ # layer exists. Empty values fall back to the runtime defaults described in
760
+ # .augment/contexts/subagent-configuration.md and
750
761
  # .augment/contexts/execution/auto-orchestration-activation.md.
751
762
  subagents:
752
- # Global master switch for the whole subagent layer.
753
- # true (default) = the layer is available; false = fully disabled, the
754
- # canonical kill-switch (no auto-dispatch, no model routing, in-session only).
755
- enabled: true
756
-
757
- # Automatic-dispatch mode: off | ask | on
758
- #
759
- # off = never auto-dispatch; subagents only via an explicit command.
760
- # ask = classify the task; when delegable, ask once before dispatching.
761
- # on = auto-dispatch delegable tasks without asking (surface the choice
762
- # in one line).
763
- #
764
- # SHIPPED default is `on` on hosts whose capability manifest reports
765
- # `subagent_spawn: true`, and `off` on hosts without a subagent primitive.
766
- # Auto-dispatch stays a no-op wherever the manifest reports
767
- # `subagent_spawn: false`, regardless of this value.
768
- #
769
- # The default was `ask` until 2026-07-09, when it was flipped to `on` after a
770
- # re-evaluation (agents/settings/contexts/orchestration-default-flip-verdict.md
771
- # § 2026-07-09; ADR-117). The flip rests on a bounded-downside argument, NOT a
772
- # passed benchmark: delegable slices are already cost-routed to the cheapest
773
- # capable tier, classification fires only on real structural signals (never
774
- # unstructured or tiny work), and every return is verified — so `on` cannot
775
- # delegate frontier-priced or speculative work. `resolveShippedDefault()`
776
- # remains the telemetry-driven DEMOTION gate: a measured regression demotes
777
- # back to `ask`.
778
- auto: "on"
779
-
780
763
  # Route delegable sub-tasks to the lowest-capable model tier (cost + speed
781
764
  # via model downshift). true (default) = downshift per declared model_tier;
782
765
  # false = every subagent runs on the session tier.
783
766
  downshift: true
784
767
 
785
- # Budget-aware cheap-request delegation (docs/contracts/budget-routing.md).
786
- # Picks the cheapest CLASSIFIER-ADEQUATE tier that has available budget
787
- # (cost.budgets.per_tier above); cheap exhausted but strong funded → strong
788
- # tier; everything exhausted → session model + notice. Work is never
789
- # blocked to save money, and the session model is never switched — routing
790
- # happens as delegation with a model override. DISTINCT from `downshift`
791
- # above: downshift is the quality/cost trade-off knob, budget_routing is
792
- # the resource-availability gate (council 2026-08-03).
793
- # ask = (default) first budget-motivated downshift of a session asks once
794
- # auto = apply the relation silently (telemetry line per routed request)
795
- # off = today's behavior; single-flip rollback — QUOTE it ("off") when
796
- # editing: bare off is YAML-1.1 boolean false (readers coerce, but
797
- # the quoted form is the unambiguous one, same as `auto: "on"`)
798
- budget_routing: ask
799
-
800
768
  # Prefer a separate-quota-pool model for delegable sub-tasks WHERE the host
801
769
  # manifest reports `separate_quota_pool: true` (e.g. a subscription whose
802
770
  # Sonnet allowance is distinct from Opus). Optional bonus only — behaviour is
@@ -811,12 +779,6 @@ subagents:
811
779
  medium: ""
812
780
  high: ""
813
781
 
814
- # Optional host-capability override (see
815
- # .augment/contexts/execution/host-capability-manifest.md). Any field set
816
- # here wins; any field omitted falls back to the all-false safe default.
817
- # Leave empty to let the agent resolve the manifest from host knowledge.
818
- host_capabilities: {}
819
-
820
782
  # Model for implementer subagents (empty = same tier as the session model)
821
783
  implementer_model: ""
822
784
 
@@ -824,6 +786,14 @@ subagents:
824
786
  # (empty = one tier above implementer: opus if sonnet, sonnet if haiku)
825
787
  judge_model: ""
826
788
 
789
+ # Session-wide model CEILING for subagents (token-economy-dispatch Phase
790
+ # 5.2). Empty (default) = no ceiling. When set (e.g. "claude-sonnet-4-5"),
791
+ # suite-owned CLI spawn wrappers export CLAUDE_CODE_SUBAGENT_MODEL to the
792
+ # sessions THEY launch — a spend cap on every subagent those sessions
793
+ # spawn. Class C: a human sets it; the agent never writes it and never
794
+ # infers one.
795
+ model_ceiling: ""
796
+
827
797
  # Maximum number of parallel subagent invocations
828
798
  # Integer, default 3. Set to 1 to serialize. Hard cap enforced by runtime.
829
799
  max_parallel: 3
@@ -878,17 +848,23 @@ worktrees:
878
848
 
879
849
  # --- AI Team (cross-model strong-pair review — /team family) ---
880
850
  #
881
- # Governs the default-off `/team` capability family: one strong external
882
- # model (via the codex CLI, subscription-authed) reviews inside the repo —
883
- # the depth complement to the council's breadth. Schema + validation
884
- # contract: `docs/contracts/ai-team-config.md`. The loader
885
- # (`src/scripts/ai_team/config.ts`) rejects unknown keys fail-closed.
851
+ # One strong external model (via the codex CLI, subscription-authed)
852
+ # reviews inside the repo — the depth complement to the council's breadth.
853
+ # Schema + validation contract: `docs/contracts/ai-team-config.md`. The
854
+ # loader (`src/scripts/ai_team/config.ts`) rejects unknown keys fail-closed.
855
+ #
856
+ # Always-on orchestration (road-to-always-on-orchestration Phase 1, Step
857
+ # 1.3): `/team` carries no per-run on/off setting — `enabled` was REMOVED.
858
+ # A fresh install with this section untouched still surfaces `/team` when
859
+ # the codex CLI resolves on $PATH AND some auth for it is detectable
860
+ # (subscription login, API key, key file, or env key); otherwise every
861
+ # invocation degrades with one clear "codex CLI not available" line
862
+ # instead of a silent enabled:false refusal. Verify with `agent-config
863
+ # doctor --check team`. The one surviving incident-only control is
864
+ # `emergency.orchestration_halt` below. A leftover `enabled` key from an
865
+ # older install is accepted and ignored (one deprecation-warning line on
866
+ # load, per run).
886
867
  ai_team:
887
- # Master switch. false (default) = /team commands are never suggested
888
- # and every invocation refuses with an enable pointer; true = the
889
- # family is live (individual gates below still apply).
890
- enabled: false
891
-
892
868
  # Model handed to the codex CLI. 'auto' (default) = pass NO --model
893
869
  # flag, the codex CLI's own default applies — this tracks the
894
870
  # subscription's current strongest model instead of pinning a stale
@@ -897,8 +873,9 @@ ai_team:
897
873
 
898
874
  # Second opt-in for the ONLY wrapper that delegates write access
899
875
  # (/team:delegate → the plugin's native-Codex worker). false (default)
900
- # = delegate refuses with an enable pointer even when ai_team.enabled
901
- # is true. Both keys must be true before delegation is reachable.
876
+ # = delegate refuses even when /team itself is available. Availability
877
+ # (codex CLI installed + authenticated) is necessary but not
878
+ # sufficient — this key must ALSO be true before delegation is reachable.
902
879
  allow_delegate: false
903
880
 
904
881
  # Per-day cap on team calls. Team calls count into the EXISTING
@@ -934,6 +911,23 @@ ai_team:
934
911
  # Positive integer.
935
912
  max_consecutive_blocks: 3
936
913
 
914
+ # --- Emergency orchestration halt (the one incident-only kill switch) ---
915
+ #
916
+ # NOT an activation gate — see docs/contracts/settings-classes.md § "The one
917
+ # exception". The always-on orchestration stack (subagents, council, team)
918
+ # has no per-layer on/off setting; this is the single audited switch that
919
+ # survives, for incident response only.
920
+ emergency:
921
+ # false (default) = the stack runs normally. Flipping this to true requires
922
+ # no ceremony — incidents are urgent. Flipping it back to false requires
923
+ # `orchestration_halt_justification` below to be a non-empty string; both
924
+ # transitions emit one telemetry line (enum/bool fields only).
925
+ orchestration_halt: false
926
+
927
+ # Required non-empty before `orchestration_halt` may return to false.
928
+ # Ignored while the halt is being armed (arming is ceremony-free).
929
+ orchestration_halt_justification: ""
930
+
937
931
  # --- Onboarding ---
938
932
  #
939
933
  # Tracks whether the initial setup flow (/onboard) has been completed
@@ -1196,6 +1190,34 @@ hooks:
1196
1190
  injection_scan:
1197
1191
  enabled: false
1198
1192
 
1193
+ # Stop-slot turn-end gate (road-to-conformance-round5 Phase 3). Default-OFF,
1194
+ # and it is the only concern in this file that can REFUSE a turn-end rather
1195
+ # than a tool call — so it soaks behind an explicit opt-in before it binds.
1196
+ #
1197
+ # Round 5 measured what it is for: both BLOCKING carriers reached zero
1198
+ # violations, neither ADVISORY carrier did, and 19 wrong-language replies
1199
+ # survived a pin that had fired 26-35 seconds earlier. A reminder at higher
1200
+ # frequency is the same failed mechanism running more often; a check at
1201
+ # delivery that can say no is a different one.
1202
+ #
1203
+ # enabled — master switch. false = the concern is a no-op costing one
1204
+ # settings read per turn-end.
1205
+ # promissory — detector A: the closing paragraph promises work not yet
1206
+ # performed while asking the user nothing (20 measured).
1207
+ # language — detector B: the user-visible prose is not in the pinned
1208
+ # language, with code, quotes, paths and identifiers already
1209
+ # excluded (19 measured).
1210
+ #
1211
+ # Both detectors default ON *within* the master switch, so opting in needs
1212
+ # one line, and either can be silenced without editing the hook manifest.
1213
+ # A refused turn continues in the same turn and is never refused twice —
1214
+ # re-entrancy is `stop_hook_active` plus a marker keyed on the last user
1215
+ # message, never on the reply.
1216
+ turn_end_gate:
1217
+ enabled: false
1218
+ promissory: true
1219
+ language: true
1220
+
1199
1221
  # PreToolUse RTK-wrap nudge (token-saving Phase 3). Default-OFF. When enabled
1200
1222
  # AND `rtk` is on PATH (a live probe — not a self-reported flag), warns (exit
1201
1223
  # 2, never blocks) "re-run wrapped with rtk" before a single verbose CLI
@@ -162,6 +162,17 @@
162
162
  size_class: small
163
163
  default_install: false
164
164
 
165
+ - id: forensics
166
+ label: Forensic Evidence
167
+ description: Machine-derived release evidence from git history alone — hotspot risk (change frequency x complexity) and change-coupling analyzers; deterministic, read-only, advisory to the release findings pipeline.
168
+ workspaces: [engineering]
169
+ requires: [engineering-base]
170
+ trust_level_default: experimental
171
+ surface_tier: lab
172
+ domain: engineering
173
+ size_class: small
174
+ default_install: false
175
+
165
176
  - id: python
166
177
  label: Python
167
178
  description: Python-language patterns.
@@ -13,7 +13,7 @@
13
13
  description: Code, tests, CI, reviews, architecture.
14
14
  example_roles: [Developer, CTO, Tech Lead]
15
15
  default_packs: [engineering-base, git]
16
- optional_packs: [php, laravel, symfony, javascript, typescript, react, nextjs, python, frontend-design, brand, analysis-workbench, scale-discipline, history-discipline]
16
+ optional_packs: [php, laravel, symfony, javascript, typescript, react, nextjs, python, frontend-design, brand, analysis-workbench, scale-discipline, history-discipline, forensics]
17
17
 
18
18
  - id: product
19
19
  label: Product
@@ -0,0 +1,61 @@
1
+ {
2
+ "_comment": "Registered metrics for road-to-token-economy-dispatch Phase 1 (registered BEFORE any reduction lever ships — the budget-ownership discipline of hook-latency-budget.json / preamble-payload-budget.json). Baseline anchor: road-to-cache-economy census 2026-07-30 (median subagent cold start 235.5k tokens written-or-uncached, C-1 cold-start dominance 69.7%). Thresholds are the roadmap's committed numbers; changing one is a PR citing evidence, never a drive-by edit.",
3
+ "schema_version": 1,
4
+ "registered_at": "2026-08-10",
5
+ "owner": "maintainer",
6
+ "review_by": "2026-11-10",
7
+ "metrics": {
8
+ "dispatch_floor": {
9
+ "definition": "Median init_tokens per role (worker, reviewer) and the COST-shaped init/work ratio per dispatched leg. init_tokens = billable_input of the leg's FIRST assistant record (raw — comparable to the cache-economy 235.5k baseline); work_tokens = leg total billable_input minus init_tokens. The RATIO is computed on weighted input units (read 0.1x, 5m write 1.25x, 1h write 2.0x — _lib/cc_transcript.ts weightedInputUnits), NOT raw billable_input: raw counts every later turn's cache-read re-transmission at full weight, which makes the 'more spent loading than working' threshold unmeetable by construction (measured live 2026-08-10: raw ratio 0.02 on the same legs). billable_input = input_tokens + cache_read_input_tokens + cache_creation_input_tokens (never usage.input_tokens alone).",
10
+ "source": "Primary: transcript ledger via src/scripts/_lib/cc_transcript.ts (per-agentId legs, message.id+requestId dedupe). Secondary: audit-log orchestration lines carrying init_tokens/work_tokens with floor_provenance=measured.",
11
+ "role_attribution": "HONEST LIMITATION until the role axis (Phase 2) ships: transcripts carry no session role, so all subagent legs report as role=worker; reviewer legs are attributed from audit-line agent_combo where present. The report states which attribution produced each number.",
12
+ "thresholds": {
13
+ "projection_mandatory_ratio": 1.0,
14
+ "_projection_mandatory": "sustained median init/work ratio > 1.0 for rung-1 workers over a review window makes Phase 3 (worker thin projection) mandatory, not optional",
15
+ "success_ratio_after_projection": 0.15,
16
+ "_success": "median ratio < 0.15 after Phase 3 ships is the roadmap's registered success criterion"
17
+ },
18
+ "baseline": {
19
+ "cold_start_median_tokens": 235500,
20
+ "cold_start_write_volume_share_pct": 69.7,
21
+ "at": "2026-07-30",
22
+ "source": "road-to-cache-economy first-party measurement (14-day window, host CC 2.1.220); re-measure on the post-9.29 tree is Phase 1's first report run"
23
+ }
24
+ },
25
+ "return_channel": {
26
+ "definition": "Orchestrator context growth per dispatch (roadmap Phase 6.3): serialized chars of the tool result returned into the parent context (return_channel_chars on sync completions, hook-carried). The failure this number exists to catch: the isolation win refunded through the return channel.",
27
+ "source": "orchestration_record_hook.ts on post_tool_use Agent/Task completions; a count derived from the result object, never its content.",
28
+ "thresholds": {
29
+ "envelope_cap_chars": 12000,
30
+ "_cap": "the committed MAX_ENVELOPE_CHARS from _lib/subagent_response.ts — a median return above it over the review window means transcript-shaped returns are flowing back and the envelope discipline is not holding"
31
+ }
32
+ },
33
+ "projection_quality": {
34
+ "definition": "Kill criterion for the worker thin projection (roadmap Phase 3.4, REGISTERED before the projection exists): worker verify-fail rate on projected sessions vs the pre-projection baseline.",
35
+ "source": "Orchestration lines' dispatch_outcome + verify_mode on role-marked sessions, compared against the same window pre-projection.",
36
+ "thresholds": {
37
+ "kill_margin_pp": 5,
38
+ "_kill": "verify-fail rate exceeding the pre-projection baseline by more than 5 percentage points over a 2-week review window reverts the projection for that rung and the regression is published (roadmap 3.4)"
39
+ },
40
+ "status": "armed-awaiting-projection: Phase 3.1-3.3 are data-window-gated (>= 2 weeks of rules_used); this criterion binds the moment a projection ships"
41
+ },
42
+ "ask_economy": {
43
+ "definition": "Rung-0.5 substitution and adoption (roadmap Phase 4.4): substitution = ask-routed lines / (ask-routed + rung-1 spawn lines); adoption = ask lines with dispatch_outcome DONE / all ask lines; escalation = the caller\u0027s follow-up SPAWN lines carrying route_taken=subagent + escalated=true + origin=dispatch-economy-2026 (the ask line itself cannot know it was insufficient).",
44
+ "source": "Audit-log orchestration lines with route_taken='ask' (written by src/scripts/ask_transport.ts, origin tag dispatch-economy-2026).",
45
+ "thresholds": {
46
+ "escalation_kill": 0.3,
47
+ "_kill": "if more than 30% of asks over the review window are re-asked or escalated to spawns, the rung's signals tighten or the rung dies — by evidence, in a PR (roadmap 4.4)"
48
+ }
49
+ },
50
+ "rules_efficiency": {
51
+ "definition": "rules_used / rules_carried per worker envelope (fields shipped by road-to-lean-agent-init, validated in _lib/orchestration_record.ts). Sustained low quota is simultaneously the Phase 3 cut-line evidence AND the demand-signal datum later/road-to-deferred-rule-retriever gate (2c) asks for — one measurement, two consumers.",
52
+ "source": "Audit-log orchestration lines (agents/runtime/state/audit/*.jsonl) where both fields are non-null.",
53
+ "thresholds": {
54
+ "low_quota_signal": 0.2,
55
+ "_low_quota": "a sustained median quota below 0.2 over the review window is the cut-line evidence Phase 3.1 requires (>= 2 weeks of data) and the retriever gate's demand signal"
56
+ }
57
+ }
58
+ },
59
+ "honest_null_consequence": "If the re-measured floor on the post-9.29 tree is materially smaller than the cache-economy baseline (roadmap step 1.4), phases 3-5 of road-to-token-economy-dispatch downgrade to blockers citing the null, and the null is published in docs/benchmark.md. A metric nobody re-runs by review_by is treated as the latency file's fossilization failure: the report command below is the re-verification procedure.",
60
+ "report_command": "./scripts-run src/scripts/dispatch_economy_report [--format text|json] [--root <transcripts>] [--audit-dir <dir>] [--max-age-days 14]"
61
+ }
@@ -58,11 +58,11 @@
58
58
  "deterministic": false
59
59
  },
60
60
  "cli_help_command_count": {
61
- "max": 95,
62
- "last_measured": 95,
63
- "last_measured_at": "2026-08-08",
61
+ "max": 97,
62
+ "last_measured": 97,
63
+ "last_measured_at": "2026-08-10",
64
64
  "method": "registry enumeration — count of `{ name: '...', disposition` entries in src/cli/registry.ts (NOT --help prose parsing; methods historically disagreed 74 vs 76 vs 79)",
65
- "baseline_note": "80 → 81 on 2026-08-03 (release 9.15.0 gate). This RECORDS growth that already shipped through its own reviewed PR; it does not authorize new surface. The +1 is f02db54c2 (fix(cli): register routing:doctor in the CLI registry) — the command existed, only its registry entry was missing, and the registering PR did not move this budget. The gate did its job again: breach WARNS on main and BLOCKS on release, which is the conscious-decision point rather than a silently raised cap. Re-measured 2026-08-03 via the pinned method: 81. Headroom stays zero by design — the next registry addition must move this number in its own PR. 81 → 82 on 2026-08-04: the `handoff` subcommand (road-to-agent-handoff-resume Phase 4) registers in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 82. 82 → 84 on 2026-08-04: the `route:explain` + `route:audit` verbs (routing-correctness validation surface) register in the same PR that adds the surface. Re-measured via the pinned method: 84. 84 → 85 on 2026-08-05: the `settings:set` verb (road-to-zero-ceremony-settings Phase 2 — the one agent-reachable settings writer) registers in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 85. 85 → 86 on 2026-08-06: the `conformance:behavior` verb (road-to-agent-behavior-conformance Phase 5 — replays the local transcript store through the four mechanised conformance checks) registers in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 86. 86 → 88 on 2026-08-07: the `sessions:list` + `sessions:claim` verbs (road-to-parallel-session-coordination — the shell surface of the shared session register, needed because /roadmap:next is command markdown and can only reach the register through a shell call) register in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 88. 88 → 89 on 2026-08-08: the `council:status` verb registers in the same PR that adds the surface, per this record's own contract. It exists because an agent in a consumer project announced \"kein Council konfiguriert (keine .agent-settings.yml)\" and substituted a weaker path while the council was configured user-globally the whole time — there was no verb that answered availability, so the only route was an inference from a filename, and the intuitive filename is the one location ADR-104 guarantees is never consulted. Re-measured via the pinned method: 89. 89 → 91 on 2026-08-08: the `self-repair:status` + `self-repair:release` verbs (the queued-defect reader and the single Hard-Floor-gated outward step of the self-repair loop — the loop is deliberately unable to publish unless a human runs the release command) register in the same PR that adds the surface, per this record's own contract. Landed alongside the +1 council:status move in the same branch. Re-measured via the pinned method: 91. 91 → 94 on 2026-08-08: the `packs:active`, `settings:get` and `mcp:available` verbs (road-to-capability-answerability Phase 2 — the three capability probes for the gaps that had none) register in the same PR that adds the surface, per this record's own contract. Each answers a question that was previously only inferable from a filename: which packs are active and from which file, what a setting resolves to and which file set it, and what is declared in mcp.json versus what can actually launch. 94 -> 95 in the same PR: `brand:status` (Phase 2.4 — brand-layer presence, which the rule depended on and no surface could answer). Re-measured twice via the pinned method on the unchanged tree: 95/95."
65
+ "baseline_note": "80 → 81 on 2026-08-03 (release 9.15.0 gate). This RECORDS growth that already shipped through its own reviewed PR; it does not authorize new surface. The +1 is f02db54c2 (fix(cli): register routing:doctor in the CLI registry) — the command existed, only its registry entry was missing, and the registering PR did not move this budget. The gate did its job again: breach WARNS on main and BLOCKS on release, which is the conscious-decision point rather than a silently raised cap. Re-measured 2026-08-03 via the pinned method: 81. Headroom stays zero by design — the next registry addition must move this number in its own PR. 81 → 82 on 2026-08-04: the `handoff` subcommand (road-to-agent-handoff-resume Phase 4) registers in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 82. 82 → 84 on 2026-08-04: the `route:explain` + `route:audit` verbs (routing-correctness validation surface) register in the same PR that adds the surface. Re-measured via the pinned method: 84. 84 → 85 on 2026-08-05: the `settings:set` verb (road-to-zero-ceremony-settings Phase 2 — the one agent-reachable settings writer) registers in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 85. 85 → 86 on 2026-08-06: the `conformance:behavior` verb (road-to-agent-behavior-conformance Phase 5 — replays the local transcript store through the four mechanised conformance checks) registers in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 86. 86 → 88 on 2026-08-07: the `sessions:list` + `sessions:claim` verbs (road-to-parallel-session-coordination — the shell surface of the shared session register, needed because /roadmap:next is command markdown and can only reach the register through a shell call) register in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 88. 88 → 89 on 2026-08-08: the `council:status` verb registers in the same PR that adds the surface, per this record's own contract. It exists because an agent in a consumer project announced \"kein Council konfiguriert (keine .agent-settings.yml)\" and substituted a weaker path while the council was configured user-globally the whole time — there was no verb that answered availability, so the only route was an inference from a filename, and the intuitive filename is the one location ADR-104 guarantees is never consulted. Re-measured via the pinned method: 89. 89 → 91 on 2026-08-08: the `self-repair:status` + `self-repair:release` verbs (the queued-defect reader and the single Hard-Floor-gated outward step of the self-repair loop — the loop is deliberately unable to publish unless a human runs the release command) register in the same PR that adds the surface, per this record's own contract. Landed alongside the +1 council:status move in the same branch. Re-measured via the pinned method: 91. 91 → 94 on 2026-08-08: the `packs:active`, `settings:get` and `mcp:available` verbs (road-to-capability-answerability Phase 2 — the three capability probes for the gaps that had none) register in the same PR that adds the surface, per this record's own contract. Each answers a question that was previously only inferable from a filename: which packs are active and from which file, what a setting resolves to and which file set it, and what is declared in mcp.json versus what can actually launch. 94 -> 95 in the same PR: `brand:status` (Phase 2.4 — brand-layer presence, which the rule depended on and no surface could answer). Re-measured twice via the pinned method on the unchanged tree: 95/95. 95 → 96 on 2026-08-10: the `session:recycle` verb (road-to-token-economy-recycling Phase 2.2 — the deterministic producer of the main-session recycle envelope; the recycle advisory names this exact verb, so it must exist as a shell surface) registers in the same PR that adds the surface, per this record's own contract. Re-measured via the pinned method: 96. 96 -> 97 on 2026-08-10: the `gates` verb registers in the same PR that adds the surface, per this record's own contract. It exists because the blocker fields the dashboard already parses (Owner, What to do, Resolved when — CI-enforced by lint_roadmap_blockers) had no owner-filtered reader: the dashboard counts the open blockers across a 600-line file and links each to a per-roadmap anchor, so \"which of these are mine\" was a manual read of every anchor. The same inference-from-a-filename shape as the council:status entry above, one layer up. This branch and the session:recycle branch each measured 96 independently and landed on the same number for different verbs; the merge makes it 97, re-measured twice via the pinned method on the merged tree: 97/97."
66
66
  },
67
67
  "mcp_public_tool_count": {
68
68
  "max": 19,
@@ -2,9 +2,9 @@
2
2
  "$comment": "Violation ratchet for gates whose dead scan root was repaired. A repair REVEALS pre-existing debt; it does not create it. Each entry records the count revealed at repair time — the gate fails only when its count RISES. Lowering a count is a normal commit; raising one is a defect. Entries expire: a baseline that has not dropped within 56 days of `landed` (or of `reaffirmed.date`) fails its gate, because a number that never moves is suppression with extra steps. Mechanism + rationale: src/scripts/_lib/gate_baseline.ts. Decision: AI council 2026-08-02, roadmap road-to-gates-that-can-fail blocker `dead-gate-finding-triage`.",
3
3
  "gates": {
4
4
  "check_no_new_legacy_path:hardcoded-scan-roots": {
5
- "count": 49,
6
- "landed": "2026-08-04",
7
- "note": "Lines under src/scripts/**/*.{ts,mts,mjs} that pass the retired `.agent-src.uncondensed` directory into `path.join(...)` — a filesystem path CONSTRUCTED against the tree ADR-051 abandoned, which is the exact shape of all 14 dead gates. Deliberately narrow so the number is signal, not noise: 236 raw mentions under src/scripts → 147 string-literal lines → 67 path-constructing lines when the pass was written, after exempting src/scripts/_lib/agent_src.ts (the shared resolver, whose job IS owning the constant — gates that route through it survived the move). Detectors holding the literal as data to match, strip, or print are not counted, and no prose, docs, tests or fixtures are read: that full-tree shape was measured at 44 files / 213 hits and rejected as the wrong lint (see the note in check_no_new_legacy_path.ts::find_offenders). Recorded at 58 rather than 67 because Phase 1's scan-root repairs were landing on this branch while the pass was being written and had already removed 9 — a baseline above the truth silently permits new violations. This count goes to ZERO as the remaining repairs land; every repair is a lowering commit. Lowered 56→51 by the road-to-renewal-foundation Phase 1 dead-root sweep (check_always_budget, check_portability, check_references, lint_framework_leakage, lint_agents_md). Lowered 51→49 by the gate-hardening adoption PR: skill_collision_clusters and skill_overlap were repointed at the live skills tree via the shared resolver — two gates that had been reading the retired container and scoring 0 of 288 skills."
5
+ "count": 48,
6
+ "landed": "2026-08-09",
7
+ "note": "Lines under src/scripts/**/*.{ts,mts,mjs} that pass the retired `.agent-src.uncondensed` directory into `path.join(...)` — a filesystem path CONSTRUCTED against the tree ADR-051 abandoned, which is the exact shape of all 14 dead gates. Deliberately narrow so the number is signal, not noise: 236 raw mentions under src/scripts → 147 string-literal lines → 67 path-constructing lines when the pass was written, after exempting src/scripts/_lib/agent_src.ts (the shared resolver, whose job IS owning the constant — gates that route through it survived the move). Detectors holding the literal as data to match, strip, or print are not counted, and no prose, docs, tests or fixtures are read: that full-tree shape was measured at 44 files / 213 hits and rejected as the wrong lint (see the note in check_no_new_legacy_path.ts::find_offenders). Recorded at 58 rather than 67 because Phase 1's scan-root repairs were landing on this branch while the pass was being written and had already removed 9 — a baseline above the truth silently permits new violations. This count goes to ZERO as the remaining repairs land; every repair is a lowering commit. Lowered 56→51 by the road-to-renewal-foundation Phase 1 dead-root sweep (check_always_budget, check_portability, check_references, lint_framework_leakage, lint_agents_md). Lowered 51→49 by the gate-hardening adoption PR: skill_collision_clusters and skill_overlap were repointed at the live skills tree via the shared resolver — two gates that had been reading the retired container and scoring 0 of 288 skills. Lowered 49→48 by road-to-rule-delivery-integrity P2.2: score_skill_selection was repointed at the live skills tree via the shared resolver. It is the same shape as the two gates lowered before it — a scorer reading the retired container and scoring 0 of 288 skills — and here the consequence was sharper than a dead gate: the roadmap's pre-registered selection-accuracy criteria would have been compared against a baseline of silent zeros."
8
8
  },
9
9
  "audit_user_type_axis": {
10
10
  "count": 1,
@@ -0,0 +1,91 @@
1
+ {
2
+ "_comment": "Pre-registered hook-INJECTION byte budget (road-to-token-economy-cache Phase 3) — the latency file's twin: same discipline, different unit. Committed BEFORE any trimming lands; the budget is the acceptance bar, not a post-hoc fit. Bytes, not tokens, as the deterministic CI unit (no tokenizer dependency — roadmap non-goal 7.6); token-exact numbers appear only in ledger-based telemetry. Consumed by scripts/bench_hook_injection and its CI gate: a concern whose measured emission (reason + additional_context + context bytes) exceeds its row fails the build, and an EMITTING concern with no row fails the build — a new injector cannot ship without a budget row.",
3
+ "schema_version": 1,
4
+ "registered_at": "2026-08-10",
5
+ "owner": "maintainer",
6
+ "review_by": "2026-11-10",
7
+ "unit": "bytes of concern stdout payload fields (reason + additional_context + context) per fire",
8
+ "default_cap_bytes": 1024,
9
+ "per_concern_caps_bytes": {
10
+ "_comment": "Named exceptions above the default, each with its reason. Absent concern = default_cap_bytes.",
11
+ "hot-context": 4096,
12
+ "hot-context_reason": "400-word working-memory restore, session_start only — one-shot, not per-turn",
13
+ "handoff-context": 8192,
14
+ "handoff-context_reason": "consume-once handoff injection, deleted after delivery — the one legitimately large one-shot",
15
+ "session-canary": 2048,
16
+ "session-canary_reason": "full canary contract once at session_start; the per-turn beat is one line",
17
+ "language-mirror": 2048,
18
+ "language-mirror_reason": "the measured 626-wrong-turn failure class justifies a full-paragraph pin per turn",
19
+ "council-availability": 1536,
20
+ "council-availability_reason": "session_start availability block incl. resolved path + member list",
21
+ "session-register": 2048,
22
+ "session-register_reason": "collision listing scales with live sessions; capped, not unbounded",
23
+ "chat-history": 4096,
24
+ "chat-history_reason": "session_start restore block",
25
+ "edit-shape": 1024,
26
+ "edit-shape_reason": "one advisory line naming the cheaper edit primitive (roadmap 5.2: budget row from day one - the economy nudge must not itself become an economy problem)",
27
+ "reread-guard": 1024,
28
+ "reread-guard_reason": "one advisory line naming the earlier read / ranged alternative (roadmap 6.1)",
29
+ "session-eol": 1024,
30
+ "session-eol_reason": "one recycle-advisory line, once per session past the committed threshold (road-to-token-economy-recycling 3.2); recording itself emits nothing"
31
+ },
32
+ "per_slot_sum_caps_bytes": {
33
+ "_comment": "Cross-concern per-fire sum per slot (roadmap 3.1). session_start is one-time and may carry the restore payloads; per-turn slots stay tight.",
34
+ "session_start": 16384,
35
+ "user_prompt_submit": 4096,
36
+ "pre_tool_use": 2048,
37
+ "post_tool_use": 2048,
38
+ "stop": 2048,
39
+ "session_end": 1024,
40
+ "pre_compact": 2048,
41
+ "agent_error": 1024
42
+ },
43
+ "injection_load_metric": {
44
+ "definition": "Roadmap 3.4: total injected bytes per session and per turn, hook-carried. The census mode of bench_hook_injection (--record) appends counts-only lines to agents/runtime/state/injection-census.jsonl; the caps above are the thresholds; breach trend at review date decides tighten vs relax — by evidence, in a PR. The census is also the repeat-injection-census blocker's instrument (one instrumented week ranks the repeaters for the 3.3 idempotency gate).",
45
+ "privacy": "census lines carry {ts, slot, concern, bytes} — counts and ids only, never content"
46
+ },
47
+ "honest_null_consequence": "If real-session census data shows the caps are systematically wrong (either direction), the caps move by evidence in a PR at review date — never silently. A budget nobody benches is the fossilization failure this file's latency twin avoided via its CI harness; bench_hook_injection is wired into the same pipeline in the same phase.",
48
+ "advisory_adoption_metrics": {
49
+ "_comment": "Roadmap 5.3 + 6.4 registrations. These are BEHAVIOUR metrics (advisory adoption), not injection bytes - registered here because this file already carries the owner/review discipline for the same concerns.",
50
+ "owner": "maintainer",
51
+ "review_by": "2026-11-10",
52
+ "full_rewrite_small_diff_rate": {
53
+ "definition": "edit-shape fires / Write calls per session (the full-rewrite-with-small-diff rate). Kill criterion per the shipped nudge standard: a nudge whose verdicts are measurably ignored (adoption near zero over the review window, from conformance audits) gets its trigger tightened or the injected line removed.",
54
+ "instrument": "rule-trips.json warn counters (the dispatcher already counts every warn per concern) + conformance audits for adoption"
55
+ },
56
+ "duplicate_read_rate": {
57
+ "definition": "reread-guard fires / Read calls per session; re-read advisory adoption via conformance audits. Same kill standard.",
58
+ "instrument": "rule-trips.json warn counters per concern"
59
+ },
60
+ "unbounded_output_advisory_rate": {
61
+ "definition": "Roadmap 4.3 + 4.4 registration (advisory-degraded per the resolved pretooluse-rewrite-semantics blocker: no updatedInput in the v1 contract, so nothing caps and nothing can be bypassed - the demand signal is the fire count itself). rtk-wrap cap-advisory fires per session from the OUTPUT_CAP_TABLE branch; adoption (did the next run use a bounded form) via conformance audits. HONEST GAP: bytes-into-context from tool RESULTS is not instrumented anywhere (the census covers hook payloads only) - the pre/post bytes half of roadmap 4.4 is registered as unmeasurable until a tool-result byte counter exists.",
62
+ "instrument": "rule-trips.json warn counters for the rtk-wrap concern + conformance audits",
63
+ "threshold": "none committed before data - baseline first, threshold at review date"
64
+ },
65
+ "turns_per_task": {
66
+ "definition": "user_prompt_submit count keyed to the task envelope - the invisible multiplier (every turn re-pays the accumulated context at read rates).",
67
+ "instrument": "session-register / chat-history turn counters; HONEST GAP: no task-envelope key exists yet in those counters - the number is per-SESSION until a task key ships; registered with that stated limitation rather than silently redefined",
68
+ "threshold": "none committed before data - baseline first, threshold at review date"
69
+ },
70
+ "recycle_advisory_adoption": {
71
+ "definition": "road-to-token-economy-recycling 3.4: of the sessions where the session-eol recycle advisory fired, the share that actually recycled (a recycle-envelope.consumed.json produced by a successor session start). Kill standard as for the sibling nudges: adoption near zero over the review window means the advisory line is dead weight - tighten the trigger or remove the line.",
72
+ "instrument": "rule-trips.json warn counters for the session-eol concern (fires) + presence/turnover of agents/runtime/state/recycle-envelope.consumed.json and session-eol per-session state (recycles); conformance audits for the denominator detail",
73
+ "threshold": "none committed before data - baseline first, threshold at review date (2026-11-10)"
74
+ },
75
+ "auto_compact_incidence": {
76
+ "definition": "road-to-token-economy-recycling 3.4: sessions with >=1 auto compact_boundary event / all sessions, from the session-eol per-session counters (baseline: 11.2%, 23/205 sessions - agents/evidence/analysis/token-economy-recycling-phase1.md). TARGET DIRECTION: trends toward zero as recycle adoption rises; a flat or rising incidence with rising adoption falsifies the mechanism.",
77
+ "instrument": "session-eol state files (compactions[] counters) aggregated by session_eol_report; the marker-drift alarm in the same report guards the detector against silent host shape changes",
78
+ "threshold": "baseline 11.2%; direction-only target (down) until the review date"
79
+ },
80
+ "envelope_resume_success": {
81
+ "definition": "road-to-token-economy-recycling 3.4: successor sessions that completed the recycled task WITHOUT re-asking for state the envelope should have carried - i.e. the 2.1 not_carried_forward list staying honest (everything else was carried; the successor re-derived only what the list named).",
82
+ "instrument": "conformance audits over successor-session transcripts (the consumed envelope names the task; the audit checks the successor's first turns for state re-asks); HONEST GAP: no deterministic counter exists for 'had to re-ask' - this is audit-carried and registered as such",
83
+ "threshold": "none committed before data - baseline first, threshold at review date"
84
+ },
85
+ "post_recycle_verify_fail_vs_baseline": {
86
+ "definition": "road-to-token-economy-recycling 3.4, the falsifiable core: verify-fail rate of recycled successor sessions vs the long-session baseline. PUBLISH-IF-WORSE COMMITMENT, pre-registered before data exists: if recycled sessions verify WORSE, the result is published and the threshold (recycle-threshold-budget.json) or the envelope schema revises in a PR citing the numbers - the claim never survives on vibes.",
87
+ "instrument": "session-eol per-session state (recycled or not) joined with verify outcomes from conformance audits / review_skipped telemetry; HONEST GAP: transcripts carry no verify-outcome field, so the join is audit-carried until a verify-outcome counter ships",
88
+ "threshold": "comparison metric - no absolute threshold; verdict recorded at review date whichever way it went"
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "_comment": "Committed recycle threshold (road-to-token-economy-recycling Phase 3.1). ONE threshold, ONE constant: statically imported into the session-eol Stop-slot concern (esbuild folds it into the hook bundle, so consumers carry the same value — no runtime file resolution). Changing it is a PR citing evidence, never a drive-by edit; AGENT_RECYCLE_THRESHOLD_TOKENS overrides per-process (tests + emergency off via 0).",
3
+ "schema_version": 1,
4
+ "registered_at": "2026-08-10",
5
+ "owner": "maintainer",
6
+ "review_by": "2026-11-10",
7
+ "unit": "parsed transcript tokens — billable input (input + cache_read + cache_creation) of the last main-chain assistant record, per cc_transcript.ts",
8
+ "recycle_threshold_tokens": 800000,
9
+ "derivation": "agents/evidence/analysis/token-economy-recycling-phase1.md — ~p90 of 201 measured session-final sizes (807,937), 54% above the median healthy session (519,349), 15% below the minimum observed auto-compact trigger (941,636). Every one of the 23 sessions that auto-compacted in the baseline would have been advised first.",
10
+ "known_limitation": "All observed auto-compactions were 1M-window sessions (190 of 201 sessions run on the 1M window on this store). A <=200k-window session auto-compacts near ~160-206k and is never served by this threshold — revisit at review_by; a window-aware threshold needs a window signal the transcript does not carry explicitly.",
11
+ "honest_null_consequence": "If adoption stays near zero or recycled sessions verify WORSE than the long-session baseline (the registered post_recycle_verify_fail_vs_baseline metric), the result is published and this threshold or the envelope schema revises by evidence in a PR — the claim never survives on vibes."
12
+ }
@@ -0,0 +1,86 @@
1
+ [
2
+ "active-remediation.md",
3
+ "agent-authority.md",
4
+ "analysis-skill-routing.md",
5
+ "architecture.md",
6
+ "artifact-drafting-protocol.md",
7
+ "artifact-engagement-recording.md",
8
+ "ask-when-uncertain.md",
9
+ "augment-edit-discipline.md",
10
+ "autonomous-execution.md",
11
+ "brand-consistency.md",
12
+ "brand-source-of-truth.md",
13
+ "broken-access-control.md",
14
+ "cli-output-handling.md",
15
+ "code-comment-discipline.md",
16
+ "command-suggestion-policy.md",
17
+ "commit-conventions.md",
18
+ "commit-policy.md",
19
+ "communication-through-line.md",
20
+ "content-quoting-floor.md",
21
+ "copilot-routing.md",
22
+ "cross-source-consistency.md",
23
+ "decision-revisit-gate.md",
24
+ "delegation-policy.md",
25
+ "design-fidelity.md",
26
+ "devcontainer-routing.md",
27
+ "direct-answers.md",
28
+ "doc-screenshot-hygiene.md",
29
+ "docker-commands.md",
30
+ "domain-adoption-policy.md",
31
+ "domain-safety-disclaimer.md",
32
+ "domain-safety-pii.md",
33
+ "domain-safety-retention.md",
34
+ "downstream-changes.md",
35
+ "engineering-safety-floor.md",
36
+ "external-code-graph-interop.md",
37
+ "external-reference-deep-dive.md",
38
+ "fast-path-marker-visibility.md",
39
+ "finance-safety-floor.md",
40
+ "guidelines.md",
41
+ "history-discipline.md",
42
+ "icon-consistency.md",
43
+ "image-likeness-and-rights.md",
44
+ "improve-before-implement.md",
45
+ "invite-challenge.md",
46
+ "laravel-routing.md",
47
+ "laravel-translations.md",
48
+ "legal-safety-floor.md",
49
+ "linked-projects-onboarding-gate.md",
50
+ "low-impact-corpus-privacy-floor.md",
51
+ "markdown-safe-codeblocks.md",
52
+ "media-sync-ground-truth.md",
53
+ "missing-tool-handling.md",
54
+ "model-recommendation.md",
55
+ "no-attribution-footers.md",
56
+ "no-cheap-questions.md",
57
+ "no-decorative-emojis-in-git-surfaces.md",
58
+ "no-pr-progress-comments.md",
59
+ "notes-first-reasoning.md",
60
+ "package-ci-checks.md",
61
+ "php-coding.md",
62
+ "prefer-enums-over-literals.md",
63
+ "provider-lifecycle-discipline.md",
64
+ "question-not-instruction.md",
65
+ "reviewer-awareness.md",
66
+ "roadmap-ci-steps-policy.md",
67
+ "role-mode-adherence.md",
68
+ "rule-type-governance.md",
69
+ "runtime-safety.md",
70
+ "scale-discipline.md",
71
+ "scope-control.md",
72
+ "senior-engineering-discipline.md",
73
+ "size-enforcement.md",
74
+ "skill-improvement-trigger.md",
75
+ "slash-command-routing-policy.md",
76
+ "source-discovery-gate.md",
77
+ "spreadsheet-source-quality.md",
78
+ "strategy-safety-floor.md",
79
+ "symfony-routing.md",
80
+ "think-before-action.md",
81
+ "token-budget-discipline.md",
82
+ "token-efficiency.md",
83
+ "upstream-proposal.md",
84
+ "user-interaction.md",
85
+ "user-interrupt-priority.md"
86
+ ]