@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
@@ -44,7 +44,9 @@ filtered** to a small curated set (`MERGEABLE_KEYS` = `name`, `ide`,
44
44
  ignored. `ai_council` is not on the whitelist, and council configuration lives
45
45
  project-local in `agents/settings/.ai-council.yml` (per
46
46
  [`ai-council-config`](../contracts/ai-council-config.md), the Phase-0 single
47
- source of truth).
47
+ source of truth). <!-- Council placement superseded by ADR-104: the config is
48
+ now user-global only (`~/.event4u/agent-config/settings/.ai-council.yml`),
49
+ never project-local. The trust-boundary reasoning below is unaffected. -->
48
50
 
49
51
  The maintainer questioned whether that project-local placement is a bug. The AI
50
52
  council was asked to decide and **converged** that it is **not** a bug — the
@@ -72,6 +74,12 @@ personas, rule tier) **belongs in version control**, and onboarding stays clean
72
74
  for council config is `agents/settings/.ai-council.yml`
73
75
  ([`ai-council-config`](../contracts/ai-council-config.md)); personas live in
74
76
  the project surface. Neither is a user-global concern.
77
+ <!-- Superseded for the COUNCIL part by ADR-104: council config is now
78
+ user-global only, never project-local (personas are unaffected). -->
79
+ **Update (ADR-104):** the council half of this decision was reversed — the
80
+ council config now lives user-global only
81
+ (`~/.event4u/agent-config/settings/.ai-council.yml`) and the project tree is
82
+ never read. Personas stay project-local as stated.
75
83
 
76
84
  3. **Only secrets and the curated identity whitelist are global.** Provider API
77
85
  keys already live global in `~/.event4u/agent-config/<provider>.key` (0600);
@@ -1,6 +1,6 @@
1
1
  # Featured Skills
2
2
 
3
- A curated subset of the 271 skills. Three tiers, one per primary audience. Full catalog lives in [`dist/agent-src/skills/`](../dist/agent-src/skills/); see also [`docs/catalog.md`](catalog.md) for the complete index and [`docs/featured-commands.md`](featured-commands.md) for command-level highlights.
3
+ A curated subset of the 275 skills. Three tiers, one per primary audience. Full catalog lives in [`dist/agent-src/skills/`](../dist/agent-src/skills/); see also [`docs/catalog.md`](catalog.md) for the complete index and [`docs/featured-commands.md`](featured-commands.md) for command-level highlights.
4
4
 
5
5
  > **Eval-gated messaging note.** Until `task bench --corpus non-dev` reports `selection_accuracy >= 0.60` (see `road-to-product-adoption.md` Phase 1), this page is documentation, not marketing. The entries below are the candidates the corpus tests against; their description quality is what the eval validates.
6
6
 
@@ -92,4 +92,4 @@ task lint-featured-skills
92
92
 
93
93
  CI runs this in `taskfiles/ci-fast.yml`. Stale entries (renamed / removed skill or command) fail the build. See [`scripts/lint_featured_skills.py`](../src/scripts/lint_featured_skills.py) for the matcher.
94
94
 
95
- → Browse all 271 skills: [`dist/agent-src/skills/`](../dist/agent-src/skills/) · all 183 commands: [`dist/agent-src/commands/`](../dist/agent-src/commands/)
95
+ → Browse all 275 skills: [`dist/agent-src/skills/`](../dist/agent-src/skills/) · all 184 commands: [`dist/agent-src/commands/`](../dist/agent-src/commands/)
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Pick the entry that matches what you do day-to-day. Each section names the three skills you will reach for first and shows whether MCP (no terminal) or CLI (terminal) is the simpler install path for that role.
4
4
 
5
- `agent-config` ships 271 skills, 104 governed rules, and 183 commands. You do not need all of them. Each role below filters to the slice that pays back in week one; the rest stays available and shows up on demand when a task references it.
5
+ `agent-config` ships 275 skills, 104 governed rules, and 184 commands. You do not need all of them. Each role below filters to the slice that pays back in week one; the rest stays available and shows up on demand when a task references it.
6
6
 
7
7
  > **Taglines at a glance →** [`docs/role-experiences.md`](role-experiences.md) — the one-line pitch per role experience, in one table.
8
8
 
@@ -174,25 +174,36 @@ Your agent now understands slash commands:
174
174
  | `/fix quality` | Run and fix all quality checks |
175
175
  | `/chat-history import` | Pull a prior session into the current chat (resume) |
176
176
 
177
- → [Browse all 183 active commands](../dist/agent-src/commands/)
177
+ → [Browse all 184 active commands](../dist/agent-src/commands/)
178
178
 
179
179
  ---
180
180
 
181
181
  ## Team mode — cross-model review (default off)
182
182
 
183
- Team mode pairs two strong models on one change: one model builds, a
184
- second reviews the **real diff** in your working tree and hands the
185
- findings back for a fix round. It is the depth complement to the
183
+ Team mode is a governed access layer with a read-only multi-host
184
+ fallback: a second strong model reviews the **real diff** in your
185
+ working tree and returns its findings. It is the depth complement to the
186
186
  [AI council](../dist/agent-src/skills/ai-council/SKILL.md): the council
187
187
  collects many cheap, neutral opinions on an artefact's *text*; team mode
188
- puts one strong, opinionated reviewer *inside the repo*.
188
+ puts one strong, opinionated reviewer *inside the repo*. An iterated
189
+ build→review→fix loop is gated future work — it unlocks only with a
190
+ positive verdict from the pre-registered benchmark.
189
191
 
190
192
  | Axis | Council | Team mode |
191
193
  |---|---|---|
192
194
  | Repo access | none — members see only the artefact text | full — the reviewer reads the real diff and git state |
193
- | Shape | breadth — N neutral opinions, one round | depth — one strong reviewer, build→review→fix iteration |
195
+ | Shape | breadth — N neutral opinions, one round | depth — one strong reviewer on the real diff |
194
196
  | Cost model | API-billed members (per-token) | subscription-authed `codex` CLI (runs under your existing plan) |
195
197
 
198
+ **Host support.** Only Claude Code with the Codex plugin gets the native
199
+ path; every other host runs a reduced, read-only fallback — no host
200
+ outside Claude Code has feature parity.
201
+
202
+ | Host | Path | Capability |
203
+ |---|---|---|
204
+ | Claude Code + Codex plugin | native — wrappers delegate to the plugin's `/codex:*` commands | full wrapper set: review, adversarial, status (incl. plugin job view), delegate (double-opt-in write path) |
205
+ | Any other host | read-only fallback via the `codex` CLI (repo-diff bundle) | review-shaped output only — no plugin job control, no background jobs, no delegate write path |
206
+
196
207
  **Setup.** Run `agent-config doctor --check team` — it verifies the
197
208
  `codex` binary + auth and, on Claude Code hosts, the Codex plugin, and
198
209
  prints the exact remediation command for anything missing.
@@ -33,7 +33,7 @@ the host lacks (a static host gives it no runtime attention guarantee, but a
33
33
  runtime-only system gives it nothing at all here). A runtime-only system contributes *nothing* on these hosts.
34
34
 
35
35
  ### 2. Intent routing, not a 500-artefact dump
36
- A prompt does not load all 271 skills. `dist/router.json` (100 routed rules, intent →
36
+ A prompt does not load all 275 skills. `dist/router.json` (100 routed rules, intent →
37
37
  skill, keyword/phrase/path triggers) carries the right skill on intent. The
38
38
  governance value is *selection discipline* — the host gets the relevant rule
39
39
  set, not the whole catalogue as context ballast.
@@ -0,0 +1,45 @@
1
+ # Active Remediation — Mechanics
2
+
3
+ > Ladder detail, version-gated modernization, and anti-nagging guardrails for the `active-remediation` rule
4
+
5
+ _Origin: migrated from `src/rules/active-remediation.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law, the ladder tier names, and the live-security carve-out stay in the rule; this file carries the per-tier criteria and the modernization gates._
6
+
7
+ ## The ladder — classify, then act
8
+
9
+ ### Fix now (autonomous, inline) — a bounded amendment to `minimal-safe-diff`
10
+
11
+ Allowed **only** when ALL hold — this is the testable "small + task-aligned" definition:
12
+
13
+ - **Same request path / module** as the current task (not an unrelated feature).
14
+ - **≤ ~10 changed lines** in one production file plus its test file — no wider cross-file ripple.
15
+ - **No public-API / response-shape change**, no new parameter.
16
+ - **No dependency bump, no migration, no data change.**
17
+ - **Its verification ships in the same commit** — e.g. the security fix's negative test, or the correctness fix's case.
18
+
19
+ Under those constraints the fix is auditable in the same diff and is *not* scope creep — it corrects a boundary the agent touched. Anything outside them → the fix is **note + ask**, never auto. (`minimal-safe-diff` still governs everything else: no reformatting, no opportunistic refactor, no drive-by rename.)
20
+
21
+ ### Note + ask (batched)
22
+
23
+ Bigger, or diverges from the task → do **not** refactor inline, do **not** interrupt the flow. Note the site (file:line + the issue). Surface the batch as **one** numbered-options prompt (per `user-interaction`, one recommendation line) **after the task is delivered** — or mid-work only when the flow makes it natural. Each option must carry a real trade-off (`no-cheap-questions`). Refactor only on an explicit yes, as a separate scoped change (`scope-control`, `downstream-changes`).
24
+
25
+ ### Propose a follow-up PR (many spots)
26
+
27
+ When the issues are too many to fold in without blowing the current diff's scope, propose **one or more separate follow-up PRs** (or a roadmap under `agents/roadmaps/`, using the shared-prefix convention) so the user reviews the changes before merge. Creating the PR/roadmap is **permission-gated** — propose, get a yes, then create (`scope-control`, `commit-policy`).
28
+
29
+ ## Version-gated modernization
30
+
31
+ Update stale idioms to the version the project **actually runs** — but only when that version is **verified**:
32
+
33
+ - **Establish the version first** from the manifest constraint (`composer.json` `require`, `package.json` `engines`, `.tool-versions`, lockfile) — use the **lowest** bound; on an ambiguous/monorepo range, ask once. **Unknown version → do not touch** (must fit the project structure — this is the `source-discovery` gate).
34
+ - **Syntax-only, behavior-preserving idioms** (e.g. `array()` → `[]`, `isset($x)?$x:$d` → `$x ?? $d`, string concat → template) that are provably equivalent → treat as a small fix (auto per the ladder).
35
+ - **Behavioral changes** (`readonly`/typed properties, new language semantics) and **any dependency/version bump** → **ask only**, never auto (a version bump stays under `minimal-safe-diff`'s no-dependency-bump prohibition; a pure syntax idiom is categorically different).
36
+
37
+ ## Guardrails — don't become a nagging machine
38
+
39
+ - Subordinate to `no-cheap-questions` (self-check items 3 & 14 — real trade-off, not a disguised continuation/commit ask), `autonomous-execution` (the end-of-session batch must not read as "shall I continue?"), `user-interaction`, `ask-when-uncertain` (one batched prompt = one question).
40
+ - Threshold to surface at all: a **real, nameable** improvement with a concrete benefit. Cosmetic nitpicks with no trade-off → drop silently. The live-security carve-out is the only case that interrupts or overrides autonomy.
41
+
42
+ ## See also
43
+
44
+ - [`active-remediation`](../../../src/rules/active-remediation.md) — the rule this file details (Iron Law + ladder + live-security carve-out).
45
+ - [`minimal-safe-diff`](minimal-safe-diff-mechanics.md) — the diff-shape mechanics the fix-now tier amends.
@@ -101,6 +101,34 @@ _Origin: migrated from `src/rules/improve-before-implement.md` per the P4 patter
101
101
 
102
102
  Before coding a new feature, refactor, module, or behavior-altering change, quickly verify:
103
103
 
104
+ ### 8-pre. Demand gate — should this exist at all? (build / defer)
105
+
106
+ One altitude ABOVE engineering-fit. Fires on a "build me an app / add this
107
+ feature" ask, before checks 8a–8c. It is a three-question advisor, NOT a
108
+ product-management framework — surface it in one short block, then proceed on
109
+ the user's answer (never block; `improve-before-implement`'s golden rule holds).
110
+
111
+ Three questions:
112
+
113
+ 1. **Who requested this?** (a real user / segment, or an internal hunch?)
114
+ 2. **What happens if you DON'T build it?** (churn / blocked deal, or nothing measurable?)
115
+ 3. **What's the demand evidence?** (requests, usage data, lost revenue — or a feeling?)
116
+
117
+ Map the answers to a compressed feature-demand hierarchy and recommend:
118
+
119
+ | Level | Signal | Recommendation |
120
+ |---|---|---|
121
+ | L0 | Founder/agent anxiety — "it feels missing" | **Defer** — validate demand first |
122
+ | L1 | One anecdotal request, no pattern | **Defer** — watch for repetition |
123
+ | L2 | Repeated requests, no measured impact | **Validate** — instrument before building |
124
+ | L3 | Blocks activation/retention for a real segment | **Build** |
125
+ | L4 | Users are churning / deals lost without it | **Build now** |
126
+
127
+ Build only at **L3–L4**; L0–L2 get a defer/validate recommendation with the
128
+ one missing evidence named. This is advisory — the user decides; a "just build
129
+ it" answer proceeds immediately to 8a. No network, no case-memory API (the
130
+ source's remote lookup is dropped — a lethal-trifecta egress concern).
131
+
104
132
  ### 8a. Is the request clear?
105
133
 
106
134
  - Are acceptance criteria defined or derivable?
@@ -0,0 +1,126 @@
1
+ # API Cost Levers
2
+
3
+ Reference material for a downstream AI-coding agent that wants to cut its own
4
+ Claude API dollar bill. Four platform-level billing levers, the exact economics
5
+ of each, and how they interact. Read on demand — not always-loaded.
6
+
7
+ Facts sourced from the in-repo `claude-api` plugin skill plus platform research
8
+ (2026-07-14). Do not invent an API shape beyond what is stated here.
9
+
10
+ ## The four levers at a glance
11
+
12
+ | Lever | Cuts | Best for | Watch out for |
13
+ |---|---|---|---|
14
+ | Prompt caching | Repeated input tokens | Stable prefix reused across calls (system prompt, tools, repo map) | Any byte change in the prefix invalidates the rest |
15
+ | Batch API | 50% input + output | Non-interactive bulk work (classification, summarization, evals) | Async, up to 24h, results unordered |
16
+ | Model tiering | Per-token price | Routine work on a cheaper model | Switching model is a cache miss |
17
+ | Effort / output sizing | Thinking + output tokens | Routine turns that don't need deep reasoning | Oversized `max_tokens` risks runaway output |
18
+
19
+ ## 1. Prompt caching
20
+
21
+ Put the large, byte-**stable** context first — system prompt, tool definitions,
22
+ a corpus or repo map, few-shot examples — behind a
23
+ `cache_control: {type: 'ephemeral'}` breakpoint. Keep volatile content (the
24
+ varying question, timestamps, per-request IDs) **after** the last breakpoint.
25
+ The cache is a **prefix match**: any byte change in the cached prefix
26
+ invalidates everything after it. Render order is tools then system then
27
+ messages.
28
+
29
+ Caching is GA — **no beta header needed**.
30
+
31
+ Economics:
32
+
33
+ - Cache reads cost approximately 0.1x the base input price.
34
+ - Cache writes cost 1.25x (5-minute TTL) or 2x (1-hour TTL).
35
+ - Break-even is after **one** read on the 5-minute TTL.
36
+
37
+ Constraints:
38
+
39
+ - The minimum cacheable prefix is model-dependent (approximately 1024–4096
40
+ tokens). Shorter prefixes silently do not cache.
41
+ - The cache is workspace-isolated (since February 2026).
42
+
43
+ Verify a hit with `usage.cache_read_input_tokens > 0`.
44
+
45
+ ```json
46
+ {
47
+ "system": [
48
+ { "type": "text", "text": "<large stable system prompt>",
49
+ "cache_control": { "type": "ephemeral" } }
50
+ ],
51
+ "messages": [
52
+ { "role": "user", "content": "<the varying question>" }
53
+ ]
54
+ }
55
+ ```
56
+
57
+ ## 2. Batch API
58
+
59
+ For **non-interactive, non-latency-sensitive bulk work** — bulk classification,
60
+ mass file summarization, eval runs. Not chatbots or interactive assistants.
61
+
62
+ - **50% off both input and output tokens.**
63
+ - Async: results within 24h (usually much less), keyed by `custom_id`, arriving
64
+ **unordered** — key results by `custom_id`, never by position.
65
+ - **Stacks with prompt caching**: a cached-batch input token can reach
66
+ approximately 0.05x the standard input price.
67
+
68
+ ## 3. Model tiering
69
+
70
+ Treat models like a team — a cheap model for mechanical or routine work, the
71
+ expensive model only for hard judgment. Approximate input / output price per 1M
72
+ tokens:
73
+
74
+ | Model | Input | Output |
75
+ |---|---|---|
76
+ | Haiku | $1 | $5 |
77
+ | Sonnet | $3 | $15 |
78
+ | Opus | $5 | $25 |
79
+ | Fable | $10 | $50 |
80
+
81
+ Opus input is approximately 5x Haiku. Tier by task **difficulty**, not blindly:
82
+ a cheaper model that gives wrong answers on judgment tasks costs correction
83
+ cycles, which erases the saving.
84
+
85
+ **Interaction with caching.** The prompt cache is keyed by `(model, prefix)`, so
86
+ switching a call to a cheaper model is a cache **miss**. Weigh the downgrade
87
+ saving against the lost cache-read saving before routing a cached call to a
88
+ different model.
89
+
90
+ ## 4. Effort and output right-sizing
91
+
92
+ - `output_config.effort` (low through max) controls thinking and output depth,
93
+ and therefore spend. Dial effort **down** on routine turns; reserve high / max
94
+ for hard reasoning.
95
+ - Right-size `max_tokens` — do not leave a huge ceiling. An unrealistically
96
+ large `max_tokens` does not cost tokens by itself, but it risks runaway output
97
+ and defeats pre-flight budgeting.
98
+
99
+ ## When to reach for which
100
+
101
+ | Situation | Lever |
102
+ |---|---|
103
+ | Same large context reused across many calls | Prompt caching |
104
+ | Thousands of independent, non-urgent jobs | Batch API (+ caching) |
105
+ | Turn is mechanical / narrow / well-specified | Cheaper model tier |
106
+ | Turn is routine and does not need deep thinking | Lower `effort` |
107
+ | Output could balloon unnecessarily | Cap `max_tokens` |
108
+ | Interactive latency matters | Caching + tiering; not Batch |
109
+
110
+ ## Claude Code note
111
+
112
+ In Claude Code, prompt caching is automatic — resending the same context prefix
113
+ is cheap, so keeping a stable prefix pays off without any explicit
114
+ `cache_control`. The session-level hygiene levers are `/clear` and `/compact` to
115
+ shed accumulated context, plus subagent delegation for verbose output so it
116
+ never lands in the main context window.
117
+
118
+ ## See also
119
+
120
+ - [`model-recommendation.md`](model-recommendation.md) — tier routing (the
121
+ capability band behind lever 3).
122
+ - [`size-and-scope.md`](size-and-scope.md) — token discipline for the artifacts
123
+ that become the cached prefix.
124
+ - The Claude Code `claude-api` plugin skill (external, not vendored here) — the
125
+ authoritative, versioned API reference these figures derive from; re-check it
126
+ when Anthropic pricing or the caching/batch surface changes.
@@ -0,0 +1,76 @@
1
+ # Artifact Drafting Protocol — Mechanics
2
+
3
+ > Phase A/B/C detail and the roadmap batch-mode carve-out for the `artifact-drafting-protocol` rule
4
+
5
+ _Origin: migrated from `src/rules/artifact-drafting-protocol.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law, the trigger surface, and the golden rules stay in the rule; this file carries the per-phase procedure._
6
+
7
+ ## Phase A — Understand
8
+
9
+ Ask up to **5** clarifying questions (numbered options, each with a
10
+ *"skip / I don't know yet"* escape):
11
+
12
+ 1. **Problem** — what does this solve that no existing artifact solves?
13
+ 2. **Trigger surface** — which user phrasings should fire this?
14
+ 3. **Should-trigger examples** — 2-3 in the user's words.
15
+ 4. **Near-miss cases** — 2-3 phrasings that must **not** fire.
16
+ 5. **Artifact type** — skill, rule, command, or guideline? Offer a
17
+ 3-line primer if unsure.
18
+
19
+ If the user skips Q1 or Q5, stop and surface the ambiguity — don't guess.
20
+
21
+ ## Phase B — Research
22
+
23
+ Run the **search protocol** from
24
+ [`learning-to-rule-or-skill` § 4](../../../src/skills/learning-to-rule-or-skill/SKILL.md)
25
+ — `ls` all four surfaces (`skills/`, `rules/`, `guidelines/`, `commands/`),
26
+ grep with **solution-words AND problem-words**, scan sub-directory
27
+ taxonomies, then **open and skim** the 3 nearest matches. A negative grep
28
+ alone is not proof of no overlap. Report the top 3-5 most-similar
29
+ artifacts and ask (numbered options):
30
+
31
+ - Extend an existing one?
32
+ - Create a new one — gap is real?
33
+ - Show overlap first?
34
+ - Promote via `learning-to-rule-or-skill` instead?
35
+
36
+ Carry the summary into the commit message (*"Reviewed before drafting:
37
+ X, Y"*).
38
+
39
+ ## Phase C — Draft
40
+
41
+ Propose **2-3 description variants** — Conservative / Pushy
42
+ (per `skill-quality`) / Concrete (embedded trigger example). User picks
43
+ or merges. Only then draft the body. Surface every structural choice
44
+ (size class, section order) as numbered options if in doubt.
45
+
46
+ Enforce size live: *"Body is at 420/500 lines. Split?"* (budgets per
47
+ `size-enforcement`). New skills also get an `evals/triggers.json` stub
48
+ (5 should-trigger + 5 should-not-trigger). See `skill-writing` § 1c.
49
+
50
+ ## Roadmap-run batch mode — the ONE structured bypass
51
+
52
+ When a `/roadmap:process-*` run starts under an **accepted execution
53
+ contract** (`roadmap-execution-contract`) whose pre-scan detected
54
+ artifact-authoring steps, the protocol runs in batch mode for exactly
55
+ those artifacts:
56
+
57
+ - **Phase B (Research) runs ONCE at contract time, against the CURRENT
58
+ artifact state** — one overlap scan covering every artifact the
59
+ roadmap plans; results (nearest matches, extend-vs-create verdicts)
60
+ are surfaced inside the contract summary the user accepts. This is
61
+ why authoring-time-only checking is not enough: a sibling roadmap may
62
+ have landed overlapping artifacts between authoring and execution.
63
+ - **Phases A (Understand) and C (Draft) run non-interactively during
64
+ the run** — the roadmap step text is the Understand input; the
65
+ contract acceptance is the approval that the per-phase prompts exist
66
+ to obtain.
67
+ - **Scope is the batch, nothing more.** An artifact NOT declared in the
68
+ roadmap (discovered mid-run) triggers the full interactive protocol —
69
+ or, under the contract, the scope-out-of-roadmap halt.
70
+ - Batch mode never skips the Research pass itself — it relocates and
71
+ batches it. `artifact_protocol: skip` does not exist.
72
+
73
+ ## See also
74
+
75
+ - `artifact-drafting-protocol` (rule) — Iron Law, triggers, golden rules.
76
+ - `ask-when-uncertain` · `improve-before-implement` · `user-interaction` · `skill-quality` — the protocol extends these; cross-link, don't restate.
@@ -0,0 +1,90 @@
1
+ # Context Hygiene — Mechanics
2
+
3
+ > Suggestion templates, state-dump format, read-loop self-checks, and host fallbacks for the `context-hygiene` rule
4
+
5
+ _Origin: migrated from `src/rules/context-hygiene.md` per the P4 pattern of `road-to-kernel-and-router.md`. The freshness thresholds, the 3-failure rule (with failure-identity and hard-blocker classes), the tool-loop cap, and the read-loop 15/25 Iron Law stay in the rule; this file carries the templates and per-host procedures._
6
+
7
+ ## Conversation-freshness suggestion — how to phrase it
8
+
9
+ Estimate token cost: responses × ~1,500 tokens.
10
+
11
+ ```
12
+ > ⚡ This conversation has ~{N} messages (~{N×1500} tokens history cost — charged on EVERY request).
13
+ > A fresh chat saves ~{N×1500} input tokens per request.
14
+ >
15
+ > 1. Start fresh — I'll initiate a session handoff
16
+ > 2. Continue here
17
+ ```
18
+
19
+ **If the user picks 1:** Initiate a session handoff or start fresh.
20
+
21
+ ## Read-loop self-check (fires at the 15-min warning)
22
+
23
+ 1. Source expectation known? If no → read **once**, then act.
24
+ 2. Can a single failing test name the error? If yes → run it now.
25
+ 3. Regression in working code? → `git log` + `git show <sha> -- <file>`.
26
+ 4. Guessing at mock / payload shape? → read the producer **once**.
27
+
28
+ ## Read-loop abort block (the 25-min stop)
29
+
30
+ ```
31
+ > ⛔ Loop: N read-only turns, ~M min. Read: <files>. Hypothesis: <X>.
32
+ > 1. Different approach (suggestion: <Y>)
33
+ > 2. Point me at the right spot
34
+ > 3. Fresh chat with state dump
35
+ ```
36
+
37
+ Non-bypassable. An autonomous mandate (`/work`, `/roadmap:process-*`,
38
+ "entscheide selbst") does **not** lift the abort — it is the safety
39
+ net that protects autonomy from becoming a token sink.
40
+
41
+ Debug procedure for "I'm in a read loop fixing tests" →
42
+ `systematic-debugging` § Debug micro-loop (one test, one fix, one re-run).
43
+
44
+ ## State dump format
45
+
46
+ ```
47
+ ## State Dump: [Task]
48
+ ### Tried: 1. [Approach] → [Why failed] 2. ... 3. ...
49
+ ### Known: [Key facts]
50
+ ### Hypothesis: [Best guess for root cause]
51
+ ### Recommendation: [Next approach for fresh session]
52
+ ```
53
+
54
+ Use `/agent-handoff` to generate a context summary for a fresh conversation.
55
+
56
+ ## Augment-specific: ignored-skills recovery
57
+
58
+ Skills excluded via `.augmentignore` don't appear in `<available_skills>`.
59
+ If you need an ignored skill: read its SKILL.md directly, apply guidance, then ask:
60
+
61
+ ```
62
+ > 💡 I loaded `{name}` manually — currently ignored in `.augmentignore`.
63
+ > 1. Remove from ignore — relevant for this project
64
+ > 2. Keep ignored — one-off
65
+ ```
66
+
67
+ ## Copilot fallback
68
+
69
+ GitHub Copilot has no `PostToolUse` hook surface, so
70
+ `scripts/context_hygiene_hook.ts` cannot run structurally and
71
+ `agents/runtime/state/context-hygiene.json` is not maintained automatically
72
+ (turn count, loop signal, freshness milestones at 20/40/60).
73
+
74
+ The cooperative path: track turns and tool-loop signals from memory
75
+ during the conversation and apply the suggest-a-new-chat / 3-failure
76
+ stop / loop-detection rules. To refresh the state file manually so the
77
+ dashboard or another tool can read the latest counters, run:
78
+
79
+ ```bash
80
+ ./scripts-run src/scripts/context_hygiene_hook < /dev/null
81
+ ```
82
+
83
+ The script reads from stdin if a JSON envelope is provided and
84
+ otherwise writes a no-op snapshot under the shared dispatcher lock.
85
+ Exit code is always 0 — hooks must never block the agent loop.
86
+
87
+ ## See also
88
+
89
+ - `context-hygiene` (rule) — thresholds, 3-failure rule, tool-loop cap, read-loop Iron Law.
90
+ - `systematic-debugging` § Debug micro-loop — the one-test-one-fix-one-rerun procedure.
@@ -0,0 +1,112 @@
1
+ # Domain Adoption — Gates
2
+
3
+ > The three-gate evidence contract, sunset policy, and failure-mode catalog for the `domain-adoption-policy` rule
4
+
5
+ _Origin: migrated from `src/rules/domain-adoption-policy.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law and the three gate names stay in the rule; this file carries the per-gate evidence bars and procedures._
6
+
7
+ ## Gate 1 — Demand signal
8
+
9
+ At least one of the following must be **true and citeable** in the roadmap:
10
+
11
+ - **≥ 2 consumer projects** in the domain. Cite repository names or
12
+ `agents/settings/contexts/` notes — not "I think there might be".
13
+ - **Named user direction with target.** A specific user ask plus a target
14
+ project / use case — e.g. "harvest the mobile skills for project X, due
15
+ next quarter". Vague *"this might be useful"* does not count.
16
+ - **Public-incident pull.** A reproducible incident on a consumer project
17
+ the domain would have prevented, captured in `agents/settings/contexts/` with
18
+ the missing surface area named.
19
+
20
+ If none of the three is citeable, **defer**. Open a watch-only context note
21
+ under `agents/settings/contexts/domain-watch/<domain>.md` listing the missing signal
22
+ so the next harvest can re-evaluate without re-relitigating the case.
23
+
24
+ ## Gate 2 — Named maintenance owner
25
+
26
+ Domain plates rot. Pick the owner before the import, not after.
27
+
28
+ - The roadmap names a **single maintainer** (not "the team", not "TBD")
29
+ responsible for the domain quarterly review.
30
+ - The owner commits to the **refresh cadence** — quarterly review at
31
+ minimum, faster if the domain is volatile (mobile RN/Expo SDK,
32
+ ML model APIs).
33
+ - Each adopted artefact carries an **inline upstream-source line** with
34
+ SHA + last-checked timestamp so refresh is mechanical, not archaeological.
35
+
36
+ If no owner is named or no cadence is set, **defer**. An unowned domain
37
+ plate becomes broken authoritative-links and stale skills inside two cycles.
38
+
39
+ ## Gate 3 — CI-tooling decision
40
+
41
+ Either the domain's verification tooling is validated in CI, or the suite
42
+ explicitly accepts platform-bound reference-only status.
43
+
44
+ - **Validated.** The CI pipeline runs the relevant linters/tests/integration
45
+ checks for the domain (e.g. `mobile-e2e` runners, ML model validation,
46
+ contract conformance) on every PR. Cost noted in the roadmap risk
47
+ register.
48
+ - **Out-of-scope (reference-only).** The domain is a platform fact the
49
+ suite cannot validate (iOS Simulator on non-macOS runners, GPU-bound
50
+ ML, hardware-bound IoT). The roadmap states this explicitly; affected
51
+ artefacts carry a "reference-only on \<unsupported platforms\>" header
52
+ so consumers do not file false-positive bugs.
53
+
54
+ If neither line is drawn, **defer**. Half-validated CI silently rots the
55
+ domain — green builds while the underlying tooling drifts.
56
+
57
+ ## Sunset Policy stacks on top
58
+
59
+ Every domain track inherits the authoritative-link Sunset path documented
60
+ in any plate that imports volatile upstream content:
61
+
62
+ - Volatile content (SDK-pinned, API-pinned, tool-version-pinned) lives as
63
+ guideline body + SHA-pinned upstream link, not as forked scripts.
64
+ - Refresh trigger: quarterly cadence or earlier if a SHA-pinned link
65
+ 404s in CI.
66
+ - The `check-refs` and `check-portability` linters apply unchanged.
67
+
68
+ Adopting a domain does not exempt it from any other suite-wide rule —
69
+ `augment-edit-discipline`, `skill-quality`, `size-enforcement`,
70
+ `rule-type-governance`. Every domain artefact passes the same gates as a
71
+ core artefact.
72
+
73
+ ## Failure modes
74
+
75
+ - *"It's just one skill, not a domain."* — Audit the skill's prerequisites.
76
+ If it pulls in a new toolchain, simulator, language runtime, or
77
+ platform-specific build system, it **is** a domain entry. Run the gates.
78
+ - *"The upstream is well-maintained, we can just track it."* — Tracking
79
+ upstream means owning the diff, the breaking changes, and the migrations.
80
+ Tracking is maintenance work; budget for it under Gate 2 or skip the
81
+ adoption.
82
+ - *"We'll add CI later."* — Later does not arrive. Either CI is wired in
83
+ the same plate, or the artefacts ship with explicit reference-only
84
+ headers so users do not assume validated coverage.
85
+ - *"Council convergence is enough."* — Council informs the gates; it does
86
+ not replace them. A council session may surface that all three gates
87
+ pass; the roadmap still cites the evidence.
88
+ - *"Demand-signal is the user asking once."* — Single-shot interest is a
89
+ watch trigger, not an open trigger. Either name the target use case
90
+ with project + timeline, or open a watch note and wait.
91
+
92
+ ## What to do when the gates fail
93
+
94
+ 1. Mark the domain plate `[-] gated — <gate name> not met` in the relevant
95
+ roadmap. Do **not** silently shrink scope to dodge the gate.
96
+ 2. Open a watch-only context note under `agents/settings/contexts/domain-watch/`
97
+ capturing what's missing — citations, owner candidates, CI feasibility.
98
+ 3. Re-evaluate at the next harvest cycle. The note is the evidence trail
99
+ so the same questions are not relitigated.
100
+
101
+ ## Allowed without gates
102
+
103
+ - Adding **a single skill** to an **already-opened** domain follows the
104
+ regular harvest plate; the gates do not re-fire per skill.
105
+ - Authoring a **guideline** that documents a domain the suite already
106
+ ships in — the domain is open, the guideline is a within-domain artefact.
107
+ - A **rule** that constrains an already-opened domain — within-domain.
108
+
109
+ ## See also
110
+
111
+ - `domain-adoption-policy` (rule) — the Iron Law + gate names.
112
+ - `size-enforcement` · `rule-type-governance` · `skill-quality` — the suite-wide floors every domain artefact still passes.
@@ -0,0 +1,66 @@
1
+ # Framework Neutrality — Patterns
2
+
3
+ > Forbidden-pattern table, cross-stack documentation allowance, and carve-out pointer shape for the `framework-neutrality-in-generic-skills` rule
4
+
5
+ _Origin: migrated from `src/rules/framework-neutrality-in-generic-skills.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law, scope, and exemption list stay in the rule; this file carries the pattern reference._
6
+
7
+ ## Forbidden patterns in generic artifacts
8
+
9
+ | Pattern | Why it leaks | Fix |
10
+ |---|---|---|
11
+ | `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 |
12
+ | `php artisan …` as a canonical command | Laravel CLI | Generalize to "the framework's CLI" or move to `artisan-commands` carve-out |
13
+ | `PHPStan` as the only example | PHP-only static analyser | List peers (`mypy` for Python, `tsc` for TypeScript) or move to `quality-tools` carve-out |
14
+ | `composer.json` mentioned alone | PHP package manifest | Add `package.json` / `pyproject.toml` peers, or move to a PHP-scoped carve-out |
15
+ | `Eloquent` / `Model::…` | Laravel ORM | Generalize to "the project's ORM/data layer" or move to `eloquent` carve-out |
16
+ | `Pest` as the only test runner | PHP/Laravel test framework | List peers (`pytest`, `vitest`, `jest`) or move to `pest-testing` carve-out |
17
+ | `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 |
18
+ | `vendor/bin/<tool>` as a canonical path | PHP/Composer-specific binary path | Say "the project's quality CLI" or carve-out it |
19
+ | `Rector` as the only refactor tool | PHP-only refactorer | List peers (`ts-morph`, `libcst`) or carve-out it |
20
+ | "every controller" / "all controllers" | Assumes MVC PHP framework | Generalize to "every request handler" / "every endpoint" |
21
+
22
+ ## Allowed: cross-stack documentation
23
+
24
+ Multi-stack tables or detection maps with **at least two ecosystems
25
+ side-by-side** are documentation, not leakage. The linter's
26
+ auto-detect heuristic skips a hit when its ±2-line window contains
27
+ patterns from a different ecosystem family (`php_family` vs
28
+ `js_family` vs `python_family`).
29
+
30
+ Example (allowed):
31
+
32
+ ```
33
+ - PHP/Composer project → `composer.json` present
34
+ - Node project → `package.json` present
35
+ - Python project → `pyproject.toml` present
36
+ ```
37
+
38
+ ## Allowed: carve-out pointers
39
+
40
+ A generic artifact may end a section with a one-line handoff to its
41
+ framework-specific peers. Canonical shape:
42
+
43
+ ```
44
+ → Laravel-specific: see [laravel-validation](../skills/laravel-validation/SKILL.md)
45
+ → Next.js-specific: see [nextjs-patterns](../skills/nextjs-patterns/SKILL.md)
46
+ ```
47
+
48
+ The pointer is a link, not a procedure — the generic artifact never
49
+ inlines stack-specific code.
50
+
51
+ ## Enforcement
52
+
53
+ `scripts/lint_framework_leakage.ts` runs in the package CI pipeline.
54
+ Exit codes:
55
+
56
+ - `0` — no hits, or every hit is auto-detected as cross-stack, or
57
+ every hit is allowlisted in
58
+ `scripts/lint_framework_leakage_allowlist.json` with a `reason`.
59
+ - `1` — at least one hit in a generic artifact (non-carve-out) that
60
+ is neither cross-stack nor allowlisted.
61
+
62
+ ## See also
63
+
64
+ - `framework-neutrality-in-generic-skills` (rule) — Iron Law, scope, exemption list.
65
+ - `roadmap-ci-steps-policy` — sibling Tier-2a rule that drove this pattern.
66
+ - `skill-quality` — every skill must remain executable; carve-outs must still pass skill-quality.