@event4u/agent-config 14.6.0 → 14.8.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 (258) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +255 -145
  3. package/README.md +1 -1
  4. package/dist/agent-src/commands/analyze/inbox.md +264 -10
  5. package/dist/agent-src/commands/analyze.md +1 -1
  6. package/dist/agent-src/commands/evals/git-pr-merge.json +13 -0
  7. package/dist/agent-src/commands/evals/roadmap.json +17 -1
  8. package/dist/agent-src/commands/pr/create.md +14 -2
  9. package/dist/agent-src/commands/pr/merge.md +379 -0
  10. package/dist/agent-src/commands/roadmap/process-full.md +272 -32
  11. package/dist/agent-src/commands/roadmap.md +1 -1
  12. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +46 -36
  13. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +37 -2
  14. package/dist/agent-src/contexts/execution/roadmap-execution-contract.md +95 -2
  15. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +289 -106
  16. package/dist/agent-src/rules/artifact-drafting-protocol.md +5 -1
  17. package/dist/agent-src/rules/context-hygiene.md +2 -0
  18. package/dist/agent-src/rules/decision-revisit-gate.md +67 -32
  19. package/dist/agent-src/rules/fix-what-you-see.md +108 -0
  20. package/dist/agent-src/rules/no-roadmap-references.md +0 -5
  21. package/dist/agent-src/rules/recurring-criticism.md +110 -0
  22. package/dist/agent-src/rules/roadmap-progress-sync.md +20 -1
  23. package/dist/agent-src/rules/rule-type-governance.md +0 -2
  24. package/dist/agent-src/rules/self-repair-loop.md +17 -0
  25. package/dist/agent-src/rules/skill-quality.md +0 -2
  26. package/dist/agent-src/rules/source-confidentiality.md +37 -7
  27. package/dist/agent-src/scripts/archival_sweep.ts +117 -0
  28. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +26 -7
  29. package/dist/agent-src/scripts/dashboard_mode.ts +212 -0
  30. package/dist/agent-src/scripts/gate_budget.ts +282 -0
  31. package/dist/agent-src/scripts/gate_execute.ts +72 -31
  32. package/dist/agent-src/scripts/roadmap_gates.ts +74 -3
  33. package/dist/agent-src/scripts/update_roadmap_progress.ts +296 -53
  34. package/dist/agent-src/skills/adr-create/SKILL.md +124 -5
  35. package/dist/agent-src/skills/ai-council/SKILL.md +48 -807
  36. package/dist/agent-src/skills/ai-council/references/advanced-modes.md +320 -0
  37. package/dist/agent-src/skills/ai-council/references/cost-and-redaction.md +99 -0
  38. package/dist/agent-src/skills/ai-council/references/execution-modes.md +162 -0
  39. package/dist/agent-src/skills/ai-council/references/output-and-synthesis.md +125 -0
  40. package/dist/agent-src/skills/ai-council/references/procedure.md +143 -0
  41. package/dist/agent-src/skills/decision-record/SKILL.md +61 -3
  42. package/dist/agent-src/skills/decision-review/SKILL.md +65 -0
  43. package/dist/agent-src/skills/merge-conflicts/SKILL.md +26 -0
  44. package/dist/agent-src/skills/quality-tools/SKILL.md +34 -326
  45. package/dist/agent-src/skills/quality-tools/references/js-ts-tools.md +113 -0
  46. package/dist/agent-src/skills/quality-tools/references/php-tools.md +222 -0
  47. package/dist/agent-src/skills/roadmap-management/SKILL.md +15 -409
  48. package/dist/agent-src/skills/roadmap-management/references/archival.md +226 -0
  49. package/dist/agent-src/skills/roadmap-management/references/authoring.md +107 -0
  50. package/dist/agent-src/skills/roadmap-management/references/dashboard.md +47 -0
  51. package/dist/agent-src/skills/roadmap-management/references/lifecycle.md +58 -0
  52. package/dist/agent-src/skills/security/SKILL.md +8 -0
  53. package/dist/agent-src/skills/security-audit/SKILL.md +12 -1
  54. package/dist/agent-src/skills/skill-writing/SKILL.md +34 -570
  55. package/dist/agent-src/skills/skill-writing/references/procedure.md +275 -0
  56. package/dist/agent-src/skills/skill-writing/references/read-only-scripts.md +18 -0
  57. package/dist/agent-src/skills/skill-writing/references/section-patterns.md +298 -0
  58. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  59. package/dist/agent-src/templates/roadmaps.md +65 -4
  60. package/dist/agent-src/templates/scripts/telemetry/flush_sender.mjs +163 -0
  61. package/dist/agent-src/templates/scripts/telemetry/remote.ts +160 -7
  62. package/dist/agent-src/templates/scripts/telemetry/transport.ts +169 -0
  63. package/dist/cli/registry.js +2 -1
  64. package/dist/cli/registry.js.map +1 -1
  65. package/dist/cli-delegate/chunk-2GNWGMAL.js +172 -0
  66. package/dist/cli-delegate/{chunk-P6LQDIWK.js → chunk-7PRE6ZV2.js} +338 -0
  67. package/dist/cli-delegate/{chunk-BKO2AZ7Z.js → chunk-B2ERU2VA.js} +1 -1
  68. package/dist/cli-delegate/chunk-E4XIZDIB.js +402 -0
  69. package/dist/cli-delegate/{chunk-3UCJWMMP.js → chunk-EEJUMCDZ.js} +16 -16
  70. package/dist/cli-delegate/{chunk-NXFWFAYV.js → chunk-G23AT6GD.js} +1 -0
  71. package/dist/cli-delegate/{chunk-XURJ4AQC.js → chunk-H4VIVD4C.js} +385 -284
  72. package/dist/cli-delegate/chunk-I3EIN2YG.js +36 -0
  73. package/dist/cli-delegate/{chunk-RLN73PR5.js → chunk-LPPWO5CE.js} +12 -8
  74. package/dist/cli-delegate/chunk-MWRD5YOH.js +100 -0
  75. package/dist/cli-delegate/{chunk-UEZ7D35A.js → chunk-N7CDDGI3.js} +4 -23
  76. package/dist/cli-delegate/{chunk-63WSP6YZ.js → chunk-PMEKGDED.js} +74 -167
  77. package/dist/cli-delegate/{chunk-GRRPEPRN.js → chunk-T7L2QK3K.js} +24 -5
  78. package/dist/cli-delegate/{chunk-EVTY7ISR.js → chunk-YM4GZDJG.js} +9 -1
  79. package/dist/cli-delegate/cmd_adr_effective.js +1162 -0
  80. package/dist/cli-delegate/cmd_conformance.js +466 -716
  81. package/dist/cli-delegate/cmd_converge.js +3 -3
  82. package/dist/cli-delegate/cmd_doctor.js +10 -10
  83. package/dist/cli-delegate/cmd_explain.js +1 -1
  84. package/dist/cli-delegate/cmd_export.js +10 -9
  85. package/dist/cli-delegate/cmd_handoff.js +10 -9
  86. package/dist/cli-delegate/cmd_memory_get.js +2 -1
  87. package/dist/cli-delegate/cmd_migrate.js +2 -2
  88. package/dist/cli-delegate/cmd_packs_active.js +1 -1
  89. package/dist/cli-delegate/cmd_preflight.js +5 -5
  90. package/dist/cli-delegate/cmd_prune.js +11 -10
  91. package/dist/cli-delegate/cmd_route_audit.js +6 -5
  92. package/dist/cli-delegate/cmd_route_explain.js +3 -3
  93. package/dist/cli-delegate/cmd_session_recycle.js +840 -30
  94. package/dist/cli-delegate/cmd_settings_get.js +3 -3
  95. package/dist/cli-delegate/cmd_settings_migrate.js +10 -9
  96. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  97. package/dist/cli-delegate/cmd_sync.js +11 -10
  98. package/dist/cli-delegate/cmd_uninstall.js +13 -11
  99. package/dist/cli-delegate/cmd_update.js +4 -4
  100. package/dist/cli-delegate/cmd_upgrade.js +4 -4
  101. package/dist/cli-delegate/cmd_validate.js +11 -10
  102. package/dist/cli-delegate/cmd_versions.js +3 -3
  103. package/dist/discovery/deprecation-report.md +1 -1
  104. package/dist/discovery/discovery-manifest.json +111 -37
  105. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  106. package/dist/discovery/discovery-manifest.summary.md +5 -5
  107. package/dist/discovery/dormancy-report.md +1 -1
  108. package/dist/discovery/orphan-report.md +1 -1
  109. package/dist/discovery/packs.json +15 -12
  110. package/dist/discovery/trust-report.md +3 -3
  111. package/dist/discovery/workspaces.json +11 -8
  112. package/dist/hooks/dispatch.js +3165 -2192
  113. package/dist/install/claudePathsPlan.js +187 -0
  114. package/dist/install/claudePathsPlan.js.map +1 -0
  115. package/dist/install/globalRuleLayers.js +169 -0
  116. package/dist/install/globalRuleLayers.js.map +1 -0
  117. package/dist/install/hostLayerFingerprint.js +136 -0
  118. package/dist/install/hostLayerFingerprint.js.map +1 -0
  119. package/dist/install/install.mjs +553 -425
  120. package/dist/install/partitionEligibility.js +432 -0
  121. package/dist/install/partitionEligibility.js.map +1 -0
  122. package/dist/install/ruleLayerPartition.js +157 -0
  123. package/dist/install/ruleLayerPartition.js.map +1 -0
  124. package/dist/mcp/registry-manifest.json +3 -3
  125. package/dist/mcp/server.json +2 -2
  126. package/dist/mcp/server.mjs +1863 -1234
  127. package/dist/router.json +1 -1
  128. package/dist/scripts/_lib/agent_src.js +41 -0
  129. package/dist/scripts/_lib/agent_src.js.map +1 -1
  130. package/dist/scripts/_lib/install_layout.js +83 -0
  131. package/dist/scripts/_lib/install_layout.js.map +1 -0
  132. package/dist/scripts/_lib/installed_lock.js +444 -0
  133. package/dist/scripts/_lib/installed_lock.js.map +1 -0
  134. package/dist/scripts/_lib/prune_empty_dirs.js +85 -0
  135. package/dist/scripts/_lib/prune_empty_dirs.js.map +1 -0
  136. package/dist/scripts/condense.js +63 -251
  137. package/dist/scripts/condense.js.map +1 -1
  138. package/dist/server/schemas/settings.js +4 -0
  139. package/dist/server/schemas/settings.js.map +1 -1
  140. package/docs/contracts/settings-classes.md +12 -6
  141. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +8 -3
  142. package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +45 -1
  143. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +26 -0
  144. package/docs/guidelines/agent-infra/false-green.md +47 -1
  145. package/docs/guidelines/agent-infra/memory-access.md +17 -0
  146. package/docs/guidelines/agent-infra/recurring-criticism-mechanics.md +96 -0
  147. package/package.json +1 -1
  148. package/src/agent-src/scripts/archival_sweep.ts +117 -0
  149. package/src/agent-src/scripts/archive_completed_roadmaps.ts +26 -7
  150. package/src/agent-src/scripts/dashboard_mode.ts +212 -0
  151. package/src/agent-src/scripts/gate_budget.ts +282 -0
  152. package/src/agent-src/scripts/gate_execute.ts +72 -31
  153. package/src/agent-src/scripts/roadmap_gates.ts +74 -3
  154. package/src/agent-src/scripts/update_roadmap_progress.ts +296 -53
  155. package/src/agent-src/templates/scripts/telemetry/flush_sender.mjs +163 -0
  156. package/src/agent-src/templates/scripts/telemetry/remote.ts +160 -7
  157. package/src/agent-src/templates/scripts/telemetry/transport.ts +169 -0
  158. package/src/config/agent-settings.template.yml +27 -2
  159. package/src/config/ci-local-parity.yml +39 -0
  160. package/src/config/estate-count-budget.json +612 -3
  161. package/src/config/evaluator-budgets.json +3 -3
  162. package/src/config/gate-coverage.yml +220 -12
  163. package/src/config/gate-violation-baselines.json +73 -63
  164. package/src/config/gitignore-block.txt +15 -2
  165. package/src/config/hook-latency-budget.json +5 -0
  166. package/src/config/rule-activation-census.json +14 -6
  167. package/src/config/rule-stub-ceilings.json +34 -7
  168. package/src/install/claudePathsPlan.ts +196 -0
  169. package/src/install/globalRuleLayers.ts +197 -0
  170. package/src/install/hostLayerFingerprint.ts +145 -0
  171. package/src/install/partitionEligibility.ts +502 -0
  172. package/src/install/ruleLayerPartition.ts +212 -0
  173. package/src/scripts/_cli/cmd_adr_effective.ts +484 -0
  174. package/src/scripts/_cli/cmd_session_recycle.ts +9 -1
  175. package/src/scripts/_dispatch.bash +17 -1
  176. package/src/scripts/_lib/ac_heading.ts +30 -0
  177. package/src/scripts/_lib/adr_frontmatter.test.ts +365 -0
  178. package/src/scripts/_lib/adr_frontmatter.ts +459 -0
  179. package/src/scripts/_lib/agent_src.ts +42 -0
  180. package/src/scripts/_lib/bench_ab_pinned_repo.ts +162 -0
  181. package/src/scripts/_lib/bench_ab_workspace.ts +10 -1
  182. package/src/scripts/_lib/envelope_grounding.ts +49 -9
  183. package/src/scripts/_lib/installed_lock.ts +50 -5
  184. package/src/scripts/_lib/layer_overlap_notice.ts +11 -2
  185. package/src/scripts/_lib/md_section.ts +129 -0
  186. package/src/scripts/_lib/prune_empty_dirs.ts +80 -0
  187. package/src/scripts/_lib/scope_guard.sh +26 -3
  188. package/src/scripts/_lib/self_repair.ts +19 -0
  189. package/src/scripts/_lib/self_repair_class_b.ts +171 -0
  190. package/src/scripts/adr/evidence_census.ts +899 -0
  191. package/src/scripts/adr/regenerate_index.ts +12 -32
  192. package/src/scripts/adr_cite_check.ts +540 -39
  193. package/src/scripts/ai_council/cli_help.ts +55 -0
  194. package/src/scripts/audit_adr_coverage.ts +103 -17
  195. package/src/scripts/before_complete_hook.ts +153 -28
  196. package/src/scripts/bench_ab_v2_complexity.ts +27 -7
  197. package/src/scripts/bench_hook_latency.ts +204 -0
  198. package/src/scripts/build_archive_index.ts +34 -0
  199. package/src/scripts/check_adr_frontmatter.ts +574 -39
  200. package/src/scripts/check_hook_bundle_content.ts +219 -0
  201. package/src/scripts/check_new_adr_evidence.ts +529 -0
  202. package/src/scripts/check_references.ts +78 -0
  203. package/src/scripts/check_release_published.ts +32 -11
  204. package/src/scripts/check_rule_layer_partition.ts +531 -0
  205. package/src/scripts/check_single_delivery.ts +194 -17
  206. package/src/scripts/check_standing_rule_delivery.ts +8 -2
  207. package/src/scripts/ci_settle.ts +170 -0
  208. package/src/scripts/condense.ts +79 -259
  209. package/src/scripts/council_cli.ts +3 -3
  210. package/src/scripts/dispatch_r2_reviewer.ts +6 -14
  211. package/src/scripts/external_sources_denylist.json +4 -1
  212. package/src/scripts/hook_manifest.json +1 -1
  213. package/src/scripts/hook_manifest.yaml +77 -14
  214. package/src/scripts/hooks/block_no_verify.ts +61 -10
  215. package/src/scripts/hooks/block_unauthorized_git.ts +21 -1
  216. package/src/scripts/hooks/concern_registry.ts +4 -0
  217. package/src/scripts/hooks/dispatch_hook.ts +154 -187
  218. package/src/scripts/hooks/dispatch_issues.ts +38 -19
  219. package/src/scripts/hooks/fallback_yaml.ts +66 -0
  220. package/src/scripts/hooks/host_semantics.ts +21 -0
  221. package/src/scripts/hooks/injection_budget.ts +13 -3
  222. package/src/scripts/hooks/py_json_dumps.ts +103 -0
  223. package/src/scripts/hooks/rtk_wrap_hook.ts +8 -3
  224. package/src/scripts/hooks/run_continuation_hook.ts +8 -5
  225. package/src/scripts/hooks/ship_diff_volume_hook.ts +81 -15
  226. package/src/scripts/hooks/source_first_gate_hook.ts +464 -0
  227. package/src/scripts/hooks/state_io.ts +870 -21
  228. package/src/scripts/hooks/stdin_failure_policy.ts +96 -0
  229. package/src/scripts/hooks/subagent_ledger_hook.ts +44 -15
  230. package/src/scripts/hooks/telemetry_flush_hook.ts +139 -0
  231. package/src/scripts/hooks/telemetry_self_repair.ts +128 -0
  232. package/src/scripts/hooks/telemetry_usage_hook.ts +22 -4
  233. package/src/scripts/hooks/turn_end_gate_hook.ts +81 -15
  234. package/src/scripts/injection_scan_hook.ts +137 -5
  235. package/src/scripts/install.ts +16 -11
  236. package/src/scripts/language_mirror_hook.ts +561 -25
  237. package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
  238. package/src/scripts/lint_hook_manifest.ts +49 -0
  239. package/src/scripts/lint_plan_risk_register.ts +4 -3
  240. package/src/scripts/lint_provenance_vocabulary.ts +472 -4
  241. package/src/scripts/lint_skill_router_head.ts +4 -4
  242. package/src/scripts/mcp_server/tools.ts +2 -2
  243. package/src/scripts/new_roadmap.ts +136 -0
  244. package/src/scripts/pack_mcp_content.ts +20 -5
  245. package/src/scripts/release.ts +37 -38
  246. package/src/scripts/report_layer_overlap.ts +6 -0
  247. package/src/scripts/routing_doctor.ts +5 -1
  248. package/src/scripts/self_repair_hook.ts +37 -5
  249. package/src/scripts/session_register_hook.ts +11 -0
  250. package/src/scripts/skill_usage_collect.ts +11 -1
  251. package/src/scripts/skill_usage_report.ts +278 -8
  252. package/src/scripts/sync_pr_branch.ts +170 -20
  253. package/src/server/schemas/settings.ts +8 -0
  254. package/dist/cli-delegate/chunk-EJITJBJX.js +0 -172
  255. package/dist/cli-delegate/chunk-PZWRPRWP.js +0 -38
  256. package/dist/cli-delegate/{chunk-PPQO4NGR.js → chunk-6RJA2F5A.js} +3 -3
  257. package/dist/cli-delegate/{chunk-RYNADUFG.js → chunk-LWTYTX6F.js} +0 -0
  258. package/dist/cli-delegate/{chunk-FBKL6JWT.js → chunk-MMSGVZKV.js} +3 -3
@@ -7,7 +7,7 @@ cluster: roadmap
7
7
  sub: process-full
8
8
  skills: [agent-docs-writing, ai-council, roadmap-management]
9
9
  description: Autonomously process every open step across every phase of a roadmap until the file is fully closed. Largest execution scope of the /roadmap cluster — runs continuously across phase boundaries.
10
- argument-hint: "[roadmap]"
10
+ argument-hint: "[roadmap] [--all] [--worktree]"
11
11
  suggestion:
12
12
  eligible: false
13
13
  rationale: "Cluster sub-command — reached via its cluster head's routing or its explicit /cluster:sub name; not independently suggested (surface-consolidation)."
@@ -25,6 +25,14 @@ cluster. Same canonical loop as
25
25
  phase boundaries — continues until every step is closed (or a halt
26
26
  condition fires).
27
27
 
28
+ **This invocation IS the grant** (ADR-237). It authorises every
29
+ machine-executable, repository-scoped action needed to deliver the finished
30
+ PR — branches, chunked commits, pushing that branch, opening and updating the
31
+ PR, reversible repository/branch settings, CI runs and re-runs, merge-base
32
+ updates and conflict resolution, and any tool / CLI / API / model / council the
33
+ work needs within the spend ceiling. **The final PR is the interaction
34
+ boundary: report once, at the end.**
35
+
28
36
  ## Instructions
29
37
 
30
38
  Run the canonical loop in
@@ -46,15 +54,16 @@ with the **scope delta below**.
46
54
  - **Working set:** every open step across every phase, in document
47
55
  order. Phase-internal annotations like `(deferred)` / `(optional)` /
48
56
  "gated on Phase N" do not narrow the working set.
49
- - **Stop after:** the entire roadmap reaches `count_open == 0`
50
- (`complete`), or the runnable set is empty with steps still open
51
- (`blocked` — see the terminal-outcomes section below), or a halt
52
- condition fires (Hard-Floor, council-off + ambiguity — the latter only
53
- outside an accepted contract with council available,
54
- security-sensitive, scope-out-of-roadmap, test/quality red).
55
- - **Do not start** when NO open step is runnable: that is
56
- `blocked-preflight`, and it creates no branch and takes no grant. The
57
- runnable test is § 3c of the loop.
57
+ - **Stop after:** the entire roadmap reaches `count_open == 0` and the PR is
58
+ open (`complete`), or every remaining open step is **externally impossible**
59
+ for the agent (`blocked` — narrowed by ADR-237 § 4 to genuine external
60
+ impossibility), or a halt condition fires (Hard-Floor EXCLUDED-list action,
61
+ security-sensitive, scope-out-of-roadmap, test/quality red past N=3).
62
+ - **Always start.** `blocked-preflight` was **removed by ADR-237**: a run no
63
+ longer refuses because its open steps look human-gated. Repository-local
64
+ prerequisites are remediation work — do them. The § 3c test now asks whether
65
+ an action is *technically possible for the agent*, not who conventionally
66
+ performs it.
58
67
  - **Phase boundary handling:** at every phase boundary, run the
59
68
  per-phase quality pipeline when `quality_cadence: per_phase` (or
60
69
  `per_step`) AND `quality.local_auto_run: true` — under the default
@@ -71,6 +80,116 @@ with the **scope delta below**.
71
80
  archival check from
72
81
  [`roadmap-process-loop § 6`](../../contexts/execution/roadmap-process-loop.md#6-final-report-and-archival).
73
82
 
83
+ ## The three flags
84
+
85
+ ### `--all` — the estate, one roadmap at a time
86
+
87
+ `--all` changes **cardinality, not lifecycle**: the same single-roadmap loop,
88
+ iterated over the whole active estate. It is a flag rather than a
89
+ `/roadmap:process-all` command because
90
+ [`command-clusters`](../../../../../docs/contracts/command-clusters.md) says
91
+ sibling variants become a flag, and a drain is a count of the thing this
92
+ command already does.
93
+
94
+ 1. **Recompute the inventory live.** Never from memory, never from the
95
+ dashboard count — the same live-screen rule
96
+ [`/roadmap:next` § 1](../next/command.md) already carries. The corpus is the
97
+ non-draft roadmaps directly under `agents/roadmaps/`; `later/`, `skipped/`,
98
+ `archive/` and `stubs/` are out of scope.
99
+ 2. **Order the queue.** Roadmaps at or above 10 % checkbox progress first, in
100
+ **descending** progress — nearly-done first, because they convert soonest.
101
+ Roadmaps below 10 % are appended after, ascending by declared `complexity:`
102
+ tier (lightweight → bounded → structural), tiebreak ascending total
103
+ checkbox count. Both buckets need a **total** order or two runs over the
104
+ same estate disagree: within the first, ties on progress break by ascending
105
+ total checkbox count and then by ascending filename; within the second, by
106
+ ascending filename after the checkbox count.
107
+ 3. **Loop.** Per roadmap: branch from the updated default, run this command's
108
+ normal single-roadmap loop, deliver per § Delivery, then take the next
109
+ roadmap against the default **as it stands at that moment** — re-fetched,
110
+ never assumed. One roadmap = one branch = one PR, the existing invariant
111
+ iterated, not a new one.
112
+
113
+ **What `--all` can and cannot promise, stated plainly because the honest
114
+ version is weaker than the obvious one.** Nothing in the run
115
+ merges, so the default does not advance because of this run, and every PR after
116
+ the first is mergeable *against the base recorded when it was prepared* rather
117
+ than against the base after its predecessors land. In a repository where every
118
+ roadmap PR touches the same generated files, that means an `--all` hand-off is
119
+ **one immediately-mergeable PR plus N−1 prepared ones**, each needing a
120
+ re-sync at merge time. That is still the expensive half — conflicts classified,
121
+ CI green once, superseded PRs closed — but it is not "N mergeable PRs", and the
122
+ run reports it in those words.
123
+
124
+ **A blocked roadmap never stalls the estate queue.** Inside a roadmap the five
125
+ halt conditions and the terminal outcomes keep full authority. Between
126
+ roadmaps, the § Halt-conditions table below is the single statement of what
127
+ ends the roadmap and what ends the loop — including the two halts that are
128
+ safety floors and therefore end the run. A `blocked` roadmap is recorded and
129
+ the loop continues to the next one.
130
+
131
+ ### Delivery — every run, flag or not
132
+
133
+ On outcome `complete`, open the PR as today, then run
134
+ [`/pr:merge <N> --no-merge`](../../../git/pr/merge/command.md) on it: sync the
135
+ base in, resolve conflicts by that command's four enumerated classes, drive the
136
+ required checks green on the pushed head. **This is unconditional** — a bare
137
+ `/roadmap:process-full` delivers a mergeable PR, not merely an open one, and
138
+ waiting on that remote CI is part of the run per the Iron Law below. It is
139
+ the whole of what this command delivers: there is no flag that carries it
140
+ further, and § Merging below says why.
141
+
142
+ ### Merging — out of scope, cancelled rather than deferred
143
+
144
+ ```
145
+ THIS COMMAND NEVER MERGES. THERE IS NO FLAG THAT MAKES IT MERGE.
146
+ THE RUN ENDS AT MERGEABLE-AND-OPEN, ALWAYS, AND SAYS SO.
147
+ A FUTURE MERGE CAPABILITY NEEDS A NEW ROADMAP AND AN OWNER RULING —
148
+ NOT A COMMAND EDIT, AND NOT A FLAG THAT ALREADY SITS HERE INERT.
149
+ ```
150
+
151
+ A `--merge` flag was specified here and has been **removed**. The
152
+ `merge-authority` blocker of `road-to-drain-commands` closed as *not authorized
153
+ in this roadmap*: activating the flag would have lowered
154
+ [`non-destructive-by-default`](../../../../rules/non-destructive-by-default.md)'s
155
+ per-turn confirmation floor for a production-branch merge, which
156
+ [`decision-revisit-gate`](../../../../rules/decision-revisit-gate.md)'s
157
+ owner-reserved table reserves to the owner. No owner ruling was available to the
158
+ run that closed the roadmap, and an AI-council pass (2/2 convergent, 2026-08-22)
159
+ ruled that a council may cancel an unauthorized implementation but may not
160
+ manufacture the owner decision. The policy question is therefore **undecided,
161
+ not rejected** — see
162
+ [ADR-239](../../../../../docs/decisions/ADR-239-drain-command-surface-and-merge-authority.md)
163
+ § Disposition.
164
+
165
+ The flag was removed rather than left inert deliberately: an archived roadmap
166
+ must not leave latent executable authority behind a documented switch.
167
+
168
+ Three independent findings stand behind the safety requirement, and any future
169
+ attempt starts from them rather than re-deriving them: the AI council's Q1
170
+ verdict (2026-08-21 — mergeability-only until authorization is target-bound and
171
+ tamper-resistant), the committed `road-to-gate-preauth-authorization` stub (an
172
+ authorization the agent can write is not an authorization), and the runtime
173
+ guard that refused this roadmap's own attempt to edit the canonical loop
174
+ contract.
175
+
176
+ **Mergeability is per-PR against a recorded base, never a queue property.**
177
+ When every PR in the estate touches the same generated files — in this
178
+ repository `agents/roadmaps-progress.md` and
179
+ `src/config/estate-count-budget.json` — making PR *n* mergeable against base
180
+ SHA `M` says nothing about its state once PR *n−1* advances the base to `M1`.
181
+ Report "mergeable against base `<SHA>`", never "the queue is mergeable".
182
+
183
+ ### `--worktree` — isolate the workspace
184
+
185
+ Route workspace creation through [`/worktree:create`](../../../engineering-base/worktree/create/command.md)
186
+ in full, including its
187
+ [§ 4b seeding allow/deny list](../../../../skills/using-git-worktrees/SKILL.md#4b-seed-the-worktree--allow--deny-list),
188
+ which is the authority on what may be copied and what must never be — not
189
+ restated here, because a second copy of a safety list is a copy that can
190
+ drift. Under `--all` the worktree is created
191
+ once and re-branched per roadmap; `/worktree:cleanup` runs at end of run.
192
+
74
193
  ## Iron Law — Full is Full
75
194
 
76
195
  ```
@@ -78,9 +197,15 @@ with the **scope delta below**.
78
197
  TO COMPLETION, ACROSS EVERY PHASE. ONLY THE FIVE HALT CONDITIONS STOP IT.
79
198
  PHASE-INTERNAL "(DEFERRED)" / "(OPTIONAL)" / "GATED ON PHASE X" NOTES DO
80
199
  NOT NARROW THE WORKING SET. A PHASE BOUNDARY IS NOT A STOP.
200
+ UNDER `--all`, A ROADMAP BOUNDARY IS NOT A STOP EITHER — BUT A HARD-FLOOR OR
201
+ SECURITY-SENSITIVE HALT ENDS THE WHOLE RUN, NOT JUST THE ROADMAP. THE TABLE
202
+ UNDER THE HALT CONDITIONS IS THE ONLY STATEMENT OF WHICH ENDS WHICH.
203
+ WAITING ON REMOTE CI FOR THE DELIVERY LOOP IS PART OF THE RUN. "CI IS
204
+ RUNNING" IS NOT A BOUNDARY, NOT A HALT, AND NOT A REPORT — THE RUN ENDS
205
+ AT A MERGEABLE PR, NEVER AT AN OFFER TO GO CHECK ON ONE.
81
206
  ```
82
207
 
83
- The **five — and only five — halt conditions** (exhaustive; nothing else
208
+ The **six — and only six — halt conditions** (exhaustive; nothing else
84
209
  stops the run):
85
210
 
86
211
  1. **Hard-Floor** trigger ([`non-destructive-by-default`](../../rules/non-destructive-by-default.md)).
@@ -88,6 +213,38 @@ stops the run):
88
213
  3. **Security-sensitive** surface reached.
89
214
  4. **Scope-out-of-roadmap** work discovered.
90
215
  5. **Test / quality red** that cannot be cleared within the N=3 budget.
216
+ 6. **A merge conflict outside the four enumerated classes** of
217
+ [`/pr:merge` § 3](../../../git/pr/merge/command.md), during the delivery
218
+ loop. Added when delivery became unconditional: the loop runs on every
219
+ completed run, `--all` or not, so its stop is a stop of this command and
220
+ calling it "a kill switch rather than a halt reason" would not change that —
221
+ a run that stops has stopped. It fires only where a run reaches delivery,
222
+ which is the one thing that distinguishes it from the five above.
223
+
224
+ **Under `--all`, which of these end the roadmap and which end the loop.** Two
225
+ of the five are safety floors and they end the **whole run**, not the current
226
+ roadmap:
227
+
228
+ | Halt | Under `--all` |
229
+ |---|---|
230
+ | 1. Hard-Floor trigger | **Ends the run.** Stop and obtain this-turn confirmation. [`non-destructive-by-default`](../../rules/non-destructive-by-default.md) states that no roadmap authorization lifts the floor, and "record it and take the next roadmap" is exactly the roadmap-as-authorization bypass it names. |
231
+ | 3. Security-sensitive surface | **Ends the run**, same reasoning. |
232
+ | 2. Council-off + genuine ambiguity | Ends the roadmap; the loop records it and continues. |
233
+ | 4. Scope-out-of-roadmap work | Ends the roadmap; the loop records it and continues. |
234
+ | 5. Test / quality red past N=3 | Ends the roadmap; the loop records it and continues. |
235
+ | 6. Unenumerated merge conflict in delivery | Ends the roadmap; the loop records it and continues. |
236
+
237
+ **And the conditions that end the loop without ending a roadmap:**
238
+ estate-queue exhaustion (always), a
239
+ [`/pr:merge` § 8](../../../git/pr/merge/command.md) kill switch (always — that
240
+ section arms its checks during **preparation**, not only before a merge, which
241
+ is what keeps them reachable while the merge step is gated), and
242
+ authorization-window expiry — which is **unreachable in this command**,
243
+ because it never performs a `BLOCK_OPS` operation for the window to govern. Three conditions, one of them currently inert, and this
244
+ table is the only place the set is stated.
245
+
246
+ Nothing here widens a run without `--all`: it still has exactly the six
247
+ above, all of them ending the run because there is no loop to continue.
91
248
 
92
249
  ```
93
250
  FORBIDDEN NON-HALT REASONS — NEVER STOP THE RUN FOR ANY OF THESE:
@@ -98,8 +255,21 @@ FORBIDDEN NON-HALT REASONS — NEVER STOP THE RUN FOR ANY OF THESE:
98
255
  · "phase-checkpoints mode, so I'll checkpoint and wait"
99
256
  · "this step looks human-gated" — `blocked` is reached by the § 3c
100
257
  runnable test over PRE-EXISTING blockers, never by how a step feels
258
+ · "the branch is not protected" / "a branch must be created"
259
+ · "a PR must be opened" / "a GitHub setting must change"
260
+ · "CI must be re-run" / "the merge base needs updating" / "there are
261
+ conflicts" — resolving these IS the work. The one exception, and it is a
262
+ kill switch rather than a halt reason: a conflict **outside** the four
263
+ enumerated classes of [`/pr:merge` § 3](../../../git/pr/merge/command.md)
264
+ stops the delivery loop, because that is a case nobody has decided yet and
265
+ deciding it silently is how work disappears. An enumerated conflict is
266
+ never a stop.
267
+ · "a paid service is needed" — authorised under the ceiling below
268
+ · "a maintainer should do this" when the agent can perform the same action
101
269
  · any agent-invented caution not in the five halt conditions above.
102
270
  INVENTING A HALT REASON IS A VIOLATION OF THE COMMAND AND THE USER'S WILL.
271
+ CAPABILITY BEFORE ROLE: IF THE AGENT CAN DO IT AND THE INVOCATION GRANTS IT,
272
+ DOING IT IS THE ONLY CONFORM ACTION.
103
273
  IF CONTEXT RUNS OUT MID-RUN, KEEP LANDING COMPLETE STEPS UNTIL IT DOES —
104
274
  NEVER ANNOUNCE A BOUNDARY-STOP BY CHOICE.
105
275
  ```
@@ -117,40 +287,103 @@ roadmap carries such phrasing — whether by legacy or by an opt-in
117
287
  setting — treat it as ordinary prose during execution, never as a
118
288
  gate. Phase ordering and explicit dependency gates govern the loop.
119
289
 
120
- ## Terminal outcomes — and why `blocked` is not a sixth halt
290
+ ## Terminal outcomes — `complete`, or a genuine external impossibility
121
291
 
122
- The five halt conditions answer *"what interrupts runnable work"*. They never
123
- answered *"what does the run report when no runnable work is left and the roadmap
124
- is not finished"*, and the omission was not academic: measured 2026-08-19 across
125
- the twelve most nearly complete roadmaps in the estate, **zero** could reach
126
- `count_open == 0` in one PR — every remaining open step needed a human action, a
127
- repo-admin setting, a paid authorisation, an absent binary, or an elapsed soak
128
- window. Under the contract as written, such a roadmap had no legal stopping point,
129
- so the command could be neither obeyed nor honestly declined.
292
+ **Rewritten by [ADR-237](../../../../docs/decisions/ADR-237-end-to-end-execution-authority.md),
293
+ which supersedes ADR-235.** The prior version measured twelve nearly-complete
294
+ roadmaps and found that **zero** could reach `count_open == 0` in one PR, because
295
+ every remaining step needed "a human action". That census was sound; the reading
296
+ of it was not. It counted actions a human *conventionally* performs without
297
+ asking, per action, whether a human was **necessary**. Most of that list — flip a
298
+ branch setting, push, open a PR, re-run CI, update a merge base, fix a failing
299
+ test, authorise spend inside a budget — is machine-executable by the agent, and
300
+ is therefore remediation work rather than a blocker.
130
301
 
131
302
  | Outcome | When | Success? |
132
303
  |---|---|---|
133
- | `complete` | `count_open == 0` | yes — archival check runs |
134
- | `blocked` | `count_open > 0` and no open step is runnable per § 3c | **no** — partial progress, labelled as such |
135
- | `blocked-preflight` | no open step was runnable before the run started | **no** — nothing was attempted; no branch |
304
+ | `complete` | `count_open == 0` and the PR is open | yes — archival check runs |
305
+ | `blocked` | every remaining open step is **externally impossible** for the agent | **no** — partial progress, labelled as such |
136
306
  | a halt | one of the five conditions fired | **no** — the halt is reported |
137
307
 
308
+ `blocked-preflight` no longer exists. A run always starts.
309
+
310
+ **What counts as externally impossible** — the whole list:
311
+
312
+ - a required credential does not exist and the agent cannot create it;
313
+ - a purchase beyond the delegated budget (see § Spend below);
314
+ - physical access to hardware;
315
+ - another person or organisation must act;
316
+ - a wait that is factually mandatory and cannot be simulated or verified.
317
+
318
+ **What does NOT** — every one of these is work:
319
+
320
+ an unprotected branch · a branch to create · a PR to open · a repository or
321
+ branch setting the agent can change · a workflow to start · CI to re-run · a
322
+ merge base to update · conflicts · failing tests · local configuration · a paid
323
+ call under the ceiling · "this could be risky" · "a maintainer should do this".
324
+
138
325
  ```
139
326
  `blocked` IS NEVER REPORTED AS COMPLETION. count_open STAYS > 0.
140
327
  NEVER FLIP A BOX TO [~] TO REACH IT — THAT LAUNDERS OPEN WORK THROUGH A GLYPH.
141
328
  A PR OPENED ON A BLOCKED RUN SAYS PARTIAL PROGRESS IN ITS FIRST LINE.
142
- REVALIDATE THE RUNNABLE SET BEFORE REPORTING IT. ONE RUNNABLE STEP REJECTS THE CLAIM.
329
+ BEFORE REPORTING blocked, ASK PER STEP: CAN I DO THIS AT ALL?
330
+ ONE STEP THE AGENT COULD HAVE EXECUTED REJECTS THE CLAIM.
331
+ ```
332
+
333
+ **It is a terminal outcome, not a halt, and the separation still matters.** The
334
+ Iron Law above and its forbidden list keep their full authority over mid-run
335
+ stopping: an agent that may not stop for "this phase is large" may equally not
336
+ stop for "this step looks human-gated" — and under ADR-237 that phrase is no
337
+ longer even a candidate, because the test is capability, not convention.
338
+
339
+ ## Final-PR-only — the UX invariant
340
+
143
341
  ```
342
+ THE RUN REPORTS ONCE, AT THE END. THE FINAL PR IS THE INTERACTION BOUNDARY.
343
+ INTERNAL REMEDIATION IS WORK, NEVER A USER MESSAGE.
344
+ NEVER INTERRUPT THE OWNER MID-RUN FOR A DECISION THE INVOCATION ALREADY DELEGATED.
345
+ ```
346
+
347
+ A missing setting, a CI re-run, a protection flag, a rebase, a council call: do
348
+ them, and say so in the PR body if it matters. The only mid-run interruptions
349
+ that remain legitimate are a spend-ceiling crossing and an EXCLUDED-list action
350
+ (production trunk, deploy, prod data/infra, an irreversible external action
351
+ beyond the PR).
352
+
353
+ Report shape:
144
354
 
145
- **It is a terminal outcome, not a halt, and the distinction is the safety
146
- property.** The Iron Law above and its forbidden list hold their full authority
147
- over mid-run stopping: an agent that may not stop for "this phase is large" may
148
- equally not stop for "this step looks human-gated". Runnability is decided by the
149
- § 3c test over blockers that **pre-date the run** — a citation the run wrote
150
- itself buys nothing. AI council 2026-08-19, 2/2 convergent on exactly this
151
- separation.
355
+ ```
356
+ PR #<n>
357
+ <url>
358
+
359
+ Roadmap fully implemented. CI <passed>/<total>.
360
+ ```
361
+
362
+ or, in the genuine exception:
363
+
364
+ ```
365
+ Unable to produce the final PR.
366
+ Hard external blocker: <specific reason>
367
+ Attempted: <what was tried>
368
+ ```
369
+
370
+ ## Spend — USD 25 per run, pre-authorised
371
+
372
+ ```
373
+ cost_so_far + reasonably_expected_remaining ≤ $25 → RUN IT, ASK NOTHING
374
+ cost_so_far + reasonably_expected_remaining > $25 → OWNER APPROVAL BEFORE CROSSING
375
+ COST UNKNOWN → CONSERVATIVE ESTIMATE. UNCERTAINTY IS NOT A REASON TO ASK.
376
+ SERVICE-ENFORCED LIMITS MAKE >$25 IMPOSSIBLE → AUTHORISED.
377
+ EXISTING SUBSCRIPTION → MARGINAL COST $0, NOT COUNTED.
378
+ NEVER SPLIT SPEND ACROSS SERVICES, SUBAGENTS, COUNCIL ROUNDS OR CALLS
379
+ TO KEEP EACH ITEM UNDER THE CEILING. THE CEILING IS CUMULATIVE, PER RUN.
380
+ ```
152
381
 
153
- Recorded in [`ADR-235`](../../../../docs/decisions/ADR-235-process-full-blocked-terminal-outcome.md).
382
+ The transport is not a governance boundary: a council invocation is the same
383
+ authorised action whether it runs through the `council` CLI or a direct API call.
384
+ There is deliberately **no allowlist** of blessed services — the general rule
385
+ (machine-executable · in scope · under the ceiling) already contains every case,
386
+ and an allowlist would rot.
154
387
 
155
388
  ## Iron Law — Real-time dashboard
156
389
 
@@ -181,6 +414,11 @@ step 5.
181
414
  - **Phase quality pipeline runs at every phase boundary** when cadence
182
415
  is `per_phase` or `per_step`. `end_of_roadmap` skips per-phase and
183
416
  runs only at the final archival check.
417
+ - **No mid-run approval requests.** The invocation delegated them. Only a
418
+ spend-ceiling crossing or an EXCLUDED-list action reaches the owner.
419
+ - **No `Class: 3` on an agent-executable action.** Capability before role
420
+ (ADR-237 § 2). A blocker labelled human-only that the agent could have run is
421
+ a defect in the roadmap, and the run fixes the label rather than obeying it.
184
422
  - All other rules from
185
423
  [`process-phase § Rules`](process-phase.md#rules) apply unchanged.
186
424
 
@@ -190,3 +428,5 @@ step 5.
190
428
  - [`/roadmap:process-step`](process-step.md) — single-step variant
191
429
  - [`/roadmap:process-phase`](process-phase.md) — default scope, single phase
192
430
  - [`roadmap-process-loop`](../../contexts/execution/roadmap-process-loop.md) — canonical mechanics
431
+ - [`ADR-237`](../../../../docs/decisions/ADR-237-end-to-end-execution-authority.md) — the end-to-end delegation contract this command implements
432
+ - [`ADR-235`](../../../../docs/decisions/ADR-235-process-full-blocked-terminal-outcome.md) — superseded; kept for the census and the `[~]`-prohibition argument
@@ -38,7 +38,7 @@ paused for confirmation before every step) was removed —
38
38
  | `/roadmap:materialize` | `commands/roadmap/materialize.md` | Turn an accepted roadmap into the concrete artefacts it plans |
39
39
  | `/roadmap:process-step` | `commands/roadmap/process-step.md` | Autonomously process the next open step, then stop |
40
40
  | `/roadmap:process-phase` (**default execution scope**) | `commands/roadmap/process-phase.md` | Autonomously process every open step in the current phase |
41
- | `/roadmap:process-full` | `commands/roadmap/process-full.md` | Autonomously process every open step across every phase |
41
+ | `/roadmap:process-full` | `commands/roadmap/process-full.md` | Autonomously process every open step across every phase; `--all` iterates the whole active estate, `--worktree` isolates the workspace |
42
42
  | `/roadmap:next` | `commands/roadmap/next.md` | Screen for the next executable roadmap, then carry it to a reviewable PR (selection + `process-full` + delivery) |
43
43
 
44
44
  Sub-command names match the locked contract in
@@ -89,14 +89,11 @@ evaluation-order accident.
89
89
 
90
90
  **Recursive-dispatch guard (2.3) — honest scope.** No verified host
91
91
  discriminator exists for "is this classification running inside a
92
- subagent/teammate session" — this roadmap's own `point-of-action-carrier`
93
- blocker records the upstream PreToolUse agent-identity request as closed
94
- NOT_PLANNED, and no field in this repo's hook envelope carries session
95
- lineage. The guard is therefore a CALLER-SUPPLIED fact
92
+ subagent/teammate session", and no field in this repo's hook envelope carries
93
+ session lineage. The guard is therefore a CALLER-SUPPLIED fact
96
94
  (`insideSubagentSession`), never a `process.env` probe for an unverified
97
- variable name — the same "no discriminator is publishable" null the
98
- `point-of-action-carrier` blocker already names. When set, it resolves ∅
99
- (in-session) for rungs 1-4; rung 0 is exempt (it never spawns).
95
+ variable name. When set, it resolves ∅ (in-session) for rungs 1-4; rung 0 is
96
+ exempt (it never spawns).
100
97
 
101
98
  **Relationship to the council's own necessity gate.** Rung 4's three
102
99
  signals (design decision / security downgrade / release-gate escalation)
@@ -127,6 +124,32 @@ Criteria are independent and additive in the obvious way (a slice matching
127
124
  two rows takes the higher of the two tiers); this table never lowers a
128
125
  tier `inferSliceTier` (§ below) already raised.
129
126
 
127
+ ## Cross-vendor worker direction (declared, not implemented)
128
+
129
+ Deny-by-default — a direction not listed here is denied. Direction rules,
130
+ payload allow/deny lists, the report-only boundary, the no-recursion clause and
131
+ the human egress gate:
132
+ [`cross-vendor-worker-direction`](../../../../docs/contracts/cross-vendor-worker-direction.md).
133
+ Role pairs, never vendor names — `classifyLadder` carries no vendor identity
134
+ ([`subagent-routing`](subagent-routing.md) § Why vendor-neutral).
135
+
136
+ Rung-1/2 slices only.
137
+
138
+ | # | Direction (role pair) | Resolves to |
139
+ |---|---|---|
140
+ | CV-1 | a worker on the **non-authoring** vendor reviews the **authoring** vendor's output | report-only worker |
141
+ | CV-2 | the mirror of CV-1 | report-only worker |
142
+
143
+ ```
144
+ DIRECTION PERMITTED + PAYLOAD ALLOWED + HUMAN APPROVED = MAY SEND.
145
+ ANY ONE MISSING = MAY NOT.
146
+ A CROSS-VENDOR WORKER NEVER IMPLEMENTS, WRITES, COMMITS, ACTS,
147
+ OR DISPATCHES ONWARD.
148
+ ```
149
+
150
+ Nothing reads CV-1/CV-2 at runtime: a contract surface a future implementation
151
+ must satisfy, replacing the phantom artefact the original survey cited.
152
+
130
153
  ## Per-slice tier inference (v1.5 — deterministic, task-TYPE-keyed)
131
154
 
132
155
  Once a slice is classified **delegable**, a second deterministic table infers
@@ -206,15 +229,11 @@ NEVER A SILENTLY DEGRADED ANSWER. NO LLM CLASSIFIER FALLBACK (CUT C3).
206
229
  | "does string Y exist" / "probe candidate strings" | `string-existence` | FTS one-shot (`memory_lookup` for the knowledge corpus) or capped `rg -n --max-count` for the codebase |
207
230
  | "run report Z" / "run check_*" | `report-run` | direct script run, wrapped per the **measured** rtk allowlist (`internal/bench/rtk-savings/RESULTS.md` — wrap only the ~55%-savings class) |
208
231
 
209
- **Why rg-first for definition/references** (council debate 2026-07-28,
210
- claude-sonnet-4-5 + gpt-4o, 2 rounds): the pre-registered benchmark behind the
211
- `code-graph-retrieval-null` claim (`docs/CLAIMS.md`) measured native-graph
212
- recall 0.365 vs grep 0.797 on graph-shaped questions, root cause an **indexing
213
- gap** (TS arrow-function exports produce no symbol nodes) that hits structured
214
- lookups exactly as it hits NL retrieval — and the recorded consequence bound
215
- keeps `code_graph.enabled` false permanently. The accelerant clause is the
216
- escape hatch that bound names ("unless external evidence appears"); today it
217
- is inert.
232
+ **Why rg-first** (council 2026-07-28, 2 rounds): the pre-registered benchmark
233
+ behind the `code-graph-retrieval-null` claim (`docs/CLAIMS.md`) measured
234
+ native-graph recall 0.365 vs grep 0.797 on graph-shaped questions — an
235
+ indexing gap that keeps `code_graph.enabled` false permanently. The accelerant
236
+ clause in the table above is that bound's escape hatch and is inert today.
218
237
 
219
238
  **Escalation, not degradation:** a primitive that returns nothing (index miss,
220
239
  pattern too ambiguous, report script absent) — **or an unusable result**
@@ -238,26 +257,17 @@ budgeted (consume part of the N=3 autonomous budget) and opt-in. Not in v1.
238
257
 
239
258
  ## Reference implementation
240
259
 
241
- The deterministic rules are encoded in
242
- [`src/scripts/_lib/auto_dispatch.ts`](../../../../src/scripts/_lib/auto_dispatch.ts)
243
- (`classifyTask`, `classifyLookup` for the lookup-class rung), covered by
244
- [`tests/scripts/_lib_auto_dispatch.test.ts`](../../../../tests/scripts/_lib_auto_dispatch.test.ts)
245
- and the lookup corpus in
246
- [`src/scripts/_lib/auto_dispatch.corpus.test.ts`](../../../../src/scripts/_lib/auto_dispatch.corpus.test.ts)
247
- (`LOOKUP_CORPUS` — the four live-observed shapes + negative controls).
248
-
249
- The judgment ladder (§ above) is encoded in
250
- [`src/scripts/_lib/judgment_ladder.ts`](../../../../src/scripts/_lib/judgment_ladder.ts)
251
- (`classifyLadder`, plus the rung-0/1/3/4 signal-detection functions), covered
252
- by
253
- [`tests/scripts/_lib_judgment_ladder.test.ts`](../../../../tests/scripts/_lib_judgment_ladder.test.ts)
254
- (every rung, the rung-3 degrade path, the recursive-dispatch guard, and every
255
- ∅ case). The delegation-nudge hook
256
- ([`delegation_nudge_hook.ts`](../../../../src/scripts/hooks/delegation_nudge_hook.ts))
257
- is its first production caller — its injected line cites the resolved rung
258
- (`rung-2: dispatch do-in-parallel …`), scoped to the subagent dispatch rungs
259
- (1/2); a rung-0/3/4 verdict stays silent on this carrier until Phase 3/4 give
260
- team/council their own.
260
+ - `classifyTask` / `classifyLookup` —
261
+ [`auto_dispatch.ts`](../../../../src/scripts/_lib/auto_dispatch.ts)
262
+ - `classifyLadder` + the rung-0/1/3/4 signal detectors —
263
+ [`judgment_ladder.ts`](../../../../src/scripts/_lib/judgment_ladder.ts)
264
+ - First production caller —
265
+ [`delegation_nudge_hook.ts`](../../../../src/scripts/hooks/delegation_nudge_hook.ts):
266
+ its injected line cites the resolved rung, scoped to the dispatch rungs
267
+ (1/2); a rung-0/3/4 verdict stays silent on this carrier.
268
+
269
+ Each has a sibling `*.test.ts` under `tests/scripts/` covering every rung, the
270
+ rung-3 degrade path, the recursive-dispatch guard and every ∅ case.
261
271
 
262
272
  ## Related
263
273
 
@@ -86,18 +86,53 @@ In `auto` mode, flip to `on` for the rest of the conversation when the user expr
86
86
 
87
87
  Algorithm and speech-act heuristic: [`autonomy-detection.md`](autonomy-detection.md). Anchor phrases (DE+EN), no-flip patterns, counter-examples, trivial-vs-blocking taxonomy, commit-policy summary, and named failure modes: this file + [`autonomy-examples.md`](autonomy-examples.md).
88
88
 
89
- ## Task-scope — two autonomy shapes
89
+ ## Task-scope — three autonomy shapes
90
90
 
91
91
  Depth for the rule's task-scope Iron Law (`NEW TASK → FRESH CONFIRMATION`).
92
- Two distinct autonomy shapes — keep them apart:
92
+ Three distinct autonomy shapes — keep them apart:
93
93
 
94
94
  | Shape | Trigger | Scope |
95
95
  |---|---|---|
96
96
  | **Conversation-wide trivial-question suppression** | "stop asking on trivial steps, just work" — no deliverable named. | Sticky for the rest of the conversation. Suppresses trivial workflow questions only; never lifts blocking, Hard Floor, or [`scope-control`](../../rules/scope-control.md) gates. |
97
97
  | **Task-scoped autonomous execution** | "work autonomously on X", "arbeite die Roadmap Y komplett ab", "do PROJ-123 end-to-end" — a deliverable / artifact / ticket is named. | Bound to **that** task. Ends when the task ends. Does **not** authorize starting a new, distinct task autonomously. |
98
+ | **Set-scoped autonomous execution** | An accepted execution contract whose pre-scan **enumerated** a closed, ordered set of deliverables — the set members are named on the contract screen before the single Accept. | Bound to **that enumerated set**. The loop may move from one listed member to the next without a new contact. A member not on the accepted list is a new task and needs fresh confirmation. |
98
99
 
99
100
  Litmus test: does the directive name (or unambiguously point to) a single concrete deliverable? Yes → task-scoped, scope ends with the deliverable. No → conversation-wide, trivial-question suppression only.
100
101
 
102
+ Set-scoped is the same litmus applied to a **list** instead of a single item, and
103
+ it is deliberately the narrowest thing that makes a set run possible:
104
+
105
+ ```
106
+ SET-SCOPED AUTONOMY IS BOUNDED BY THE ENUMERATION THE USER SAW.
107
+ A MEMBER ON THE ACCEPTED LIST IS CONTINUATION. ANYTHING ELSE IS A NEW TASK,
108
+ AND `NEW TASK → FRESH CONFIRMATION` APPLIES TO IT VERBATIM.
109
+ THE SET IS CLOSED AT ACCEPT TIME AND NEVER GROWS DURING THE RUN.
110
+ ```
111
+
112
+ Four conditions, all of which must hold before a run may claim set scope. They
113
+ exist because "a set" is exactly the phrasing under which an unbounded backlog
114
+ could be smuggled in as one authorization:
115
+
116
+ 1. **Enumerated before Accept.** Every member is printed on the contract screen
117
+ — name, branch, and its own artifact count. A set the user did not read is
118
+ not a set they authorized.
119
+ 2. **Closed.** The list cannot grow after Accept. A roadmap discovered mid-run
120
+ is a new task, not a late set member; it waits.
121
+ 3. **Ordered, with independence declared.** The contract states the order and
122
+ which members carry no declared dependency, because that is what decides
123
+ whether the loop may continue past a failure (see
124
+ [`roadmap-process-loop § 3d`](roadmap-process-loop.md)).
125
+ 4. **One contract, one Accept.** Set scope is granted by the same single Accept
126
+ as any other mode. It is never inferred from the fact that several roadmaps
127
+ happen to be open.
128
+
129
+ What set scope does **not** touch: the Hard Floor, the locked decision classes,
130
+ the kernel-edit soak, and every
131
+ [`scope-control`](../../rules/scope-control.md) gate. It removes the *re-ask
132
+ between listed members* and nothing else — a set run that reaches a Hard-Floor
133
+ action stops there exactly as a single-task run would.
134
+
135
+
101
136
  When the user later issues a **new** request — different ticket, different roadmap, different artifact, different feature — treat it as a fresh task. Re-confirm autonomy for the new scope before:
102
137
 
103
138
  - creating a branch / worktree / PR / tag for the new work,