@event4u/agent-config 16.5.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 (1026) 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 +463 -498
  6. package/CONTRIBUTING.md +47 -0
  7. package/README.md +25 -25
  8. package/dist/agent-src/commands/{design.md → agent-design.md} +10 -6
  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 +5 -0
  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 +1 -1
  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/agent-security-review/SKILL.md +2 -2
  98. package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +12 -4
  99. package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +7 -0
  100. package/dist/agent-src/skills/ai-council/references/advanced-modes.md +11 -1
  101. package/dist/agent-src/skills/ai-council/references/cost-and-redaction.md +7 -0
  102. package/dist/agent-src/skills/ai-council/references/execution-modes.md +7 -0
  103. package/dist/agent-src/skills/ai-council/references/output-and-synthesis.md +19 -0
  104. package/dist/agent-src/skills/ai-council/references/procedure.md +7 -0
  105. package/dist/agent-src/skills/api-design/SKILL.md +2 -2
  106. package/dist/agent-src/skills/api-endpoint/SKILL.md +2 -2
  107. package/dist/agent-src/skills/authz-review/SKILL.md +5 -3
  108. package/dist/agent-src/skills/blade-ui/SKILL.md +2 -2
  109. package/dist/agent-src/skills/brand/SKILL.md +7 -3
  110. package/dist/agent-src/skills/brand-asset-generation/SKILL.md +13 -6
  111. package/dist/agent-src/skills/brand-audit/SKILL.md +2 -1
  112. package/dist/agent-src/skills/brand-identity/SKILL.md +5 -4
  113. package/dist/agent-src/skills/brand-strategy/SKILL.md +5 -4
  114. package/dist/agent-src/skills/brand-to-tokens/SKILL.md +18 -39
  115. package/dist/agent-src/skills/brand-to-tokens/templates/marp-brand-deck.md.example +2 -2
  116. package/dist/agent-src/skills/brand-to-tokens/templates/reveal-brand-deck.yaml +2 -2
  117. package/dist/agent-src/skills/canvas-design/SKILL.md +12 -2
  118. package/dist/agent-src/skills/competitive-positioning/SKILL.md +2 -2
  119. package/dist/agent-src/skills/composer-packages/SKILL.md +18 -0
  120. package/dist/agent-src/skills/condense-memory/SKILL.md +1 -1
  121. package/dist/agent-src/skills/content-funnel-design/SKILL.md +8 -1
  122. package/dist/agent-src/skills/context-authoring/SKILL.md +1 -1
  123. package/dist/agent-src/skills/context-document/SKILL.md +2 -2
  124. package/dist/agent-src/skills/corpus-grounding/SKILL.md +6 -6
  125. package/dist/agent-src/skills/corpus-grounding/scripts/decision_engine.ts +13 -11
  126. package/dist/agent-src/skills/corpus-grounding/scripts/ground.mjs +1706 -0
  127. package/dist/agent-src/skills/corpus-grounding/scripts/schema_validator.ts +7 -1
  128. package/dist/agent-src/skills/dashboard-design/SKILL.md +1 -1
  129. package/dist/agent-src/skills/data-flow-mapper/SKILL.md +5 -2
  130. package/dist/agent-src/skills/database/SKILL.md +5 -4
  131. package/dist/agent-src/skills/decision-record/references/weighted-matrix.md +12 -0
  132. package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +1 -1
  133. package/dist/agent-src/skills/dependency-upgrade/SKILL.md +61 -11
  134. package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
  135. package/dist/agent-src/skills/design-intelligence/SKILL.md +1 -1
  136. package/dist/agent-src/skills/design-intelligence/data/landing.csv +1 -1
  137. package/dist/agent-src/skills/design-intelligence/references/context-and-registers.md +10 -2
  138. package/dist/agent-src/skills/design-intelligence/references/design-languages.md +1 -1
  139. package/dist/agent-src/skills/design-intelligence/references/design-rules-checklist.md +4 -3
  140. package/dist/agent-src/skills/design-intelligence/references/integration-mapping.md +14 -14
  141. package/dist/agent-src/skills/{wireframe → design-review}/references/story-beat-ledger.schema.json +1 -1
  142. package/dist/agent-src/skills/design-review/references/verification-automation.md +11 -3
  143. package/dist/agent-src/skills/design-system-capture/SKILL.md +15 -10
  144. package/dist/agent-src/skills/design-system-capture/references/design-system-json.md +20 -5
  145. package/dist/agent-src/skills/design-system-capture/references/import-procedure.md +2 -2
  146. package/dist/agent-src/skills/design-tokens/SKILL.md +23 -23
  147. package/dist/agent-src/skills/design-tokens/scripts/tokens.mjs +1037 -0
  148. package/dist/agent-src/skills/design-tokens/scripts/tokens.ts +336 -13
  149. package/dist/agent-src/skills/design-tokens/templates/design-tokens-starter.json +52 -53
  150. package/dist/agent-src/skills/docker/SKILL.md +1 -1
  151. package/dist/agent-src/skills/estimate-ticket/SKILL.md +1 -1
  152. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +14 -276
  153. package/dist/agent-src/skills/existing-ui-audit/procedure.yaml +44 -0
  154. package/dist/agent-src/skills/existing-ui-audit/references/anti-slop-cross-reference.md +1 -1
  155. package/dist/agent-src/skills/existing-ui-audit/references/steps/00-inspect-stack-and-input.md +4 -0
  156. package/dist/agent-src/skills/existing-ui-audit/references/steps/01-enumerate-components.md +26 -0
  157. package/dist/agent-src/skills/existing-ui-audit/references/steps/01b-detect-component-taxonomy.md +7 -0
  158. package/dist/agent-src/skills/existing-ui-audit/references/steps/02-identify-design-system.md +12 -0
  159. package/dist/agent-src/skills/existing-ui-audit/references/steps/03-detect-design-tokens.md +35 -0
  160. package/dist/agent-src/skills/existing-ui-audit/references/steps/04-detect-shadcn-inventory.md +13 -0
  161. package/dist/agent-src/skills/existing-ui-audit/references/steps/04b-live-storybook-read.md +26 -0
  162. package/dist/agent-src/skills/existing-ui-audit/references/steps/05-list-reusable-patterns.md +14 -0
  163. package/dist/agent-src/skills/existing-ui-audit/references/steps/06-match-candidates.md +52 -0
  164. package/dist/agent-src/skills/existing-ui-audit/references/steps/07-greenfield-branch.md +29 -0
  165. package/dist/agent-src/skills/existing-ui-audit/references/steps/08-a11y-baseline.md +40 -0
  166. package/dist/agent-src/skills/existing-ui-audit/references/steps/09-validate-and-write.md +5 -0
  167. package/dist/agent-src/skills/experiment-loop/SKILL.md +1 -1
  168. package/dist/agent-src/skills/fe-design/references/design-patterns.md +16 -2
  169. package/dist/agent-src/skills/fe-design/references/design-read-and-memory.md +1 -1
  170. package/dist/agent-src/skills/fe-design/references/source-led-port.md +1 -1
  171. package/dist/agent-src/skills/finishing-a-development-branch/SKILL.md +6 -6
  172. package/dist/agent-src/skills/flux/SKILL.md +1 -1
  173. package/dist/agent-src/skills/form-handler/SKILL.md +15 -2
  174. package/dist/agent-src/skills/git-workflow/SKILL.md +2 -2
  175. package/dist/agent-src/skills/git-workflow/references/branch-update.md +7 -0
  176. package/dist/agent-src/skills/git-workflow/references/commit-subject.md +12 -0
  177. package/dist/agent-src/skills/git-workflow/references/push-closes-its-loop.md +10 -0
  178. package/dist/agent-src/skills/gtm-launch/SKILL.md +8 -1
  179. package/dist/agent-src/skills/html-deck/SKILL.md +7 -2
  180. package/dist/agent-src/skills/humanizer/SKILL.md +16 -3
  181. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +13 -1
  182. package/dist/agent-src/skills/humanizer/references/fixtures.md +8 -0
  183. package/dist/agent-src/skills/js-library-packaging/SKILL.md +5 -4
  184. package/dist/agent-src/skills/js-library-packaging/scripts/check_package_surface.mjs +197 -0
  185. package/dist/agent-src/skills/judge-artifact-completeness/SKILL.md +1 -1
  186. package/dist/agent-src/skills/judge-security-auditor/SKILL.md +2 -2
  187. package/dist/agent-src/skills/launch-readiness/SKILL.md +18 -22
  188. package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +5 -5
  189. package/dist/agent-src/skills/livewire/SKILL.md +1 -1
  190. package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +18 -0
  191. package/dist/agent-src/skills/logo-generation/SKILL.md +9 -3
  192. package/dist/agent-src/skills/market-entry-analysis/SKILL.md +6 -1
  193. package/dist/agent-src/skills/markitdown/SKILL.md +1 -1
  194. package/dist/agent-src/skills/memory-consolidation/SKILL.md +2 -2
  195. package/dist/agent-src/skills/messaging-architecture/SKILL.md +8 -1
  196. package/dist/agent-src/skills/motion-choreographer/SKILL.md +2 -2
  197. package/dist/agent-src/skills/playwright-testing/SKILL.md +2 -0
  198. package/dist/agent-src/skills/positioning-strategy/SKILL.md +10 -2
  199. package/dist/agent-src/skills/prediction-pool-optimizer/references/ev-fixtures.md +13 -0
  200. package/dist/agent-src/skills/prediction-pool-optimizer/references/odds-and-bonus.md +7 -0
  201. package/dist/agent-src/skills/project-analysis-core/SKILL.md +1 -1
  202. package/dist/agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +1 -1
  203. package/dist/agent-src/skills/project-analyzer/SKILL.md +14 -75
  204. package/dist/agent-src/skills/project-analyzer/procedure.yaml +39 -0
  205. package/dist/agent-src/skills/project-analyzer/references/steps/01-project-overview.md +9 -0
  206. package/dist/agent-src/skills/project-analyzer/references/steps/02-architecture.md +7 -0
  207. package/dist/agent-src/skills/project-analyzer/references/steps/03-data-layer.md +6 -0
  208. package/dist/agent-src/skills/project-analyzer/references/steps/04-business-domains.md +7 -0
  209. package/dist/agent-src/skills/project-analyzer/references/steps/05-api-surface.md +6 -0
  210. package/dist/agent-src/skills/project-analyzer/references/steps/06-service-map.md +6 -0
  211. package/dist/agent-src/skills/project-analyzer/references/steps/07-module-inventory.md +6 -0
  212. package/dist/agent-src/skills/project-analyzer/references/steps/08-infrastructure-and-testing.md +5 -0
  213. package/dist/agent-src/skills/project-analyzer/references/steps/09-agent-docs-audit.md +6 -0
  214. package/dist/agent-src/skills/project-analyzer/references/steps/10-gap-analysis.md +6 -0
  215. package/dist/agent-src/skills/quality-tools/references/js-ts-tools.md +10 -0
  216. package/dist/agent-src/skills/quality-tools/references/php-tools.md +13 -0
  217. package/dist/agent-src/skills/quality-tools/references/python-tools.md +11 -0
  218. package/dist/agent-src/skills/react-native-setup/SKILL.md +7 -2
  219. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +5 -1
  220. package/dist/agent-src/skills/react-shadcn-ui/references/registry.md +13 -0
  221. package/dist/agent-src/skills/react-shadcn-ui/scripts/shadcn_add.mjs +315 -0
  222. package/dist/agent-src/skills/react-shadcn-ui/scripts/shadcn_add.ts +6 -6
  223. package/dist/agent-src/skills/receiving-code-review/SKILL.md +1 -1
  224. package/dist/agent-src/skills/refine-ticket/SKILL.md +2 -2
  225. package/dist/agent-src/skills/release-comms/SKILL.md +2 -1
  226. package/dist/agent-src/skills/repomix-packer/SKILL.md +2 -2
  227. package/dist/agent-src/skills/requesting-code-review/SKILL.md +3 -3
  228. package/dist/agent-src/skills/roadmap-management/references/archival.md +3 -3
  229. package/dist/agent-src/skills/roadmap-management/references/authoring.md +9 -2
  230. package/dist/agent-src/skills/roadmap-management/references/dashboard.md +3 -3
  231. package/dist/agent-src/skills/roadmap-management/references/lifecycle.md +3 -3
  232. package/dist/agent-src/skills/roadmap-writing/SKILL.md +4 -4
  233. package/dist/agent-src/skills/rtk-output-filtering/SKILL.md +1 -1
  234. package/dist/agent-src/skills/rule-writing/SKILL.md +1 -2
  235. package/dist/agent-src/skills/security/SKILL.md +41 -5
  236. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +5 -3
  237. package/dist/agent-src/skills/skill-reviewer/SKILL.md +1 -1
  238. package/dist/agent-src/skills/skill-writing/SKILL.md +23 -8
  239. package/dist/agent-src/skills/skill-writing/references/section-patterns.md +19 -1
  240. package/dist/agent-src/skills/source-discovery/SKILL.md +3 -3
  241. package/dist/agent-src/skills/sql-writing/SKILL.md +2 -2
  242. package/dist/agent-src/skills/standards-from-config/SKILL.md +2 -2
  243. package/dist/agent-src/skills/storybook-workshop/SKILL.md +5 -0
  244. package/dist/agent-src/skills/storybook-workshop/scripts/story_contrast_floor.mjs +99 -0
  245. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +13 -13
  246. package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +4 -3
  247. package/dist/agent-src/skills/svg-authoring/SKILL.md +7 -1
  248. package/dist/agent-src/skills/systematic-debugging/SKILL.md +2 -2
  249. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +8 -3
  250. package/dist/agent-src/skills/tailwind-engineer/scripts/tailwind_config_gen.mjs +482 -0
  251. package/dist/agent-src/skills/test-case-discovery/SKILL.md +1 -1
  252. package/dist/agent-src/skills/threat-modeling/SKILL.md +8 -1
  253. package/dist/agent-src/skills/threat-modeling/data/manifest.json +5 -2
  254. package/dist/agent-src/skills/threat-modeling/data/reasoning.csv +10 -10
  255. package/dist/agent-src/skills/threat-modeling/data/surfaces.csv +11 -10
  256. package/dist/agent-src/skills/threat-modeling/data/threats.csv +34 -20
  257. package/dist/agent-src/skills/type-design/SKILL.md +196 -0
  258. package/dist/agent-src/skills/type-design/references/font-spec.md +90 -0
  259. package/dist/agent-src/skills/type-design/references/gates.md +113 -0
  260. package/dist/agent-src/skills/type-design/references/toolchain.md +66 -0
  261. package/dist/agent-src/skills/typography-system/SKILL.md +21 -11
  262. package/dist/agent-src/skills/typography-system/references/worked-scales.md +85 -0
  263. package/dist/agent-src/skills/ui-apply-generic/SKILL.md +1 -1
  264. package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  265. package/dist/agent-src/skills/upstream-contribute/SKILL.md +120 -125
  266. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +1 -0
  267. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +1 -1
  268. package/dist/agent-src/skills/voice-and-tone-design/SKILL.md +71 -2
  269. package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +16 -14
  270. package/dist/agent-src/templates/AGENTS.md +1 -1
  271. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  272. package/dist/agent-src/templates/agents/proposal.example.md +1 -1
  273. package/dist/agent-src/templates/github-workflows/advisories-daily.yml +85 -0
  274. package/dist/agent-src/templates/roadmaps.md +39 -1
  275. package/dist/agent-src/templates/scripts/check_memory.ts +2 -2
  276. package/dist/agent-src/templates/scripts/historical-bug-patterns.example.yml +13 -1
  277. package/dist/agent-src/templates/scripts/work_engine/cli.ts +17 -0
  278. package/dist/agent-src/templates/scripts/work_engine/cli_args.ts +10 -0
  279. package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +22 -13
  280. package/dist/agent-src/templates/scripts/work_engine/dispatcher.ts +18 -4
  281. package/dist/agent-src/templates/scripts/work_engine/procedure/checks.ts +283 -0
  282. package/dist/agent-src/templates/scripts/work_engine/procedure/run.ts +432 -0
  283. package/dist/agent-src/templates/scripts/work_engine/procedure/sidecar.ts +185 -0
  284. package/dist/agent-src/templates/scripts/work_engine/state.ts +3 -0
  285. package/dist/cli/commands/uiRender.js +72 -17
  286. package/dist/cli/commands/uiRenderAsset.js +10 -2
  287. package/dist/cli/commands/uiRenderAssetFonts.js +158 -0
  288. package/dist/cli/commands/uiRenderAssetTypes.js +8 -20
  289. package/dist/cli/initRouting.js +1 -1
  290. package/dist/cli/mcp/dispatch.js +31 -9
  291. package/dist/cli/python/knowledge_ingest.js +7 -39
  292. package/dist/cli/python/workspace_secrets.js +4 -177
  293. package/dist/cli/registry.js +4 -1
  294. package/dist/cli-delegate/archive_completed_roadmaps.js +3 -2
  295. package/dist/cli-delegate/check_update_banner.js +635 -266
  296. package/dist/cli-delegate/{chunk-TMWYUOK4.js → chunk-2CX7NWRB.js} +224 -437
  297. package/dist/cli-delegate/{chunk-F3QDG2GT.js → chunk-2SFOOFJJ.js} +259 -159
  298. package/dist/cli-delegate/chunk-2Y5AMLMY.js +136 -0
  299. package/dist/cli-delegate/{chunk-OKJUIAPS.js → chunk-4E2W63DA.js} +1 -62
  300. package/dist/cli-delegate/{chunk-6SRJTYJS.js → chunk-4SHNERBL.js} +37 -16
  301. package/dist/cli-delegate/chunk-5VO3RTMV.js +208 -0
  302. package/dist/cli-delegate/chunk-6E2LDY4F.js +27 -0
  303. package/dist/cli-delegate/{chunk-XQTPXKFA.js → chunk-6ZD2QZMN.js} +8 -17
  304. package/dist/cli-delegate/{chunk-6V5FMA3P.js → chunk-7CEI2YPS.js} +1 -1
  305. package/dist/cli-delegate/{chunk-DMSZHXZS.js → chunk-7DRWULEQ.js} +80 -7
  306. package/dist/cli-delegate/chunk-7NXCZSDL.js +54 -0
  307. package/dist/cli-delegate/chunk-AX3U3UWJ.js +328 -0
  308. package/dist/cli-delegate/{chunk-WOKWX5PL.js → chunk-BKALSTBZ.js} +18 -3
  309. package/dist/cli-delegate/chunk-BMGUGSY6.js +103 -0
  310. package/dist/cli-delegate/chunk-BYV46VRM.js +3309 -0
  311. package/dist/cli-delegate/{chunk-5GPULQBE.js → chunk-CAL76ADI.js} +4215 -682
  312. package/dist/cli-delegate/chunk-DSY6LLCQ.js +127 -0
  313. package/dist/cli-delegate/chunk-E6XNBVE4.js +581 -0
  314. package/dist/cli-delegate/{chunk-ZUZKZYCN.js → chunk-ESUNQ5XR.js} +46 -10
  315. package/dist/cli-delegate/{chunk-G5VVIZRC.js → chunk-F7HLSW6P.js} +1 -1
  316. package/dist/cli-delegate/chunk-FIEEOH5C.js +133 -0
  317. package/dist/cli-delegate/chunk-FKYZOWVD.js +719 -0
  318. package/dist/cli-delegate/chunk-GOMILC3O.js +918 -0
  319. package/dist/cli-delegate/chunk-I4KJYVPB.js +69 -0
  320. package/dist/cli-delegate/{chunk-JQOM7TTM.js → chunk-IDAOTDPE.js} +1 -100
  321. package/dist/cli-delegate/chunk-IROAQ77A.js +137 -0
  322. package/dist/cli-delegate/chunk-J2SJZICO.js +698 -0
  323. package/dist/cli-delegate/{chunk-6YQC2HLF.js → chunk-JHMMWNJ2.js} +54 -40
  324. package/dist/cli-delegate/{chunk-WQWXGIWB.js → chunk-M6CRG5O6.js} +165 -15
  325. package/dist/cli-delegate/{chunk-PHD7OOLE.js → chunk-MQ2UDEGV.js} +14 -3
  326. package/dist/cli-delegate/chunk-NTM7G2V4.js +220 -0
  327. package/dist/cli-delegate/chunk-PV7S5DPJ.js +175 -0
  328. package/dist/cli-delegate/{chunk-F7DQWYR5.js → chunk-RAXQOETZ.js} +6 -2
  329. package/dist/cli-delegate/{chunk-T7XSJSUQ.js → chunk-SIOMDAKL.js} +980 -784
  330. package/dist/cli-delegate/{chunk-KR6EM23A.js → chunk-TULVDQ4L.js} +3 -48
  331. package/dist/cli-delegate/chunk-UUYEKXKR.js +20 -0
  332. package/dist/cli-delegate/{chunk-7XGD2OEU.js → chunk-UXWHY6CQ.js} +2 -1
  333. package/dist/cli-delegate/{chunk-PWX7CKMD.js → chunk-VC3ECUEK.js} +1 -1
  334. package/dist/cli-delegate/{chunk-KXXWJTDO.js → chunk-WMNYVIYX.js} +1 -1
  335. package/dist/cli-delegate/chunk-XCY5KKUC.js +181 -0
  336. package/dist/cli-delegate/{chunk-H76PHZBI.js → chunk-XLY5G3CM.js} +14 -19
  337. package/dist/cli-delegate/cmd_adr_effective.js +41 -2
  338. package/dist/cli-delegate/cmd_analyze_session.js +7 -7
  339. package/dist/cli-delegate/cmd_brand_status.js +1287 -10
  340. package/dist/cli-delegate/cmd_ci_settle.js +330 -0
  341. package/dist/cli-delegate/cmd_conformance.js +483 -817
  342. package/dist/cli-delegate/cmd_doctor.js +26 -16
  343. package/dist/cli-delegate/cmd_doctor_neighbours.js +10 -7
  344. package/dist/cli-delegate/cmd_explain.js +9 -24
  345. package/dist/cli-delegate/cmd_export.js +14 -11
  346. package/dist/cli-delegate/cmd_fleet.js +5 -3
  347. package/dist/cli-delegate/cmd_git_convention.js +8 -4
  348. package/dist/cli-delegate/cmd_handoff.js +79 -242
  349. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  350. package/dist/cli-delegate/cmd_memory_get.js +4 -2
  351. package/dist/cli-delegate/cmd_migrate.js +2 -2
  352. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  353. package/dist/cli-delegate/cmd_preflight.js +7 -5
  354. package/dist/cli-delegate/cmd_prune.js +16 -13
  355. package/dist/cli-delegate/cmd_route_audit.js +11 -8
  356. package/dist/cli-delegate/cmd_route_explain.js +649 -16
  357. package/dist/cli-delegate/cmd_session_recycle.js +15 -6
  358. package/dist/cli-delegate/cmd_settings_check.js +2 -2
  359. package/dist/cli-delegate/cmd_settings_get.js +1 -1
  360. package/dist/cli-delegate/cmd_settings_migrate.js +14 -11
  361. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  362. package/dist/cli-delegate/cmd_sync.js +16 -13
  363. package/dist/cli-delegate/cmd_uninstall.js +185 -31
  364. package/dist/cli-delegate/cmd_update.js +67 -3
  365. package/dist/cli-delegate/cmd_upgrade.js +38 -7
  366. package/dist/cli-delegate/cmd_validate.js +16 -13
  367. package/dist/cli-delegate/cmd_versions.js +1 -1
  368. package/dist/cli-delegate/dashboard_mode.js +1 -1
  369. package/dist/cli-delegate/gate_execute.js +4 -3
  370. package/dist/cli-delegate/roadmap_age.js +22 -0
  371. package/dist/cli-delegate/roadmap_gates.js +4 -3
  372. package/dist/cli-delegate/update_roadmap_progress.js +3 -2
  373. package/dist/cli-delegate/upgrade_unattended-VVL6JLSX.js +541 -0
  374. package/dist/discovery/deprecation-report.md +1 -1
  375. package/dist/discovery/discovery-manifest.json +373 -190
  376. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  377. package/dist/discovery/discovery-manifest.summary.md +5 -5
  378. package/dist/discovery/dormancy-report.md +1 -1
  379. package/dist/discovery/orphan-report.md +1 -1
  380. package/dist/discovery/packs.json +21 -16
  381. package/dist/discovery/trust-report.md +3 -3
  382. package/dist/discovery/workspaces.json +16 -11
  383. package/dist/hooks/chat_history.chunk.cjs +6852 -0
  384. package/dist/hooks/chat_history.chunk.cjs.sha256 +1 -0
  385. package/dist/hooks/dispatch.js +17506 -18692
  386. package/dist/hooks/dispatch.sha256 +1 -1
  387. package/dist/hooks/egress_engine.chunk.cjs +915 -0
  388. package/dist/hooks/egress_engine.chunk.cjs.sha256 +1 -0
  389. package/dist/hooks/svg_rules.chunk.cjs +281 -49
  390. package/dist/hooks/svg_rules.chunk.cjs.sha256 +1 -1
  391. package/dist/install/conflict.js +36 -6
  392. package/dist/install/conflictTracker.js +81 -7
  393. package/dist/install/detect.js +3 -3
  394. package/dist/install/hostPermissionsAdapter.js +106 -0
  395. package/dist/install/install.mjs +3117 -1949
  396. package/dist/install/installThinLayer.js +1 -1
  397. package/dist/install/manifestFiles.js +21 -0
  398. package/dist/install/noGoDenyRows.js +300 -0
  399. package/dist/install/noGoRules.js +368 -0
  400. package/dist/install/ownershipLedger.js +133 -0
  401. package/dist/install/plan.js +1 -1
  402. package/dist/install/preflight.js +39 -8
  403. package/dist/install/preserve.js +74 -12
  404. package/dist/install/recordedOwnership.js +88 -5
  405. package/dist/install/rule_scope.js +20 -3
  406. package/dist/install/stagedRuntime.js +455 -0
  407. package/dist/install/toolsArg.js +19 -0
  408. package/dist/install/userPin.js +47 -0
  409. package/dist/install/wizard-plan.js +26 -4
  410. package/dist/mcp/awesome-mcp-servers.row.md +1 -1
  411. package/dist/mcp/mcp-cloudflare-catalogue.json +3 -2
  412. package/dist/mcp/registry-manifest.json +6 -5
  413. package/dist/mcp/server.json +3 -3
  414. package/dist/mcp/server.mjs +9831 -5546
  415. package/dist/router.json +1 -1
  416. package/dist/scripts/_lib/agent_settings.js +7 -12
  417. package/dist/scripts/_lib/asset_render_record.js +219 -0
  418. package/dist/scripts/_lib/claude_builtin_names.js +9 -4
  419. package/dist/scripts/_lib/claude_settings_hooks.js +102 -34
  420. package/dist/scripts/_lib/egress_rules.js +766 -0
  421. package/dist/scripts/_lib/environment_detector.js +24 -33
  422. package/dist/scripts/_lib/global_deploy_inventory.js +146 -9
  423. package/dist/scripts/_lib/guidelines_lane.js +10 -1
  424. package/dist/scripts/_lib/identifier_redaction.js +24 -0
  425. package/dist/scripts/_lib/installed_layer.js +17 -0
  426. package/dist/scripts/_lib/installed_layer_normalise.js +72 -0
  427. package/dist/scripts/_lib/lean_projection_mode.js +34 -152
  428. package/dist/scripts/_lib/project_tree_form.js +118 -0
  429. package/dist/scripts/_lib/scoped_projection.js +133 -3
  430. package/dist/scripts/_lib/settings_removed_keys.js +29 -0
  431. package/dist/scripts/_lib/settings_renamed_keys.js +17 -5
  432. package/dist/scripts/_lib/subagent_native_fields.js +35 -0
  433. package/dist/scripts/_lib/svg_filled_counter.js +285 -0
  434. package/dist/scripts/_lib/svg_rules.js +2 -0
  435. package/dist/scripts/_lib/ui_surface.js +19 -0
  436. package/dist/scripts/_lib/verification_command.js +364 -0
  437. package/dist/scripts/_lib/workspace_secrets.js +229 -0
  438. package/dist/scripts/ai_council/seat_policy.js +27 -0
  439. package/dist/scripts/ai_council/transport_resolver.js +9 -10
  440. package/dist/scripts/condense.js +25 -29
  441. package/dist/server/io/substituteTemplate.js +2 -2
  442. package/dist/server/io/yamlIO.js +2 -2
  443. package/dist/server/routes/install.js +5 -1
  444. package/dist/server/routes/settings.js +2 -2
  445. package/dist/server/routes/wizard.js +1 -1
  446. package/dist/server/schemas/settings.js +22 -16
  447. package/dist/server/serverInfo.js +1 -1
  448. package/dist/shared/brandTokenDocument.js +47 -0
  449. package/dist/shared/brandTokenPaths.js +43 -0
  450. package/dist/shared/settingsCarveOut.js +0 -7
  451. package/dist/shared/skillRanking.js +103 -5
  452. package/dist/shared/userMd/formAdapter.js +16 -0
  453. package/dist/shared/userMd/schema.js +17 -0
  454. package/dist/ui/assets/index-w70Ado09.js +23 -0
  455. package/dist/ui/index.html +1 -1
  456. package/docs/MIGRATION.md +89 -2
  457. package/docs/THIRD-PARTY-NOTICES.md +27 -0
  458. package/docs/contracts/settings-classes.md +27 -9
  459. package/docs/guidelines/agent-infra/api-cost-levers.md +4 -3
  460. package/docs/guidelines/agent-infra/model-recommendation.md +11 -5
  461. package/docs/guidelines/agent-infra/rule-body-migration-inventory.md +1 -1
  462. package/docs/guidelines/agent-infra/self-improvement-pipeline.md +47 -24
  463. package/docs/guidelines/design-antipatterns.md +5 -0
  464. package/docs/guidelines/design-asset-discipline.md +17 -0
  465. package/docs/guidelines/design-fidelity-routing.md +1 -0
  466. package/docs/guidelines/php/api-design.md +10 -1
  467. package/llms.txt +12 -10
  468. package/package.json +13 -4
  469. package/src/agent-src/scripts/dashboard_mode.ts +4 -1
  470. package/src/agent-src/scripts/roadmap_age.ts +175 -0
  471. package/src/agent-src/scripts/update_roadmap_progress.ts +10 -2
  472. package/src/agent-src/templates/AGENTS.md +1 -1
  473. package/src/agent-src/templates/scripts/check_memory.ts +2 -2
  474. package/src/agent-src/templates/scripts/historical-bug-patterns.example.yml +13 -1
  475. package/src/agent-src/templates/scripts/work_engine/cli.ts +17 -0
  476. package/src/agent-src/templates/scripts/work_engine/cli_args.ts +10 -0
  477. package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +22 -13
  478. package/src/agent-src/templates/scripts/work_engine/dispatcher.ts +18 -4
  479. package/src/agent-src/templates/scripts/work_engine/procedure/checks.ts +283 -0
  480. package/src/agent-src/templates/scripts/work_engine/procedure/run.ts +432 -0
  481. package/src/agent-src/templates/scripts/work_engine/procedure/sidecar.ts +185 -0
  482. package/src/agent-src/templates/scripts/work_engine/state.ts +3 -0
  483. package/src/config/agent-settings.template.yml +120 -57
  484. package/src/config/agents-paths.yml +13 -7
  485. package/src/config/ci-local-parity.yml +44 -0
  486. package/src/config/continuity-surface.json +51 -2
  487. package/src/config/depth-audit-samples.json +5 -0
  488. package/src/config/discovery/command-verbs.yml +1 -0
  489. package/src/config/dispatch-economy-metrics.json +1 -0
  490. package/src/config/egress-mutations/class-precedence-swapped.json +7 -0
  491. package/src/config/egress-mutations/credential-token-restores.json +7 -0
  492. package/src/config/egress-mutations/iban-checksum-disabled.json +7 -0
  493. package/src/config/egress-mutations/raw-value-in-the-count-record.json +7 -0
  494. package/src/config/evaluator-budgets.json +4 -4
  495. package/src/config/gate-coverage.yml +149 -3
  496. package/src/config/gate-reachability-exemptions.json +3 -5
  497. package/src/config/gate-violation-baselines.json +26 -22
  498. package/src/config/gitignore-block.txt +6 -3
  499. package/src/config/hook-bundle-budget.json +34 -3
  500. package/src/config/hook-carrier-probes.json +30 -0
  501. package/src/config/hook-latency-budget.json +4 -2
  502. package/src/config/host-injection-effect.json +8 -1
  503. package/src/config/host-skill-frontmatter-keys.json +56 -0
  504. package/src/config/layer-form-brakes.json +4 -0
  505. package/src/config/layer-form-comparison-corpus.json +42 -0
  506. package/src/config/loop-surfaces.yaml +28 -47
  507. package/src/config/memory-twin-verdicts.yml +9 -1
  508. package/src/config/metric-registry.yml +40 -3
  509. package/src/config/pack-size-budget.json +15 -0
  510. package/src/config/procedure-core-budget.json +21 -0
  511. package/src/config/profiles/minimal.ini +1 -1
  512. package/src/config/project-tree-form.json +24 -0
  513. package/src/config/reach-channels.yml +3 -3
  514. package/src/config/reach-prescriptions-intake.yml +1 -1
  515. package/src/config/roadmap-step-size-baseline.json +118 -0
  516. package/src/config/routing-coverage-seed.json +93 -2
  517. package/src/config/skill-body-budget.json +686 -0
  518. package/src/config/skill-fork-pilot.json +17 -0
  519. package/src/config/skill-lifecycle-probes-codex.json +57 -0
  520. package/src/config/skill-lifecycle-probes.json +57 -0
  521. package/src/config/skill-output-shape.json +316 -0
  522. package/src/config/step-depth-table.json +58 -0
  523. package/src/config/turnaround-budget.json +90 -0
  524. package/src/install/conflict.ts +38 -6
  525. package/src/install/conflictTracker.ts +126 -8
  526. package/src/install/detect.ts +3 -3
  527. package/src/install/hostPermissionsAdapter.ts +136 -0
  528. package/src/install/installThinLayer.ts +6 -1
  529. package/src/install/manifestFiles.ts +24 -0
  530. package/src/install/noGoDenyRows.ts +368 -0
  531. package/src/install/noGoRules.ts +438 -0
  532. package/src/install/ownershipLedger.ts +180 -0
  533. package/src/install/plan.ts +1 -1
  534. package/src/install/preflight.ts +42 -10
  535. package/src/install/preserve.ts +94 -12
  536. package/src/install/recordedOwnership.ts +121 -3
  537. package/src/install/rule_scope.ts +20 -3
  538. package/src/install/stagedRuntime.ts +528 -0
  539. package/src/install/toolsArg.ts +16 -0
  540. package/src/install/types.ts +23 -2
  541. package/src/install/userPin.ts +54 -0
  542. package/src/install/wizard-plan.ts +25 -4
  543. package/src/scripts/_cli/_doctor_emit.ts +24 -0
  544. package/src/scripts/_cli/cmd_brand_status.ts +223 -12
  545. package/src/scripts/_cli/cmd_ci_settle.ts +32 -0
  546. package/src/scripts/_cli/cmd_doctor.ts +23 -44
  547. package/src/scripts/_cli/cmd_route_explain.ts +176 -2
  548. package/src/scripts/_cli/cmd_uninstall.ts +270 -26
  549. package/src/scripts/_cli/cmd_update.ts +34 -1
  550. package/src/scripts/_cli/cmd_upgrade.ts +38 -2
  551. package/src/scripts/_cli/detection_report.ts +7 -0
  552. package/src/scripts/_cli/doctor_execution.ts +1 -2
  553. package/src/scripts/_cli/doctor_install_mode.ts +39 -0
  554. package/src/scripts/_cli/doctor_network_posture.ts +3 -3
  555. package/src/scripts/_cli/doctor_ownership_ledger.ts +126 -0
  556. package/src/scripts/_cli/doctor_update_verdict.ts +104 -0
  557. package/src/scripts/_cli/explain_last/scrubber.ts +9 -21
  558. package/src/scripts/_cli/upgrade_unattended.ts +548 -0
  559. package/src/scripts/_dispatch.bash +42 -9
  560. package/src/scripts/_lib/activation_ladder.ts +1 -1
  561. package/src/scripts/_lib/advisory_inventory.ts +405 -0
  562. package/src/scripts/_lib/advisory_notice.ts +270 -0
  563. package/src/scripts/_lib/advisory_sources.ts +752 -0
  564. package/src/scripts/_lib/advisory_verdicts.ts +363 -0
  565. package/src/scripts/_lib/agent_artifact_location.ts +177 -0
  566. package/src/scripts/_lib/agent_settings.ts +7 -12
  567. package/src/scripts/_lib/arrival_record.ts +217 -0
  568. package/src/scripts/_lib/asset_render_record.ts +247 -0
  569. package/src/scripts/_lib/billing_grant.ts +4 -2
  570. package/src/scripts/_lib/brand_voice_slot.ts +258 -0
  571. package/src/scripts/_lib/canary_status.ts +24 -0
  572. package/src/scripts/_lib/cc_transcript.ts +276 -0
  573. package/src/scripts/_lib/changelog_eras.ts +83 -0
  574. package/src/scripts/_lib/claim_phrases.ts +71 -0
  575. package/src/scripts/_lib/classify_update.ts +171 -0
  576. package/src/scripts/_lib/claude_builtin_names.ts +9 -4
  577. package/src/scripts/_lib/claude_hook_scope.ts +195 -0
  578. package/src/scripts/_lib/claude_settings_hooks.ts +118 -34
  579. package/src/scripts/_lib/codex_resident_set.ts +460 -0
  580. package/src/scripts/_lib/codex_skill_finder.ts +225 -0
  581. package/src/scripts/_lib/confusables.ts +19 -0
  582. package/src/scripts/_lib/consumer_impact.ts +199 -0
  583. package/src/scripts/_lib/content_class.ts +127 -0
  584. package/src/scripts/_lib/counted_probe.ts +68 -1
  585. package/src/scripts/_lib/credential_deny_rows.ts +151 -0
  586. package/src/scripts/_lib/credential_files.ts +367 -0
  587. package/src/scripts/_lib/delivery_arm_experiment.ts +2 -2
  588. package/src/scripts/_lib/depth_flip.ts +141 -0
  589. package/src/scripts/_lib/design_lock.ts +117 -0
  590. package/src/scripts/_lib/design_sync_ledger.ts +142 -0
  591. package/src/scripts/_lib/design_sync_plan.ts +177 -0
  592. package/src/scripts/_lib/design_sync_reconcile.ts +159 -0
  593. package/src/scripts/_lib/design_sync_verify.ts +99 -0
  594. package/src/scripts/_lib/design_system_claude_design.ts +323 -0
  595. package/src/scripts/_lib/design_system_import.ts +84 -6
  596. package/src/scripts/_lib/dispatch_import_closure.ts +42 -11
  597. package/src/scripts/_lib/egress_credential_env.ts +35 -0
  598. package/src/scripts/_lib/egress_engine.ts +22 -0
  599. package/src/scripts/_lib/egress_known_values.ts +223 -0
  600. package/src/scripts/_lib/egress_normalize.ts +67 -0
  601. package/src/scripts/_lib/egress_prefixes.ts +42 -0
  602. package/src/scripts/_lib/egress_rules.ts +896 -0
  603. package/src/scripts/_lib/egress_rules_linearity.ts +56 -0
  604. package/src/scripts/_lib/egress_sender_scan.ts +290 -0
  605. package/src/scripts/_lib/egress_session_table.ts +510 -0
  606. package/src/scripts/_lib/egress_text.ts +63 -0
  607. package/src/scripts/_lib/egress_token.ts +252 -0
  608. package/src/scripts/_lib/empty_cycles.ts +1 -1
  609. package/src/scripts/_lib/environment_detector.ts +45 -30
  610. package/src/scripts/_lib/exemption_shape.ts +75 -1
  611. package/src/scripts/_lib/floor_posture.ts +185 -0
  612. package/src/scripts/_lib/forge_protection.ts +140 -2
  613. package/src/scripts/_lib/global_deploy_inventory.ts +159 -6
  614. package/src/scripts/_lib/guidelines_lane.ts +12 -1
  615. package/src/scripts/_lib/hand_kinds.ts +65 -0
  616. package/src/scripts/_lib/headless_invocation.ts +3 -3
  617. package/src/scripts/_lib/host_capability.ts +34 -2
  618. package/src/scripts/_lib/host_env_write.ts +39 -18
  619. package/src/scripts/_lib/host_listing_model.ts +14 -7
  620. package/src/scripts/_lib/identifier_redaction.ts +26 -0
  621. package/src/scripts/_lib/impact_bump.ts +70 -0
  622. package/src/scripts/_lib/install_reach_checks.ts +53 -1
  623. package/src/scripts/_lib/installed_layer.ts +31 -0
  624. package/src/scripts/_lib/installed_layer_normalise.ts +75 -0
  625. package/src/scripts/_lib/instructions_loaded_classify.ts +75 -0
  626. package/src/scripts/_lib/instructions_loaded_event.ts +53 -0
  627. package/src/scripts/_lib/knowledge_global_redaction.ts +2 -2
  628. package/src/scripts/_lib/layer_form_corpus.ts +165 -0
  629. package/src/scripts/_lib/layer_form_decision.ts +248 -0
  630. package/src/scripts/_lib/layer_form_evidence.ts +112 -0
  631. package/src/scripts/_lib/lean_projection_mode.ts +32 -161
  632. package/src/scripts/_lib/llm_proposer_transport.ts +1 -0
  633. package/src/scripts/_lib/loop_guards.ts +8 -120
  634. package/src/scripts/_lib/major_surface.ts +207 -0
  635. package/src/scripts/_lib/mcp_bridge.ts +30 -69
  636. package/src/scripts/_lib/merge_clearance_record.ts +384 -0
  637. package/src/scripts/_lib/neighbour_census.ts +18 -1
  638. package/src/scripts/_lib/orchestration_record.ts +61 -0
  639. package/src/scripts/_lib/outcome_vocabularies.ts +15 -23
  640. package/src/scripts/_lib/pin_advice.ts +49 -0
  641. package/src/scripts/_lib/platform_anchor.ts +222 -0
  642. package/src/scripts/_lib/procedure_checks.ts +5 -0
  643. package/src/scripts/_lib/project_tree_form.ts +134 -0
  644. package/src/scripts/_lib/projection_key_migration.ts +122 -0
  645. package/src/scripts/_lib/prompt_shape.ts +13 -2
  646. package/src/scripts/_lib/provenance_verify.ts +272 -0
  647. package/src/scripts/_lib/quota_parked.ts +27 -1
  648. package/src/scripts/_lib/ratification_artifact.ts +64 -1
  649. package/src/scripts/_lib/ratification_subject.ts +508 -46
  650. package/src/scripts/_lib/release_findings_ingest.ts +52 -5
  651. package/src/scripts/_lib/release_highlights.ts +72 -2
  652. package/src/scripts/_lib/release_settings_surface.ts +392 -0
  653. package/src/scripts/_lib/review_round.ts +134 -0
  654. package/src/scripts/_lib/roadmap_checkboxes.ts +1 -1
  655. package/src/scripts/_lib/roadmap_slug_lock.ts +254 -0
  656. package/src/scripts/_lib/roadmap_step_size.ts +75 -0
  657. package/src/scripts/_lib/run_checkpoint.ts +60 -3
  658. package/src/scripts/_lib/runtime_wiring_checks.ts +15 -1
  659. package/src/scripts/_lib/scope_guard.sh +64 -5
  660. package/src/scripts/_lib/scoped_projection.ts +136 -3
  661. package/src/scripts/_lib/secret_detector.ts +24 -103
  662. package/src/scripts/_lib/security_fix.ts +429 -0
  663. package/src/scripts/_lib/security_fix_context.ts +133 -0
  664. package/src/scripts/_lib/self_repair.ts +69 -39
  665. package/src/scripts/_lib/self_repair_outgoing.ts +209 -0
  666. package/src/scripts/_lib/self_repair_payload.ts +86 -0
  667. package/src/scripts/_lib/session_eol.ts +3 -0
  668. package/src/scripts/_lib/session_pr_watch.ts +207 -0
  669. package/src/scripts/_lib/session_register.ts +51 -1
  670. package/src/scripts/_lib/session_tag.ts +51 -0
  671. package/src/scripts/_lib/settings_removed_keys.ts +30 -0
  672. package/src/scripts/_lib/settings_renamed_keys.ts +19 -5
  673. package/src/scripts/_lib/skill_catalogue.ts +66 -25
  674. package/src/scripts/_lib/skill_fork_pilot.ts +121 -0
  675. package/src/scripts/_lib/skill_leases.ts +203 -0
  676. package/src/scripts/_lib/skill_listing_overrides.ts +294 -0
  677. package/src/scripts/_lib/skill_materialisation.ts +388 -0
  678. package/src/scripts/_lib/skill_materialisation_gate.ts +210 -0
  679. package/src/scripts/_lib/skill_materialisation_lock.ts +149 -0
  680. package/src/scripts/_lib/skill_materialisation_triggers.ts +96 -0
  681. package/src/scripts/_lib/skill_origin.ts +21 -1
  682. package/src/scripts/_lib/skill_reach.ts +342 -0
  683. package/src/scripts/_lib/source_shape.ts +7 -2
  684. package/src/scripts/_lib/sqlite_guard.ts +1 -1
  685. package/src/scripts/_lib/step_anatomy.ts +330 -0
  686. package/src/scripts/_lib/subagent_capsule.ts +8 -2
  687. package/src/scripts/_lib/subagent_native_fields.ts +30 -0
  688. package/src/scripts/_lib/subagent_spawn.ts +36 -0
  689. package/src/scripts/_lib/subagent_steering.ts +367 -0
  690. package/src/scripts/_lib/svg_filled_counter.ts +287 -0
  691. package/src/scripts/_lib/svg_rules.ts +2 -0
  692. package/src/scripts/_lib/test_delta.ts +89 -6
  693. package/src/scripts/_lib/tier_downshift_verdict.ts +222 -0
  694. package/src/scripts/_lib/tool_result_census.ts +62 -0
  695. package/src/scripts/_lib/trigger_routers.ts +1 -0
  696. package/src/scripts/_lib/turnaround_throughput.ts +378 -0
  697. package/src/scripts/_lib/ui_surface.ts +22 -0
  698. package/src/scripts/_lib/unattended_gates.ts +100 -0
  699. package/src/scripts/_lib/undeployed_fixes.ts +34 -0
  700. package/src/scripts/_lib/update_check.ts +143 -12
  701. package/src/scripts/_lib/update_invite.ts +116 -0
  702. package/src/scripts/_lib/update_notice.ts +259 -0
  703. package/src/scripts/_lib/verify_clause.ts +4 -2
  704. package/src/scripts/_lib/version_order.ts +146 -0
  705. package/src/scripts/_lib/worker_reuse.ts +191 -0
  706. package/src/scripts/_lib/workspace_secrets.ts +273 -0
  707. package/src/scripts/_lib/worktree_git.ts +67 -0
  708. package/src/scripts/_lib/worktree_ignored.ts +116 -0
  709. package/src/scripts/adoption_status.ts +330 -3
  710. package/src/scripts/adr_cite_check.ts +93 -0
  711. package/src/scripts/advisories.ts +803 -0
  712. package/src/scripts/ai-image/adapters/flux.sh +1 -0
  713. package/src/scripts/ai-image/adapters/gemini-image.sh +1 -0
  714. package/src/scripts/ai-image/adapters/ideogram.sh +1 -0
  715. package/src/scripts/ai-image/adapters/recraft.sh +1 -0
  716. package/src/scripts/ai-video/adapters/comfyui.sh +1 -0
  717. package/src/scripts/ai-video/adapters/fal.sh +1 -0
  718. package/src/scripts/ai-video/adapters/gemini-veo.sh +1 -0
  719. package/src/scripts/ai-video/adapters/higgsfield.sh +1 -0
  720. package/src/scripts/ai-video/adapters/kling.sh +1 -0
  721. package/src/scripts/ai-video/adapters/musetalk.sh +1 -0
  722. package/src/scripts/ai-video/adapters/openai-images.sh +1 -0
  723. package/src/scripts/ai-video/adapters/replicate.sh +1 -0
  724. package/src/scripts/ai-video/adapters/sora.sh +1 -0
  725. package/src/scripts/ai-video/adapters/syncso.sh +1 -0
  726. package/src/scripts/ai-video/stitch.sh +115 -2
  727. package/src/scripts/ai_council/airgap.ts +1 -0
  728. package/src/scripts/ai_council/api_transport.ts +27 -4
  729. package/src/scripts/ai_council/budget_guard.ts +300 -11
  730. package/src/scripts/ai_council/bundler.ts +20 -29
  731. package/src/scripts/ai_council/chairman.ts +17 -2
  732. package/src/scripts/ai_council/cli_agency_bounds.ts +158 -0
  733. package/src/scripts/ai_council/cli_launch_env.ts +54 -0
  734. package/src/scripts/ai_council/cli_least_agency_canary.ts +18 -2
  735. package/src/scripts/ai_council/clients.ts +55 -73
  736. package/src/scripts/ai_council/config.ts +16 -22
  737. package/src/scripts/ai_council/council_egress.ts +167 -0
  738. package/src/scripts/ai_council/exposure_ledger.ts +117 -0
  739. package/src/scripts/ai_council/free_hand_shadow.ts +276 -0
  740. package/src/scripts/ai_council/free_route.ts +216 -0
  741. package/src/scripts/ai_council/free_route_catalog.ts +173 -0
  742. package/src/scripts/ai_council/free_route_client.ts +95 -0
  743. package/src/scripts/ai_council/free_rung.ts +61 -0
  744. package/src/scripts/ai_council/hand_payload.ts +230 -0
  745. package/src/scripts/ai_council/hand_schemas.ts +123 -0
  746. package/src/scripts/ai_council/jury_aggregate.ts +155 -1
  747. package/src/scripts/ai_council/kind_flip.ts +221 -0
  748. package/src/scripts/ai_council/kind_flip_state.ts +19 -0
  749. package/src/scripts/ai_council/learn_low_impact_preview.ts +50 -22
  750. package/src/scripts/ai_council/modification_review.ts +98 -5
  751. package/src/scripts/ai_council/necessity.ts +7 -0
  752. package/src/scripts/ai_council/orchestrator.ts +16 -16
  753. package/src/scripts/ai_council/pricing.ts +10 -0
  754. package/src/scripts/ai_council/redact_low_impact_entry.ts +5 -2
  755. package/src/scripts/ai_council/response_render.ts +27 -4
  756. package/src/scripts/ai_council/round_reservations.ts +119 -0
  757. package/src/scripts/ai_council/route_chooser.ts +161 -0
  758. package/src/scripts/ai_council/route_liveness.ts +152 -0
  759. package/src/scripts/ai_council/route_member.ts +52 -0
  760. package/src/scripts/ai_council/seat_policy.ts +40 -0
  761. package/src/scripts/ai_council/seat_resume.ts +40 -0
  762. package/src/scripts/ai_council/shadow_dispatch.ts +13 -3
  763. package/src/scripts/ai_council/spend_gate.ts +18 -2
  764. package/src/scripts/ai_council/status_surface.ts +37 -0
  765. package/src/scripts/ai_council/transport_resolver.ts +15 -18
  766. package/src/scripts/analysis_analysts.ts +226 -0
  767. package/src/scripts/analysis_anchors.ts +140 -0
  768. package/src/scripts/analysis_and_optimize.ts +44 -0
  769. package/src/scripts/analysis_emit.ts +150 -0
  770. package/src/scripts/analysis_exchange.ts +186 -0
  771. package/src/scripts/analysis_gate.ts +158 -0
  772. package/src/scripts/analysis_inbox_final.ts +173 -0
  773. package/src/scripts/analysis_ledger.ts +119 -0
  774. package/src/scripts/analysis_pr_optimize.ts +219 -0
  775. package/src/scripts/analysis_pr_review.ts +240 -0
  776. package/src/scripts/analysis_pr_target.ts +121 -0
  777. package/src/scripts/analysis_prompts.ts +130 -0
  778. package/src/scripts/analysis_publish.ts +358 -0
  779. package/src/scripts/analysis_questions.ts +78 -0
  780. package/src/scripts/analysis_run.ts +248 -0
  781. package/src/scripts/analysis_run_record.ts +210 -0
  782. package/src/scripts/analysis_target.ts +343 -0
  783. package/src/scripts/analysis_validate.ts +161 -0
  784. package/src/scripts/anchor_eval_falsify.ts +1 -1
  785. package/src/scripts/arrival_report.ts +115 -0
  786. package/src/scripts/ask_transport.ts +284 -35
  787. package/src/scripts/backfill_model_tier.ts +4 -5
  788. package/src/scripts/before_complete_hook.ts +48 -2
  789. package/src/scripts/bench_hook_latency.ts +3 -3
  790. package/src/scripts/bench_procedure_cursor.ts +440 -0
  791. package/src/scripts/bootstrap.sh +3 -3
  792. package/src/scripts/build_exit_code_register.ts +440 -0
  793. package/src/scripts/build_proof.ts +23 -1
  794. package/src/scripts/cache_realization_report.ts +155 -14
  795. package/src/scripts/canary_liveness.ts +117 -0
  796. package/src/scripts/chat_history.ts +12 -15
  797. package/src/scripts/check_account_surface.ts +318 -0
  798. package/src/scripts/check_agent_artifact_location.ts +17 -160
  799. package/src/scripts/check_bundle_path_leakage.ts +6 -0
  800. package/src/scripts/check_ci_local_parity.ts +21 -13
  801. package/src/scripts/check_claims.ts +77 -2
  802. package/src/scripts/check_completion_review.ts +34 -1
  803. package/src/scripts/check_concern_admissions.ts +41 -5
  804. package/src/scripts/check_consumer_scope_flip.ts +1 -1
  805. package/src/scripts/check_context_paths.ts +2 -0
  806. package/src/scripts/check_council_layout.ts +9 -0
  807. package/src/scripts/check_credential_spelling.ts +267 -0
  808. package/src/scripts/check_egress_mutations.ts +239 -0
  809. package/src/scripts/check_enforcement_coverage.ts +16 -3
  810. package/src/scripts/check_estate_count.ts +16 -1
  811. package/src/scripts/check_finding_dispositions.ts +147 -0
  812. package/src/scripts/check_gate_coverage.ts +123 -21
  813. package/src/scripts/check_gate_reachability.ts +16 -2
  814. package/src/scripts/check_generator_sync.ts +46 -0
  815. package/src/scripts/check_hook_bundle_composition.ts +139 -1
  816. package/src/scripts/check_host_docs_digest.ts +142 -5
  817. package/src/scripts/check_kernel_edit_ratified.ts +301 -76
  818. package/src/scripts/check_kernel_rule_bundle.ts +14 -10
  819. package/src/scripts/check_knowledge_cards.ts +83 -3
  820. package/src/scripts/check_memory.ts +13 -3
  821. package/src/scripts/check_pack_size.ts +1 -1
  822. package/src/scripts/check_permission_deny_syntax.ts +247 -0
  823. package/src/scripts/check_platform_anchor.ts +243 -0
  824. package/src/scripts/check_proposal.ts +183 -1
  825. package/src/scripts/check_reach_channels.ts +5 -3
  826. package/src/scripts/check_references.ts +5 -2
  827. package/src/scripts/check_release_manifest_content.ts +33 -0
  828. package/src/scripts/check_release_pr_shape.ts +5 -0
  829. package/src/scripts/check_rule_invariants.ts +9 -1
  830. package/src/scripts/check_skill_body_budget.ts +343 -0
  831. package/src/scripts/check_skill_requires.ts +137 -1
  832. package/src/scripts/check_step_receipts.ts +246 -0
  833. package/src/scripts/check_structural_breaking.ts +7 -1
  834. package/src/scripts/check_suppression_hygiene.ts +8 -0
  835. package/src/scripts/check_test_weakening.ts +14 -0
  836. package/src/scripts/check_token_quality_golden.ts +5 -1
  837. package/src/scripts/check_update_banner.ts +50 -3
  838. package/src/scripts/check_verify_expectation_delta.ts +2 -1
  839. package/src/scripts/check_voice_lexicon.ts +531 -0
  840. package/src/scripts/ci_os_attribution.ts +327 -0
  841. package/src/scripts/ci_platform_scope.ts +69 -0
  842. package/src/scripts/ci_settle.ts +4 -1
  843. package/src/scripts/ci_status.ts +0 -1
  844. package/src/scripts/ci_time_to_green.ts +748 -0
  845. package/src/scripts/classify_merge_risk.ts +407 -19
  846. package/src/scripts/code_graph/sqlite_store.ts +1 -1
  847. package/src/scripts/compile_trigger_evals.ts +353 -0
  848. package/src/scripts/condense.ts +25 -31
  849. package/src/scripts/consumer_matrix.ts +61 -3
  850. package/src/scripts/council_availability_hook.ts +12 -4
  851. package/src/scripts/council_cli.ts +48 -38
  852. package/src/scripts/cross_repo_retrieve.ts +9 -72
  853. package/src/scripts/design_lock.ts +106 -0
  854. package/src/scripts/design_slop_rules.ts +30 -0
  855. package/src/scripts/design_sync.ts +264 -0
  856. package/src/scripts/design_system_import.ts +30 -13
  857. package/src/scripts/dispatch_economy_report.ts +46 -1
  858. package/src/scripts/dispatch_r2_reviewer.ts +41 -5
  859. package/src/scripts/egress_canary.ts +166 -0
  860. package/src/scripts/egress_sender_census.ts +101 -0
  861. package/src/scripts/external_sources_denylist.json +94 -12
  862. package/src/scripts/generate_catalog.ts +6 -2
  863. package/src/scripts/generate_owned_digest.ts +163 -0
  864. package/src/scripts/generate_reference_toc.ts +143 -0
  865. package/src/scripts/generate_subagent_floor.ts +11 -1
  866. package/src/scripts/handoff_context_hook.ts +34 -0
  867. package/src/scripts/hook_carrier_census.ts +263 -0
  868. package/src/scripts/hook_chunks.d.mts +12 -0
  869. package/src/scripts/hook_chunks.mjs +114 -0
  870. package/src/scripts/hook_manifest.json +1 -1
  871. package/src/scripts/hook_manifest.yaml +65 -42
  872. package/src/scripts/hooks/block_config_weakening.ts +127 -3
  873. package/src/scripts/hooks/block_credential_reads.ts +165 -0
  874. package/src/scripts/hooks/block_no_verify.ts +47 -23
  875. package/src/scripts/hooks/block_speaking_inbox_dir.ts +38 -7
  876. package/src/scripts/hooks/category_a.ts +202 -25
  877. package/src/scripts/hooks/concern_failure_policy.ts +6 -6
  878. package/src/scripts/hooks/concern_registry.ts +31 -6
  879. package/src/scripts/hooks/concern_registry_types.ts +11 -0
  880. package/src/scripts/hooks/delegation_nudge_hook.ts +105 -15
  881. package/src/scripts/hooks/design_pass_hook.ts +42 -10
  882. package/src/scripts/hooks/dispatch_hook.ts +13 -12
  883. package/src/scripts/hooks/egress_engine_loader.ts +125 -0
  884. package/src/scripts/hooks/egress_stage.ts +440 -0
  885. package/src/scripts/hooks/hook_stdin.ts +29 -4
  886. package/src/scripts/hooks/host_docs_pages.ts +194 -0
  887. package/src/scripts/hooks/host_docs_pages.yaml +75 -0
  888. package/src/scripts/hooks/host_lowering.json +1 -1
  889. package/src/scripts/hooks/host_lowering.yaml +22 -21
  890. package/src/scripts/hooks/host_rate_marker_hook.ts +73 -0
  891. package/src/scripts/hooks/instructions_observer_hook.ts +170 -0
  892. package/src/scripts/hooks/interruption_ledger_hook.ts +1 -1
  893. package/src/scripts/hooks/lazy_concern.ts +148 -0
  894. package/src/scripts/hooks/orchestration_record_hook.ts +80 -2
  895. package/src/scripts/hooks/payload_stub.ts +16 -6
  896. package/src/scripts/hooks/permission_gate.ts +7 -7
  897. package/src/scripts/hooks/push_settle_hook.ts +32 -3
  898. package/src/scripts/hooks/replay_hook.ts +43 -0
  899. package/src/scripts/hooks/reread_guard_hook.ts +87 -10
  900. package/src/scripts/hooks/rtk_wrap_hook.ts +4 -3
  901. package/src/scripts/hooks/rule_inject_hook.ts +8 -1
  902. package/src/scripts/hooks/session_eol_hook.ts +48 -1
  903. package/src/scripts/hooks/source_first_gate_hook.ts +6 -8
  904. package/src/scripts/hooks/spawn_guard_shadow_hook.ts +203 -10
  905. package/src/scripts/hooks/state_io.ts +2 -2
  906. package/src/scripts/hooks/svg_obligation.ts +75 -19
  907. package/src/scripts/hooks/tool_result_bytes_hook.ts +14 -5
  908. package/src/scripts/hooks/turn_end_gate_hook.ts +1 -1
  909. package/src/scripts/hooks/ui_route_nudge_hook.ts +2 -12
  910. package/src/scripts/hooks_doctor.ts +31 -0
  911. package/src/scripts/hooks_status.ts +58 -3
  912. package/src/scripts/inbox_source_census.ts +74 -13
  913. package/src/scripts/install +25 -3
  914. package/src/scripts/install.ts +60 -91
  915. package/src/scripts/interruption_report.ts +11 -1
  916. package/src/scripts/layer_baseline_report.ts +267 -0
  917. package/src/scripts/learning_sidecar.ts +1 -1
  918. package/src/scripts/lint_agents_layout.ts +3 -0
  919. package/src/scripts/lint_blocker_citations.ts +104 -0
  920. package/src/scripts/lint_breaking_changes_index.ts +40 -7
  921. package/src/scripts/lint_consolidation_lineage.ts +144 -16
  922. package/src/scripts/lint_consumer_internal_refs.ts +90 -42
  923. package/src/scripts/lint_context_spine_usage.ts +21 -0
  924. package/src/scripts/lint_design_antipattern_parity.ts +39 -7
  925. package/src/scripts/lint_evidence_artifacts.ts +31 -0
  926. package/src/scripts/lint_example_fences.ts +11 -2
  927. package/src/scripts/lint_ghostwriter_source.ts +42 -10
  928. package/src/scripts/lint_hook_manifest.ts +94 -0
  929. package/src/scripts/lint_marketplace_install_completeness.ts +4 -0
  930. package/src/scripts/lint_mcp_config_security.ts +9 -11
  931. package/src/scripts/lint_plan_risk_register.ts +28 -1
  932. package/src/scripts/lint_positioning.ts +4 -4
  933. package/src/scripts/lint_provenance.ts +1 -0
  934. package/src/scripts/lint_roadmap_blockers.ts +65 -4
  935. package/src/scripts/lint_roadmap_complexity.ts +98 -0
  936. package/src/scripts/lint_skill_link_reach.ts +251 -9
  937. package/src/scripts/lint_skill_procedures.ts +252 -0
  938. package/src/scripts/lint_skill_scripts_readonly.ts +12 -1
  939. package/src/scripts/lint_subagent_determinism.ts +14 -1
  940. package/src/scripts/lint_ticked_unmet_criteria.ts +300 -21
  941. package/src/scripts/mcp_registry_submit.sh +2 -2
  942. package/src/scripts/mcp_server/consumer_tool_catalog.json +4 -4
  943. package/src/scripts/mcp_server/suggest_skill.ts +89 -4
  944. package/src/scripts/mcp_server/tools.ts +2 -33
  945. package/src/scripts/measure_skill_ranker_baseline.ts +203 -5
  946. package/src/scripts/measure_turn_end_gate.ts +61 -1
  947. package/src/scripts/merge_clearance.ts +225 -0
  948. package/src/scripts/migrate_command_suggestions.ts +1 -1
  949. package/src/scripts/network_sources.ts +236 -0
  950. package/src/scripts/no_go_deny_rows.ts +225 -0
  951. package/src/scripts/orchestration_record.ts +15 -2
  952. package/src/scripts/plan_test_shards.ts +103 -0
  953. package/src/scripts/pr_url_reminder_hook.ts +10 -0
  954. package/src/scripts/print_required_checks.ts +5 -5
  955. package/src/scripts/probe_depth_shadow.ts +406 -0
  956. package/src/scripts/probe_turnaround.ts +342 -10
  957. package/src/scripts/ratification_subject.ts +176 -0
  958. package/src/scripts/rdp_gate_classify.ts +1 -0
  959. package/src/scripts/rdp_quality_eval.ts +1 -0
  960. package/src/scripts/release.ts +26 -55
  961. package/src/scripts/release_drill.ts +52 -23
  962. package/src/scripts/release_env.ts +37 -0
  963. package/src/scripts/release_publication.ts +11 -1
  964. package/src/scripts/report_consumer_gate_reach.ts +233 -0
  965. package/src/scripts/report_merge_gate_load.ts +295 -0
  966. package/src/scripts/report_project_contract.ts +123 -0
  967. package/src/scripts/report_reducible_classes.ts +342 -0
  968. package/src/scripts/report_required_checks_drift.ts +5 -3
  969. package/src/scripts/report_skill_host_census.ts +199 -0
  970. package/src/scripts/report_standing_payload_by_host.ts +7 -7
  971. package/src/scripts/retro.ts +758 -0
  972. package/src/scripts/retro_facts.ts +575 -0
  973. package/src/scripts/retro_queue.ts +739 -0
  974. package/src/scripts/retro_session_facts.ts +218 -0
  975. package/src/scripts/retro_sweep.ts +493 -0
  976. package/src/scripts/retro_triage.ts +126 -0
  977. package/src/scripts/roadmap_context.ts +2 -2
  978. package/src/scripts/roadmap_drain_queue.ts +601 -0
  979. package/src/scripts/run_supervise.ts +24 -2
  980. package/src/scripts/schemas/agent-settings.schema.json +0 -16
  981. package/src/scripts/schemas/command.schema.json +3 -3
  982. package/src/scripts/schemas/review-findings.schema.json +8 -0
  983. package/src/scripts/schemas/skill.schema.json +7 -6
  984. package/src/scripts/schemas/subagent.schema.json +33 -2
  985. package/src/scripts/score_skill_selection.ts +5 -2
  986. package/src/scripts/second_brain_retrieval.ts +1 -0
  987. package/src/scripts/second_brain_run.ts +1 -0
  988. package/src/scripts/self_repair_cli.ts +563 -87
  989. package/src/scripts/self_review_gate.ts +59 -4
  990. package/src/scripts/session_register_hook.ts +91 -4
  991. package/src/scripts/sessions_cli.ts +100 -5
  992. package/src/scripts/skill_collision_clusters.ts +1 -1
  993. package/src/scripts/skill_tools/score_skill_relevance.ts +31 -2
  994. package/src/scripts/skill_trigger_eval.ts +4 -2
  995. package/src/scripts/source_adapters.ts +183 -0
  996. package/src/scripts/step_receipt.ts +100 -0
  997. package/src/scripts/sync_pr_branch.ts +4 -0
  998. package/src/scripts/test_council_qualification.ts +1 -1
  999. package/src/scripts/trigger_eval_grandfather.json +3 -49
  1000. package/src/scripts/trigger_eval_rotation.ts +31 -3
  1001. package/src/scripts/ui_conformance_probe.ts +405 -1
  1002. package/src/scripts/update_counts.ts +230 -11
  1003. package/src/scripts/update_invite_hook.ts +245 -0
  1004. package/src/scripts/update_notice_hook.ts +298 -0
  1005. package/src/scripts/validate_frontmatter.ts +85 -0
  1006. package/src/scripts/worker_reuse_shadow_report.ts +121 -0
  1007. package/src/scripts/worktree_cleanup_check.ts +915 -121
  1008. package/src/server/io/yamlIO.ts +2 -2
  1009. package/src/server/schemas/settings.ts +37 -23
  1010. package/src/shared/brandTokenDocument.ts +46 -0
  1011. package/src/shared/brandTokenPaths.ts +43 -0
  1012. package/src/shared/settingsCarveOut.ts +0 -8
  1013. package/src/shared/skillRanking.ts +106 -5
  1014. package/src/shared/userMd/formAdapter.ts +15 -1
  1015. package/src/shared/userMd/schema.ts +22 -0
  1016. package/src/templates/agent-user.md +4 -0
  1017. package/src/templates/agent-user.yml +4 -0
  1018. package/dist/cli-delegate/chunk-4DBG5K7M.js +0 -1123
  1019. package/dist/cli-delegate/chunk-523HCFYO.js +0 -90
  1020. package/dist/cli-delegate/chunk-AL3RZ22D.js +0 -74
  1021. package/dist/cli-delegate/chunk-KB5FZ655.js +0 -208
  1022. package/dist/cli-delegate/chunk-MDPPKQCQ.js +0 -875
  1023. package/dist/cli-delegate/chunk-OAFSJBHH.js +0 -272
  1024. package/dist/ui/assets/index-C3djEJah.js +0 -23
  1025. package/src/scripts/_lib/continuation_ladder.ts +0 -335
  1026. package/src/scripts/hooks/run_continuation_hook.ts +0 -1524
@@ -2,10 +2,10 @@
2
2
  "$comment": "Violation ratchet for gates whose dead scan root was repaired. A repair REVEALS pre-existing debt; it does not create it. Each entry records the count revealed at repair time — the gate fails only when its count RISES. Lowering a count is a normal commit; raising one is a defect. Entries expire: a baseline that has not dropped within 56 days of `landed` (or of `reaffirmed.date`) fails its gate, because a number that never moves is suppression with extra steps. Mechanism + rationale: src/scripts/_lib/gate_baseline.ts. Decision: AI council 2026-08-02, roadmap road-to-gates-that-can-fail blocker `dead-gate-finding-triage`.",
3
3
  "gates": {
4
4
  "lint_blocker_citations": {
5
- "count": 10,
6
- "landed": "2026-10-06",
5
+ "count": 8,
6
+ "landed": "2026-10-22",
7
7
  "falsifier": "./scripts-run src/scripts/lint_blocker_citations # lists every miss; it fails when the count RISES above this entry",
8
- "note": "Blocker citations (`path:line`) in the `## Blockers` section of active roadmaps and stubs whose file does not resolve, measured on main @ adaad0aa2 when the lint landed (road-to-parked-blockers-that-get-asked step 5.1, decision D3). All 10 are a bare basename or a partial path (`chairman.ts:71-76`, `archive/road-to-session-closeout.md:182`) that resolves neither from the repository root nor from the citing roadmap's directory; none is a line beyond the end of an existing file. A ratchet rather than a hard fail because line citations drift with every edit above them, so an existing miss is drift rather than a new defect. Each one clears by writing the citation repository-relative, or deleting it when its target is gone; the count only falls."
8
+ "note": "Blocker citations (`path:line`) in the `## Blockers` section of active roadmaps and stubs whose file does not resolve, measured on main @ adaad0aa2 when the lint landed (road-to-parked-blockers-that-get-asked step 5.1, decision D3). All 10 are a bare basename or a partial path (`chairman.ts:71-76`, `archive/road-to-session-closeout.md:182`) that resolves neither from the repository root nor from the citing roadmap's directory; none is a line beyond the end of an existing file. A ratchet rather than a hard fail because line citations drift with every edit above them, so an existing miss is drift rather than a new defect. Each one clears by writing the citation repository-relative, or deleting it when its target is gone; the count only falls. LOWERED 10 -> 8 on 2026-10-22 on the enforcing environment's own reading: the Rule backstops job of run 39704768739 on main @ 66b810588 printed `8 violation(s), baseline 10 — ratchet is loose`, and a local run on fix/release-17-review-fixes read the same 8. That closes the two-citation headroom the gate-coverage row recorded as open residue."
9
9
  },
10
10
  "check_claims:non-inference": {
11
11
  "count": 40,
@@ -19,13 +19,9 @@
19
19
  "note": "One orphan user-type value: `legal`. Five legal-review-prep skills (contract-review, dpa-review, nda-triage, legal-intake-triage, legal-practice-profile) declare `recommended_for_user_types: [legal]`, but there is no `user-types/legal.yml` — the pack shipped an axis value with no user-type definition behind it, and the dead scan root hid it (the audit reported used=0 orphans=0 while reading zero skills; it now reads 288 and reports used=8). Clearing this entry is a product call, not a copy edit: either author `user-types/legal.yml` (tagline, recommended packs, install-path hint) or drop `legal` from those five skills. Not decided here because both options change shipped pack behaviour."
20
20
  },
21
21
  "check_depth_budget": {
22
- "count": 4,
23
- "landed": "2026-08-06",
24
- "reaffirmed": {
25
- "date": "2026-10-02",
26
- "reason": "Re-derived today rather than waved through, and the re-derivation found something the count cannot express: the FILE COUNT is unchanged at 4, while the debt behind it has roughly doubled. Measured now against the figures this entry's own note recorded on 2026-08-06 — roadmap-process-loop.md 20,360 -> 61,147 (3x), design-antipatterns.md 20,707 -> 32,486, orchestration-telemetry.md 16,155 -> 21,033, rule-body-migration-inventory.md 23,782 -> 23,782 (the only one that held). Total excess over the 16,000-char ceiling went from ~16,600 to ~73,800 chars while the ratchet read a flat 4 and never fired. That is the shape the 56-day clause exists to expose, and it is why this reaffirmation records the growth instead of restating the note. NOT CLEARED, for the reason the original note gives and which still holds: splitting four large reference documents is unrelated to the change in hand, and the P4 migration pattern that feeds them is live — prose moves INTO these files by design, so they grow as the kernel shrinks. Lowering the count means splitting at least one, which is an estate decision about the declarative layer's shape, not cleanup inside an unrelated PR. SURFACED to the owner in the same session as a follow-up: a per-file-count ratchet is the wrong instrument for a population that grows in place, and a total-excess ratchet (the shape check_source_size_budget already uses in this same file) would have fired months ago. Revisit-if: the shape decision is taken, a fifth file crosses the ceiling, or roadmap-process-loop.md is split — whichever comes first. Expires 2026-11-27 (56 days), by which point the shape question is owed an answer rather than a second reaffirmation."
27
- },
28
- "note": "Four depth files exceed the 16,000-char per-file ceiling: rule-body-migration-inventory.md (23,782), design-antipatterns.md (20,707), roadmap-process-loop.md (20,360), orchestration-telemetry.md (16,155). Recorded rather than fixed because splitting four large reference documents is unrelated to the change that introduced the ceiling, and a gate that lands as four instant blockers is the shape this repository has already recorded as a failure. Shrink-only from here: a FIFTH over-ceiling file reds. roadmap-process-loop.md is the file that motivated the gate — it states 'Size budget: <= 4,000 chars' in its own header and is 5x over it, which is what a declared budget with nothing measuring it decays into. The ceiling is a GROWTH RATCHET, not a measured quality threshold: the 7,308-trajectory study behind the 3,500-token skill ceiling (ADR-217) was taken on procedural always-co-loaded skills, and this layer is declarative and loaded one or two files at a time. Replace the number when someone measures comprehension on THIS layer."
22
+ "count": 3,
23
+ "landed": "2026-10-21",
24
+ "note": "Three depth files exceed the 16,000-char per-file ceiling: design-antipatterns.md (33,903), rule-body-migration-inventory.md (23,772), orchestration-telemetry.md (21,033). Lowered 4 -> 3 on 2026-10-21 by road-to-a-step-that-costs-what-it-changes 3.1, which split roadmap-process-loop.md (61,147 at the 2026-10-02 reaffirmation, 66,872 before the split) into a 15,965-char core plus four branch files under the ceiling — the condition the reaffirmation named as its own revisit-if. The other three stay recorded rather than fixed, but their debt is not flat: since the 2026-10-02 reaffirmation design-antipatterns.md grew 32,486 -> 33,903, rule-body-migration-inventory.md went 23,782 -> 23,772 and orchestration-telemetry.md held at 21,033. Splitting them is unrelated to that change. STILL OWED from that reaffirmation, and not answered by this lowering: whether a total-excess ratchet (the shape check_source_size_budget uses) replaces this per-file count, which cannot see growth inside a file that is already over. The ceiling is a GROWTH RATCHET, not a measured quality threshold (ADR-217's 3,500-token study was taken on procedural skills, not this declarative layer). Shrink-only from here: a fourth over-ceiling file reds."
29
25
  },
30
26
  "check_gate_completeness": {
31
27
  "count": 214,
@@ -38,21 +34,16 @@
38
34
  "landed": "2026-08-30",
39
35
  "note": "Lowered 47 -> 46 on 2026-08-30 by road-to-source-silence-cutover step 3.1, and the gain was INCIDENTAL rather than sought: narrowing the `source-header` class replaced a whole-value scan with a per-token one, and one hardcoded scan root went with the code that no longer needed it. Set to the EXACT live total, per this file's convention — the gate reported the tree at 46 against a baseline of 47 and said so, which is how a loose ratchet surfaces here rather than by inspection. `landed` refreshed deliberately: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at the old number while the tree measures lower would never expire at any age. Prior entry: Lines under src/scripts/**/*.{ts,mts,mjs} that pass the retired `.agent-src.uncondensed` directory into `path.join(...)` — a filesystem path CONSTRUCTED against the tree ADR-051 abandoned, which is the exact shape of all 14 dead gates. Deliberately narrow so the number is signal, not noise: 236 raw mentions under src/scripts → 147 string-literal lines → 67 path-constructing lines when the pass was written, after exempting src/scripts/_lib/agent_src.ts (the shared resolver, whose job IS owning the constant — gates that route through it survived the move). Detectors holding the literal as data t"
40
36
  },
41
- "check_roadmap_trackable:relates": {
42
- "count": 9,
43
- "landed": "2026-08-23",
44
- "note": "The nine active non-draft roadmaps that predate the `relates:` requirement (road-to-agentic-engineering-assurance, road-to-component-library-lifecycle, road-to-council-evidence-integrity, road-to-frontend-fidelity-calibration, road-to-monorepo-scope-and-detection, road-to-observability-plate, road-to-role-scoped-spawn-profiles, road-to-skill-delivery-over-mcp, road-to-standing-payload-diet). This is a NEW obligation rather than a repaired scan root, and the ratchet is the point: `depends:` shipped in the template with nothing requiring it and measured 0 adoption, so requiring `relates:` retroactively across the estate would be an owner-reserved write with no analysis behind the edges it would have to invent (held as step 4.3, deferred). Clearing an entry here is one roadmap at a time: run `agent-config roadmap:context` on it, write the rows the probe surfaces, and lower the count."
45
- },
46
37
  "check_source_size_budget": {
47
- "count": 17516,
48
- "landed": "2026-10-09",
49
- "note": "LOWERING 2026-10-09, 17,550 -> 17,516 — the gate asked for it by name after `REMOVED_KEYS` and its once-per-run warning moved out of `src/scripts/_lib/agent_settings.ts` (1,510 lines) into `src/scripts/_lib/settings_removed_keys.ts`, so the settings-key retirement batch adds its registry entries in a file under the ceiling instead of growing the excess; the retirement itself also deletes legacy rename-map rows and the setup-hint settings read from `src/scripts/install.ts`. Earlier: LOWERING 2026-10-05, 17,571 -> 17,550 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,550; `check_source_size_budget.test.ts` then pins baseline == live total, so this is required rather than optional. The gain IS this branch's own work and it is a DEDUPLICATION, which this convention accepts: all five CliClient subclass constructors forwarded six option fields to super() by name, which is why a seventh (`consumer`) was silently dropped and every CLI call booked as `unknown`. Replacing the five field lists with `{ ...opts, model: ... }` removes 27 lines from src/scripts/ai_council/clients.ts (2,858 -> 2,831) against the +6 the consumer fix added, so the net is -21. No ceiling was edited and no file was split to game the metric. The count is tree-derived (line counts over src/**/*.ts) and container-independent, unlike the projection-surface gates whose local readings diverge. Verified with `npx tsc --noEmit` clean and the clients suite green in this checkout. PRIOR ENTRY: LOWERING 2026-10-05, 17,585 -> 17,571 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,571. The gain IS this branch's own work and it is an EXTRACTION, which is the only shape this convention accepts: road-to-an-installed-layer-that-is-thinned step 1.1 adds a thinning call to the global deploy loop, and pays for those lines by moving `_resolve_global_rule_scope` out of `src/scripts/install.ts` into `src/install/globalRuleScope.ts` behind a same-signature wrapper, and removes the two imports the extraction orphaned (install.ts 5,180 -> 5,156). The user-global whitelist rows in `src/scripts/_lib/agent_settings.ts` push that file 1,499 -> 1,510, so the net is -5 rather than -15. No ceiling was edited and no file was split to game the metric. Verified by running the gate in this worktree after `npx tsc --noEmit` passed clean. PRIOR ENTRY: LOWERING 2026-10-02, 17,620 -> 17,592 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,592. The gain IS this branch's own work, and it is a deduplication rather than a sweep. `GLOBAL_DEPLOY_SOURCES` was defined TWICE — in `src/scripts/install.ts` and in `src/install/wizard-plan.ts` — and the two copies were byte-identical across all 18 host rows, which is a duplicate that stays correct exactly until somebody edits one of them. road-to-rule-triggers-and-links-that-hold step 1.2 did that: it added `contexts/` and `guidelines/` to the install.ts copy and the wizard kept installing without them, so the deduplication is the fix for a defect this branch introduced, not an opportunistic tidy. install.ts now imports and re-exports the wizard-plan definition, so every caller is unchanged, and the file goes 5,231 -> 5,175 lines. Verified by running the gate in this worktree after `npm run typecheck` passed clean. PRIOR ENTRY: LOWERING 2026-10-02, 17,734 -> 17,620 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,620 as the number to write. The gain is not this branch's own work; it is the net of the lanes that merged into main while this branch was in flight, which is exactly the case the clause below exists for — a tree that got smaller while a baseline stood still would let the gain be given back silently by the next change. Verified in a FRESH detached checkout of the pushed head rather than in the working worktree, because the first reading was taken in a tree that had not finished its base sync and reported the two numbers the other way round; the fresh checkout measures 17,620 against a 17,734 baseline over 1,582 scanned files. `landed` is refreshed deliberately, for the reason every entry below gives: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left high while the tree measures lower would never expire at any age. PRIOR ENTRY: LOWERING 2026-10-01, 17,745 -> 17,734 — a lowering commit, and the gate asked for it by name. road-to-a-hook-bundle-with-one-yaml-reader 3.1 split the windsurf renderer out of `condense.ts` into the new under-cap `src/scripts/_lib/windsurf_render.ts`, and `strip_frontmatter` moved with it as the render's one non-trivial dependency. `condense.ts` went 2,728 -> 2,717 excess lines. The direction is honest about its own history: an earlier commit on this branch kept the renderer INLINE in `condense.ts` and CI caught it as 20 new violations — this entry is that fix, not a sweep, and the lowering is the by-product of putting the code where it belonged. Nothing was deleted: the renderer and the stripper are both still called, by TWO callers now rather than one, and `condense.ts` re-exports `strip_frontmatter` so no importer's path changed. The new module lands at 64 lines, far under its own cap, so it contributes zero excess. LOCAL READING, same discriminator every entry below uses: the gate walks authored source under `src/`, and the only untracked path `git status --porcelain -uall -- src` reports is that new module, committed in this same change — so a clean CI checkout of this commit measures the same 17,734. If CI reads anything else, CI's number is the correct one and this note is the record of why. `landed` is refreshed deliberately, for the reason the prior entry gives: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left high while the tree measures lower would never expire at any age. PRIOR ENTRY: LOWERING 2026-09-30, 17,746 -> 17,745 — a lowering commit, and the gate asked for it by name. The direction is the surprising one again: this branch ADDED a feature to `install.ts` (an opt-in host env write) and that file came out SHORTER than it went in, 5,270 -> 5,269. The whole mechanism — the two-row allow table, the settings reader, the env-block builder and the bridge wrapper — lives in the new under-cap `src/scripts/_lib/host_env_write.ts`, so `install.ts` pays ONE import line and one expression for it; and the three-line `for` loop over healed plugin ids in the same function collapsed to one, which is inside the function the change already edits. The gain is a MOVE plus one tightening, never a deletion: nothing was dropped and nothing was swept. That module boundary is also the better one on its own terms — one place now owns which host variable this package may write, which is the question the owner decision of 2026-09-30 turns on. LOCAL READING, on the same discriminator every entry below uses: the gate walks authored source under `src/`, and `git status --porcelain -uall -- src` reported ZERO untracked files, so a clean CI checkout of this commit measures the same 17,745. If CI reads anything else, CI's number is the correct one and this note is the record of why. `landed` is refreshed deliberately: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,746 while the tree measures 17,745 would never expire at any age. PRIOR ENTRY: LOWERING 2026-09-29, 17,748 -> 17,746 — a lowering commit, same doctrine as every entry below, and the gate asked for it by name. This branch ADDED two gate scripts, a guard and a shared lib under `src/`, so the direction is the surprising one and worth stating: the new files each land under their own cap and contribute zero EXCESS, while factoring the shell write shapes out of `block_kernel_rule_writes` into `_lib/shell_write_shapes.ts` moved lines out of a file that was over its cap and into one that is not. Net -2. LOCAL READING, on the same discriminator every entry below uses: the gate walks authored source under `src/`, and `git status --porcelain -uall -- src` reported ZERO untracked files, so a clean CI checkout of this commit measures the same 17,746. If CI reads anything else, CI's number is the correct one and this note is the record of why. `landed` is refreshed deliberately: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,748 while the tree measures 17,746 would never expire at any age. PRIOR ENTRY: LOWERING 2026-09-29, 17,762 -> 17,748 — a lowering commit, same doctrine as every entry below, and the gate asked for it by name. Reporting the host traffic environment in `doctor` needed a new surface; rather than pay those lines against `src/scripts/_cli/cmd_doctor.ts`, already far over the cap, the whole network-posture block moved out into the new under-cap `src/scripts/_cli/doctor_network_posture.ts`, which is also where the new logic lives: one module owns which traffic variables exist, how each is read, and how an absent one is reported, so the unit is coherent rather than a line-count trim. cmd_doctor.ts 3,618 -> 3,604; total 17,762 -> 17,748. The gain is a MOVE, not a deletion — nothing was dropped and nothing was swept. `landed` is refreshed deliberately, for the reason the prior entries record: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,762 while the tree measures 17,748 would never expire at any age, and the gate only ADVISES on a loose ratchet while `check_source_size_budget.test.ts` blocks — that asymmetry is what forces a lowering commit to carry its own baseline update. PRIOR ENTRY: LOWERING 2026-09-27, 17,765 -> 17,762 — the second half of the same repair, and a lowering for the same reason. Closing the remaining preservation defects needed lines in two over-cap files: `src/scripts/install.ts` (route the generated Claude Desktop marker through the tracker, hand the rule-rewrite its skip set) and `src/server/routes/wizard.ts` (surface the conflict count, stop reporting exit 3 as a failure). Both were paid from the same subject rather than from the ratchet: `_files_by_tool_from_bridges` joined its sibling in `src/install/manifestFiles.ts`, which now owns the whole per-tool inventory, and the wizard's exit-code semantics moved into `src/install/preserve.ts` beside `installDoneSummary`, which already lives there for this exact reason. install.ts 5,277 -> 5,270; wizard.ts 1,500 -> 1,504. PRIOR ENTRY: LOWERING 2026-09-27, 17,784 -> 17,765 — a lowering commit, same doctrine as the entry it replaces. Repairing the install-manifest digest loss needed new state in `_update_installed_tools_manifest` (a recorded-inventory read, a preserved-path index, a reconciliation call). Rather than pay that against `src/scripts/install.ts`, already 3,777 over the cap, the manifest file-inventory block (`_sha256_of_file`, `_file_entry`, `_files_by_tool_from_deploy` — 29 lines) moved out into the under-cap `src/install/manifestFiles.ts`, which is where the new logic lives too: one module now owns what the manifest's per-tool `files[]` holds, how it is read back, and how the two reconcile, so the unit is coherent rather than a line-count trim. install.ts 5,296 -> 5,277; total 17,784 -> 17,765. PRIOR ENTRY: LOWERING 2026-09-20, 17,858 -> 17,784 — a lowering commit, not a reconciliation, but measured under the same doctrine the four entries below carry: the committed number is the gate's own reading on the MERGED tree, taken after origin/main was merged into drain/headless-log-write rather than from either side. The branch's transaction-log write added 27 lines to `src/scripts/install.ts`, already 3,897 over the cap, taking the total to 17,885. Rather than pay that, the `json.dumps` byte-parity block (`jsonStrNoAscii`, `_jsonScalar`, `_dumpIndent`, `jsonDumpsIndent`, `jsonDumpsCompact` — 101 lines) moved out of `install.ts` into the under-cap `src/scripts/_lib/json_python_parity.ts`: pure, total functions of their input carrying no installer state, so the unit is coherent rather than a line-count trim. install.ts 5,397 -> 5,296; total 17,885 -> 17,784, a net -74 against the prior baseline. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-14, 17,861 -> 17,858 — the FOURTH reconciliation of this entry, same doctrine as the three below: the committed number is the gate's own reading on the MERGED tree, never either side's. Neither branch earned the -3; it falls out of main having absorbed drain/release-head-field, whose `derive_head_prefill` extraction moved the span-to-prefill composition into an under-cap module. Taking this branch's 17,861 would have silently given that gain back. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-13, 17,863 -> 17,861 — the THIRD reconciliation of this entry in one day, and re-measured on the merged tree rather than taken from either side, which is the only resolution that converges. drain/adversarial-verification reached 17,864 by paying for a `forge_protection` block and a cascade-base module entirely in files under the 1,500-line cap; the incoming reconciliation reached 17,863 from different work. Neither describes the merge. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-13, 17,944/17,866 -> 17,863. drain/decision-closure and drain/breaking-line-contradiction each lowered from the SAME 17,947 base in parallel -- this branch to 17,944 (net -3: the ownership vocabulary, its two Iron-Law sets and the merged default-mode map moved out of ai_council/config.ts into ai_council/ownership_classes.ts, and the settings-rename block moved out of _lib/agent_settings.ts into _lib/settings_renamed_keys.ts, both UNDER the 1500 cap so both cost nothing) and main to 17,866. Taking either side alone is wrong in a different direction, which is the doctrine this entry already carries from 2026-09-03 and 2026-09-07: main's value silently discards this branch's earned -3, and this branch's value RAISES the baseline against main and weakens the gate. The committed number is neither -- it is the gate's own output on the MERGED tree, where both reductions apply. MAIN-SIDE ENTRY, carried so neither branch's record is lost: Lowered 17,947 -> 17,866 on 2026-09-13 by drain/breaking-line-contradiction, on this entry's own doctrine. The branch adds the BACKWARD half of the MIGRATION.md obligation -- a refusal for a major cut whose BREAKING section has no migration entry -- and writing it into release.ts came in at +61, because that file sits ~375 lines PAST the 1500 cap so every line there is one unit. Paid down rather than baselined, and the move was the coherent unit rather than the minimum one: BOTH refusals went, the new backward half and the pre-existing forward half (assert_scheduled_deprecations_clear), into _lib/release_migration_gate.ts at 184 lines and therefore UNDER the cap, so the pair and all their rationale now cost nothing. They moved on merit rather than only on arithmetic -- they are the two halves of one obligation, written eleven months apart, and release.ts held only the two call sites. parse_version stayed module-private in release.ts and the lib carries a two-line _minor_patch instead: exporting a private helper to serve one caller would widen the surface of the file the move exists to narrow. release.ts 1,875 -> 1,733: a branch that ADDED a pipeline refusal leaves the file eighty-one lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports nothing staged and nothing untracked at this commit, so a clean CI checkout measures the same 17,866. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises -- which is how CI found it: the gate exited 0 with a loose-ratchet warning and the test went red. PRIOR ENTRY: Lowered 17,959 -> 17,947 on 2026-09-11 by the findings-ledger branch, on this entry's own doctrine. The branch adds step 7 to release.ts, which sits ~326 lines PAST the 1500 cap so every line there is one unit, and it came in at +145. Paid down rather than baselined, in two moves. `settle_findings_ledger` and `_blocking_without_disposition` moved out of release.ts into _lib/release_findings_ingest.ts -- 95 lines, and that module is under the cap, so the step and its rationale now cost nothing. It moved on merit rather than only on arithmetic: the module already owns every message the step prints and every argv it builds, and release.ts held only the sequencing. Then the `--ci` fallback dispatch of the three tag-triggered workflows -- 24 lines of loop and warning with no reader elsewhere in step 10 -- moved into _lib/release_tag_dispatch.ts, also under the cap. release.ts 1,826 -> 1,814: a branch that ADDED a pipeline step leaves the file twelve lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ file staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,947. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,963 -> 17,959 on 2026-09-09 by feat/cdd-fidelity-council, on the same shape as the entry below and with the same discriminator. The branch's src-link rewrite (a blind review found 253 of 268 links under dist/agent-src/guidelines/ dead, because condense.ts folded only the docs/ prefixes and never (../)+src/rules|skills) came in at +15 excess: condense.ts sits ~1,208 lines PAST the 1500 cap, so every line there is one unit. Paid down rather than baselined, in the way this entry's doctrine prescribes. `_rewrite_body_links` and its two regex constants moved out of condense.ts into _lib/guidelines_lane.ts, 151 lines and therefore UNDER the cap, so the function and its prose now cost nothing. It moved on merit rather than only on arithmetic: every rule the rewriter applies is a statement about which source tree projects where, which is that module's own subject, and condense.ts held it only because that is where the projector lives. condense.ts 2,712 -> 2,708 net, after the one import line and the one call-site rename -- a branch that ADDED a rewrite rule leaves the file four lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ files tracked and nothing untracked, so a clean CI checkout of this commit measures the same 17,959. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,973 -> 17,963 on 2026-09-08 by drain/graph-shipped-close. The branch registers five code-graph MCP tools (road-to-a-graph-that-is-shipped 4.1). Their five records and schemas are ~250 lines, and putting them in mcp_server/tools.ts -- which sits ~500 lines PAST the 1500 cap, so every line there is one unit -- would have cost ~250 excess. They live in mcp_server/graph_tools.ts instead (~280 lines, UNDER the cap, so they and their prose cost nothing), and tools.ts spreads them into ALLOWLIST in two lines: one import and one `...GRAPH_TOOLS,`. Those two were paid for rather than baselined, in the way this entry's doctrine prescribes: `_strip` and `_resolvePath` -- a whitespace trim and a tolerant realpath, generic by nature -- moved out of tools.ts into mcp_server/path_util.ts, also under the cap. They are imported under their original underscore names, so all 28 call sites are unchanged and a two-function move does not read as a sweep. tools.ts 2,025 -> 2,015: -12 from the extraction, +2 from the registration, net -10 for a branch that ADDED a feature. CORRECTED 2026-09-08 after an independent review checked the figure against the tree -- this sentence read '2,025 -> 2,013, net -12, against the +2 the registration needed', which states an intermediate file length as the final one and leaves the arithmetic (-12) and the conclusion (-10) describing different trees. `git show origin/main:...tools.ts | wc -l` is 2025 and the working tree is 2015. The TOTAL, 17,963, was always the gate's own output and is unchanged. Every other file this branch touches or creates -- code_graph/verbs.ts, code_graph/cli.ts, code_graph/build.ts, code_graph/detect.ts, code_graph/query.ts, code_graph/sqlite_store.ts, code_graph/types.ts, _lib/regression_neighbourhood.ts -- is under the 1500 ceiling before and after, so it contributes zero excess whatever it grew by. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,963. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,974 -> 17,973 on 2026-09-08 by drain/topology-c1. The branch adds a live-path emit to council_cli.ts, which sits 2,454 lines PAST the 1500 cap so every line there is one unit, and paid its own way down rather than raising the baseline, in the way this entry's doctrine prescribes. The twelve-line `all_responses` assembly (a spread, three conditionals and a push) moved out of council_cli.ts into ai_council/deliberation_metrics.ts::runCallsFrom, 353 lines and therefore UNDER the cap, so the six stage labels and their prose cost nothing. It moved on merit rather than only on arithmetic: 'which calls did this run make, and at which stage' is that module's own subject, and the CLI held the list only as a flat array with the stage boundaries implicit in the order -- both readings now come out of one walk, so the billing total and the attribution can never be computed over different sets. council_cli.ts 3,955 -> 3,954 net, after the two call lines, the import and the one payload key the feature needed. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,973. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,016 -> 17,974 on 2026-09-07 by fix/single-delivery-unconditional. SETTLED FIGURE, and it supersedes an intra-session 17,962 this same branch committed earlier — read the direction against MAIN, which is what the ratchet protects: main is 18,016, the branch leaves 17,974, net -42. The 17,962 was this branch's own low before a neutral review returned twelve findings; fixing them added a real mechanism to mcp_server and condense.ts (the flat-wrapper carriage gate the review showed was missing, plus its four-skip predicate), and condense.ts sits ~1,215 lines PAST the cap so each of those lines is one unit. Paid down first, in the way this entry's doctrine prescribes: _suggestSkillForTaskHandler and its 18-line docstring moved out of mcp_server/tools.ts (2,079 -> 2,025) into mcp_server/suggest_skill.ts, 72 lines and UNDER the cap, so its prose costs nothing. The residual +12 against the intra-session low is the gate's own output on the settled tree and is recorded rather than engineered away, because the alternative was extracting _nested_command_subpath and its two callers out of condense.ts - which needs MODULE_STATE, _relativeToPosix and _domains_command_logical passed in, a wider diff than the finding warrants and one no review asked for. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the three new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,974. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-07, 18,061/18,017 -> 18,016. drain/admissible-council-seats and fix/release-obligation-answerable each lowered from the SAME 18,062 base in parallel — main to 18,061 (net -1: curlJsonPost, the seat-status helpers and the per-seat config parsing moved out of the three over-ceiling council files) and the branch to 18,017 (net -45: the /dev/tty prompt helpers moved out of release.ts into _lib/tty_prompt.ts, 76 lines and UNDER the cap, taking release.ts 1871 -> 1826). Taking either side alone is wrong in a different direction, which is the reconciliation doctrine this entry already carried from 2026-09-03: main's value silently discards the branch's earned -45, and the branch's value RAISES the baseline against main and weakens the gate. The committed number is neither — it is the gate's own output on the MERGED tree, where both reductions apply, and it equals the arithmetic (18,062 - 45 - 1 = 18,016) rather than being reconciled by it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports ZERO untracked files, so a clean CI checkout of this commit measures the same 18,016. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in the merge commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,062 -> 18,061 on 2026-09-07 by drain/admissible-council-seats. The branch's own additions to the three over-ceiling files (ai_council/config.ts, council_cli.ts, ai_council/clients.ts) came in at +96 excess and were paid down to -1 rather than baselined, in the four ways this entry's doctrine prescribes: `curlJsonPost` moved out of clients.ts into ai_council/api_transport.ts (UNDER the cap, so the prose and the three new provider shims cost nothing); the seat-status helpers moved out of council_cli.ts into ai_council/status_surface.ts, taking an orphaned doc comment with them; the three new per-seat config fields' parsing moved out of config.ts into ai_council/seat_policy.ts::parseSeatFields; and three prose blocks that the branch's own transport repair made FACTUALLY FALSE (the `openai` / `google-genai` Python-SDK claims, and a `_curlJsonPost` pointer to a function that had moved) were corrected and shortened in the same change. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports zero untracked files with the five new src/ files staged, so a clean CI checkout of this commit measures the same 18,061. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried here because tests/scripts/check_source_size_budget.test.ts:166 asserts baseline == live and therefore blocks where the gate only advises -- the lowering commit must carry its own baseline update. Lowered 18,068 -> 18,062 on 2026-09-06 by drain/host-enforcement-truth. Collapsing the five per-host binding constants in install.ts into src/scripts/hooks/host_lowering.yaml removed 29 lines from a file ~3,900 past the 1500 cap, where every line costs one excess; the journal's surface column and its extracted migration helper gave 23 back. Lowered 18,245 -> 18,230 on 2026-09-02 by drain/publication-integrity-option-a. Phase 2 Option A moved the authoring instruction out of the generator: release.ts, which sits ~530 lines PAST the 1500 cap so every line there costs one excess, loses the comment emission, a 16-line HEAD_DEFAULT doc block and its alias const, and gains a shorter writer docstring. The doc block moved to _lib/release_material.ts, which is 289 lines and therefore UNDER the cap, so the same prose now costs nothing. Net -15. The branch first came in at +8 and paid its own way down rather than raising the baseline. BRANCH-SIDE ENTRY: Lowered 17,947 -> 17,944 on 2026-09-13 by drain/decision-closure, on this entry's own doctrine and at the gate's own request. The branch's ownership-axis additions to ai_council/config.ts came in at +86 excess: that file sits ~700 lines PAST the 1500 cap, so every line there is one unit. Paid down rather than baselined, in one move. The eight ownership class names, the two Iron-Law sets, the merged default-mode map and the mode-check function moved out of config.ts into ai_council/ownership_classes.ts -- 91 lines, UNDER the cap, so the vocabulary and its prose now cost nothing. It moved on merit rather than only on arithmetic: the roadmap-side gate lint_decision_classes needs the same eight names and has no business importing the council's whole schema to learn them, and the loader now carries three lines where it carried twenty-four. config.ts 2,182 -> 2,179: a branch that ADDED an entire decision axis leaves the file three lines shorter than it found it. Every other src/ file this branch creates -- lint_decision_classes.ts, lint_roadmap_producers.ts, closure_scan.ts, council_record_shape.ts, scope_growth.ts, ownership_classes.ts -- is under the 1500 ceiling, so it contributes zero excess whatever it grew by. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ files tracked and nothing untracked, so a clean CI checkout of this commit measures the same 17,944. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,959 -> 17,947 on 2026-09-11 by the findings-ledger branch, on this entry's own doctrine. The branch adds step 7 to release.ts, which sits ~326 lines PAST the 1500 cap so every line there is one unit, and it came in at +145. Paid down rather than baselined, in two moves. `settle_findings_ledger` and `_blocking_without_disposition` moved out of release.ts into _lib/release_findings_ingest.ts -- 95 lines, and that module is under the cap, so the step and its rationale now cost nothing. It moved on merit rather than only on arithmetic: the module already owns every message the step prints and every argv it builds, and release.ts held only the sequencing. Then the `--ci` fallback dispatch of the three tag-triggered workflows -- 24 lines of loop and warning with no reader elsewhere in step 10 -- moved into _lib/release_tag_dispatch.ts, also under the cap. release.ts 1,826 -> 1,814: a branch that ADDED a pipeline step leaves the file twelve lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ file staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,947. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,963 -> 17,959 on 2026-09-09 by feat/cdd-fidelity-council, on the same shape as the entry below and with the same discriminator. The branch's src-link rewrite (a blind review found 253 of 268 links under dist/agent-src/guidelines/ dead, because condense.ts folded only the docs/ prefixes and never (../)+src/rules|skills) came in at +15 excess: condense.ts sits ~1,208 lines PAST the 1500 cap, so every line there is one unit. Paid down rather than baselined, in the way this entry's doctrine prescribes. `_rewrite_body_links` and its two regex constants moved out of condense.ts into _lib/guidelines_lane.ts, 151 lines and therefore UNDER the cap, so the function and its prose now cost nothing. It moved on merit rather than only on arithmetic: every rule the rewriter applies is a statement about which source tree projects where, which is that module's own subject, and condense.ts held it only because that is where the projector lives. condense.ts 2,712 -> 2,708 net, after the one import line and the one call-site rename -- a branch that ADDED a rewrite rule leaves the file four lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ files tracked and nothing untracked, so a clean CI checkout of this commit measures the same 17,959. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,973 -> 17,963 on 2026-09-08 by drain/graph-shipped-close. The branch registers five code-graph MCP tools (road-to-a-graph-that-is-shipped 4.1). Their five records and schemas are ~250 lines, and putting them in mcp_server/tools.ts -- which sits ~500 lines PAST the 1500 cap, so every line there is one unit -- would have cost ~250 excess. They live in mcp_server/graph_tools.ts instead (~280 lines, UNDER the cap, so they and their prose cost nothing), and tools.ts spreads them into ALLOWLIST in two lines: one import and one `...GRAPH_TOOLS,`. Those two were paid for rather than baselined, in the way this entry's doctrine prescribes: `_strip` and `_resolvePath` -- a whitespace trim and a tolerant realpath, generic by nature -- moved out of tools.ts into mcp_server/path_util.ts, also under the cap. They are imported under their original underscore names, so all 28 call sites are unchanged and a two-function move does not read as a sweep. tools.ts 2,025 -> 2,015: -12 from the extraction, +2 from the registration, net -10 for a branch that ADDED a feature. CORRECTED 2026-09-08 after an independent review checked the figure against the tree -- this sentence read '2,025 -> 2,013, net -12, against the +2 the registration needed', which states an intermediate file length as the final one and leaves the arithmetic (-12) and the conclusion (-10) describing different trees. `git show origin/main:...tools.ts | wc -l` is 2025 and the working tree is 2015. The TOTAL, 17,963, was always the gate's own output and is unchanged. Every other file this branch touches or creates -- code_graph/verbs.ts, code_graph/cli.ts, code_graph/build.ts, code_graph/detect.ts, code_graph/query.ts, code_graph/sqlite_store.ts, code_graph/types.ts, _lib/regression_neighbourhood.ts -- is under the 1500 ceiling before and after, so it contributes zero excess whatever it grew by. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,963. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,974 -> 17,973 on 2026-09-08 by drain/topology-c1. The branch adds a live-path emit to council_cli.ts, which sits 2,454 lines PAST the 1500 cap so every line there is one unit, and paid its own way down rather than raising the baseline, in the way this entry's doctrine prescribes. The twelve-line `all_responses` assembly (a spread, three conditionals and a push) moved out of council_cli.ts into ai_council/deliberation_metrics.ts::runCallsFrom, 353 lines and therefore UNDER the cap, so the six stage labels and their prose cost nothing. It moved on merit rather than only on arithmetic: 'which calls did this run make, and at which stage' is that module's own subject, and the CLI held the list only as a flat array with the stage boundaries implicit in the order -- both readings now come out of one walk, so the billing total and the attribution can never be computed over different sets. council_cli.ts 3,955 -> 3,954 net, after the two call lines, the import and the one payload key the feature needed. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,973. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,016 -> 17,974 on 2026-09-07 by fix/single-delivery-unconditional. SETTLED FIGURE, and it supersedes an intra-session 17,962 this same branch committed earlier — read the direction against MAIN, which is what the ratchet protects: main is 18,016, the branch leaves 17,974, net -42. The 17,962 was this branch's own low before a neutral review returned twelve findings; fixing them added a real mechanism to mcp_server and condense.ts (the flat-wrapper carriage gate the review showed was missing, plus its four-skip predicate), and condense.ts sits ~1,215 lines PAST the cap so each of those lines is one unit. Paid down first, in the way this entry's doctrine prescribes: _suggestSkillForTaskHandler and its 18-line docstring moved out of mcp_server/tools.ts (2,079 -> 2,025) into mcp_server/suggest_skill.ts, 72 lines and UNDER the cap, so its prose costs nothing. The residual +12 against the intra-session low is the gate's own output on the settled tree and is recorded rather than engineered away, because the alternative was extracting _nested_command_subpath and its two callers out of condense.ts - which needs MODULE_STATE, _relativeToPosix and _domains_command_logical passed in, a wider diff than the finding warrants and one no review asked for. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the three new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,974. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-07, 18,061/18,017 -> 18,016. drain/admissible-council-seats and fix/release-obligation-answerable each lowered from the SAME 18,062 base in parallel — main to 18,061 (net -1: curlJsonPost, the seat-status helpers and the per-seat config parsing moved out of the three over-ceiling council files) and the branch to 18,017 (net -45: the /dev/tty prompt helpers moved out of release.ts into _lib/tty_prompt.ts, 76 lines and UNDER the cap, taking release.ts 1871 -> 1826). Taking either side alone is wrong in a different direction, which is the reconciliation doctrine this entry already carried from 2026-09-03: main's value silently discards the branch's earned -45, and the branch's value RAISES the baseline against main and weakens the gate. The committed number is neither — it is the gate's own output on the MERGED tree, where both reductions apply, and it equals the arithmetic (18,062 - 45 - 1 = 18,016) rather than being reconciled by it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports ZERO untracked files, so a clean CI checkout of this commit measures the same 18,016. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in the merge commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,062 -> 18,061 on 2026-09-07 by drain/admissible-council-seats. The branch's own additions to the three over-ceiling files (ai_council/config.ts, council_cli.ts, ai_council/clients.ts) came in at +96 excess and were paid down to -1 rather than baselined, in the four ways this entry's doctrine prescribes: `curlJsonPost` moved out of clients.ts into ai_council/api_transport.ts (UNDER the cap, so the prose and the three new provider shims cost nothing); the seat-status helpers moved out of council_cli.ts into ai_council/status_surface.ts, taking an orphaned doc comment with them; the three new per-seat config fields' parsing moved out of config.ts into ai_council/seat_policy.ts::parseSeatFields; and three prose blocks that the branch's own transport repair made FACTUALLY FALSE (the `openai` / `google-genai` Python-SDK claims, and a `_curlJsonPost` pointer to a function that had moved) were corrected and shortened in the same change. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports zero untracked files with the five new src/ files staged, so a clean CI checkout of this commit measures the same 18,061. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried here because tests/scripts/check_source_size_budget.test.ts:166 asserts baseline == live and therefore blocks where the gate only advises -- the lowering commit must carry its own baseline update. Lowered 18,068 -> 18,062 on 2026-09-06 by drain/host-enforcement-truth. Collapsing the five per-host binding constants in install.ts into src/scripts/hooks/host_lowering.yaml removed 29 lines from a file ~3,900 past the 1500 cap, where every line costs one excess; the journal's surface column and its extracted migration helper gave 23 back. Lowered 18,245 -> 18,230 on 2026-09-02 by drain/publication-integrity-option-a. Phase 2 Option A moved the authoring instruction out of the generator: release.ts, which sits ~530 lines PAST the 1500 cap so every line there costs one excess, loses the comment emission, a 16-line HEAD_DEFAULT doc block and its alias const, and gains a shorter writer docstring. The doc block moved to _lib/release_material.ts, which is 289 lines and therefore UNDER the cap, so the same prose now costs nothing. Net -15. The branch first came in at +8 and paid its own way down rather than raising the baseline.",
50
- "reason": "Lowered 17,585 -> 17,571 on 2026-10-05 by lane/installed-layer-thinned, and the gate asked for it BY NAME. The gain is this branch's own, through two extractions rather than a sweep: `_resolve_global_rule_scope` to `src/install/globalRuleScope.ts` and the thinning mechanism to `src/scripts/_lib/thin_rules.ts`. PRIOR REASON: Lowered 17,590 -> 17,585 on 2026-10-03 by drain/rule-carrier-phase1b-20261002, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,585. The gain is INCIDENTAL rather than sought, and it comes from two files that sit past the 1500-line cap. `src/scripts/ai_council/clients.ts` (2,852 lines, 1,352 past) lost the 18-line doc comment and declaration of `OPENAI_CLI_VENDOR_DEFAULT`, which moved to a new `ai_council/vendor_defaults.ts` well under the cap, so those lines stopped being charged; the move itself was made to break an import edge costing 51,523 B of composed hook bundle, not to shed lines. `src/scripts/install.ts` (5,229 lines, 3,729 past) gained a three-line call site for the headless `.gitignore` block and NOT the 44-line function behind it, which was written into `_lib/gitignore_block.ts` instead — that placement was chosen when this gate reported +44 and said a ratchet only turns one way, and it is the better home anyway. Net across both: -5. LOCAL READING, on the same discriminator the entries above use: the gate walks authored source under src/, and a porcelain status over that root reports no untracked files, so a clean CI checkout of this commit measures the same 17,585. `landed` is refreshed deliberately — checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,590 while the tree measures 17,585 would never expire at any age. PRIOR ENTRY: Lowered 17,592 -> 17,590 on 2026-10-03 by drain/rule-carrier-phase1-20261002, and the gain was INCIDENTAL rather than sought. The branch replaced `condense.ts::_lean_projection_settings` — an eight-line private reader of `lean_projection.mode` and `.hosts` — with one call to the shared `resolveLeanProjection`, net -2 lines in a file that sits ~1,195 lines PAST the 1500 cap, so every line removed there is one excess removed. Nothing was deleted to make a number: the projector reads the same settings file it always read, and `task sync` plus `task generate-tools` produce zero changes under `dist/agent-src/`, which is how that roadmap's risk 2 (one mode resolver moves the projector) was discharged. The gate reported the tree at 17,590 against a baseline of 17,592 and asked for exactly this lowering, so the gain cannot be silently given back. LOCAL READING, ADMISSIBLE ON THE SAME DISCRIMINATOR THIS FILE'S OTHER ENTRIES USE: the gate walks `src/` only, and a porcelain status over that root reported no untracked files, so a clean CI checkout of this commit measures the same 17,590. If CI reads anything else, CI's number is the correct one and this note is the record of why. PRIOR ENTRY: Lowered 18,230 -> 18,209 on 2026-09-03 by drain/artifact-location. `doctor --strict` needed 16 lines of integration wiring in cmd_doctor.ts, which sits ~2,100 lines PAST the 1500 cap so every line there costs one excess. The branch first came in at +137 and paid its own way down rather than raising the baseline: the strict semantics, threshold, kill switch, payload helper and argv fragments moved to _cli/_doctor_strict.ts (~160 lines, under the cap, costs nothing), taking it to +15; then the 37-line drift renderer moved to _cli/_doctor_emit.ts. Net -21. The renderer was chosen deliberately: pure rendering, two dependencies, no argparse involvement and therefore none of the byte-parity risk the parser surface carries against the retired Python implementation; nothing outside cmd_doctor.ts imported it. An AI council on the residual split (a: raise by 15 / d: descope the feature); neither was taken, because a parallel branch demonstrated the same day that paying down is achievable in this codebase, which is the evidence the split lacked. This gate's own test comment prescribes it: a commit that splits a god-file lowers the excess and must carry the lowered baseline. MERGE RECONCILIATION 2026-09-03, 18,209 -> 18,205: drain/wired-instruments and drain/artifact-location each lowered from the SAME 18,230 base in parallel -- the branch to 18,226 (net -4, run_continuation_hook.ts's termination ladder moved to _lib/continuation_ladder.ts and runtime_journal.ts's prose to _lib/outcome_vocabularies.ts, both under the cap) and main to 18,209 (net -21, the doctor --strict split above). Taking either side alone is wrong in a different direction: main's value silently discards the branch's earned -4, and the branch's value RAISES the baseline against main and weakens the gate. The committed number is neither -- it is the gate's own output on the merged tree, where both reductions apply. THIS LOCAL READING IS ADMISSIBLE HERE, and the discriminator matters because this file's ci-parity:local-only entry records a 165 -> 164 lowering that was reverted for exactly the opposite case: that count depends on how the environment resolves the projection surface, whereas this gate walks only SOURCE_ROOTS = ['src'] (check_source_size_budget.ts:88) counting excess lines over the 1500 ceiling, and `git status --porcelain -uall -- src/` reported ZERO untracked files, so a clean CI checkout of this commit measures the same 18,205. If CI reads anything else, CI's number is the correct one and this note is the record of why. LOWERED 18,205 -> 18,193 on 2026-09-03 by fix/release-curation-ask. The change adds a fifth publication guard, and its own additions landed at +10 excess: release.ts 2,008 -> 2,018, every line of which is past the 1500 cap. Paid down rather than baselined, in the two ways this gate's doctrine prescribes. The guard's rationale (~13 lines of docstring, including why prMerged is a parameter rather than a call-site if) lives in release_publication.ts, 915 lines and therefore UNDER the cap, so the prose costs nothing; and the two pure text helpers _splitlines and _rstrip moved out of release.ts into release_env.ts (333 lines, also under the cap), taking release.ts to 1,996 -- 12 BELOW where it started. The branch came in at +10 and leaves at -12. Recorded while moving them: _splitlines is duplicated a third and fourth time at adoption_report.ts:106 and readme_linter.ts:418; collapsing all three onto one definition touches three modules and was left out of this change rather than done silently. LOWERED 18,193 -> 18,180 on 2026-09-03 by fix/release-branch-reuse. The step-1 branch decision -- twenty lines of if/else in release.ts -- became one call to checkout_release_branch in release_publication.ts, which is 1,019 lines and therefore UNDER the 1500 cap, so the twenty lines plus a ~35-line rationale now cost nothing. release.ts 1,996 -> 1,983, every one of those lines being past the cap. The drill grew 765 -> 918 for two new scenarios and the snapshot/restore that keeps them from writing the real CHANGELOG, and it is under the cap too. A change that adds a feature and lowers the excess is the shape this gate's doctrine asks for; the alternative was a +13 raise for logic that had no business in the god-file. LOWERED 18,180 -> 18,068 on 2026-09-05 by fix/release-gate-producer-parity. The change wires the governance-mix obligation into the writer and the two local guards and adds a release-gate locality registry; its own additions to release.ts landed at +19 excess, every one of those lines past the 1500 cap. Paid down rather than baselined, in the way this entry's doctrine prescribes: the 132-line test-count-trend unit (_TEST_COUNT_LINE_RE, _TEST_LIST_MAX_BUFFER, _count_from_list_result, _count_tests_current, _previous_test_count_from_changelog, _render_test_trend_line) moved from release.ts into release_publication.ts, which is under the cap and where it now belongs on merit rather than only on arithmetic -- the same diff makes the missing `Tests: N` footer a section-level publication blocker, so the writer that emits the footer and the guard that refuses its absence sit in one module. release.ts 1,983 -> 1,871. All four names are re-exported from release.ts, so tests/scripts/release.test.ts is unchanged. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the ceiling, and `git status --porcelain -uall -- src/` reports ZERO untracked files with the two new src/ files staged, so a clean CI checkout of this commit measures the same 18,068. If CI reads anything else, CI's number is the correct one and this note is the record of why."
38
+ "count": 17358,
39
+ "landed": "2026-10-22",
40
+ "note": "Lowered 17,363 -> 17,358 on 2026-10-22 by feat/subagent-system-2583: the seat launch environment (model-ceiling memo, CLI version probe) moved out of src/scripts/ai_council/clients.ts into cli_launch_env.ts, which more than offset the light-launch and seat-resume additions there and in council_cli.ts and orchestrator.ts. Set to the exact live total, per this file's convention. Prior entry: Lowered 17,365 -> 17,363 on 2026-10-21 by fix/release-no-trailer-refusal: removing the Consumer-Impact span refusal took two lines out of src/scripts/release.ts, which sits above the 1,500-line cap. Set to the exact live total, per this file's convention. Prior entry: MERGE RECONCILIATION 2026-10-21, 17,369/17,368 -> 17,365: main lowered 17,372 -> 17,368 (cmd_doctor.ts, below) and this branch lowered 17,372 -> 17,369; the two gains are independent and add. Branch entry: lowered 17,372 -> 17,369 on 2026-10-21 by drain/road-to-one-detector-senders-20261020, and the gate asked for it by name (ratchet is loose, naming 17,369). The branch's CLI egress refusal (+16 in ai_council/clients.ts) and the injection filter (+2 in hooks/dispatch_hook.ts, which crossed 1,500) were paid for by folding five identical CliClient.ask failure constructions into one _cliFailure helper; dispatch_hook.ts is a ratified hook-plumbing source and was left untouched. Main entry: LOWERED 17,372 -> 17,368 on 2026-10-21 by fix/install-runtime-resolution-20261021, and the gate asked for it by name. The gain IS this branch's: cmd_doctor.ts loses four lines because the no-project-install message moved into doctor_ownership_ledger.ts, where it now reports the global scope too. install.ts stays net-zero — a dry-run block that first added sixteen lines there was moved to wizard-plan.ts rather than paid for. PRIOR ENTRY: LOWERED 17,386 -> 17,375 on 2026-10-19 by drain/road-to-skills-that-arrive-when-called-20261019z, measured by CI (the baseline-equals-live test named 17,375): install.ts's _prune_scoped_modules wrapper became a one-line alias of scoped_projection.prune_scoped_modules, which now carries the declared-skill closure. Before that: LOWERED 17,407 -> 17,386 on 2026-10-18 by drain/road-to-a-release-that-says-whether-it-needs-you-20261018x, and the gate asked for it by name (ratchet is loose, naming 17,386). The gain is an EXTRACTION paying for doctor --json's new update_verdict block (two lines in cmd_doctor.ts): STATUS_SYMBOLS and _emit_checks_text moved verbatim into _doctor_emit.ts, re-exported unchanged, so cmd_doctor.ts goes 3,560 -> 3,539. No ceiling was edited. PRIOR ENTRY: LOWERED 17,410 -> 17,407 on 2026-10-18 by drain/road-to-an-ownership-record-20261018, and the gate asked for it by name (ratchet is loose, naming 17,407). The gain is a compaction inside the function this branch changed: _deploy_claude_desktop's marker call collapsed onto one line beside the new one-line claude-desktop ledger record, leaving src/scripts/install.ts 3 lines shorter than on main. PRIOR ENTRY: MERGE RECONCILIATION 2026-10-18, 17,415/17,414 -> 17,410 — merging origin/main into drain/road-to-one-detector-and-the-senders-we-own-20261018b: main lowered to 17,415 (subagent_native_fields extraction) and this branch to 17,414 (ai_council/config.ts onto the shared rule table) from different reductions; the gate measured the merged tree at 17,410 and named it. PRIOR ENTRY: LOWERING 2026-10-18, 17,419 -> 17,415 — the gate asked for it by name (`ratchet is loose`, naming 17,415), and `check_source_size_budget.test.ts` pins baseline == live total. The gain is an EXTRACTION: road-to-a-cold-start-paid-once 2.2 needed the subagent projector to emit four new optional native fields, so the per-field logic, including the existing `effort` pass-through, moved out of `condense.ts` into `src/scripts/_lib/subagent_native_fields.ts`, which owns nothing else; condense.ts goes 2,695 -> 2,691. No ceiling was edited and no file was split to game the metric. PRIOR ENTRY: LOWERING 2026-10-18, 17,424 -> 17,419 — the gate asked for it by name (`ratchet is loose`, naming 17,419). The gain is an EXTRACTION: `install --full` (road-to-a-setup-that-decides-itself 3.5) needed seven lines in `src/scripts/install.ts`, a file 3,618 lines past the ceiling, so the `--tools`/`--ai` merge helper moved out to `src/install/toolsArg.ts`, which owns nothing else; install.ts goes 5,118 -> 5,113. No ceiling was edited and no file was split to game the metric. PRIOR ENTRY: LOWERING 2026-10-13, 17,485 -> 17,466 — the gate asked for it by name (`ratchet is loose`, naming 17,466), and `check_source_size_budget.test.ts` pins baseline == live total, so it is required rather than optional. The gain is an EXTRACTION, which is the shape this convention accepts: the settings-surface assertion needed three lines in `src/scripts/release.ts`, a file 211 lines past the ceiling, so `set_template_pin` moved out to `src/scripts/release_env.ts`, which already owns its two manifest-version siblings for exactly this stated reason and sits far under the ceiling; release.ts goes 1,730 -> 1,711. The `die` call is inlined there as a stderr write plus `SystemExitError`, because `release_publication.ts` imports from `release_env.ts` and reaching back for `die` would be a cycle. No ceiling was edited and no file was split to game the metric. PRIOR ENTRY: LOWERING 2026-10-13, 17,516 -> 17,485 — the gate asked for it by name (`ratchet is loose`, naming 17,485), and the gain is an EXTRACTION, which is the shape this convention accepts. road-to-a-search-answer-a-model-can-choose-from 1.1/1.2 described `suggest_skill_for_task` properly in `tools.ts` — what a row now carries, and why the default depth is 8 — which cost six lines in a file 521 lines past the ceiling and reddened this ratchet by exactly those six. Rather than re-pin the baseline, the whole allowlist ENTRY moved to `src/scripts/mcp_server/suggest_skill.ts`, which already owns that tool’s handler for the same stated reason; `tools.ts` goes 2,021 -> 1,984 and the net is -31. The import back is TYPE-only, so the cycle is erased at runtime. No ceiling was edited and no file was split to game the metric. PRIOR ENTRY: LOWERING 2026-10-09, 17,550 -> 17,516 — the gate asked for it by name after `REMOVED_KEYS` and its once-per-run warning moved out of `src/scripts/_lib/agent_settings.ts` (1,510 lines) into `src/scripts/_lib/settings_removed_keys.ts`, so the settings-key retirement batch adds its registry entries in a file under the ceiling instead of growing the excess; the retirement itself also deletes legacy rename-map rows and the setup-hint settings read from `src/scripts/install.ts`. Earlier: LOWERING 2026-10-05, 17,571 -> 17,550 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,550; `check_source_size_budget.test.ts` then pins baseline == live total, so this is required rather than optional. The gain IS this branch's own work and it is a DEDUPLICATION, which this convention accepts: all five CliClient subclass constructors forwarded six option fields to super() by name, which is why a seventh (`consumer`) was silently dropped and every CLI call booked as `unknown`. Replacing the five field lists with `{ ...opts, model: ... }` removes 27 lines from src/scripts/ai_council/clients.ts (2,858 -> 2,831) against the +6 the consumer fix added, so the net is -21. No ceiling was edited and no file was split to game the metric. The count is tree-derived (line counts over src/**/*.ts) and container-independent, unlike the projection-surface gates whose local readings diverge. Verified with `npx tsc --noEmit` clean and the clients suite green in this checkout. PRIOR ENTRY: LOWERING 2026-10-05, 17,585 -> 17,571 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,571. The gain IS this branch's own work and it is an EXTRACTION, which is the only shape this convention accepts: road-to-an-installed-layer-that-is-thinned step 1.1 adds a thinning call to the global deploy loop, and pays for those lines by moving `_resolve_global_rule_scope` out of `src/scripts/install.ts` into `src/install/globalRuleScope.ts` behind a same-signature wrapper, and removes the two imports the extraction orphaned (install.ts 5,180 -> 5,156). The user-global whitelist rows in `src/scripts/_lib/agent_settings.ts` push that file 1,499 -> 1,510, so the net is -5 rather than -15. No ceiling was edited and no file was split to game the metric. Verified by running the gate in this worktree after `npx tsc --noEmit` passed clean. PRIOR ENTRY: LOWERING 2026-10-02, 17,620 -> 17,592 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,592. The gain IS this branch's own work, and it is a deduplication rather than a sweep. `GLOBAL_DEPLOY_SOURCES` was defined TWICE — in `src/scripts/install.ts` and in `src/install/wizard-plan.ts` — and the two copies were byte-identical across all 18 host rows, which is a duplicate that stays correct exactly until somebody edits one of them. road-to-rule-triggers-and-links-that-hold step 1.2 did that: it added `contexts/` and `guidelines/` to the install.ts copy and the wizard kept installing without them, so the deduplication is the fix for a defect this branch introduced, not an opportunistic tidy. install.ts now imports and re-exports the wizard-plan definition, so every caller is unchanged, and the file goes 5,231 -> 5,175 lines. Verified by running the gate in this worktree after `npm run typecheck` passed clean. PRIOR ENTRY: LOWERING 2026-10-02, 17,734 -> 17,620 — a lowering commit, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,620 as the number to write. The gain is not this branch's own work; it is the net of the lanes that merged into main while this branch was in flight, which is exactly the case the clause below exists for — a tree that got smaller while a baseline stood still would let the gain be given back silently by the next change. Verified in a FRESH detached checkout of the pushed head rather than in the working worktree, because the first reading was taken in a tree that had not finished its base sync and reported the two numbers the other way round; the fresh checkout measures 17,620 against a 17,734 baseline over 1,582 scanned files. `landed` is refreshed deliberately, for the reason every entry below gives: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left high while the tree measures lower would never expire at any age. PRIOR ENTRY: LOWERING 2026-10-01, 17,745 -> 17,734 — a lowering commit, and the gate asked for it by name. road-to-a-hook-bundle-with-one-yaml-reader 3.1 split the windsurf renderer out of `condense.ts` into the new under-cap `src/scripts/_lib/windsurf_render.ts`, and `strip_frontmatter` moved with it as the render's one non-trivial dependency. `condense.ts` went 2,728 -> 2,717 excess lines. The direction is honest about its own history: an earlier commit on this branch kept the renderer INLINE in `condense.ts` and CI caught it as 20 new violations — this entry is that fix, not a sweep, and the lowering is the by-product of putting the code where it belonged. Nothing was deleted: the renderer and the stripper are both still called, by TWO callers now rather than one, and `condense.ts` re-exports `strip_frontmatter` so no importer's path changed. The new module lands at 64 lines, far under its own cap, so it contributes zero excess. LOCAL READING, same discriminator every entry below uses: the gate walks authored source under `src/`, and the only untracked path `git status --porcelain -uall -- src` reports is that new module, committed in this same change — so a clean CI checkout of this commit measures the same 17,734. If CI reads anything else, CI's number is the correct one and this note is the record of why. `landed` is refreshed deliberately, for the reason the prior entry gives: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left high while the tree measures lower would never expire at any age. PRIOR ENTRY: LOWERING 2026-09-30, 17,746 -> 17,745 — a lowering commit, and the gate asked for it by name. The direction is the surprising one again: this branch ADDED a feature to `install.ts` (an opt-in host env write) and that file came out SHORTER than it went in, 5,270 -> 5,269. The whole mechanism — the two-row allow table, the settings reader, the env-block builder and the bridge wrapper — lives in the new under-cap `src/scripts/_lib/host_env_write.ts`, so `install.ts` pays ONE import line and one expression for it; and the three-line `for` loop over healed plugin ids in the same function collapsed to one, which is inside the function the change already edits. The gain is a MOVE plus one tightening, never a deletion: nothing was dropped and nothing was swept. That module boundary is also the better one on its own terms — one place now owns which host variable this package may write, which is the question the owner decision of 2026-09-30 turns on. LOCAL READING, on the same discriminator every entry below uses: the gate walks authored source under `src/`, and `git status --porcelain -uall -- src` reported ZERO untracked files, so a clean CI checkout of this commit measures the same 17,745. If CI reads anything else, CI's number is the correct one and this note is the record of why. `landed` is refreshed deliberately: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,746 while the tree measures 17,745 would never expire at any age. PRIOR ENTRY: LOWERING 2026-09-29, 17,748 -> 17,746 — a lowering commit, same doctrine as every entry below, and the gate asked for it by name. This branch ADDED two gate scripts, a guard and a shared lib under `src/`, so the direction is the surprising one and worth stating: the new files each land under their own cap and contribute zero EXCESS, while factoring the shell write shapes out of `block_kernel_rule_writes` into `_lib/shell_write_shapes.ts` moved lines out of a file that was over its cap and into one that is not. Net -2. LOCAL READING, on the same discriminator every entry below uses: the gate walks authored source under `src/`, and `git status --porcelain -uall -- src` reported ZERO untracked files, so a clean CI checkout of this commit measures the same 17,746. If CI reads anything else, CI's number is the correct one and this note is the record of why. `landed` is refreshed deliberately: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,748 while the tree measures 17,746 would never expire at any age. PRIOR ENTRY: LOWERING 2026-09-29, 17,762 -> 17,748 — a lowering commit, same doctrine as every entry below, and the gate asked for it by name. Reporting the host traffic environment in `doctor` needed a new surface; rather than pay those lines against `src/scripts/_cli/cmd_doctor.ts`, already far over the cap, the whole network-posture block moved out into the new under-cap `src/scripts/_cli/doctor_network_posture.ts`, which is also where the new logic lives: one module owns which traffic variables exist, how each is read, and how an absent one is reported, so the unit is coherent rather than a line-count trim. cmd_doctor.ts 3,618 -> 3,604; total 17,762 -> 17,748. The gain is a MOVE, not a deletion — nothing was dropped and nothing was swept. `landed` is refreshed deliberately, for the reason the prior entries record: checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,762 while the tree measures 17,748 would never expire at any age, and the gate only ADVISES on a loose ratchet while `check_source_size_budget.test.ts` blocks — that asymmetry is what forces a lowering commit to carry its own baseline update. PRIOR ENTRY: LOWERING 2026-09-27, 17,765 -> 17,762 — the second half of the same repair, and a lowering for the same reason. Closing the remaining preservation defects needed lines in two over-cap files: `src/scripts/install.ts` (route the generated Claude Desktop marker through the tracker, hand the rule-rewrite its skip set) and `src/server/routes/wizard.ts` (surface the conflict count, stop reporting exit 3 as a failure). Both were paid from the same subject rather than from the ratchet: `_files_by_tool_from_bridges` joined its sibling in `src/install/manifestFiles.ts`, which now owns the whole per-tool inventory, and the wizard's exit-code semantics moved into `src/install/preserve.ts` beside `installDoneSummary`, which already lives there for this exact reason. install.ts 5,277 -> 5,270; wizard.ts 1,500 -> 1,504. PRIOR ENTRY: LOWERING 2026-09-27, 17,784 -> 17,765 — a lowering commit, same doctrine as the entry it replaces. Repairing the install-manifest digest loss needed new state in `_update_installed_tools_manifest` (a recorded-inventory read, a preserved-path index, a reconciliation call). Rather than pay that against `src/scripts/install.ts`, already 3,777 over the cap, the manifest file-inventory block (`_sha256_of_file`, `_file_entry`, `_files_by_tool_from_deploy` — 29 lines) moved out into the under-cap `src/install/manifestFiles.ts`, which is where the new logic lives too: one module now owns what the manifest's per-tool `files[]` holds, how it is read back, and how the two reconcile, so the unit is coherent rather than a line-count trim. install.ts 5,296 -> 5,277; total 17,784 -> 17,765. PRIOR ENTRY: LOWERING 2026-09-20, 17,858 -> 17,784 — a lowering commit, not a reconciliation, but measured under the same doctrine the four entries below carry: the committed number is the gate's own reading on the MERGED tree, taken after origin/main was merged into drain/headless-log-write rather than from either side. The branch's transaction-log write added 27 lines to `src/scripts/install.ts`, already 3,897 over the cap, taking the total to 17,885. Rather than pay that, the `json.dumps` byte-parity block (`jsonStrNoAscii`, `_jsonScalar`, `_dumpIndent`, `jsonDumpsIndent`, `jsonDumpsCompact` — 101 lines) moved out of `install.ts` into the under-cap `src/scripts/_lib/json_python_parity.ts`: pure, total functions of their input carrying no installer state, so the unit is coherent rather than a line-count trim. install.ts 5,397 -> 5,296; total 17,885 -> 17,784, a net -74 against the prior baseline. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-14, 17,861 -> 17,858 — the FOURTH reconciliation of this entry, same doctrine as the three below: the committed number is the gate's own reading on the MERGED tree, never either side's. Neither branch earned the -3; it falls out of main having absorbed drain/release-head-field, whose `derive_head_prefill` extraction moved the span-to-prefill composition into an under-cap module. Taking this branch's 17,861 would have silently given that gain back. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-13, 17,863 -> 17,861 — the THIRD reconciliation of this entry in one day, and re-measured on the merged tree rather than taken from either side, which is the only resolution that converges. drain/adversarial-verification reached 17,864 by paying for a `forge_protection` block and a cascade-base module entirely in files under the 1,500-line cap; the incoming reconciliation reached 17,863 from different work. Neither describes the merge. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-13, 17,944/17,866 -> 17,863. drain/decision-closure and drain/breaking-line-contradiction each lowered from the SAME 17,947 base in parallel -- this branch to 17,944 (net -3: the ownership vocabulary, its two Iron-Law sets and the merged default-mode map moved out of ai_council/config.ts into ai_council/ownership_classes.ts, and the settings-rename block moved out of _lib/agent_settings.ts into _lib/settings_renamed_keys.ts, both UNDER the 1500 cap so both cost nothing) and main to 17,866. Taking either side alone is wrong in a different direction, which is the doctrine this entry already carries from 2026-09-03 and 2026-09-07: main's value silently discards this branch's earned -3, and this branch's value RAISES the baseline against main and weakens the gate. The committed number is neither -- it is the gate's own output on the MERGED tree, where both reductions apply. MAIN-SIDE ENTRY, carried so neither branch's record is lost: Lowered 17,947 -> 17,866 on 2026-09-13 by drain/breaking-line-contradiction, on this entry's own doctrine. The branch adds the BACKWARD half of the MIGRATION.md obligation -- a refusal for a major cut whose BREAKING section has no migration entry -- and writing it into release.ts came in at +61, because that file sits ~375 lines PAST the 1500 cap so every line there is one unit. Paid down rather than baselined, and the move was the coherent unit rather than the minimum one: BOTH refusals went, the new backward half and the pre-existing forward half (assert_scheduled_deprecations_clear), into _lib/release_migration_gate.ts at 184 lines and therefore UNDER the cap, so the pair and all their rationale now cost nothing. They moved on merit rather than only on arithmetic -- they are the two halves of one obligation, written eleven months apart, and release.ts held only the two call sites. parse_version stayed module-private in release.ts and the lib carries a two-line _minor_patch instead: exporting a private helper to serve one caller would widen the surface of the file the move exists to narrow. release.ts 1,875 -> 1,733: a branch that ADDED a pipeline refusal leaves the file eighty-one lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports nothing staged and nothing untracked at this commit, so a clean CI checkout measures the same 17,866. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises -- which is how CI found it: the gate exited 0 with a loose-ratchet warning and the test went red. PRIOR ENTRY: Lowered 17,959 -> 17,947 on 2026-09-11 by the findings-ledger branch, on this entry's own doctrine. The branch adds step 7 to release.ts, which sits ~326 lines PAST the 1500 cap so every line there is one unit, and it came in at +145. Paid down rather than baselined, in two moves. `settle_findings_ledger` and `_blocking_without_disposition` moved out of release.ts into _lib/release_findings_ingest.ts -- 95 lines, and that module is under the cap, so the step and its rationale now cost nothing. It moved on merit rather than only on arithmetic: the module already owns every message the step prints and every argv it builds, and release.ts held only the sequencing. Then the `--ci` fallback dispatch of the three tag-triggered workflows -- 24 lines of loop and warning with no reader elsewhere in step 10 -- moved into _lib/release_tag_dispatch.ts, also under the cap. release.ts 1,826 -> 1,814: a branch that ADDED a pipeline step leaves the file twelve lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ file staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,947. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,963 -> 17,959 on 2026-09-09 by feat/cdd-fidelity-council, on the same shape as the entry below and with the same discriminator. The branch's src-link rewrite (a blind review found 253 of 268 links under dist/agent-src/guidelines/ dead, because condense.ts folded only the docs/ prefixes and never (../)+src/rules|skills) came in at +15 excess: condense.ts sits ~1,208 lines PAST the 1500 cap, so every line there is one unit. Paid down rather than baselined, in the way this entry's doctrine prescribes. `_rewrite_body_links` and its two regex constants moved out of condense.ts into _lib/guidelines_lane.ts, 151 lines and therefore UNDER the cap, so the function and its prose now cost nothing. It moved on merit rather than only on arithmetic: every rule the rewriter applies is a statement about which source tree projects where, which is that module's own subject, and condense.ts held it only because that is where the projector lives. condense.ts 2,712 -> 2,708 net, after the one import line and the one call-site rename -- a branch that ADDED a rewrite rule leaves the file four lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ files tracked and nothing untracked, so a clean CI checkout of this commit measures the same 17,959. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,973 -> 17,963 on 2026-09-08 by drain/graph-shipped-close. The branch registers five code-graph MCP tools (road-to-a-graph-that-is-shipped 4.1). Their five records and schemas are ~250 lines, and putting them in mcp_server/tools.ts -- which sits ~500 lines PAST the 1500 cap, so every line there is one unit -- would have cost ~250 excess. They live in mcp_server/graph_tools.ts instead (~280 lines, UNDER the cap, so they and their prose cost nothing), and tools.ts spreads them into ALLOWLIST in two lines: one import and one `...GRAPH_TOOLS,`. Those two were paid for rather than baselined, in the way this entry's doctrine prescribes: `_strip` and `_resolvePath` -- a whitespace trim and a tolerant realpath, generic by nature -- moved out of tools.ts into mcp_server/path_util.ts, also under the cap. They are imported under their original underscore names, so all 28 call sites are unchanged and a two-function move does not read as a sweep. tools.ts 2,025 -> 2,015: -12 from the extraction, +2 from the registration, net -10 for a branch that ADDED a feature. CORRECTED 2026-09-08 after an independent review checked the figure against the tree -- this sentence read '2,025 -> 2,013, net -12, against the +2 the registration needed', which states an intermediate file length as the final one and leaves the arithmetic (-12) and the conclusion (-10) describing different trees. `git show origin/main:...tools.ts | wc -l` is 2025 and the working tree is 2015. The TOTAL, 17,963, was always the gate's own output and is unchanged. Every other file this branch touches or creates -- code_graph/verbs.ts, code_graph/cli.ts, code_graph/build.ts, code_graph/detect.ts, code_graph/query.ts, code_graph/sqlite_store.ts, code_graph/types.ts, _lib/regression_neighbourhood.ts -- is under the 1500 ceiling before and after, so it contributes zero excess whatever it grew by. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,963. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,974 -> 17,973 on 2026-09-08 by drain/topology-c1. The branch adds a live-path emit to council_cli.ts, which sits 2,454 lines PAST the 1500 cap so every line there is one unit, and paid its own way down rather than raising the baseline, in the way this entry's doctrine prescribes. The twelve-line `all_responses` assembly (a spread, three conditionals and a push) moved out of council_cli.ts into ai_council/deliberation_metrics.ts::runCallsFrom, 353 lines and therefore UNDER the cap, so the six stage labels and their prose cost nothing. It moved on merit rather than only on arithmetic: 'which calls did this run make, and at which stage' is that module's own subject, and the CLI held the list only as a flat array with the stage boundaries implicit in the order -- both readings now come out of one walk, so the billing total and the attribution can never be computed over different sets. council_cli.ts 3,955 -> 3,954 net, after the two call lines, the import and the one payload key the feature needed. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,973. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,016 -> 17,974 on 2026-09-07 by fix/single-delivery-unconditional. SETTLED FIGURE, and it supersedes an intra-session 17,962 this same branch committed earlier — read the direction against MAIN, which is what the ratchet protects: main is 18,016, the branch leaves 17,974, net -42. The 17,962 was this branch's own low before a neutral review returned twelve findings; fixing them added a real mechanism to mcp_server and condense.ts (the flat-wrapper carriage gate the review showed was missing, plus its four-skip predicate), and condense.ts sits ~1,215 lines PAST the cap so each of those lines is one unit. Paid down first, in the way this entry's doctrine prescribes: _suggestSkillForTaskHandler and its 18-line docstring moved out of mcp_server/tools.ts (2,079 -> 2,025) into mcp_server/suggest_skill.ts, 72 lines and UNDER the cap, so its prose costs nothing. The residual +12 against the intra-session low is the gate's own output on the settled tree and is recorded rather than engineered away, because the alternative was extracting _nested_command_subpath and its two callers out of condense.ts - which needs MODULE_STATE, _relativeToPosix and _domains_command_logical passed in, a wider diff than the finding warrants and one no review asked for. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the three new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,974. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-07, 18,061/18,017 -> 18,016. drain/admissible-council-seats and fix/release-obligation-answerable each lowered from the SAME 18,062 base in parallel — main to 18,061 (net -1: curlJsonPost, the seat-status helpers and the per-seat config parsing moved out of the three over-ceiling council files) and the branch to 18,017 (net -45: the /dev/tty prompt helpers moved out of release.ts into _lib/tty_prompt.ts, 76 lines and UNDER the cap, taking release.ts 1871 -> 1826). Taking either side alone is wrong in a different direction, which is the reconciliation doctrine this entry already carried from 2026-09-03: main's value silently discards the branch's earned -45, and the branch's value RAISES the baseline against main and weakens the gate. The committed number is neither — it is the gate's own output on the MERGED tree, where both reductions apply, and it equals the arithmetic (18,062 - 45 - 1 = 18,016) rather than being reconciled by it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports ZERO untracked files, so a clean CI checkout of this commit measures the same 18,016. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in the merge commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,062 -> 18,061 on 2026-09-07 by drain/admissible-council-seats. The branch's own additions to the three over-ceiling files (ai_council/config.ts, council_cli.ts, ai_council/clients.ts) came in at +96 excess and were paid down to -1 rather than baselined, in the four ways this entry's doctrine prescribes: `curlJsonPost` moved out of clients.ts into ai_council/api_transport.ts (UNDER the cap, so the prose and the three new provider shims cost nothing); the seat-status helpers moved out of council_cli.ts into ai_council/status_surface.ts, taking an orphaned doc comment with them; the three new per-seat config fields' parsing moved out of config.ts into ai_council/seat_policy.ts::parseSeatFields; and three prose blocks that the branch's own transport repair made FACTUALLY FALSE (the `openai` / `google-genai` Python-SDK claims, and a `_curlJsonPost` pointer to a function that had moved) were corrected and shortened in the same change. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports zero untracked files with the five new src/ files staged, so a clean CI checkout of this commit measures the same 18,061. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried here because tests/scripts/check_source_size_budget.test.ts:166 asserts baseline == live and therefore blocks where the gate only advises -- the lowering commit must carry its own baseline update. Lowered 18,068 -> 18,062 on 2026-09-06 by drain/host-enforcement-truth. Collapsing the five per-host binding constants in install.ts into src/scripts/hooks/host_lowering.yaml removed 29 lines from a file ~3,900 past the 1500 cap, where every line costs one excess; the journal's surface column and its extracted migration helper gave 23 back. Lowered 18,245 -> 18,230 on 2026-09-02 by drain/publication-integrity-option-a. Phase 2 Option A moved the authoring instruction out of the generator: release.ts, which sits ~530 lines PAST the 1500 cap so every line there costs one excess, loses the comment emission, a 16-line HEAD_DEFAULT doc block and its alias const, and gains a shorter writer docstring. The doc block moved to _lib/release_material.ts, which is 289 lines and therefore UNDER the cap, so the same prose now costs nothing. Net -15. The branch first came in at +8 and paid its own way down rather than raising the baseline. BRANCH-SIDE ENTRY: Lowered 17,947 -> 17,944 on 2026-09-13 by drain/decision-closure, on this entry's own doctrine and at the gate's own request. The branch's ownership-axis additions to ai_council/config.ts came in at +86 excess: that file sits ~700 lines PAST the 1500 cap, so every line there is one unit. Paid down rather than baselined, in one move. The eight ownership class names, the two Iron-Law sets, the merged default-mode map and the mode-check function moved out of config.ts into ai_council/ownership_classes.ts -- 91 lines, UNDER the cap, so the vocabulary and its prose now cost nothing. It moved on merit rather than only on arithmetic: the roadmap-side gate lint_decision_classes needs the same eight names and has no business importing the council's whole schema to learn them, and the loader now carries three lines where it carried twenty-four. config.ts 2,182 -> 2,179: a branch that ADDED an entire decision axis leaves the file three lines shorter than it found it. Every other src/ file this branch creates -- lint_decision_classes.ts, lint_roadmap_producers.ts, closure_scan.ts, council_record_shape.ts, scope_growth.ts, ownership_classes.ts -- is under the 1500 ceiling, so it contributes zero excess whatever it grew by. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ files tracked and nothing untracked, so a clean CI checkout of this commit measures the same 17,944. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,959 -> 17,947 on 2026-09-11 by the findings-ledger branch, on this entry's own doctrine. The branch adds step 7 to release.ts, which sits ~326 lines PAST the 1500 cap so every line there is one unit, and it came in at +145. Paid down rather than baselined, in two moves. `settle_findings_ledger` and `_blocking_without_disposition` moved out of release.ts into _lib/release_findings_ingest.ts -- 95 lines, and that module is under the cap, so the step and its rationale now cost nothing. It moved on merit rather than only on arithmetic: the module already owns every message the step prints and every argv it builds, and release.ts held only the sequencing. Then the `--ci` fallback dispatch of the three tag-triggered workflows -- 24 lines of loop and warning with no reader elsewhere in step 10 -- moved into _lib/release_tag_dispatch.ts, also under the cap. release.ts 1,826 -> 1,814: a branch that ADDED a pipeline step leaves the file twelve lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ file staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,947. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,963 -> 17,959 on 2026-09-09 by feat/cdd-fidelity-council, on the same shape as the entry below and with the same discriminator. The branch's src-link rewrite (a blind review found 253 of 268 links under dist/agent-src/guidelines/ dead, because condense.ts folded only the docs/ prefixes and never (../)+src/rules|skills) came in at +15 excess: condense.ts sits ~1,208 lines PAST the 1500 cap, so every line there is one unit. Paid down rather than baselined, in the way this entry's doctrine prescribes. `_rewrite_body_links` and its two regex constants moved out of condense.ts into _lib/guidelines_lane.ts, 151 lines and therefore UNDER the cap, so the function and its prose now cost nothing. It moved on merit rather than only on arithmetic: every rule the rewriter applies is a statement about which source tree projects where, which is that module's own subject, and condense.ts held it only because that is where the projector lives. condense.ts 2,712 -> 2,708 net, after the one import line and the one call-site rename -- a branch that ADDED a rewrite rule leaves the file four lines shorter than it found it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the branch's new src/ files tracked and nothing untracked, so a clean CI checkout of this commit measures the same 17,959. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,973 -> 17,963 on 2026-09-08 by drain/graph-shipped-close. The branch registers five code-graph MCP tools (road-to-a-graph-that-is-shipped 4.1). Their five records and schemas are ~250 lines, and putting them in mcp_server/tools.ts -- which sits ~500 lines PAST the 1500 cap, so every line there is one unit -- would have cost ~250 excess. They live in mcp_server/graph_tools.ts instead (~280 lines, UNDER the cap, so they and their prose cost nothing), and tools.ts spreads them into ALLOWLIST in two lines: one import and one `...GRAPH_TOOLS,`. Those two were paid for rather than baselined, in the way this entry's doctrine prescribes: `_strip` and `_resolvePath` -- a whitespace trim and a tolerant realpath, generic by nature -- moved out of tools.ts into mcp_server/path_util.ts, also under the cap. They are imported under their original underscore names, so all 28 call sites are unchanged and a two-function move does not read as a sweep. tools.ts 2,025 -> 2,015: -12 from the extraction, +2 from the registration, net -10 for a branch that ADDED a feature. CORRECTED 2026-09-08 after an independent review checked the figure against the tree -- this sentence read '2,025 -> 2,013, net -12, against the +2 the registration needed', which states an intermediate file length as the final one and leaves the arithmetic (-12) and the conclusion (-10) describing different trees. `git show origin/main:...tools.ts | wc -l` is 2025 and the working tree is 2015. The TOTAL, 17,963, was always the gate's own output and is unchanged. Every other file this branch touches or creates -- code_graph/verbs.ts, code_graph/cli.ts, code_graph/build.ts, code_graph/detect.ts, code_graph/query.ts, code_graph/sqlite_store.ts, code_graph/types.ts, _lib/regression_neighbourhood.ts -- is under the 1500 ceiling before and after, so it contributes zero excess whatever it grew by. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,963. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 17,974 -> 17,973 on 2026-09-08 by drain/topology-c1. The branch adds a live-path emit to council_cli.ts, which sits 2,454 lines PAST the 1500 cap so every line there is one unit, and paid its own way down rather than raising the baseline, in the way this entry's doctrine prescribes. The twelve-line `all_responses` assembly (a spread, three conditionals and a push) moved out of council_cli.ts into ai_council/deliberation_metrics.ts::runCallsFrom, 353 lines and therefore UNDER the cap, so the six stage labels and their prose cost nothing. It moved on merit rather than only on arithmetic: 'which calls did this run make, and at which stage' is that module's own subject, and the CLI held the list only as a flat array with the stage boundaries implicit in the order -- both readings now come out of one walk, so the billing total and the attribution can never be computed over different sets. council_cli.ts 3,955 -> 3,954 net, after the two call lines, the import and the one payload key the feature needed. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the two new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,973. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,016 -> 17,974 on 2026-09-07 by fix/single-delivery-unconditional. SETTLED FIGURE, and it supersedes an intra-session 17,962 this same branch committed earlier — read the direction against MAIN, which is what the ratchet protects: main is 18,016, the branch leaves 17,974, net -42. The 17,962 was this branch's own low before a neutral review returned twelve findings; fixing them added a real mechanism to mcp_server and condense.ts (the flat-wrapper carriage gate the review showed was missing, plus its four-skip predicate), and condense.ts sits ~1,215 lines PAST the cap so each of those lines is one unit. Paid down first, in the way this entry's doctrine prescribes: _suggestSkillForTaskHandler and its 18-line docstring moved out of mcp_server/tools.ts (2,079 -> 2,025) into mcp_server/suggest_skill.ts, 72 lines and UNDER the cap, so its prose costs nothing. The residual +12 against the intra-session low is the gate's own output on the settled tree and is recorded rather than engineered away, because the alternative was extracting _nested_command_subpath and its two callers out of condense.ts - which needs MODULE_STATE, _relativeToPosix and _domains_command_logical passed in, a wider diff than the finding warrants and one no review asked for. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports the three new src/ files staged and nothing untracked, so a clean CI checkout of this commit measures the same 17,974. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in this commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: MERGE RECONCILIATION 2026-09-07, 18,061/18,017 -> 18,016. drain/admissible-council-seats and fix/release-obligation-answerable each lowered from the SAME 18,062 base in parallel — main to 18,061 (net -1: curlJsonPost, the seat-status helpers and the per-seat config parsing moved out of the three over-ceiling council files) and the branch to 18,017 (net -45: the /dev/tty prompt helpers moved out of release.ts into _lib/tty_prompt.ts, 76 lines and UNDER the cap, taking release.ts 1871 -> 1826). Taking either side alone is wrong in a different direction, which is the reconciliation doctrine this entry already carried from 2026-09-03: main's value silently discards the branch's earned -45, and the branch's value RAISES the baseline against main and weakens the gate. The committed number is neither — it is the gate's own output on the MERGED tree, where both reductions apply, and it equals the arithmetic (18,062 - 45 - 1 = 18,016) rather than being reconciled by it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports ZERO untracked files, so a clean CI checkout of this commit measures the same 18,016. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried in the merge commit because tests/scripts/check_source_size_budget.test.ts asserts baseline == live and therefore BLOCKS where the gate only advises. PRIOR ENTRY: Lowered 18,062 -> 18,061 on 2026-09-07 by drain/admissible-council-seats. The branch's own additions to the three over-ceiling files (ai_council/config.ts, council_cli.ts, ai_council/clients.ts) came in at +96 excess and were paid down to -1 rather than baselined, in the four ways this entry's doctrine prescribes: `curlJsonPost` moved out of clients.ts into ai_council/api_transport.ts (UNDER the cap, so the prose and the three new provider shims cost nothing); the seat-status helpers moved out of council_cli.ts into ai_council/status_surface.ts, taking an orphaned doc comment with them; the three new per-seat config fields' parsing moved out of config.ts into ai_council/seat_policy.ts::parseSeatFields; and three prose blocks that the branch's own transport repair made FACTUALLY FALSE (the `openai` / `google-genai` Python-SDK claims, and a `_curlJsonPost` pointer to a function that had moved) were corrected and shortened in the same change. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500-line ceiling, and `git status --porcelain -uall -- src/` reports zero untracked files with the five new src/ files staged, so a clean CI checkout of this commit measures the same 18,061. If CI reads anything else, CI's number is the correct one and this note is the record of why. Carried here because tests/scripts/check_source_size_budget.test.ts:166 asserts baseline == live and therefore blocks where the gate only advises -- the lowering commit must carry its own baseline update. Lowered 18,068 -> 18,062 on 2026-09-06 by drain/host-enforcement-truth. Collapsing the five per-host binding constants in install.ts into src/scripts/hooks/host_lowering.yaml removed 29 lines from a file ~3,900 past the 1500 cap, where every line costs one excess; the journal's surface column and its extracted migration helper gave 23 back. Lowered 18,245 -> 18,230 on 2026-09-02 by drain/publication-integrity-option-a. Phase 2 Option A moved the authoring instruction out of the generator: release.ts, which sits ~530 lines PAST the 1500 cap so every line there costs one excess, loses the comment emission, a 16-line HEAD_DEFAULT doc block and its alias const, and gains a shorter writer docstring. The doc block moved to _lib/release_material.ts, which is 289 lines and therefore UNDER the cap, so the same prose now costs nothing. Net -15. The branch first came in at +8 and paid its own way down rather than raising the baseline.",
41
+ "earlier_history": "LOWERED 17,426 -> 17,424 on 2026-10-18 by drain/road-to-a-hook-carrier-that-is-never-silent-20261018, and the gate asked for it BY NAME (ratchet is loose, naming 17,424). The gain is an EXTRACTION: the claude-code thin call site in src/scripts/install.ts became one call to deployClaudeCarrier in src/install/stagedRuntime.ts, which is under the cap, and the new doctor hook-carrier check lives there too rather than in cmd_doctor.ts. The branch first measured +58 against this baseline and paid its own way down. If CI reads a different number, CI's number wins. Prior entry: LOWERED 17,434 -> 17,426 on 2026-10-17 as the merged-tree reading of #2421 + #2422: merging main into drain/road-to-a-release-that-says-whether-it-needs-you, the gate reported `17426 violation(s), baseline 17434 - ratchet is loose` and named 17,426, because both PRs had lowered 17,442 -> 17,434 through DIFFERENT reductions and both now apply. #2421: `src/scripts/release.ts` went 1,711 -> 1,703 lines when its commit parsing moved into `src/scripts/_lib/consumer_impact.ts`; #2422: see the entry that follows. If CI reads a different number, CI's number wins. Prior entry: LOWERED 17,442 -> 17,434 on 2026-10-16 by drain/road-to-an-ownership-record-that-belongs-to-the-user, and the gate asked for it BY NAME (ratchet is loose, naming 17,434), with CI shard 4/4 measuring the same live total. The gain is an EXTRACTION: the inventory load, both reapers, the record and the save that src/scripts/install.ts ran inline for each global deploy moved into src/install/ownershipLedger.ts (recordGlobalDeploy), install.ts 5,132 -> 5,124. Prior entry: LOWERED 17,466 -> 17,442 on 2026-10-13 by drain/what-was-built-never-ran, and the gate asked for it BY NAME: it reported `17442 violation(s), baseline 17466 - ratchet is loose` and named 17,442 itself. The gain is a DELETION rather than an extraction: `src/scripts/hooks/run_continuation_hook.ts` (1,529 lines, 29 past the 1500 cap) was removed with its concern, which was withdrawn on its own pre-registered kill date (road-to-what-was-built-and-never-ran Phase 4, executing a dated kill criterion a converged two-seat council set on 2026-09-12). Only the 29 lines past the cap are what this gate counts, and the remaining movement comes from comment edits the same sweep made in files that also sit past it. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR, which the paragraphs below establish: the gate walks only SOURCE_ROOTS=['src'] counting excess over the 1500 ceiling, and a porcelain status over that root reports ZERO untracked files, so a clean CI checkout of this commit measures the same 17,442. If CI reads anything else, CI's number is the correct one and this note is the record of why. PRIOR REASON: Lowered 17,585 -> 17,571 on 2026-10-05 by lane/installed-layer-thinned, and the gate asked for it BY NAME. The gain is this branch's own, through two extractions rather than a sweep: `_resolve_global_rule_scope` to `src/install/globalRuleScope.ts` and the thinning mechanism to `src/scripts/_lib/thin_rules.ts`. PRIOR REASON: Lowered 17,590 -> 17,585 on 2026-10-03 by drain/rule-carrier-phase1b-20261002, and the gate asked for it BY NAME: it reported `ratchet is loose` and named 17,585. The gain is INCIDENTAL rather than sought, and it comes from two files that sit past the 1500-line cap. `src/scripts/ai_council/clients.ts` (2,852 lines, 1,352 past) lost the 18-line doc comment and declaration of `OPENAI_CLI_VENDOR_DEFAULT`, which moved to a new `ai_council/vendor_defaults.ts` well under the cap, so those lines stopped being charged; the move itself was made to break an import edge costing 51,523 B of composed hook bundle, not to shed lines. `src/scripts/install.ts` (5,229 lines, 3,729 past) gained a three-line call site for the headless `.gitignore` block and NOT the 44-line function behind it, which was written into `_lib/gitignore_block.ts` instead — that placement was chosen when this gate reported +44 and said a ratchet only turns one way, and it is the better home anyway. Net across both: -5. LOCAL READING, on the same discriminator the entries above use: the gate walks authored source under src/, and a porcelain status over that root reports no untracked files, so a clean CI checkout of this commit measures the same 17,585. `landed` is refreshed deliberately — checkRatchet returns `improved` BEFORE it evaluates staleness, so an entry left at 17,590 while the tree measures 17,585 would never expire at any age. PRIOR ENTRY: Lowered 17,592 -> 17,590 on 2026-10-03 by drain/rule-carrier-phase1-20261002, and the gain was INCIDENTAL rather than sought. The branch replaced `condense.ts::_lean_projection_settings` — an eight-line private reader of `lean_projection.mode` and `.hosts` — with one call to the shared `resolveLeanProjection`, net -2 lines in a file that sits ~1,195 lines PAST the 1500 cap, so every line removed there is one excess removed. Nothing was deleted to make a number: the projector reads the same settings file it always read, and `task sync` plus `task generate-tools` produce zero changes under `dist/agent-src/`, which is how that roadmap's risk 2 (one mode resolver moves the projector) was discharged. The gate reported the tree at 17,590 against a baseline of 17,592 and asked for exactly this lowering, so the gain cannot be silently given back. LOCAL READING, ADMISSIBLE ON THE SAME DISCRIMINATOR THIS FILE'S OTHER ENTRIES USE: the gate walks `src/` only, and a porcelain status over that root reported no untracked files, so a clean CI checkout of this commit measures the same 17,590. If CI reads anything else, CI's number is the correct one and this note is the record of why. PRIOR ENTRY: Lowered 18,230 -> 18,209 on 2026-09-03 by drain/artifact-location. `doctor --strict` needed 16 lines of integration wiring in cmd_doctor.ts, which sits ~2,100 lines PAST the 1500 cap so every line there costs one excess. The branch first came in at +137 and paid its own way down rather than raising the baseline: the strict semantics, threshold, kill switch, payload helper and argv fragments moved to _cli/_doctor_strict.ts (~160 lines, under the cap, costs nothing), taking it to +15; then the 37-line drift renderer moved to _cli/_doctor_emit.ts. Net -21. The renderer was chosen deliberately: pure rendering, two dependencies, no argparse involvement and therefore none of the byte-parity risk the parser surface carries against the retired Python implementation; nothing outside cmd_doctor.ts imported it. An AI council on the residual split (a: raise by 15 / d: descope the feature); neither was taken, because a parallel branch demonstrated the same day that paying down is achievable in this codebase, which is the evidence the split lacked. This gate's own test comment prescribes it: a commit that splits a god-file lowers the excess and must carry the lowered baseline. MERGE RECONCILIATION 2026-09-03, 18,209 -> 18,205: drain/wired-instruments and drain/artifact-location each lowered from the SAME 18,230 base in parallel -- the branch to 18,226 (net -4, run_continuation_hook.ts's termination ladder moved to _lib/continuation_ladder.ts and runtime_journal.ts's prose to _lib/outcome_vocabularies.ts, both under the cap) and main to 18,209 (net -21, the doctor --strict split above). Taking either side alone is wrong in a different direction: main's value silently discards the branch's earned -4, and the branch's value RAISES the baseline against main and weakens the gate. The committed number is neither -- it is the gate's own output on the merged tree, where both reductions apply. THIS LOCAL READING IS ADMISSIBLE HERE, and the discriminator matters because this file's ci-parity:local-only entry records a 165 -> 164 lowering that was reverted for exactly the opposite case: that count depends on how the environment resolves the projection surface, whereas this gate walks only SOURCE_ROOTS = ['src'] (check_source_size_budget.ts:88) counting excess lines over the 1500 ceiling, and `git status --porcelain -uall -- src/` reported ZERO untracked files, so a clean CI checkout of this commit measures the same 18,205. If CI reads anything else, CI's number is the correct one and this note is the record of why. LOWERED 18,205 -> 18,193 on 2026-09-03 by fix/release-curation-ask. The change adds a fifth publication guard, and its own additions landed at +10 excess: release.ts 2,008 -> 2,018, every line of which is past the 1500 cap. Paid down rather than baselined, in the two ways this gate's doctrine prescribes. The guard's rationale (~13 lines of docstring, including why prMerged is a parameter rather than a call-site if) lives in release_publication.ts, 915 lines and therefore UNDER the cap, so the prose costs nothing; and the two pure text helpers _splitlines and _rstrip moved out of release.ts into release_env.ts (333 lines, also under the cap), taking release.ts to 1,996 -- 12 BELOW where it started. The branch came in at +10 and leaves at -12. Recorded while moving them: _splitlines is duplicated a third and fourth time at adoption_report.ts:106 and readme_linter.ts:418; collapsing all three onto one definition touches three modules and was left out of this change rather than done silently. LOWERED 18,193 -> 18,180 on 2026-09-03 by fix/release-branch-reuse. The step-1 branch decision -- twenty lines of if/else in release.ts -- became one call to checkout_release_branch in release_publication.ts, which is 1,019 lines and therefore UNDER the 1500 cap, so the twenty lines plus a ~35-line rationale now cost nothing. release.ts 1,996 -> 1,983, every one of those lines being past the cap. The drill grew 765 -> 918 for two new scenarios and the snapshot/restore that keeps them from writing the real CHANGELOG, and it is under the cap too. A change that adds a feature and lowers the excess is the shape this gate's doctrine asks for; the alternative was a +13 raise for logic that had no business in the god-file. LOWERED 18,180 -> 18,068 on 2026-09-05 by fix/release-gate-producer-parity. The change wires the governance-mix obligation into the writer and the two local guards and adds a release-gate locality registry; its own additions to release.ts landed at +19 excess, every one of those lines past the 1500 cap. Paid down rather than baselined, in the way this entry's doctrine prescribes: the 132-line test-count-trend unit (_TEST_COUNT_LINE_RE, _TEST_LIST_MAX_BUFFER, _count_from_list_result, _count_tests_current, _previous_test_count_from_changelog, _render_test_trend_line) moved from release.ts into release_publication.ts, which is under the cap and where it now belongs on merit rather than only on arithmetic -- the same diff makes the missing `Tests: N` footer a section-level publication blocker, so the writer that emits the footer and the guard that refuses its absence sit in one module. release.ts 1,983 -> 1,871. All four names are re-exported from release.ts, so tests/scripts/release.test.ts is unchanged. LOCAL READING, ADMISSIBLE ON THIS ENTRY'S OWN DISCRIMINATOR: the gate walks only SOURCE_ROOTS=['src'] counting excess over the ceiling, and `git status --porcelain -uall -- src/` reports ZERO untracked files with the two new src/ files staged, so a clean CI checkout of this commit measures the same 18,068. If CI reads anything else, CI's number is the correct one and this note is the record of why."
51
42
  },
52
43
  "ci-parity:local-only": {
53
- "count": 165,
54
- "landed": "2026-08-24",
55
- "note": "Gates that `task ci` runs and no workflow does — the direction this manifest's own header calls the one that let real defects merge (16 stale index rows reached the trunk behind a local-only check-index). Revealed, not created, by repairing the checker's extraction: check_ci_local_parity built its CI-side set by regexing RAW workflow text for `task <name>` and expanding each closure, comments included. Several workflow comments contain the literal string `task ci` while stating that no workflow invokes it, so `ci` was read as an invocation and its full 247-gate closure entered the 'runs in CI' set. The count was therefore 0 BY CONSTRUCTION, and the prose documenting the gap was what suppressed it. Measured at the repair: CI-side 273 → 106, undeclared_local_only 0 → 167 of 247 local gates (68%). Baselined rather than hard-failed because 167 findings nobody can clear in the change that reveals them is the gate-that-lands-as-N-instant-blockers failure this repository has refused before; shrink-only keeps the property that matters, namely that a NEW gate registered in `task ci` with no workflow reds immediately. Lowering happens by wiring gates into workflows or declaring them under `local_only:` with a reason. Note the punchline, because it bounds the risk of this entry: check_ci_local_parity ITSELF runs in no workflow, so it is its own finding and this ratchet has no remote reach either — clearing the backlog is what gives it teeth. DRAINED BY ONE, 2026-08-13: check_ci_local_parity itself was wired into consistency.yml, so it left the set it exists to report. That is the whole shape of a legitimate drain here — the gate stops being local-only because a workflow now runs it, not because the declaration list grew. The floor in gate-coverage.yml moved in the same change and for the same reason: wiring two gates raised the parsed population 357 -> 360 (109 CI + 251 local). The intermediate 359 was the reading after the CI-side wiring alone and before check_gate_coverage joined the local `ci` chain; it was committed here by mistake and is corrected rather than left as a second number for the same measurement. WALKED DOWN 166 -> 165 on 2026-08-20 (road-to-session-closeout 5.2): check_ci_local_parity reported `ci-parity:local-only: 165 violation(s), baseline 166 - ratchet is loose` and asked for exactly this, so the gain cannot be silently given back. The measurement is the gate's own output on the merged tree, not a branch. What is NOT done here is the classification the same step asks for: 165 gates each need a recorded class (belongs-in-CI / developer-aid / dead), which is per-gate judgement, and migrating them would red the trunk on the landing day - the step forbids it for that reason. ATTEMPTED 165 -> 164 on 2026-08-24 and REVERTED in the same change, recorded because the mistake is instructive rather than embarrassing. A local run of check_ci_local_parity reported the ratchet LOOSE at 164 and asked to be lowered; CI then measured 165 and red the gate at '1 new'. The local reading was environment-dependent -- the drain worktree resolves the projection surface differently from a clean checkout, which is the same worktree divergence check_rule_projection_integrity shows on the same tree -- so the number was never real slack. THE RULE THIS CONFIRMS: this baseline is walked down on a reading from the ENFORCING environment, never on a local one, exactly as the 166 -> 165 paragraph above says ('the measurement is the gate's own output on the merged tree, not a branch'). A gate inviting a lowering is not evidence that the lowering is correct.",
44
+ "count": 22,
45
+ "landed": "2026-10-17",
46
+ "note": "Gates that `task ci` runs and no workflow does — the direction this manifest's own header calls the one that let real defects merge (16 stale index rows reached the trunk behind a local-only check-index). Revealed, not created, by repairing the checker's extraction: check_ci_local_parity built its CI-side set by regexing RAW workflow text for `task <name>` and expanding each closure, comments included. Several workflow comments contain the literal string `task ci` while stating that no workflow invokes it, so `ci` was read as an invocation and its full 247-gate closure entered the 'runs in CI' set. The count was therefore 0 BY CONSTRUCTION, and the prose documenting the gap was what suppressed it. Measured at the repair: CI-side 273 → 106, undeclared_local_only 0 → 167 of 247 local gates (68%). Baselined rather than hard-failed because 167 findings nobody can clear in the change that reveals them is the gate-that-lands-as-N-instant-blockers failure this repository has refused before; shrink-only keeps the property that matters, namely that a NEW gate registered in `task ci` with no workflow reds immediately. Lowering happens by wiring gates into workflows or declaring them under `local_only:` with a reason. Note the punchline, because it bounds the risk of this entry: check_ci_local_parity ITSELF runs in no workflow, so it is its own finding and this ratchet has no remote reach either — clearing the backlog is what gives it teeth. DRAINED BY ONE, 2026-08-13: check_ci_local_parity itself was wired into consistency.yml, so it left the set it exists to report. That is the whole shape of a legitimate drain here — the gate stops being local-only because a workflow now runs it, not because the declaration list grew. The floor in gate-coverage.yml moved in the same change and for the same reason: wiring two gates raised the parsed population 357 -> 360 (109 CI + 251 local). The intermediate 359 was the reading after the CI-side wiring alone and before check_gate_coverage joined the local `ci` chain; it was committed here by mistake and is corrected rather than left as a second number for the same measurement. WALKED DOWN 166 -> 165 on 2026-08-20 (road-to-session-closeout 5.2): check_ci_local_parity reported `ci-parity:local-only: 165 violation(s), baseline 166 - ratchet is loose` and asked for exactly this, so the gain cannot be silently given back. The measurement is the gate's own output on the merged tree, not a branch. What is NOT done here is the classification the same step asks for: 165 gates each need a recorded class (belongs-in-CI / developer-aid / dead), which is per-gate judgement, and migrating them would red the trunk on the landing day - the step forbids it for that reason. ATTEMPTED 165 -> 164 on 2026-08-24 and REVERTED in the same change, recorded because the mistake is instructive rather than embarrassing. A local run of check_ci_local_parity reported the ratchet LOOSE at 164 and asked to be lowered; CI then measured 165 and red the gate at '1 new'. The local reading was environment-dependent -- the drain worktree resolves the projection surface differently from a clean checkout, which is the same worktree divergence check_rule_projection_integrity shows on the same tree -- so the number was never real slack. THE RULE THIS CONFIRMS: this baseline is walked down on a reading from the ENFORCING environment, never on a local one, exactly as the 166 -> 165 paragraph above says ('the measurement is the gate's own output on the merged tree, not a branch'). A gate inviting a lowering is not evidence that the lowering is correct.\n\nLOWERED 165 -> 129 on 2026-10-13 by drain/local-gates-wired-20261013, and the reading is CI's rather than this branch's. The 2026-08-24 paragraph immediately above records a 165 -> 164 lowering attempted and REVERTED because it was taken on a local run that CI then contradicted, and its conclusion is the rule this entry obeys: the number comes from the ENFORCING environment. It does here — run 38373476139, job 'Sync + Generate Tools Consistency', step 'CI <-> local gate parity', at head 41e406ef2 of this branch, printed `ci-parity:local-only: 129 violation(s), baseline 165 — ratchet is loose` and named 129 itself. The local run agrees at 129, which is recorded as corroboration and NOT as the basis; where the two disagree CI is right and this sentence is the record of why. THE ARITHMETIC, because a delta nobody can reconstruct is how a ratchet's rationale rots: 163 - 130 = 33, and 33 gates gained a workflow caller in this change — TWENTY as steps of `Standing payload delta + budget gate`, which the `main protection` ruleset lists as one of this repository's two REQUIRED contexts (read from the API on 2026-10-13, not assumed), and THIRTEEN in `local-only-scheduled`, a new non-required job in gate-canary.yml, being the thirteen the reading classed `calendar`. `check_council_pin_staleness` also gained its first caller in this change and is deliberately NOT among the 33: it ran in no task either, so it was never in this count to leave, and it is declared under `ci_only:` in the same change for the opposite direction's finding. NOTHING WAS DECLARED TO REACH THIS NUMBER, which is the property this note has to be able to assert: `local_only:` holds seven entries before this change and seven after, so the move the 2026-08-13 decision refuses by name ('never by growing the declaration list to move a number') is not the move made here. Every one of the 33 is a gate a workflow now really runs — each verified exit 0 with the workflow's own argv at the branch base and again on the merged tree, and the twenty passed their first three CI runs in 44-53 s. The phrase 'the required job' is used here only because the ruleset was actually read: an independent review pointed out that an earlier revision of this entry called a job required with nothing in the tree establishing it, and branch protection is a ruleset outside the tree. `repos/event4u-app/agent-config/rulesets` on 2026-10-13 lists exactly two required contexts, and the twenty are steps of one of them. The six `machine`-class gates the same reading found are left in the backlog with their class written down rather than declared, which is the cheaper and more honest of the two moves and keeps this count honest for the next drain. CORRECTED WITHIN THE SAME UNMERGED BRANCH, 129 -> 130, and the wording matters: 129 was never on the trunk. An independent review found that `audit_command_surface` WRITES two tracked files (`agents/reports/command-surface.{json,md}`) unconditionally at the end of every run, whatever flags it is given, so the scheduled step that ran it was mutating its tree to compute an answer it then discarded. Removing that step is the right call and it costs exactly one gate back, so the in-flight number is corrected before it lands rather than left describing a tree that no longer exists. The LANDED movement is 165 -> 130, a tightening of 35, and nothing here raises a ratchet that ever reached main. The gate stays in the backlog with its `slow` class recorded; wiring it needs a `--check`-shaped mode it does not have, and declaring it under `local_only:` was considered and refused — its reason would be 'it writes', not the 'there is no remote equivalent' shape the two existing declarations establish, and that is the declaration-to-move-a-number move the 2026-08-13 decision names.\n\nLOWERED 130 -> 124 on 2026-10-14 by drain/local-gates-and-never-ran (PR #2352), on CI's reading: run 38583523121, job 'Sync + Generate Tools Consistency', step 'CI <-> local gate parity', at head a5b1c08ee, printed `ci-parity:local-only: 124 violation(s), baseline 130 — ratchet is loose` and named 124. The local run agreed at 124, recorded as corroboration only. THE ARITHMETIC: six gates gained a workflow caller as steps of `Standing payload delta + budget gate` (step 3.2 of road-to-local-gates-wired-while-they-are-green) — lint_readme_jargon, lint_readme_serial_comma, check_augment_description_cap, check_token_quality_golden, check_public_links, check_council_layout — each fixed to exit 0 in the same change. Nothing was declared: `local_only:` still holds seven entries.\n\nLOWERED 124 -> 104 on 2026-10-14 by chore/parity-baseline-after-2-2a, the follow-up batch 2.2a of road-to-local-gates-wired-while-they-are-green defined for itself, on CI's reading: run 38622341909, job 'Sync + Generate Tools Consistency' (job 116053446442), step 'CI <-> local gate parity', at head b09ed6995 of PR #2354 (merged as 4b8ec8c1f), printed `ci-parity:local-only: 104 violation(s), baseline 124 — ratchet is loose` and named 104. The local run on origin/main at 4b8ec8c1f agreed at 104, recorded as corroboration only. THE ARITHMETIC: 124 - 104 = 20, and twenty gates gained a workflow caller as steps `Drain 2.2a-1` and `Drain 2.2a-2` of `Standing payload delta + budget gate` — the undeclared wire-class gates in name order from audit_mcp_tools through check_score_contract, minus four skipped for reasons written beside those steps (check_hook_bundle_freshness, check_quality_regression, check_release_trunk_sync, check_reply_consistency), which stay in this count. Nothing was declared: `local_only:` still holds seven entries. LOWERED 104 -> 84 on 2026-10-16 on CI's reading, not a local one: the consistency job on main at 73eb69439 (run 38849726162) printed `ci-parity:local-only: 84 violation(s), baseline 104 — ratchet is loose` and named 84. 104 - 84 = 20, the twenty gates of step 2.2b wired as `Drain 2.2b-1` and `Drain 2.2b-2`, none skipped. LOWERED AGAIN 84 -> 64 the same day on CI's reading of the 2.2c branch itself: the consistency job at 1db488224 (run 38861614919) printed `ci-parity:local-only: 64 violation(s), baseline 84`. 84 - 64 = 20, the twenty gates of step 2.2c wired as `Drain 2.2c-1` and `Drain 2.2c-2`, one skipped (lint_marketplace_install_completeness, red), which stays in this count. LOWERED 64 -> 44 on CI's reading of the 2.2d branch: the consistency job at a33a26625 (run 38888906359) printed `ci-parity:local-only: 44 violation(s), baseline 64`. 64 - 44 = 20, the twenty gates of step 2.2d wired as `Drain 2.2d-1` and `Drain 2.2d-2`, none skipped. LOWERED 44 -> 25 on CI's reading of the 2.2e branch: the consistency job at de98b7770 (run 38910132090) printed `ci-parity:local-only: 25 violation(s), baseline 44`. 44 - 25 = 19, the nineteen gates of step 2.2e wired as `Drain 2.2e-1` and `Drain 2.2e-2`, none skipped; that empties the wire-class window, and the five wire-class gates left are 2.2f's. LOWERED 25 -> 23 on CI's reading of the 2.2f branch: the consistency job at 9d1ef9ed8 (run 38919206234) printed `ci-parity:local-only: 23 violation(s), baseline 25`. 25 - 23 = 2, the two gates of step 2.2f wired as `Drain 2.2f`; the three wire-class gates whose reasons still hold stay in this count. LOWERED 23 -> 22 on 2026-10-17 on CI's reading of the 2.2g branch: the consistency job at 86b3a1c6e (run 39015140117), step `CI <-> local gate parity`, printed `ci-parity:local-only: 22 violation(s), baseline 23` and named 22 itself. The local run on the same branch agrees at 22 and is corroboration only. 23 - 22 = 1, the ONE gate of step 2.2g — `lint_motion_authority_drift`, wired as the step `Drain 2.2g`. The batch was authored as five and CI reduced it to one in its first run: `check_artefact_checksums`, `lint_featured_skills`, `lint_trust_coherence` and `validate_discovery_manifest` all read `dist/discovery/discovery-manifest.json`, a build output the tree does not commit and the host job does not produce, so they exit 0 in any checkout that has run `npm run build` and exit 1 there. They are recorded `machine` and stay in this count. Nothing was declared: `local_only:` still holds seven entries, before and after. This empties the wire-class window — after 2.2g no gate in the 22 is wire-class.",
56
47
  "falsifier": "./scripts-run src/scripts/check_ci_local_parity"
57
48
  },
58
49
  "gate-self-test:registered-non-adopters": {
@@ -118,6 +109,12 @@
118
109
  "falsifier": "./scripts-run src/scripts/lint_roadmap_later_disposition # the ratchet line names the current count; it fails when the count RISES above this entry",
119
110
  "note": "Parked roadmaps under agents/roadmaps/later/ carrying no `review_by:` in their frontmatter. NOT a dead-scan-root repair — the obligation is NEW (road-to-observed-learning-signal step 3.4), so every pre-existing parked roadmap lacks it by construction and 68 of 82 is the count at introduction rather than revealed debt. A hard-zero gate was refused on this repository's own recorded ground: a gate that fails its own tree on 68 files the landing change did not cause is reverted rather than adopted. Shrink-only from here, which is the property that matters: a NEWLY parked roadmap must carry `review_by` or this reds immediately. Clearing an entry is one roadmap at a time — read what the park is waiting on, pick a date a human would actually honour, and lower the count. The figure is the gate's own output on this branch (`--json`, class `review-by`), and the same 68 was measured independently over a tree that had grown by one file since the roadmap's own pin, which is why the roadmap's stated floor and this entry agree."
120
111
  },
112
+ "lint_roadmap_blockers:routing": {
113
+ "count": 21,
114
+ "landed": "2026-10-20",
115
+ "falsifier": "./scripts-run src/scripts/lint_roadmap_blockers # the routing ratchet line names the current count; it fails when the count RISES above this entry",
116
+ "note": "LOWERED 22 -> 21 on 2026-10-20, and the gain is NOT this branch's — measured, not inferred. The gate asked by name (`ratchet is loose`, naming 21), and the same reading was taken on a detached `origin/main` checkout before the entry was touched: main itself measures 21. So some earlier merge routed a blocker and never lowered the floor, and this branch is only the one that noticed. Recorded that way rather than claimed, because an entry that credits the wrong diff makes the next reader look for a gain in the wrong place. Open blockers whose Owner is the user, the maintainer or the owner and that carry no `Routed:` field. NOT a scan-root repair: the obligation is NEW (templates/roadmaps.md rule 20 'Route before you file', road-to-blockers-routed-before-they-are-filed step 2.2), so every pre-existing human-owned entry is debt by construction and is counted rather than exempted. Why the field exists: in the two days before it landed the council resolved all ten blockers that closed, including all seven labelled owner or maintainer, so an Owner label recorded the author's first impression rather than a routing verdict (agents/evidence/analysis/blocker-causes-2026-10-20.md). Drains as /roadmap:resolve-blockers puts each entry to the council: a DECIDE removes the blocker, an ESCALATE records the verdict and the reserved row."
117
+ },
121
118
  "lint_roadmap_later_disposition:wake-condition": {
122
119
  "count": 17,
123
120
  "landed": "2026-10-09",
@@ -156,6 +153,13 @@
156
153
  }
157
154
  },
158
155
  "retired": {
156
+ "check_roadmap_trackable:relates": {
157
+ "count": 0,
158
+ "landed": "2026-08-23",
159
+ "note": "The nine active non-draft roadmaps that predate the `relates:` requirement (road-to-agentic-engineering-assurance, road-to-component-library-lifecycle, road-to-council-evidence-integrity, road-to-frontend-fidelity-calibration, road-to-monorepo-scope-and-detection, road-to-observability-plate, road-to-role-scoped-spawn-profiles, road-to-skill-delivery-over-mcp, road-to-standing-payload-diet). This is a NEW obligation rather than a repaired scan root, and the ratchet is the point: `depends:` shipped in the template with nothing requiring it and measured 0 adoption, so requiring `relates:` retroactively across the estate would be an owner-reserved write with no analysis behind the edges it would have to invent (held as step 4.3, deferred). Clearing an entry here is one roadmap at a time: run `agent-config roadmap:context` on it, write the rows the probe surfaces, and lower the count.",
160
+ "retired_on": "2026-10-19",
161
+ "retired_because": "All nine roadmaps the entry held are archived, and the gate measures 0 violations among the active roadmaps. Retired rather than lowered so the gate reads unbaselined: the first active roadmap without a `relates:` block now fails, instead of the tenth. The entry reached its 56-day expiry on 2026-10-19 without having been lowered, which turned the ratchet test red on every branch."
162
+ },
159
163
  "lint_roadmap_blockers:decidability": {
160
164
  "count": 0,
161
165
  "landed": "2026-08-22",
@@ -98,10 +98,13 @@
98
98
  # Agent config — ghostwriter profiles (real-person public-figure voices,
99
99
  # written by /ghostwriter:fetch). Local-only by default; commit explicitly
100
100
  # only via the deferred --shared opt-in. README.md stays tracked.
101
- # See docs/contracts/ghostwriter-schema.md.
102
- /agents/ghostwriter/*.md
101
+ # agents/reference/ghostwriter/ is where every command writes them;
102
+ # agents/ghostwriter/ is the legacy path. Both cover nested files and
103
+ # *.md.bak copies. See docs/contracts/ghostwriter-schema.md.
104
+ /agents/reference/ghostwriter/**
105
+ !/agents/reference/ghostwriter/README.md
106
+ /agents/ghostwriter/**
103
107
  !/agents/ghostwriter/README.md
104
- /agents/ghostwriter/*.md.bak
105
108
 
106
109
  # Agent config — legacy chat-history flat path. Current installs put
107
110
  # the file at agents/runtime/.agent-chat-history (covered by the
@@ -14,12 +14,43 @@
14
14
  "from": 1500000,
15
15
  "to": 1550000,
16
16
  "by": "agent, during the inbox-2026-10 drain",
17
- "what_was_added": "Nothing in this commit. The 1,500,000 ceiling was red on the very commit that registered it: measured 1,511,489 bytes at 22b19e520, which is the merge of the PR that introduced the budget. Its derivation read 1,469,738 bytes on the PR branch, whose base predated three PRs that had merged meanwhile — the failure-event binding of #2160 (sixteen concerns on a new slot), the touched-file quality pass of #2152, and the evidence classification of #2153 — and #2162 landed after it. The gate ran on each PR's pre-merge tree and never on the merge result, so every one of those PRs was green alone and the trunk was red the moment they were together.",
18
- "why_it_could_not_be_avoided": "The bytes are deliberately merged capability, not an accident to trim: the composition check above shows one parser and no duplicate dependency, so there is nothing to remove that would not remove a feature. The alternative — reverting a merged lane to fit a ceiling derived against a base that no longer exists — would discard working code to satisfy a number that never described this tree.",
17
+ "what_was_added": "Nothing in this commit. The 1,500,000 ceiling was red on the very commit that registered it: measured 1,511,489 bytes at 22b19e520, which is the merge of the PR that introduced the budget. Its derivation read 1,469,738 bytes on the PR branch, whose base predated three PRs that had merged meanwhile \u2014 the failure-event binding of #2160 (sixteen concerns on a new slot), the touched-file quality pass of #2152, and the evidence classification of #2153 \u2014 and #2162 landed after it. The gate ran on each PR's pre-merge tree and never on the merge result, so every one of those PRs was green alone and the trunk was red the moment they were together.",
18
+ "why_it_could_not_be_avoided": "The bytes are deliberately merged capability, not an accident to trim: the composition check above shows one parser and no duplicate dependency, so there is nothing to remove that would not remove a feature. The alternative \u2014 reverting a merged lane to fit a ceiling derived against a base that no longer exists \u2014 would discard working code to satisfy a number that never described this tree.",
19
19
  "what_would_have_caught_it": "Measuring the ceiling against the merge result rather than the PR branch. A ceiling derived on a branch is a statement about that branch; the trunk is what the gate defends, and the two diverge exactly when several lanes land in one day."
20
+ },
21
+ {
22
+ "date": "2026-10-22",
23
+ "chunk": "src/scripts/_lib/egress_engine.ts",
24
+ "from": 28000,
25
+ "to": 32000,
26
+ "by": "agent, during the feat/subagent-system-2583 run",
27
+ "what_was_added": "The queued engine work the 28,000 ceiling was sized for, landed together: the validated identifier rows of one-detector 2.3 (IBAN, card, e-mail with a keyed-digest allowlist, three phone shapes, German tax id, US SSN), the invisible-character and lookalike-letter normalisation of 2.5, and three free-tier credential rows (Hugging Face, NVIDIA, Replicate) of free-hands 1.2. Measured 30,445 bytes when the raise landed; 30,493 bytes at the ratified revision, after the round-6 IBAN rows.",
28
+ "why_it_could_not_be_avoided": "Each addition is a detection row or the normalisation that keeps one from being hidden; the 2026-10-18 derivation already counted them as the chunk's planned growth and underestimated their sum by about 2.4 KB. The chunk is loaded only when a caller needs detection, so no dispatch pays these bytes; the dispatch bundle itself is unchanged.",
29
+ "what_would_have_caught_it": "Re-measuring the queued items' sum when the ceiling was set, rather than estimating each."
30
+ }
31
+ ],
32
+ "chunks": [
33
+ {
34
+ "entry": "src/scripts/_lib/svg_rules.ts",
35
+ "max_bytes": 64000,
36
+ "registered_at": "2026-10-18",
37
+ "derivation": "Measured 60,718 bytes on 2026-10-18, the SVG rule set the council moved out of the dispatch bundle on 2026-10-11. Registered when the composition gate began requiring a ceiling for every defined chunk (council round 4b, 2026-10-18), so a chunk added to hook_chunks.mjs cannot ship unmeasured. The ceiling is that reading plus about 5 %, rounded, with no growth queued for it."
38
+ },
39
+ {
40
+ "entry": "src/scripts/_lib/egress_engine.ts",
41
+ "max_bytes": 32000,
42
+ "registered_at": "2026-10-18",
43
+ "derivation": "Measured 18,478 bytes on 2026-10-18 (the rule table, the token grammar and the commit scanner, with the per-rule linearity prose moved to a test-only module). The ceiling is that reading plus the queued engine work of road-to-one-detector-and-the-senders-we-own (validated identifier rules about 4.3 KB, known values, the invisible-character rescan and the variant suffix about 1-2 KB each), rounded up. An AI council of two providers chose on 2026-10-18 to move the engine out of the dispatch bundle into this conditional chunk rather than raise the dispatch ceiling, and asked that the chunk carry a measured budget of its own so the move does not just relocate uncontrolled growth. A raise follows the same rule as max_bytes: a raise_log entry naming the chunk (`chunk`: this entry) and what was added."
44
+ },
45
+ {
46
+ "entry": "src/scripts/chat_history.ts",
47
+ "max_bytes": 232000,
48
+ "registered_at": "2026-10-20",
49
+ "derivation": "Measured 209,890 bytes on 2026-10-20, with `yaml` external (inlined it is 472,201 \u2014 a second copy of the parser the dispatch bundle already carries). The ceiling is that reading plus about 10 %, rounded, because this chunk carries a 2,300-line concern plus the memory lookup and FTS index it reads, all of which still grow.\n\nWHY IT WAS MOVED \u2014 AND THE REASON FIRST GIVEN WAS FALSE, which is recorded here rather than corrected silently. This entry said `chat-history` is bound on `session_start` and on no other event, and called it the largest narrow-event module the metafile ranks. An independent provider review of 2026-10-20 checked the manifest and refused the change on it: `chat-history` is bound on FIVE events \u2014 `session_start`, `session_end`, `stop`, `post_tool_use` and `user_prompt_submit` \u2014 across seven hosts. It is close to the widest-bound concern in the tree, not the narrowest. The claim came from reading the `session_start:` rows of the manifest and never the others.\n\nWHAT SURVIVES THE CORRECTION, stated as narrowly as the evidence allows: the move takes 120,586 bytes out of a bundle every hook event parses (1,549,961 -> 1,429,414 B) and pays for them with one `require` of a 209,890-byte CJS file on the events that actually need the concern. Whether that is a latency WIN is UNMEASURED, and the 2026-10-18 council that chose this mechanism asked for exactly that proof inside `src/config/hook-latency-budget.json`. Until it exists this chunk is a byte-budget move with an unproven wall-clock effect, and the honest narrow-event candidates the same metafile ranks are recorded for whoever re-does it: `turn-end-gate` 71,928 B on `stop` alone, `injection-scan` 46,660 B on `post_tool_use` alone, `skill-route` 31,183 B and `git-authorization` 30,761 B on `user_prompt_submit` alone, `session-eol` 27,708 B on `stop` alone, `handoff-context` 25,220 B on `session_start` alone.\n\nUNLIKE THE OTHER TWO CHUNKS this one carries a CONCERN, so there is a correct path behind the fast one: `_run_concern` tries the static registry, then `loadLazyConcern`, then the historical spawn-per-concern path. A missing or mis-digested chunk costs latency, never the concern's effect \u2014 which the same review confirmed, noting it holds because `src/scripts/` ships in the package."
20
50
  }
21
51
  ],
52
+ "chunks_note": "A chunk is loaded only when a caller needs it, so its bytes are not paid by every dispatch; its ceiling exists so that the move out of dispatch.js stays a measured place rather than an unmeasured one. The gate builds each chunk with the exact esbuild segment `build:hook-chunks` uses for its entry.",
22
53
  "max_yaml_packages": 1,
23
- "max_yaml_packages_note": "The dispatch path reads YAML for the hook manifest, the host-lowering table and the settings contract. One reader covers all three. Two cost 95,846 bytes for a single call site and were invisible until an external rescore counted them — which is why this is a cap rather than prose. The package set the cap counts over is YAML_PACKAGES in the gate.",
54
+ "max_yaml_packages_note": "The dispatch path reads YAML for the hook manifest, the host-lowering table and the settings contract. One reader covers all three. Two cost 95,846 bytes for a single call site and were invisible until an external rescore counted them \u2014 which is why this is a cap rather than prose. The package set the cap counts over is YAML_PACKAGES in the gate.",
24
55
  "what_this_does_not_bound": "Latency. A smaller bundle is not a measured speed-up; src/config/hook-latency-budget.json owns the wall-clock axis and is not derived from this file. Nor does it bound dist/install/install.mjs or dist/mcp/server.mjs, which carry their own module graphs."
25
56
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "_comment": "First-host probes for road-to-a-hook-carrier-that-is-never-silent 0.2, in the row shape of host-injection-effect.json (validated by recordProblems in src/scripts/_lib/injection_effect.ts) plus a host and an expiry. Each row stays `unobserved` until a live session on the named host observes it; an `observed-*` row needs host_version, transcript and date. Nothing here may be inferred from the hook command or from a test fixture — the fixtures in tests/install/hook_carrier_never_silent.test.ts run the command under /bin/sh, which is not the host.",
3
+ "session-start-stdout-reaches-model": {
4
+ "host": "claude",
5
+ "state": "unobserved",
6
+ "host_version": null,
7
+ "transcript": null,
8
+ "date": null,
9
+ "expiry": "2027-01-18",
10
+ "reason": "Probe (a): plain stdout printed by a shell branch of a SessionStart command — the dead-carrier line of step 3.1, which runs without node — reaches the model's context, and the documented 10,000-character cap holds. Not yet observed in a live session; the dispatcher's own SessionStart output reaching the model is a different path and does not answer it."
11
+ },
12
+ "launcher-path-terminal-vs-app": {
13
+ "host": "claude",
14
+ "state": "unobserved",
15
+ "host_version": null,
16
+ "transcript": null,
17
+ "date": null,
18
+ "expiry": "2027-01-18",
19
+ "reason": "Probe (b): the PATH a terminal launch and an app launch hand the hook process on one machine. Step 2.1 removes the dependency on it for a staged machine, so the answer now bounds only unstaged machines and the plugin channel; it still needs one observation per launch kind on one machine."
20
+ },
21
+ "rule-file-replaced-mid-session": {
22
+ "host": "claude",
23
+ "state": "unobserved",
24
+ "host_version": null,
25
+ "transcript": null,
26
+ "date": null,
27
+ "expiry": "2027-01-18",
28
+ "reason": "Probe (c): a rule file replaced on disk mid-session — what other live sessions see on their next load. Step 3.2 restores by an atomic rename per file and never removes one (D3), which is safe under either answer; the observation decides whether a restore reaches a second live session at all."
29
+ }
30
+ }
@@ -30,7 +30,8 @@
30
30
  "block-config-weakening": 0.637,
31
31
  "evidence-independence": 0.956,
32
32
  "turn-end-gate": 1.587,
33
- "run-continuation": 1.232
33
+ "block-credential-reads": null,
34
+ "_block_credential_reads_2026_10_18": "Registered unmeasured (null) when road-to-one-detector-and-the-senders-we-own 1.1 added the concern: the derivation above admits only maxima read on both machine classes, and none exists yet, so the window reports it as unmeasured rather than a guessed number. Its cost is a few string tests per path key and one tokenisation per shell segment, with no file read; it grows the shared hook bundle by 11,970 B (1,530,696 to 1,542,666 of 1,550,000)."
34
35
  },
35
36
  "gate_remeasure": {
36
37
  "attempts": 1,
@@ -60,7 +61,8 @@
60
61
  "why_not_a_retry_or_best_of_n": "A second bench on the same job would not help: the spread is between runner classes (p50 111-148 ms), not transient noise within one machine, so a slow runner measures slow twice. Retry logic is the escalation if 175 flaps, not the first move.",
61
62
  "revisit_if": "The p50 — not the p95 — of a green run rises above 160 ms. Read the MEDIAN because that is the runner-speed indicator: the observed p50 range is 111-148 ms, so a p50 past 160 is outside every machine this window saw and is the cost itself growing. It then belongs to the owning roadmap (road-to-per-turn-hook-economy, D-2: the dispatcher's own payload read+parse, once per event) rather than to a third cap raise. Raising this number again without a measured distribution beside it is the config-bending this block exists to make visible.",
62
63
  "_revisit_if_FIRED_2026_09_30": "THE TRIGGER ABOVE HAS FIRED, and this row records it rather than spending it. Measured on PR #2104 (road-to-a-stop-that-holds), three consecutive CI runs of the gated `via cli` leg: pre_tool_use p50 172, 175 and 176 ms against a revisit-if threshold of 160 and an observed historical p50 range of 111-148. The p95 readings were 179, 176 and 176 against the 175 cap. THE CAP IS NOT RAISED — this block says raising it again without a measured distribution beside it is the config-bending the block exists to make visible, and that verdict is unchanged. WHAT THIS BRANCH CONTRIBUTED, measured rather than guessed: `npm run build:hooks` at this branch produces 1,443,442 bytes against 1,424,332 at its merge base, i.e. +19,110 bytes / +1.34%. Every concern shares one bundle, so that cost is paid by EVERY slot including pre_tool_use, which this branch's diff otherwise does not touch (none of its six changed files is bound on that slot). At ~149 ms of non-spawn work the proportional share is ~2 ms — real, and far short of the 24-64 ms by which the p50 exceeds its historical range, so the dominant term is the runner and the branch is a contributor rather than the cause. `--legal-comments=none` was measured as a mitigation and recovers 635 bytes: the growth is code, not prose, so it cannot be given back without removing the feature. ROUTING, per this block's own revisit-if: this belongs to road-to-per-turn-hook-economy D-2 (the dispatcher's own payload read+parse, once per event) and to the maintainer, not to a third cap raise. Recorded here because a budget pre-registered so it could not be spent silently must not be spent silently.",
63
- "_revisit_if_correction": "First written as 'a green run measures p95 above 160 ms', which round 2 finding 9 refuted from inside this same block: 160 sits 15 ms BELOW the new cap and 3 ms above the observed max, so the very first green 161 ms run would pass the gate and simultaneously trip a trigger declaring the variance to be over. A trigger has to live outside the spread its own cap absorbs, and on a p95 with 42 ms of runner spread no such point exists below 175. The p50 has a spread of 37 ms and a ceiling of 148, so it does."
64
+ "_egress_stage_bundle_delta_2026_10_15": "road-to-placeholders-on-the-wire Phase 1 states its delta here, as the fired trigger above requires of every phase that touches the dispatcher. BUNDLE: check_hook_bundle_composition measured 1,529,222 B at the merge base and 1,544,054 B with the egress stage, i.e. +14,832 B / +0.97 %, almost all of it the egress rule table and token grammar the stage imports; 292 modules. RUNTIME, measured in-process on darwin (not on a CI runner): with the shipped default `off` the stage costs one regex over the project settings layers that exist, 0.25 ms cold and 0.09 ms warm, because the full settings cascade (about 25 ms cold, dominated by the template parse) is skipped unless a project layer opens a top-level `egress:` key; with `observe` or `protect`, one detection pass of about 2.3 ms on a 52 KB tool result and 25-35 ms on 2 MB. No cap is changed. Proportional share of the bundle growth at ~149 ms of non-spawn work is about 1 ms on every slot.",
65
+ "_revisit_if_correction":"First written as 'a green run measures p95 above 160 ms', which round 2 finding 9 refuted from inside this same block: 160 sits 15 ms BELOW the new cap and 3 ms above the observed max, so the very first green 161 ms run would pass the gate and simultaneously trip a trigger declaring the variance to be over. A trigger has to live outside the spread its own cap absorbs, and on a p95 with 42 ms of runner spread no such point exists below 175. The p50 has a spread of 37 ms and a ceiling of 148, so it does."
64
66
  },
65
67
  "per_turn_composite": {
66
68
  "_comment": "D-1 of road-to-per-turn-hook-economy: the slot budgets above gate per EVENT, and a single tool call fires both pre_tool_use and post_tool_use with their full concern chains. A ten-tool-call turn therefore pays twenty dispatcher cold starts plus the prompt and stop slots while every individual slot stays green — the number the user experiences has no row. This row is that number. Registered by step 4.1; the CEILING is step 4.2 and is the maintainer's, so the row ships observe-only and CANNOT fail a build. Definition before bar, deliberately: two people computing two different composites would both call the row green.",