@event4u/agent-config 16.0.0 → 16.2.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 (382) 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 +289 -140
  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/commands/work.md +4 -0
  24. package/dist/agent-src/contexts/authority/scope-growth-ownership.md +80 -0
  25. package/dist/agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +47 -0
  26. package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +44 -3
  27. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +19 -23
  28. package/dist/agent-src/contexts/execution/decision-closure-execution.md +93 -0
  29. package/dist/agent-src/contexts/execution/fix-loop-ladder.md +108 -0
  30. package/dist/agent-src/contexts/execution/plan-confidence-gate.md +4 -2
  31. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +75 -6
  32. package/dist/agent-src/guidelines/agent-infra/active-remediation-mechanics.md +57 -0
  33. package/dist/agent-src/guidelines/agent-infra/evaluator-independence-mechanics.md +102 -0
  34. package/dist/agent-src/guidelines/design-fidelity-routing.md +29 -0
  35. package/dist/agent-src/rules/autonomous-execution.md +15 -8
  36. package/dist/agent-src/rules/delegation-policy.md +23 -45
  37. package/dist/agent-src/rules/design-fidelity.md +32 -37
  38. package/dist/agent-src/rules/evaluator-independence.md +43 -49
  39. package/dist/agent-src/rules/test-first.md +41 -0
  40. package/dist/agent-src/rules/ui-audit-gate.md +1 -2
  41. package/dist/agent-src/skills/accessibility-auditor/data/aria-patterns.csv +1 -1
  42. package/dist/agent-src/skills/accessibility-auditor/data/manifest.json +3 -3
  43. package/dist/agent-src/skills/ai-council/SKILL.md +11 -3
  44. package/dist/agent-src/skills/api-design/data/manifest.json +3 -3
  45. package/dist/agent-src/skills/database/data/manifest.json +4 -4
  46. package/dist/agent-src/skills/database/data/query-tuning.csv +3 -3
  47. package/dist/agent-src/skills/design-review/SKILL.md +80 -4
  48. package/dist/agent-src/skills/design-review/references/verification-automation.md +32 -0
  49. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +30 -5
  50. package/dist/agent-src/skills/existing-ui-audit/references/component-taxonomy-detection.md +56 -0
  51. package/dist/agent-src/skills/experiment-loop/SKILL.md +31 -1
  52. package/dist/agent-src/skills/markitdown/SKILL.md +4 -0
  53. package/dist/agent-src/skills/playwright-testing/SKILL.md +30 -6
  54. package/dist/agent-src/skills/roadmap-writing/SKILL.md +1 -1
  55. package/dist/agent-src/skills/storybook-workshop/SKILL.md +42 -3
  56. package/dist/agent-src/skills/threat-modeling/SKILL.md +9 -4
  57. package/dist/agent-src/skills/threat-modeling/data/manifest.json +4 -4
  58. package/dist/agent-src/skills/ui-component-architect/SKILL.md +23 -0
  59. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +37 -3
  60. package/dist/agent-src/templates/agent-settings.md +1 -1
  61. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  62. package/dist/agent-src/templates/roadmaps.md +218 -0
  63. package/dist/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  64. package/dist/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  65. package/dist/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  66. package/dist/agent-src/templates/scripts/work_engine/directives/ui/app_spec.ts +10 -4
  67. package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +260 -21
  68. package/dist/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +22 -3
  69. package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +6 -1
  70. package/dist/agent-src/templates/scripts/work_engine/state.ts +57 -7
  71. package/dist/agent-src/templates/scripts/work_engine/taxonomy/detect.ts +500 -0
  72. package/dist/agent-src/templates/scripts/work_engine/taxonomy/place.ts +183 -0
  73. package/dist/cli/python/knowledge_ingest.js +1 -1
  74. package/dist/cli/python/workspace_drive.js +1 -1
  75. package/dist/cli-delegate/check_update_banner.js +40 -2
  76. package/dist/cli-delegate/chunk-4E2W63DA.js +335 -0
  77. package/dist/cli-delegate/{chunk-S3VFXMTM.js → chunk-4XFP2Y3E.js} +1 -1
  78. package/dist/cli-delegate/chunk-5R7HOLAF.js +99 -0
  79. package/dist/cli-delegate/{chunk-IVBPRCQO.js → chunk-6KFEC3G7.js} +1 -1
  80. package/dist/cli-delegate/{chunk-2TAQ2K4V.js → chunk-6KM6ORRY.js} +55 -386
  81. package/dist/cli-delegate/{chunk-AK6HODNQ.js → chunk-7XGBX6ZH.js} +973 -555
  82. package/dist/cli-delegate/{chunk-2XY7ILBT.js → chunk-FC75PGJE.js} +42 -2
  83. package/dist/cli-delegate/{chunk-55ACLDUE.js → chunk-FP36SWJD.js} +587 -141
  84. package/dist/cli-delegate/{chunk-3FKR64R5.js → chunk-IGD6ERX6.js} +62 -7
  85. package/dist/cli-delegate/{chunk-GYC3VRYN.js → chunk-JNMVLWLR.js} +99 -14
  86. package/dist/cli-delegate/{chunk-H32DGUJH.js → chunk-P6ZHP5W2.js} +1 -1
  87. package/dist/cli-delegate/{chunk-57PN4GYJ.js → chunk-RGNIWTEA.js} +1 -1
  88. package/dist/cli-delegate/chunk-ROYYTEZU.js +39 -0
  89. package/dist/cli-delegate/{chunk-2DK2VJWG.js → chunk-WGXTVKCQ.js} +20 -6
  90. package/dist/cli-delegate/chunk-YDPILCOL.js +152 -0
  91. package/dist/cli-delegate/{chunk-QJWAUMJW.js → chunk-YJ72UIAK.js} +730 -15
  92. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  93. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  94. package/dist/cli-delegate/cmd_conformance.js +985 -831
  95. package/dist/cli-delegate/cmd_doctor.js +7 -5
  96. package/dist/cli-delegate/cmd_explain.js +2 -2
  97. package/dist/cli-delegate/cmd_export.js +9 -7
  98. package/dist/cli-delegate/cmd_fleet.js +4 -2
  99. package/dist/cli-delegate/cmd_handoff.js +7 -7
  100. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  101. package/dist/cli-delegate/cmd_memory_get.js +1 -1
  102. package/dist/cli-delegate/cmd_migrate.js +2 -2
  103. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  104. package/dist/cli-delegate/cmd_preflight.js +4 -2
  105. package/dist/cli-delegate/cmd_prune.js +10 -8
  106. package/dist/cli-delegate/cmd_route_audit.js +3 -3
  107. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  108. package/dist/cli-delegate/cmd_session_recycle.js +4 -4
  109. package/dist/cli-delegate/cmd_settings_get.js +28 -2
  110. package/dist/cli-delegate/cmd_settings_migrate.js +9 -7
  111. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  112. package/dist/cli-delegate/cmd_sync.js +10 -8
  113. package/dist/cli-delegate/cmd_uninstall.js +16 -13
  114. package/dist/cli-delegate/cmd_update.js +1 -1
  115. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  116. package/dist/cli-delegate/cmd_validate.js +12 -10
  117. package/dist/cli-delegate/cmd_versions.js +1 -1
  118. package/dist/discovery/deprecation-report.md +1 -1
  119. package/dist/discovery/discovery-manifest.json +90 -43
  120. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  121. package/dist/discovery/discovery-manifest.summary.md +4 -4
  122. package/dist/discovery/dormancy-report.md +1 -1
  123. package/dist/discovery/orphan-report.md +1 -1
  124. package/dist/discovery/packs.json +10 -8
  125. package/dist/discovery/trust-report.md +3 -3
  126. package/dist/discovery/workspaces.json +8 -6
  127. package/dist/hooks/dispatch.js +7682 -2772
  128. package/dist/hooks/dispatch.sha256 +1 -0
  129. package/dist/install/claudeRuleRewrite.js +14 -3
  130. package/dist/install/conflict.js +60 -10
  131. package/dist/install/conflictTracker.js +218 -0
  132. package/dist/install/fsPrimitives.js +54 -0
  133. package/dist/install/install.mjs +2200 -1559
  134. package/dist/install/manifestFiles.js +259 -0
  135. package/dist/install/preflight.js +14 -2
  136. package/dist/install/preserve.js +157 -0
  137. package/dist/install/recordedOwnership.js +132 -0
  138. package/dist/install/txlog.js +11 -2
  139. package/dist/mcp/registry-manifest.json +3 -3
  140. package/dist/mcp/server.json +2 -2
  141. package/dist/mcp/server.mjs +3066 -1470
  142. package/dist/router.json +1 -1
  143. package/dist/scripts/_lib/agent_settings.js +3 -2
  144. package/dist/scripts/_lib/fs_atomic.js +167 -0
  145. package/dist/scripts/_lib/installed_tools.js +460 -0
  146. package/dist/scripts/_lib/lean_projection_mode.js +3 -2
  147. package/dist/scripts/_lib/settings_renamed_keys.js +78 -0
  148. package/dist/server/routes/install.js +8 -0
  149. package/dist/server/routes/wizard.js +9 -3
  150. package/dist/server/schemas/settings.js +40 -5
  151. package/dist/shared/missionExecution.js +97 -0
  152. package/dist/ui/assets/index-Cwq4d0hX.js +23 -0
  153. package/dist/ui/assets/index-Cyjy8bWO.css +1 -0
  154. package/dist/ui/index.html +2 -2
  155. package/docs/MIGRATION.md +103 -0
  156. package/docs/contracts/settings-classes.md +28 -7
  157. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +57 -0
  158. package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +102 -0
  159. package/docs/guidelines/design-fidelity-routing.md +29 -0
  160. package/package.json +4 -4
  161. package/src/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  162. package/src/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  163. package/src/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  164. package/src/agent-src/templates/scripts/work_engine/directives/ui/app_spec.ts +10 -4
  165. package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +260 -21
  166. package/src/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +22 -3
  167. package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +6 -1
  168. package/src/agent-src/templates/scripts/work_engine/state.ts +57 -7
  169. package/src/agent-src/templates/scripts/work_engine/taxonomy/detect.ts +500 -0
  170. package/src/agent-src/templates/scripts/work_engine/taxonomy/place.ts +183 -0
  171. package/src/config/agent-settings.template.yml +168 -27
  172. package/src/config/auto-rule-budget.json +16 -0
  173. package/src/config/ci-local-parity.yml +36 -5
  174. package/src/config/continuity-surface.json +23 -2
  175. package/src/config/gate-coverage.yml +377 -13
  176. package/src/config/gate-violation-baselines.json +10 -6
  177. package/src/config/hook-latency-budget.json +21 -0
  178. package/src/config/hook-token-budget.json +4 -2
  179. package/src/config/loop-surfaces.yaml +215 -0
  180. package/src/config/metric-registry.yml +114 -0
  181. package/src/config/placeholder-drift-budget.json +10 -0
  182. package/src/config/platform-anchor.json +3 -2
  183. package/src/config/release-gate-locality.yml +11 -0
  184. package/src/config/routing-coverage-seed.json +33 -5
  185. package/src/config/rule-enforcement-baseline.json +0 -1
  186. package/src/install/claudeRuleRewrite.ts +16 -2
  187. package/src/install/conflict.ts +65 -9
  188. package/src/install/conflictTracker.ts +299 -0
  189. package/src/install/fsPrimitives.ts +54 -0
  190. package/src/install/manifestFiles.ts +312 -0
  191. package/src/install/preflight.ts +16 -2
  192. package/src/install/preserve.ts +205 -0
  193. package/src/install/recordedOwnership.ts +149 -0
  194. package/src/install/txlog.ts +11 -2
  195. package/src/install/types.ts +19 -4
  196. package/src/scripts/_cli/cmd_conformance.ts +88 -15
  197. package/src/scripts/_cli/cmd_doctor.ts +7 -20
  198. package/src/scripts/_cli/cmd_route_explain.ts +9 -2
  199. package/src/scripts/_cli/cmd_settings_get.ts +44 -0
  200. package/src/scripts/_cli/doctor_execution.ts +173 -0
  201. package/src/scripts/_cli/doctor_network_posture.ts +226 -0
  202. package/src/scripts/_lib/activation_payload.ts +247 -0
  203. package/src/scripts/_lib/agent_settings.ts +4 -2
  204. package/src/scripts/_lib/authority_path.ts +102 -0
  205. package/src/scripts/_lib/body_portable.ts +102 -0
  206. package/src/scripts/_lib/cascade_base.ts +94 -0
  207. package/src/scripts/_lib/cc_transcript.ts +132 -1
  208. package/src/scripts/_lib/changelog_eras.ts +7 -2
  209. package/src/scripts/_lib/concern_sla_window.ts +200 -0
  210. package/src/scripts/_lib/continuation_ladder.ts +149 -2
  211. package/src/scripts/_lib/council_transport.ts +129 -0
  212. package/src/scripts/_lib/delivery_ready.ts +112 -0
  213. package/src/scripts/_lib/forge_protection.ts +381 -0
  214. package/src/scripts/_lib/forge_reader.ts +558 -0
  215. package/src/scripts/_lib/hook_platform_keys.ts +27 -0
  216. package/src/scripts/_lib/host_env_write.ts +111 -0
  217. package/src/scripts/_lib/json_python_parity.ts +127 -0
  218. package/src/scripts/_lib/lean_projection_mode.ts +14 -3
  219. package/src/scripts/_lib/llm_proposer_transport.ts +14 -4
  220. package/src/scripts/_lib/loop_surfaces.ts +382 -0
  221. package/src/scripts/_lib/mission_record.ts +190 -0
  222. package/src/scripts/_lib/obligation_frequency.ts +217 -0
  223. package/src/scripts/_lib/obligations.ts +513 -0
  224. package/src/scripts/_lib/orchestration_record.ts +11 -20
  225. package/src/scripts/_lib/probe_inputs.ts +271 -0
  226. package/src/scripts/_lib/read_surface_scan.ts +322 -0
  227. package/src/scripts/_lib/release_highlights.ts +201 -11
  228. package/src/scripts/_lib/release_holds.ts +493 -0
  229. package/src/scripts/_lib/release_migration_gate.ts +184 -0
  230. package/src/scripts/_lib/retrieval_sanitize.ts +77 -16
  231. package/src/scripts/_lib/rides_along.ts +102 -0
  232. package/src/scripts/_lib/settings_renamed_keys.ts +82 -0
  233. package/src/scripts/_lib/shell_write_shapes.ts +108 -0
  234. package/src/scripts/_lib/structural_hiding.ts +622 -0
  235. package/src/scripts/_lib/test_delta.ts +166 -0
  236. package/src/scripts/_lib/test_provenance.ts +171 -0
  237. package/src/scripts/_lib/turn_end_refusals.ts +525 -4
  238. package/src/scripts/_lib/turn_end_transcript.ts +216 -0
  239. package/src/scripts/_lib/typed_op_grant.ts +246 -0
  240. package/src/scripts/_lib/typed_op_watch.ts +185 -0
  241. package/src/scripts/_lib/verification_command.ts +324 -0
  242. package/src/scripts/_lib/verification_evidence.ts +647 -0
  243. package/src/scripts/_lib/verify_clause.ts +280 -0
  244. package/src/scripts/ai_council/config.ts +8 -11
  245. package/src/scripts/ai_council/fallback_config.ts +5 -3
  246. package/src/scripts/ai_council/ownership_classes.ts +118 -0
  247. package/src/scripts/ai_team/team_dispatch.ts +4 -0
  248. package/src/scripts/ask_block_census.ts +285 -15
  249. package/src/scripts/before_complete_hook.ts +340 -23
  250. package/src/scripts/bench_hook_latency.ts +412 -5
  251. package/src/scripts/cache_realization_report.ts +61 -1
  252. package/src/scripts/check_argument_hint.ts +287 -0
  253. package/src/scripts/check_claims.ts +125 -1
  254. package/src/scripts/check_enforcement_coverage.ts +38 -9
  255. package/src/scripts/check_enforcement_matrix.ts +866 -0
  256. package/src/scripts/check_finding_dispositions.ts +22 -3
  257. package/src/scripts/check_gate_reachability.ts +173 -10
  258. package/src/scripts/check_generator_sync.ts +1025 -0
  259. package/src/scripts/check_host_docs_digest.ts +786 -0
  260. package/src/scripts/check_host_format_column.ts +559 -0
  261. package/src/scripts/check_input_references.ts +228 -0
  262. package/src/scripts/check_inputs_parity.ts +235 -0
  263. package/src/scripts/check_kernel_edit_ratified.ts +47 -5
  264. package/src/scripts/check_kill_switch_table.ts +294 -0
  265. package/src/scripts/check_placeholder_drift.ts +221 -0
  266. package/src/scripts/check_preamble_payload_budget.ts +75 -2
  267. package/src/scripts/check_read_surface_coverage.ts +515 -0
  268. package/src/scripts/check_release_highlights.ts +33 -1
  269. package/src/scripts/check_release_holds.ts +568 -0
  270. package/src/scripts/check_routing_coverage.ts +378 -11
  271. package/src/scripts/check_rule_projection_integrity.ts +22 -12
  272. package/src/scripts/check_static_parity.ts +17 -0
  273. package/src/scripts/check_test_delta.ts +294 -0
  274. package/src/scripts/check_test_weakening.ts +299 -0
  275. package/src/scripts/ci_settle.ts +145 -19
  276. package/src/scripts/closure_scan.ts +447 -0
  277. package/src/scripts/compile_hook_manifest.ts +102 -18
  278. package/src/scripts/council_record_shape.ts +209 -0
  279. package/src/scripts/external_sources_denylist.json +29 -4
  280. package/src/scripts/hook_manifest.json +1 -1
  281. package/src/scripts/hook_manifest.yaml +127 -11
  282. package/src/scripts/hooks/block_config_weakening.ts +229 -4
  283. package/src/scripts/hooks/block_kernel_rule_writes.ts +9 -78
  284. package/src/scripts/hooks/block_plumbing_writes.ts +314 -0
  285. package/src/scripts/hooks/bundle_integrity.ts +291 -0
  286. package/src/scripts/hooks/chain_nudge_hook.ts +1 -2
  287. package/src/scripts/hooks/code_graph_context_hook.ts +1 -2
  288. package/src/scripts/hooks/comment_discipline_hook.ts +1 -3
  289. package/src/scripts/hooks/concern_registry.ts +6 -0
  290. package/src/scripts/hooks/concern_timings.ts +94 -0
  291. package/src/scripts/hooks/delegation_nudge_hook.ts +1 -2
  292. package/src/scripts/hooks/design_pass_hook.ts +221 -5
  293. package/src/scripts/hooks/design_slop_hook.ts +1 -2
  294. package/src/scripts/hooks/dispatch_hook.ts +25 -19
  295. package/src/scripts/hooks/edit_shape_hook.ts +1 -2
  296. package/src/scripts/hooks/end_review_nudge_hook.ts +1 -1
  297. package/src/scripts/hooks/evidence_independence.ts +97 -2
  298. package/src/scripts/hooks/exit_codes.ts +128 -0
  299. package/src/scripts/hooks/host_lowering.json +1 -0
  300. package/src/scripts/hooks/host_lowering.ts +128 -3
  301. package/src/scripts/hooks/host_lowering.yaml +262 -46
  302. package/src/scripts/hooks/host_semantics.ts +30 -2
  303. package/src/scripts/hooks/injection_budget.ts +9 -2
  304. package/src/scripts/hooks/interruption_ledger_hook.ts +1 -2
  305. package/src/scripts/hooks/journal_record_hook.ts +1 -2
  306. package/src/scripts/hooks/memory_recall_hook.ts +539 -0
  307. package/src/scripts/hooks/obligation_settle_hook.ts +328 -0
  308. package/src/scripts/hooks/one_question_per_ask_hook.ts +25 -4
  309. package/src/scripts/hooks/orchestration_record_hook.ts +1 -2
  310. package/src/scripts/hooks/permission_gate.ts +1 -2
  311. package/src/scripts/hooks/push_settle_hook.ts +1 -3
  312. package/src/scripts/hooks/replay_hook.ts +2 -1
  313. package/src/scripts/hooks/reread_guard_hook.ts +1 -2
  314. package/src/scripts/hooks/review_baseline_hook.ts +1 -2
  315. package/src/scripts/hooks/rtk_wrap_hook.ts +1 -2
  316. package/src/scripts/hooks/rule_inject_hook.ts +55 -4
  317. package/src/scripts/hooks/run_continuation_hook.ts +30 -35
  318. package/src/scripts/hooks/skill_route_hook.ts +1 -2
  319. package/src/scripts/hooks/source_first_gate_hook.ts +1 -2
  320. package/src/scripts/hooks/spawn_guard_shadow_hook.ts +1 -2
  321. package/src/scripts/hooks/subagent_ledger_hook.ts +1 -2
  322. package/src/scripts/hooks/suggestion_capture_hook.ts +1 -1
  323. package/src/scripts/hooks/table_fingerprint.ts +49 -0
  324. package/src/scripts/hooks/telemetry_flush_hook.ts +1 -2
  325. package/src/scripts/hooks/telemetry_usage_hook.ts +1 -2
  326. package/src/scripts/hooks/tool_result_bytes_hook.ts +93 -9
  327. package/src/scripts/hooks/turn_end_gate_hook.ts +337 -324
  328. package/src/scripts/hooks/ui_route_nudge_hook.ts +1 -2
  329. package/src/scripts/hooks_doctor.ts +85 -0
  330. package/src/scripts/hooks_status.ts +19 -0
  331. package/src/scripts/install.ts +109 -210
  332. package/src/scripts/janitor.ts +7 -0
  333. package/src/scripts/lint_decision_classes.ts +464 -0
  334. package/src/scripts/lint_deny_text.ts +419 -0
  335. package/src/scripts/lint_exit_codes.ts +262 -0
  336. package/src/scripts/lint_hook_manifest.ts +66 -0
  337. package/src/scripts/lint_major_migration_sections.ts +450 -0
  338. package/src/scripts/lint_plan_risk_register.ts +47 -3
  339. package/src/scripts/lint_roadmap_blockers.ts +139 -12
  340. package/src/scripts/lint_roadmap_producers.ts +202 -0
  341. package/src/scripts/lint_skill_descriptions.ts +1 -1
  342. package/src/scripts/lint_skill_scripts_readonly.ts +1 -1
  343. package/src/scripts/mcp_server/prompts.ts +142 -1
  344. package/src/scripts/measure_rule_budget.ts +101 -5
  345. package/src/scripts/measure_skill_ranker_baseline.ts +305 -51
  346. package/src/scripts/measure_turn_end_gate.ts +193 -0
  347. package/src/scripts/memory_lookup.ts +1 -1
  348. package/src/scripts/new_roadmap.ts +37 -0
  349. package/src/scripts/orchestration_record.ts +0 -5
  350. package/src/scripts/prepack-check.mjs +53 -0
  351. package/src/scripts/release.ts +14 -98
  352. package/src/scripts/release_drill.ts +267 -1
  353. package/src/scripts/release_publication.ts +64 -1
  354. package/src/scripts/report_enforcement_drift.ts +566 -0
  355. package/src/scripts/report_host_injection_effect.ts +3 -11
  356. package/src/scripts/report_invocation_surface.ts +383 -0
  357. package/src/scripts/report_obligation_carriers.ts +699 -0
  358. package/src/scripts/report_obligation_writer_split.ts +236 -0
  359. package/src/scripts/report_skill_menu_census.ts +208 -0
  360. package/src/scripts/report_standing_payload_by_host.ts +26 -152
  361. package/src/scripts/roadmap_verify_share.ts +213 -0
  362. package/src/scripts/schemas/agent-settings.schema.json +23 -0
  363. package/src/scripts/schemas/command.schema.json +48 -0
  364. package/src/scripts/schemas/review-findings.schema.json +4 -0
  365. package/src/scripts/schemas/skill.schema.json +44 -0
  366. package/src/scripts/scope_growth.ts +219 -0
  367. package/src/scripts/self_review_gate.ts +359 -10
  368. package/src/scripts/semantic_parity_census.ts +314 -0
  369. package/src/scripts/session_eol_report.ts +54 -1
  370. package/src/scripts/sweep_dead_scan_roots.ts +1 -1
  371. package/src/scripts/trigger_eval_grandfather.json +0 -3
  372. package/src/scripts/trigger_eval_rotation.ts +122 -27
  373. package/src/scripts/ui_conformance_probe.ts +774 -0
  374. package/src/scripts/update_prices.ts +85 -3
  375. package/src/scripts/write_bundle_digest.mjs +74 -0
  376. package/src/server/schemas/settings.ts +62 -7
  377. package/src/shared/missionExecution.ts +126 -0
  378. package/src/templates/consumer-settings/ONBOARDING.md +1 -0
  379. package/dist/cli-delegate/chunk-523HCFYO.js +0 -90
  380. package/dist/ui/assets/index-D0jaCRPM.js +0 -29
  381. package/dist/ui/assets/index-jSfMW8_t.css +0 -1
  382. /package/dist/cli-delegate/{chunk-YUM5KURG.js → chunk-7RQP4UDH.js} +0 -0
@@ -252,3 +252,50 @@ block and the closing reply carries none. It sees one user turn on one host,
252
252
  so everything outside that is model-carried, exactly like Iron Law 2's own
253
253
  "no gate ships for this" note. `check_reply_consistency` reads a single draft
254
254
  and holds no cross-turn state; it cannot see this law at all.
255
+
256
+ ## The native ask — per host, and what it changes
257
+
258
+ > **Why this is here and not in the rule.** `user-interaction` is a
259
+ > project-scope rule, so its every byte is re-written into the preamble on
260
+ > **every subagent spawn**, and `check_preamble_payload_budget` is a measured
261
+ > ratchet with no headroom — a four-line addition to the rule measured +219
262
+ > tokens per spawn and failed it. The rule's own § Mechanics already routes
263
+ > "everything you look up rather than obey" here, and the ask SHAPE is lookup
264
+ > material: Iron Law 1 governs the recommendation identically on both shapes,
265
+ > so the rule needed no new obligation, only this contract to point at.
266
+
267
+ `ask: native | text` is declared per host in `src/scripts/hook_manifest.yaml`
268
+ and printed by `agent-config hooks:status`. It is **declared, not probed**: the
269
+ row records what the host's documented tool surface offers. A host declaring
270
+ `native` whose primitive turns out to be absent degrades to the text block —
271
+ the same question, the same content — so a wrong row costs a missed upgrade and
272
+ never a broken ask. Absent reads `text`.
273
+
274
+ | Shape | What the ask is | Where the recommendation lives |
275
+ |---|---|---|
276
+ | `native` | the host's structured-ask tool call | the **default option** of the native ask |
277
+ | `text` | the numbered block, per Iron Law 1 | the `Recommendation:` / `Empfehlung:` line directly under the block |
278
+
279
+ Four obligations hold on both shapes, and three of them are why the native
280
+ form is preferred rather than merely available:
281
+
282
+ 1. **One decision point per turn.** A native ask presenting several unrelated
283
+ questions is the same violation as several text blocks. One number — or one
284
+ selection — answers it, or it is two asks.
285
+ 2. **Every option says what changes by answering it.** Not the option's name
286
+ again: the consequence. A native ask makes this structural, because an
287
+ option carries a description field the text form leaves to discipline.
288
+ 3. **The recommendation has exactly ONE source.** On a native ask that source
289
+ is the default option; naming it a second time in the prose above is the
290
+ drift Iron Law 1 exists to make structurally impossible.
291
+ 4. **The answer is recorded before the next step runs.** Where the ask came out
292
+ of a plan-closure pass, it becomes a `## Decisions` row — id, ownership,
293
+ `resolved by: owner`, the decision, its evidence, its `revisit if`. An
294
+ answer that lives only in the transcript is re-derived after the next
295
+ context reset, which is the repeat the ask census counts as a defect.
296
+
297
+ **What the native shape does NOT change.** It is not a license to ask more: the
298
+ one-question-per-turn floor, the no-cheap-questions floor and the ownership
299
+ routing all run first, and a question that should not have been asked is not
300
+ improved by a better widget. Nor does it change who may be asked — a technical
301
+ decision does not reach the owner on any host.
@@ -62,12 +62,53 @@ choice.
62
62
  ## Safety floors are never lifted
63
63
 
64
64
  Auto-dispatch never bypasses a floor. The cross-model judge Iron Law
65
- (`subagent-orchestration`), `verify-before-complete`, the N=3 autonomous
66
- budget, `scope-control`, and `non-destructive-by-default` all apply to
67
- auto-delegated work exactly as they do to in-session work.
65
+ (`subagent-orchestration`), `verify-before-complete`, the fix-loop bound of
66
+ `autonomous-execution`, `scope-control`, and `non-destructive-by-default` all
67
+ apply to auto-delegated work exactly as they do to in-session work.
68
68
  `emergency.orchestration_halt: true` disables the layer for the duration of an
69
69
  incident; it never disables a floor.
70
70
 
71
+ ## Carriers — how the delegation obligation reaches a session
72
+
73
+ Migrated out of `delegation-policy` on 2026-09-13 under the P4 pattern: the rule
74
+ keeps the obligation, this page carries how it travels and what stays
75
+ model-carried. The rule was re-sending all of it on every session and every
76
+ spawn, and the standing-payload ceiling is measured per spawn.
77
+
78
+ No host runs the tier-2 rule router, so that rule's triggers alone never load it.
79
+ The obligation travels on three carriers instead:
80
+
81
+ 1. the always-loaded **AGENTS.md line** (delegate-by-default + end-review);
82
+ 2. the **`delegation-nudge`** concern on `user_prompt_submit` — runs
83
+ `classifyTask` on cheap prompt signals and injects a one-line verdict ONLY
84
+ when the classifier says `do-in-parallel` / `do-in-steps`, silence otherwise.
85
+ Delivery on `user_prompt_submit` is end-to-end verified;
86
+ 3. the **`end-review-nudge`** concern on `stop` — ONE `review_skipped` telemetry
87
+ line per mutating no-review session, verified. Its advisory line reaches the
88
+ dispatcher output, but host-side forwarding of stop-slot context to the model
89
+ is unverified, so the model-facing end-review carrier is the AGENTS.md line
90
+ plus this telemetry.
91
+
92
+ The capability gate itself resolves from the committed host registry merged with
93
+ a live environment probe in `src/scripts/_lib/host_capability.ts`
94
+ (`probeHostCapabilities`) — capability is a fact about the host, never a settings
95
+ override.
96
+
97
+ **Never read a `false` capability as a host limitation without checking where it
98
+ came from.** The registry holds one row, so on every other host all six fields are
99
+ the all-false safe default — which records that *nobody answered*, not that the
100
+ host cannot spawn. `agent-config routing:doctor [--platform <host>]` prints the
101
+ value **and** its provenance per field (`registry` = a committed observation this
102
+ repo made once · `live-probe` = established in this process · `default` = no
103
+ answer). Run it before concluding delegation is unavailable here; the same-shaped
104
+ wrong guess about the council is the incident
105
+ [`council-availability`](../../rules/council-availability.md) exists for.
106
+
107
+ What stays model-carried, honestly: the decomposition itself, the per-return
108
+ verification, and every dispatch on hosts without hook slots. The nudges are
109
+ advisory by design — whether they change behavior is measured by the telemetry,
110
+ not assumed.
111
+
71
112
  ## Related
72
113
 
73
114
  - [`subagent-configuration`](../subagent-configuration.md) — model / parallelism keys.
@@ -62,14 +62,10 @@ Ask.
62
62
 
63
63
  Committing is governed by the canonical
64
64
  [`commit-policy`](../../rules/commit-policy.md) rule, which applies
65
- regardless of `personal.autonomy`:
66
-
67
- - NEVER commit unless user said so this turn, a commit command was
68
- invoked, a standing instruction is active, or the roadmap
69
- authorizes it.
70
- - NEVER ask about committing. The user invokes a command or says so.
71
- - In autonomous mode, the **only** permitted commit-related question
72
- is the one-shot pre-scan ask at the start of roadmap execution.
65
+ regardless of `personal.autonomy`. Its Iron Law, its four exceptions
66
+ and the never-ask clause live there; the mechanics — the Hard-Floor
67
+ diff triggers and the one-shot roadmap pre-scan ask — live in
68
+ [`commit-mechanics`](../authority/commit-mechanics.md).
73
69
 
74
70
  Push, merge, rebase, branch creation, PR operations, and tags
75
71
  remain permission-gated by
@@ -141,12 +137,14 @@ When the user later issues a **new** request — different ticket, different roa
141
137
 
142
138
  In doubt whether the new request inherits or needs fresh confirmation → fresh confirmation. The Hard Floor and [`scope-control`](../../rules/scope-control.md) gates apply to every task regardless.
143
139
 
144
- ## Validation-loop budget — mechanics (N=3)
140
+ ## Validation-loop budget — mechanics
145
141
 
146
142
  Autonomous flows must not iterate indefinitely on the same validation target. **Validation target** = a single identifiable artefact: a file path, a lint rule ID, a test name, a CI sub-task name. Natural-language clustering ("the linter stuff") does **not** count as a target — agents will rename their way out of the budget.
147
143
 
148
144
  A "failed attempt" is an iteration that did not move the target from red to green. Tuning the tool around the target (e.g. growing an allowlist, loosening a threshold, suppressing a check) counts as an attempt — and is usually a sign the **tool**, not the content, is wrong.
149
145
 
146
+ Bands, bound outcomes, reading a red: [`fix-loop-ladder`](fix-loop-ladder.md).
147
+
150
148
  ### Allowlist-growth antipattern — detail
151
149
 
152
150
  Crossing the 20-entry threshold counts as the 3rd validation-target failure for the linter in question, regardless of prior attempt count. The fix is a tool-shape change (heuristic tightening, scope narrowing, deletion), not more entries. Same logic for: warning-suppression lists growing past ~20, `// noqa` / `# type: ignore` sweeps over many files in one session, test `skip` / `xfail` bulk-adds to chase green.
@@ -161,7 +159,7 @@ Concrete tool mapping — verify with the narrowest tool that proves the target
161
159
 
162
160
  Where the objective is **countable** — findings closed, tests passing,
163
161
  occurrences remaining — the primary stop signal is **no progress** or a **new
164
- minimum**, and the N=3 iteration cap is the **backstop**. A counter alone cannot
162
+ minimum**, and the fix-loop bound is the **backstop**. A counter alone cannot
165
163
  tell three attempts that each closed a finding from three that changed nothing.
166
164
 
167
165
  **Do not remove the cap.** A no-progress signal is only as good as the metric
@@ -175,13 +173,13 @@ firing is `exhausted`, a repeating failure signature with budget left is
175
173
  [`terminal-states`](terminal-states.md). Collapsing them invites the wrong
176
174
  remedy, because raising a budget helps the first and never the second.
177
175
 
178
- Where the objective is NOT countable, the cap is the only signal and the N=3
179
- budget above applies unchanged.
176
+ Where the objective is NOT countable, the cap is the only signal and the
177
+ fix-loop bound above applies unchanged.
180
178
 
181
179
  ## Adaptive effort & stop (RDP)
182
180
 
183
181
  Scale effort to task difficulty, and stop when marginal evidence drops — coupled
184
- to the N=3 budget above, never replacing it. On a host with a native effort knob
182
+ to the fix-loop bound above, never replacing it. On a host with a native effort knob
185
183
  (e.g. an `effort` parameter), the right move is to **set it high** for hard tasks
186
184
  rather than scaffold; the scaffold here is for a standard host **without** such a
187
185
  knob. The per-dimension uncertainty score (see
@@ -211,13 +209,11 @@ ladder on the same failing target**, not competing budgets:
211
209
  attempts, switch approach when the same signature repeats
212
210
  ([`context-hygiene`](../../rules/context-hygiene.md) "same failure
213
211
  signature twice → pivot").
214
- 2. **The 3rd consecutive failed attempt on the target trips N=3**
215
- (this file, above): 2 retries + the initial attempt ARE the three
216
- attempts N=3 counts. Terminal action: STOP, surface the attempts,
217
- ask the user.
218
- 3. **Repeated N=3 cycles on the same task** escalate to
219
- [`context-hygiene`](../../rules/context-hygiene.md)'s 3-Failure Rule:
220
- state dump + recommend a fresh session.
212
+ 2. **The 3rd consecutive failed attempt closes band 1** — terminal for the BAND,
213
+ not the run: band 2 begins, a strategy shift is mandatory.
214
+ 3. **Repeated EPOCHS** — not attempts — escalate to
215
+ [`context-hygiene`](../../rules/context-hygiene.md)'s 3-Failure Rule. Three
216
+ failed strategies is evidence about the TASK.
221
217
 
222
218
  No artifact may mint a fourth budget or a stricter one-strike cap for the
223
219
  same subject; per-tool loop caps (`token-efficiency` >2 same-tool calls)
@@ -227,8 +223,8 @@ are a different subject (tool-call repetition, not fix attempts).
227
223
  otherwise fuzzy; operationalize it so it is checkable, not vibes: when **two
228
224
  consecutive investigative probes** (a read, a grep, a query) yield **no new
229
225
  load-bearing information** — nothing that changes the plan or the hypothesis —
230
- stop gathering and act on what you have (or ask). This is the diminishing-returns
231
- twin of the N=3 hard cap: N=3 stops fruitless *fixing*, this stops fruitless
226
+ stop gathering and act on what you have (or ask). The fix-loop bound stops
227
+ fruitless *fixing*; this stops fruitless
232
228
  *searching*. It never overrides the read-loop abort in
233
229
  [`context-hygiene`](../../rules/context-hygiene.md) — that is the hard ceiling;
234
230
  this is the earlier soft signal.
@@ -240,6 +236,6 @@ plan, an open question the context already answers, or a promise of
240
236
  unexecuted work ("I'll…", "next I will…"), do that work now with tool
241
237
  calls instead of ending the turn — this is what "the turn isn't done
242
238
  until it's done" means in practice. This checkpoint operates inside the
243
- existing bounds: the N=3 validation-loop budget and the Hard Floor
239
+ existing bounds: the fix-loop validation budget and the Hard Floor
244
240
  still apply unchanged; the checkpoint closes out work already in scope,
245
241
  it never licenses continuing past either limit.
@@ -0,0 +1,93 @@
1
+ # Decision Closure — Execution Side
2
+
3
+ Loaded from [`roadmap-process-loop`](roadmap-process-loop.md) § 3-0 and
4
+ § 5a-residue. Planning closes what it can foresee; this is what the RUN does
5
+ with the record it was handed, and with the residue planning could not see.
6
+
7
+ ```
8
+ THE `## Decisions` TABLE IS READ BEFORE THE FIRST STEP, NOT WHEN A STEP TRIPS OVER IT.
9
+ A ROW IN IT IS A CLOSED DECISION. NEVER RE-DERIVE ONE. NEVER RE-ASK ONE.
10
+ A CLOSED DECISION REOPENS ONLY WHEN ITS `revisit if` CONDITION BECAME TRUE —
11
+ NEVER BECAUSE A CONTEXT RESET LOST IT, AND NEVER BECAUSE THE ANSWER LOOKS ODD.
12
+ ```
13
+
14
+ If the roadmap carries a `## Decisions` section, read it whole and cache it for
15
+ the run alongside the cadences (§ 4). Each row is `ID | ownership | resolved by
16
+ | decision | evidence | revisit if`, and the contract that governs it is
17
+ rule 27 of [the roadmap template](../../templates/roadmaps.md).
18
+
19
+ Three consequences during the run:
20
+
21
+ 1. **A step whose question is already a row executes on that row's answer.**
22
+ The decision was closed in planning; re-deriving it is the repeat the ask
23
+ census counts as a defect, and re-asking it is worse.
24
+ 2. **A `revisit if` condition that became true reopens exactly that row** —
25
+ resolve it again through the ownership ladder, append the new answer, and
26
+ say which condition fired. One reopen per row per run.
27
+ 3. **A decision NOT in the table is mid-run residue**, handled by § 5's residue
28
+ rule: technical residue resolves inline through the agent, an independent
29
+ session, the council or the team and is appended to `## Decisions` with the
30
+ step id; owner-owned residue is asked only when the step cannot progress,
31
+ and otherwise the step is parked while independent phases continue.
32
+
33
+ No `## Decisions` section is not an error: a plan that closed everything inline
34
+ carries none. It is a finding only when the plan ALSO carries an unresolved
35
+ marker, which `lint_decision_classes` reds at authoring time rather than here.
36
+
37
+
38
+
39
+ ```
40
+ A DECISION THE RUN MEETS MID-STEP IS ROUTED BY THE SAME TABLE THAT CLOSED THE
41
+ PLAN. TECHNICAL RESIDUE RESOLVES INLINE AND IS APPENDED TO `## Decisions` WITH
42
+ THE STEP ID. IT NEVER BECOMES A QUESTION, AND IT NEVER BECOMES A HALT.
43
+ OWNER-OWNED RESIDUE ASKS **ONLY IF THE STEP CANNOT PROGRESS**. OTHERWISE THE
44
+ STEP IS PARKED, INDEPENDENT PHASES CONTINUE, AND THE RUN COMES BACK TO IT.
45
+ MISSION-LEVEL `BLOCKED` ONLY PER THE TERMINAL-OUTCOMES LIST BELOW.
46
+ ```
47
+
48
+ Planning closed what it could foresee (§ 3-0). What is left is residue, and it
49
+ is routed identically:
50
+
51
+ | Residue | What happens |
52
+ |---|---|
53
+ | `deterministic`, `reversible-technical` | the agent decides and says why |
54
+ | `contested-technical` | an independent session, then the council, then the team |
55
+ | `critical-technical` | a provider-diverse council; the owner only where a typed op or an owner-reserved dimension is touched |
56
+ | `spend-exhaustion` | pause and report — never a question |
57
+ | `product-owned`, `business-owned`, `destructive-owned` | the step's progress decides: **blocked on it** → ask now, one question, record the answer · **not blocked** → park the step, continue elsewhere, return |
58
+
59
+ Every resolution is appended to `## Decisions` **with the step id in the
60
+ evidence column**, so a later reader can tell a decision planning closed from
61
+ one the run met. `./scripts-run src/scripts/lint_decision_classes` validates
62
+ the row.
63
+
64
+ **Parking is not deferring.** A parked step keeps its `[ ]`, keeps its place in
65
+ the count, and is returned to in the same run once the answer lands. It does
66
+ **not** take `[~]`, which is a deferral by decision and would let the run reach
67
+ `count_open == 0` on work nobody did.
68
+
69
+ **Scope discovered mid-step is the other table** — agent-owned growth is done
70
+ and recorded as a scope delta, council-owned growth routes through the ladder,
71
+ and a larger unrelated opportunity becomes a follow-up artifact rather than
72
+ expanding the mission. Both lists, closed:
73
+ [`scope-growth-ownership`](../authority/scope-growth-ownership.md), with
74
+ `./scripts-run src/scripts/scope_growth "<description>"` for a single item.
75
+
76
+
77
+ ## What `blocked-by:` may point at, after the retirement
78
+
79
+ The marker itself is unchanged — `run-continuation` reads blockedness from it
80
+ and from nothing else. What narrows is its contents.
81
+
82
+ A `## Blockers` entry is the record of a decision the agent **correctly did not
83
+ own**. An entry that declares `- **Ownership:**` must therefore name one of the
84
+ three owner-owned classes: `product-owned`, `business-owned`,
85
+ `destructive-owned`. A technical class there says a decision the ownership
86
+ ladder could have closed was filed instead, and `lint_roadmap_blockers` reds
87
+ it. The field is optional and the check is HARD rather than ratcheted, on the
88
+ no-backlog-to-grandfather ground: it is new, so it fires on nothing in the tree
89
+ today.
90
+
91
+ A technical judgement call therefore has no file-shaped home. It routes back
92
+ through the closure pass, resolves at the lowest rung that owns it, and lands
93
+ as a `## Decisions` row.
@@ -0,0 +1,108 @@
1
+ # The fix-loop ladder — bands, bound outcomes, and how to read a red
2
+
3
+ `road-to-adversarial-verification-and-long-runs` Phase 4. The obligation lives in
4
+ [`autonomous-execution`](../../rules/autonomous-execution.md) § Validation-loop
5
+ budget; this page carries the bands, what happens at the bound, and the probe
6
+ discipline each band starts from.
7
+
8
+ **Its own file rather than a section of
9
+ [`autonomy-mechanics`](autonomy-mechanics.md), and the reason is measured.** That
10
+ page sat at 16,040 chars against a 16,000-char depth ceiling — marginally under by
11
+ the gate's own measure — so adding ~5,600 chars of ladder to it crossed the
12
+ ceiling and added a violation to a shrink-only ratchet. Splitting a distinct
13
+ subject out is the repair the ratchet is asking for; raising the baseline would
14
+ have been the defect it names.
15
+
16
+ ## The three bands, and what makes a band a band
17
+
18
+ The bound was a hard cap of 3 whose remedy was *STOP. SURFACE. ASK USER FOR
19
+ GUIDANCE.* It is now `execution.fix_loop_max` — default 10 — divided into three
20
+ bands, and the division is the substance: a larger number alone would only buy
21
+ more of the same attempt.
22
+
23
+ | Attempts | What is required | What is NOT an attempt |
24
+ |---|---|---|
25
+ | 1-3 | root-cause, then a targeted fix | — |
26
+ | 4-6 | a **mandatory strategy shift**: re-examine the assumptions, read the history, build a minimal reproduction, find the last known good state, check upstream docs and issues, or try an alternative implementation | repeating the previous approach with a smaller edit. That is the same attempt again, and it does not advance the band |
27
+ | 7-10 | **independent escalation**: a second session, a provider-diverse reviewer, the council, the team with repository access, or a rollback of the slice | anything the same session can decide alone |
28
+
29
+ ## At the bound — five outcomes, in order, and none of them is a count
30
+
31
+ ```
32
+ A COUNT IS NOT A REASON TO ASK. THE BOUND ENDS A STRATEGY, NEVER THE RUN.
33
+ ```
34
+
35
+ 1. **The escalation yielded a new strategy** → open a **new epoch**: the attempt
36
+ counter resets against the new strategy, because the thing the budget was
37
+ bounding is gone.
38
+ 2. **An independent phase can proceed** → continue it. A blocked target is not a
39
+ blocked run, and the run's other work does not wait on this one.
40
+ 3. **The residue is owner-owned** per the ownership table → **one** native ask,
41
+ naming the residue. This rung is reached by the OWNERSHIP test, never by the
42
+ count that got here.
43
+ 4. **An external prerequisite is objectively missing** — an absent credential, an
44
+ unreachable service, a decision only the forge can carry → `BLOCKED`, with the
45
+ evidence that establishes the absence.
46
+ 5. **Otherwise** → a new epoch. Running out of ideas is not one of the four above,
47
+ and converting it into an owner ask is the failure this ladder replaces.
48
+
49
+ Council and team verdicts reached during band 3 append to the run's
50
+ `## Decisions` — so the next epoch starts from a record rather than from the
51
+ previous epoch's memory of it.
52
+
53
+ **The allowlist-growth counter is a separate mechanism** with its own threshold
54
+ and its own remedy (fix the tool's shape). It is not a band of this ladder, and
55
+ crossing it does not advance the attempt count — it spends the whole bound for
56
+ that target at once, which is a different statement.
57
+
58
+ ## Read the red before diagnosing it, with the narrowest probe
59
+
60
+ An attempt that begins from a guess about the failure is not a band-1 attempt; it
61
+ is the first of three that will be spent learning what band 1 was supposed to
62
+ start from. So, before the fix:
63
+
64
+ - **A CI red** is read with `gh run view --job <id> --log-failed`, filtered
65
+ (`| grep -E '×|FAIL|Error'`) — never the whole log into context, and **never**
66
+ `gh pr checks --watch`'s exit code, which is 0 on a failure and 1 when no
67
+ checks exist at all. Two different wrong answers from one number.
68
+ - **The CI waiter is `ci_settle`**, and it is ONE waiter for the condition: its
69
+ LAST OUTPUT LINE is the verdict, and a run that reaches no verdict can still
70
+ exit 0. A hand-written poll loop beside it is the fleet
71
+ [`context-hygiene`](../../rules/context-hygiene.md) § Waiting is one
72
+ waiter forbids.
73
+ - **A local red** is read with the runner filtered to the failing name — not the
74
+ suite, and not a meta-pipeline. Match the probe to the surface: `curl` or a
75
+ Playwright spec for an HTTP or UI red, the debugger for a runtime frame, the
76
+ test runner with a filter for a behavior.
77
+ - **Reproduce before believing the diagnosis.** An environment-dependent red
78
+ reproduces under its condition, not on the machine's defaults.
79
+
80
+ ## The allowlist guard's host reach, and the two corrections it has taken
81
+
82
+ Migrated out of `autonomous-execution` on 2026-09-13 (P4): the rule keeps the
83
+ obligation, this page carries the host claim and its history. The rule was
84
+ re-sending all of it on every session and every spawn.
85
+
86
+ `block_config_weakening.ts` counts allowlist entries added per session, warns from
87
+ 5, and blocks past 20 — **on `claude` alone**, the one host that both binds
88
+ `pre_tool_use` and honours a deny. It is *bound* on augment and cowork as well and
89
+ ignored there: `host_semantics.ts` verifies claude alone, and both trampolines
90
+ discard dispatcher output and `exit 0` unconditionally. Everywhere else the cap is
91
+ model-carried and "enforced at tool-call time" is not a claim that can be made.
92
+
93
+ **Corrected 2026-08-17, in both directions.** The sentence used to certify
94
+ augment, claude and cowork as the enforcing set — an over-claim of two hosts — and
95
+ to explain the rest with "the guard has nowhere to bind", which is false for
96
+ cursor, cline and gemini, whose native pre-tool events `native_event_aliases`
97
+ already maps onto `pre_tool_use`: there it is **unbound, not unbindable**. Only
98
+ windsurf and copilot carry no alias row. The four states are tabulated once in
99
+ [`hook-architecture-v1 § Which hosts carry pre_tool_use`](../../docs/contracts/hook-architecture-v1.md).
100
+
101
+ The sibling rules `git-history-discipline` and `evaluator-independence` qualify
102
+ the identical slot, so an unqualified claim in any of them would read as a
103
+ guarantee the manifest does not give.
104
+
105
+ ## Related
106
+
107
+ - [`autonomy-mechanics`](autonomy-mechanics.md) — the rest of the autonomy body: opt-in detection, task scope, probe efficiency, the retry-budget ladder.
108
+ - [`terminal-states`](terminal-states.md) — `exhausted` vs `stagnated`, the two words the bound and a repeating signature report.
@@ -12,7 +12,9 @@ this context carries the agent-side procedure.
12
12
 
13
13
  ## Activation
14
14
 
15
- Read `planning.challenge_on_create` from `.agent-settings.yml` once per task
15
+ Read `planning.closure_pass` from `.agent-settings.yml` once per task
16
+ (`planning.challenge_on_create` is the deprecated alias, accepted for one
17
+ minor)
16
18
  and cache it. `true` or **missing key** → the gate is active. `false` → the
17
19
  gate is inert: proceed with the surface's normal flow, no marker line, no
18
20
  interview.
@@ -61,7 +63,7 @@ All four hold → emit **exactly one** marker line, then proceed with the
61
63
  surface's normal flow:
62
64
 
63
65
  ```
64
- > Confidence ≥ 95% — creating directly (planning.challenge_on_create)
66
+ > Confidence ≥ 95% — creating directly (planning.closure_pass)
65
67
  ```
66
68
 
67
69
  No second marker, no summary of the assessment — one line, then the work.
@@ -8,7 +8,30 @@ resolution, commit-step pre-scan, halt conditions, and archival check.
8
8
  The three command files are thin wrappers that bind only the **scope
9
9
  delta**.
10
10
 
11
- **Size budget:** ≤ 57,000 chars — restated from the original 4,000.
11
+ **Size budget:** ≤ 62,000 chars — restated from 57,000, which the file had
12
+ already outgrown before this edit.
13
+
14
+ **Restated 2026-09-13, with the reason, because the contract below demands
15
+ one.** The line read 57,000 and the file measured **57,906** on `origin/main`:
16
+ the budget was already false, so the first honest act is to say so rather than
17
+ to inherit it. What this change then added is halt-list CONTENT — the
18
+ `BLOCKED` list aligned row-for-row with ADR-268 § 7, which gained a missing
19
+ owner-owned-decision row, contradictory requirements, technical impossibility
20
+ under the stated constraints and an authority crossing, and moved a failed
21
+ first approach and dependency trouble to the not-blocked side. That list is
22
+ read at the moment a run decides whether it may stop; behind a pointer it
23
+ would be read later or not at all, which is the one place in this file where
24
+ depth is the point.
25
+
26
+ Everything about the change that is EXPLANATORY rather than decisive was moved
27
+ out instead, to [`decision-closure-execution`](decision-closure-execution.md):
28
+ the `## Decisions` row shape and reopen rule, the per-class mid-run residue
29
+ table, and what `blocked-by:` may point at after the retirement. The file grew
30
+ by 2.4k where a naive edit would have grown it by 7.6k.
31
+
32
+ **Still a ratchet, and still enforced by nothing.** The next edit inherits
33
+ 62,000, not a license to keep restating. Splitting the halt list out is the
34
+ real repair and it is a change of its own.
12
35
 
13
36
  The old figure described nothing: the file measured 47,115 bytes against it, a
14
37
  factor of 11.8, so it was a dead budget rather than a typo. Restated at the
@@ -143,6 +166,20 @@ does not fire.
143
166
 
144
167
  ## 3. Pre-scan — execution contract or commit-step ask
145
168
 
169
+ ### 3-0. Read `## Decisions` — before any step, once per run
170
+
171
+ ```
172
+ THE `## Decisions` TABLE IS READ BEFORE THE FIRST STEP, NOT WHEN A STEP TRIPS OVER IT.
173
+ A ROW IN IT IS A CLOSED DECISION. NEVER RE-DERIVE ONE. NEVER RE-ASK ONE.
174
+ A CLOSED DECISION REOPENS ONLY WHEN ITS `revisit if` CONDITION BECAME TRUE —
175
+ NEVER BECAUSE A CONTEXT RESET LOST IT, AND NEVER BECAUSE THE ANSWER LOOKS ODD.
176
+ ```
177
+
178
+ Read it whole and cache it for the run alongside the cadences (§ 4). No section
179
+ is not an error — a plan that closed everything inline carries none. Row shape,
180
+ the three consequences during a run, and the reopen rule:
181
+ [`decision-closure-execution`](decision-closure-execution.md).
182
+
146
183
  ### 3a. Mode derivation ladder — first source wins
147
184
 
148
185
  ```
@@ -651,6 +688,19 @@ For each open step in the working set (scope-bound — see wrapper):
651
688
  A loop iteration that lands work without flipping its box is a
652
689
  rule violation. Do not save flips for the archive commit.
653
690
 
691
+ ### 5a-residue. Mid-run residue — the same ownership table, inline
692
+
693
+ ```
694
+ A DECISION THE RUN MEETS MID-STEP IS ROUTED BY THE SAME TABLE THAT CLOSED THE
695
+ PLAN. TECHNICAL RESIDUE RESOLVES INLINE AND IS APPENDED TO `## Decisions` WITH
696
+ THE STEP ID. IT NEVER BECOMES A QUESTION, AND IT NEVER BECOMES A HALT.
697
+ OWNER-OWNED RESIDUE ASKS **ONLY IF THE STEP CANNOT PROGRESS**. OTHERWISE THE
698
+ STEP IS PARKED, INDEPENDENT PHASES CONTINUE, AND THE RUN COMES BACK TO IT.
699
+ ```
700
+
701
+ Per-class routing, why parking is not deferring, and the scope-growth pointer:
702
+ [`decision-closure-execution`](decision-closure-execution.md).
703
+
654
704
  ### 5b. Flip-guard — deterministic
655
705
 
656
706
  Before advancing to step 6, run:
@@ -884,16 +934,35 @@ BEFORE REPORTING IT, ASK PER REMAINING STEP: CAN I DO THIS AT ALL?
884
934
  ONE STEP THE AGENT COULD HAVE EXECUTED REJECTS THE CLAIM.
885
935
  ```
886
936
 
887
- **Externally impossible — the whole list.** A required credential that does not
888
- exist and the agent cannot create · a purchase beyond the delegated budget ·
889
- physical hardware access · another person or organisation must act · a wait that
890
- is factually mandatory and cannot be simulated or verified.
937
+ **Externally impossible — the whole list**, aligned with ADR-268 § 7. A missing
938
+ **owner-owned** decision — `product-owned`, `business-owned` or
939
+ `destructive-owned`, and nothing else · a missing permission, secret or access ·
940
+ a required credential that does not exist and the agent cannot create · a
941
+ purchase beyond the delegated budget · physical hardware access · another person
942
+ or organisation must act · a wait that is factually mandatory and cannot be
943
+ simulated or verified · contradictory requirements · technical impossibility
944
+ under the stated constraints · a needed crossing of a real authority boundary.
891
945
 
892
946
  **Not externally impossible — every one of these is work.** An unprotected
893
947
  branch · a branch to create · a push · a PR to open · a repository or branch
894
948
  setting the agent can change · a workflow to start · CI to re-run · a merge base
895
949
  to update · conflicts · failing tests · local configuration · a paid call under
896
- the ceiling · "this could be risky" · "a maintainer should do this".
950
+ the ceiling · a failed first approach · dependency trouble · "this could be
951
+ risky" · "a maintainer should do this".
952
+
953
+ ```
954
+ A SOLVABLE ARCHITECTURAL AMBIGUITY IS NOT `BLOCKED`. IT IS A DECISION.
955
+ A TECHNICAL JUDGEMENT CALL IS NEVER PARKED IN A FILE — IT ROUTES BACK THROUGH
956
+ CLOSURE AND IS RESOLVED AT THE LOWEST RUNG THAT OWNS IT: EVIDENCE, CONVENTION,
957
+ THE AGENT, AN INDEPENDENT SESSION, THE COUNCIL, THE TEAM.
958
+ A COUNT IS NEVER A QUESTION — A BOUNDED LOOP'S BOUND TRIGGERS A STRATEGY CHANGE
959
+ AND THE ESCALATION LADDER, NEVER AN OWNER QUESTION (ADR-268 § 7).
960
+ ```
961
+
962
+ `blocked-by:` stays — it is how `run-continuation` reads blockedness — but a
963
+ blocker entry is the record of a decision the agent **correctly did not own**;
964
+ what it may point at narrows accordingly
965
+ ([`decision-closure-execution`](decision-closure-execution.md)).
897
966
 
898
967
  The `[~]` prohibition is load-bearing and was the one point the council split on.
899
968
  Deferring a blocked step to `[~]` would let the run reach `count_open == 0` and
@@ -93,6 +93,63 @@ Update stale idioms to the version the project **actually runs** — but only wh
93
93
  - Subordinate to `no-cheap-questions` (self-check items 3 & 14 — real trade-off, not a disguised continuation/commit ask), `autonomous-execution` (the end-of-session batch must not read as "shall I continue?"), `user-interaction`, `ask-when-uncertain` (one batched prompt = one question).
94
94
  - Threshold to surface at all: a **real, nameable** improvement with a concrete benefit. Cosmetic nitpicks with no trade-off → drop silently. The live-security carve-out is the only case that interrupts or overrides autonomy.
95
95
 
96
+ ## The other axis — who owns the growth
97
+
98
+ The ladder above sizes a change: *is this small and aligned enough to do now.*
99
+ It does not say **whose decision it is**, and both must clear before work
100
+ happens inline — something small and council-owned is still not the agent's to
101
+ decide, and something agent-owned and large is still bounded by
102
+ `minimal-safe-diff`.
103
+
104
+ Three closed lists answer the ownership half: six agent-owned kinds (done
105
+ inline, recorded as a scope delta in the PR body, never asked about), four
106
+ council-owned (routed through the ownership ladder, reaching the owner in none
107
+ of them), and two owner-owned. Anything matching none of them is not scope
108
+ growth at all — it is a follow-up artifact, and the mission does not expand to
109
+ hold it.
110
+
111
+ Full enumeration: [`scope-growth-ownership`](../../contexts/authority/scope-growth-ownership.md).
112
+ One item classifies deterministically with
113
+ `./scripts-run src/scripts/scope_growth "<description>"`; `unknown` is a real
114
+ verdict there, never a fallback to the cheapest rung.
115
+
116
+ ## Inside a mission — the middle rung becomes an artifact
117
+
118
+ `road-to-adversarial-verification-and-long-runs` 6.1. The ladder's middle rung is
119
+ **note + ask**, and inside an autonomous mission there is nobody to ask. Left
120
+ unreplaced the rung collapses in one of two bad directions, and both are failures
121
+ this suite already names: every spotted issue becomes a fix (the scope creep
122
+ [`minimal-safe-diff`](minimal-safe-diff-mechanics.md) exists to stop), or every
123
+ one becomes silence (the look-away `active-remediation` exists to stop).
124
+
125
+ So under a mission the middle rung is **emit a follow-up artifact and leave the
126
+ code alone**.
127
+
128
+ **What may ride along at all** — nine kinds, and the list is closed:
129
+ characterization tests · regression tests · a small adjacent bug · naming · types
130
+ · robustness · local dead code · simplifying code the mission already touched ·
131
+ testability.
132
+
133
+ **Six criteria, ALL of which must hold** for one of those to ride along: local to
134
+ the path the mission is already touching · small · low blast radius · clearly
135
+ correct · testable in the same commit · carries no new product decision.
136
+
137
+ ```
138
+ THE SIX ARE AND-ED, NEVER SCORED.
139
+ A SCORED VERSION LETS A LARGE CHANGE BUY ITS WAY IN WITH FIVE CHEAP YESES,
140
+ WHICH IS HOW A BOY-SCOUT RULE BECOMES A REFACTOR LICENCE.
141
+ ```
142
+
143
+ The **characterisation is the agent's judgement; the DECISION is mechanical** —
144
+ `_lib/rides_along.ts` takes the six booleans and returns the rung, so the same
145
+ inputs always land the same way and a later reader can check the call rather than
146
+ re-litigate the taste.
147
+
148
+ **A deferral states every reason it was deferred**, not the first one it hit. The
149
+ artifact exists because the issue is still owed, and "it failed one of six" is not
150
+ something a later triage can act on. A deferral with no reason is the
151
+ note-and-forget this rule already forbids, wearing an artifact's clothes.
152
+
96
153
  ## See also
97
154
 
98
155
  - [`active-remediation`](../../rules/active-remediation.md) — the rule this file details (Iron Law + ladder + live-security carve-out).