@event4u/agent-config 8.13.0 → 9.1.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 (316) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +183 -0
  3. package/MIGRATION.md +14 -0
  4. package/README.md +2 -2
  5. package/dist/agent-src/commands/agent-handoff.md +35 -0
  6. package/dist/agent-src/commands/agents/init.md +1 -0
  7. package/dist/agent-src/commands/agents/optimize.md +1 -0
  8. package/dist/agent-src/commands/agents/user/accept.md +3 -2
  9. package/dist/agent-src/commands/agents/user/init.md +5 -4
  10. package/dist/agent-src/commands/agents/user/update.md +3 -2
  11. package/dist/agent-src/commands/agents/user.md +1 -0
  12. package/dist/agent-src/commands/agents.md +1 -0
  13. package/dist/agent-src/commands/analytics/show.md +1 -0
  14. package/dist/agent-src/commands/analytics.md +1 -0
  15. package/dist/agent-src/commands/analyze/decision.md +1 -0
  16. package/dist/agent-src/commands/analyze/incident.md +1 -0
  17. package/dist/agent-src/commands/analyze/near-miss.md +1 -0
  18. package/dist/agent-src/commands/analyze/postmortem.md +1 -0
  19. package/dist/agent-src/commands/analyze/premortem.md +1 -0
  20. package/dist/agent-src/commands/analyze/reference-repo.md +1 -0
  21. package/dist/agent-src/commands/analyze.md +3 -2
  22. package/dist/agent-src/commands/brand/identity.md +6 -5
  23. package/dist/agent-src/commands/brand/review.md +6 -5
  24. package/dist/agent-src/commands/brand/strategy.md +6 -4
  25. package/dist/agent-src/commands/brand/tokens.md +7 -6
  26. package/dist/agent-src/commands/brand/voice.md +5 -4
  27. package/dist/agent-src/commands/brand.md +9 -7
  28. package/dist/agent-src/commands/bug/fix.md +1 -0
  29. package/dist/agent-src/commands/bug/investigate.md +1 -0
  30. package/dist/agent-src/commands/bug.md +2 -1
  31. package/dist/agent-src/commands/challenge-me/vision.md +1 -0
  32. package/dist/agent-src/commands/challenge-me/with-docs.md +1 -0
  33. package/dist/agent-src/commands/challenge-me.md +28 -6
  34. package/dist/agent-src/commands/chat-history.md +1 -0
  35. package/dist/agent-src/commands/check-current-md.md +1 -0
  36. package/dist/agent-src/commands/commit.md +1 -0
  37. package/dist/agent-src/commands/context/create.md +3 -2
  38. package/dist/agent-src/commands/context.md +1 -0
  39. package/dist/agent-src/commands/cost/profile.md +1 -0
  40. package/dist/agent-src/commands/cost.md +2 -1
  41. package/dist/agent-src/commands/council/analysis.md +1 -0
  42. package/dist/agent-src/commands/council/debate.md +1 -0
  43. package/dist/agent-src/commands/council/default.md +21 -20
  44. package/dist/agent-src/commands/council/design.md +1 -0
  45. package/dist/agent-src/commands/council/optimize.md +1 -0
  46. package/dist/agent-src/commands/council/pr.md +1 -0
  47. package/dist/agent-src/commands/council.md +1 -0
  48. package/dist/agent-src/commands/estimate-ticket.md +1 -0
  49. package/dist/agent-src/commands/explain-run.md +88 -0
  50. package/dist/agent-src/commands/feature/dev.md +1 -0
  51. package/dist/agent-src/commands/feature/explore.md +1 -0
  52. package/dist/agent-src/commands/feature/plan.md +1 -0
  53. package/dist/agent-src/commands/feature/refactor.md +1 -0
  54. package/dist/agent-src/commands/feature/roadmap.md +1 -0
  55. package/dist/agent-src/commands/feature.md +2 -1
  56. package/dist/agent-src/commands/fix/pr-comments.md +19 -0
  57. package/dist/agent-src/commands/fix.md +2 -1
  58. package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
  59. package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
  60. package/dist/agent-src/commands/ghostwriter/show.md +1 -0
  61. package/dist/agent-src/commands/ghostwriter/write.md +1 -0
  62. package/dist/agent-src/commands/ghostwriter.md +1 -0
  63. package/dist/agent-src/commands/grill-me.md +17 -12
  64. package/dist/agent-src/commands/humanize.md +1 -0
  65. package/dist/agent-src/commands/image/analyse.md +2 -1
  66. package/dist/agent-src/commands/image/create.md +1 -0
  67. package/dist/agent-src/commands/image/verify.md +1 -0
  68. package/dist/agent-src/commands/image.md +16 -12
  69. package/dist/agent-src/commands/implement-ticket.md +1 -0
  70. package/dist/agent-src/commands/judge/on-diff.md +1 -0
  71. package/dist/agent-src/commands/judge/solo.md +1 -0
  72. package/dist/agent-src/commands/judge/steps.md +1 -0
  73. package/dist/agent-src/commands/judge.md +1 -0
  74. package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
  75. package/dist/agent-src/commands/knowledge/forget.md +1 -0
  76. package/dist/agent-src/commands/knowledge/ingest.md +1 -0
  77. package/dist/agent-src/commands/knowledge/list.md +10 -0
  78. package/dist/agent-src/commands/knowledge.md +1 -0
  79. package/dist/agent-src/commands/memory/learn-low-impact.md +1 -0
  80. package/dist/agent-src/commands/memory/mine-session.md +1 -0
  81. package/dist/agent-src/commands/memory/promote.md +3 -2
  82. package/dist/agent-src/commands/memory.md +1 -0
  83. package/dist/agent-src/commands/mission/upgrade.md +45 -24
  84. package/dist/agent-src/commands/mode.md +1 -0
  85. package/dist/agent-src/commands/module/create.md +1 -0
  86. package/dist/agent-src/commands/module/explore.md +1 -0
  87. package/dist/agent-src/commands/module.md +1 -0
  88. package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
  89. package/dist/agent-src/commands/optimize/project.md +1 -0
  90. package/dist/agent-src/commands/optimize/prompt.md +1 -0
  91. package/dist/agent-src/commands/optimize.md +2 -1
  92. package/dist/agent-src/commands/orchestrate.md +1 -0
  93. package/dist/agent-src/commands/override.md +1 -0
  94. package/dist/agent-src/commands/package.md +2 -1
  95. package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
  96. package/dist/agent-src/commands/post-as/me.md +1 -0
  97. package/dist/agent-src/commands/post-as.md +1 -0
  98. package/dist/agent-src/commands/pr/create/description-only.md +139 -8
  99. package/dist/agent-src/commands/pr/create.md +35 -22
  100. package/dist/agent-src/commands/prediction-pool.md +7 -6
  101. package/dist/agent-src/commands/prepare-for-review.md +1 -0
  102. package/dist/agent-src/commands/profile/activate.md +1 -0
  103. package/dist/agent-src/commands/profile/deactivate.md +1 -0
  104. package/dist/agent-src/commands/profile.md +1 -0
  105. package/dist/agent-src/commands/project.md +2 -1
  106. package/dist/agent-src/commands/refine-ticket.md +7 -0
  107. package/dist/agent-src/commands/research/deep.md +1 -0
  108. package/dist/agent-src/commands/research.md +1 -0
  109. package/dist/agent-src/commands/review/routing.md +1 -0
  110. package/dist/agent-src/commands/review.md +2 -1
  111. package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
  112. package/dist/agent-src/commands/roadmap/materialize.md +1 -0
  113. package/dist/agent-src/commands/roadmap/process-full.md +1 -0
  114. package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
  115. package/dist/agent-src/commands/roadmap/process-step.md +1 -0
  116. package/dist/agent-src/commands/roadmap.md +1 -0
  117. package/dist/agent-src/commands/security-audit-config.md +2 -1
  118. package/dist/agent-src/commands/skill/preview.md +1 -0
  119. package/dist/agent-src/commands/skill.md +1 -0
  120. package/dist/agent-src/commands/skills/discover.md +1 -0
  121. package/dist/agent-src/commands/skills.md +1 -0
  122. package/dist/agent-src/commands/sync/agent-settings.md +1 -0
  123. package/dist/agent-src/commands/sync.md +2 -1
  124. package/dist/agent-src/commands/team/adversarial.md +3 -2
  125. package/dist/agent-src/commands/team/delegate.md +3 -2
  126. package/dist/agent-src/commands/team/review.md +3 -2
  127. package/dist/agent-src/commands/team/status.md +49 -18
  128. package/dist/agent-src/commands/team-knowledge.md +8 -6
  129. package/dist/agent-src/commands/team.md +21 -16
  130. package/dist/agent-src/commands/tests/e2e-heal.md +1 -0
  131. package/dist/agent-src/commands/tests/e2e-plan.md +1 -0
  132. package/dist/agent-src/commands/tests/execute.md +1 -0
  133. package/dist/agent-src/commands/tests.md +2 -1
  134. package/dist/agent-src/commands/update-form-request-messages.md +1 -0
  135. package/dist/agent-src/commands/upstream-contribute.md +1 -0
  136. package/dist/agent-src/commands/video/from-script.md +3 -2
  137. package/dist/agent-src/commands/video/from-song.md +22 -21
  138. package/dist/agent-src/commands/video/scene.md +1 -0
  139. package/dist/agent-src/commands/video/stitch.md +2 -1
  140. package/dist/agent-src/commands/video/storyboard.md +1 -0
  141. package/dist/agent-src/commands/video.md +1 -0
  142. package/dist/agent-src/commands/work.md +1 -0
  143. package/dist/agent-src/commands/worktree/cleanup.md +8 -7
  144. package/dist/agent-src/commands/worktree/create.md +1 -0
  145. package/dist/agent-src/commands/worktree/verify.md +1 -0
  146. package/dist/agent-src/commands/worktree.md +1 -0
  147. package/dist/agent-src/rules/active-remediation.md +12 -36
  148. package/dist/agent-src/rules/artifact-drafting-protocol.md +7 -64
  149. package/dist/agent-src/rules/context-hygiene.md +19 -113
  150. package/dist/agent-src/rules/design-fidelity.md +4 -60
  151. package/dist/agent-src/rules/domain-adoption-policy.md +10 -106
  152. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +12 -60
  153. package/dist/agent-src/rules/improve-before-implement.md +4 -0
  154. package/dist/agent-src/rules/minimal-safe-diff.md +6 -86
  155. package/dist/agent-src/rules/size-enforcement.md +10 -0
  156. package/dist/agent-src/rules/tool-safety.md +17 -3
  157. package/dist/agent-src/skills/agent-security-review/SKILL.md +12 -1
  158. package/dist/agent-src/skills/ai-council/SKILL.md +11 -0
  159. package/dist/agent-src/skills/bug-analyzer/SKILL.md +24 -2
  160. package/dist/agent-src/skills/code-review/SKILL.md +105 -93
  161. package/dist/agent-src/skills/code-review/checklists/backend.md +50 -0
  162. package/dist/agent-src/skills/code-review/checklists/database.md +19 -0
  163. package/dist/agent-src/skills/code-review/checklists/dependency.md +18 -0
  164. package/dist/agent-src/skills/code-review/checklists/docs.md +14 -0
  165. package/dist/agent-src/skills/code-review/checklists/frontend.md +19 -0
  166. package/dist/agent-src/skills/code-review/checklists/infra.md +17 -0
  167. package/dist/agent-src/skills/code-review/checklists/producing-the-review.md +62 -0
  168. package/dist/agent-src/skills/code-review/checklists/test-only.md +13 -0
  169. package/dist/agent-src/skills/code-review/evals/evals.json +53 -15
  170. package/dist/agent-src/skills/condense-memory/SKILL.md +3 -2
  171. package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +15 -0
  172. package/dist/agent-src/skills/docker/SKILL.md +10 -0
  173. package/dist/agent-src/skills/docx-authoring/SKILL.md +102 -0
  174. package/dist/agent-src/skills/github-ci/evals/evals.json +25 -0
  175. package/dist/agent-src/skills/humanizer/SKILL.md +79 -3
  176. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +112 -0
  177. package/dist/agent-src/skills/humanizer/references/fixtures.md +70 -0
  178. package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +7 -1
  179. package/dist/agent-src/skills/laravel/SKILL.md +10 -0
  180. package/dist/agent-src/skills/launch-readiness/SKILL.md +35 -0
  181. package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +146 -0
  182. package/dist/agent-src/skills/llm-provider-knowledge/evals/triggers.json +20 -0
  183. package/dist/agent-src/skills/merge-conflicts/SKILL.md +30 -0
  184. package/dist/agent-src/skills/pdf-tools/SKILL.md +101 -0
  185. package/dist/agent-src/skills/quality-tools/evals/evals.json +15 -0
  186. package/dist/agent-src/skills/security-audit/SKILL.md +29 -0
  187. package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +90 -0
  188. package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +52 -0
  189. package/dist/agent-src/skills/skill-writing/SKILL.md +79 -0
  190. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +11 -3
  191. package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +11 -0
  192. package/dist/agent-src/skills/subagent-orchestration/schemas/team-review-status.json +103 -0
  193. package/dist/agent-src/skills/terraform/SKILL.md +10 -0
  194. package/dist/agent-src/skills/test-driven-development/SKILL.md +31 -0
  195. package/dist/agent-src/skills/threat-modeling/SKILL.md +15 -0
  196. package/dist/agent-src/skills/token-optimizer/SKILL.md +10 -4
  197. package/dist/agent-src/templates/agent-settings.md +28 -0
  198. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  199. package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  200. package/dist/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  201. package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  202. package/dist/agent-src/templates/scripts/telemetry_record.ts +5 -0
  203. package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
  204. package/dist/discovery/deprecation-report.md +1 -1
  205. package/dist/discovery/discovery-manifest.json +314 -194
  206. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  207. package/dist/discovery/discovery-manifest.summary.md +5 -5
  208. package/dist/discovery/orphan-report.md +1 -1
  209. package/dist/discovery/packs.json +23 -18
  210. package/dist/discovery/trust-report.md +8 -8
  211. package/dist/discovery/workspaces.json +18 -13
  212. package/dist/install/install.mjs +48 -33
  213. package/dist/mcp/registry-manifest.json +3 -3
  214. package/dist/router.json +1 -1
  215. package/dist/scripts/_lib/agent_settings.js +4 -1
  216. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  217. package/dist/scripts/condense.js +5 -0
  218. package/dist/scripts/condense.js.map +1 -1
  219. package/dist/server/schemas/settings.js +10 -1
  220. package/dist/server/schemas/settings.js.map +1 -1
  221. package/docs/CLAIMS.md +9 -2
  222. package/docs/MIGRATION.md +20 -0
  223. package/docs/SKILL_CENSUS.md +8 -0
  224. package/docs/architecture.md +3 -3
  225. package/docs/benchmark.md +67 -2
  226. package/docs/catalog.md +2 -2
  227. package/docs/command-flows.md +1 -1
  228. package/docs/contracts/agents-layout.md +1 -1
  229. package/docs/contracts/ai-council-config.md +9 -2
  230. package/docs/contracts/ai-team-config.md +37 -4
  231. package/docs/contracts/consumer-bridge.md +55 -63
  232. package/docs/contracts/install-layout.md +1 -1
  233. package/docs/contracts/migrate-command.md +1 -1
  234. package/docs/contracts/prelaunch-diagnostics.md +151 -0
  235. package/docs/contracts/release-pr-gating.md +1 -0
  236. package/docs/customization.md +22 -1
  237. package/docs/decisions/ADR-020-global-only-consumer-scope.md +34 -0
  238. package/docs/decisions/ADR-049-configuration-trust-boundary.md +9 -1
  239. package/docs/featured-skills.md +2 -2
  240. package/docs/getting-started-by-role.md +1 -1
  241. package/docs/getting-started.md +17 -6
  242. package/docs/governance-advantage.md +1 -1
  243. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +45 -0
  244. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +28 -0
  245. package/docs/guidelines/agent-infra/api-cost-levers.md +126 -0
  246. package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +76 -0
  247. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +90 -0
  248. package/docs/guidelines/agent-infra/domain-adoption-gates.md +112 -0
  249. package/docs/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
  250. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +99 -0
  251. package/docs/guidelines/agent-infra/skill-quality-checklist.md +13 -0
  252. package/docs/guidelines/design-fidelity-mechanics.md +76 -0
  253. package/docs/installation.md +2 -1
  254. package/docs/maintainers/dev-mode.md +3 -2
  255. package/docs/parity/command-frontmatter.md +60 -0
  256. package/docs/proof.md +7 -6
  257. package/package.json +1 -1
  258. package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  259. package/src/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  260. package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  261. package/src/agent-src/templates/scripts/telemetry_record.ts +5 -0
  262. package/src/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
  263. package/src/config/agent-settings.template.yml +73 -10
  264. package/src/config/gitignore-block.txt +16 -6
  265. package/src/config/prelaunch-areas.yml +36 -0
  266. package/src/scripts/_cli/cmd_conformance.ts +2 -2
  267. package/src/scripts/_cli/cmd_doctor.ts +280 -39
  268. package/src/scripts/_cli/cmd_refresh.ts +35 -118
  269. package/src/scripts/_lib/agent_settings.ts +4 -1
  270. package/src/scripts/_lib/claude_plugin.ts +77 -2
  271. package/src/scripts/_lib/orchestration_record.ts +5 -0
  272. package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
  273. package/src/scripts/ai_council/clients.ts +68 -6
  274. package/src/scripts/ai_council/pricing.ts +62 -0
  275. package/src/scripts/ai_team/config.ts +73 -1
  276. package/src/scripts/ai_team/review_gate.ts +636 -0
  277. package/src/scripts/ai_team/team_dispatch.ts +612 -0
  278. package/src/scripts/bench_ab_task_runner.ts +11 -1
  279. package/src/scripts/bench_parity_count.ts +279 -0
  280. package/src/scripts/build_linear_digest.ts +3 -1
  281. package/src/scripts/check_bridge_derivation.ts +172 -0
  282. package/src/scripts/check_consumer_scope_flip.ts +179 -0
  283. package/src/scripts/check_council_config_location.ts +115 -15
  284. package/src/scripts/check_host_loadability.ts +81 -0
  285. package/src/scripts/condense.ts +5 -0
  286. package/src/scripts/council_cli.ts +19 -3
  287. package/src/scripts/hook_manifest.yaml +12 -1
  288. package/src/scripts/install.ts +44 -45
  289. package/src/scripts/lint_agents_layout.ts +10 -4
  290. package/src/scripts/lint_breaking_changes_index.ts +303 -0
  291. package/src/scripts/lint_handoffs.ts +42 -0
  292. package/src/scripts/lint_skill_descriptions.ts +228 -0
  293. package/src/scripts/lint_skill_descriptions_allowlist.json +1 -0
  294. package/src/scripts/lint_skill_scripts_readonly.ts +145 -0
  295. package/src/scripts/lint_skill_scripts_readonly_allowlist.json +8 -0
  296. package/src/scripts/lint_supported_tools_matrix.ts +35 -0
  297. package/src/scripts/mcp_server/tools.ts +1 -3
  298. package/src/scripts/optimize_skill_description.ts +144 -0
  299. package/src/scripts/orchestration_record.ts +2 -1
  300. package/src/scripts/prelaunch_diagnostics.ts +248 -0
  301. package/src/scripts/run_skill_evals.ts +70 -4
  302. package/src/scripts/schemas/agent-settings.schema.json +17 -0
  303. package/src/scripts/schemas/command.schema.json +7 -0
  304. package/src/scripts/schemas/evals.schema.json +105 -14
  305. package/src/scripts/schemas/prelaunch-report.schema.json +107 -0
  306. package/src/scripts/schemas/skill.schema.json +18 -1
  307. package/src/scripts/schemas/subagent.schema.json +6 -0
  308. package/src/scripts/self_review_gate.test.ts +11 -0
  309. package/src/scripts/self_review_gate.ts +7 -1
  310. package/src/scripts/skill_eval_coverage.ts +4 -1
  311. package/src/scripts/skill_linter.ts +43 -3
  312. package/src/scripts/smoke_host_loadability.sh +73 -0
  313. package/src/scripts/team_review_gate_hook.ts +115 -0
  314. package/src/scripts/trigger_eval_grandfather.json +1 -2
  315. package/src/scripts/utilization_report.ts +225 -0
  316. package/src/server/schemas/settings.ts +24 -1
@@ -14,6 +14,8 @@ triggers:
14
14
  - phrase: "new guideline"
15
15
  - phrase: "neue Regel"
16
16
  - phrase: "bau mir ein Skill"
17
+ routes_to:
18
+ - "guideline:agent-infra/artifact-drafting-protocol-mechanics"
17
19
  workspaces: [agent-config-maintainer, engineering]
18
20
  packs: [meta]
19
21
  ---
@@ -42,71 +44,9 @@ rewrites with a specific target phrasing, < 10-line edits, or explicit
42
44
  bypass (*"just write it"*, *"skip protocol"*, *"einfach machen"*).
43
45
  Fires once per creation task, not once per edit.
44
46
 
45
- ## Phase A — Understand
47
+ ## The three phases
46
48
 
47
- Ask up to **5** clarifying questions (numbered options, each with a
48
- *"skip / I don't know yet"* escape):
49
-
50
- 1. **Problem** — what does this solve that no existing artifact solves?
51
- 2. **Trigger surface** — which user phrasings should fire this?
52
- 3. **Should-trigger examples** — 2-3 in the user's words.
53
- 4. **Near-miss cases** — 2-3 phrasings that must **not** fire.
54
- 5. **Artifact type** — skill, rule, command, or guideline? Offer a
55
- 3-line primer if unsure.
56
-
57
- If the user skips Q1 or Q5, stop and surface the ambiguity — don't guess.
58
-
59
- ## Phase B — Research
60
-
61
- Run the **search protocol** from
62
- [`learning-to-rule-or-skill` § 4](../skills/learning-to-rule-or-skill/SKILL.md#4-check-for-overlap--search-protocol-mandatory)
63
- — `ls` all four surfaces (`skills/`, `rules/`, `guidelines/`, `commands/`),
64
- grep with **solution-words AND problem-words**, scan sub-directory
65
- taxonomies, then **open and skim** the 3 nearest matches. A negative grep
66
- alone is not proof of no overlap. Report the top 3-5 most-similar
67
- artifacts and ask (numbered options):
68
-
69
- - Extend an existing one?
70
- - Create a new one — gap is real?
71
- - Show overlap first?
72
- - Promote via `learning-to-rule-or-skill` instead?
73
-
74
- Carry the summary into the commit message (*"Reviewed before drafting:
75
- X, Y"*).
76
-
77
- ## Phase C — Draft
78
-
79
- Propose **2-3 description variants** — Conservative / Pushy
80
- (per `skill-quality`) / Concrete (embedded trigger example). User picks
81
- or merges. Only then draft the body. Surface every structural choice
82
- (size class, section order) as numbered options if in doubt.
83
-
84
- Enforce size live: *"Body is at 420/500 lines. Split?"* (budgets per
85
- `size-enforcement`). New skills also get an `evals/triggers.json` stub
86
- (5 should-trigger + 5 should-not-trigger). See `skill-writing` § 1c.
87
-
88
- ## Roadmap-run batch mode — the ONE structured bypass
89
-
90
- When a `/roadmap:process-*` run starts under an **accepted execution
91
- contract** ([`roadmap-execution-contract`](../contexts/execution/roadmap-execution-contract.md))
92
- whose pre-scan detected artifact-authoring steps, the protocol runs in
93
- batch mode for exactly those artifacts:
94
-
95
- - **Phase B (Research) runs ONCE at contract time, against the CURRENT
96
- artifact state** — one overlap scan covering every artifact the
97
- roadmap plans; results (nearest matches, extend-vs-create verdicts)
98
- are surfaced inside the contract summary the user accepts. This is
99
- why authoring-time-only checking is not enough: a sibling roadmap may
100
- have landed overlapping artifacts between authoring and execution.
101
- - **Phases A (Understand) and C (Draft) run non-interactively during
102
- the run** — the roadmap step text is the Understand input; the
103
- contract acceptance is the approval that the per-phase prompts exist
104
- to obtain.
105
- - **Scope is the batch, nothing more.** An artifact NOT declared in the
106
- roadmap (discovered mid-run) triggers the full interactive protocol —
107
- or, under the contract, the scope-out-of-roadmap halt.
108
- - Batch mode never skips the Research pass itself — it relocates and
109
- batches it. `artifact_protocol: skip` does not exist.
49
+ **A — Understand** (≤ 5 clarifying questions: problem, trigger surface, should-trigger examples, near-misses, artifact type) · **B — Research** (mandatory four-surface overlap scan; open + skim the 3 nearest matches; extend-vs-create decision) · **C — Draft** (2-3 description variants first, then the body; live size enforcement). Per-phase procedure + the roadmap batch-mode carve-out: the mechanics guideline below.
110
50
 
111
51
  ## Golden rules
112
52
 
@@ -118,5 +58,8 @@ batch mode for exactly those artifacts:
118
58
  - Commit only on approval.
119
59
  - Bypass is legitimate — *"just write it"* drops the protocol immediately.
120
60
 
61
+ Body migrated to [`guideline:agent-infra/artifact-drafting-protocol-mechanics`](../docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — Phase A/B/C procedure detail + the roadmap-run batch-mode carve-out (Research-once-at-contract-time, batch scope, no `artifact_protocol: skip`).
62
+ Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
63
+
121
64
  Extends (cross-link, don't restate): `ask-when-uncertain`,
122
65
  `improve-before-implement`, `user-interaction`, `skill-quality`.
@@ -8,6 +8,8 @@ triggers:
8
8
  - intent: "tool loop"
9
9
  - intent: "fresh chat"
10
10
  - keyword: "3-failure"
11
+ routes_to:
12
+ - "guideline:agent-infra/context-hygiene-mechanics"
11
13
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
12
14
  packs: [meta]
13
15
  ---
@@ -24,31 +26,13 @@ packs: [meta]
24
26
 
25
27
  Monitor for **context decay** — long conversations degrade quality and waste tokens.
26
28
 
27
- **Suggest a new chat when:**
28
-
29
- - Conversation exceeds **~20 user messages**
30
- - Topic **changes completely**
31
- - Re-reading files already in context
32
- - **15+ completed tasks** and new unrelated topic
33
- - Branch changed since start
34
- - ~24 hours passed
29
+ **Suggest a new chat when:** ~20+ user messages · complete topic change ·
30
+ re-reading files already in context · 15+ completed tasks and a new unrelated
31
+ topic · branch changed since start · ~24 hours passed.
35
32
 
36
33
  **Repeat** at multiples: messages 20/40/60, tasks 15/30/45.
37
- **ONLY at exact thresholds.** Between: silence.
38
-
39
- **How to suggest:**
40
-
41
- Estimate token cost: responses × ~1,500 tokens.
42
-
43
- ```
44
- > ⚡ This conversation has ~{N} messages (~{N×1500} tokens history cost — charged on EVERY request).
45
- > A fresh chat saves ~{N×1500} input tokens per request.
46
- >
47
- > 1. Start fresh — I'll initiate a session handoff
48
- > 2. Continue here
49
- ```
50
-
51
- **If the user picks 1:** Initiate a session handoff or start fresh.
34
+ **ONLY at exact thresholds.** Between: silence. Suggestion template
35
+ (token-cost estimate + numbered options): the mechanics guideline below.
52
36
 
53
37
  ## The 3-Failure Rule
54
38
 
@@ -58,40 +42,20 @@ When **3 consecutive attempts** at the same task fail (code fix, test fix, confi
58
42
  2. **State dump** — summarize what was tried, what failed, and what you know so far.
59
43
  3. **Recommend fresh start** — suggest a fresh session with the state dump as context, or ask for a different approach.
60
44
 
61
- **What counts as a failure:**
62
-
63
- - Code change that doesn't fix the problem
64
- - Test that still fails after the fix
65
- - Quality check (type-checker, linter, formatter) that still errors
66
- - Build/deploy that fails after config change
67
-
68
- **Does NOT reset the counter:** Unrelated tasks. User providing new information (course correction).
45
+ **What counts as a failure:** a change that doesn't fix the problem · a test still failing after the fix · a quality check still erroring · a build/deploy failing after a config change. **Does NOT reset the counter:** unrelated tasks; the user providing new information (course correction).
69
46
 
70
47
  **Failure identity — same error vs new error.** Failure signature = **same target + same error class** (same failing test + same assertion/exception, same lint rule id, same build error).
71
48
 
72
49
  - **Same failure signature twice → stop and pivot now.** Don't burn the third attempt on a near-identical retry of a fix that already failed the same way — a repeated identical signature means the hypothesis is wrong, not under-applied. Change strategy (re-read source, new hypothesis, ask).
73
50
  - **New error signature each attempt = progress.** Peeling one error to reveal a different one is forward motion; counter continues — learning, not looping.
74
51
 
75
- **Hard-blocker classes — skip retries, go straight to ask/surface.** On the **first** occurrence, do not count toward the 3 — stop and surface:
76
-
77
- - Missing credentials / unset required secret or token.
78
- - Permission denied (auth/authz, file mode, protected branch, scope).
79
- - Spend / quota / rate limit reached (billing cap, API quota, 429 that won't self-clear).
80
- - External-service `5xx` / outage / DNS-unreachable — a dependency is down, not your code.
81
-
82
- Retrying a hard-blocker is the canonical wasted-attempt; the fix is a decision or external change only the user/environment can make.
52
+ **Hard-blocker classes — skip retries, go straight to ask/surface.** On the **first** occurrence, do not count toward the 3 — stop and surface: missing credentials / unset secret · permission denied · spend / quota / rate limit reached · external-service 5xx / outage. Retrying a hard-blocker is the canonical wasted attempt; the fix is a decision or external change only the user/environment can make.
83
53
 
84
54
  ## Tool Loop Detection
85
55
 
86
56
  Calling the **same tool** more than **2 times in a row** with similar parameters = loop.
87
-
88
- **Immediate action:**
89
- 1. **STOP** all tool calls.
90
- 2. **Do the task directly** — write the code, run the command, answer the question.
91
- 3. If you can't proceed — ask the user for help.
92
-
93
- `sequentialthinking` is especially prone to loops. Use at most **once** per task,
94
- NEVER for simple file operations, command execution, or straightforward edits.
57
+ **Immediate action:** 1. STOP all tool calls. 2. Do the task directly. 3. Can't proceed → ask the user.
58
+ `sequentialthinking` is especially prone to loops: at most **once** per task, NEVER for simple file operations, command execution, or straightforward edits.
95
59
 
96
60
  ## Read-Loop Detection — the 15 / 25 rule
97
61
 
@@ -101,74 +65,16 @@ EVERY TURN MUST EDIT, RUN, OR ASK.
101
65
  ```
102
66
 
103
67
  **Read-only turn:** only `view` / `codebase-retrieval` / `grep` /
104
- `git log` / `git show`. No `str-replace-editor`, `save-file`, no
105
- test/build/quality run, no `git commit`.
106
-
107
- **15-min warning (3 read-only turns in a row) — change approach.**
108
- Next turn MUST contain at least one of: an edit, a test/build/quality
109
- command, or an explicit user question. Self-check:
110
-
111
- 1. Source expectation known? If no → read **once**, then act.
112
- 2. Can a single failing test name the error? If yes → run it now.
113
- 3. Regression in working code? → `git log` + `git show <sha> -- <file>`.
114
- 4. Guessing at mock / payload shape? → read the producer **once**.
115
-
116
- **25-min abort (5 read-only turns) — STOP and ask:**
68
+ `git log` / `git show`. No edit/save, no test/build/quality run, no `git commit`.
117
69
 
118
- ```
119
- > ⛔ Loop: N read-only turns, ~M min. Read: <files>. Hypothesis: <X>.
120
- > 1. Different approach (suggestion: <Y>)
121
- > 2. Point me at the right spot
122
- > 3. Fresh chat with state dump
123
- ```
124
-
125
- Non-bypassable. Autonomous mandate (`/work`, `/roadmap:process-*`,
126
- "entscheide selbst") does **not** lift the abort — it is the safety
127
- net that protects autonomy from becoming a token sink.
128
-
129
- Debug procedure for "I'm in a read loop fixing tests" →
130
- [`systematic-debugging § Debug micro-loop`](../skills/systematic-debugging/SKILL.md#debug-micro-loop--one-test-one-fix-one-re-run).
131
-
132
- ## State dump format
133
-
134
- ```
135
- ## State Dump: [Task]
136
- ### Tried: 1. [Approach] → [Why failed] 2. ... 3. ...
137
- ### Known: [Key facts]
138
- ### Hypothesis: [Best guess for root cause]
139
- ### Recommendation: [Next approach for fresh session]
140
- ```
70
+ **15-min warning (3 read-only turns in a row) — change approach.** The next turn MUST contain at least one of: an edit, a test/build/quality command, or an explicit user question (self-check in the mechanics guideline).
141
71
 
142
- Use `/agent-handoff` to generate a context summary for a fresh conversation.
72
+ **25-min abort (5 read-only turns) — STOP and ask** with the abort block (template in the mechanics guideline). Non-bypassable: an autonomous mandate does **not** lift the abort — it is the safety net that protects autonomy from becoming a token sink.
143
73
 
144
- ## Augment-specific: Ignored Skills Recovery
74
+ Body migrated to [`guideline:agent-infra/context-hygiene-mechanics`](../docs/guidelines/agent-infra/context-hygiene-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — the freshness-suggestion template, the read-loop self-check + abort block, the state-dump format + `/agent-handoff` pointer, the Augment ignored-skills recovery flow, and the Copilot no-hook fallback (manual `context_hygiene_hook` refresh).
75
+ Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
145
76
 
146
- Skills excluded via `.augmentignore` don't appear in `<available_skills>`.
147
- If you need an ignored skill: read its SKILL.md directly, apply guidance, then ask:
148
-
149
- ```
150
- > 💡 I loaded `{name}` manually — currently ignored in `.augmentignore`.
151
- > 1. Remove from ignore — relevant for this project
152
- > 2. Keep ignored — one-off
153
- ```
154
-
155
- ## Copilot fallback
156
-
157
- GitHub Copilot has no `PostToolUse` hook surface, so
158
- `scripts/context_hygiene_hook.ts` cannot run structurally and
159
- `agents/runtime/state/context-hygiene.json` is not maintained automatically
160
- (turn count, loop signal, freshness milestones at 20/40/60).
161
-
162
- The cooperative path: track turns and tool-loop signals from memory
163
- during the conversation and apply the suggest-a-new-chat / 3-failure
164
- stop / loop-detection rules above. To refresh the state file
165
- manually so the dashboard or another tool can read the latest
166
- counters, run:
167
-
168
- ```bash
169
- ./scripts-run src/scripts/context_hygiene_hook < /dev/null
170
- ```
77
+ ## See also
171
78
 
172
- The script reads from stdin if a JSON envelope is provided and
173
- otherwise writes a no-op snapshot under the shared dispatcher lock.
174
- Exit code is always 0 — hooks must never block the agent loop.
79
+ - [`guideline:agent-infra/context-hygiene-mechanics`](../docs/guidelines/agent-infra/context-hygiene-mechanics.md) — templates + per-host procedures.
80
+ - [`systematic-debugging § Debug micro-loop`](../skills/systematic-debugging/SKILL.md) — the read-loop debug procedure.
@@ -17,6 +17,8 @@ applies_to_user_types:
17
17
  - "creator"
18
18
  - "developer"
19
19
  - "maintainer"
20
+ routes_to:
21
+ - "guideline:design-fidelity-mechanics"
20
22
  workspaces: [engineering]
21
23
  packs: [frontend-design]
22
24
  ---
@@ -71,66 +73,8 @@ porting, or modifying UI to match it.
71
73
  - The user explicitly invites exploration ("show me options", "redesign this", "improve the layout") — that authorises deviation for that turn.
72
74
  - Non-UI surfaces (scripts, CLI, backend).
73
75
 
74
- ## How to surface a deviation — do NOT execute it
75
-
76
- Name what the spec shows, what you would change, and why — as a numbered option
77
- per [`user-interaction`](user-interaction.md). The user picks. Honesty about
78
- **behaviour** (a control not yet wired) never licenses changing the **design**:
79
- a faithful visual plus a labelled "not wired yet" note beats an invented
80
- redesign.
81
-
82
- ## Failure modes
83
-
84
- - Swapping the prototype's font / typeface because another "reads better".
85
- - Replacing a specified control (slider, stepper, chip) with a different control.
86
- - Dropping or adding an element the prototype shows ("+", a send→stop toggle, a warning chip).
87
- - Restructuring layout or moving sections "because the flow is better".
88
- - Treating an internal "honesty gate" or "stub" concern as licence to redesign the UI.
89
- - Re-running a redesign after the user already said "match the prototype".
90
-
91
- ## Surgical visual edits
92
-
93
- A request to change one visual thing — a colour, a label, a single element — is
94
- a **targeted edit**, not a redesign licence. Apply the same
95
- [`minimal-safe-diff`](minimal-safe-diff.md) discipline to design work that
96
- backend edits have always owed.
97
-
98
- - **Change only the semantic target.** Preserve the surrounding layout,
99
- spacing, typography, dimensions, content, animation, and interaction states.
100
- Do not rewrite the component, reflow the section, or "modernise" neighbours
101
- while you are in there. (fixtures: `daf-edit-preservation`, `daf-unwanted-variations`.)
102
- - **A broader redesign needs an explicit trigger.** Only phrases like *"new
103
- direction"*, *"from scratch"*, *"make it feel premium"*, *"rework the flow"*,
104
- or *"give me variations / options"* license a from-scratch rework. Absent such
105
- a phrase, a "fix / change / update the X" request is surgical — when unsure
106
- which, ask ([`ask-when-uncertain`](ask-when-uncertain.md)). (fixture: `daf-redesign-trigger`.)
107
- - **Preserve stable anchors.** Where the host exposes DOM/comment metadata, keep
108
- comment anchors and screen labels intact so the edit stays locatable. Where
109
- the host has no such surface, preserve stable semantic anchors already present
110
- in source comments / `data-*` attributes — never strip them, and do not invent
111
- new ones.
112
-
113
- ## Asset & imagery discipline
114
-
115
- Visual artifacts carry **real assets or honest placeholders — never fabricated
116
- brand evidence**. The design-surface instance of the no-invented-facts floor.
117
-
118
- - **Copy owned assets through the project's accepted path.** Reference or copy
119
- project-owned assets (logos, icons, fonts, images) via the target project's
120
- asset directory/pipeline — never hotlink a design-system's internal URL, never
121
- bulk-copy a huge source folder. (fixtures: `daf-missing-asset`, `daf-external-asset-url`.)
122
- - **Real imagery where inspection matters.** On visual pages/decks, use actual
123
- product / place / object / state imagery where the image IS the proof (a
124
- product screenshot, a real dashboard state). Decorative atmosphere is not proof
125
- — never pass a stock-like or invented image off as the real product. An
126
- invented product screenshot is fabricated evidence. (fixture: `daf-invented-screenshot`.)
127
- - **Icons follow the iconography floor** — no emoji-as-icon in serious UI, no
128
- hand-rolled icon when a set exists; see
129
- [`iconography`](../skills/iconography/SKILL.md) § Iconography floor.
130
- - **Ask before adding material — no unrequested filler.** Never generate copy,
131
- placeholder sections, or decorative blocks the user did not ask for to "complete"
132
- a design. Brief silent on a region → surface the gap ([`ask-when-uncertain`](ask-when-uncertain.md))
133
- or leave an honest placeholder; never invent filler to fill space.
76
+ Body migrated to [`guideline:design-fidelity-mechanics`](../docs/guidelines/design-fidelity-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — surgical visual edits (targeted-edit vs redesign-trigger discipline, stable anchors), asset & imagery discipline (owned-asset path, real-imagery-as-proof, iconography floor, no unrequested filler), deviation-surfacing shape, failure-mode catalog, `daf-*` fixtures.
77
+ Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
134
78
 
135
79
  ## See also
136
80
 
@@ -15,6 +15,8 @@ validator_ignore:
15
15
  - type: "substring"
16
16
  pattern: ".agent-src.uncondensed/"
17
17
  reason: "Rule names the authoring tree as the gated-entry location for new domain plates."
18
+ routes_to:
19
+ - "guideline:agent-infra/domain-adoption-gates"
18
20
  workspaces: [agent-config-maintainer]
19
21
  packs: [meta]
20
22
  ---
@@ -40,116 +42,18 @@ ALL THREE PASS, OR THE ROADMAP MARKS THE DOMAIN GATED.
40
42
  ```
41
43
 
42
44
  The three gates fire before any skill, guideline, command, or rule from the
43
- domain enters `.agent-src.uncondensed/`. A council session may inform the
44
- decision but cannot replace the gate evidence.
45
+ domain enters `src/`. A council session may inform the decision but cannot
46
+ replace the gate evidence. Any gate not citeable → **defer** + a watch-only
47
+ note under `agents/settings/contexts/domain-watch/<domain>.md`; never silently
48
+ shrink scope to dodge a gate.
45
49
 
46
- ## Gate 1 — Demand signal
47
-
48
- At least one of the following must be **true and citeable** in the roadmap:
49
-
50
- - **≥ 2 consumer projects** in the domain. Cite repository names or
51
- `agents/settings/contexts/` notes — not "I think there might be".
52
- - **Named user direction with target.** A specific user ask plus a target
53
- project / use case — e.g. "harvest the mobile skills for project X, due
54
- next quarter". Vague *"this might be useful"* does not count.
55
- - **Public-incident pull.** A reproducible incident on a consumer project
56
- the domain would have prevented, captured in `agents/settings/contexts/` with
57
- the missing surface area named.
58
-
59
- If none of the three is citeable, **defer**. Open a watch-only context note
60
- under `agents/settings/contexts/domain-watch/<domain>.md` listing the missing signal
61
- so the next harvest can re-evaluate without re-relitigating the case.
62
-
63
- ## Gate 2 — Named maintenance owner
64
-
65
- Domain plates rot. Pick the owner before the import, not after.
66
-
67
- - The roadmap names a **single maintainer** (not "the team", not "TBD")
68
- responsible for the domain quarterly review.
69
- - The owner commits to the **refresh cadence** — quarterly review at
70
- minimum, faster if the domain is volatile (mobile RN/Expo SDK,
71
- ML model APIs).
72
- - Each adopted artefact carries an **inline upstream-source line** with
73
- SHA + last-checked timestamp so refresh is mechanical, not archaeological.
74
-
75
- If no owner is named or no cadence is set, **defer**. An unowned domain
76
- plate becomes broken authoritative-links and stale skills inside two cycles.
77
-
78
- ## Gate 3 — CI-tooling decision
79
-
80
- Either the domain's verification tooling is validated in CI, or the suite
81
- explicitly accepts platform-bound reference-only status.
82
-
83
- - **Validated.** The CI pipeline runs the relevant linters/tests/integration
84
- checks for the domain (e.g. `mobile-e2e` runners, ML model validation,
85
- contract conformance) on every PR. Cost noted in the roadmap risk
86
- register.
87
- - **Out-of-scope (reference-only).** The domain is a platform fact the
88
- suite cannot validate (iOS Simulator on non-macOS runners, GPU-bound
89
- ML, hardware-bound IoT). The roadmap states this explicitly; affected
90
- artefacts carry a "reference-only on \<unsupported platforms\>" header
91
- so consumers do not file false-positive bugs.
92
-
93
- If neither line is drawn, **defer**. Half-validated CI silently rots the
94
- domain — green builds while the underlying tooling drifts.
95
-
96
- ## Sunset Policy stacks on top
97
-
98
- Every domain track inherits the authoritative-link Sunset path documented
99
- in any plate that imports volatile upstream content:
100
-
101
- - Volatile content (SDK-pinned, API-pinned, tool-version-pinned) lives as
102
- guideline body + SHA-pinned upstream link, not as forked scripts.
103
- - Refresh trigger: quarterly cadence or earlier if a SHA-pinned link
104
- 404s in CI.
105
- - The `check-refs` and `check-portability` linters apply unchanged.
106
-
107
- Adopting a domain does not exempt it from any other suite-wide rule —
108
- `augment-edit-discipline`, `skill-quality`, `size-enforcement`,
109
- `rule-type-governance`. Every domain artefact passes the same gates as a
110
- core artefact.
111
-
112
- ## Failure modes
113
-
114
- - *"It's just one skill, not a domain."* — Audit the skill's prerequisites.
115
- If it pulls in a new toolchain, simulator, language runtime, or
116
- platform-specific build system, it **is** a domain entry. Run the gates.
117
- - *"The upstream is well-maintained, we can just track it."* — Tracking
118
- upstream means owning the diff, the breaking changes, and the migrations.
119
- Tracking is maintenance work; budget for it under Gate 2 or skip the
120
- adoption.
121
- - *"We'll add CI later."* — Later does not arrive. Either CI is wired in
122
- the same plate, or the artefacts ship with explicit reference-only
123
- headers so users do not assume validated coverage.
124
- - *"Council convergence is enough."* — Council informs the gates; it does
125
- not replace them. A council session may surface that all three gates
126
- pass; the roadmap still cites the evidence.
127
- - *"Demand-signal is the user asking once."* — Single-shot interest is a
128
- watch trigger, not an open trigger. Either name the target use case
129
- with project + timeline, or open a watch note and wait.
130
-
131
- ## What to do when the gates fail
132
-
133
- 1. Mark the domain plate `[-] gated — <gate name> not met` in the relevant
134
- roadmap. Do **not** silently shrink scope to dodge the gate.
135
- 2. Open a watch-only context note under `agents/settings/contexts/domain-watch/`
136
- capturing what's missing — citations, owner candidates, CI feasibility.
137
- 3. Re-evaluate at the next harvest cycle. The note is the evidence trail
138
- so the same questions are not relitigated.
139
-
140
- ## Allowed without gates
141
-
142
- - Adding **a single skill** to an **already-opened** domain follows the
143
- regular harvest plate; the gates do not re-fire per skill.
144
- - Authoring a **guideline** that documents a domain the suite already
145
- ships in — the domain is open, the guideline is a within-domain artefact.
146
- - A **rule** that constrains an already-opened domain — within-domain.
50
+ Body migrated to [`guideline:agent-infra/domain-adoption-gates`](../docs/guidelines/agent-infra/domain-adoption-gates.md) (per P4 of `road-to-kernel-and-router.md`) — per-gate evidence bars (demand signal, named owner + cadence, CI-vs-reference-only), the sunset policy, the failure-mode catalog, the gates-fail procedure, and the allowed-without-gates list.
51
+ Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
147
52
 
148
53
  ## See also
149
54
 
150
- - [`augment-edit-discipline`](augment-edit-discipline.md) —
151
- `dist/agent-src/` must stay project-agnostic and cross-references must stay
152
- in sync; domain plates inherit both floors
55
+ - [`augment-edit-discipline`](augment-edit-discipline.md) — portability +
56
+ cross-reference floors domain plates inherit
153
57
  - [`size-enforcement`](size-enforcement.md) — size budgets apply per
154
58
  artefact regardless of domain
155
59
  - [`rule-type-governance`](rule-type-governance.md) — within-domain rules
@@ -28,6 +28,8 @@ validator_ignore:
28
28
  - type: "substring"
29
29
  pattern: "scripts/lint_framework_leakage"
30
30
  reason: "Rule cites the enforcing linter script by name in body and enforcement section."
31
+ routes_to:
32
+ - "guideline:agent-infra/framework-neutrality-patterns"
31
33
  workspaces: [agent-config-maintainer]
32
34
  packs: [meta]
33
35
  ---
@@ -49,11 +51,8 @@ into surfaces the agent must trigger on regardless of project stack.
49
51
 
50
52
  ## Scope
51
53
 
52
- This rule fires on edits under:
53
-
54
- - `.agent-src.uncondensed/skills/`
55
- - `.agent-src.uncondensed/rules/`
56
- - `.agent-src.uncondensed/commands/`
54
+ This rule fires on edits under `src/skills/`, `src/rules/`, and
55
+ `src/agent-src/commands/`.
57
56
 
58
57
  **Exempt** (file or directory name matches — these are correctly
59
58
  framework-specific): `laravel*`, `symfony*`, `nextjs*`, `react-*`,
@@ -63,63 +62,16 @@ framework-specific): `laravel*`, `symfony*`, `nextjs*`, `react-*`,
63
62
  `^terraform*`, `^terragrunt*`, `^traefik`, `^mobile-e2e`,
64
63
  `-routing$`, `project-analysis-(laravel|symfony|nextjs|react|node-express|zend-laminas)`.
65
64
 
66
- ## Forbidden patterns in generic artifacts
67
-
68
- | Pattern | Why it leaks | Fix |
69
- |---|---|---|
70
- | `FormRequest` as a mandate | Laravel-only validation class | Say "request-validation primitive (FormRequest in Laravel, zod in Next.js, pydantic in FastAPI)" or move to `laravel-validation` carve-out |
71
- | `php artisan …` as a canonical command | Laravel CLI | Generalize to "the framework's CLI" or move to `artisan-commands` carve-out |
72
- | `PHPStan` as the only example | PHP-only static analyser | List peers (`mypy` for Python, `tsc` for TypeScript) or move to `quality-tools` carve-out |
73
- | `composer.json` mentioned alone | PHP package manifest | Add `package.json` / `pyproject.toml` peers, or move to a PHP-scoped carve-out |
74
- | `Eloquent` / `Model::…` | Laravel ORM | Generalize to "the project's ORM/data layer" or move to `eloquent` carve-out |
75
- | `Pest` as the only test runner | PHP/Laravel test framework | List peers (`pytest`, `vitest`, `jest`) or move to `pest-testing` carve-out |
76
- | `Blade` / `Livewire` / `Flux` as default UI | Laravel view stack | Generalize to "the project's UI layer" or move to `blade-ui` / `livewire` / `flux` carve-outs |
77
- | `vendor/bin/<tool>` as a canonical path | PHP/Composer-specific binary path | Say "the project's quality CLI" or carve-out it |
78
- | `Rector` as the only refactor tool | PHP-only refactorer | List peers (`ts-morph`, `libcst`) or carve-out it |
79
- | "every controller" / "all controllers" | Assumes MVC PHP framework | Generalize to "every request handler" / "every endpoint" |
80
-
81
- ## Allowed: cross-stack documentation
82
-
83
- Multi-stack tables or detection maps with **at least two ecosystems
84
- side-by-side** are documentation, not leakage. The linter's
85
- auto-detect heuristic (Step 0.5 of the audit roadmap) skips a hit when
86
- its ±2-line window contains patterns from a different ecosystem family
87
- (`php_family` vs `js_family` vs `python_family`).
88
-
89
- Example (allowed):
90
-
91
- ```
92
- - PHP/Composer project → `composer.json` present
93
- - Node project → `package.json` present
94
- - Python project → `pyproject.toml` present
95
- ```
96
-
97
- ## Allowed: carve-out pointers
98
-
99
- A generic artifact may end a section with a one-line handoff to its
100
- framework-specific peers. Canonical shape:
101
-
102
- ```
103
- → Laravel-specific: see [laravel-validation](../skills/laravel-validation/SKILL.md)
104
- → Next.js-specific: see [nextjs-patterns](../skills/nextjs-patterns/SKILL.md)
105
- ```
106
-
107
- The pointer is a link, not a procedure — the generic artifact never
108
- inlines stack-specific code.
109
-
110
- ## Enforcement
111
-
112
- `scripts/lint_framework_leakage.ts` runs in the package CI pipeline.
113
- Exit codes:
65
+ ## The discipline in one breath
114
66
 
115
- - `0` — no hits, or every hit is auto-detected as cross-stack, or
116
- every hit is allowlisted in
117
- `scripts/lint_framework_leakage_allowlist.json` with a `reason`.
118
- - `1` — at least one hit in a generic artifact (non-carve-out) that
119
- is neither cross-stack nor allowlisted.
67
+ Framework names in a generic artifact appear only as **multi-stack peers**
68
+ (≥ 2 ecosystems side-by-side — documentation, not leakage) or as a one-line
69
+ **carve-out pointer** to the framework-specific artifact — never as the
70
+ mandated procedure. `scripts/lint_framework_leakage.ts` is the deterministic
71
+ CI backstop (exit 1 on a non-allowlisted hit in a generic artifact).
120
72
 
121
- The linter is intentionally noisy on first introduction — the audit
122
- roadmap drives hits to zero phase by phase.
73
+ Body migrated to [`guideline:agent-infra/framework-neutrality-patterns`](../docs/guidelines/agent-infra/framework-neutrality-patterns.md) (per P4 of `road-to-kernel-and-router.md`) — the 10-row forbidden-pattern table with fixes, the cross-stack documentation allowance + auto-detect heuristic, the carve-out pointer shape, and the linter exit-code contract.
74
+ Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
123
75
 
124
76
  ## See also
125
77
 
@@ -38,6 +38,10 @@ Before implementing:
38
38
  - Tasks where the user said "just do it" or "skip validation"
39
39
  - Trivial changes (rename, typo, formatting)
40
40
 
41
+ ## Demand gate — should this exist? (build / defer)
42
+
43
+ On a "build me an app / add this feature" ask, ONE reflexive pre-check before the three checks: **who asked · what breaks if unbuilt · what's the evidence?** Recommend **build** only at a real retention/activation blocker (evidence, not anxiety); else **defer/validate**, naming the missing evidence. Advisory — "just build it" proceeds immediately; no network lookup. Hierarchy + build/defer table: guideline § 8-pre.
44
+
41
45
  ## The three checks
42
46
 
43
47
  Run, in order: **1. Is the request clear?** · **2. Does it fit the existing architecture?** · **3. Is the approach sound?**