@event4u/agent-config 15.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 (283) 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 +301 -347
  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 +77 -29
  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 +97 -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/rules/user-interaction.md +31 -30
  40. package/dist/agent-src/skills/accessibility-auditor/data/manifest.json +3 -3
  41. package/dist/agent-src/skills/ai-council/SKILL.md +11 -3
  42. package/dist/agent-src/skills/api-design/data/manifest.json +3 -3
  43. package/dist/agent-src/skills/database/data/manifest.json +4 -4
  44. package/dist/agent-src/skills/database/data/query-tuning.csv +3 -3
  45. package/dist/agent-src/skills/design-review/SKILL.md +50 -0
  46. package/dist/agent-src/skills/error-handling-patterns/SKILL.md +9 -0
  47. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +14 -4
  48. package/dist/agent-src/skills/experiment-loop/SKILL.md +31 -1
  49. package/dist/agent-src/skills/roadmap-writing/SKILL.md +1 -1
  50. package/dist/agent-src/skills/storybook-workshop/SKILL.md +42 -3
  51. package/dist/agent-src/skills/threat-modeling/SKILL.md +9 -4
  52. package/dist/agent-src/skills/threat-modeling/data/manifest.json +4 -4
  53. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +37 -3
  54. package/dist/agent-src/templates/agent-settings.md +1 -1
  55. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  56. package/dist/agent-src/templates/roadmaps.md +188 -0
  57. package/dist/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  58. package/dist/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  59. package/dist/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  60. package/dist/cli-delegate/check_update_banner.js +40 -2
  61. package/dist/cli-delegate/chunk-4E2W63DA.js +335 -0
  62. package/dist/cli-delegate/chunk-5R7HOLAF.js +99 -0
  63. package/dist/cli-delegate/{chunk-IVBPRCQO.js → chunk-6KFEC3G7.js} +1 -1
  64. package/dist/cli-delegate/{chunk-2TAQ2K4V.js → chunk-6KM6ORRY.js} +55 -386
  65. package/dist/cli-delegate/{chunk-2XY7ILBT.js → chunk-FC75PGJE.js} +42 -2
  66. package/dist/cli-delegate/{chunk-GYC3VRYN.js → chunk-FXYUYU4N.js} +57 -13
  67. package/dist/cli-delegate/{chunk-55ACLDUE.js → chunk-GJCBB2UG.js} +168 -10
  68. package/dist/cli-delegate/{chunk-AK6HODNQ.js → chunk-HDVVGPQW.js} +873 -539
  69. package/dist/cli-delegate/chunk-NUHLI2RX.js +80 -0
  70. package/dist/cli-delegate/{chunk-HZ52BRGG.js → chunk-P6ZHP5W2.js} +15 -90
  71. package/dist/cli-delegate/{chunk-TYSY33MD.js → chunk-QJWAUMJW.js} +12 -2
  72. package/dist/cli-delegate/{chunk-57PN4GYJ.js → chunk-RGNIWTEA.js} +1 -1
  73. package/dist/cli-delegate/chunk-ROYYTEZU.js +39 -0
  74. package/dist/cli-delegate/{chunk-2KKXJW25.js → chunk-S3VFXMTM.js} +1 -1
  75. package/dist/cli-delegate/{chunk-3FKR64R5.js → chunk-UNCRJBT3.js} +31 -7
  76. package/dist/cli-delegate/{chunk-2DK2VJWG.js → chunk-WGXTVKCQ.js} +20 -6
  77. package/dist/cli-delegate/chunk-YDPILCOL.js +152 -0
  78. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  79. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  80. package/dist/cli-delegate/cmd_conformance.js +918 -325
  81. package/dist/cli-delegate/cmd_doctor.js +7 -5
  82. package/dist/cli-delegate/cmd_explain.js +5 -3
  83. package/dist/cli-delegate/cmd_export.js +9 -7
  84. package/dist/cli-delegate/cmd_fleet.js +4 -2
  85. package/dist/cli-delegate/cmd_handoff.js +6 -6
  86. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  87. package/dist/cli-delegate/cmd_migrate.js +2 -2
  88. package/dist/cli-delegate/cmd_packs_active.js +3 -2
  89. package/dist/cli-delegate/cmd_preflight.js +4 -2
  90. package/dist/cli-delegate/cmd_prune.js +10 -8
  91. package/dist/cli-delegate/cmd_route_audit.js +2 -2
  92. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  93. package/dist/cli-delegate/cmd_session_recycle.js +4 -4
  94. package/dist/cli-delegate/cmd_settings_get.js +28 -2
  95. package/dist/cli-delegate/cmd_settings_migrate.js +9 -7
  96. package/dist/cli-delegate/cmd_settings_set.js +14 -1
  97. package/dist/cli-delegate/cmd_sync.js +10 -8
  98. package/dist/cli-delegate/cmd_uninstall.js +16 -13
  99. package/dist/cli-delegate/cmd_update.js +1 -1
  100. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  101. package/dist/cli-delegate/cmd_validate.js +12 -10
  102. package/dist/cli-delegate/cmd_versions.js +1 -1
  103. package/dist/discovery/deprecation-report.md +1 -1
  104. package/dist/discovery/discovery-manifest.json +87 -40
  105. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  106. package/dist/discovery/discovery-manifest.summary.md +4 -4
  107. package/dist/discovery/dormancy-report.md +1 -1
  108. package/dist/discovery/orphan-report.md +1 -1
  109. package/dist/discovery/packs.json +10 -8
  110. package/dist/discovery/trust-report.md +3 -3
  111. package/dist/discovery/workspaces.json +8 -6
  112. package/dist/hooks/dispatch.js +2601 -1073
  113. package/dist/install/claudeRuleRewrite.js +14 -3
  114. package/dist/install/conflict.js +60 -10
  115. package/dist/install/conflictTracker.js +218 -0
  116. package/dist/install/fsPrimitives.js +54 -0
  117. package/dist/install/install.mjs +2008 -1481
  118. package/dist/install/manifestFiles.js +259 -0
  119. package/dist/install/preflight.js +14 -2
  120. package/dist/install/preserve.js +157 -0
  121. package/dist/install/recordedOwnership.js +132 -0
  122. package/dist/install/txlog.js +11 -2
  123. package/dist/mcp/registry-manifest.json +3 -3
  124. package/dist/mcp/server.json +2 -2
  125. package/dist/mcp/server.mjs +1612 -667
  126. package/dist/router.json +1 -1
  127. package/dist/scripts/_lib/agent_settings.js +3 -2
  128. package/dist/scripts/_lib/fs_atomic.js +167 -0
  129. package/dist/scripts/_lib/installed_lock.js +1 -1
  130. package/dist/scripts/_lib/installed_tools.js +460 -0
  131. package/dist/scripts/_lib/lean_projection_mode.js +3 -2
  132. package/dist/scripts/_lib/settings_renamed_keys.js +78 -0
  133. package/dist/server/io/yamlIO.js +50 -0
  134. package/dist/server/routes/install.js +8 -0
  135. package/dist/server/routes/wizard.js +9 -3
  136. package/dist/server/schemas/settings.js +17 -5
  137. package/dist/shared/missionExecution.js +97 -0
  138. package/dist/ui/assets/{index-D0jaCRPM.js → index-DH1xc62v.js} +17 -17
  139. package/dist/ui/index.html +1 -1
  140. package/docs/MIGRATION.md +103 -0
  141. package/docs/contracts/settings-classes.md +26 -7
  142. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +57 -0
  143. package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +102 -0
  144. package/docs/guidelines/design-fidelity-routing.md +29 -0
  145. package/package.json +1 -1
  146. package/src/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  147. package/src/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  148. package/src/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  149. package/src/config/agent-settings.template.yml +139 -27
  150. package/src/config/auto-rule-budget.json +16 -0
  151. package/src/config/ci-local-parity.yml +18 -5
  152. package/src/config/continuity-surface.json +28 -0
  153. package/src/config/gate-coverage.yml +146 -13
  154. package/src/config/gate-violation-baselines.json +6 -6
  155. package/src/config/hook-token-budget.json +2 -0
  156. package/src/config/host-injection-effect.json +1 -1
  157. package/src/config/loop-surfaces.yaml +215 -0
  158. package/src/config/platform-anchor.json +3 -2
  159. package/src/config/preamble-payload-budget.json +12 -7
  160. package/src/config/preamble-payload-exceptions.json +28 -0
  161. package/src/config/release-gate-locality.yml +11 -0
  162. package/src/config/routing-coverage-seed.json +18 -4
  163. package/src/config/rule-enforcement-baseline.json +0 -1
  164. package/src/install/claudeRuleRewrite.ts +16 -2
  165. package/src/install/conflict.ts +65 -9
  166. package/src/install/conflictTracker.ts +299 -0
  167. package/src/install/fsPrimitives.ts +54 -0
  168. package/src/install/manifestFiles.ts +312 -0
  169. package/src/install/preflight.ts +16 -2
  170. package/src/install/preserve.ts +205 -0
  171. package/src/install/recordedOwnership.ts +149 -0
  172. package/src/install/txlog.ts +11 -2
  173. package/src/install/types.ts +19 -4
  174. package/src/scripts/_cli/cmd_conformance.ts +88 -15
  175. package/src/scripts/_cli/cmd_doctor.ts +4 -3
  176. package/src/scripts/_cli/cmd_route_explain.ts +9 -2
  177. package/src/scripts/_cli/cmd_settings_get.ts +44 -0
  178. package/src/scripts/_cli/doctor_execution.ts +90 -0
  179. package/src/scripts/_dispatch.bash +3 -1
  180. package/src/scripts/_lib/activation_payload.ts +247 -0
  181. package/src/scripts/_lib/agent_settings.ts +4 -2
  182. package/src/scripts/_lib/authority_path.ts +102 -0
  183. package/src/scripts/_lib/base_ref_payload.ts +315 -0
  184. package/src/scripts/_lib/cascade_base.ts +94 -0
  185. package/src/scripts/_lib/changelog_eras.ts +7 -2
  186. package/src/scripts/_lib/continuation_ladder.ts +149 -2
  187. package/src/scripts/_lib/council_transport.ts +129 -0
  188. package/src/scripts/_lib/delivery_ready.ts +112 -0
  189. package/src/scripts/_lib/dropped_decision.ts +142 -0
  190. package/src/scripts/_lib/forge_protection.ts +267 -0
  191. package/src/scripts/_lib/hook_platform_keys.ts +27 -0
  192. package/src/scripts/_lib/installed_lock.ts +1 -1
  193. package/src/scripts/_lib/json_python_parity.ts +127 -0
  194. package/src/scripts/_lib/lean_projection_mode.ts +14 -3
  195. package/src/scripts/_lib/loop_surfaces.ts +382 -0
  196. package/src/scripts/_lib/measured_payload_ceiling.ts +424 -0
  197. package/src/scripts/_lib/mission_record.ts +190 -0
  198. package/src/scripts/_lib/obligation_frequency.ts +217 -0
  199. package/src/scripts/_lib/obligations.ts +402 -0
  200. package/src/scripts/_lib/orchestration_record.ts +11 -20
  201. package/src/scripts/_lib/payload_catalogue_completeness.ts +211 -0
  202. package/src/scripts/_lib/release_findings_ingest.ts +324 -0
  203. package/src/scripts/_lib/release_highlights.ts +199 -10
  204. package/src/scripts/_lib/release_holds.ts +493 -0
  205. package/src/scripts/_lib/release_migration_gate.ts +184 -0
  206. package/src/scripts/_lib/release_tag_dispatch.ts +63 -0
  207. package/src/scripts/_lib/review_baseline.ts +254 -0
  208. package/src/scripts/_lib/review_skipped_record.ts +61 -1
  209. package/src/scripts/_lib/rides_along.ts +102 -0
  210. package/src/scripts/_lib/settings_renamed_keys.ts +82 -0
  211. package/src/scripts/_lib/standing_bound_ratchet.ts +216 -103
  212. package/src/scripts/_lib/test_delta.ts +166 -0
  213. package/src/scripts/_lib/test_provenance.ts +171 -0
  214. package/src/scripts/_lib/turn_end_refusals.ts +51 -4
  215. package/src/scripts/_lib/typed_op_grant.ts +246 -0
  216. package/src/scripts/_lib/typed_op_watch.ts +185 -0
  217. package/src/scripts/ai_council/config.ts +8 -11
  218. package/src/scripts/ai_council/fallback_config.ts +5 -3
  219. package/src/scripts/ai_council/ownership_classes.ts +118 -0
  220. package/src/scripts/ask_block_census.ts +285 -15
  221. package/src/scripts/check_beta_review_markers.ts +35 -4
  222. package/src/scripts/check_enforcement_matrix.ts +624 -0
  223. package/src/scripts/check_finding_dispositions.ts +167 -16
  224. package/src/scripts/check_gate_reachability.ts +173 -10
  225. package/src/scripts/check_generator_sync.ts +954 -0
  226. package/src/scripts/check_held_object_arrivals.ts +381 -0
  227. package/src/scripts/check_preamble_payload_budget.ts +474 -124
  228. package/src/scripts/check_release_highlights.ts +33 -1
  229. package/src/scripts/check_release_holds.ts +567 -0
  230. package/src/scripts/check_release_published.ts +1 -1
  231. package/src/scripts/check_reply_consistency.ts +86 -17
  232. package/src/scripts/check_rule_projection_integrity.ts +22 -12
  233. package/src/scripts/check_test_delta.ts +294 -0
  234. package/src/scripts/check_test_weakening.ts +299 -0
  235. package/src/scripts/closure_scan.ts +333 -0
  236. package/src/scripts/compile_hook_manifest.ts +43 -3
  237. package/src/scripts/council_record_shape.ts +209 -0
  238. package/src/scripts/hook_manifest.json +1 -1
  239. package/src/scripts/hook_manifest.yaml +127 -12
  240. package/src/scripts/hooks/block_kernel_rule_writes.ts +12 -2
  241. package/src/scripts/hooks/concern_registry.ts +6 -0
  242. package/src/scripts/hooks/design_pass_hook.ts +128 -3
  243. package/src/scripts/hooks/end_review_nudge_hook.ts +101 -21
  244. package/src/scripts/hooks/evidence_independence.ts +96 -0
  245. package/src/scripts/hooks/memory_recall_hook.ts +540 -0
  246. package/src/scripts/hooks/obligation_settle_hook.ts +182 -0
  247. package/src/scripts/hooks/review_baseline_hook.ts +130 -0
  248. package/src/scripts/hooks/rule_inject_hook.ts +49 -1
  249. package/src/scripts/hooks/run_continuation_hook.ts +17 -20
  250. package/src/scripts/hooks/turn_end_gate_hook.ts +232 -14
  251. package/src/scripts/hooks_doctor.ts +89 -1
  252. package/src/scripts/hooks_status.ts +19 -0
  253. package/src/scripts/install.ts +107 -207
  254. package/src/scripts/interruption_report.ts +8 -2
  255. package/src/scripts/janitor.ts +15 -1
  256. package/src/scripts/lint_decision_classes.ts +464 -0
  257. package/src/scripts/lint_hook_manifest.ts +11 -0
  258. package/src/scripts/lint_major_migration_sections.ts +450 -0
  259. package/src/scripts/lint_plan_risk_register.ts +47 -3
  260. package/src/scripts/lint_roadmap_blockers.ts +61 -0
  261. package/src/scripts/lint_roadmap_producers.ts +202 -0
  262. package/src/scripts/measure_rule_budget.ts +101 -5
  263. package/src/scripts/measure_turn_end_gate.ts +302 -5
  264. package/src/scripts/new_roadmap.ts +37 -0
  265. package/src/scripts/orchestration_record.ts +0 -5
  266. package/src/scripts/release.ts +66 -162
  267. package/src/scripts/release_drill.ts +460 -15
  268. package/src/scripts/release_env.ts +1 -1
  269. package/src/scripts/release_publication.ts +52 -1
  270. package/src/scripts/report_enforcement_drift.ts +566 -0
  271. package/src/scripts/report_held_object_arrivals.ts +456 -0
  272. package/src/scripts/report_host_injection_effect.ts +3 -11
  273. package/src/scripts/report_standing_payload_by_host.ts +26 -152
  274. package/src/scripts/schemas/agent-settings.schema.json +23 -0
  275. package/src/scripts/schemas/command.schema.json +4 -0
  276. package/src/scripts/scope_growth.ts +219 -0
  277. package/src/scripts/sync_agent_settings.ts +140 -18
  278. package/src/scripts/trigger_eval_grandfather.json +0 -1
  279. package/src/scripts/ui_conformance_probe.ts +622 -0
  280. package/src/server/io/yamlIO.ts +48 -0
  281. package/src/server/schemas/settings.ts +31 -7
  282. package/src/shared/missionExecution.ts +126 -0
  283. package/dist/cli-delegate/chunk-523HCFYO.js +0 -90
@@ -64,6 +64,16 @@ that was never a judgement call.
64
64
  "Target release: X.Y.Z", never plan git tags or deprecation dates. Release
65
65
  and tag decisions belong to the user and are taken outside the roadmap.
66
66
  This is enforced by [`scope-control`](../rules/scope-control.md#git-operations--permission-gated).
67
+
68
+ **What the prohibition does not reach — a state, not a schedule.** The five
69
+ sentences above are unchanged and stay the rule: a roadmap does not decide
70
+ *when* or *in which version* work ships. It MUST, however, declare any
71
+ intentionally unreleasable intermediate tree state, together with the
72
+ machine-verified condition that clears it, per rule 28. Naming a state that
73
+ must not be published is not a release decision — it is a fact about the tree
74
+ that the release path has no other way to learn, and today cannot learn: the
75
+ release entry points read no roadmap at all. Declaring the state is
76
+ mandatory; deciding what to do about it at a cut is still the operator's.
67
77
  14. **No automatic branch switches mid-roadmap.** Roadmap work runs on the
68
78
  branch the user is on. If a separate branch (spike, hotfix, experiment)
69
79
  would be genuinely useful, the agent may propose it **once** while
@@ -231,6 +241,32 @@ that was never a judgement call.
231
241
  edge source stays the single one already defined above; `relates:` never
232
242
  becomes a second dependency source.
233
243
 
244
+ **Sibling block, same frontmatter — `delivery:`.** Optional, and unlike
245
+ `execution:` it describes what happens to the BRANCH rather than to the
246
+ run's interaction pattern:
247
+
248
+ ```yaml
249
+ delivery:
250
+ pr_topology: stacked # single (default) | stacked
251
+ ```
252
+
253
+ `pr_topology: stacked` declares a dependent series of pull requests. It is
254
+ a plan the owner writes before execution and is **never** chosen by the
255
+ agent and never asked about at roadmap creation — see the `delivery:` block
256
+ in `agent-settings.template.yml`, where all three keys are Class C for that
257
+ reason. A roadmap declaring `stacked` owes a `## PR plan` section naming
258
+ the series and the order; `single` owes nothing, which is why it is the
259
+ default.
260
+
261
+ **Not yet a live override, and this is the honest state rather than an
262
+ omission.** `load_agent_settings` has four layers and none of them is a
263
+ roadmap, so a `delivery:` block here is read by no code today. It is
264
+ documented now because the key it mirrors is Class C — the owner has to
265
+ have a place to write the plan that is not an agent-writable setting — and
266
+ the cascade layer that would read it is scheduled by ADR-268, not yet
267
+ built. Until it is, treat a `delivery:` block here as a note to the next
268
+ human reader rather than as configuration.
269
+
234
270
  An explicit `relates: []` is a complete answer and the common one, but only
235
271
  when it carries the probe's `scanned:` line as its justification:
236
272
 
@@ -301,6 +337,13 @@ that was never a judgement call.
301
337
  step gated by a specific blocker may cross-reference it inline:
302
338
  `- [ ] … <!-- blocked-by: <blocker-id> -->`.
303
339
 
340
+ **A blocker stops execution; a hold stops publication.** The two are not
341
+ interchangeable and never substitute for one another. A blocker says the work
342
+ cannot proceed and is cleared by a person; a release hold (rule 28) says the
343
+ work may proceed but its intermediate tree state must not ship, and is
344
+ cleared by a checkbox whose `verify:` a machine runs. A roadmap that is
345
+ merely unfinished has neither — incompleteness is not a release condition.
346
+
304
347
  **A user-decision blocker's annotation records whether the question
305
348
  was actually put.** Where the blocker's `Owner:` is the maintainer,
306
349
  the user or the owner, the marker carries an `asked:` field —
@@ -400,6 +443,22 @@ that was never a judgement call.
400
443
  on nothing until an author declares a class and there is no backlog
401
444
  to grandfather.
402
445
 
446
+ **A judgement call is never parked here.** A blocker records a decision
447
+ the agent **correctly did not own**. A technical judgement call — two
448
+ valid architectures, a dependency trade-off, an unclear boundary with no
449
+ new product semantics — is not one of those: it routes back through the
450
+ closure pass and is resolved at the lowest rung that owns it (evidence,
451
+ convention, the agent, an independent session, the council, the team),
452
+ then recorded as a `## Decisions` row per rule 27. A technical decision
453
+ does not become owner-owned because it is hard (ADR-268 § 10).
454
+
455
+ An entry MAY declare `- **Ownership:** <class>`, and when it does the
456
+ class must be one of the three owner-owned ones — `product-owned`,
457
+ `business-owned`, `destructive-owned`. A technical class there is the
458
+ parked judgement call this retires, and `lint_roadmap_blockers` reds it.
459
+ The field is optional and HARD rather than ratcheted, on the same
460
+ no-backlog-to-grandfather ground as `Class:`.
461
+
403
462
  **Legacy fallback.** A body-level `> Blocked until <condition>`
404
463
  note (the follow-up-roadmap convention from rule 17) is parsed by
405
464
  the dashboard generator as one implicit roadmap-level blocker
@@ -582,6 +641,126 @@ that was never a judgement call.
582
641
  tracked estate; blocking is earned by tracked-scope evidence, not
583
642
  assumed).
584
643
 
644
+ 27. **A ready roadmap carries no unresolved decision — it carries a
645
+ `## Decisions` table.** A plan enters execution as an **execution
646
+ contract**: every foreseeable decision closed before the first step,
647
+ so a long run never meets a question planning could have closed.
648
+
649
+ The section is a six-column table, and the two vocabularies in it are
650
+ closed sets:
651
+
652
+ ```markdown
653
+ ## Decisions
654
+
655
+ | ID | ownership | resolved by | decision | evidence | revisit if |
656
+ |---|---|---|---|---|---|
657
+ | D1 | contested-technical | council:2026-09-13 | NDJSON on disk | streaming read at bounded RSS | the reader stops streaming |
658
+ ```
659
+
660
+ `ownership` is one of the eight ownership classes — `deterministic`,
661
+ `reversible-technical`, `contested-technical`, `critical-technical`,
662
+ `product-owned`, `business-owned`, `destructive-owned`,
663
+ `spend-exhaustion`. The axis is **ownership, not impact**: a technical
664
+ decision does not become owner-owned because it is hard
665
+ (ADR-268 § 10). `resolved by` is one of `evidence`, `agent`,
666
+ `independent:<session or model>`, `council:<record>`, `team:<record>`,
667
+ `owner` — the prefixed forms carry their record, because a resolver
668
+ with no record is a claim rather than a resolution.
669
+
670
+ `revisit if` names the condition that reopens the row. Execution reads
671
+ the table **before any step**, and a closed decision is re-asked only
672
+ when its `revisit if` condition became true — not because a context
673
+ reset lost it, which is the repeat the ask census counts.
674
+
675
+ Enforced by `lint_decision_classes`: in a ready roadmap an unresolved
676
+ marker (`TBD`, *to be decided*, *decide later*, *open question*)
677
+ outside the section is a finding, and the same marker resolved into a
678
+ row is not. `## Blockers` is the other discharge — a five-field
679
+ structured blocker IS the record of a decision the agent correctly did
680
+ not own, so an open item there is not an unclosed one.
681
+
682
+ The section is owed where there is a decision to record. A plan that
683
+ closed everything inline carries no table and no marker, and is
684
+ complete; an empty table written to satisfy a template records
685
+ nothing, exactly as rule 25 says of a perfunctory pre-mortem.
686
+
687
+ 28. **Release holds — declare an unreleasable intermediate state, or there is
688
+ not one.** A roadmap whose intermediate tree state must not be published
689
+ declares that state in a `## Release holds` section. Nothing else in the
690
+ repository can express it, and the release path reads no roadmap today, so
691
+ an undeclared unreleasable state is invisible to every release boundary.
692
+
693
+ **Non-goal, stated first because it is the failure mode closest to hand:
694
+ roadmap *incompleteness* is never a release condition.** An unfinished
695
+ roadmap does not block a release, has never blocked one, and must not start
696
+ to. A hold is a positive declaration about a named tree state, never a side
697
+ effect of open checkboxes.
698
+
699
+ **Authoring order — `re-sequence → guard → hold`, in that order.** A hold is
700
+ the last resort, not the first tool:
701
+
702
+ 1. **Re-sequence.** Can the phases be cut so that no intermediate state is
703
+ broken? A continuous shape needs no hold and is always preferred.
704
+ 2. **Guard.** Can the half-built surface be hidden behind a flag, an unwired
705
+ entry point, or a default that keeps it inert? A guarded state is
706
+ publishable and needs no hold.
707
+ 3. **Hold.** Only when neither works. Every hold entry therefore carries a
708
+ mandatory `Why not a guard:` field naming the concrete reason the guard
709
+ rung failed. A hold entry without it is malformed and reddens CI.
710
+
711
+ **Entry shape** (one entry per hold, inside `## Release holds`):
712
+
713
+ ```markdown
714
+ ## Release holds
715
+
716
+ ### hold: <kebab-id>
717
+ - **Channel:** all <!-- all | latest -->
718
+ - **Opened by:** <phase.step> <!-- the checkbox whose [x] opens the window -->
719
+ - **Cleared by:** <phase.step> <!-- the checkbox whose [x] closes it -->
720
+ - **State:** {the one sentence naming what is broken in the tree while open.}
721
+ - **Why not a guard:** {why rung 2 failed, concretely.}
722
+ ```
723
+
724
+ **Marker grammar.** Both named steps carry an inline marker so the binding is
725
+ readable from the checkbox and not only from the section:
726
+ `- [ ] … <!-- opens-hold: <hold-id> -->` and
727
+ `- [ ] … <!-- clears-hold: <hold-id> -->`. The clearing step MUST carry a
728
+ `verify:` field (rule 23) — a hold cleared by an unverified flip is a hold
729
+ cleared by assertion.
730
+
731
+ **Channel vocabulary.** `all` (the default, and what an omitted `Channel:`
732
+ parses to) refuses every cut. `latest` refuses a stable `X.Y.Z` cut and
733
+ permits a `-next.N` prerelease, for a state safe to publish to an opt-in
734
+ channel but not to the default one. There is no third value and no override:
735
+ a plain `X.Y.Z` cut is never silently converted to a prerelease, and the
736
+ choice between finishing the clearing step, cutting `-next.N`, and using a
737
+ release line stays the operator's.
738
+
739
+ **State table.** A hold is in exactly one of four states, and only the first
740
+ is publishable:
741
+
742
+ | State | How it is reached | Release boundary |
743
+ |---|---|---|
744
+ | `unopened` | the opening checkbox is not `[x]` | permits |
745
+ | `open` | opener `[x]`, clearer not `[x]` | **refuses**, per `Channel:` |
746
+ | `cleared` | both `[x]` | permits |
747
+ | `not-evaluable` | the declaration is malformed, the file unreadable, or the evaluator errored or timed out | **refuses**, always, on every channel |
748
+
749
+ `not-evaluable` refusing is the load-bearing row: there is no path on which
750
+ "could not evaluate" reads as safe. A malformed declaration additionally
751
+ reddens normal CI, so a broken hold cannot fail open by being unparseable.
752
+
753
+ **Per-folder lifecycle.** A window does not disappear by moving the file.
754
+ A roadmap with an open window may not be moved to `archive/` or `skipped/` —
755
+ the move is refused naming the hold id. It may be moved to `later/`, and the
756
+ open window is then named in the `entry_condition.what` part; it still lists
757
+ and still refuses. Deletion is a known residual, not a mitigation: rule 12
758
+ already forbids it and no gate can see a file that is gone.
759
+
760
+ **No versions inside a hold entry.** Rule 13's prohibition applies inside
761
+ `## Release holds` exactly as it does everywhere else. A hold names a *state*
762
+ and its clearing *checkbox*; it never names a version, a tag, or a date.
763
+
585
764
  ---
586
765
 
587
766
  ## Quality Gates (remote CI by default)
@@ -672,6 +851,15 @@ complexity: lightweight
672
851
  - [ ] {Observable, testable criterion}
673
852
  - [ ] All quality gates pass (PHPStan, Rector, tests)
674
853
 
854
+ <!-- ## Decisions — INCLUDE when the closure pass closed a decision this
855
+ plan would otherwise have met mid-run (rule 27). OMIT entirely when
856
+ nothing was open: an empty table records nothing.
857
+ ## Decisions
858
+
859
+ | ID | ownership | resolved by | decision | evidence | revisit if |
860
+ |---|---|---|---|---|---|
861
+ | D1 | {ownership class} | {resolver} | {what was decided} | {file:line, record, probe} | {condition that reopens it} | -->
862
+
675
863
  <!-- ## Blockers — INCLUDE ONLY when a gate exists that only the user /
676
864
  a maintainer can clear (decision, external dependency, evidence
677
865
  threshold, soak window). OMIT entirely when there are none — see
@@ -78,6 +78,41 @@ export const VOLATILE_KEYS: ReadonlyArray<string> = [
78
78
  /** Why the loop stopped, or that it has budget left. */
79
79
  export type SelfFixKind = 'retry' | 'exhausted' | 'no_progress';
80
80
 
81
+ /**
82
+ * `SelfFixKind` in the vocabulary a reader can aggregate across surfaces.
83
+ *
84
+ * `Outcome.PARTIAL` says the loop stopped without a green; it cannot say
85
+ * whether the budget ran out or the target stopped moving, and those want
86
+ * different responses — a bigger budget against the first, a different
87
+ * approach against the second. Until now the distinction left this module only
88
+ * inside a free-text `message`, so the continuation hook's stops were
89
+ * countable and this loop's were not.
90
+ *
91
+ * The two values are members of `RunTerminalState`, whose authoritative
92
+ * declaration is `src/scripts/_lib/outcome_vocabularies.ts:RUN_TERMINAL_STATES`
93
+ * and whose prose home is `contexts/execution/terminal-states.md`. They are
94
+ * written as literals rather than imported because this file is a TEMPLATE:
95
+ * it ships into consumer projects that have no `src/scripts/_lib` to import
96
+ * from, and reaching across that boundary would break every install. It is a
97
+ * two-member projection across a packaging boundary, not a second vocabulary —
98
+ * nothing here may add a member the registry does not have.
99
+ */
100
+ export const RUN_TERMINAL_BY_KIND: Readonly<Record<Exclude<SelfFixKind, 'retry'>, string>> = {
101
+ exhausted: 'exhausted',
102
+ no_progress: 'stagnated',
103
+ };
104
+
105
+ /**
106
+ * The run-terminal value for a decision, or `null` while the loop is still live.
107
+ *
108
+ * `retry` has no terminal by construction — the loop has not stopped — and the
109
+ * null is returned rather than defaulted so a caller cannot accidentally stamp
110
+ * a terminal value onto a run that is still going.
111
+ */
112
+ export function run_terminal_for(kind: SelfFixKind): string | null {
113
+ return kind === 'retry' ? null : RUN_TERMINAL_BY_KIND[kind];
114
+ }
115
+
81
116
  /** Verdict of {@link decide} — pure, so the caller owns every mutation. */
82
117
  export interface SelfFixDecision {
83
118
  kind: SelfFixKind;
@@ -147,6 +182,27 @@ export function record_attempt(state: DeliveryState, lane: string, signature: st
147
182
  state.self_fix = container;
148
183
  }
149
184
 
185
+ /**
186
+ * Stamp the lane's run-terminal value onto `state.self_fix`.
187
+ *
188
+ * Written into the state the module already owns and the dispatcher already
189
+ * persists, rather than onto `StepResult` — `StepResult` carries `outcome`,
190
+ * `questions` and `message` and is shared by every directive in the engine, so
191
+ * widening it for one loop's stop reason would be a change to all of them.
192
+ *
193
+ * A `retry` decision writes nothing: the loop has not stopped, and a terminal
194
+ * value recorded mid-loop would be read as one by anything aggregating the
195
+ * field.
196
+ */
197
+ export function record_run_terminal(state: DeliveryState, lane: string, decision: SelfFixDecision): void {
198
+ const run_terminal = run_terminal_for(decision.kind);
199
+ if (run_terminal === null) return;
200
+ const container = _pyTruthy(state.self_fix) ? (state.self_fix as Record<string, Any>) : {};
201
+ const lane_state = _lane_state(state, lane);
202
+ container[lane] = { ...lane_state, run_terminal };
203
+ state.self_fix = container;
204
+ }
205
+
150
206
  /** DoD entries the agent has not recorded as proven. Never inferred. */
151
207
  export function unmet_dod(state: DeliveryState): Array<Record<string, Any>> {
152
208
  const dod = (state.ticket ?? {})['dod'];
@@ -213,8 +269,11 @@ export function partial_exit(args: {
213
269
  decision: SelfFixDecision;
214
270
  unmet: Array<Record<string, Any>>;
215
271
  rerun_directive: string;
272
+ /** Written the run-terminal value onto, when the caller has the state in hand. */
273
+ state?: DeliveryState;
216
274
  }): StepResult {
217
- const { lane, ticket_id, verdict, decision, unmet, rerun_directive } = args;
275
+ const { lane, ticket_id, verdict, decision, unmet, rerun_directive, state } = args;
276
+ if (state !== undefined) record_run_terminal(state, lane, decision);
218
277
  const reason =
219
278
  decision.kind === 'no_progress'
220
279
  ? `two consecutive attempts produced an identical \`${lane}\` verdict, ` +
@@ -244,7 +303,8 @@ export function partial_exit(args: {
244
303
  ],
245
304
  message:
246
305
  `Ticket ${ticket_id} ${lane} verdict is \`${String(verdict)}\` after ` +
247
- `${decision.attempts} self-fix attempt(s) (${decision.kind}); exiting PARTIAL.`,
306
+ `${decision.attempts} self-fix attempt(s) (${decision.kind}); exiting PARTIAL ` +
307
+ `(run_terminal: ${String(run_terminal_for(decision.kind))}).`,
248
308
  });
249
309
  }
250
310
 
@@ -225,6 +225,7 @@ function _blocked_on_bad_verdict(state: DeliveryState, verdict: Any): StepResult
225
225
  decision,
226
226
  unmet: unmet_dod(state),
227
227
  rerun_directive: 'run-tests',
228
+ state,
228
229
  });
229
230
  }
230
231
 
@@ -201,6 +201,7 @@ function _blocked_on_bad_verdict(state: DeliveryState, verdict: Any): StepResult
201
201
  decision,
202
202
  unmet: unmet_dod(state),
203
203
  rerun_directive: 'review-changes',
204
+ state,
204
205
  });
205
206
  }
206
207
 
@@ -123,6 +123,44 @@ function carveOutKeys() {
123
123
  return SETTINGS_CARVE_OUT.map((c) => c.key);
124
124
  }
125
125
 
126
+ // src/scripts/_lib/settings_renamed_keys.ts
127
+ var RENAMED_KEYS = /* @__PURE__ */ new Map([
128
+ ["planning.challenge_on_create", "planning.closure_pass"]
129
+ ]);
130
+ var _warned = /* @__PURE__ */ new Set();
131
+ function _read(tree, dotted) {
132
+ let cur = tree;
133
+ for (const part of dotted.split(".")) {
134
+ if (cur === null || typeof cur !== "object" || Array.isArray(cur)) return void 0;
135
+ cur = cur[part];
136
+ }
137
+ return cur;
138
+ }
139
+ function _write(tree, dotted, value) {
140
+ const parts = dotted.split(".");
141
+ let cur = tree;
142
+ for (const part of parts.slice(0, -1)) {
143
+ const next = cur[part];
144
+ if (next === null || typeof next !== "object" || Array.isArray(next)) cur[part] = {};
145
+ cur = cur[part];
146
+ }
147
+ cur[parts[parts.length - 1]] = value;
148
+ }
149
+ function applyRenamedKeys(layer) {
150
+ for (const [oldKey, newKey] of RENAMED_KEYS) {
151
+ const oldValue = _read(layer, oldKey);
152
+ if (oldValue === void 0) continue;
153
+ if (_read(layer, newKey) === void 0) _write(layer, newKey, oldValue);
154
+ if (_warned.has(oldKey)) continue;
155
+ _warned.add(oldKey);
156
+ process.stderr.write(
157
+ `\u26A0\uFE0F settings: \`${oldKey}\` was renamed to \`${newKey}\`. The old key still works for one minor; rename it in your .agent-settings.yml.
158
+ `
159
+ );
160
+ }
161
+ return layer;
162
+ }
163
+
126
164
  // src/scripts/_lib/agent_settings.ts
127
165
  var _require = createRequire(import.meta.url);
128
166
  var Logger = class {
@@ -426,9 +464,9 @@ function load_agent_settings(options = {}) {
426
464
  }
427
465
  const cascade = _resolve_cascade_paths(cwd, project_path);
428
466
  const merged = template_defaults(template_path ?? void 0);
429
- _deep_merge(merged, user_global_filtered);
467
+ _deep_merge(merged, applyRenamedKeys(user_global_filtered));
430
468
  for (const p of cascade) {
431
- const layer = _read_yaml(p) ?? {};
469
+ const layer = applyRenamedKeys(_read_yaml(p) ?? {});
432
470
  if (Object.keys(layer).length > 0) {
433
471
  _deep_merge(merged, layer);
434
472
  }