@event4u/agent-config 16.4.0 → 17.0.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 (1052) hide show
  1. package/.augment-plugin/marketplace.json +3 -3
  2. package/.augment-plugin/plugin.json +1 -1
  3. package/.claude-plugin/marketplace.json +2 -2
  4. package/.claude-plugin/skills/install-agent-config/SKILL.md +4 -4
  5. package/CHANGELOG.md +483 -669
  6. package/CONTRIBUTING.md +47 -0
  7. package/README.md +25 -25
  8. package/dist/agent-src/commands/{design.md → agent-design.md} +11 -7
  9. package/dist/agent-src/commands/agents/init.md +66 -3
  10. package/dist/agent-src/commands/agents/user/init.md +3 -0
  11. package/dist/agent-src/commands/{optimize/deep.md → analyze/and-optimize.md} +72 -33
  12. package/dist/agent-src/commands/analyze/inbox.md +168 -37
  13. package/dist/agent-src/commands/analyze/pr.md +144 -0
  14. package/dist/agent-src/commands/analyze/{repo.md → reference.md} +85 -14
  15. package/dist/agent-src/commands/analyze/roadmap-repos.md +19 -10
  16. package/dist/agent-src/commands/analyze.md +28 -12
  17. package/dist/agent-src/commands/audit.md +115 -0
  18. package/dist/agent-src/commands/brand/review.md +13 -2
  19. package/dist/agent-src/commands/brand/tokens.md +3 -3
  20. package/dist/agent-src/commands/brand/voice.md +8 -5
  21. package/dist/agent-src/commands/brand.md +2 -2
  22. package/dist/agent-src/commands/challenge-me/closure.md +25 -0
  23. package/dist/agent-src/commands/design-system/import.md +8 -3
  24. package/dist/agent-src/commands/design-system/sync.md +98 -0
  25. package/dist/agent-src/commands/design-system.md +6 -1
  26. package/dist/agent-src/commands/evals/analyze.json +44 -0
  27. package/dist/agent-src/commands/evals/audit.json +12 -0
  28. package/dist/agent-src/commands/evals/retro.json +12 -0
  29. package/dist/agent-src/commands/fix/ci.md +10 -8
  30. package/dist/agent-src/commands/ghostwriter/write.md +22 -0
  31. package/dist/agent-src/commands/memory/learn-low-impact.md +70 -83
  32. package/dist/agent-src/commands/memory/propose.md +12 -0
  33. package/dist/agent-src/commands/memory.md +1 -1
  34. package/dist/agent-src/commands/optimize.md +4 -3
  35. package/dist/agent-src/commands/post-as/me.md +18 -0
  36. package/dist/agent-src/commands/pr/create.md +17 -342
  37. package/dist/agent-src/commands/pr/merge.md +129 -368
  38. package/dist/agent-src/commands/retro.md +121 -0
  39. package/dist/agent-src/commands/review/routing.md +1 -1
  40. package/dist/agent-src/commands/roadmap/next.md +4 -1
  41. package/dist/agent-src/commands/roadmap/process-full.md +46 -333
  42. package/dist/agent-src/commands/roadmap/triage-parked.md +6 -2
  43. package/dist/agent-src/commands/team-knowledge/consolidate.md +2 -2
  44. package/dist/agent-src/commands/team-knowledge.md +1 -1
  45. package/dist/agent-src/commands/threat-model.md +1 -1
  46. package/dist/agent-src/commands/upstream-contribute.md +91 -101
  47. package/dist/agent-src/commands/worktree/cleanup.md +18 -11
  48. package/dist/agent-src/contexts/contracts/consumer-agents-md-guide.md +54 -0
  49. package/dist/agent-src/contexts/execution/analysis-loop.md +137 -0
  50. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +3 -3
  51. package/dist/agent-src/contexts/execution/decision-closure-execution.md +1 -1
  52. package/dist/agent-src/contexts/execution/host-capability-manifest.md +6 -0
  53. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +11 -4
  54. package/dist/agent-src/contexts/execution/pr-create-branches-content.md +250 -0
  55. package/dist/agent-src/contexts/execution/pr-create-branches-freshness.md +150 -0
  56. package/dist/agent-src/contexts/execution/pr-merge-queue.md +287 -0
  57. package/dist/agent-src/contexts/execution/pr-merge-sync.md +276 -0
  58. package/dist/agent-src/contexts/execution/pr-merge-trust-boundary.md +69 -0
  59. package/dist/agent-src/contexts/execution/process-full-all.md +233 -0
  60. package/dist/agent-src/contexts/execution/process-full-delivery.md +231 -0
  61. package/dist/agent-src/contexts/execution/roadmap-execution-contract-branches.md +42 -0
  62. package/dist/agent-src/contexts/execution/roadmap-execution-contract.md +1 -35
  63. package/dist/agent-src/contexts/execution/roadmap-process-loop-close.md +235 -0
  64. package/dist/agent-src/contexts/execution/roadmap-process-loop-prescan.md +216 -0
  65. package/dist/agent-src/contexts/execution/roadmap-process-loop-run.md +253 -0
  66. package/dist/agent-src/contexts/execution/roadmap-process-loop-set.md +212 -0
  67. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +25 -864
  68. package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +14 -2
  69. package/dist/agent-src/contexts/execution/subagent-steering.md +65 -8
  70. package/dist/agent-src/contexts/model-recommendations.md +5 -5
  71. package/dist/agent-src/contexts/subagent-configuration.md +1 -1
  72. package/dist/agent-src/guidelines/agent-infra/api-cost-levers.md +4 -3
  73. package/dist/agent-src/guidelines/agent-infra/model-recommendation.md +11 -5
  74. package/dist/agent-src/guidelines/agent-infra/rule-body-migration-inventory.md +1 -1
  75. package/dist/agent-src/guidelines/agent-infra/self-improvement-pipeline.md +47 -24
  76. package/dist/agent-src/guidelines/design-antipatterns.md +6 -1
  77. package/dist/agent-src/guidelines/design-asset-discipline.md +17 -0
  78. package/dist/agent-src/guidelines/design-fidelity-routing.md +1 -0
  79. package/dist/agent-src/guidelines/php/api-design.md +10 -1
  80. package/dist/agent-src/rules/brand-source-of-truth.md +7 -6
  81. package/dist/agent-src/rules/code-provenance.md +1 -1
  82. package/dist/agent-src/rules/context-hygiene.md +0 -1
  83. package/dist/agent-src/rules/design-fidelity.md +12 -13
  84. package/dist/agent-src/rules/external-reference-deep-dive.md +2 -2
  85. package/dist/agent-src/rules/fix-what-you-see.md +1 -1
  86. package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +14 -15
  87. package/dist/agent-src/rules/missing-skill-recovery.md +12 -11
  88. package/dist/agent-src/rules/neighbour-precedence.md +1 -1
  89. package/dist/agent-src/rules/recurring-criticism.md +1 -1
  90. package/dist/agent-src/rules/roadmap-ci-steps-policy.md +0 -2
  91. package/dist/agent-src/rules/self-repair-loop.md +2 -2
  92. package/dist/agent-src/rules/token-budget-discipline.md +2 -2
  93. package/dist/agent-src/scripts/dashboard_mode.ts +4 -1
  94. package/dist/agent-src/scripts/roadmap_age.ts +175 -0
  95. package/dist/agent-src/scripts/update_roadmap_progress.ts +10 -2
  96. package/dist/agent-src/skills/accessibility-auditor/SKILL.md +3 -3
  97. package/dist/agent-src/skills/accessibility-auditor/data/aria-patterns.csv +2 -0
  98. package/dist/agent-src/skills/accessibility-auditor/data/manifest.json +3 -3
  99. package/dist/agent-src/skills/agent-security-review/SKILL.md +2 -2
  100. package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +12 -4
  101. package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +7 -0
  102. package/dist/agent-src/skills/ai-council/references/advanced-modes.md +11 -1
  103. package/dist/agent-src/skills/ai-council/references/cost-and-redaction.md +7 -0
  104. package/dist/agent-src/skills/ai-council/references/execution-modes.md +7 -0
  105. package/dist/agent-src/skills/ai-council/references/output-and-synthesis.md +19 -0
  106. package/dist/agent-src/skills/ai-council/references/procedure.md +7 -0
  107. package/dist/agent-src/skills/api-design/SKILL.md +2 -2
  108. package/dist/agent-src/skills/api-endpoint/SKILL.md +2 -2
  109. package/dist/agent-src/skills/authz-review/SKILL.md +5 -3
  110. package/dist/agent-src/skills/blade-ui/SKILL.md +2 -2
  111. package/dist/agent-src/skills/brand/SKILL.md +7 -3
  112. package/dist/agent-src/skills/brand-asset-generation/SKILL.md +13 -6
  113. package/dist/agent-src/skills/brand-audit/SKILL.md +2 -1
  114. package/dist/agent-src/skills/brand-identity/SKILL.md +5 -4
  115. package/dist/agent-src/skills/brand-strategy/SKILL.md +5 -4
  116. package/dist/agent-src/skills/brand-to-tokens/SKILL.md +18 -39
  117. package/dist/agent-src/skills/brand-to-tokens/templates/marp-brand-deck.md.example +2 -2
  118. package/dist/agent-src/skills/brand-to-tokens/templates/reveal-brand-deck.yaml +2 -2
  119. package/dist/agent-src/skills/canvas-design/SKILL.md +16 -4
  120. package/dist/agent-src/skills/competitive-positioning/SKILL.md +2 -2
  121. package/dist/agent-src/skills/composer-packages/SKILL.md +18 -0
  122. package/dist/agent-src/skills/condense-memory/SKILL.md +1 -1
  123. package/dist/agent-src/skills/content-funnel-design/SKILL.md +8 -1
  124. package/dist/agent-src/skills/context-authoring/SKILL.md +1 -1
  125. package/dist/agent-src/skills/context-document/SKILL.md +2 -2
  126. package/dist/agent-src/skills/corpus-grounding/SKILL.md +6 -6
  127. package/dist/agent-src/skills/corpus-grounding/scripts/decision_engine.ts +13 -11
  128. package/dist/agent-src/skills/corpus-grounding/scripts/ground.mjs +1706 -0
  129. package/dist/agent-src/skills/corpus-grounding/scripts/schema_validator.ts +7 -1
  130. package/dist/agent-src/skills/dashboard-design/SKILL.md +1 -1
  131. package/dist/agent-src/skills/data-flow-mapper/SKILL.md +5 -2
  132. package/dist/agent-src/skills/database/SKILL.md +5 -4
  133. package/dist/agent-src/skills/decision-record/references/weighted-matrix.md +12 -0
  134. package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +1 -1
  135. package/dist/agent-src/skills/dependency-upgrade/SKILL.md +61 -11
  136. package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
  137. package/dist/agent-src/skills/design-intelligence/SKILL.md +1 -1
  138. package/dist/agent-src/skills/design-intelligence/data/landing.csv +1 -1
  139. package/dist/agent-src/skills/design-intelligence/references/context-and-registers.md +10 -2
  140. package/dist/agent-src/skills/design-intelligence/references/design-languages.md +1 -1
  141. package/dist/agent-src/skills/design-intelligence/references/design-rules-checklist.md +4 -3
  142. package/dist/agent-src/skills/design-intelligence/references/integration-mapping.md +25 -22
  143. package/dist/agent-src/skills/{wireframe → design-review}/references/story-beat-ledger.schema.json +1 -1
  144. package/dist/agent-src/skills/design-review/references/verification-automation.md +11 -3
  145. package/dist/agent-src/skills/design-system-capture/SKILL.md +15 -10
  146. package/dist/agent-src/skills/design-system-capture/references/design-system-json.md +20 -5
  147. package/dist/agent-src/skills/design-system-capture/references/import-procedure.md +2 -2
  148. package/dist/agent-src/skills/design-tokens/SKILL.md +23 -23
  149. package/dist/agent-src/skills/design-tokens/scripts/tokens.mjs +1037 -0
  150. package/dist/agent-src/skills/design-tokens/scripts/tokens.ts +336 -13
  151. package/dist/agent-src/skills/design-tokens/templates/design-tokens-starter.json +52 -53
  152. package/dist/agent-src/skills/docker/SKILL.md +1 -1
  153. package/dist/agent-src/skills/estimate-ticket/SKILL.md +1 -1
  154. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +14 -276
  155. package/dist/agent-src/skills/existing-ui-audit/procedure.yaml +44 -0
  156. package/dist/agent-src/skills/existing-ui-audit/references/anti-slop-cross-reference.md +1 -1
  157. package/dist/agent-src/skills/existing-ui-audit/references/steps/00-inspect-stack-and-input.md +4 -0
  158. package/dist/agent-src/skills/existing-ui-audit/references/steps/01-enumerate-components.md +26 -0
  159. package/dist/agent-src/skills/existing-ui-audit/references/steps/01b-detect-component-taxonomy.md +7 -0
  160. package/dist/agent-src/skills/existing-ui-audit/references/steps/02-identify-design-system.md +12 -0
  161. package/dist/agent-src/skills/existing-ui-audit/references/steps/03-detect-design-tokens.md +35 -0
  162. package/dist/agent-src/skills/existing-ui-audit/references/steps/04-detect-shadcn-inventory.md +13 -0
  163. package/dist/agent-src/skills/existing-ui-audit/references/steps/04b-live-storybook-read.md +26 -0
  164. package/dist/agent-src/skills/existing-ui-audit/references/steps/05-list-reusable-patterns.md +14 -0
  165. package/dist/agent-src/skills/existing-ui-audit/references/steps/06-match-candidates.md +52 -0
  166. package/dist/agent-src/skills/existing-ui-audit/references/steps/07-greenfield-branch.md +29 -0
  167. package/dist/agent-src/skills/existing-ui-audit/references/steps/08-a11y-baseline.md +40 -0
  168. package/dist/agent-src/skills/existing-ui-audit/references/steps/09-validate-and-write.md +5 -0
  169. package/dist/agent-src/skills/experiment-loop/SKILL.md +1 -1
  170. package/dist/agent-src/skills/fe-design/references/design-patterns.md +65 -4
  171. package/dist/agent-src/skills/fe-design/references/design-read-and-memory.md +1 -1
  172. package/dist/agent-src/skills/fe-design/references/source-led-port.md +1 -1
  173. package/dist/agent-src/skills/finishing-a-development-branch/SKILL.md +6 -6
  174. package/dist/agent-src/skills/flux/SKILL.md +1 -1
  175. package/dist/agent-src/skills/form-handler/SKILL.md +15 -2
  176. package/dist/agent-src/skills/frontend-render-security/SKILL.md +9 -0
  177. package/dist/agent-src/skills/git-workflow/SKILL.md +2 -2
  178. package/dist/agent-src/skills/git-workflow/references/branch-update.md +7 -0
  179. package/dist/agent-src/skills/git-workflow/references/commit-subject.md +12 -0
  180. package/dist/agent-src/skills/git-workflow/references/push-closes-its-loop.md +10 -0
  181. package/dist/agent-src/skills/gtm-launch/SKILL.md +8 -1
  182. package/dist/agent-src/skills/html-deck/SKILL.md +7 -2
  183. package/dist/agent-src/skills/humanizer/SKILL.md +16 -3
  184. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +13 -1
  185. package/dist/agent-src/skills/humanizer/references/fixtures.md +8 -0
  186. package/dist/agent-src/skills/iconography/SKILL.md +4 -2
  187. package/dist/agent-src/skills/image-provider-routing/SKILL.md +16 -5
  188. package/dist/agent-src/skills/js-library-packaging/SKILL.md +5 -4
  189. package/dist/agent-src/skills/js-library-packaging/scripts/check_package_surface.mjs +197 -0
  190. package/dist/agent-src/skills/judge-artifact-completeness/SKILL.md +1 -1
  191. package/dist/agent-src/skills/judge-security-auditor/SKILL.md +2 -2
  192. package/dist/agent-src/skills/launch-readiness/SKILL.md +18 -22
  193. package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +5 -5
  194. package/dist/agent-src/skills/livewire/SKILL.md +1 -1
  195. package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +18 -0
  196. package/dist/agent-src/skills/logo-generation/SKILL.md +21 -11
  197. package/dist/agent-src/skills/market-entry-analysis/SKILL.md +6 -1
  198. package/dist/agent-src/skills/markitdown/SKILL.md +1 -1
  199. package/dist/agent-src/skills/memory-consolidation/SKILL.md +2 -2
  200. package/dist/agent-src/skills/messaging-architecture/SKILL.md +8 -1
  201. package/dist/agent-src/skills/motion-choreographer/SKILL.md +2 -2
  202. package/dist/agent-src/skills/playwright-testing/SKILL.md +2 -0
  203. package/dist/agent-src/skills/positioning-strategy/SKILL.md +10 -2
  204. package/dist/agent-src/skills/prediction-pool-optimizer/references/ev-fixtures.md +13 -0
  205. package/dist/agent-src/skills/prediction-pool-optimizer/references/odds-and-bonus.md +7 -0
  206. package/dist/agent-src/skills/project-analysis-core/SKILL.md +1 -1
  207. package/dist/agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +1 -1
  208. package/dist/agent-src/skills/project-analyzer/SKILL.md +14 -75
  209. package/dist/agent-src/skills/project-analyzer/procedure.yaml +39 -0
  210. package/dist/agent-src/skills/project-analyzer/references/steps/01-project-overview.md +9 -0
  211. package/dist/agent-src/skills/project-analyzer/references/steps/02-architecture.md +7 -0
  212. package/dist/agent-src/skills/project-analyzer/references/steps/03-data-layer.md +6 -0
  213. package/dist/agent-src/skills/project-analyzer/references/steps/04-business-domains.md +7 -0
  214. package/dist/agent-src/skills/project-analyzer/references/steps/05-api-surface.md +6 -0
  215. package/dist/agent-src/skills/project-analyzer/references/steps/06-service-map.md +6 -0
  216. package/dist/agent-src/skills/project-analyzer/references/steps/07-module-inventory.md +6 -0
  217. package/dist/agent-src/skills/project-analyzer/references/steps/08-infrastructure-and-testing.md +5 -0
  218. package/dist/agent-src/skills/project-analyzer/references/steps/09-agent-docs-audit.md +6 -0
  219. package/dist/agent-src/skills/project-analyzer/references/steps/10-gap-analysis.md +6 -0
  220. package/dist/agent-src/skills/quality-tools/references/js-ts-tools.md +10 -0
  221. package/dist/agent-src/skills/quality-tools/references/php-tools.md +13 -0
  222. package/dist/agent-src/skills/quality-tools/references/python-tools.md +11 -0
  223. package/dist/agent-src/skills/react-native-setup/SKILL.md +7 -2
  224. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +5 -1
  225. package/dist/agent-src/skills/react-shadcn-ui/references/registry.md +13 -0
  226. package/dist/agent-src/skills/react-shadcn-ui/scripts/shadcn_add.mjs +315 -0
  227. package/dist/agent-src/skills/react-shadcn-ui/scripts/shadcn_add.ts +6 -6
  228. package/dist/agent-src/skills/receiving-code-review/SKILL.md +1 -1
  229. package/dist/agent-src/skills/refine-ticket/SKILL.md +2 -2
  230. package/dist/agent-src/skills/release-comms/SKILL.md +2 -1
  231. package/dist/agent-src/skills/repomix-packer/SKILL.md +2 -2
  232. package/dist/agent-src/skills/requesting-code-review/SKILL.md +3 -3
  233. package/dist/agent-src/skills/roadmap-management/references/archival.md +3 -3
  234. package/dist/agent-src/skills/roadmap-management/references/authoring.md +9 -2
  235. package/dist/agent-src/skills/roadmap-management/references/dashboard.md +3 -3
  236. package/dist/agent-src/skills/roadmap-management/references/lifecycle.md +3 -3
  237. package/dist/agent-src/skills/roadmap-writing/SKILL.md +4 -4
  238. package/dist/agent-src/skills/rtk-output-filtering/SKILL.md +1 -1
  239. package/dist/agent-src/skills/rule-writing/SKILL.md +1 -2
  240. package/dist/agent-src/skills/security/SKILL.md +41 -5
  241. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +5 -3
  242. package/dist/agent-src/skills/skill-reviewer/SKILL.md +1 -1
  243. package/dist/agent-src/skills/skill-writing/SKILL.md +23 -8
  244. package/dist/agent-src/skills/skill-writing/references/section-patterns.md +19 -1
  245. package/dist/agent-src/skills/source-discovery/SKILL.md +3 -3
  246. package/dist/agent-src/skills/sql-writing/SKILL.md +2 -2
  247. package/dist/agent-src/skills/standards-from-config/SKILL.md +2 -2
  248. package/dist/agent-src/skills/storybook-workshop/SKILL.md +5 -0
  249. package/dist/agent-src/skills/storybook-workshop/scripts/story_contrast_floor.mjs +99 -0
  250. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +13 -13
  251. package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +4 -3
  252. package/dist/agent-src/skills/svg-authoring/SKILL.md +324 -0
  253. package/dist/agent-src/skills/systematic-debugging/SKILL.md +2 -2
  254. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +8 -3
  255. package/dist/agent-src/skills/tailwind-engineer/scripts/tailwind_config_gen.mjs +482 -0
  256. package/dist/agent-src/skills/test-case-discovery/SKILL.md +1 -1
  257. package/dist/agent-src/skills/threat-modeling/SKILL.md +8 -1
  258. package/dist/agent-src/skills/threat-modeling/data/manifest.json +5 -2
  259. package/dist/agent-src/skills/threat-modeling/data/reasoning.csv +10 -10
  260. package/dist/agent-src/skills/threat-modeling/data/surfaces.csv +11 -10
  261. package/dist/agent-src/skills/threat-modeling/data/threats.csv +34 -20
  262. package/dist/agent-src/skills/type-design/SKILL.md +196 -0
  263. package/dist/agent-src/skills/type-design/references/font-spec.md +90 -0
  264. package/dist/agent-src/skills/type-design/references/gates.md +113 -0
  265. package/dist/agent-src/skills/type-design/references/toolchain.md +66 -0
  266. package/dist/agent-src/skills/typography-system/SKILL.md +21 -11
  267. package/dist/agent-src/skills/typography-system/references/worked-scales.md +85 -0
  268. package/dist/agent-src/skills/ui-apply-generic/SKILL.md +1 -1
  269. package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  270. package/dist/agent-src/skills/upstream-contribute/SKILL.md +120 -125
  271. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +1 -0
  272. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +1 -1
  273. package/dist/agent-src/skills/voice-and-tone-design/SKILL.md +71 -2
  274. package/dist/agent-src/skills/wireframe/SKILL.md +5 -2
  275. package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +16 -14
  276. package/dist/agent-src/templates/AGENTS.md +1 -1
  277. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  278. package/dist/agent-src/templates/agents/proposal.example.md +1 -1
  279. package/dist/agent-src/templates/github-workflows/advisories-daily.yml +85 -0
  280. package/dist/agent-src/templates/roadmaps.md +39 -1
  281. package/dist/agent-src/templates/scripts/check_memory.ts +2 -2
  282. package/dist/agent-src/templates/scripts/historical-bug-patterns.example.yml +13 -1
  283. package/dist/agent-src/templates/scripts/work_engine/cli.ts +17 -0
  284. package/dist/agent-src/templates/scripts/work_engine/cli_args.ts +10 -0
  285. package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +22 -13
  286. package/dist/agent-src/templates/scripts/work_engine/dispatcher.ts +18 -4
  287. package/dist/agent-src/templates/scripts/work_engine/procedure/checks.ts +283 -0
  288. package/dist/agent-src/templates/scripts/work_engine/procedure/run.ts +432 -0
  289. package/dist/agent-src/templates/scripts/work_engine/procedure/sidecar.ts +185 -0
  290. package/dist/agent-src/templates/scripts/work_engine/state.ts +3 -0
  291. package/dist/cli/commands/uiRender.js +265 -13
  292. package/dist/cli/commands/uiRenderAsset.js +1316 -0
  293. package/dist/cli/commands/uiRenderAssetCompare.js +752 -0
  294. package/dist/cli/commands/uiRenderAssetFonts.js +158 -0
  295. package/dist/cli/commands/uiRenderAssetGrid.js +265 -0
  296. package/dist/cli/commands/uiRenderAssetGrounds.js +323 -0
  297. package/dist/cli/commands/uiRenderAssetIsolation.js +85 -0
  298. package/dist/cli/commands/uiRenderAssetTypes.js +133 -0
  299. package/dist/cli/initRouting.js +1 -1
  300. package/dist/cli/main.js +47 -1
  301. package/dist/cli/mcp/dispatch.js +31 -9
  302. package/dist/cli/python/knowledge_ingest.js +7 -39
  303. package/dist/cli/python/workspace_secrets.js +4 -177
  304. package/dist/cli/registry.js +5 -2
  305. package/dist/cli-delegate/archive_completed_roadmaps.js +3 -2
  306. package/dist/cli-delegate/check_update_banner.js +635 -266
  307. package/dist/cli-delegate/{chunk-AED2VQGM.js → chunk-2CX7NWRB.js} +233 -437
  308. package/dist/cli-delegate/{chunk-F3QDG2GT.js → chunk-2SFOOFJJ.js} +259 -159
  309. package/dist/cli-delegate/chunk-2Y5AMLMY.js +136 -0
  310. package/dist/cli-delegate/{chunk-OKJUIAPS.js → chunk-4E2W63DA.js} +1 -62
  311. package/dist/cli-delegate/{chunk-6SRJTYJS.js → chunk-4SHNERBL.js} +37 -16
  312. package/dist/cli-delegate/chunk-5VO3RTMV.js +208 -0
  313. package/dist/cli-delegate/chunk-6E2LDY4F.js +27 -0
  314. package/dist/cli-delegate/{chunk-XQTPXKFA.js → chunk-6ZD2QZMN.js} +8 -17
  315. package/dist/cli-delegate/{chunk-6V5FMA3P.js → chunk-7CEI2YPS.js} +1 -1
  316. package/dist/cli-delegate/{chunk-DMSZHXZS.js → chunk-7DRWULEQ.js} +80 -7
  317. package/dist/cli-delegate/chunk-7NXCZSDL.js +54 -0
  318. package/dist/cli-delegate/chunk-AX3U3UWJ.js +328 -0
  319. package/dist/cli-delegate/{chunk-WOKWX5PL.js → chunk-BKALSTBZ.js} +18 -3
  320. package/dist/cli-delegate/chunk-BMGUGSY6.js +103 -0
  321. package/dist/cli-delegate/chunk-BYV46VRM.js +3309 -0
  322. package/dist/cli-delegate/{chunk-5GPULQBE.js → chunk-CAL76ADI.js} +4215 -682
  323. package/dist/cli-delegate/chunk-DSY6LLCQ.js +127 -0
  324. package/dist/cli-delegate/chunk-E6XNBVE4.js +581 -0
  325. package/dist/cli-delegate/{chunk-ZUZKZYCN.js → chunk-ESUNQ5XR.js} +46 -10
  326. package/dist/cli-delegate/{chunk-G5VVIZRC.js → chunk-F7HLSW6P.js} +1 -1
  327. package/dist/cli-delegate/chunk-FIEEOH5C.js +133 -0
  328. package/dist/cli-delegate/chunk-FKYZOWVD.js +719 -0
  329. package/dist/cli-delegate/chunk-GOMILC3O.js +918 -0
  330. package/dist/cli-delegate/chunk-I4KJYVPB.js +69 -0
  331. package/dist/cli-delegate/{chunk-JQOM7TTM.js → chunk-IDAOTDPE.js} +1 -100
  332. package/dist/cli-delegate/chunk-IROAQ77A.js +137 -0
  333. package/dist/cli-delegate/chunk-J2SJZICO.js +698 -0
  334. package/dist/cli-delegate/{chunk-6YQC2HLF.js → chunk-JHMMWNJ2.js} +54 -40
  335. package/dist/cli-delegate/{chunk-WQWXGIWB.js → chunk-M6CRG5O6.js} +165 -15
  336. package/dist/cli-delegate/{chunk-PHD7OOLE.js → chunk-MQ2UDEGV.js} +14 -3
  337. package/dist/cli-delegate/chunk-NTM7G2V4.js +220 -0
  338. package/dist/cli-delegate/chunk-PV7S5DPJ.js +175 -0
  339. package/dist/cli-delegate/{chunk-F7DQWYR5.js → chunk-RAXQOETZ.js} +6 -2
  340. package/dist/cli-delegate/{chunk-T7XSJSUQ.js → chunk-SIOMDAKL.js} +980 -784
  341. package/dist/cli-delegate/{chunk-KR6EM23A.js → chunk-TULVDQ4L.js} +3 -48
  342. package/dist/cli-delegate/chunk-UUYEKXKR.js +20 -0
  343. package/dist/cli-delegate/{chunk-7XGD2OEU.js → chunk-UXWHY6CQ.js} +2 -1
  344. package/dist/cli-delegate/{chunk-PWX7CKMD.js → chunk-VC3ECUEK.js} +1 -1
  345. package/dist/cli-delegate/{chunk-KXXWJTDO.js → chunk-WMNYVIYX.js} +1 -1
  346. package/dist/cli-delegate/chunk-XCY5KKUC.js +181 -0
  347. package/dist/cli-delegate/{chunk-H76PHZBI.js → chunk-XLY5G3CM.js} +14 -19
  348. package/dist/cli-delegate/cmd_adr_effective.js +41 -2
  349. package/dist/cli-delegate/cmd_analyze_session.js +7 -7
  350. package/dist/cli-delegate/cmd_brand_status.js +1287 -10
  351. package/dist/cli-delegate/cmd_ci_settle.js +330 -0
  352. package/dist/cli-delegate/cmd_conformance.js +669 -822
  353. package/dist/cli-delegate/cmd_doctor.js +26 -16
  354. package/dist/cli-delegate/cmd_doctor_neighbours.js +10 -7
  355. package/dist/cli-delegate/cmd_explain.js +9 -24
  356. package/dist/cli-delegate/cmd_export.js +14 -11
  357. package/dist/cli-delegate/cmd_fleet.js +5 -3
  358. package/dist/cli-delegate/cmd_git_convention.js +8 -4
  359. package/dist/cli-delegate/cmd_handoff.js +79 -242
  360. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  361. package/dist/cli-delegate/cmd_memory_get.js +4 -2
  362. package/dist/cli-delegate/cmd_migrate.js +2 -2
  363. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  364. package/dist/cli-delegate/cmd_preflight.js +7 -5
  365. package/dist/cli-delegate/cmd_prune.js +16 -13
  366. package/dist/cli-delegate/cmd_route_audit.js +11 -8
  367. package/dist/cli-delegate/cmd_route_explain.js +649 -16
  368. package/dist/cli-delegate/cmd_session_recycle.js +15 -6
  369. package/dist/cli-delegate/cmd_settings_check.js +2 -2
  370. package/dist/cli-delegate/cmd_settings_get.js +1 -1
  371. package/dist/cli-delegate/cmd_settings_migrate.js +14 -11
  372. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  373. package/dist/cli-delegate/cmd_sync.js +16 -13
  374. package/dist/cli-delegate/cmd_uninstall.js +185 -31
  375. package/dist/cli-delegate/cmd_update.js +67 -3
  376. package/dist/cli-delegate/cmd_upgrade.js +38 -7
  377. package/dist/cli-delegate/cmd_validate.js +16 -13
  378. package/dist/cli-delegate/cmd_versions.js +1 -1
  379. package/dist/cli-delegate/dashboard_mode.js +1 -1
  380. package/dist/cli-delegate/gate_execute.js +4 -3
  381. package/dist/cli-delegate/roadmap_age.js +22 -0
  382. package/dist/cli-delegate/roadmap_gates.js +4 -3
  383. package/dist/cli-delegate/update_roadmap_progress.js +3 -2
  384. package/dist/cli-delegate/upgrade_unattended-VVL6JLSX.js +541 -0
  385. package/dist/discovery/deprecation-report.md +1 -1
  386. package/dist/discovery/discovery-manifest.json +409 -201
  387. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  388. package/dist/discovery/discovery-manifest.summary.md +8 -8
  389. package/dist/discovery/dormancy-report.md +1 -1
  390. package/dist/discovery/orphan-report.md +1 -1
  391. package/dist/discovery/packs.json +36 -27
  392. package/dist/discovery/trust-report.md +3 -3
  393. package/dist/discovery/workspaces.json +25 -16
  394. package/dist/hooks/chat_history.chunk.cjs +6852 -0
  395. package/dist/hooks/chat_history.chunk.cjs.sha256 +1 -0
  396. package/dist/hooks/dispatch.js +17706 -18627
  397. package/dist/hooks/dispatch.sha256 +1 -1
  398. package/dist/hooks/egress_engine.chunk.cjs +915 -0
  399. package/dist/hooks/egress_engine.chunk.cjs.sha256 +1 -0
  400. package/dist/hooks/svg_rules.chunk.cjs +1858 -0
  401. package/dist/hooks/svg_rules.chunk.cjs.sha256 +1 -0
  402. package/dist/install/conflict.js +36 -6
  403. package/dist/install/conflictTracker.js +81 -7
  404. package/dist/install/detect.js +3 -3
  405. package/dist/install/hostPermissionsAdapter.js +106 -0
  406. package/dist/install/install.mjs +3117 -1949
  407. package/dist/install/installThinLayer.js +1 -1
  408. package/dist/install/manifestFiles.js +21 -0
  409. package/dist/install/noGoDenyRows.js +300 -0
  410. package/dist/install/noGoRules.js +368 -0
  411. package/dist/install/ownershipLedger.js +133 -0
  412. package/dist/install/plan.js +1 -1
  413. package/dist/install/preflight.js +39 -8
  414. package/dist/install/preserve.js +74 -12
  415. package/dist/install/recordedOwnership.js +88 -5
  416. package/dist/install/rule_scope.js +20 -3
  417. package/dist/install/stagedRuntime.js +455 -0
  418. package/dist/install/toolsArg.js +19 -0
  419. package/dist/install/userPin.js +47 -0
  420. package/dist/install/wizard-plan.js +26 -4
  421. package/dist/mcp/awesome-mcp-servers.row.md +1 -1
  422. package/dist/mcp/mcp-cloudflare-catalogue.json +3 -2
  423. package/dist/mcp/registry-manifest.json +6 -5
  424. package/dist/mcp/server.json +3 -3
  425. package/dist/mcp/server.mjs +9814 -5333
  426. package/dist/router.json +1 -1
  427. package/dist/scripts/_lib/agent_settings.js +7 -12
  428. package/dist/scripts/_lib/asset_render_record.js +219 -0
  429. package/dist/scripts/_lib/claude_builtin_names.js +9 -4
  430. package/dist/scripts/_lib/claude_settings_hooks.js +102 -34
  431. package/dist/scripts/_lib/egress_rules.js +766 -0
  432. package/dist/scripts/_lib/environment_detector.js +24 -33
  433. package/dist/scripts/_lib/global_deploy_inventory.js +146 -9
  434. package/dist/scripts/_lib/guidelines_lane.js +10 -1
  435. package/dist/scripts/_lib/identifier_redaction.js +24 -0
  436. package/dist/scripts/_lib/installed_layer.js +17 -0
  437. package/dist/scripts/_lib/installed_layer_normalise.js +72 -0
  438. package/dist/scripts/_lib/lean_projection_mode.js +34 -152
  439. package/dist/scripts/_lib/project_tree_form.js +118 -0
  440. package/dist/scripts/_lib/scan_scope.js +105 -0
  441. package/dist/scripts/_lib/scoped_projection.js +133 -3
  442. package/dist/scripts/_lib/settings_removed_keys.js +29 -0
  443. package/dist/scripts/_lib/settings_renamed_keys.js +17 -5
  444. package/dist/scripts/_lib/subagent_native_fields.js +35 -0
  445. package/dist/scripts/_lib/svg_dom.js +284 -0
  446. package/dist/scripts/_lib/svg_filled_counter.js +285 -0
  447. package/dist/scripts/_lib/svg_geometry.js +477 -0
  448. package/dist/scripts/_lib/svg_motion.js +179 -0
  449. package/dist/scripts/_lib/svg_rules.js +1339 -0
  450. package/dist/scripts/_lib/svg_urls.js +67 -0
  451. package/dist/scripts/_lib/ui_surface.js +19 -0
  452. package/dist/scripts/_lib/verification_command.js +364 -0
  453. package/dist/scripts/_lib/workspace_secrets.js +229 -0
  454. package/dist/scripts/ai_council/seat_policy.js +27 -0
  455. package/dist/scripts/ai_council/transport_resolver.js +9 -10
  456. package/dist/scripts/condense.js +25 -29
  457. package/dist/scripts/lint_svg_asset.js +324 -0
  458. package/dist/server/io/substituteTemplate.js +2 -2
  459. package/dist/server/io/yamlIO.js +2 -2
  460. package/dist/server/routes/install.js +5 -1
  461. package/dist/server/routes/settings.js +2 -2
  462. package/dist/server/routes/wizard.js +1 -1
  463. package/dist/server/schemas/settings.js +22 -16
  464. package/dist/server/serverInfo.js +1 -1
  465. package/dist/shared/brandTokenDocument.js +47 -0
  466. package/dist/shared/brandTokenPaths.js +43 -0
  467. package/dist/shared/settingsCarveOut.js +0 -7
  468. package/dist/shared/skillRanking.js +103 -5
  469. package/dist/shared/userMd/formAdapter.js +16 -0
  470. package/dist/shared/userMd/schema.js +17 -0
  471. package/dist/ui/assets/index-w70Ado09.js +23 -0
  472. package/dist/ui/index.html +1 -1
  473. package/docs/MIGRATION.md +89 -2
  474. package/docs/THIRD-PARTY-NOTICES.md +27 -0
  475. package/docs/contracts/settings-classes.md +27 -9
  476. package/docs/guidelines/agent-infra/api-cost-levers.md +4 -3
  477. package/docs/guidelines/agent-infra/model-recommendation.md +11 -5
  478. package/docs/guidelines/agent-infra/rule-body-migration-inventory.md +1 -1
  479. package/docs/guidelines/agent-infra/self-improvement-pipeline.md +47 -24
  480. package/docs/guidelines/design-antipatterns.md +6 -1
  481. package/docs/guidelines/design-asset-discipline.md +17 -0
  482. package/docs/guidelines/design-fidelity-routing.md +1 -0
  483. package/docs/guidelines/php/api-design.md +10 -1
  484. package/llms.txt +12 -10
  485. package/package.json +15 -5
  486. package/src/agent-src/scripts/dashboard_mode.ts +4 -1
  487. package/src/agent-src/scripts/roadmap_age.ts +175 -0
  488. package/src/agent-src/scripts/update_roadmap_progress.ts +10 -2
  489. package/src/agent-src/templates/AGENTS.md +1 -1
  490. package/src/agent-src/templates/scripts/check_memory.ts +2 -2
  491. package/src/agent-src/templates/scripts/historical-bug-patterns.example.yml +13 -1
  492. package/src/agent-src/templates/scripts/work_engine/cli.ts +17 -0
  493. package/src/agent-src/templates/scripts/work_engine/cli_args.ts +10 -0
  494. package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +22 -13
  495. package/src/agent-src/templates/scripts/work_engine/dispatcher.ts +18 -4
  496. package/src/agent-src/templates/scripts/work_engine/procedure/checks.ts +283 -0
  497. package/src/agent-src/templates/scripts/work_engine/procedure/run.ts +432 -0
  498. package/src/agent-src/templates/scripts/work_engine/procedure/sidecar.ts +185 -0
  499. package/src/agent-src/templates/scripts/work_engine/state.ts +3 -0
  500. package/src/config/agent-settings.template.yml +120 -57
  501. package/src/config/agents-paths.yml +13 -7
  502. package/src/config/ci-local-parity.yml +44 -0
  503. package/src/config/continuity-surface.json +51 -2
  504. package/src/config/depth-audit-samples.json +5 -0
  505. package/src/config/discovery/command-verbs.yml +1 -0
  506. package/src/config/dispatch-economy-metrics.json +1 -0
  507. package/src/config/egress-mutations/class-precedence-swapped.json +7 -0
  508. package/src/config/egress-mutations/credential-token-restores.json +7 -0
  509. package/src/config/egress-mutations/iban-checksum-disabled.json +7 -0
  510. package/src/config/egress-mutations/raw-value-in-the-count-record.json +7 -0
  511. package/src/config/evaluator-budgets.json +4 -4
  512. package/src/config/gate-coverage.yml +149 -3
  513. package/src/config/gate-reachability-exemptions.json +3 -5
  514. package/src/config/gate-violation-baselines.json +29 -25
  515. package/src/config/gitignore-block.txt +6 -3
  516. package/src/config/hook-bundle-budget.json +34 -3
  517. package/src/config/hook-carrier-probes.json +30 -0
  518. package/src/config/hook-latency-budget.json +4 -2
  519. package/src/config/host-injection-effect.json +8 -1
  520. package/src/config/host-skill-frontmatter-keys.json +56 -0
  521. package/src/config/layer-form-brakes.json +4 -0
  522. package/src/config/layer-form-comparison-corpus.json +42 -0
  523. package/src/config/loop-surfaces.yaml +28 -47
  524. package/src/config/memory-twin-verdicts.yml +9 -1
  525. package/src/config/metric-registry.yml +40 -3
  526. package/src/config/pack-size-budget.json +15 -0
  527. package/src/config/procedure-core-budget.json +21 -0
  528. package/src/config/profiles/minimal.ini +1 -1
  529. package/src/config/project-tree-form.json +24 -0
  530. package/src/config/reach-channels.yml +3 -3
  531. package/src/config/reach-prescriptions-intake.yml +1 -1
  532. package/src/config/roadmap-step-size-baseline.json +118 -0
  533. package/src/config/routing-coverage-seed.json +100 -2
  534. package/src/config/skill-body-budget.json +686 -0
  535. package/src/config/skill-fork-pilot.json +17 -0
  536. package/src/config/skill-lifecycle-probes-codex.json +57 -0
  537. package/src/config/skill-lifecycle-probes.json +57 -0
  538. package/src/config/skill-output-shape.json +316 -0
  539. package/src/config/step-depth-table.json +58 -0
  540. package/src/config/turnaround-budget.json +90 -0
  541. package/src/install/conflict.ts +38 -6
  542. package/src/install/conflictTracker.ts +126 -8
  543. package/src/install/detect.ts +3 -3
  544. package/src/install/hostPermissionsAdapter.ts +136 -0
  545. package/src/install/installThinLayer.ts +6 -1
  546. package/src/install/manifestFiles.ts +24 -0
  547. package/src/install/noGoDenyRows.ts +368 -0
  548. package/src/install/noGoRules.ts +438 -0
  549. package/src/install/ownershipLedger.ts +180 -0
  550. package/src/install/plan.ts +1 -1
  551. package/src/install/preflight.ts +42 -10
  552. package/src/install/preserve.ts +94 -12
  553. package/src/install/recordedOwnership.ts +121 -3
  554. package/src/install/rule_scope.ts +20 -3
  555. package/src/install/stagedRuntime.ts +528 -0
  556. package/src/install/toolsArg.ts +16 -0
  557. package/src/install/types.ts +23 -2
  558. package/src/install/userPin.ts +54 -0
  559. package/src/install/wizard-plan.ts +25 -4
  560. package/src/scripts/_cli/_doctor_emit.ts +24 -0
  561. package/src/scripts/_cli/cmd_brand_status.ts +223 -12
  562. package/src/scripts/_cli/cmd_ci_settle.ts +32 -0
  563. package/src/scripts/_cli/cmd_doctor.ts +23 -44
  564. package/src/scripts/_cli/cmd_route_explain.ts +176 -2
  565. package/src/scripts/_cli/cmd_uninstall.ts +270 -26
  566. package/src/scripts/_cli/cmd_update.ts +34 -1
  567. package/src/scripts/_cli/cmd_upgrade.ts +38 -2
  568. package/src/scripts/_cli/detection_report.ts +7 -0
  569. package/src/scripts/_cli/doctor_execution.ts +1 -2
  570. package/src/scripts/_cli/doctor_install_mode.ts +39 -0
  571. package/src/scripts/_cli/doctor_network_posture.ts +3 -3
  572. package/src/scripts/_cli/doctor_ownership_ledger.ts +126 -0
  573. package/src/scripts/_cli/doctor_update_verdict.ts +104 -0
  574. package/src/scripts/_cli/explain_last/scrubber.ts +9 -21
  575. package/src/scripts/_cli/upgrade_unattended.ts +548 -0
  576. package/src/scripts/_dispatch.bash +42 -9
  577. package/src/scripts/_lib/activation_ladder.ts +1 -1
  578. package/src/scripts/_lib/advisory_inventory.ts +405 -0
  579. package/src/scripts/_lib/advisory_notice.ts +270 -0
  580. package/src/scripts/_lib/advisory_sources.ts +752 -0
  581. package/src/scripts/_lib/advisory_verdicts.ts +363 -0
  582. package/src/scripts/_lib/agent_artifact_location.ts +177 -0
  583. package/src/scripts/_lib/agent_settings.ts +7 -12
  584. package/src/scripts/_lib/arrival_record.ts +217 -0
  585. package/src/scripts/_lib/asset_render_record.ts +247 -0
  586. package/src/scripts/_lib/billing_grant.ts +4 -2
  587. package/src/scripts/_lib/brand_voice_slot.ts +258 -0
  588. package/src/scripts/_lib/canary_status.ts +24 -0
  589. package/src/scripts/_lib/cc_transcript.ts +276 -0
  590. package/src/scripts/_lib/changelog_eras.ts +83 -0
  591. package/src/scripts/_lib/claim_phrases.ts +71 -0
  592. package/src/scripts/_lib/classify_update.ts +171 -0
  593. package/src/scripts/_lib/claude_builtin_names.ts +9 -4
  594. package/src/scripts/_lib/claude_hook_scope.ts +195 -0
  595. package/src/scripts/_lib/claude_settings_hooks.ts +118 -34
  596. package/src/scripts/_lib/codex_resident_set.ts +460 -0
  597. package/src/scripts/_lib/codex_skill_finder.ts +225 -0
  598. package/src/scripts/_lib/confusables.ts +19 -0
  599. package/src/scripts/_lib/consumer_impact.ts +199 -0
  600. package/src/scripts/_lib/content_class.ts +127 -0
  601. package/src/scripts/_lib/counted_probe.ts +68 -1
  602. package/src/scripts/_lib/credential_deny_rows.ts +151 -0
  603. package/src/scripts/_lib/credential_files.ts +367 -0
  604. package/src/scripts/_lib/delivery_arm_experiment.ts +2 -2
  605. package/src/scripts/_lib/depth_flip.ts +141 -0
  606. package/src/scripts/_lib/design_lock.ts +117 -0
  607. package/src/scripts/_lib/design_sync_ledger.ts +142 -0
  608. package/src/scripts/_lib/design_sync_plan.ts +177 -0
  609. package/src/scripts/_lib/design_sync_reconcile.ts +159 -0
  610. package/src/scripts/_lib/design_sync_verify.ts +99 -0
  611. package/src/scripts/_lib/design_system_claude_design.ts +323 -0
  612. package/src/scripts/_lib/design_system_import.ts +84 -6
  613. package/src/scripts/_lib/dispatch_import_closure.ts +42 -11
  614. package/src/scripts/_lib/egress_credential_env.ts +35 -0
  615. package/src/scripts/_lib/egress_engine.ts +22 -0
  616. package/src/scripts/_lib/egress_known_values.ts +223 -0
  617. package/src/scripts/_lib/egress_normalize.ts +67 -0
  618. package/src/scripts/_lib/egress_prefixes.ts +42 -0
  619. package/src/scripts/_lib/egress_rules.ts +896 -0
  620. package/src/scripts/_lib/egress_rules_linearity.ts +56 -0
  621. package/src/scripts/_lib/egress_sender_scan.ts +290 -0
  622. package/src/scripts/_lib/egress_session_table.ts +510 -0
  623. package/src/scripts/_lib/egress_text.ts +63 -0
  624. package/src/scripts/_lib/egress_token.ts +252 -0
  625. package/src/scripts/_lib/empty_cycles.ts +1 -1
  626. package/src/scripts/_lib/environment_detector.ts +45 -30
  627. package/src/scripts/_lib/exemption_shape.ts +75 -1
  628. package/src/scripts/_lib/floor_posture.ts +185 -0
  629. package/src/scripts/_lib/forge_protection.ts +140 -2
  630. package/src/scripts/_lib/global_deploy_inventory.ts +159 -6
  631. package/src/scripts/_lib/guidelines_lane.ts +12 -1
  632. package/src/scripts/_lib/hand_kinds.ts +65 -0
  633. package/src/scripts/_lib/headless_invocation.ts +3 -3
  634. package/src/scripts/_lib/host_capability.ts +34 -2
  635. package/src/scripts/_lib/host_env_write.ts +39 -18
  636. package/src/scripts/_lib/host_listing_model.ts +14 -7
  637. package/src/scripts/_lib/identifier_redaction.ts +26 -0
  638. package/src/scripts/_lib/impact_bump.ts +70 -0
  639. package/src/scripts/_lib/install_reach_checks.ts +53 -1
  640. package/src/scripts/_lib/installed_layer.ts +31 -0
  641. package/src/scripts/_lib/installed_layer_normalise.ts +75 -0
  642. package/src/scripts/_lib/instructions_loaded_classify.ts +75 -0
  643. package/src/scripts/_lib/instructions_loaded_event.ts +53 -0
  644. package/src/scripts/_lib/knowledge_global_redaction.ts +2 -2
  645. package/src/scripts/_lib/layer_form_corpus.ts +165 -0
  646. package/src/scripts/_lib/layer_form_decision.ts +248 -0
  647. package/src/scripts/_lib/layer_form_evidence.ts +112 -0
  648. package/src/scripts/_lib/lean_projection_mode.ts +32 -161
  649. package/src/scripts/_lib/llm_proposer_transport.ts +1 -0
  650. package/src/scripts/_lib/loop_guards.ts +8 -120
  651. package/src/scripts/_lib/major_surface.ts +207 -0
  652. package/src/scripts/_lib/mcp_bridge.ts +30 -69
  653. package/src/scripts/_lib/merge_clearance_record.ts +384 -0
  654. package/src/scripts/_lib/neighbour_census.ts +18 -1
  655. package/src/scripts/_lib/orchestration_record.ts +61 -0
  656. package/src/scripts/_lib/outcome_vocabularies.ts +15 -23
  657. package/src/scripts/_lib/pin_advice.ts +49 -0
  658. package/src/scripts/_lib/platform_anchor.ts +222 -0
  659. package/src/scripts/_lib/procedure_checks.ts +5 -0
  660. package/src/scripts/_lib/project_tree_form.ts +134 -0
  661. package/src/scripts/_lib/projection_key_migration.ts +122 -0
  662. package/src/scripts/_lib/prompt_shape.ts +13 -2
  663. package/src/scripts/_lib/provenance_verify.ts +272 -0
  664. package/src/scripts/_lib/quota_parked.ts +27 -1
  665. package/src/scripts/_lib/ratification_artifact.ts +64 -1
  666. package/src/scripts/_lib/ratification_subject.ts +508 -46
  667. package/src/scripts/_lib/release_findings_ingest.ts +52 -5
  668. package/src/scripts/_lib/release_highlights.ts +72 -2
  669. package/src/scripts/_lib/release_settings_surface.ts +392 -0
  670. package/src/scripts/_lib/review_round.ts +134 -0
  671. package/src/scripts/_lib/roadmap_checkboxes.ts +1 -1
  672. package/src/scripts/_lib/roadmap_slug_lock.ts +254 -0
  673. package/src/scripts/_lib/roadmap_step_size.ts +75 -0
  674. package/src/scripts/_lib/run_checkpoint.ts +60 -3
  675. package/src/scripts/_lib/runtime_wiring_checks.ts +15 -1
  676. package/src/scripts/_lib/scope_guard.sh +64 -5
  677. package/src/scripts/_lib/scoped_projection.ts +136 -3
  678. package/src/scripts/_lib/secret_detector.ts +24 -103
  679. package/src/scripts/_lib/security_fix.ts +429 -0
  680. package/src/scripts/_lib/security_fix_context.ts +133 -0
  681. package/src/scripts/_lib/self_repair.ts +69 -39
  682. package/src/scripts/_lib/self_repair_outgoing.ts +209 -0
  683. package/src/scripts/_lib/self_repair_payload.ts +86 -0
  684. package/src/scripts/_lib/session_eol.ts +3 -0
  685. package/src/scripts/_lib/session_pr_watch.ts +207 -0
  686. package/src/scripts/_lib/session_register.ts +51 -1
  687. package/src/scripts/_lib/session_tag.ts +51 -0
  688. package/src/scripts/_lib/settings_removed_keys.ts +30 -0
  689. package/src/scripts/_lib/settings_renamed_keys.ts +19 -5
  690. package/src/scripts/_lib/skill_catalogue.ts +66 -25
  691. package/src/scripts/_lib/skill_fork_pilot.ts +121 -0
  692. package/src/scripts/_lib/skill_leases.ts +203 -0
  693. package/src/scripts/_lib/skill_listing_overrides.ts +294 -0
  694. package/src/scripts/_lib/skill_materialisation.ts +388 -0
  695. package/src/scripts/_lib/skill_materialisation_gate.ts +210 -0
  696. package/src/scripts/_lib/skill_materialisation_lock.ts +149 -0
  697. package/src/scripts/_lib/skill_materialisation_triggers.ts +96 -0
  698. package/src/scripts/_lib/skill_origin.ts +21 -1
  699. package/src/scripts/_lib/skill_reach.ts +342 -0
  700. package/src/scripts/_lib/source_shape.ts +7 -2
  701. package/src/scripts/_lib/sqlite_guard.ts +1 -1
  702. package/src/scripts/_lib/step_anatomy.ts +330 -0
  703. package/src/scripts/_lib/subagent_capsule.ts +8 -2
  704. package/src/scripts/_lib/subagent_native_fields.ts +30 -0
  705. package/src/scripts/_lib/subagent_spawn.ts +36 -0
  706. package/src/scripts/_lib/subagent_steering.ts +367 -0
  707. package/src/scripts/_lib/svg_dom.ts +318 -0
  708. package/src/scripts/_lib/svg_filled_counter.ts +287 -0
  709. package/src/scripts/_lib/svg_geometry.ts +480 -0
  710. package/src/scripts/_lib/svg_motion.ts +208 -0
  711. package/src/scripts/_lib/svg_rules.ts +1455 -0
  712. package/src/scripts/_lib/svg_urls.ts +72 -0
  713. package/src/scripts/_lib/test_delta.ts +89 -6
  714. package/src/scripts/_lib/tier_downshift_verdict.ts +222 -0
  715. package/src/scripts/_lib/tool_result_census.ts +62 -0
  716. package/src/scripts/_lib/trigger_routers.ts +1 -0
  717. package/src/scripts/_lib/turnaround_throughput.ts +378 -0
  718. package/src/scripts/_lib/ui_surface.ts +22 -0
  719. package/src/scripts/_lib/unattended_gates.ts +100 -0
  720. package/src/scripts/_lib/undeployed_fixes.ts +34 -0
  721. package/src/scripts/_lib/update_check.ts +143 -12
  722. package/src/scripts/_lib/update_invite.ts +116 -0
  723. package/src/scripts/_lib/update_notice.ts +259 -0
  724. package/src/scripts/_lib/verification_command.ts +59 -0
  725. package/src/scripts/_lib/verify_clause.ts +31 -19
  726. package/src/scripts/_lib/version_order.ts +146 -0
  727. package/src/scripts/_lib/worker_reuse.ts +191 -0
  728. package/src/scripts/_lib/workspace_secrets.ts +273 -0
  729. package/src/scripts/_lib/worktree_git.ts +67 -0
  730. package/src/scripts/_lib/worktree_ignored.ts +116 -0
  731. package/src/scripts/adoption_status.ts +330 -3
  732. package/src/scripts/adr_cite_check.ts +93 -0
  733. package/src/scripts/advisories.ts +803 -0
  734. package/src/scripts/ai-image/adapters/flux.sh +1 -0
  735. package/src/scripts/ai-image/adapters/gemini-image.sh +1 -0
  736. package/src/scripts/ai-image/adapters/ideogram.sh +1 -0
  737. package/src/scripts/ai-image/adapters/recraft.sh +1 -0
  738. package/src/scripts/ai-video/adapters/comfyui.sh +1 -0
  739. package/src/scripts/ai-video/adapters/fal.sh +1 -0
  740. package/src/scripts/ai-video/adapters/gemini-veo.sh +1 -0
  741. package/src/scripts/ai-video/adapters/higgsfield.sh +1 -0
  742. package/src/scripts/ai-video/adapters/kling.sh +1 -0
  743. package/src/scripts/ai-video/adapters/musetalk.sh +1 -0
  744. package/src/scripts/ai-video/adapters/openai-images.sh +1 -0
  745. package/src/scripts/ai-video/adapters/replicate.sh +1 -0
  746. package/src/scripts/ai-video/adapters/sora.sh +1 -0
  747. package/src/scripts/ai-video/adapters/syncso.sh +1 -0
  748. package/src/scripts/ai-video/stitch.sh +115 -2
  749. package/src/scripts/ai_council/airgap.ts +1 -0
  750. package/src/scripts/ai_council/api_transport.ts +27 -4
  751. package/src/scripts/ai_council/budget_guard.ts +300 -11
  752. package/src/scripts/ai_council/bundler.ts +20 -29
  753. package/src/scripts/ai_council/chairman.ts +17 -2
  754. package/src/scripts/ai_council/cli_agency_bounds.ts +158 -0
  755. package/src/scripts/ai_council/cli_launch_env.ts +54 -0
  756. package/src/scripts/ai_council/cli_least_agency_canary.ts +18 -2
  757. package/src/scripts/ai_council/clients.ts +55 -73
  758. package/src/scripts/ai_council/config.ts +16 -22
  759. package/src/scripts/ai_council/council_egress.ts +167 -0
  760. package/src/scripts/ai_council/exposure_ledger.ts +117 -0
  761. package/src/scripts/ai_council/free_hand_shadow.ts +276 -0
  762. package/src/scripts/ai_council/free_route.ts +216 -0
  763. package/src/scripts/ai_council/free_route_catalog.ts +173 -0
  764. package/src/scripts/ai_council/free_route_client.ts +95 -0
  765. package/src/scripts/ai_council/free_rung.ts +61 -0
  766. package/src/scripts/ai_council/hand_payload.ts +230 -0
  767. package/src/scripts/ai_council/hand_schemas.ts +123 -0
  768. package/src/scripts/ai_council/jury_aggregate.ts +155 -1
  769. package/src/scripts/ai_council/kind_flip.ts +221 -0
  770. package/src/scripts/ai_council/kind_flip_state.ts +19 -0
  771. package/src/scripts/ai_council/learn_low_impact_preview.ts +50 -22
  772. package/src/scripts/ai_council/modification_review.ts +98 -5
  773. package/src/scripts/ai_council/necessity.ts +7 -0
  774. package/src/scripts/ai_council/orchestrator.ts +16 -16
  775. package/src/scripts/ai_council/pricing.ts +10 -0
  776. package/src/scripts/ai_council/redact_low_impact_entry.ts +5 -2
  777. package/src/scripts/ai_council/response_render.ts +27 -4
  778. package/src/scripts/ai_council/round_reservations.ts +119 -0
  779. package/src/scripts/ai_council/route_chooser.ts +161 -0
  780. package/src/scripts/ai_council/route_liveness.ts +152 -0
  781. package/src/scripts/ai_council/route_member.ts +52 -0
  782. package/src/scripts/ai_council/seat_policy.ts +40 -0
  783. package/src/scripts/ai_council/seat_resume.ts +40 -0
  784. package/src/scripts/ai_council/shadow_dispatch.ts +13 -3
  785. package/src/scripts/ai_council/spend_gate.ts +18 -2
  786. package/src/scripts/ai_council/status_surface.ts +37 -0
  787. package/src/scripts/ai_council/transport_resolver.ts +15 -18
  788. package/src/scripts/analysis_analysts.ts +226 -0
  789. package/src/scripts/analysis_anchors.ts +140 -0
  790. package/src/scripts/analysis_and_optimize.ts +44 -0
  791. package/src/scripts/analysis_emit.ts +150 -0
  792. package/src/scripts/analysis_exchange.ts +186 -0
  793. package/src/scripts/analysis_gate.ts +158 -0
  794. package/src/scripts/analysis_inbox_final.ts +173 -0
  795. package/src/scripts/analysis_ledger.ts +119 -0
  796. package/src/scripts/analysis_pr_optimize.ts +219 -0
  797. package/src/scripts/analysis_pr_review.ts +240 -0
  798. package/src/scripts/analysis_pr_target.ts +121 -0
  799. package/src/scripts/analysis_prompts.ts +130 -0
  800. package/src/scripts/analysis_publish.ts +358 -0
  801. package/src/scripts/analysis_questions.ts +78 -0
  802. package/src/scripts/analysis_run.ts +248 -0
  803. package/src/scripts/analysis_run_record.ts +210 -0
  804. package/src/scripts/analysis_target.ts +343 -0
  805. package/src/scripts/analysis_validate.ts +161 -0
  806. package/src/scripts/anchor_eval_falsify.ts +1 -1
  807. package/src/scripts/arrival_report.ts +115 -0
  808. package/src/scripts/ask_transport.ts +284 -35
  809. package/src/scripts/backfill_model_tier.ts +4 -5
  810. package/src/scripts/before_complete_hook.ts +48 -2
  811. package/src/scripts/bench_hook_latency.ts +3 -3
  812. package/src/scripts/bench_procedure_cursor.ts +440 -0
  813. package/src/scripts/bootstrap.sh +3 -3
  814. package/src/scripts/build_exit_code_register.ts +440 -0
  815. package/src/scripts/build_proof.ts +23 -1
  816. package/src/scripts/cache_realization_report.ts +155 -14
  817. package/src/scripts/canary_liveness.ts +117 -0
  818. package/src/scripts/chat_history.ts +12 -15
  819. package/src/scripts/check_account_surface.ts +318 -0
  820. package/src/scripts/check_agent_artifact_location.ts +17 -160
  821. package/src/scripts/check_bundle_path_leakage.ts +6 -0
  822. package/src/scripts/check_ci_local_parity.ts +21 -13
  823. package/src/scripts/check_claims.ts +77 -2
  824. package/src/scripts/check_completion_review.ts +34 -1
  825. package/src/scripts/check_concern_admissions.ts +41 -5
  826. package/src/scripts/check_consumer_scope_flip.ts +1 -1
  827. package/src/scripts/check_context_paths.ts +2 -0
  828. package/src/scripts/check_council_layout.ts +9 -0
  829. package/src/scripts/check_credential_spelling.ts +267 -0
  830. package/src/scripts/check_egress_mutations.ts +239 -0
  831. package/src/scripts/check_enforcement_coverage.ts +16 -3
  832. package/src/scripts/check_estate_count.ts +16 -1
  833. package/src/scripts/check_finding_dispositions.ts +147 -0
  834. package/src/scripts/check_gate_coverage.ts +123 -21
  835. package/src/scripts/check_gate_reachability.ts +16 -2
  836. package/src/scripts/check_generator_sync.ts +46 -0
  837. package/src/scripts/check_hook_bundle_composition.ts +139 -1
  838. package/src/scripts/check_host_docs_digest.ts +142 -5
  839. package/src/scripts/check_kernel_edit_ratified.ts +301 -76
  840. package/src/scripts/check_kernel_rule_bundle.ts +14 -10
  841. package/src/scripts/check_knowledge_cards.ts +83 -3
  842. package/src/scripts/check_memory.ts +13 -3
  843. package/src/scripts/check_pack_size.ts +1 -1
  844. package/src/scripts/check_permission_deny_syntax.ts +247 -0
  845. package/src/scripts/check_platform_anchor.ts +243 -0
  846. package/src/scripts/check_proposal.ts +183 -1
  847. package/src/scripts/check_reach_channels.ts +5 -3
  848. package/src/scripts/check_references.ts +5 -2
  849. package/src/scripts/check_release_manifest_content.ts +33 -0
  850. package/src/scripts/check_release_pr_shape.ts +5 -0
  851. package/src/scripts/check_rule_invariants.ts +9 -1
  852. package/src/scripts/check_skill_body_budget.ts +343 -0
  853. package/src/scripts/check_skill_requires.ts +137 -1
  854. package/src/scripts/check_step_receipts.ts +246 -0
  855. package/src/scripts/check_structural_breaking.ts +7 -1
  856. package/src/scripts/check_suppression_hygiene.ts +8 -0
  857. package/src/scripts/check_test_weakening.ts +14 -0
  858. package/src/scripts/check_token_quality_golden.ts +5 -1
  859. package/src/scripts/check_update_banner.ts +50 -3
  860. package/src/scripts/check_verify_expectation_delta.ts +2 -1
  861. package/src/scripts/check_voice_lexicon.ts +531 -0
  862. package/src/scripts/ci_os_attribution.ts +327 -0
  863. package/src/scripts/ci_platform_scope.ts +69 -0
  864. package/src/scripts/ci_settle.ts +4 -1
  865. package/src/scripts/ci_status.ts +0 -1
  866. package/src/scripts/ci_time_to_green.ts +748 -0
  867. package/src/scripts/classify_merge_risk.ts +407 -19
  868. package/src/scripts/code_graph/sqlite_store.ts +1 -1
  869. package/src/scripts/compile_trigger_evals.ts +353 -0
  870. package/src/scripts/condense.ts +25 -31
  871. package/src/scripts/consumer_matrix.ts +61 -3
  872. package/src/scripts/council_availability_hook.ts +12 -4
  873. package/src/scripts/council_cli.ts +48 -38
  874. package/src/scripts/cross_repo_retrieve.ts +9 -72
  875. package/src/scripts/design_lock.ts +106 -0
  876. package/src/scripts/design_slop_rules.ts +30 -0
  877. package/src/scripts/design_sync.ts +264 -0
  878. package/src/scripts/design_system_import.ts +30 -13
  879. package/src/scripts/dispatch_economy_report.ts +46 -1
  880. package/src/scripts/dispatch_r2_reviewer.ts +41 -5
  881. package/src/scripts/egress_canary.ts +166 -0
  882. package/src/scripts/egress_sender_census.ts +101 -0
  883. package/src/scripts/external_sources_denylist.json +94 -12
  884. package/src/scripts/generate_catalog.ts +6 -2
  885. package/src/scripts/generate_owned_digest.ts +163 -0
  886. package/src/scripts/generate_reference_toc.ts +143 -0
  887. package/src/scripts/generate_subagent_floor.ts +11 -1
  888. package/src/scripts/handoff_context_hook.ts +34 -0
  889. package/src/scripts/hook_carrier_census.ts +263 -0
  890. package/src/scripts/hook_chunks.d.mts +12 -0
  891. package/src/scripts/hook_chunks.mjs +114 -0
  892. package/src/scripts/hook_manifest.json +1 -1
  893. package/src/scripts/hook_manifest.yaml +65 -42
  894. package/src/scripts/hooks/block_config_weakening.ts +127 -3
  895. package/src/scripts/hooks/block_credential_reads.ts +165 -0
  896. package/src/scripts/hooks/block_no_verify.ts +47 -23
  897. package/src/scripts/hooks/block_speaking_inbox_dir.ts +54 -8
  898. package/src/scripts/hooks/category_a.ts +202 -25
  899. package/src/scripts/hooks/concern_failure_policy.ts +6 -6
  900. package/src/scripts/hooks/concern_registry.ts +31 -6
  901. package/src/scripts/hooks/concern_registry_types.ts +11 -0
  902. package/src/scripts/hooks/delegation_nudge_hook.ts +105 -15
  903. package/src/scripts/hooks/design_pass_hook.ts +199 -13
  904. package/src/scripts/hooks/dispatch_hook.ts +13 -12
  905. package/src/scripts/hooks/egress_engine_loader.ts +125 -0
  906. package/src/scripts/hooks/egress_stage.ts +440 -0
  907. package/src/scripts/hooks/hook_stdin.ts +29 -4
  908. package/src/scripts/hooks/host_docs_pages.ts +194 -0
  909. package/src/scripts/hooks/host_docs_pages.yaml +75 -0
  910. package/src/scripts/hooks/host_lowering.json +1 -1
  911. package/src/scripts/hooks/host_lowering.yaml +22 -21
  912. package/src/scripts/hooks/host_rate_marker_hook.ts +73 -0
  913. package/src/scripts/hooks/instructions_observer_hook.ts +170 -0
  914. package/src/scripts/hooks/interruption_ledger_hook.ts +1 -1
  915. package/src/scripts/hooks/lazy_concern.ts +148 -0
  916. package/src/scripts/hooks/orchestration_record_hook.ts +80 -2
  917. package/src/scripts/hooks/payload_stub.ts +16 -6
  918. package/src/scripts/hooks/permission_gate.ts +7 -7
  919. package/src/scripts/hooks/push_settle_hook.ts +32 -3
  920. package/src/scripts/hooks/replay_hook.ts +43 -0
  921. package/src/scripts/hooks/reread_guard_hook.ts +87 -10
  922. package/src/scripts/hooks/rtk_wrap_hook.ts +4 -3
  923. package/src/scripts/hooks/rule_inject_hook.ts +8 -1
  924. package/src/scripts/hooks/session_eol_hook.ts +48 -1
  925. package/src/scripts/hooks/source_first_gate_hook.ts +6 -8
  926. package/src/scripts/hooks/spawn_guard_shadow_hook.ts +203 -10
  927. package/src/scripts/hooks/state_io.ts +2 -2
  928. package/src/scripts/hooks/svg_obligation.ts +553 -0
  929. package/src/scripts/hooks/svg_rules_loader.ts +133 -0
  930. package/src/scripts/hooks/tool_result_bytes_hook.ts +14 -5
  931. package/src/scripts/hooks/turn_end_gate_hook.ts +5 -3
  932. package/src/scripts/hooks/ui_route_nudge_hook.ts +2 -12
  933. package/src/scripts/hooks_doctor.ts +31 -0
  934. package/src/scripts/hooks_status.ts +58 -3
  935. package/src/scripts/inbox_source_census.ts +74 -13
  936. package/src/scripts/install +25 -3
  937. package/src/scripts/install.ts +60 -91
  938. package/src/scripts/interruption_report.ts +11 -1
  939. package/src/scripts/layer_baseline_report.ts +267 -0
  940. package/src/scripts/learning_sidecar.ts +1 -1
  941. package/src/scripts/lint_agents_layout.ts +3 -0
  942. package/src/scripts/lint_blocker_citations.ts +104 -0
  943. package/src/scripts/lint_breaking_changes_index.ts +40 -7
  944. package/src/scripts/lint_consolidation_lineage.ts +150 -19
  945. package/src/scripts/lint_consumer_internal_refs.ts +90 -42
  946. package/src/scripts/lint_context_spine_usage.ts +21 -0
  947. package/src/scripts/lint_design_antipattern_parity.ts +39 -7
  948. package/src/scripts/lint_design_quality.ts +60 -12
  949. package/src/scripts/lint_evidence_artifacts.ts +31 -0
  950. package/src/scripts/lint_example_fences.ts +11 -2
  951. package/src/scripts/lint_ghostwriter_source.ts +42 -10
  952. package/src/scripts/lint_hook_manifest.ts +94 -0
  953. package/src/scripts/lint_marketplace_install_completeness.ts +4 -0
  954. package/src/scripts/lint_mcp_config_security.ts +9 -11
  955. package/src/scripts/lint_motion_authority_drift.ts +27 -0
  956. package/src/scripts/lint_plan_risk_register.ts +28 -1
  957. package/src/scripts/lint_positioning.ts +4 -4
  958. package/src/scripts/lint_provenance.ts +1 -0
  959. package/src/scripts/lint_roadmap_blockers.ts +65 -4
  960. package/src/scripts/lint_roadmap_complexity.ts +98 -0
  961. package/src/scripts/lint_skill_link_reach.ts +251 -9
  962. package/src/scripts/lint_skill_procedures.ts +252 -0
  963. package/src/scripts/lint_skill_scripts_readonly.ts +12 -1
  964. package/src/scripts/lint_subagent_determinism.ts +14 -1
  965. package/src/scripts/lint_svg_asset.ts +365 -0
  966. package/src/scripts/lint_ticked_unmet_criteria.ts +300 -21
  967. package/src/scripts/mcp_registry_submit.sh +2 -2
  968. package/src/scripts/mcp_server/consumer_tool_catalog.json +4 -4
  969. package/src/scripts/mcp_server/suggest_skill.ts +89 -4
  970. package/src/scripts/mcp_server/tools.ts +2 -33
  971. package/src/scripts/measure_skill_ranker_baseline.ts +203 -5
  972. package/src/scripts/measure_turn_end_gate.ts +61 -1
  973. package/src/scripts/merge_clearance.ts +225 -0
  974. package/src/scripts/migrate_command_suggestions.ts +1 -1
  975. package/src/scripts/network_sources.ts +236 -0
  976. package/src/scripts/no_go_deny_rows.ts +225 -0
  977. package/src/scripts/orchestration_record.ts +15 -2
  978. package/src/scripts/plan_test_shards.ts +103 -0
  979. package/src/scripts/pr_url_reminder_hook.ts +10 -0
  980. package/src/scripts/print_required_checks.ts +5 -5
  981. package/src/scripts/probe_depth_shadow.ts +406 -0
  982. package/src/scripts/probe_turnaround.ts +342 -10
  983. package/src/scripts/ratification_subject.ts +176 -0
  984. package/src/scripts/rdp_gate_classify.ts +1 -0
  985. package/src/scripts/rdp_quality_eval.ts +1 -0
  986. package/src/scripts/release.ts +26 -55
  987. package/src/scripts/release_drill.ts +52 -23
  988. package/src/scripts/release_env.ts +37 -0
  989. package/src/scripts/release_publication.ts +11 -1
  990. package/src/scripts/report_consumer_gate_reach.ts +233 -0
  991. package/src/scripts/report_merge_gate_load.ts +295 -0
  992. package/src/scripts/report_project_contract.ts +123 -0
  993. package/src/scripts/report_reducible_classes.ts +342 -0
  994. package/src/scripts/report_required_checks_drift.ts +5 -3
  995. package/src/scripts/report_skill_host_census.ts +199 -0
  996. package/src/scripts/report_standing_payload_by_host.ts +7 -7
  997. package/src/scripts/retro.ts +758 -0
  998. package/src/scripts/retro_facts.ts +575 -0
  999. package/src/scripts/retro_queue.ts +739 -0
  1000. package/src/scripts/retro_session_facts.ts +218 -0
  1001. package/src/scripts/retro_sweep.ts +493 -0
  1002. package/src/scripts/retro_triage.ts +126 -0
  1003. package/src/scripts/roadmap_context.ts +2 -2
  1004. package/src/scripts/roadmap_drain_queue.ts +601 -0
  1005. package/src/scripts/run_supervise.ts +24 -2
  1006. package/src/scripts/schemas/agent-settings.schema.json +0 -16
  1007. package/src/scripts/schemas/command.schema.json +3 -3
  1008. package/src/scripts/schemas/review-findings.schema.json +8 -0
  1009. package/src/scripts/schemas/skill.schema.json +7 -6
  1010. package/src/scripts/schemas/subagent.schema.json +33 -2
  1011. package/src/scripts/score_skill_selection.ts +5 -2
  1012. package/src/scripts/second_brain_retrieval.ts +1 -0
  1013. package/src/scripts/second_brain_run.ts +1 -0
  1014. package/src/scripts/self_repair_cli.ts +563 -87
  1015. package/src/scripts/self_review_gate.ts +59 -4
  1016. package/src/scripts/session_register_hook.ts +91 -4
  1017. package/src/scripts/sessions_cli.ts +100 -5
  1018. package/src/scripts/skill_collision_clusters.ts +1 -1
  1019. package/src/scripts/skill_tools/score_skill_relevance.ts +31 -2
  1020. package/src/scripts/skill_trigger_eval.ts +4 -2
  1021. package/src/scripts/source_adapters.ts +183 -0
  1022. package/src/scripts/step_receipt.ts +100 -0
  1023. package/src/scripts/sync_pr_branch.ts +4 -0
  1024. package/src/scripts/test_council_qualification.ts +1 -1
  1025. package/src/scripts/trigger_eval_grandfather.json +3 -49
  1026. package/src/scripts/trigger_eval_rotation.ts +31 -3
  1027. package/src/scripts/ui_conformance_probe.ts +405 -1
  1028. package/src/scripts/update_counts.ts +230 -11
  1029. package/src/scripts/update_invite_hook.ts +245 -0
  1030. package/src/scripts/update_notice_hook.ts +298 -0
  1031. package/src/scripts/validate_frontmatter.ts +85 -0
  1032. package/src/scripts/worker_reuse_shadow_report.ts +121 -0
  1033. package/src/scripts/worktree_cleanup_check.ts +915 -121
  1034. package/src/server/io/yamlIO.ts +2 -2
  1035. package/src/server/schemas/settings.ts +37 -23
  1036. package/src/shared/brandTokenDocument.ts +46 -0
  1037. package/src/shared/brandTokenPaths.ts +43 -0
  1038. package/src/shared/settingsCarveOut.ts +0 -8
  1039. package/src/shared/skillRanking.ts +106 -5
  1040. package/src/shared/userMd/formAdapter.ts +15 -1
  1041. package/src/shared/userMd/schema.ts +22 -0
  1042. package/src/templates/agent-user.md +4 -0
  1043. package/src/templates/agent-user.yml +4 -0
  1044. package/dist/cli-delegate/chunk-523HCFYO.js +0 -90
  1045. package/dist/cli-delegate/chunk-AL3RZ22D.js +0 -74
  1046. package/dist/cli-delegate/chunk-KB5FZ655.js +0 -208
  1047. package/dist/cli-delegate/chunk-MDPPKQCQ.js +0 -875
  1048. package/dist/cli-delegate/chunk-MSUL5NYP.js +0 -1123
  1049. package/dist/cli-delegate/chunk-OAFSJBHH.js +0 -272
  1050. package/dist/ui/assets/index-C3djEJah.js +0 -23
  1051. package/src/scripts/_lib/continuation_ladder.ts +0 -335
  1052. package/src/scripts/hooks/run_continuation_hook.ts +0 -1524
@@ -8,52 +8,7 @@ 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:** ≤ 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.
35
-
36
- The old figure described nothing: the file measured 47,115 bytes against it, a
37
- factor of 11.8, so it was a dead budget rather than a typo. Restated at the
38
- measured size rather than split, because splitting a contract this load-bearing
39
- into referenced fragments is a large change with its own risk, and the step that
40
- found this asked for hygiene.
41
-
42
- **Why it moved:** this file is not a page a reader skims but the canonical
43
- autonomous-execution loop — roadmap discovery, cadence resolution, the step loop,
44
- the flip-guard, the halt list, the terminal outcomes, and the archival check. The
45
- original 4,000 was inherited from the sibling context docs (`≤ 3,000`, `≤ 6,000`)
46
- without asking whether the same shape applied.
47
-
48
- **Read it as a ratchet, not a target.** A budget that rises whenever the file
49
- does is not a budget. It may fall; raising it again needs the same kind of note
50
- as this one.
51
-
52
- **Nothing enforces this line**, and saying so is the point: no gate reads it, so
53
- it is a declaration a future edit can falsify exactly as the 4,000 was falsified.
54
- A true declaration with a stated enforcement boundary is worth more than a false
55
- one, and less than a check — the same `enforced_by: none` honesty the rules in
56
- this tree state about their own obligations.
11
+ **Size budget:** the core is held by `src/config/procedure-core-budget.json`; branch files by `check_depth_budget` (16,000 chars each).
57
12
 
58
13
  ## 1. Resolve roadmap
59
14
 
@@ -72,20 +27,7 @@ already closed in an open PR, and 2 of 22 six days later — the same sample
72
27
  halved inside a week, which is why the probe re-runs on a cadence (§ 5e) rather
73
28
  than once at branch time.
74
29
 
75
- The report carries open PRs with the files they change, remote branches carrying
76
- a roadmap slug, live sessions on both axes, `agents/tmp/` note names, sibling
77
- roadmaps on the same topic, and roadmap-to-PR file overlap. Two readings act:
78
-
79
- - **The roadmap is closed in an open PR** → name the PR number and stop. This is
80
- a **selection error**, not a halt: nothing on the halt list fired, the run
81
- simply picked work that is already done. It does not touch the halt list and
82
- it is not a `blocked` outcome.
83
- - **The roadmap is partially covered by an open PR** → name the PR and continue,
84
- on a branch cut from `origin/main`. Never rebase onto the foreign branch.
85
-
86
- Same honesty boundary the probe states in its own header: **the probe is
87
- deterministic once invoked, and the invocation is model-carried.** Nothing fires
88
- it and nothing notices when it is skipped.
30
+ **Probe readings** — read [`roadmap-process-loop-prescan.md`](roadmap-process-loop-prescan.md#context-probe--unconditionally-before-resolving-the-roadmap).
89
31
 
90
32
  Search both locations:
91
33
 
@@ -103,32 +45,11 @@ roadmaps with open work that is blocked-for-later — parked, not active).
103
45
  surface alternatives in the pre-run summary.
104
46
  - None active → tell the user; suggest [`/roadmap:create`](../../commands/roadmap/create.md).
105
47
 
106
- ### Live merge-state before any "in-flight / merged / handled" claim
107
-
108
- When selection reasoning would **exclude** a roadmap — or a pre-run summary,
109
- decision, or any user-facing message would **describe** one — as *in-flight*,
110
- *handled by an open PR*, *already merged*, or *not yet merged*, verify that
111
- claim **live at the moment of the claim** (`gh pr view <n> --json state,mergedAt`
112
- or `gh pr list --search "<slug>"`). Never infer merge state from:
113
-
114
- - the **dashboard's open-count** — it lags: a completed roadmap is archived in
115
- the **merging** PR, so a roadmap can still read "open" on `main` while its PR
116
- is already merged (archive not yet on your checkout), or read "open" seconds
117
- before a merge you never re-checked;
118
- - **session memory** ("I opened a PR for this earlier") or an **earlier fetch** —
119
- a merge can land between your fetch and your message.
120
-
121
- A stale merge-state claim ships an unnecessary user-facing message about work
122
- that is already done — the exact failure this clause prevents. This is the
123
- [`direct-answers`](../../rules/direct-answers.md) Iron-Law-2 live-state rule
124
- (git/PR state never from memory), applied to roadmap selection.
48
+ **Live merge-state** — read [`roadmap-process-loop-prescan.md`](roadmap-process-loop-prescan.md#live-merge-state-before-any-in-flight--merged--handled-claim).
125
49
 
126
50
  ## 2. Pre-run summary — gate or inline note
127
51
 
128
- The command name already names the scope; asking "Go / Different
129
- roadmap / …" on every run is noise, so there is no confirmation gate and
130
- no setting to bring one back (the `roadmap.skip_pre_run_gate` key was
131
- retired on 2026-10-09 with its default, `true`, as fixed behavior).
52
+ **Retired gate key** — read [`roadmap-process-loop-prescan.md`](roadmap-process-loop-prescan.md#2-pre-run-summary--gate-or-inline-note).
132
53
 
133
54
  - The roadmap is unambiguous (user named it, or exactly one active
134
55
  roadmap exists) → **no interactive gate.** Emit the summary block
@@ -182,124 +103,7 @@ AN ABSENT `execution.mode` IS NOT A DECLARATION OF `interactive`.
182
103
  IT IS THE ABSENCE OF A DECLARATION, AND IS DERIVED — NEVER DEFAULTED SILENTLY.
183
104
  ```
184
105
 
185
- Resolve the mode from the first source that answers, and **state which rung
186
- answered** in the pre-run summary so the derivation is auditable rather than
187
- implicit:
188
-
189
- | # | Source | Wins when |
190
- |---|---|---|
191
- | 1 | **Explicit invocation suffix** — `… autonomous` / `… phase-checkpoints` / `… interactive` in the invocation | the user typed it this turn |
192
- | 2 | **Frontmatter `execution.mode`** | the roadmap declares one |
193
- | 3 | **Invocation form** (table below) | neither of the above answered |
194
-
195
- Rung 3, by wrapper:
196
-
197
- | Wrapper | Derived mode | Contract |
198
- |---|---|---|
199
- | `/roadmap:process-full` | `autonomous`, **preselected** | offered |
200
- | `/roadmap:next` | `phase-checkpoints`, **preselected** | offered |
201
- | `/roadmap:process-phase` | `phase-checkpoints` | offered |
202
- | `/roadmap:process-step` | — | none (one step needs no run contract) |
203
-
204
- Still **exactly one confirmation**, never two: rung 3 changes which option the
205
- contract screen arrives preselected on, never whether the screen is shown. The
206
- screen's `3. Run interactive instead` option
207
- ([`roadmap-execution-contract § 2`](roadmap-execution-contract.md)) stays on it
208
- in every case, so a derived mode is always one keystroke from being refused.
209
-
210
- <!-- decision 2026-08-20: /roadmap:next preselects `phase-checkpoints`, not
211
- `autonomous`. AI council 2/2 (anthropic + openai) on the
212
- `autonomy-defaults-sheet` fork of road-to-user-out-of-the-loop, record
213
- agents/evidence/council/drain-blocker-dispositions-a.md. Reasoning: the two
214
- wrappers differ in what the user has actually seen at Accept time.
215
- `process-full` names one roadmap the user chose, so `autonomous` is a
216
- preselection over a scope they read. `/roadmap:next` SELECTS the roadmap
217
- itself, so `autonomous` there preselects full autonomy over a target the
218
- user has not seen — the one rung where the derivation picks the object and
219
- the scope in the same keystroke. Reversibility: this is a preselected
220
- option on a screen that still offers `1. Go — start processing
221
- autonomously`, so the aggressive path costs one keystroke and no rebuild;
222
- flipping the row back is a one-line edit with no dependent mechanism.
223
- Deliberately scoped to `/roadmap:next` only — the blocker's question named
224
- that wrapper, and Phase 1 Step 1 of the parent roadmap landed with
225
- `process-full` → `autonomous` explicitly, so widening the change would
226
- silently reverse an already-shipped step nobody asked to revisit. -->
227
-
228
-
229
- **Why the old fallback was a defect and not a conservative default.** Absent
230
- `execution.mode` used to mean the legacy commit-step scan, which derives no
231
- contract at all — no batched artifact drafting, no council auto-enable, no
232
- push/PR grant. Measured 2026-08-17: **27 of 37 active roadmaps carry no
233
- `execution.mode`**, so roughly three quarters of the corpus ran the degraded
234
- path *under the wrapper built for the opposite*, and silently — the user saw a
235
- `process-full` invocation behave like an interactive one with no line saying so.
236
- A default that contradicts the wrapper the user just typed is a wrong answer,
237
- not a safe one.
238
-
239
- **Kill criteria — carried here, at the flip, not only in the roadmap that
240
- made it.** A default flip whose reversal condition lives in a roadmap is a
241
- flip nobody can reverse once that roadmap is archived, which is why both
242
- conditions below sit next to the table they govern:
243
-
244
- - **The ladder itself** (absent `execution.mode` derives a mode instead of
245
- falling back to interactive): `3. Run interactive instead` chosen at the
246
- contract screen in **more than 40 % of 20 runs** reverts rung 3, leaving
247
- the ladder at explicit-suffix-then-frontmatter only. **No instrument
248
- today** — nothing records which contract option was chosen, so the rate is
249
- unmeasured rather than low. Stated so the gap is visible at the flip.
250
- - **The `/roadmap:next` row** (`phase-checkpoints` rather than
251
- `autonomous`): reverted if checkpoint-mode runs on that wrapper are
252
- observed to stop at a phase boundary the user then waves through without
253
- a change — that is a contact the preselection bought nothing for. Same
254
- missing instrument, same honesty: this is a condition, not a reading.
255
-
256
- **What this does NOT change.** A derived mode grants nothing on its own:
257
- authorization is still the single Accept on the contract screen, per
258
- [`roadmap-execution-contract § Principle`](roadmap-execution-contract.md). The
259
- Hard Floor, the locked decision classes, and the kernel-edit soak are untouched.
260
-
261
- ### 3b. Contract or commit-step ask
262
-
263
- **Derived `autonomous` or `phase-checkpoints`** → load
264
- [`roadmap-execution-contract`](roadmap-execution-contract.md) and run
265
- its four-class pre-scan over every open step:
266
-
267
- 1. commit-shaped steps (patterns below),
268
- 2. git-shape needs (branch / push / PR / delivery),
269
- 3. artifact-authoring steps (new or materially rewritten skill / rule /
270
- command / guideline — feeds the batched drafting-protocol research
271
- pass, run at contract time against current artifact state),
272
- 4. open questions / ambiguity markers (incl. `ask-when-uncertain`
273
- vague-trigger patterns).
274
-
275
- Surface the contract summary; the user's single **Accept** activates
276
- all run grants (branch, chunked commits, push to the run's own feature
277
- branch only, PR-open, batched artifact drafting, council auto-enable) —
278
- cached for the run, never re-asked. The contract never lifts a Hard
279
- Floor or any safety floor; boundaries + per-mode gate table live in the
280
- contract context.
281
-
282
- **Derived `interactive`** — i.e. the user asked for it explicitly (rung 1), the
283
- frontmatter declares it (rung 2), or the invocation was `process-step` (rung 3)
284
- → legacy commit-step scan only: lines matching `commit:` / `git commit` /
285
- `Commit phase`. An ABSENT field no longer reaches this branch; that is the whole
286
- change in § 3a.
287
-
288
- - **No commit steps** → nothing to ask. Never commit, never re-ask
289
- per [`commit-policy`](../../rules/commit-policy.md).
290
- - **Commit steps present, autonomous conversation mode**
291
- (`personal.autonomy: on`, or `auto` after opt-in) → ask **once**
292
- upfront:
293
- > "Roadmap contains N commit steps. Authorize all of them for this
294
- > run? (yes / no / list them)"
295
- Cache the answer for the whole run; do **not** re-ask per step.
296
- Hard-Floor diffs (bulk deletions, infra) still trigger the
297
- per-commit gate from [`commit-mechanics`](../authority/commit-mechanics.md).
298
- - **Commit steps present, non-autonomous** → same one-shot pre-scan
299
- ask as above, before the run starts; never per step
300
- (per [`commit-mechanics`](../authority/commit-mechanics.md) —
301
- `commit-policy` § NEVER ask about committing holds regardless of
302
- autonomy).
106
+ **3a ladder · 3b contract ask** — read [`roadmap-process-loop-prescan.md`](roadmap-process-loop-prescan.md#3a-mode-derivation-ladder--first-source-wins), [§ 3b](roadmap-process-loop-prescan.md#3b-contract-or-commit-step-ask).
303
107
 
304
108
  ### 3c. Capability screen — can the agent do this at all?
305
109
 
@@ -310,48 +114,7 @@ YES → IT IS WORK. NO → IT IS THE ONLY KIND OF BLOCKER LEFT.
310
114
  WHO CONVENTIONALLY DOES A THING IS NOT A PROPERTY OF THE THING.
311
115
  ```
312
116
 
313
- **Rewritten by [ADR-237](../../../docs/decisions/ADR-237-end-to-end-execution-authority.md),
314
- which supersedes ADR-235.** This section used to be a *preflight refusal*: a run
315
- with no "runnable" open step created no branch and wrote nothing. That is gone.
316
- The invocation is a delegation, so the question is no longer *is this step
317
- runnable under current governance* but *is this step possible for the agent at
318
- all.*
319
-
320
- Run once at the end of the pre-scan, and again immediately before any `blocked`
321
- report.
322
-
323
- **The screen, in order:**
324
-
325
- 1. **Can the agent execute it?** Through the filesystem, git, `gh`, an API, a
326
- CLI, a tool, a model, a council — anything machine-executable. If yes, the
327
- step is **work**. Stop here; no blocker citation changes that.
328
- 2. **Is the authority already implied by the invocation?** For a `process-full`
329
- run: branches, chunked commits, pushing that branch, opening and updating the
330
- PR, reversible repository/branch settings, CI runs and re-runs, merge-base
331
- updates, conflict resolution, project-local dependencies, and paid calls
332
- inside whatever `cost.budgets` windows are configured — none configured,
333
- none applies (ADR-279). If yes → **run it**.
334
- 3. **Is it on the EXCLUDED list?** Merging to a production trunk, deploying,
335
- production data / secrets / IAM / DNS, bulk deletion outside the roadmap's
336
- scope, an irreversible external action beyond the PR itself. Those keep their
337
- own this-turn confirmation ([`non-destructive-by-default`](../../rules/non-destructive-by-default.md))
338
- and are a **halt**, not a blocker.
339
- 4. **Otherwise it is externally impossible**, and only then is it a blocker: a
340
- credential that does not exist and cannot be created · a purchase beyond the
341
- budget · physical hardware access · another person or organisation must act ·
342
- a wait that is factually mandatory and unverifiable.
343
-
344
- **A `## Blockers` entry is evidence, never a verdict.** A `Class: 3` label on an
345
- action the agent can perform is a **defect in the roadmap**, and the run repairs
346
- the label rather than obeying it — recording what it did and why. Class `0`/`1`
347
- entries carry a `Run:` the agent executes, exactly as before. Class `2`
348
- (consent-once) is pre-cleared for the duration of a `process-full` run when the
349
- consent it wants is one the invocation already gave; a `2` asking for something
350
- the invocation did NOT give (an EXCLUDED action, a spend crossing) still reaches
351
- the owner.
352
-
353
- **No citation → work**, and the default direction is unchanged: the failure this
354
- screen must not have is declining work an agent could have done.
117
+ **Capability screen** — read [`roadmap-process-loop-prescan.md`](roadmap-process-loop-prescan.md#3c-capability-screen--can-the-agent-do-this-at-all).
355
118
 
356
119
  ### Ask before park — a user decision is put to the user, then parked
357
120
 
@@ -362,145 +125,7 @@ A TIMEOUT IS NOT CONSENT. A NON-INTERACTIVE CONTEXT IS NOT CONSENT.
362
125
  NEVER ADOPT THE CONSERVATIVE DEFAULT WITHOUT AN ANSWER.
363
126
  ```
364
127
 
365
- `terminal-states.md` defines `blocked` to include "a decision only the user can
366
- make", and the marker below used to be written with no ask in between — so the
367
- decision ended up filed, correctly labelled, in a file nobody is watching. The
368
- ordering is the fix, not the label.
369
-
370
- - **Interactive host** — put the question, one at a time, per
371
- [`ask-when-uncertain`](../../rules/ask-when-uncertain.md). An answer ends the
372
- block and nothing is parked.
373
- - **The user declines to decide** — park with `| asked: yes`. The question WAS
374
- put; the decline is why the step stays blocked.
375
- - **The ask times out** — the run ends `approval-required` (a state
376
- `terminal-states.md` already defines), carrying the unanswered question
377
- verbatim and its conservative option named as **not adopted**. Asked-and-
378
- unanswered is not could-not-ask, so the marker still records `asked: yes`.
379
- - **Non-interactive context** (CI, a pipe, a hook, a headless run) — park with
380
- `| asked: no — <reason>`. The reason is required: without it a later reader
381
- cannot tell a declined decision from one that was never offered.
382
-
383
- The decision itself is `src/scripts/_lib/blocked_by_marker.ts` (`decideAsk`),
384
- so the ordering is testable rather than only described; `lint_roadmap_blockers`
385
- fails a user-decision annotation carrying no `asked:` field, and one saying
386
- `asked: no` with no reason.
387
-
388
- **A step this screen judges externally impossible carries a `blocked-by:` marker
389
- on its own line.** The obligation is unchanged and its reason is unchanged: two
390
- mechanisms read blockedness from two different places and only one reads this
391
- section — `run-continuation`, the stop-slot concern that re-engages an autonomous
392
- run, decides open-vs-blocked from the inline
393
- `<!-- blocked-by: <id> [| asked: yes|no — <reason>] -->` marker and never parses
394
- `## Blockers`. Without the marker a step that IS impossible
395
- still counts as open work to the concern, which re-engages the agent into it
396
- every stop fire until the stall rung fires — the mechanism whose job is to detect
397
- a stall manufacturing one. **The residual is real and is not papered over:**
398
- nothing enforces the pairing, so a `## Blockers` entry authored without its
399
- marker is caught by review or not at all.
400
-
401
- **The gaming vector inverted, and both directions are now named.** Under ADR-235
402
- the vector was an agent writing itself a Class-3 blocker to stop early; the
403
- defence was that a qualifying blocker must **pre-date the run**, checkable from
404
- git. That defence is kept for the narrow blocker set that remains. ADR-237 adds
405
- the opposite vector — an agent that keeps going past a spend ceiling or into an
406
- EXCLUDED action under cover of "the roadmap needed it" — and its defences are
407
- step 3 above being an enumerated list rather than a characterisation, and the
408
- ceiling being cumulative per run rather than per action.
409
-
410
- **One imprecision, inherited and now given a test.** The class taxonomy has no
411
- row for *"waiting on time"* or *"waiting on another roadmap"*; both are authored
412
- as `3` today because an absent `Class:` already means `3`. Under step 4 a wait is
413
- a blocker only when it is factually mandatory and unverifiable — a soak window a
414
- run can simply outlast, or a cross-roadmap dependency the run can satisfy itself,
415
- is work. The taxonomy still lacks the row; the mislabel now has a stated test
416
- instead of a default.
417
-
418
- ### 3d. Set contract — one contract over an enumerated set
419
-
420
- A **set contract** is the ordinary contract screen rendered over a closed,
421
- ordered list of roadmaps instead of one. It grants
422
- [`autonomy-mechanics § Task-scope`](autonomy-mechanics.md)'s **set-scoped**
423
- shape, whose four conditions (enumerated before Accept · closed · ordered with
424
- independence declared · one Accept) are the authorization contract — this
425
- section is only the loop's side of it.
426
-
427
- **What the screen must print, per member.** Roadmap path, derived branch name,
428
- open-step count, artifact count from the pre-scan, and its dependency edges.
429
- One decision sheet spans the whole set: a question that applies to several
430
- members appears once, and its answer applies to all of them.
431
-
432
- **Dependency edges come from two sources, unioned.**
433
-
434
- | Source | Shape | Trust |
435
- |---|---|---|
436
- | Declared | `depends:` in the dependent roadmap's frontmatter — a list of roadmap slugs | authoritative; a declared edge is never overridden by the heuristic |
437
- | Inferred | **file overlap**: the intersection of the owned-path sets the two pre-scans derived | advisory; an inferred edge orders the members and marks them non-parallelizable, and is printed as inferred so the user can see why |
438
-
439
- The union feeds exactly two decisions and nothing else: **ordering** (a
440
- dependent member runs after its parent) and **parallelizability** (only members
441
- with no edge between them and disjoint owned paths are lane candidates). An
442
- inferred edge is deliberately allowed to be wrong in the conservative
443
- direction — a false edge costs serial execution, a missed edge costs a
444
- collision, so overlap resolves toward *serial*.
445
-
446
- #### Auto-continuity — the next member needs no new contact
447
-
448
- Under an accepted set contract, when a member closes **green** the loop pulls
449
- the next member whose dependencies are all satisfied and starts it without a
450
- new contact. Green means: its own final report ran, its quality cadence passed,
451
- and no halt class fired. Anything else is not green and does not continue —
452
- see failure isolation below.
453
-
454
- The default stays **this one only**: auto-continuity applies to
455
- `/roadmap:next` and to any wrapper reaching this section **only when the set
456
- option was chosen on the sheet**. A single-roadmap invocation is never widened
457
- into a set because more roadmaps happened to be open, which is condition 4 of
458
- the set-scoped shape read from the loop's side.
459
-
460
- #### Failure isolation — a regression halts its own member, not the set
461
-
462
- A quality regression, a failed verify probe, or a halt class firing inside one
463
- member terminates **that member** and leaves the rest of the set running:
464
-
465
- 1. Record the member's outcome as halted, with the halt class and the evidence.
466
- 2. Skip every member that declares a dependency on it — transitively. A
467
- dependent member of a halted parent is *blocked*, not failed, and is
468
- reported as such.
469
- 3. Continue with the next independent member.
470
- 4. Report every member's outcome in one final report at the end of the set.
471
-
472
- Two carve-outs, and they are the reason this is isolation rather than
473
- tolerance. A **Hard-Floor** stop and a **locked decision class** stop the whole
474
- set, not one member: both are about the user's authority rather than about the
475
- member's code, and continuing past them under a set contract would be exactly
476
- the "several authorizations from one Accept" failure the enumeration guards
477
- against. Likewise the **N=3 validation budget** is per validation target and is
478
- not reset by moving to the next member.
479
-
480
- #### Parallel lanes — the shape, and why they are not on yet
481
-
482
- Lanes are **staged**, not shipped: the gate is ten clean serial set runs, and
483
- that gate has not been reached because no set run has happened. Recorded here
484
- so the shape is settled before the runs rather than designed under pressure:
485
-
486
- - **Cap: two lanes** in the first iteration — a recorded decision
487
- (`decision 2026-08-20`, AI council 2/2 on the `autonomy-defaults-sheet`
488
- fork), chosen over the configured `subagents.max_parallel` because a
489
- collision at two lanes is diagnosable and one at N is not. Reversible: the
490
- cap is one number in the set contract, and raising it after the first ten
491
- clean parallel runs is strictly cheaper than recovering from a lost branch.
492
- - **Candidate test:** no dependency edge in either direction, and disjoint
493
- owned paths.
494
- - **Isolation:** the existing worktree scope lock
495
- ([`worktree-lifecycle`](../../skills/worktree-lifecycle/SKILL.md)).
496
- - **Coordination:** session-register branch claims, so two sessions never share
497
- a branch.
498
- - **Delivery:** one branch and one PR per lane.
499
- - **Immediate removal:** a single scope-lock collision with data loss.
500
- - **Refusal report:** every lane report carries the fixed field
501
- `classifier_refusals` (an empty list when none) — a report without it is
502
- malformed, never "clean". At drain end the orchestrator batches every lane's
503
- field into ONE envelope (§ Host-classifier refusals).
128
+ **Ask before park · 3d set contract** — read [`roadmap-process-loop-set.md`](roadmap-process-loop-set.md#ask-before-park--a-user-decision-is-put-to-the-user-then-parked), [§ 3d](roadmap-process-loop-set.md#3d-set-contract--one-contract-over-an-enumerated-set).
504
129
 
505
130
  ## 4. Resolve cadences — read once, cache for the run
506
131
 
@@ -524,43 +149,7 @@ Missing / unreadable / unknown → fall back to `end_of_roadmap`.
524
149
  The Iron Law [`verify-before-complete`](../../rules/verify-before-complete.md)
525
150
  still forbids claiming quality output that was not produced.
526
151
 
527
- **Dashboard regen cadence** — fixed, not a setting (the
528
- `roadmap.dashboard_regen_cadence` key was retired on 2026-10-09 with its
529
- default as the behavior): `./agent-config roadmap:progress` runs every
530
- 5th closed step, at every phase boundary and at reply end.
531
-
532
- `process-step` always regens at step end. Any file-shape touch (rename / phase add / archive — Iron Law 1
533
- of [`roadmap-progress-sync`](../../rules/roadmap-progress-sync.md))
534
- forces an immediate regen regardless of cadence. The checkbox flip
535
- itself is **never** batchable — only the subprocess.
536
-
537
- ### Context refresh — a comparison, not a third cadence key
538
-
539
- There is **no `roadmap.context_refresh_cadence` setting**, deliberately. The
540
- refresh trigger is derived:
541
-
542
- ```bash
543
- agent-config roadmap:context --fingerprint # cheap: one rev-parse + one gh call
544
- ```
545
-
546
- At every phase boundary (and at run end), take the fingerprint and compare it
547
- with the one § 1's probe returned. **Differs → re-probe in full** and apply the
548
- reaction table in § 5e. **Same → nothing moved; continue without paying for a
549
- probe.** Cache the new value as the run's baseline either way.
550
-
551
- The fingerprint covers `origin/main` **and the head SHA of every open PR**. The
552
- second half is the case a `main`-only trigger misses: a peer pushing to their own
553
- PR branch mid-run can add a file that now overlaps this run's owned paths while
554
- `origin/main` has not moved at all.
555
-
556
- Why a comparison and not a knob: `docs/contracts/settings-classes.md` classifies
557
- a fixed-beat flag as `derivable` — "the mechanism itself can decide, from the
558
- situation, better than a flag can" — behind a ratchet whose count may only fall.
559
- A cadence enum was implemented, refused by `lint_settings_classes`, and replaced
560
- by this; the full reasoning, the options rejected, and what the substitution costs
561
- are in `agents/evidence/analysis/situational-awareness-cadence-key-decision.md`.
562
- Turning the refresh off is a one-line revert of this subsection, which is the same
563
- reversibility a `cadence: off` value would have bought.
152
+ **Regen cadence · context refresh** — read [`roadmap-process-loop-set.md`](roadmap-process-loop-set.md#4-resolve-cadences--read-once-cache-for-the-run).
564
153
 
565
154
  ## 5. Step loop
566
155
 
@@ -581,80 +170,24 @@ For each open step in the working set (scope-bound — see wrapper):
581
170
  (new gate must be verified once locally). Setting `true` → run
582
171
  normally. Full pattern table, carve-outs, linter contract, failure
583
172
  modes: [`roadmap-ci-steps-mechanics`](roadmap-ci-steps-mechanics.md).
584
- 1. **Bundled read — one parallel tool-call block.** The step
585
- description, the immediately-relevant code files, and any
173
+ 1. **Bundled read — one parallel tool-call block.** The step's own
174
+ section (`grep -n` its line, then a ranged read — never the whole
175
+ roadmap), the immediately-relevant code files, and any
586
176
  guideline/context the step cites are **independent** reads and
587
177
  **must** be dispatched together, not serially.
588
178
 
589
- ```
590
- parallel:
591
- - view agents/roadmaps/<file>.md (the step's section)
592
- - view <files cited in the step text>
593
- - codebase-retrieval (only if the step is vague)
594
- ```
179
+ **Batching example** — read [`roadmap-process-loop-run.md`](roadmap-process-loop-run.md#5-step-loop).
595
180
 
596
- Anti-pattern: `view step` → think → `view file A` → think →
597
- `view file B`. That's 3 round-trips for what should be 1.
598
-
599
- Fire/no-fire pair (falsifiable — the discriminator is whether a
600
- call's *input* depends on another call's *output*, never the count):
601
-
602
- - **Fires (batch these):** a step says "update the hook, its test,
603
- and the manifest entry" → `view src/scripts/hooks/foo_hook.ts` +
604
- `view tests/scripts/foo_hook.test.ts` +
605
- `view src/scripts/hook_manifest.yaml` are three independent reads
606
- whose paths are all known BEFORE the first call — dispatch all
607
- three in ONE parallel block. Issuing them serially is the
608
- violation: each extra round-trip re-transmits the accumulated
609
- context as input for zero new information.
610
- - **Does NOT fire (stays serial):** `grep -rn "buildAdvisoryLine"
611
- src/` → then `view <the file the grep found>`. The second call's
612
- path IS the first call's output — batching would mean guessing the
613
- path, and a guessed read is worse than a round-trip. Dependent
614
- calls stay serial; only the independent remainder batches.
615
181
  2. Analyze the codebase for what the step requires.
616
182
  3. Decide and act — implement. **No "should I implement this?" prompt.**
617
183
  4. **Open question handling:**
618
- - **Council on** (toggled manually, or auto-enabled for the run by
619
- an accepted execution contract — § 3) → invoke per
620
- [`ai-council`](../../skills/ai-council/SKILL.md), integrate
621
- convergence, proceed. Token spend was opted in (the contract
622
- summary named the members). `high_impact` / `user_required`
623
- classifications still escalate to the user per
624
- [`ask-when-uncertain`](../../rules/ask-when-uncertain.md).
625
- - **Second-model rung, when the class declares one**
626
- (`decision_resolution.classes.<cls>.second_model`, UOTL Phase 4.1)
627
- → one local vendor-CLI pass under subscription auth. **The rung is
628
- MODEL-CARRIED: the key is declared and schema-validated, and no
629
- TypeScript path reads it at runtime** — so "bounded by the
630
- `cli_call_budget` counter" is what the rung must respect, never
631
- something a booking consumer enforces (`cli_call_budget.ts` declares
632
- its consumer set closed at two, and this is not one of them). Stated
633
- rather than implied after R2 round 4 finding 4 found the coupling
634
- asserted on three surfaces at once. Available
635
- to `trivial` / `low_impact` / `medium_impact` only; the config
636
- schema REFUSES the key on `high_impact` and `user_required`, so no
637
- locked question can reach it.
184
+ **Council on · second-model rung** — read [`roadmap-process-loop-run.md`](roadmap-process-loop-run.md#5-step-loop).
638
185
  - **Council off / not configured** → halt, surface once, wait.
639
186
  Resume on next turn. An execution contract cannot enable a
640
187
  council that has no configured members — the contract summary
641
188
  says so upfront, and in-run ambiguity halts (never silent
642
189
  guessing).
643
- - **No self-adversarial fallback.** With neither a council nor a
644
- second-model rung available, the ambiguity halt STANDS. The gap is
645
- never filled by the agent arguing both sides of the question to
646
- itself: a monologue produces a verdict with no independent
647
- observer, which is the failure
648
- [`evaluator-independence`](../../rules/evaluator-independence.md)
649
- exists over, and reads as convergence to whoever finds it later.
650
- Halting costs one turn; a manufactured verdict costs the trust in
651
- every other verdict the run produced.
652
- - **A resolution taken WITHOUT contacting the user is recorded** —
653
- `agent-config decision:memo write --run <id> …` (question, chosen
654
- option, reasoning, resolver, confidence). The run's PR description
655
- links the directory. Not a gate: the memo is what makes an
656
- autonomous resolution reviewable after the fact, which is the
657
- condition under which it is legitimate at all.
190
+ **No self-adversarial fallback · memo** — read [`roadmap-process-loop-run.md`](roadmap-process-loop-run.md#5-step-loop).
658
191
  4b. **Stale-artefact check — a vanished file is never a closed step.**
659
192
 
660
193
  Before flipping anything, check the step's own cited paths against the tree:
@@ -670,10 +203,7 @@ For each open step in the working set (scope-bound — see wrapper):
670
203
  `[~]` (nobody deferred it) — the box stays open and the report carries the
671
204
  reason. `staleArtefactVerdict` in `roadmap_context.ts` is the predicate.
672
205
 
673
- The failure this catches is quiet: "nothing to do here" reads identically to
674
- "already done", and one of those is a closed step while the other is a lost
675
- one. A step citing no paths is unaffected — there is nothing to check, and
676
- inventing a doubt would fire this on every prose step.
206
+ **Why the stale check exists** — read [`roadmap-process-loop-run.md`](roadmap-process-loop-run.md#5-step-loop).
677
207
 
678
208
  5. **Atomic flip — same reply, every step.**
679
209
  Flip the checkbox in `agents/roadmaps/<file>.md`: `[x]` done ·
@@ -682,6 +212,10 @@ For each open step in the working set (scope-bound — see wrapper):
682
212
  [`roadmap-progress-sync`](../../rules/roadmap-progress-sync.md).
683
213
  A loop iteration that lands work without flipping its box is a
684
214
  rule violation. Do not save flips for the archive commit.
215
+ The flipped line ends with the step's receipt:
216
+ `./scripts-run src/scripts/step_receipt --range <first commit>^..HEAD`
217
+ (class, raise-only via `--raise`; what the depth table would skip).
218
+ CI flags a tick without one, and refuses it once depth is lowered.
685
219
 
686
220
  ### 5a-residue. Mid-run residue — the same ownership table, inline
687
221
 
@@ -704,10 +238,7 @@ Per-class routing, why parking is not deferring, and the scope-growth pointer:
704
238
  git status --porcelain -- agents/roadmaps/<file>.md
705
239
  ```
706
240
 
707
- (`git status --porcelain`, not `git diff` — a roadmap file that is
708
- still **untracked**, e.g. in a fresh worktree, is invisible to
709
- `git diff` and would false-halt; `--porcelain` reports both `M`
710
- and `??`.)
241
+ **Why `--porcelain`** — read [`roadmap-process-loop-run.md`](roadmap-process-loop-run.md#5b-flip-guard--deterministic).
711
242
 
712
243
  Empty output → Iron Law 2 was violated this iteration: the step
713
244
  landed work but no checkbox flipped. **Halt loudly**, surface
@@ -716,138 +247,16 @@ Per-class routing, why parking is not deferring, and the scope-growth pointer:
716
247
  resumes on the next turn. Inside one: exactly one self-fix attempt, under
717
248
  the four preconditions below.
718
249
 
719
- **One deterministic self-fix, contract mode only.** A forgotten flip is the
720
- one halt class whose repair is mechanical — the work is on disk, the step is
721
- named, and the glyph follows from the outcome. Halting a contract run on it
722
- spends a user contact to retype something the run can derive. So inside an
723
- accepted contract the run may attempt the flip **once**, and only when all
724
- four hold:
725
-
726
- 1. **The work is citable.** The step's landed change is identifiable in this
727
- iteration's own output — a diff, a file path, a command result. No
728
- evidence, no flip: that is a genuine halt, not a forgotten one.
729
- 2. **The glyph is unambiguous.** `[x]` only for a step whose evidence is
730
- present and, where the step carries a `verify:` field, whose fresh green
731
- run is in this reply. Anything that would be `[~]` or `[-]` is a
732
- *disposition*, never a repair — those halt exactly as before, because a
733
- deferral and a cancellation are decisions.
734
- 3. **Exactly one attempt, per run.** Not per step. A second forgotten flip
735
- in the same run halts: one is a slip, two is a broken loop, and the
736
- difference is the whole justification for allowing the first.
737
- 4. **The attempt is verified, then re-guarded.** Re-run the
738
- `git status --porcelain` probe above after the flip. Still empty → halt
739
- loudly as before. A self-fix that cannot prove itself is
740
- indistinguishable from the failure it was repairing.
741
-
742
- The attempt is recorded as a decision memo (§ 4 handling), so an auto-flip is
743
- reviewable after the fact rather than invisible. **Kill criterion, from the
744
- originating roadmap and repeated here because a flip is a write to the source
745
- of truth: one wrong auto-flip removes this allowance** and returns the guard
746
- to halt-always. Reversibility is the deletion of this block — the guard
747
- underneath it never changed.
748
-
749
- This guard is the deterministic counterpart to the rule's
750
- pre-send self-check — it catches a forgotten flip per step, not
751
- only at run end. It runs in every scope (`process-step`,
752
- `process-phase`, `process-full`); the cost is one `git diff` per
753
- step.
754
-
755
- **`verify:` gate (when a step carries one).** If the step declares a
756
- named `verify:` command (roadmap step-field convention, see
757
- [`templates/roadmaps.md`](../../templates/roadmaps.md)), a `[x]` flip
758
- additionally requires a **fresh green run of that exact command this
759
- iteration** — its passing output present in this reply or an earlier
760
- one this run. Flipping a `verify:`-bearing step to `[x]` without that
761
- fresh green run is the same class of violation as a forgotten flip:
762
- **halt loudly** ("step \<N\> flipped without its `verify:` run —
763
- \`<cmd>\`"), do not auto-fix. This is a check on existing output, not a
764
- new loop or a new script — the agent runs the step's own command, the
765
- same way `think-before-action`'s `step → verify:` planning already
766
- asks. Steps with no `verify:` field are governed by the flip-guard
767
- above unchanged (agent-decidable exit/acceptance criteria remain the
768
- default; `verify:` is the opt-in machine-checkable tightening).
769
-
770
- 6. **Dashboard regen — fixed cadence** (§ 4). Run
771
- `./agent-config roadmap:progress`:
772
- - after the 5th, 10th, … closed step **of this run**, or when the
773
- reply ends with closed steps pending regen;
774
- - at a phase boundary — the boundary handler in § 5 wrapper / § 6
775
- runs it;
776
- - on any file-shape touch (rename / phase add / archive — Iron Law 1)
777
- → run immediately regardless of cadence.
778
-
779
- Skipped regens accumulate into the next due regen — the markdown
780
- file is the source of truth between regens.
781
- 7. Run quality pipeline if cadence is `per_step`.
250
+ **Self-fix · `verify:` gate · steps 6-7** — read [`roadmap-process-loop-run.md`](roadmap-process-loop-run.md#5b-flip-guard--deterministic).
782
251
 
783
252
  ### 5d. Resuming a run whose previous session died
784
253
 
785
- A session above the recycle threshold and inside a running contract leaves a
786
- **deterministic checkpoint** at
787
- `agents/runtime/state/checkpoints/<run>.json` — open / done / parked counts,
788
- the next open step, and the commit the tree was on. Every field is recomputed
789
- from the roadmap on disk rather than summarised, which is what makes the next
790
- line possible.
791
-
792
254
  ```
793
255
  A RESUMED RUN RE-VERIFIES THE CHECKPOINT BEFORE ACTING ON IT.
794
256
  RESUME BY EVIDENCE, NEVER BY BOOKKEEPING.
795
257
  ```
796
258
 
797
- The first act of a resumed run is to look its checkpoint up **by roadmap slug**
798
- — `latestCheckpointFor(repoRoot, slug)` — and then `verifyCheckpoint` it against
799
- the current tree. The slug, not the run id: a relaunched session has a NEW
800
- session id, so the run-id-keyed `readCheckpoint` cannot find the checkpoint the
801
- DYING session wrote, and this instruction named an unreachable path until the
802
- R2 review's finding 7. The slug is the one key a resumed run holds by
803
- definition, because claiming the same roadmap is what makes it a resume.
804
-
805
- The per-field report then names WHICH claim went stale, which is what a bare
806
- "stale/fresh" verdict cannot. **A disagreement is not an error**: work landing
807
- between the checkpoint and the resume is the normal case (a human committed, a
808
- sibling worktree moved, the dying session finished a step it never recorded),
809
- and the `actual` column is what to resume from. Treating progress as corruption
810
- would refuse every healthy resume.
811
-
812
- **The checkpoint carries a repository fingerprint too, not only roadmap counts.**
813
- `context_fingerprint` is the `roadmap:context --fingerprint` value the dying run
814
- last held. Every other field on the checkpoint reports **roadmap** drift; none
815
- reported **repository** drift, so a run resumed after a long gap trusted a context
816
- reading it never re-took — the exact staleness § 4's refresh exists to end,
817
- reappearing across the one boundary a mid-run cadence cannot see.
818
-
819
- A resumed run therefore re-probes and passes the fresh fingerprint into
820
- `verifyCheckpoint`. A disagreement forces a full re-probe and the § 5e reactions
821
- **before the first step**. A `null` or absent value on either side reads as *not
822
- known* and never as a disagreement — the same rule `head` already follows, and for
823
- the same reason: a false alarm on the field whose job is to say whether anything
824
- moved trains the reader to skip the line.
825
-
826
- `agent-config run:supervise --once` reports which runs died with open steps
827
- left. It never merges, pushes, or closes anything — that boundary is a named
828
- rejection, not a missing feature.
829
-
830
- ### 5e. Context refresh — four reactions, enumerated and closed
831
-
832
- At each due point (§ 4 — fingerprint differs) re-probe and act. **These four rows
833
- are the whole set.** Nothing here is a halt: none of them appears on the halt list
834
- and none of them is a `blocked` outcome.
835
-
836
- | # | What the refresh found | Reaction |
837
- |---|---|---|
838
- | a | A PR touching my owned paths **merged** since the last refresh | Run `agent-config git:convention sync --base origin/<this branch's PR base>` now — already the documented resolution, only push-bound until this row existed. Re-read the current step's files, continue. |
839
- | b | An **open** PR touches my owned paths | Continue. Name the collision in the PR description and in the final report. **Never rebase onto a foreign branch.** |
840
- | c | A peer session shows `PATH OVERLAP` | Take disjoint steps first if ordering allows; otherwise name it and continue. The register is advisory, never a lock. |
841
- | d | The roadmap itself was **archived on `origin/main`** | Stop. The same **selection error** as § 1, detected late — not a halt, and no checkbox is flipped to reach it. |
842
-
843
- Deliberately NOT a drift-level taxonomy. A severity ladder over these four would
844
- invite a fifth row for every new shape of surprise, and the value here is that the
845
- set is closed: an agent that meets something outside it has met an ordinary step,
846
- not a new reaction.
847
-
848
- Row (a) is the one that changes behaviour mid-run rather than only reporting. Rows
849
- (b) and (c) exist to make the collision **visible in the artefact** — a run that
850
- silently produces a conflicting PR has spent the reviewer's time, not its own.
259
+ **Resume · 5e reactions** — read [`roadmap-process-loop-run.md`](roadmap-process-loop-run.md#5d-resuming-a-run-whose-previous-session-died), [§ 5e](roadmap-process-loop-run.md#5e-context-refresh--four-reactions-enumerated-and-closed).
851
260
 
852
261
  ### Halt conditions
853
262
 
@@ -875,49 +284,6 @@ On halt: stop, surface state, do **not** auto-fix outside the failing step.
875
284
 
876
285
  ### Terminal outcomes — `complete`, or a genuine external impossibility
877
286
 
878
- The halt list above answers *"what interrupts runnable work"*. This answers
879
- *"what does the run report when the roadmap is not finished and the remaining
880
- work is not the agent's to do"* — and under
881
- [ADR-237](../../../docs/decisions/ADR-237-end-to-end-execution-authority.md) that
882
- second set is much smaller than it looks.
883
-
884
- **The measurement that motivated the old answer, and the reading that replaced
885
- it.** Measured 2026-08-19 across the twelve most nearly complete roadmaps:
886
- **zero** could reach `count_open == 0` in one PR, because every remaining step
887
- needed "a human action" — flip branch protection, authorise paid spend, install a
888
- binary, wait out a soak window, edit a file a hook denies. The census was sound.
889
- The reading was not: it counted actions a human *conventionally* performs,
890
- without asking per action whether a human was **necessary**. Flipping a branch
891
- setting, pushing, opening a PR, re-running CI, updating a merge base, fixing a
892
- test, spending inside a budget — the agent can do all of it. That is remediation
893
- work, and a `process-full` invocation grants it.
894
-
895
- Four outcomes, and only one of them is success:
896
-
897
- | Outcome | When | What it reports |
898
- |---|---|---|
899
- | `complete` | `count_open == 0` and the PR is open | the roadmap is finished; archival check runs (§ 6) |
900
- | `blocked` | every remaining open step is **externally impossible** for the agent | the work that DID close, plus the specific impossibility |
901
- | `superseded` | the remaining work **already landed** on `origin/main`, in a merged PR | which steps the tree already satisfies, with the PR number and the evidence per step |
902
- | a halt | one of the five conditions above fired | the halt, its evidence, and what remains |
903
-
904
- **Why `superseded` is here and not on the halt list.** A run that meets a merged
905
- PR which already closed its remaining steps had, until this row existed, no legal
906
- move: *"let the open PRs merge first"* is a forbidden non-halt reason below, the
907
- halt list calls itself exhaustive, and neither `complete` nor `blocked` is true —
908
- the work is done and it was not externally impossible. The only two available
909
- actions were a rule violation or duplicate work. This row is the third.
910
-
911
- It is a **report**, not a licence to flip anything. Marking a step the tree
912
- already closed is a separate, deliberately unbuilt mechanism: it needs the step's
913
- own `verify:` green against `origin/main`, a decision memo, and a one-strike kill
914
- criterion, and an autonomous run writing a completion marker into the source of
915
- truth is not switched on unasked. Until it is, `superseded` reports and the boxes
916
- stay open — the same discipline the `[~]` prohibition below enforces for
917
- `blocked`.
918
-
919
- `blocked-preflight` **no longer exists** (ADR-237 § 4). A run always starts.
920
-
921
287
  ```
922
288
  `blocked` IS NEVER PRESENTED AS COMPLETION.
923
289
  count_open STAYS > 0. NO CHECKBOX IS FLIPPED TO [~] TO REACH IT.
@@ -926,22 +292,6 @@ BEFORE REPORTING IT, ASK PER REMAINING STEP: CAN I DO THIS AT ALL?
926
292
  ONE STEP THE AGENT COULD HAVE EXECUTED REJECTS THE CLAIM.
927
293
  ```
928
294
 
929
- **Externally impossible — the whole list**, aligned with ADR-268 § 7. A missing
930
- **owner-owned** decision — `product-owned`, `business-owned` or
931
- `destructive-owned`, and nothing else · a missing permission, secret or access ·
932
- a required credential that does not exist and the agent cannot create · a
933
- purchase beyond the delegated budget · physical hardware access · another person
934
- or organisation must act · a wait that is factually mandatory and cannot be
935
- simulated or verified · contradictory requirements · technical impossibility
936
- under the stated constraints · a needed crossing of a real authority boundary.
937
-
938
- **Not externally impossible — every one of these is work.** An unprotected
939
- branch · a branch to create · a push · a PR to open · a repository or branch
940
- setting the agent can change · a workflow to start · CI to re-run · a merge base
941
- to update · conflicts · failing tests · local configuration · a paid call under
942
- the ceiling · a failed first approach · dependency trouble · "this could be
943
- risky" · "a maintainer should do this".
944
-
945
295
  ```
946
296
  A SOLVABLE ARCHITECTURAL AMBIGUITY IS NOT `BLOCKED`. IT IS A DECISION.
947
297
  A TECHNICAL JUDGEMENT CALL IS NEVER PARKED IN A FILE — IT ROUTES BACK THROUGH
@@ -951,207 +301,18 @@ A COUNT IS NEVER A QUESTION — A BOUNDED LOOP'S BOUND TRIGGERS A STRATEGY CHANG
951
301
  AND THE ESCALATION LADDER, NEVER AN OWNER QUESTION (ADR-268 § 7).
952
302
  ```
953
303
 
954
- `blocked-by:` stays — it is how `run-continuation` reads blockedness — but a
955
- blocker entry is the record of a decision the agent **correctly did not own**;
956
- what it may point at narrows accordingly
957
- ([`decision-closure-execution`](decision-closure-execution.md)).
958
-
959
- The `[~]` prohibition is load-bearing and was the one point the council split on.
960
- Deferring a blocked step to `[~]` would let the run reach `count_open == 0` and
961
- report completion — laundering unfinished work through a glyph, which is exactly
962
- what Iron Law 3 of [`roadmap-progress-sync`](../../rules/roadmap-progress-sync.md)
963
- exists to catch on the archival side. So the boxes stay open and the outcome
964
- carries the truth instead. **ADR-237 keeps this clause verbatim** — narrowing
965
- `blocked` makes it more important, not less, because a run with more authority
966
- has more ways to reach a clean-looking count.
967
-
968
- Revalidation is the second half of the same discipline: the set is recomputed at
969
- the moment of reporting, because steps unblock during a run (a prerequisite
970
- closes, a `Run:` succeeds, a peer merges, a setting the run itself changed). If
971
- any remaining step is one the agent could execute, `blocked` is refused and the
972
- loop continues.
973
-
974
- ### Forbidden non-halt reasons — agent-invented cautions
975
-
976
- The halt list above is **exhaustive**. An agent running `process-full` (or any
977
- wrapper) must **never** stop the run for a reason it invented that is not on
978
- that list. In particular these are NOT halt conditions and stopping for them is
979
- a violation of the command and the user's will:
980
-
981
- - "running low on context / token budget" — keep landing complete steps until
982
- context actually runs out; never announce a boundary-stop by choice.
983
- - "quality would degrade / this deserves a fresh focused run later"
984
- - "avoid a PR pile-up" / "let the open PRs merge first"
985
- - "this phase is large / touches a deep subsystem"
986
- - "phase-checkpoints mode, so I'll checkpoint and wait" — under `process-full`
987
- a phase boundary emits a non-blocking status line and the run **continues**;
988
- the stop-and-wait reading of `phase-checkpoints` applies only to
989
- `process-phase`.
990
- - **"this step looks human-gated"** — the `blocked` outcome above is reached by
991
- the § 3c test, never by a judgement about how a step feels. A step with no
992
- qualifying blocker citation is runnable, and writing the citation yourself does
993
- not make it one. This entry exists because the terminal outcome is the single
994
- most abusable thing on this page.
995
- - **"the branch is not protected" / "a branch must be created" / "a PR must be
996
- opened" / "a GitHub setting must change" / "CI must be re-run" / "the merge
997
- base needs updating" / "there are conflicts" / "tests fail"** — every one is
998
- remediation work the invocation authorised (ADR-237 § 1). Do it.
999
- - **"a paid service is needed"** — authorised inside the configured
1000
- `cost.budgets` windows, and with none configured there is no ceiling to be
1001
- outside of (§ Spend in the wrapper). A crossing of a configured window pauses
1002
- and reports; it does not ask. Uncertainty about the exact cost is explicitly
1003
- NOT a reason to ask.
1004
- - **"a maintainer should do this"** when the agent can perform the same action
1005
- through git, `gh`, an API or a CLI. **Capability before role**: the role of the
1006
- person who conventionally does a thing is not a property of the thing.
1007
-
1008
- If the work genuinely cannot continue, it will be because one of the five real
1009
- halt conditions fired, or because every remaining step is externally impossible
1010
- by the § 3c test — surface THAT, with the specific impossibility named, not a
1011
- manufactured caution and not a convention mistaken for a constraint.
1012
-
1013
- ### Non-halt — gating notes, "optional" tags
1014
-
1015
- The following are **authoring annotations**, never halt conditions. Do
1016
- **not** stop execution when the roadmap text contains them:
1017
-
1018
- - `(deferred)` / `(later)` / `(optional)` tags on a step
1019
- - "Gate: Phase 1 ships and …" prose inside a later phase
1020
-
1021
- `process-step` and `process-phase` honor scope by stopping at their
1022
- configured boundary anyway. `process-full` processes every open step
1023
- regardless of these annotations — see
1024
- [`/roadmap:process-full § Iron Law`](../../commands/roadmap/process-full.md#iron-law--full-is-full).
1025
- Time-boxed plate / horizon framing is opt-in via
1026
- `roadmap.horizon_weeks` in `.agent-settings.yml` (default `0` =
1027
- forbidden, per template rule 16). When `0` and encountered in legacy
1028
- text, treat as ordinary prose; never use it to gate execution. When
1029
- `> 0`, plate framing is allowed in authoring but is still **not** a
1030
- halt condition — phase ordering and explicit dependency gates govern
1031
- execution either way.
304
+ **Terminal outcomes · non-halt reasons** — read [`roadmap-process-loop-close.md`](roadmap-process-loop-close.md#terminal-outcomes--complete-or-a-genuine-external-impossibility), [forbidden](roadmap-process-loop-run.md#forbidden-non-halt-reasons--agent-invented-cautions), [annotations](roadmap-process-loop-close.md#non-halt--gating-notes-optional-tags).
1032
305
 
1033
306
  ## 6. Final report and archival
1034
307
 
1035
308
  - Summary: scope-bound (steps/phases done in this run), council
1036
309
  consultations count (if on), steps remaining, halts.
1037
310
  - Final dashboard regen.
1038
- - **End state under an accepted execution contract** (per-mode table:
1039
- [`roadmap-execution-contract § 4`](roadmap-execution-contract.md)):
1040
- all steps `[x]` · quality green per cadence · work committed in
1041
- chunks on the run's feature branch · pushed to that branch · ONE PR
1042
- open (description-only flow) · archival sweep run. **No mode merges by
1043
- itself:** a merge needs the owner's explicit auto-merge instruction and
1044
- runs through `/pr:merge` § 9a's danger gate (ADR-282). Without a contract
1045
- (interactive mode), the run ends after the archival check with no
1046
- git delivery beyond explicitly authorized commit steps.
1047
-
1048
- ### 6-refusals. Host-classifier refusals — hand off, never route around
1049
-
1050
- When the host's own classifier refuses a step of an owner-directed task, the
1051
- run never reaches the same outcome by another tool, in smaller pieces or in
1052
- another encoding, and never records a way around it. It finishes what does not
1053
- depend on the refused step, then — owner present — asks once in-session for an
1054
- explicit authorization of that exact step and, on a yes, re-runs the SAME step
1055
- ONCE so the classifier decides again with the owner's word in front of it
1056
- (ADR-282 § Part B). Refused again, or no owner present, it writes ONE
1057
- continuation prompt for the owner and names its path in one line:
1058
-
1059
- ```bash
1060
- ./scripts-run src/scripts/refusal_envelope --input <envelope.json>
1061
- ```
311
+ **Contract end state · refusals** — read [`roadmap-process-loop-close.md`](roadmap-process-loop-close.md#6-final-report-and-archival).
1062
312
 
1063
- The input is task · done · refusals · remaining · the owner-directive record
1064
- when there is one; the envelope lands at `agents/tmp/round-<hex>/prompt.md`.
1065
- Lane refusals arrive in each lane's `classifier_refusals` field and go into the
1066
- same single envelope (ADR-282 § Part B).
1067
313
  - **If the entire roadmap reached `count_open == 0`** → run the full
1068
314
  project quality pipeline. On red → stop, surface failures, do **not**
1069
315
  archive. On green → run the **deferred-resolution gate** below before
1070
316
  archival.
1071
317
 
1072
- ### 6a. Deferred-resolution gate — Iron Law 3
1073
-
1074
- **Default: the sweep resolves it.** `archive_completed_roadmaps --all` carries
1075
- every bare `[~]` step, plus every open blocker such a step names, into a
1076
- `<slug>-carried` follow-up created in the same change (`deferral_carry.ts`),
1077
- annotates the parent `carried-to=<slug>`, and archives — the "carry item +
1078
- blocker" council row below, executed deterministically, so a finished
1079
- `/roadmap:process-full` run ends archived instead of parked at 100 %. The
1080
- manual flow below applies only to what the sweep refuses: an open blocker no
1081
- deferred step names, a hand-written annotation that fails validation, or a run
1082
- with `--no-carry`.
1083
-
1084
- **Owner-dependent blockers stop the carry.** When a carried step names a blocker
1085
- whose `Owner:` is the human (`maintainer` / `user` / `owner`, or any value that is
1086
- not `implementer` / `council` / `agent` / `ai`), the sweep writes nothing and
1087
- prints a `❓` block plus one `OWNER-DECISION {json}` line. Put that decision to
1088
- the owner as ONE numbered-options question, never resolve it yourself:
1089
-
1090
- 1. **Archive it** — run the printed `archive_command` (`… --owner-decision later --only <roadmap>`):
1091
- the parent archives, the steps and their blockers park in
1092
- `later/<slug>-carried.md`.
1093
- 2. **Step by step** — show the FIRST step (`first_step`, verbatim) with its
1094
- blocker's question, in the same message, so the owner can answer it or push
1095
- it to later in one reply. An answer → do the step, flip it, show the next
1096
- one. "Later" → leave that step `[~]` and show the next one. When no step is
1097
- left to show, run that `archive_command`: what is still
1098
- deferred parks, the parent archives.
1099
-
1100
- A **subagent** never answers this and never passes `--owner-decision` itself: it
1101
- stops and returns the `OWNER-DECISION` line verbatim, and the orchestrator puts
1102
- it to the owner. A non-interactive run ends on the question, not on a report.
1103
-
1104
- Before any `git mv` to `archive/` the sweep refused, count `[~]` items in the
1105
- closing roadmap. If `count_deferred > 0`, archival is **blocked** per
1106
- [`roadmap-progress-sync § Iron Law 3`](../../rules/roadmap-progress-sync.md).
1107
- The loop MUST:
1108
-
1109
- 1. Enumerate every `[~]` step (phase + text + optional
1110
- `<!-- deferred: ... -->` annotation).
1111
- 2. Surface the numbered-options block from
1112
- [`roadmap-management § 4b`](../../skills/roadmap-management/SKILL.md) —
1113
- five choices: follow-up (draft), follow-up (ready + blocked),
1114
- keep-in-archive (intentional drop), restore to `[ ]`, convert
1115
- to `[-]` cancelled.
1116
- 3. **Route by the preservation test**, per
1117
- [`roadmap-progress-sync § Who resolves it`](../../rules/roadmap-progress-sync.md):
1118
- a disposition that keeps the criterion ALIVE in the active estate
1119
- (fix now · carry item + blocker into a follow-up created in the SAME
1120
- change · merge into existing active work · restore to `[ ]`) may be
1121
- resolved by the council, recorded at the item. A disposition that
1122
- drops, weakens or permanently accepts the loss of it — cancel to
1123
- `[-]`, keep-in-archive, scope cut — reaches the **user**, and the
1124
- autonomous mandate (`/work`, `/roadmap:process-full`, "decide for
1125
- me") does **not** lift that half. In doubt: user. A council verdict
1126
- naming a follow-up that does not exist yet fails closed to the user.
1127
- 4. On picks 1 / 2 → run the "Spawn follow-up from deferred items"
1128
- procedure in [`roadmap-management`](../../skills/roadmap-management/SKILL.md).
1129
- On picks 3 / 4 / 5 → apply the change, re-evaluate the decision
1130
- table, archive when the gate clears.
1131
-
1132
- `count_deferred == 0` → archive. **Primary path:** run the
1133
- `archive_completed_roadmaps --all` sweep — it is untracked-safe (`git mv`,
1134
- or a plain `mv` in a pre-first-commit / untracked consumer), rewrites inbound
1135
- refs (on the index when tracked, on the filesystem when not), and regenerates
1136
- the dashboard. This entry point is **PR-independent** (gap B): it does not need
1137
- `/create-pr` to have run. **Fallback only when that script is not vendored** in
1138
- the consumer: emit a one-line instruction to vendor it (run `agents:init`),
1139
- then apply the manual procedure in
1140
- [`roadmap-management`](../../skills/roadmap-management/SKILL.md) (mkdir
1141
- `archive/`, `mv`, inbound-ref rewrite, dashboard regen). NEVER silently
1142
- delegate to a bare `git mv` that fails on untracked files and leaves a
1143
- completed roadmap rotting in the active tree.
1144
-
1145
- ## Scope deltas — what each wrapper binds
1146
-
1147
- | Wrapper | Working set | Stop after | Execution contract (§ 3) |
1148
- |---|---|---|---|
1149
- | `process-step` | Single first open step | One iteration of § 5 | Never — mode ignored |
1150
- | `process-phase` | All open steps in first phase with `count_open > 0` | Phase boundary; per-phase quality if cadence ≠ `end_of_roadmap` | When `execution.mode: autonomous \| phase-checkpoints` |
1151
- | `process-full` | Every open step across every phase, in order | Roadmap fully closed (or halt) | When `execution.mode: autonomous \| phase-checkpoints` |
1152
-
1153
- `process-full` runs the per-phase quality pipeline at every phase
1154
- boundary when cadence is `per_phase` or `per_step`; on red it halts
1155
- before the next phase. Phase-internal `(deferred)` / `(optional)` /
1156
- "gated on Phase N" annotations do not stop the run — those are
1157
- authoring notes, not halt conditions.
318
+ **Deferred-resolution gate · scope deltas** — read [`roadmap-process-loop-close.md`](roadmap-process-loop-close.md#6a-deferred-resolution-gate--iron-law-3), [scope deltas](roadmap-process-loop-close.md#scope-deltas--what-each-wrapper-binds).