@event4u/agent-config 16.0.0 → 16.1.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 (246) hide show
  1. package/.augment-plugin/marketplace.json +3 -3
  2. package/.augment-plugin/plugin.json +1 -1
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/CHANGELOG.md +297 -137
  5. package/CONTRIBUTING.md +9 -0
  6. package/README.md +2 -2
  7. package/dist/agent-src/commands/analyze/inbox.md +26 -0
  8. package/dist/agent-src/commands/analyze/roadmap-repos.md +27 -0
  9. package/dist/agent-src/commands/challenge-me/closure.md +178 -0
  10. package/dist/agent-src/commands/challenge-me.md +9 -2
  11. package/dist/agent-src/commands/council/default.md +25 -5
  12. package/dist/agent-src/commands/feature/plan.md +28 -1
  13. package/dist/agent-src/commands/feature/roadmap.md +28 -1
  14. package/dist/agent-src/commands/implement-ticket.md +27 -0
  15. package/dist/agent-src/commands/jira-ticket.md +27 -0
  16. package/dist/agent-src/commands/pr/create.md +29 -0
  17. package/dist/agent-src/commands/pr/merge.md +60 -9
  18. package/dist/agent-src/commands/roadmap/ai-council.md +7 -1
  19. package/dist/agent-src/commands/roadmap/create.md +74 -27
  20. package/dist/agent-src/commands/roadmap/materialize.md +27 -0
  21. package/dist/agent-src/commands/roadmap/process-full.md +123 -18
  22. package/dist/agent-src/commands/team.md +22 -0
  23. package/dist/agent-src/contexts/authority/scope-growth-ownership.md +80 -0
  24. package/dist/agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +47 -0
  25. package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +44 -3
  26. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +15 -15
  27. package/dist/agent-src/contexts/execution/decision-closure-execution.md +93 -0
  28. package/dist/agent-src/contexts/execution/fix-loop-ladder.md +108 -0
  29. package/dist/agent-src/contexts/execution/plan-confidence-gate.md +4 -2
  30. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +75 -6
  31. package/dist/agent-src/guidelines/agent-infra/active-remediation-mechanics.md +57 -0
  32. package/dist/agent-src/guidelines/agent-infra/evaluator-independence-mechanics.md +102 -0
  33. package/dist/agent-src/guidelines/design-fidelity-routing.md +29 -0
  34. package/dist/agent-src/rules/autonomous-execution.md +15 -8
  35. package/dist/agent-src/rules/delegation-policy.md +23 -45
  36. package/dist/agent-src/rules/design-fidelity.md +32 -37
  37. package/dist/agent-src/rules/evaluator-independence.md +43 -49
  38. package/dist/agent-src/rules/test-first.md +41 -0
  39. package/dist/agent-src/skills/accessibility-auditor/data/manifest.json +3 -3
  40. package/dist/agent-src/skills/ai-council/SKILL.md +11 -3
  41. package/dist/agent-src/skills/api-design/data/manifest.json +3 -3
  42. package/dist/agent-src/skills/database/data/manifest.json +4 -4
  43. package/dist/agent-src/skills/database/data/query-tuning.csv +3 -3
  44. package/dist/agent-src/skills/design-review/SKILL.md +50 -0
  45. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +14 -4
  46. package/dist/agent-src/skills/experiment-loop/SKILL.md +31 -1
  47. package/dist/agent-src/skills/roadmap-writing/SKILL.md +1 -1
  48. package/dist/agent-src/skills/storybook-workshop/SKILL.md +42 -3
  49. package/dist/agent-src/skills/threat-modeling/SKILL.md +9 -4
  50. package/dist/agent-src/skills/threat-modeling/data/manifest.json +4 -4
  51. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +37 -3
  52. package/dist/agent-src/templates/agent-settings.md +1 -1
  53. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  54. package/dist/agent-src/templates/roadmaps.md +188 -0
  55. package/dist/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  56. package/dist/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  57. package/dist/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  58. package/dist/cli-delegate/check_update_banner.js +40 -2
  59. package/dist/cli-delegate/chunk-4E2W63DA.js +335 -0
  60. package/dist/cli-delegate/chunk-5R7HOLAF.js +99 -0
  61. package/dist/cli-delegate/{chunk-IVBPRCQO.js → chunk-6KFEC3G7.js} +1 -1
  62. package/dist/cli-delegate/{chunk-2TAQ2K4V.js → chunk-6KM6ORRY.js} +55 -386
  63. package/dist/cli-delegate/{chunk-2XY7ILBT.js → chunk-FC75PGJE.js} +42 -2
  64. package/dist/cli-delegate/{chunk-GYC3VRYN.js → chunk-FXYUYU4N.js} +57 -13
  65. package/dist/cli-delegate/{chunk-55ACLDUE.js → chunk-GJCBB2UG.js} +168 -10
  66. package/dist/cli-delegate/{chunk-AK6HODNQ.js → chunk-HDVVGPQW.js} +873 -539
  67. package/dist/cli-delegate/{chunk-H32DGUJH.js → chunk-P6ZHP5W2.js} +1 -1
  68. package/dist/cli-delegate/{chunk-57PN4GYJ.js → chunk-RGNIWTEA.js} +1 -1
  69. package/dist/cli-delegate/chunk-ROYYTEZU.js +39 -0
  70. package/dist/cli-delegate/{chunk-3FKR64R5.js → chunk-UNCRJBT3.js} +31 -7
  71. package/dist/cli-delegate/{chunk-2DK2VJWG.js → chunk-WGXTVKCQ.js} +20 -6
  72. package/dist/cli-delegate/chunk-YDPILCOL.js +152 -0
  73. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  74. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  75. package/dist/cli-delegate/cmd_conformance.js +90 -56
  76. package/dist/cli-delegate/cmd_doctor.js +7 -5
  77. package/dist/cli-delegate/cmd_explain.js +2 -2
  78. package/dist/cli-delegate/cmd_export.js +9 -7
  79. package/dist/cli-delegate/cmd_fleet.js +4 -2
  80. package/dist/cli-delegate/cmd_handoff.js +4 -4
  81. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  82. package/dist/cli-delegate/cmd_migrate.js +2 -2
  83. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  84. package/dist/cli-delegate/cmd_preflight.js +4 -2
  85. package/dist/cli-delegate/cmd_prune.js +10 -8
  86. package/dist/cli-delegate/cmd_route_audit.js +2 -2
  87. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  88. package/dist/cli-delegate/cmd_session_recycle.js +2 -2
  89. package/dist/cli-delegate/cmd_settings_get.js +28 -2
  90. package/dist/cli-delegate/cmd_settings_migrate.js +9 -7
  91. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  92. package/dist/cli-delegate/cmd_sync.js +10 -8
  93. package/dist/cli-delegate/cmd_uninstall.js +16 -13
  94. package/dist/cli-delegate/cmd_update.js +1 -1
  95. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  96. package/dist/cli-delegate/cmd_validate.js +12 -10
  97. package/dist/cli-delegate/cmd_versions.js +1 -1
  98. package/dist/discovery/deprecation-report.md +1 -1
  99. package/dist/discovery/discovery-manifest.json +85 -38
  100. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  101. package/dist/discovery/discovery-manifest.summary.md +4 -4
  102. package/dist/discovery/dormancy-report.md +1 -1
  103. package/dist/discovery/orphan-report.md +1 -1
  104. package/dist/discovery/packs.json +10 -8
  105. package/dist/discovery/trust-report.md +3 -3
  106. package/dist/discovery/workspaces.json +8 -6
  107. package/dist/hooks/dispatch.js +1832 -1007
  108. package/dist/install/claudeRuleRewrite.js +14 -3
  109. package/dist/install/conflict.js +60 -10
  110. package/dist/install/conflictTracker.js +218 -0
  111. package/dist/install/fsPrimitives.js +54 -0
  112. package/dist/install/install.mjs +2007 -1481
  113. package/dist/install/manifestFiles.js +259 -0
  114. package/dist/install/preflight.js +14 -2
  115. package/dist/install/preserve.js +157 -0
  116. package/dist/install/recordedOwnership.js +132 -0
  117. package/dist/install/txlog.js +11 -2
  118. package/dist/mcp/registry-manifest.json +3 -3
  119. package/dist/mcp/server.json +2 -2
  120. package/dist/mcp/server.mjs +398 -39
  121. package/dist/router.json +1 -1
  122. package/dist/scripts/_lib/agent_settings.js +3 -2
  123. package/dist/scripts/_lib/fs_atomic.js +167 -0
  124. package/dist/scripts/_lib/installed_tools.js +460 -0
  125. package/dist/scripts/_lib/lean_projection_mode.js +3 -2
  126. package/dist/scripts/_lib/settings_renamed_keys.js +78 -0
  127. package/dist/server/routes/install.js +8 -0
  128. package/dist/server/routes/wizard.js +9 -3
  129. package/dist/server/schemas/settings.js +17 -5
  130. package/dist/shared/missionExecution.js +97 -0
  131. package/dist/ui/assets/{index-D0jaCRPM.js → index-DH1xc62v.js} +17 -17
  132. package/dist/ui/index.html +1 -1
  133. package/docs/MIGRATION.md +103 -0
  134. package/docs/contracts/settings-classes.md +26 -7
  135. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +57 -0
  136. package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +102 -0
  137. package/docs/guidelines/design-fidelity-routing.md +29 -0
  138. package/package.json +1 -1
  139. package/src/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  140. package/src/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  141. package/src/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  142. package/src/config/agent-settings.template.yml +139 -27
  143. package/src/config/auto-rule-budget.json +16 -0
  144. package/src/config/ci-local-parity.yml +18 -5
  145. package/src/config/continuity-surface.json +21 -0
  146. package/src/config/gate-coverage.yml +146 -13
  147. package/src/config/gate-violation-baselines.json +6 -6
  148. package/src/config/hook-token-budget.json +2 -0
  149. package/src/config/loop-surfaces.yaml +215 -0
  150. package/src/config/platform-anchor.json +3 -2
  151. package/src/config/release-gate-locality.yml +11 -0
  152. package/src/config/routing-coverage-seed.json +18 -4
  153. package/src/config/rule-enforcement-baseline.json +0 -1
  154. package/src/install/claudeRuleRewrite.ts +16 -2
  155. package/src/install/conflict.ts +65 -9
  156. package/src/install/conflictTracker.ts +299 -0
  157. package/src/install/fsPrimitives.ts +54 -0
  158. package/src/install/manifestFiles.ts +312 -0
  159. package/src/install/preflight.ts +16 -2
  160. package/src/install/preserve.ts +205 -0
  161. package/src/install/recordedOwnership.ts +149 -0
  162. package/src/install/txlog.ts +11 -2
  163. package/src/install/types.ts +19 -4
  164. package/src/scripts/_cli/cmd_conformance.ts +88 -15
  165. package/src/scripts/_cli/cmd_doctor.ts +4 -3
  166. package/src/scripts/_cli/cmd_route_explain.ts +9 -2
  167. package/src/scripts/_cli/cmd_settings_get.ts +44 -0
  168. package/src/scripts/_cli/doctor_execution.ts +90 -0
  169. package/src/scripts/_lib/activation_payload.ts +247 -0
  170. package/src/scripts/_lib/agent_settings.ts +4 -2
  171. package/src/scripts/_lib/authority_path.ts +102 -0
  172. package/src/scripts/_lib/cascade_base.ts +94 -0
  173. package/src/scripts/_lib/changelog_eras.ts +7 -2
  174. package/src/scripts/_lib/continuation_ladder.ts +149 -2
  175. package/src/scripts/_lib/council_transport.ts +129 -0
  176. package/src/scripts/_lib/delivery_ready.ts +112 -0
  177. package/src/scripts/_lib/forge_protection.ts +267 -0
  178. package/src/scripts/_lib/hook_platform_keys.ts +27 -0
  179. package/src/scripts/_lib/json_python_parity.ts +127 -0
  180. package/src/scripts/_lib/lean_projection_mode.ts +14 -3
  181. package/src/scripts/_lib/loop_surfaces.ts +382 -0
  182. package/src/scripts/_lib/mission_record.ts +190 -0
  183. package/src/scripts/_lib/obligation_frequency.ts +217 -0
  184. package/src/scripts/_lib/obligations.ts +402 -0
  185. package/src/scripts/_lib/orchestration_record.ts +11 -20
  186. package/src/scripts/_lib/release_highlights.ts +199 -10
  187. package/src/scripts/_lib/release_holds.ts +493 -0
  188. package/src/scripts/_lib/release_migration_gate.ts +184 -0
  189. package/src/scripts/_lib/rides_along.ts +102 -0
  190. package/src/scripts/_lib/settings_renamed_keys.ts +82 -0
  191. package/src/scripts/_lib/test_delta.ts +166 -0
  192. package/src/scripts/_lib/test_provenance.ts +171 -0
  193. package/src/scripts/_lib/typed_op_grant.ts +246 -0
  194. package/src/scripts/_lib/typed_op_watch.ts +185 -0
  195. package/src/scripts/ai_council/config.ts +8 -11
  196. package/src/scripts/ai_council/fallback_config.ts +5 -3
  197. package/src/scripts/ai_council/ownership_classes.ts +118 -0
  198. package/src/scripts/ask_block_census.ts +285 -15
  199. package/src/scripts/check_enforcement_matrix.ts +624 -0
  200. package/src/scripts/check_gate_reachability.ts +173 -10
  201. package/src/scripts/check_generator_sync.ts +954 -0
  202. package/src/scripts/check_preamble_payload_budget.ts +75 -2
  203. package/src/scripts/check_release_highlights.ts +33 -1
  204. package/src/scripts/check_release_holds.ts +567 -0
  205. package/src/scripts/check_rule_projection_integrity.ts +22 -12
  206. package/src/scripts/check_test_delta.ts +294 -0
  207. package/src/scripts/check_test_weakening.ts +299 -0
  208. package/src/scripts/closure_scan.ts +333 -0
  209. package/src/scripts/compile_hook_manifest.ts +43 -3
  210. package/src/scripts/council_record_shape.ts +209 -0
  211. package/src/scripts/hook_manifest.json +1 -1
  212. package/src/scripts/hook_manifest.yaml +88 -9
  213. package/src/scripts/hooks/concern_registry.ts +4 -0
  214. package/src/scripts/hooks/design_pass_hook.ts +128 -3
  215. package/src/scripts/hooks/evidence_independence.ts +96 -0
  216. package/src/scripts/hooks/memory_recall_hook.ts +540 -0
  217. package/src/scripts/hooks/obligation_settle_hook.ts +182 -0
  218. package/src/scripts/hooks/rule_inject_hook.ts +49 -1
  219. package/src/scripts/hooks/run_continuation_hook.ts +17 -20
  220. package/src/scripts/hooks_doctor.ts +85 -0
  221. package/src/scripts/hooks_status.ts +19 -0
  222. package/src/scripts/install.ts +106 -206
  223. package/src/scripts/janitor.ts +7 -0
  224. package/src/scripts/lint_decision_classes.ts +464 -0
  225. package/src/scripts/lint_hook_manifest.ts +11 -0
  226. package/src/scripts/lint_major_migration_sections.ts +450 -0
  227. package/src/scripts/lint_plan_risk_register.ts +47 -3
  228. package/src/scripts/lint_roadmap_blockers.ts +61 -0
  229. package/src/scripts/lint_roadmap_producers.ts +202 -0
  230. package/src/scripts/measure_rule_budget.ts +101 -5
  231. package/src/scripts/new_roadmap.ts +37 -0
  232. package/src/scripts/orchestration_record.ts +0 -5
  233. package/src/scripts/release.ts +14 -98
  234. package/src/scripts/release_drill.ts +267 -1
  235. package/src/scripts/release_publication.ts +51 -0
  236. package/src/scripts/report_enforcement_drift.ts +566 -0
  237. package/src/scripts/report_host_injection_effect.ts +3 -11
  238. package/src/scripts/report_standing_payload_by_host.ts +26 -152
  239. package/src/scripts/schemas/agent-settings.schema.json +23 -0
  240. package/src/scripts/schemas/command.schema.json +4 -0
  241. package/src/scripts/scope_growth.ts +219 -0
  242. package/src/scripts/trigger_eval_grandfather.json +0 -1
  243. package/src/scripts/ui_conformance_probe.ts +622 -0
  244. package/src/server/schemas/settings.ts +31 -7
  245. package/src/shared/missionExecution.ts +126 -0
  246. package/dist/cli-delegate/chunk-523HCFYO.js +0 -90
@@ -64,8 +64,10 @@
64
64
  import * as fs from 'node:fs';
65
65
  import * as path from 'node:path';
66
66
 
67
+ import { type ActivationPayload, measureActivationPayload } from './_lib/activation_payload.js';
67
68
  import { asOf } from './_lib/as_of.js';
68
69
  import { assertScanned, DeadScopeError } from './_lib/scan_scope.js';
70
+ import { CAP_BYTES } from './hooks/rule_inject_hook.js';
69
71
  import { censusClaudeMdHierarchy, censusRuleDir, censusSkillsCatalog } from './preamble_byte_census.js';
70
72
  import { PREFIX_STABLE_SURFACES, prefixStableRoots } from './_lib/prefix_stable_surfaces.js';
71
73
  import { HOST_SURFACES } from './_lib/host_projection_reach.js';
@@ -624,6 +626,49 @@ export function renderBounds(b: BoundsRatchetVerdict): string {
624
626
  );
625
627
  }
626
628
 
629
+ /**
630
+ * The activation reading, rendered with a label nothing else in this gate uses.
631
+ *
632
+ * Third of the three quantities this report keeps structurally apart
633
+ * (`road-to-the-delivery-flip-that-tells-the-truth` 3.1). The first two are
634
+ * ADR-270's `source_corpus` and `host_payload`; this one is per FIRE and in
635
+ * BYTES, while both of those are per SESSION and in chars/4 tokens. Two units
636
+ * and two denominators is precisely why it carries its own label rather than
637
+ * being folded into either total — and why no line below adds it to one.
638
+ *
639
+ * INFORMATIONAL, like the host reading beside it. It never reaches the exit
640
+ * code: this phase adds reporting and registers no second gate. The activation
641
+ * charge already HAS a registered ceiling in
642
+ * `src/config/hook-token-budget.json` (`per_slot_sum_caps_bytes.user_prompt_submit`
643
+ * and the `rule-inject` concern row); enforcing it a second time here would put
644
+ * one obligation behind two gates that can disagree.
645
+ */
646
+ export function renderActivation(a: ActivationPayload): string {
647
+ const out = ['\n activation payload — per trigger-match fire, BYTES (informational, not gated)\n'];
648
+ if (!a.measured) {
649
+ out.push(
650
+ ` ${'· UNMEASURED'.padEnd(38)} ${a.unmeasured_reason ?? 'reason not recorded'}\n` +
651
+ ' Reported as unmeasured rather than estimated: a fabricated distribution\n' +
652
+ ' published beside a standing saving is the defect this number exists to stop.\n',
653
+ );
654
+ return out.join('');
655
+ }
656
+ for (const s of a.slots) {
657
+ const label = `· ${s.slot}`;
658
+ out.push(
659
+ ` ${label.padEnd(38)} ${String(s.fires).padStart(5)} fires ` +
660
+ `p50 ${String(s.p50).padStart(6)} B p90 ${String(s.p90).padStart(6)} B ` +
661
+ `max ${String(s.max).padStart(6)} B\n`,
662
+ );
663
+ }
664
+ out.push(
665
+ ` ${'· sampled at cap'.padEnd(38)} ${String(a.cap_bytes).padStart(5)} B over ${a.corpus}\n` +
666
+ ' Not summed into either total above: this is bytes per fire, those are chars/4\n' +
667
+ ' tokens per session. `pre_compact` is 0 by construction, not by measurement.\n',
668
+ );
669
+ return out.join('');
670
+ }
671
+
627
672
  export function main(argv: string[] = process.argv.slice(2)): number {
628
673
  const json = argv.includes('--format=json') || argv.includes('--json');
629
674
 
@@ -737,6 +782,13 @@ export function main(argv: string[] = process.argv.slice(2)): number {
737
782
  }
738
783
  }
739
784
 
785
+ // The third labelled number. Taken unconditionally and behind no flag: a
786
+ // cost that has to be asked for is a cost that stays unpublished, which is
787
+ // the failure mode `road-to-the-delivery-flip-that-tells-the-truth` names.
788
+ // `measureActivationPayload` never throws and never estimates, so this
789
+ // cannot change any verdict below — only what the report says.
790
+ const activation = measureActivationPayload(repoRoot, CAP_BYTES);
791
+
740
792
  let decision: Decision;
741
793
  try {
742
794
  decision = decide({ repoRoot, requireBase, verifiedApprovals });
@@ -775,7 +827,15 @@ export function main(argv: string[] = process.argv.slice(2)): number {
775
827
  // for exactly that: until the two are named apart, every
776
828
  // ceiling discussion risks comparing unlike quantities. The
777
829
  // legacy top-level fields stay so no existing reader breaks.
778
- measurement_scope: host === null ? 'source-corpus' : 'source-corpus+host-payload',
830
+ // Three parts now, joined from what was actually taken
831
+ // rather than from a fixed pair: the activation reading is
832
+ // the third quantity and it is absent on a tree with no
833
+ // frozen corpus, so a hardcoded label would over-claim.
834
+ measurement_scope: [
835
+ 'source-corpus',
836
+ ...(host === null ? [] : ['host-payload']),
837
+ ...(activation.measured ? ['activation-payload'] : []),
838
+ ].join('+'),
779
839
  source_corpus: {
780
840
  measured: verdict.measured,
781
841
  baseline: verdict.baseline,
@@ -783,6 +843,9 @@ export function main(argv: string[] = process.argv.slice(2)): number {
783
843
  buckets: verdict.buckets,
784
844
  },
785
845
  host_payload: host,
846
+ // Per FIRE and in BYTES — never added to either total
847
+ // above, which are per session and in chars/4 tokens.
848
+ activation_payload: activation,
786
849
  ok: decision.ok,
787
850
  measured_ceiling: {
788
851
  ceiling: decision.ceiling.ceiling,
@@ -817,6 +880,11 @@ export function main(argv: string[] = process.argv.slice(2)): number {
817
880
  return decision.ok ? 0 : 1;
818
881
  }
819
882
 
883
+ // The label goes above the buckets so the gated number cannot be read as
884
+ // either of the two beneath it. This is the source tree's own size — what
885
+ // it COULD deliver — and after a per-host projection flip that is no longer
886
+ // what any one host receives.
887
+ process.stdout.write(' source corpus — what the source tree could deliver (GATED)\n');
820
888
  for (const b of verdict.buckets) {
821
889
  process.stdout.write(` ${b.name.padEnd(38)} ${String(b.tokens).padStart(8)} tok\n`);
822
890
  }
@@ -841,7 +909,10 @@ export function main(argv: string[] = process.argv.slice(2)): number {
841
909
  // sharing one name.
842
910
  if (host !== null) {
843
911
  const label = host.host === null ? host.rules_path : host.host;
844
- process.stdout.write(`\n host payload — ${label} (informational, not gated)\n`);
912
+ process.stdout.write(
913
+ `\n host payload — ${label}, what this host actually receives at rest ` +
914
+ '(informational, not gated)\n',
915
+ );
845
916
  for (const b of host.buckets) {
846
917
  process.stdout.write(` ${('· ' + b.name).padEnd(38)} ${String(b.tokens).padStart(8)} tok\n`);
847
918
  }
@@ -860,6 +931,8 @@ export function main(argv: string[] = process.argv.slice(2)): number {
860
931
  }
861
932
  }
862
933
 
934
+ process.stdout.write(renderActivation(activation));
935
+
863
936
  // THE CEILING IS ESTABLISHED BEFORE THE SIZE QUESTION. A run that could not
864
937
  // measure its own ceiling has no business reporting a tree as within one,
865
938
  // and an expired grant is a refusal whatever the payload does.
@@ -70,6 +70,7 @@ import {
70
70
  type SpanCommit,
71
71
  collect_span_commits,
72
72
  derive_categories,
73
+ make_span_file_reader,
73
74
  parse_git_log,
74
75
  previous_release_tag,
75
76
  stale_draft_labels,
@@ -126,6 +127,24 @@ export interface Contradiction {
126
127
  evidence: string[];
127
128
  }
128
129
 
130
+ /** The fifth label, named once so the note below and the gate cannot drift. */
131
+ export const KNOWN_LIMITATIONS = 'Known limitations';
132
+
133
+ /**
134
+ * What a passing `Known limitations: _none_` actually claims.
135
+ *
136
+ * Exported so it is a fixture rather than a sentence somebody can soften: the
137
+ * derivation reads self-declared residuals, so it is blind to a limitation
138
+ * nobody documented, and printing `_none_` without saying so would turn an
139
+ * undefended field into a defended-looking one. That inversion is the whole
140
+ * risk the roadmap registered against making this label derivable.
141
+ */
142
+ export const UNDERIVED_LIMITATIONS_NOTE =
143
+ 'ℹ️ `Known limitations: _none_` means NO CANDIDATE WAS DERIVED from the span, ' +
144
+ 'not that no limitations exist —\n' +
145
+ ' the derivation reads residuals a commit or a touched executable file ' +
146
+ 'DECLARES, so an undocumented one is invisible to it.';
147
+
129
148
  /**
130
149
  * A populated generated category meeting a `_none_` curated field is a
131
150
  * contradiction. Filled fields and underived labels never fail.
@@ -281,7 +300,12 @@ export function main(argv: readonly string[]): number {
281
300
  // reaches another section, another era file, or `docs/archive/`. That is
282
301
  // what keeps eighteen historical marker lines from turning this into a
283
302
  // permanent red on every future release.
284
- const derived = derive_categories(span);
303
+ // `--to` and not the worktree: the gate must answer about the ref it was
304
+ // pointed at, and on a release branch the checkout and `--to` are the same
305
+ // commit only by accident of how the gate happens to be invoked.
306
+ const derived = derive_categories(span, {
307
+ readTouchedFile: make_span_file_reader(to, REPO_ROOT),
308
+ });
285
309
  const drafts = stale_draft_labels(curated);
286
310
  if (drafts.length > 0) {
287
311
  process.stderr.write(
@@ -315,6 +339,14 @@ export function main(argv: readonly string[]): number {
315
339
  const contradictions = highlight_contradictions(curated, derived);
316
340
  if (contradictions.length === 0) {
317
341
  process.stdout.write(`✅ curated head plausible for ${version} (span ${from}..${to})\n`);
342
+ // Risk 2 of the roadmap that made `Known limitations` derivable, paid
343
+ // where it lands rather than in a comment: a self-declared residual is
344
+ // only detectable when somebody WROTE IT DOWN, so a derived `_none_`
345
+ // here reads stronger than the undefended one it replaced unless the
346
+ // gate says which of the two it means. It means the first.
347
+ if ((curated[KNOWN_LIMITATIONS] ?? '').trim() === HEAD_NONE) {
348
+ process.stdout.write(`${UNDERIVED_LIMITATIONS_NOTE}\n`);
349
+ }
318
350
  return 0;
319
351
  }
320
352
  process.stderr.write(