@event4u/agent-config 14.22.0 → 15.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 (557) hide show
  1. package/.augment-plugin/marketplace.json +3 -3
  2. package/.augment-plugin/plugin.json +1 -1
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/CHANGELOG.md +333 -356
  5. package/README.md +1 -1
  6. package/dist/agent-src/commands/agent-handoff.md +8 -7
  7. package/dist/agent-src/commands/agents/init.md +1 -1
  8. package/dist/agent-src/commands/agents/user/accept.md +4 -4
  9. package/dist/agent-src/commands/agents/user/delete.md +2 -2
  10. package/dist/agent-src/commands/agents/user/init.md +3 -3
  11. package/dist/agent-src/commands/agents/user/review.md +3 -3
  12. package/dist/agent-src/commands/agents/user/show.md +3 -3
  13. package/dist/agent-src/commands/agents/user/update.md +2 -2
  14. package/dist/agent-src/commands/agents/user.md +6 -6
  15. package/dist/agent-src/commands/analytics/prune.md +1 -1
  16. package/dist/agent-src/commands/analytics/show.md +2 -2
  17. package/dist/agent-src/commands/analyze/decision.md +2 -2
  18. package/dist/agent-src/commands/analyze/inbox.md +5 -5
  19. package/dist/agent-src/commands/analyze/incident.md +3 -3
  20. package/dist/agent-src/commands/analyze/near-miss.md +3 -3
  21. package/dist/agent-src/commands/analyze/postmortem.md +4 -4
  22. package/dist/agent-src/commands/analyze/premortem.md +2 -2
  23. package/dist/agent-src/commands/analyze.md +2 -2
  24. package/dist/agent-src/commands/bug/fix.md +1 -1
  25. package/dist/agent-src/commands/bug/investigate.md +2 -2
  26. package/dist/agent-src/commands/cost/profile.md +3 -3
  27. package/dist/agent-src/commands/design.md +1 -1
  28. package/dist/agent-src/commands/feature/explore.md +1 -1
  29. package/dist/agent-src/commands/feature/plan.md +2 -2
  30. package/dist/agent-src/commands/feature/roadmap.md +2 -2
  31. package/dist/agent-src/commands/ghostwriter/fetch.md +4 -4
  32. package/dist/agent-src/commands/ghostwriter/list.md +1 -1
  33. package/dist/agent-src/commands/ghostwriter/show.md +1 -1
  34. package/dist/agent-src/commands/ghostwriter/write.md +9 -9
  35. package/dist/agent-src/commands/humanize.md +6 -6
  36. package/dist/agent-src/commands/jira-ticket.md +1 -1
  37. package/dist/agent-src/commands/judge/solo.md +1 -1
  38. package/dist/agent-src/commands/judge.md +1 -1
  39. package/dist/agent-src/commands/knowledge/cross-repo.md +1 -1
  40. package/dist/agent-src/commands/knowledge/forget.md +1 -1
  41. package/dist/agent-src/commands/knowledge/ingest.md +2 -2
  42. package/dist/agent-src/commands/knowledge/list.md +1 -1
  43. package/dist/agent-src/commands/memory/add.md +3 -3
  44. package/dist/agent-src/commands/memory/load.md +4 -4
  45. package/dist/agent-src/commands/memory/mine-session.md +1 -1
  46. package/dist/agent-src/commands/memory/promote.md +4 -4
  47. package/dist/agent-src/commands/memory/propose.md +2 -2
  48. package/dist/agent-src/commands/mode.md +5 -5
  49. package/dist/agent-src/commands/post-as/ghostwriter.md +3 -3
  50. package/dist/agent-src/commands/post-as/me.md +7 -7
  51. package/dist/agent-src/commands/pr/create.md +1 -1
  52. package/dist/agent-src/commands/pr/merge.md +48 -39
  53. package/dist/agent-src/commands/profile/activate.md +1 -1
  54. package/dist/agent-src/commands/profile/show.md +1 -1
  55. package/dist/agent-src/commands/research/deep.md +2 -2
  56. package/dist/agent-src/commands/research/report.md +2 -2
  57. package/dist/agent-src/commands/review/changes.md +1 -1
  58. package/dist/agent-src/commands/review/routing.md +1 -1
  59. package/dist/agent-src/commands/roadmap/create.md +1 -1
  60. package/dist/agent-src/commands/roadmap/materialize.md +2 -2
  61. package/dist/agent-src/commands/roadmap/next.md +9 -1
  62. package/dist/agent-src/commands/roadmap/process-full.md +2 -2
  63. package/dist/agent-src/commands/security-audit-config.md +3 -3
  64. package/dist/agent-src/commands/skill/preview.md +1 -1
  65. package/dist/agent-src/commands/skills/discover.md +1 -1
  66. package/dist/agent-src/commands/sync/agent-settings.md +2 -2
  67. package/dist/agent-src/commands/sync/gitignore/fix.md +1 -1
  68. package/dist/agent-src/commands/tests/create.md +1 -1
  69. package/dist/agent-src/commands/tests/e2e-heal.md +1 -1
  70. package/dist/agent-src/commands/tests/e2e-plan.md +1 -1
  71. package/dist/agent-src/contexts/authority/kernel-rule-edits.md +6 -6
  72. package/dist/agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +1 -2
  73. package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +2 -2
  74. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +88 -1
  75. package/dist/agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +1 -1
  76. package/dist/agent-src/contexts/contracts/frugality-charter.md +1 -1
  77. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +1 -1
  78. package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +1 -1
  79. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +13 -1
  80. package/dist/agent-src/contexts/execution/cheap-question-mechanics.md +1 -1
  81. package/dist/agent-src/contexts/execution/contract-decision-sheet.md +3 -3
  82. package/dist/agent-src/contexts/execution/mandated-lines.md +1 -1
  83. package/dist/agent-src/contexts/execution/non-interactive-contract.md +1 -1
  84. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +1 -1
  85. package/dist/agent-src/contexts/execution/plan-confidence-gate.md +5 -5
  86. package/dist/agent-src/contexts/execution/roadmap-execution-contract.md +1 -1
  87. package/dist/agent-src/contexts/execution/subagent-modes-detail.md +1 -1
  88. package/dist/agent-src/contexts/execution/subagent-routing.md +2 -2
  89. package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +1 -1
  90. package/dist/agent-src/contexts/execution/user-memory-channels.md +3 -3
  91. package/dist/agent-src/contexts/execution/verification-mechanics.md +1 -1
  92. package/dist/agent-src/contexts/judges/persona-voice-rubric.md +2 -2
  93. package/dist/agent-src/guidelines/abstraction-thresholds.md +88 -0
  94. package/dist/agent-src/guidelines/agent-infra/5w2h-analysis.md +260 -0
  95. package/dist/agent-src/guidelines/agent-infra/active-remediation-mechanics.md +99 -0
  96. package/dist/agent-src/guidelines/agent-infra/agent-interaction-and-decision-quality.md +325 -0
  97. package/dist/agent-src/guidelines/agent-infra/api-cost-levers.md +177 -0
  98. package/dist/agent-src/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +222 -0
  99. package/dist/agent-src/guidelines/agent-infra/ask-when-uncertain-demos.md +134 -0
  100. package/dist/agent-src/guidelines/agent-infra/asking-and-brevity-examples.md +198 -0
  101. package/dist/agent-src/guidelines/agent-infra/break-glass-usage.md +113 -0
  102. package/dist/agent-src/guidelines/agent-infra/carve-out-predicates.md +17 -0
  103. package/dist/agent-src/guidelines/agent-infra/comparison-matrix.md +179 -0
  104. package/dist/agent-src/guidelines/agent-infra/context-hygiene-mechanics.md +165 -0
  105. package/dist/agent-src/guidelines/agent-infra/corpus-grounding-authoring.md +91 -0
  106. package/dist/agent-src/guidelines/agent-infra/critical-thinking.md +156 -0
  107. package/dist/agent-src/guidelines/agent-infra/cross-source-consistency-mechanics.md +109 -0
  108. package/dist/agent-src/guidelines/agent-infra/developer-judgment.md +82 -0
  109. package/dist/agent-src/guidelines/agent-infra/direct-answers-demos.md +142 -0
  110. package/dist/agent-src/guidelines/agent-infra/domain-adoption-gates.md +112 -0
  111. package/dist/agent-src/guidelines/agent-infra/domain-eval-anti-pattern.md +53 -0
  112. package/dist/agent-src/guidelines/agent-infra/domain-pack-architecture.md +56 -0
  113. package/dist/agent-src/guidelines/agent-infra/downstream-changes-mechanics.md +91 -0
  114. package/dist/agent-src/guidelines/agent-infra/emphasis-budget.md +45 -0
  115. package/dist/agent-src/guidelines/agent-infra/engineering-memory-data-format.md +210 -0
  116. package/dist/agent-src/guidelines/agent-infra/evaluator-independence-mechanics.md +92 -0
  117. package/dist/agent-src/guidelines/agent-infra/existence-question-verdicts.md +80 -0
  118. package/dist/agent-src/guidelines/agent-infra/failure-signatures.md +70 -0
  119. package/dist/agent-src/guidelines/agent-infra/false-green.md +233 -0
  120. package/dist/agent-src/guidelines/agent-infra/first-principles.md +192 -0
  121. package/dist/agent-src/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
  122. package/dist/agent-src/guidelines/agent-infra/frontier-reasoning-operating-profile.md +169 -0
  123. package/dist/agent-src/guidelines/agent-infra/gate-authoring.md +177 -0
  124. package/dist/agent-src/guidelines/agent-infra/guarded-baseline.md +39 -0
  125. package/dist/agent-src/guidelines/agent-infra/installed-tools-manifest.md +142 -0
  126. package/dist/agent-src/guidelines/agent-infra/inversion-thinking.md +388 -0
  127. package/dist/agent-src/guidelines/agent-infra/ios-simulator-guide.md +378 -0
  128. package/dist/agent-src/guidelines/agent-infra/language-and-tone-examples.md +141 -0
  129. package/dist/agent-src/guidelines/agent-infra/layered-settings.md +317 -0
  130. package/dist/agent-src/guidelines/agent-infra/linked-projects-onboarding-gate.md +80 -0
  131. package/dist/agent-src/guidelines/agent-infra/mcp-request-signing.md +197 -0
  132. package/dist/agent-src/guidelines/agent-infra/memory-access.md +149 -0
  133. package/dist/agent-src/guidelines/agent-infra/mental-models.md +314 -0
  134. package/dist/agent-src/guidelines/agent-infra/minimal-safe-diff-mechanics.md +241 -0
  135. package/dist/agent-src/guidelines/agent-infra/missing-tool-handling.md +66 -0
  136. package/dist/agent-src/guidelines/agent-infra/model-recommendation.md +101 -0
  137. package/dist/agent-src/guidelines/agent-infra/naming.md +69 -0
  138. package/dist/agent-src/guidelines/agent-infra/notes-horizon-mechanics.md +90 -0
  139. package/dist/agent-src/guidelines/agent-infra/output-patterns.md +117 -0
  140. package/dist/agent-src/guidelines/agent-infra/recurring-criticism-mechanics.md +96 -0
  141. package/dist/agent-src/guidelines/agent-infra/reuse-verdict-mechanics.md +71 -0
  142. package/dist/agent-src/guidelines/agent-infra/review-routing-data-format.md +143 -0
  143. package/dist/agent-src/guidelines/agent-infra/roadmap-deferred-resolution-provenance.md +54 -0
  144. package/dist/agent-src/guidelines/agent-infra/roadmap-progress-mechanics.md +274 -0
  145. package/dist/agent-src/guidelines/agent-infra/role-contracts.md +209 -0
  146. package/dist/agent-src/guidelines/agent-infra/role-mode-router.md +89 -0
  147. package/dist/agent-src/guidelines/agent-infra/rule-body-migration-inventory.md +241 -0
  148. package/dist/agent-src/guidelines/agent-infra/rule-type-governance.md +73 -0
  149. package/dist/agent-src/guidelines/agent-infra/runtime-layer.md +89 -0
  150. package/dist/agent-src/guidelines/agent-infra/scqa-framework.md +526 -0
  151. package/dist/agent-src/guidelines/agent-infra/security-lint-containment.md +121 -0
  152. package/dist/agent-src/guidelines/agent-infra/self-improvement-pipeline.md +134 -0
  153. package/dist/agent-src/guidelines/agent-infra/simplicity-and-goal-demos.md +211 -0
  154. package/dist/agent-src/guidelines/agent-infra/six-hats.md +353 -0
  155. package/dist/agent-src/guidelines/agent-infra/size-and-scope.md +229 -0
  156. package/dist/agent-src/guidelines/agent-infra/skill-quality-checklist.md +157 -0
  157. package/dist/agent-src/guidelines/agent-infra/source-confidentiality-mechanics.md +109 -0
  158. package/dist/agent-src/guidelines/agent-infra/symptom-driven-harvest-loop.md +104 -0
  159. package/dist/agent-src/guidelines/agent-infra/systems-thinking.md +220 -0
  160. package/dist/agent-src/guidelines/agent-infra/tool-description-as-policy.md +35 -0
  161. package/dist/agent-src/guidelines/agent-infra/tool-integration.md +73 -0
  162. package/dist/agent-src/guidelines/agent-infra/traceability-field-mechanics.md +50 -0
  163. package/dist/agent-src/guidelines/agent-infra/untrusted-input-spotlighting.md +166 -0
  164. package/dist/agent-src/guidelines/agent-infra/verify-before-complete-demos.md +128 -0
  165. package/dist/agent-src/guidelines/augment-portability-patterns.md +70 -0
  166. package/dist/agent-src/guidelines/code-clarity.md +350 -0
  167. package/dist/agent-src/guidelines/component-oriented-and-oop-development.md +189 -0
  168. package/dist/agent-src/guidelines/cross-role-handoff.md +127 -0
  169. package/dist/agent-src/guidelines/design-antipatterns-triggers.json +18 -0
  170. package/dist/agent-src/guidelines/design-antipatterns.md +327 -0
  171. package/dist/agent-src/guidelines/design-asset-discipline.md +38 -0
  172. package/dist/agent-src/guidelines/design-canon.md +63 -0
  173. package/dist/agent-src/guidelines/design-fidelity-mechanics.md +293 -0
  174. package/dist/agent-src/guidelines/design-fidelity-routing.md +78 -0
  175. package/dist/agent-src/guidelines/design-handover-extraction.md +117 -0
  176. package/dist/agent-src/guidelines/design-modes.md +143 -0
  177. package/dist/agent-src/guidelines/design-reconciliation.md +172 -0
  178. package/dist/agent-src/guidelines/docs/readme-size-and-splitting.md +209 -0
  179. package/dist/agent-src/guidelines/e2e/playwright.md +363 -0
  180. package/dist/agent-src/guidelines/gtm-handoff.md +114 -0
  181. package/dist/agent-src/guidelines/monorepo-antipatterns.md +141 -0
  182. package/dist/agent-src/guidelines/php/api-design.md +115 -0
  183. package/dist/agent-src/guidelines/php/artisan-commands.md +81 -0
  184. package/dist/agent-src/guidelines/php/blade-ui.md +78 -0
  185. package/dist/agent-src/guidelines/php/controllers.md +90 -0
  186. package/dist/agent-src/guidelines/php/database.md +194 -0
  187. package/dist/agent-src/guidelines/php/eloquent.md +208 -0
  188. package/dist/agent-src/guidelines/php/flux.md +80 -0
  189. package/dist/agent-src/guidelines/php/general.md +207 -0
  190. package/dist/agent-src/guidelines/php/git.md +164 -0
  191. package/dist/agent-src/guidelines/php/jobs.md +111 -0
  192. package/dist/agent-src/guidelines/php/livewire.md +71 -0
  193. package/dist/agent-src/guidelines/php/logging.md +79 -0
  194. package/dist/agent-src/guidelines/php/naming.md +89 -0
  195. package/dist/agent-src/guidelines/php/patterns/dependency-injection.md +57 -0
  196. package/dist/agent-src/guidelines/php/patterns/dtos.md +199 -0
  197. package/dist/agent-src/guidelines/php/patterns/events.md +67 -0
  198. package/dist/agent-src/guidelines/php/patterns/factory.md +53 -0
  199. package/dist/agent-src/guidelines/php/patterns/pipelines.md +66 -0
  200. package/dist/agent-src/guidelines/php/patterns/policies.md +66 -0
  201. package/dist/agent-src/guidelines/php/patterns/repositories.md +122 -0
  202. package/dist/agent-src/guidelines/php/patterns/service-layer.md +64 -0
  203. package/dist/agent-src/guidelines/php/patterns/strategy.md +247 -0
  204. package/dist/agent-src/guidelines/php/patterns.md +28 -0
  205. package/dist/agent-src/guidelines/php/performance.md +92 -0
  206. package/dist/agent-src/guidelines/php/php-coding-patterns.md +80 -0
  207. package/dist/agent-src/guidelines/php/resources.md +100 -0
  208. package/dist/agent-src/guidelines/php/security.md +110 -0
  209. package/dist/agent-src/guidelines/php/sql.md +97 -0
  210. package/dist/agent-src/guidelines/php/validations.md +119 -0
  211. package/dist/agent-src/guidelines/php/websocket.md +100 -0
  212. package/dist/agent-src/guidelines/prompt-templates.md +189 -0
  213. package/dist/agent-src/guidelines/redundancy-taxonomy.md +208 -0
  214. package/dist/agent-src/guidelines/wing4-handoff.md +127 -0
  215. package/dist/agent-src/personas/README.md +1 -1
  216. package/dist/agent-src/personas/_template-specialist/persona.md +1 -1
  217. package/dist/agent-src/personas/product-owner.md +1 -1
  218. package/dist/agent-src/rules/active-remediation.md +1 -1
  219. package/dist/agent-src/rules/architecture.md +2 -2
  220. package/dist/agent-src/rules/artifact-drafting-protocol.md +1 -1
  221. package/dist/agent-src/rules/ask-when-uncertain.md +2 -2
  222. package/dist/agent-src/rules/brand-source-of-truth.md +9 -7
  223. package/dist/agent-src/rules/code-comment-discipline.md +2 -2
  224. package/dist/agent-src/rules/code-provenance.md +1 -1
  225. package/dist/agent-src/rules/content-quoting-floor.md +1 -1
  226. package/dist/agent-src/rules/context-hygiene.md +5 -5
  227. package/dist/agent-src/rules/cross-source-consistency.md +1 -1
  228. package/dist/agent-src/rules/design-fidelity.md +36 -46
  229. package/dist/agent-src/rules/direct-answers.md +2 -2
  230. package/dist/agent-src/rules/domain-adoption-policy.md +1 -1
  231. package/dist/agent-src/rules/evaluator-independence.md +1 -1
  232. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +1 -1
  233. package/dist/agent-src/rules/icon-consistency.md +5 -1
  234. package/dist/agent-src/rules/improve-before-implement.md +1 -1
  235. package/dist/agent-src/rules/language-and-tone.md +3 -3
  236. package/dist/agent-src/rules/minimal-safe-diff.md +1 -1
  237. package/dist/agent-src/rules/notes-first-reasoning.md +36 -25
  238. package/dist/agent-src/rules/recurring-criticism.md +1 -1
  239. package/dist/agent-src/rules/roadmap-progress-sync.md +1 -1
  240. package/dist/agent-src/rules/role-mode-adherence.md +2 -2
  241. package/dist/agent-src/rules/security-sensitive-stop.md +1 -1
  242. package/dist/agent-src/rules/size-enforcement.md +1 -1
  243. package/dist/agent-src/rules/source-confidentiality.md +2 -2
  244. package/dist/agent-src/rules/think-before-action.md +1 -1
  245. package/dist/agent-src/rules/token-efficiency.md +7 -5
  246. package/dist/agent-src/rules/ui-audit-gate.md +3 -2
  247. package/dist/agent-src/rules/untrusted-input-defense.md +3 -3
  248. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +106 -4
  249. package/dist/agent-src/skills/activation-design/SKILL.md +2 -2
  250. package/dist/agent-src/skills/adr-create/SKILL.md +5 -5
  251. package/dist/agent-src/skills/ai-council/SKILL.md +1 -1
  252. package/dist/agent-src/skills/ai-council/references/advanced-modes.md +1 -1
  253. package/dist/agent-src/skills/blade-ui/SKILL.md +1 -1
  254. package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
  255. package/dist/agent-src/skills/brand-to-tokens/SKILL.md +24 -3
  256. package/dist/agent-src/skills/bug-analyzer/SKILL.md +1 -1
  257. package/dist/agent-src/skills/build-buy-partner/SKILL.md +1 -1
  258. package/dist/agent-src/skills/churn-prevention/SKILL.md +2 -2
  259. package/dist/agent-src/skills/code-intelligence/SKILL.md +57 -1
  260. package/dist/agent-src/skills/code-refactoring/SKILL.md +3 -3
  261. package/dist/agent-src/skills/code-review/SKILL.md +3 -3
  262. package/dist/agent-src/skills/command-writing/SKILL.md +3 -3
  263. package/dist/agent-src/skills/comp-banding/SKILL.md +1 -1
  264. package/dist/agent-src/skills/competitive-moat-analysis/SKILL.md +1 -1
  265. package/dist/agent-src/skills/competitive-positioning/SKILL.md +2 -2
  266. package/dist/agent-src/skills/complexity-first-planning/SKILL.md +1 -1
  267. package/dist/agent-src/skills/condense-memory/SKILL.md +1 -1
  268. package/dist/agent-src/skills/content-funnel-design/SKILL.md +2 -2
  269. package/dist/agent-src/skills/contracts-cognition/SKILL.md +1 -1
  270. package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +2 -2
  271. package/dist/agent-src/skills/corpus-grounding/SKILL.md +2 -2
  272. package/dist/agent-src/skills/customer-research/SKILL.md +2 -2
  273. package/dist/agent-src/skills/dashboard-design/SKILL.md +1 -1
  274. package/dist/agent-src/skills/data-handling-judgment/SKILL.md +1 -1
  275. package/dist/agent-src/skills/deal-qualification-meddic/SKILL.md +2 -2
  276. package/dist/agent-src/skills/decision-record/SKILL.md +3 -3
  277. package/dist/agent-src/skills/decision-review/SKILL.md +8 -8
  278. package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +22 -22
  279. package/dist/agent-src/skills/design-intelligence/SKILL.md +4 -4
  280. package/dist/agent-src/skills/design-intelligence/references/context-and-registers.md +2 -2
  281. package/dist/agent-src/skills/design-review/SKILL.md +4 -4
  282. package/dist/agent-src/skills/design-system-capture/references/design-system-json.md +20 -1
  283. package/dist/agent-src/skills/design-tokens/SKILL.md +17 -2
  284. package/dist/agent-src/skills/design-variations/SKILL.md +2 -2
  285. package/dist/agent-src/skills/developer-like-execution/SKILL.md +2 -2
  286. package/dist/agent-src/skills/discovery-interview/SKILL.md +2 -2
  287. package/dist/agent-src/skills/doc-coauthoring/SKILL.md +3 -3
  288. package/dist/agent-src/skills/editorial-calendar/SKILL.md +2 -2
  289. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +44 -1
  290. package/dist/agent-src/skills/existing-ui-audit/references/anti-slop-cross-reference.md +2 -2
  291. package/dist/agent-src/skills/expansion-playbook/SKILL.md +2 -2
  292. package/dist/agent-src/skills/experiment-loop/SKILL.md +1 -1
  293. package/dist/agent-src/skills/experiment-loop/references/protocol.md +1 -1
  294. package/dist/agent-src/skills/fe-design/SKILL.md +3 -3
  295. package/dist/agent-src/skills/fe-design/references/design-patterns.md +1 -1
  296. package/dist/agent-src/skills/fe-design/references/design-read-and-memory.md +3 -3
  297. package/dist/agent-src/skills/fe-design/references/source-led-port.md +1 -1
  298. package/dist/agent-src/skills/feature-planning/SKILL.md +1 -1
  299. package/dist/agent-src/skills/flux/SKILL.md +1 -1
  300. package/dist/agent-src/skills/forecast-accuracy/SKILL.md +2 -2
  301. package/dist/agent-src/skills/forecasting/SKILL.md +2 -2
  302. package/dist/agent-src/skills/fundraising-narrative/SKILL.md +2 -2
  303. package/dist/agent-src/skills/funnel-analysis/SKILL.md +2 -2
  304. package/dist/agent-src/skills/git-workflow/references/push-closes-its-loop.md +9 -0
  305. package/dist/agent-src/skills/gtm-launch/SKILL.md +2 -2
  306. package/dist/agent-src/skills/hiring-loop-design/SKILL.md +1 -1
  307. package/dist/agent-src/skills/html-deck/SKILL.md +5 -5
  308. package/dist/agent-src/skills/humanizer/SKILL.md +1 -1
  309. package/dist/agent-src/skills/humanizer/data/patterns.md +1 -1
  310. package/dist/agent-src/skills/iconography/SKILL.md +3 -3
  311. package/dist/agent-src/skills/judge-synthesis/SKILL.md +1 -1
  312. package/dist/agent-src/skills/laravel-api-endpoint/SKILL.md +2 -2
  313. package/dist/agent-src/skills/launch-readiness/SKILL.md +3 -3
  314. package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +6 -6
  315. package/dist/agent-src/skills/livewire/SKILL.md +1 -1
  316. package/dist/agent-src/skills/market-entry-analysis/SKILL.md +1 -1
  317. package/dist/agent-src/skills/mcp-builder/SKILL.md +1 -1
  318. package/dist/agent-src/skills/memory-consolidation/SKILL.md +3 -3
  319. package/dist/agent-src/skills/messaging-architecture/SKILL.md +2 -2
  320. package/dist/agent-src/skills/monorepo-workspace/SKILL.md +1 -1
  321. package/dist/agent-src/skills/onboarding-design/SKILL.md +2 -2
  322. package/dist/agent-src/skills/onboarding-program/SKILL.md +1 -1
  323. package/dist/agent-src/skills/one-on-one-cadence/SKILL.md +1 -1
  324. package/dist/agent-src/skills/org-design/SKILL.md +1 -1
  325. package/dist/agent-src/skills/overbuild-review-lens/SKILL.md +3 -3
  326. package/dist/agent-src/skills/override-management/SKILL.md +1 -1
  327. package/dist/agent-src/skills/perf-feedback-craft/SKILL.md +1 -1
  328. package/dist/agent-src/skills/persona-writing/SKILL.md +1 -1
  329. package/dist/agent-src/skills/php-coder/SKILL.md +1 -1
  330. package/dist/agent-src/skills/pipeline-strategy/SKILL.md +2 -2
  331. package/dist/agent-src/skills/playwright-testing/SKILL.md +3 -3
  332. package/dist/agent-src/skills/po-discovery/SKILL.md +1 -1
  333. package/dist/agent-src/skills/positioning-strategy/SKILL.md +2 -2
  334. package/dist/agent-src/skills/privacy-review/SKILL.md +1 -1
  335. package/dist/agent-src/skills/prompt-optimizer/SKILL.md +3 -3
  336. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +1 -1
  337. package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +2 -2
  338. package/dist/agent-src/skills/receiving-code-review/SKILL.md +1 -1
  339. package/dist/agent-src/skills/refine-ticket/SKILL.md +2 -2
  340. package/dist/agent-src/skills/release-comms/SKILL.md +2 -2
  341. package/dist/agent-src/skills/retention-loops/SKILL.md +2 -2
  342. package/dist/agent-src/skills/review-routing/SKILL.md +2 -2
  343. package/dist/agent-src/skills/roadmap-management/SKILL.md +1 -1
  344. package/dist/agent-src/skills/roadmap-management/references/archival.md +1 -1
  345. package/dist/agent-src/skills/roadmap-writing/SKILL.md +5 -5
  346. package/dist/agent-src/skills/rule-writing/SKILL.md +6 -6
  347. package/dist/agent-src/skills/runway-cognition/SKILL.md +2 -2
  348. package/dist/agent-src/skills/scenario-modeling/SKILL.md +2 -2
  349. package/dist/agent-src/skills/skill-writing/SKILL.md +2 -2
  350. package/dist/agent-src/skills/skill-writing/references/procedure.md +1 -1
  351. package/dist/agent-src/skills/skill-writing/references/section-patterns.md +3 -3
  352. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +1 -1
  353. package/dist/agent-src/skills/stakeholder-tradeoff/SKILL.md +3 -3
  354. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +1 -1
  355. package/dist/agent-src/skills/supply-chain-intake/SKILL.md +1 -1
  356. package/dist/agent-src/skills/systematic-debugging/SKILL.md +2 -2
  357. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +60 -4
  358. package/dist/agent-src/skills/throughput-vs-morale-tradeoff/SKILL.md +1 -1
  359. package/dist/agent-src/skills/token-optimizer/SKILL.md +1 -1
  360. package/dist/agent-src/skills/typography-system/SKILL.md +2 -2
  361. package/dist/agent-src/skills/ui-component-architect/SKILL.md +28 -8
  362. package/dist/agent-src/skills/unit-economics-modeling/SKILL.md +2 -2
  363. package/dist/agent-src/skills/upstream-contribute/SKILL.md +1 -1
  364. package/dist/agent-src/skills/validate-feature-fit/SKILL.md +2 -2
  365. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +2 -2
  366. package/dist/agent-src/skills/vision-articulation/SKILL.md +1 -1
  367. package/dist/agent-src/skills/voc-extract/SKILL.md +2 -2
  368. package/dist/agent-src/skills/voice-and-tone-design/SKILL.md +2 -2
  369. package/dist/agent-src/skills/wireframe/SKILL.md +1 -1
  370. package/dist/agent-src/skills/workspace-link/SKILL.md +1 -1
  371. package/dist/agent-src/templates/agent-settings.md +6 -6
  372. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  373. package/dist/agent-src/templates/contexts/knowledge-pages.md +2 -3
  374. package/dist/agent-src/templates/copilot-instructions.md +1 -1
  375. package/dist/agent-src/templates/roadmaps.md +1 -1
  376. package/dist/agent-src/templates/scripts/README.md +2 -2
  377. package/dist/agent-src/user-types/_template/user-type.md +1 -1
  378. package/dist/cli/registry.js +1 -1
  379. package/dist/cli-delegate/archive_completed_roadmaps.js +52 -4
  380. package/dist/cli-delegate/check_update_banner.js +12 -1
  381. package/dist/cli-delegate/{chunk-TGIPZBCW.js → chunk-2KKXJW25.js} +22 -8
  382. package/dist/cli-delegate/{chunk-NLP54U3J.js → chunk-2XY7ILBT.js} +13 -1
  383. package/dist/cli-delegate/{chunk-4FS4WRXP.js → chunk-3FKR64R5.js} +34 -6
  384. package/dist/cli-delegate/{chunk-J3RFNKG4.js → chunk-55ACLDUE.js} +2 -2
  385. package/dist/cli-delegate/{chunk-PKOBQADP.js → chunk-57PN4GYJ.js} +1 -1
  386. package/dist/cli-delegate/{chunk-BIXEDQPZ.js → chunk-AK6HODNQ.js} +4 -4
  387. package/dist/cli-delegate/{chunk-2FTMENJL.js → chunk-GYC3VRYN.js} +1 -1
  388. package/dist/cli-delegate/{chunk-LWTYTX6F.js → chunk-HZ52BRGG.js} +24 -18
  389. package/dist/cli-delegate/{chunk-6RJA2F5A.js → chunk-IVBPRCQO.js} +1 -1
  390. package/dist/cli-delegate/{chunk-I6RHFQEG.js → chunk-YUM5KURG.js} +17 -1
  391. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  392. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  393. package/dist/cli-delegate/cmd_conformance.js +3 -3
  394. package/dist/cli-delegate/cmd_doctor.js +3 -3
  395. package/dist/cli-delegate/cmd_explain.js +2 -2
  396. package/dist/cli-delegate/cmd_export.js +4 -4
  397. package/dist/cli-delegate/cmd_handoff.js +24 -16
  398. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  399. package/dist/cli-delegate/cmd_memory_get.js +1 -1
  400. package/dist/cli-delegate/cmd_migrate.js +2 -2
  401. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  402. package/dist/cli-delegate/cmd_prune.js +4 -4
  403. package/dist/cli-delegate/cmd_route_audit.js +3 -3
  404. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  405. package/dist/cli-delegate/cmd_session_recycle.js +4 -14
  406. package/dist/cli-delegate/cmd_settings_get.js +15 -9
  407. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  408. package/dist/cli-delegate/cmd_settings_set.js +41 -11
  409. package/dist/cli-delegate/cmd_sync.js +4 -4
  410. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  411. package/dist/cli-delegate/cmd_update.js +1 -1
  412. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  413. package/dist/cli-delegate/cmd_validate.js +4 -4
  414. package/dist/cli-delegate/cmd_versions.js +1 -1
  415. package/dist/discovery/deprecation-report.md +1 -1
  416. package/dist/discovery/discovery-manifest.json +27 -80
  417. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  418. package/dist/discovery/discovery-manifest.summary.md +3 -3
  419. package/dist/discovery/dormancy-report.md +1 -1
  420. package/dist/discovery/orphan-report.md +1 -1
  421. package/dist/discovery/packs.json +5 -7
  422. package/dist/discovery/trust-report.md +2 -2
  423. package/dist/discovery/workspaces.json +4 -6
  424. package/dist/hooks/dispatch.js +9249 -8981
  425. package/dist/install/install.mjs +47 -8
  426. package/dist/mcp/registry-manifest.json +3 -3
  427. package/dist/mcp/server.json +2 -2
  428. package/dist/mcp/server.mjs +5496 -2400
  429. package/dist/router.json +1 -1
  430. package/dist/scripts/_lib/agent_settings.js +73 -0
  431. package/dist/scripts/_lib/agent_src.js +20 -0
  432. package/dist/scripts/_lib/guidelines_lane.js +158 -0
  433. package/dist/scripts/_lib/lean_projection_mode.js +108 -0
  434. package/dist/scripts/_lib/router_match.js +243 -0
  435. package/dist/scripts/_lib/rule_injection.js +216 -0
  436. package/dist/scripts/condense.js +22 -25
  437. package/dist/scripts/project_thin_rules.js +139 -19
  438. package/dist/server/io/yamlIO.js +125 -17
  439. package/dist/server/schemas/settings.js +32 -5
  440. package/dist/shared/settingsSurface.js +6 -1
  441. package/docs/MIGRATION.md +56 -0
  442. package/docs/contracts/settings-classes.md +48 -7
  443. package/docs/guidelines/abstraction-thresholds.md +35 -0
  444. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +3 -3
  445. package/docs/guidelines/agent-infra/false-green.md +2 -2
  446. package/docs/guidelines/agent-infra/notes-horizon-mechanics.md +90 -0
  447. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +1 -1
  448. package/docs/guidelines/agent-infra/skill-quality-checklist.md +1 -1
  449. package/docs/guidelines/design-fidelity-mechanics.md +4 -0
  450. package/docs/guidelines/design-fidelity-routing.md +78 -0
  451. package/docs/guidelines/design-reconciliation.md +172 -0
  452. package/docs/guidelines/gtm-handoff.md +2 -2
  453. package/docs/guidelines/wing4-handoff.md +2 -2
  454. package/llms.txt +1 -1
  455. package/package.json +7 -3
  456. package/src/agent-src/scripts/archive_completed_roadmaps.ts +106 -4
  457. package/src/config/agent-settings.template.yml +94 -1
  458. package/src/config/ci-local-parity.yml +34 -0
  459. package/src/config/continuity-surface.json +8 -29
  460. package/src/config/evaluator-budgets.json +4 -4
  461. package/src/config/gate-coverage.yml +31 -8
  462. package/src/config/gate-reachability-exemptions.json +1 -0
  463. package/src/config/gate-violation-baselines.json +3 -3
  464. package/src/config/hook-token-budget.json +8 -7
  465. package/src/config/host-injection-effect.json +2 -2
  466. package/src/config/pack-size-budget.json +55 -4
  467. package/src/config/packed-binary-manifest.json +1 -1
  468. package/src/config/platform-anchor.json +47 -0
  469. package/src/config/preamble-payload-budget.json +2 -3
  470. package/src/config/publish-surface.json +4 -2
  471. package/src/config/ratification-policy.json +7 -0
  472. package/src/config/routing-coverage-seed.json +9 -2
  473. package/src/config/rule-stub-ceilings.json +16 -9
  474. package/src/scripts/_cli/cmd_session_recycle.ts +2 -25
  475. package/src/scripts/_cli/cmd_settings_get.ts +22 -7
  476. package/src/scripts/_cli/handoff_sessions.ts +14 -44
  477. package/src/scripts/_lib/agent_settings.ts +85 -0
  478. package/src/scripts/_lib/agent_src.ts +21 -0
  479. package/src/scripts/_lib/artifact_maturity.ts +242 -0
  480. package/src/scripts/_lib/conformance_report.ts +403 -0
  481. package/src/scripts/_lib/continuity_slot.ts +295 -0
  482. package/src/scripts/_lib/continuity_writer.ts +312 -0
  483. package/src/scripts/_lib/design_system_import.ts +20 -0
  484. package/src/scripts/_lib/design_tolerance.ts +281 -0
  485. package/src/scripts/_lib/guidelines_lane.ts +164 -0
  486. package/src/scripts/_lib/hook_settings.ts +85 -0
  487. package/src/scripts/_lib/lean_projection_mode.ts +127 -0
  488. package/src/scripts/_lib/obligation_frequency.ts +2 -3
  489. package/src/scripts/_lib/packed_binary_predicate.ts +37 -0
  490. package/src/scripts/_lib/platform_anchor.ts +1053 -0
  491. package/src/scripts/_lib/ratification_artifact.ts +278 -0
  492. package/src/scripts/_lib/recycle_envelope_paths.ts +109 -21
  493. package/src/scripts/_lib/regression_neighbourhood.ts +159 -22
  494. package/src/scripts/_lib/security_lint.ts +23 -2
  495. package/src/scripts/_lib/self_repair.ts +21 -0
  496. package/src/scripts/_lib/session_eol.ts +44 -0
  497. package/src/scripts/_lib/session_index_trust.ts +387 -0
  498. package/src/scripts/_lib/standing_bound_ratchet.ts +220 -0
  499. package/src/scripts/_lib/tolerance_shadow.ts +177 -0
  500. package/src/scripts/_lib/vendored_grammar_upstream.ts +280 -0
  501. package/src/scripts/ai_council/redact_low_impact_entry.ts +8 -0
  502. package/src/scripts/audit_mcp_tools.ts +69 -25
  503. package/src/scripts/autonomy_friction_traffic.ts +379 -0
  504. package/src/scripts/build_mcp_catalog.ts +24 -1
  505. package/src/scripts/check_host_tree_parity.ts +291 -0
  506. package/src/scripts/check_kernel_edit_ratified.ts +462 -0
  507. package/src/scripts/check_loss_class_declared.ts +793 -46
  508. package/src/scripts/check_platform_anchor.ts +390 -0
  509. package/src/scripts/check_preamble_payload_budget.ts +424 -7
  510. package/src/scripts/check_projected_rule_routes.ts +395 -0
  511. package/src/scripts/check_rule_projection_integrity.ts +102 -2
  512. package/src/scripts/ci_settle.ts +205 -5
  513. package/src/scripts/code_graph/build.ts +79 -0
  514. package/src/scripts/code_graph/cli.ts +264 -7
  515. package/src/scripts/code_graph/detect.ts +38 -0
  516. package/src/scripts/code_graph/query.ts +25 -2
  517. package/src/scripts/code_graph/sqlite_store.ts +16 -1
  518. package/src/scripts/code_graph/types.ts +52 -3
  519. package/src/scripts/code_graph/validate.ts +3 -1
  520. package/src/scripts/code_graph/verbs.ts +590 -0
  521. package/src/scripts/condense.ts +22 -26
  522. package/src/scripts/generate_host_cost_table.ts +354 -0
  523. package/src/scripts/handoff_context_hook.ts +39 -1
  524. package/src/scripts/hook_manifest.json +1 -1
  525. package/src/scripts/hook_manifest.yaml +59 -28
  526. package/src/scripts/hooks/block_speaking_inbox_dir.ts +182 -16
  527. package/src/scripts/hooks/category_a.ts +1 -1
  528. package/src/scripts/hooks/chain_nudge_hook.ts +311 -25
  529. package/src/scripts/hooks/code_graph_context_hook.ts +7 -18
  530. package/src/scripts/hooks/push_settle_hook.ts +3 -2
  531. package/src/scripts/hooks/rule_inject_hook.ts +107 -20
  532. package/src/scripts/hooks/session_eol_hook.ts +177 -145
  533. package/src/scripts/hooks/source_first_gate_hook.ts +12 -0
  534. package/src/scripts/hooks/ui_route_nudge_hook.ts +52 -15
  535. package/src/scripts/hot_context_hook.ts +103 -408
  536. package/src/scripts/lint_evidence_artifacts.ts +1 -0
  537. package/src/scripts/lint_knowledge_scale.ts +0 -26
  538. package/src/scripts/lint_roadmap_blockers.ts +164 -1
  539. package/src/scripts/mcp_server/consumer_tool_catalog.json +152 -2
  540. package/src/scripts/mcp_server/graph_tools.ts +294 -0
  541. package/src/scripts/mcp_server/path_util.ts +31 -0
  542. package/src/scripts/mcp_server/tool_catalog_source.ts +7 -1
  543. package/src/scripts/mcp_server/tools.ts +3 -13
  544. package/src/scripts/memory_lookup.ts +9 -9
  545. package/src/scripts/model_rule_injection.ts +61 -4
  546. package/src/scripts/project_thin_rules.ts +149 -16
  547. package/src/scripts/report_standing_payload_by_host.ts +650 -0
  548. package/src/scripts/schemas/agent-settings.schema.json +7 -1
  549. package/src/scripts/session_memory_index.ts +86 -8
  550. package/src/scripts/sync_agent_settings.ts +270 -10
  551. package/src/server/io/yamlIO.ts +127 -17
  552. package/src/server/schemas/settings.ts +45 -6
  553. package/src/shared/settingsSurface.ts +13 -2
  554. package/src/templates/compact-instructions.md +8 -3
  555. package/src/vendor/grammars/README.md +27 -2
  556. package/dist/agent-src/commands/chat-history/import.md +0 -170
  557. package/dist/agent-src/commands/chat-history.md +0 -63
@@ -0,0 +1,241 @@
1
+ # Minimal Safe Diff — Mechanics
2
+
3
+ > Anti-over-engineering criteria, larger-change guidance, break-glass exception, and the bounded remediation carve-out for the `minimal-safe-diff` rule
4
+
5
+ _Origin: migrated from `src/rules/minimal-safe-diff.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law, "The rule", "Before writing the diff", the red-flags list, and "Own-orphan cleanup" (anchor-referenced by `downstream-changes`) stay in the rule; this file carries the worked criteria._
6
+
7
+ ## When the task seems to require a larger change
8
+
9
+ - A rename, restructure, or framework upgrade that crosses the minimal-diff
10
+ line is a **separate, explicit** task — ask the user before expanding.
11
+ - A bug fix that exposes a broader design problem stays a bug fix. Log the
12
+ design problem as a follow-up (ticket, note, TODO) and ship the fix alone.
13
+ - A new feature that tempts you to "clean up" the module first: resist.
14
+ Add the feature, commit it, then propose the cleanup as a separate change.
15
+
16
+ ## Auto-formatter or linter rewrites unrelated code
17
+
18
+ Revert those hunks before staging. The diff you present is the diff you own.
19
+ If project policy forbids partial formatting, split into two commits:
20
+ *format only* · *behavior change*.
21
+
22
+ ## Anti-over-engineering
23
+
24
+ The smallest change is also the least *abstract* and least *speculative* one:
25
+
26
+ - **Three similar lines beat a premature abstraction.** Do not extract a helper
27
+ / generic / config layer to dedupe two or three call sites — inline
28
+ repetition is cheaper to read and change than the wrong abstraction. Per new
29
+ abstraction: **cite the second caller — or inline it.** The operative
30
+ **code-level** threshold in this suite is the **second real repetition** (or a
31
+ genuine second axis of change), matching `architecture` and
32
+ [`component-oriented-and-oop-development`](../component-oriented-and-oop-development.md);
33
+ the "three lines" phrasing is about *line* count inside one call site, not a
34
+ third-occurrence gate. A borrowed "wait for the third occurrence" rule is
35
+ **not** adopted for code — it would fork a threshold this repo already
36
+ decided. UI extractions carry deliberately higher, scoped bars (ADR-213) —
37
+ the per-class canon is [`abstraction-thresholds`](../abstraction-thresholds.md).
38
+ - **No speculative features.** Nothing beyond what was asked: no
39
+ configurability or "flexibility" nobody requested, no parameters with one
40
+ call site, no error handling for scenarios that cannot occur in this
41
+ codebase.
42
+ - **The rewrite trigger.** If the change could be half the size without losing
43
+ behavior, rewrite before presenting. Self-check: *"Would a senior engineer
44
+ call this overcomplicated?"* — if yes, simplify.
45
+ - **No tombstones.** Delete removed code completely — no `_oldName` renames,
46
+ no `// removed X` / `// no longer used` markers, no dead re-export shims kept
47
+ "for safety". Git history is the tombstone.
48
+ - **No docstrings/comments on untouched code.** Do not annotate code the diff
49
+ does not change.
50
+
51
+ ### The sanctioned-rewrite trap (second-system effect)
52
+
53
+ Distinct from *the rewrite trigger* above, which fires **mid-diff** on your own
54
+ bloated change. This one fires at **intake**, when the user has already
55
+ sanctioned a rewrite, a v2, a from-scratch replacement, or a large refactor —
56
+ and it is the single highest over-build context there is. The second system a
57
+ person builds is the most over-built one they will ever build: every constraint
58
+ the first system taught them arrives as a feature, and none of it is demanded
59
+ by the ticket in front of them.
60
+
61
+ Permission to rewrite is permission to **replace the behaviour that exists** —
62
+ not a licence to add the capability the old system lacked. The v2 ships the
63
+ v1 surface, minus what is provably dead, plus only what was explicitly asked
64
+ for. Everything the rewrite "makes easy to add now" is a separate change with
65
+ its own demand gate (guideline § 8-pre) and its own place on the
66
+ solution-size ladder (§ 8b-ladder).
67
+
68
+ Wrong/right pairs for each ban:
69
+ [`simplicity-and-goal-demos`](simplicity-and-goal-demos.md)
70
+ — the demos are the recognition surface; match your diff against the *right*
71
+ column before presenting.
72
+
73
+ **Not adopted (council):** the source's "validate only at system boundaries /
74
+ trust internal code" clause is **rejected** — internal code can be wrong, and
75
+ "trust" is not a testing strategy. Keep validating internal invariants; this
76
+ fold is about *diff shape*, not about dropping internal checks.
77
+
78
+ ## Break-glass exception
79
+
80
+ The rule stays in force during production incidents. "Break-glass mode"
81
+ narrows verification (see `verify-before-complete`) — it does **not**
82
+ license drive-by edits.
83
+
84
+ Allowed during break-glass:
85
+
86
+ - The **smallest** change that stops the bleeding — one file, one
87
+ method, one guard — preferred over any refactor.
88
+ - A fast revert to a known-good commit, even if it undoes unrelated
89
+ improvements shipped in the same PR.
90
+
91
+ Not allowed, even in break-glass:
92
+
93
+ - "While I'm in there" cleanups, reformatting, or dependency bumps.
94
+ - Expanding the fix to neighboring modules without evidence they are
95
+ part of the incident.
96
+ - Merging the hotfix with pending refactors from another branch.
97
+
98
+ After the incident, open a **follow-up PR** for any scope that was
99
+ intentionally deferred and reference the break-glass commit in its
100
+ description.
101
+
102
+ ## Bounded remediation carve-out
103
+
104
+ The default stands: no drive-by edits, no opportunistic refactors. The one
105
+ bounded exception — a **small, task-aligned security/correctness fix in code
106
+ the current task already touches** — is governed by `active-remediation`
107
+ (mechanics: [`active-remediation-mechanics`](active-remediation-mechanics.md)).
108
+ It is permitted inline **only** when ALL hold: same request path / module,
109
+ ≤ ~10 changed lines in one production file (plus its test file), no
110
+ public-API / response-shape change, no dependency bump or migration, and its
111
+ verification (e.g. the negative test) ships in the same commit. Anything
112
+ outside those five conditions is **not** this carve-out — it is note + ask
113
+ per `active-remediation`. This never licenses reformatting, renames,
114
+ dependency bumps, or version upgrades (a syntax-idiom modernization is
115
+ allowed only under `active-remediation`'s version-gated,
116
+ behavior-preserving clause; a dependency/version bump stays ask-only). The
117
+ sole case that may interrupt is a **live cross-user/tenant data exposure**
118
+ (`broken-access-control`) — fix-now-if-small, else stop and surface; never
119
+ defer it silently.
120
+
121
+ ## Shared-path repair — scope, and when NOT to fire
122
+
123
+ The rule's pre-fix clause is the obligation; this is its boundary.
124
+
125
+ **Does not fire** when nothing else reaches the code (a leaf function, a
126
+ one-caller private), or when the shared repair is genuinely larger than the
127
+ five-condition bounded carve-out above permits. In the second case it is
128
+ note + ask per [`active-remediation`](active-remediation-mechanics.md) — never
129
+ a silent per-caller patch presented as the minimal diff, and never a
130
+ shared-path rewrite smuggled in under a bug-fix label.
131
+
132
+ **Enumerate with the tool, not from memory.** The caller set is a grep or an
133
+ index query, and its COUNT is what makes "repairing once is smaller" a claim
134
+ rather than an intuition — two callers and a three-line patch each is not
135
+ obviously worse than one shared change, while nine callers is.
136
+
137
+ ## Before writing the diff — the three questions
138
+
139
+ Migrated verbatim from the rule (road-to-trigger-delivered-rule-bodies A1),
140
+ which had to pay for the pre-fix root-cause clause out of its own token
141
+ ceiling. Nothing was cut; this is where it now lives.
142
+
143
+ Ask yourself, in order:
144
+
145
+ 1. **What is the minimum set of files that must change for the stated task?**
146
+ If your answer includes files with no causal link to the task, stop and
147
+ remove them.
148
+ 2. **What is the minimum number of lines per file?** If you are editing a
149
+ method, edit the method — not the surrounding class.
150
+ 3. **Is any of this a refactor?** If yes, it belongs in its own commit or
151
+ PR, clearly labeled as a refactor, with no behavior change.
152
+
153
+ ## Red flags in your own diff — reject them
154
+
155
+ Files the task never mentioned · import reordering, whitespace, or comments
156
+ outside the edited region · "small improvements" to neighboring methods ·
157
+ test-only mixed with behavior changes in one commit · renames outside the
158
+ task scope · dependency bumps "because it was close to the cache".
159
+
160
+ ## When in doubt
161
+
162
+ Ask. A minimal diff plus one follow-up is cheaper than a sprawling diff the
163
+ reviewer has to untangle.
164
+
165
+ ## See also
166
+
167
+ - `minimal-safe-diff` (rule) — Iron Law, the rule, the pre-fix shared-path repair clause, own-orphan cleanup. The pre-diff checklist, the red-flag catalog and the when-in-doubt line live HERE since A1.
168
+ - [`active-remediation-mechanics`](active-remediation-mechanics.md) — the fix-now / note+ask / follow-up-PR ladder detail.
169
+
170
+ ## Re-derive the requirement, don't inherit the shape
171
+
172
+ ```
173
+ A REPAIR INHERITS THE SHAPE OF WHAT IT REPAIRS UNLESS YOU ASK OTHERWISE.
174
+ STATE THE REQUIREMENT IN ONE LINE, THEN ASK WHETHER THE CURRENT FORM
175
+ *CAN* EXPRESS IT. A FORM THAT CANNOT IS NOT A PARAMETER BUG.
176
+ ```
177
+
178
+ Applies to a downstream repair — clearing a red, or fixing what your own diff
179
+ broke — where the smallest change is a different VALUE and the form is
180
+ unexamined.
181
+
182
+ ### Why this is a guideline section and not a rule clause
183
+
184
+ It was drafted as a clause in `minimal-safe-diff` on 2026-09-07 and moved here
185
+ the same day, on the gate's own evidence rather than on preference.
186
+ `check_preamble_payload_budget` measured the clause at +460 delivered tokens,
187
+ then +271, then +180 after two rounds of cutting — a floor set by the Iron-Law
188
+ block itself. That payload is re-written on EVERY subagent spawn, and the rule it
189
+ would have lived in is `type: auto`: it fires on prompt keywords, not on tool
190
+ output, so a red test nobody mentioned never loads it.
191
+
192
+ Certain per-spawn cost against an activation path that misses the case the clause
193
+ was written for is a bad trade, and the deterministic half does not depend on it
194
+ — see § Honest limit below. The rule already routes here
195
+ (`routes_to: guideline:agent-infra/minimal-safe-diff-mechanics`), which is the
196
+ same reachability every other migrated body in this repository has.
197
+
198
+ ### Worked failure — 2026-09-07
199
+
200
+ A change emptied `<repo>/.claude/skills` of skills and left ~49 flat-command
201
+ wrappers behind. `resolveSkillsRoot` tried two workspace-relative roots and took
202
+ the first non-empty one, so it resolved the wrappers, and the skill ranker ranked
203
+ 49 command wrappers instead of 299 skills.
204
+
205
+ The repair chosen was to swap the ORDER of the two roots. The requirement was
206
+ *"rank every catalogue the session can reach"*, which **no ordering of a
207
+ first-hit loop can satisfy** — and the host-global root the whole task was about
208
+ appeared in neither position. The evidence had been measured an hour earlier and
209
+ sat in the same session's own notes: `~/.claude/skills` 307, `.claude/skills` 49,
210
+ `src/skills` 299.
211
+
212
+ Two things made it easy to miss, and both are the shape of the trap rather than
213
+ this instance of it:
214
+
215
+ - **The docstring framed the question.** It read *"First existing catalogue root
216
+ … `.claude/skills` before `src/skills` because a CONSUMER install carries the
217
+ former"* — i.e. it asked *which root wins*, and that question was answered. A
218
+ docstring records what the code decided; it never records whether that was the
219
+ decision to make.
220
+ - **The same docstring contained the premise of the correct answer.** If
221
+ consumers carry their own skills *and* the package ships skills, both must be
222
+ read. The sentence was read, used to justify an ordering, and its consequence
223
+ was not drawn.
224
+
225
+ ### Why the pre-work rules do not cover it
226
+
227
+ [`improve-before-implement`](../../rules/improve-before-implement.md) does
228
+ not activate for bug fixes ("the problem is already defined") and
229
+ [`invite-challenge`](../../rules/invite-challenge.md) excludes "evidenced
230
+ bug fixes". Both exclusions are right for the case they were written for and
231
+ wrong for a downstream repair, which presents as a defined problem while its
232
+ definition came from the broken code.
233
+
234
+ ### Honest limit
235
+
236
+ The rule is `type: auto`, so it fires on prompt keywords and not on tool output:
237
+ a red test nobody prompted about does not load it. The clause is the
238
+ model-carried half. The deterministic half is a comparison of the two lists that
239
+ diverged — `tests/contracts/catalogue_layer_parity.test.ts`, which reds when a
240
+ directory the delivery side treats as an artifact source is not a root the reader
241
+ reads, and which was measured to catch this exact defect on the pre-change tree.
@@ -0,0 +1,66 @@
1
+ # Missing Tool Handling
2
+
3
+ > CLI tool needed for the task is not installed — ask before working around it; do NOT install silently
4
+
5
+ _Origin: migrated from `src/rules/missing-tool-handling.md` per the P4 pattern of `road-to-kernel-and-router.md`._
6
+
7
+ When a CLI tool is needed to solve the task cleanly and is **not installed**
8
+ (`command not found`, `which X` empty, missing from `$PATH`), **STOP and ask**
9
+ before working around it or installing it.
10
+
11
+ ## The rule
12
+
13
+ - **Never install silently.** Installing is an action that changes the user's
14
+ system — it requires explicit permission (see `scope-control`).
15
+ - **Never silently work around** a missing tool with a brittle substitute
16
+ (awk-regex for YAML, `grep` for JSON, string splicing) when a proper tool
17
+ is the standard answer for the job. The workaround hides the real
18
+ dependency and makes the decision invisible to the user.
19
+ - **Ask with numbered options** (see `user-interaction`). State which tool,
20
+ why it's the best fit, the install command, and the workaround cost.
21
+
22
+ ## When it applies
23
+
24
+ - Any shell command fails with `command not found` for a tool the task
25
+ genuinely needs (yq, jq, rtk, gh, docker, mkcert, terraform, …).
26
+ - A skill or spike requires a tool that is the idiomatic answer but is
27
+ absent locally.
28
+ - You are about to substitute a verbose script for a single tool invocation
29
+ because the tool isn't there.
30
+
31
+ ## When it does NOT apply
32
+
33
+ - The tool is a nice-to-have and a clean substitute already exists in the
34
+ repo (e.g. `jq` present → no need for `yq` just for JSON).
35
+ - The tool is explicitly forbidden by project policy (check
36
+ `scope-control` and tool-allowlists first).
37
+ - The missing artefact is a library dependency — those go through
38
+ `composer require`, `npm install`, `pip install` per the package-manager
39
+ rules, still with explicit permission.
40
+
41
+ ## How to ask
42
+
43
+ ```
44
+ > `yq` is not installed. It's the cleanest way to parse the ticket YAML
45
+ > in the Bash prototype — the alternative is a JSON conversion step,
46
+ > which adds ~20ms to every run.
47
+ >
48
+ > 1. Install via `brew install yq` (recommended — one-time, stays on PATH)
49
+ > 2. Use JSON conversion fallback — slower but no install needed
50
+ > 3. Drop YAML — convert fixtures to JSON, use `jq` only
51
+ > 4. Skip this path — I propose a different approach
52
+ ```
53
+
54
+ After the user picks: if **install**, wait for confirmation that it is
55
+ done (or run the documented install command only if the user explicitly
56
+ authorises it in this turn). If **workaround**, record the decision in
57
+ the artefact (comment or ADR) so the cost is visible.
58
+
59
+ ## Capture the learning
60
+
61
+ If the same tool keeps coming up as missing across multiple tasks, flag
62
+ it in the project's setup docs or `.agent-settings.yml` prerequisites.
63
+ Don't make every session re-discover the gap.
64
+
65
+ See also: `scope-control` · `ask-when-uncertain` · `user-interaction` ·
66
+ `tool-safety`.
@@ -0,0 +1,101 @@
1
+ # Model Recommendation
2
+
3
+ > Surface-aware model_tier routing — when to auto-switch, when to suggest, how to phrase the one-question suggestion
4
+
5
+ _Origin: migrated from `src/rules/model-recommendation.md` per the P4 pattern of `road-to-kernel-and-router.md`._
6
+
7
+ **Iron Law.** When a skill or command carries a `model_tier` (a vendor-neutral
8
+ capability band), route the turn to **that agent's best model in that band** —
9
+ automatically where the surface supports a per-turn override, as a single
10
+ suggestion where it does not. Never recommend another vendor's model. Never
11
+ double-ask, never front-load the question.
12
+
13
+ ## Source of truth — the capability tier
14
+
15
+ Each skill/command declares `model_tier: lite | medium | high | inherit`
16
+ (ADR-035) — a band, not a model. `inherit` = "no opinion, keep the session
17
+ model". The task→tier heuristics live in
18
+ `contexts/model-recommendations.md` — cite them, don't restate. The **only**
19
+ tier→model mapping the package maintains is the Claude generator's
20
+ (`high→opus`, `medium→sonnet`, `lite→haiku`); every other agent resolves the
21
+ band to its own line-up.
22
+
23
+ ## Surface-aware behaviour
24
+
25
+ Read `model.auto_switch` from `.agent-settings.yml` (`auto | suggest | off`,
26
+ default `suggest`) live, then:
27
+
28
+ - **Claude Code / Desktop (native per-turn `model:` override).** When
29
+ `auto_switch: auto`, the rendered skill's native `model:` (mapped from the
30
+ tier by the generator) already performed the switch — **do NOT ask, do NOT
31
+ re-state it**. When `suggest`, no native key was emitted; surface the
32
+ one-question suggestion below using the skill's `model_tier`.
33
+ - **Any surface without a per-turn override (Augment, etc.).** When
34
+ `auto_switch` is `auto` or `suggest`, surface **one** suggestion (per
35
+ `ask-when-uncertain`) naming the **tier** — the user maps it to their
36
+ agent's model. Do NOT name a specific vendor model; the package keeps no
37
+ per-vendor table. Never auto-act where the surface can't.
38
+ - **`auto_switch: off`.** Inert. No native key, no suggestion.
39
+
40
+ ## Orchestrator → subagent model routing
41
+
42
+ The main loop can't self-switch its own model — the user owns the session model
43
+ (`/model`). But the orchestrator **does** own the model of every subagent it
44
+ spawns (the `Agent` tool's `model:`, a Workflow agent's `model:`, or
45
+ `subagents.implementer_model`). Right-sizing those is where tier-routing actually
46
+ bites for token cost.
47
+
48
+ **Judge per subtask — never blanket-downgrade.** The orchestrator assesses each
49
+ delegated subtask's difficulty and matches the model to it. A cheap model on a
50
+ hard subtask costs *more* (rework, wrong output) than it saves; a strong model on
51
+ a trivial sweep burns budget for nothing. The goal is the **optimal**
52
+ distribution, not the cheapest one.
53
+
54
+ - **Downgrade** mechanical / narrow / well-specified work — code or file search,
55
+ broad reading, boilerplate or format-conversion edits, deterministic
56
+ transforms — to `medium` (or `lite` when genuinely trivial).
57
+ - **Keep the strong (`high`) model** for ambiguous, cross-cutting, design,
58
+ security, or correctness-critical subtasks, and for any work needing deep
59
+ reasoning. When difficulty is unclear, keep the stronger model.
60
+ - **Keep `high` for the orchestrator's own synthesis, judgment, and final
61
+ verification** of subagent output — the same reason the judge runs one tier up
62
+ (`subagent-configuration.md`).
63
+
64
+ **Default is not free.** `subagents.implementer_model` defaults to the *session*
65
+ model, so subagents inherit the session tier (e.g. `high`) unless the orchestrator
66
+ sets `model:` per call or the user sets a baseline. Delegation alone does not lower
67
+ cost — the explicit per-task model choice does.
68
+
69
+ ## The suggestion (non-auto surfaces)
70
+
71
+ Ask **last** — after context / domain clarification, never before the task is
72
+ understood. Name the tier, not a vendor model:
73
+
74
+ ```
75
+ > 💡 This skill recommends the **{model_tier}** capability tier for {task type}.
76
+ >
77
+ > 1. Switch to your **{model_tier}**-tier model — continue
78
+ > 2. Stay on the current model
79
+ ```
80
+
81
+ (Tier → your model: `high` = your strongest reasoning model, `medium` = your
82
+ balanced daily model, `lite` = your fastest/cheapest.) On "switched" → accept,
83
+ continue. On "stay" → accept, no pushback; don't re-ask until the task type
84
+ changes.
85
+
86
+ ## Preserved flows (re-pointed at tiers)
87
+
88
+ - **Downgrade reminder.** After a `high`-tier task (architecture / refactoring /
89
+ root-cause found), remind the user that the implementation phase is cheaper on
90
+ the **`medium`** tier — using the next skill's `model_tier` as the target.
91
+ Full flow: `contexts/model-recommendations.md` § Downgrade reminder.
92
+ - **Gemini warning.** Detected model `gemini` → surface the not-recommended
93
+ warning once, then accept the user's choice. Flow:
94
+ `contexts/model-recommendations.md` § Gemini warning.
95
+
96
+ ## No standing-selection fight
97
+
98
+ A user's explicit `/model` choice is standing; the native per-turn `model:`
99
+ override reverts on the next prompt, so the rule never overrides a standing
100
+ selection beyond the current turn. With the default `suggest`, no native key is
101
+ emitted at all — the user's `/model` is never silently overridden.
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: "Naming conventions for skills, rules, commands, and guidelines"
3
+ source: package
4
+ ---
5
+
6
+ # Naming Conventions
7
+
8
+ ## Principles
9
+
10
+ 1. **Name = purpose.** Reading the name tells you what it does.
11
+ 2. **No collisions across layers.** A rule and skill must NOT share the same name.
12
+ 3. **Consistent prefixes** for related items: `project-analysis-*`, `laravel-*`, `feature-*`.
13
+ 4. **Consistent suffixes** for similar roles: `-management`, `-integration`, `-config`.
14
+ 5. **No bare nouns** — `jira` says nothing, `jira-integration` says everything.
15
+
16
+ ## Naming patterns by layer
17
+
18
+ ### Skills
19
+
20
+ | Pattern | When | Examples |
21
+ |---|---|---|
22
+ | `{domain}-{activity}` | Activity/workflow skills | `code-refactoring`, `sql-writing`, `pest-testing` |
23
+ | `{domain}-{role}` | Domain-specific expertise | `php-coder`, `fe-design`, `api-design` |
24
+ | `{domain}-{management}` | CRUD/lifecycle management | `module-management`, `override-management` |
25
+ | `{domain}-{integration}` | External tool integration | `jira-integration`, `sentry-integration` |
26
+ | `{domain}-{config}` | Configuration/setup | `copilot-config`, `devcontainer` |
27
+ | `{framework}-{feature}` | Framework-specific | `laravel-validation`, `laravel-mail` |
28
+ | `{scope}-analysis-{variant}` | Analysis skills | `project-analysis-laravel`, `performance-analysis` |
29
+ | `{action}-{target}` | Action commands as skills | `bug-analyzer`, `skill-reviewer` |
30
+
31
+ ### Rules
32
+
33
+ | Pattern | When | Examples |
34
+ |---|---|---|
35
+ | `{concern}` | Behavioral constraint | `scope-control`, `ask-when-uncertain` |
36
+ | `{domain}-{concern}` | Domain-specific rule | `php-coding`, `e2e-testing` |
37
+ | `{action}-{target}` | Trigger-based auto rule | `invite-challenge`, `downstream-changes` |
38
+
39
+ ### Commands
40
+
41
+ | Pattern | When | Examples |
42
+ |---|---|---|
43
+ | `{verb}-{target}` | Action commands | `create-pr`, `fix-ci`, `commit` |
44
+ | `{target}-{verb}` | Target-first grouping | `roadmap-create` (legacy atomic; current cluster form is `/roadmap:create` and `/roadmap:process-step|phase|full`) |
45
+ | `{scope}-{action}` | Scoped actions | `optimize-agents`, `review-changes` |
46
+
47
+ ### Guidelines
48
+
49
+ | Pattern | When | Examples |
50
+ |---|---|---|
51
+ | `{language}/{topic}.md` | Language-specific | `php/general.md`, `php/naming.md` |
52
+ | `{domain}/{topic}.md` | Domain-specific | `agent-infra/naming.md`, `e2e/locators.md` |
53
+
54
+ ## Anti-patterns
55
+
56
+ | Don't | Why | Do instead |
57
+ |---|---|---|
58
+ | Single bare noun (`jira`, `sql`) | Ambiguous — could be anything | `jira-integration`, `sql-writing` |
59
+ | Same name across layers | Routing confusion | `agent-docs` (rule) + `agent-docs-writing` (skill) |
60
+ | `-er` suffix for skills | Skills are not agents | `-ing` or `-management` |
61
+ | `{dir}/{dir}.md` for guidelines | Redundant | `php/general.md` not `php/php.md` |
62
+ | Abbreviations alone (`rtk`, `mcp`) | Meaningless to new users | `rtk-output-filtering`, `mcp` (OK if well-known) |
63
+ | Inconsistent prefix grouping | Hard to discover related items | All Laravel skills start with `laravel-*` |
64
+
65
+ ## Linter enforcement
66
+
67
+ The skill linter (`scripts/skill_linter.ts`) warns on:
68
+ - **Bare-noun names** — single word without qualifier (e.g., `jira` instead of `jira-integration`)
69
+ - **Layer collisions** — same name used for both a rule and a skill
@@ -0,0 +1,90 @@
1
+ # Notes-first reasoning — horizon and reopening mechanics
2
+
3
+ Migrated out of [`notes-first-reasoning`](../../rules/notes-first-reasoning.md)
4
+ on 2026-09-08. That rule is delivered on **every subagent spawn**, so its body is
5
+ paid per spawn; this material is reference read on demand. Nothing was dropped —
6
+ the four passages below are the rule's own text, verbatim, and the rule keeps
7
+ both Iron Laws and points here.
8
+
9
+ Same reason, and the same remedy, as the 2026-08-29 drain run recorded for
10
+ `source-confidentiality`: the addition had no room under the per-spawn ceiling,
11
+ and raising that ceiling is the config-weakening move this repository refuses.
12
+
13
+ ### Why reasoning stays out of the reply, and what grounds the notes file
14
+
15
+ Reasoning dumped into the user-facing answer is both noise and a
16
+ `reasoning_extraction` refusal risk (see `rdp-gate`). Keep it in the notes file.
17
+
18
+ The notes file is grounded in the documented cross-run lessons memory
19
+ (consolidated via [`memory-consolidation`](../../skills/memory-consolidation/SKILL.md));
20
+ the rule's in-task sections are a local derivation for within-task scope. The
21
+ gate itself reads settings + task-signal + host self-assessment.
22
+
23
+ ### The two section fields, in full
24
+
25
+ The rule lists the sections and no count. That is deliberate: the structure
26
+ carries the enumeration, so there is no "write N hypotheses" instruction to
27
+ follow — a run records what the work actually surfaced, and an empty section is
28
+ a fact about the work rather than a gap in the notes.
29
+
30
+ `## Predictions` carries **chosen form** · prediction · confidence · result ·
31
+ lesson — the calibration loop: hypothesis → prediction → reality →
32
+ calibration. The form is named first because a prediction with no subject
33
+ cannot be contradicted: when the observation comes back, "the prediction
34
+ missed" has to point at *what* it was a prediction about, or nothing reopens.
35
+
36
+ `## Decisions` escalates to
37
+ [`decision-record`](../../skills/decision-record/SKILL.md)/ADR when the
38
+ decision is cross-task or architectural — litmus: would a dev on a different
39
+ component next month need this context? And `next-commitment` is the boundary
40
+ this choice authorises work up to, not the plan for it: choosing a form is not
41
+ permission to execute a twelve-step plan on it without re-reading the position.
42
+
43
+ ### The horizon — which boundaries count
44
+
45
+ The boundary is the nearest of these that the plan actually reaches: a **test
46
+ result** · a **type or schema inspection** · a **compile** · a **runtime probe**
47
+ · a **call-site inventory** · a **dry run** · a **browser observation** · a
48
+ **dependency-contract read**. The set is enumerable, which is the whole point —
49
+ "the work up to the nearest of those" is decidable from the plan, and `next
50
+ justified commitment` as prose degrades to *"implement solution"*, which is the
51
+ starting point wearing a label.
52
+
53
+ ### Width scales with reversibility, never with task size
54
+
55
+ | The action is… | The horizon runs to… |
56
+ |---|---|
57
+ | a reversible local edit | a whole implementation slice — stopping at the first boundary costs more than it saves |
58
+ | stateful or cross-layer | the next boundary from the list above |
59
+ | irreversible or a public contract | **before** the irreversible step, unless direct evidence already covers it |
60
+
61
+ ### The look-ahead ladder is a CEILING, never a quota
62
+
63
+ Three to five moves is the *maximum*, and only for a forcing, irreversible or
64
+ externally observable line. Stateful or cross-layer gets two to three. A quiet
65
+ reversible line gets **one, deliberately** — and no artifact anywhere requires a
66
+ minimum depth. Always-three-to-five across all variants is 1024 leaves at four
67
+ branches and depth five, which buys nothing and costs the run its budget.
68
+
69
+ ### Reopening — the two consequences
70
+
71
+ A reopen driven by ritual rather than by contradicting evidence is ceremony, and
72
+ an uncapped reopen is a loop with better manners. Two consequences:
73
+
74
+ - **A rejection whose premise is falsified is not a rejection.** A candidate
75
+ killed by an assumption that later turns out false is *un-evaluated*, not
76
+ dead — it returns to the set. That is what makes a stated `killed-if`
77
+ condition worth carrying: without it, "we ruled that out" is unfalsifiable.
78
+ - **The first failure reads the candidate list before the retry**, where one
79
+ exists — see [`autonomy-mechanics`](../../contexts/execution/autonomy-mechanics.md)
80
+ § Retry-budget escalation ladder. Where none exists the ladder is unchanged.
81
+ This adds a branch; it does not move the N=3 budget.
82
+
83
+ ## See also
84
+
85
+ - [`notes-first-reasoning`](../../rules/notes-first-reasoning.md) — the
86
+ rule this material was paid for in, and which keeps both Iron Laws.
87
+ - [`rdp-gate`](../../contexts/execution/rdp-gate.md) — the
88
+ engagement gate that decides whether the notes discipline runs at all.
89
+ - [`decision-record`](../../skills/decision-record/SKILL.md) — where a
90
+ cross-task or architectural decision escalates to.