hatch3r 1.9.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/README.md +52 -143
  2. package/dist/cli/index.js +28453 -15831
  3. package/dist/content/agents/hatch3r-architect.md +39 -9
  4. package/dist/content/agents/hatch3r-brownfield-spec.md +254 -0
  5. package/dist/content/agents/hatch3r-ci-watcher.md +8 -1
  6. package/dist/content/agents/hatch3r-context-rules.md +19 -1
  7. package/dist/content/agents/hatch3r-creator.md +65 -26
  8. package/dist/content/agents/hatch3r-dependency-drafter.md +162 -0
  9. package/dist/content/agents/hatch3r-devops.md +11 -1
  10. package/dist/content/agents/hatch3r-docs-writer.md +11 -1
  11. package/dist/content/agents/hatch3r-edge-case-analyst.md +134 -0
  12. package/dist/content/agents/hatch3r-enhancability.md +192 -0
  13. package/dist/content/agents/hatch3r-fixer.md +59 -8
  14. package/dist/content/agents/hatch3r-greenfield-spec.md +256 -0
  15. package/dist/content/agents/hatch3r-handoff-loader.md +29 -3
  16. package/dist/content/agents/hatch3r-handoff-preparer.md +10 -1
  17. package/dist/content/agents/hatch3r-implementer.md +139 -8
  18. package/dist/content/agents/hatch3r-incident-responder.md +96 -0
  19. package/dist/content/agents/hatch3r-learnings-loader.md +122 -88
  20. package/dist/content/agents/hatch3r-lint-fixer.md +15 -3
  21. package/dist/content/agents/hatch3r-maintainability.md +183 -0
  22. package/dist/content/agents/hatch3r-pack-installer.md +113 -0
  23. package/dist/content/agents/hatch3r-performance.md +179 -0
  24. package/dist/content/agents/hatch3r-reliability.md +193 -0
  25. package/dist/content/agents/hatch3r-researcher.md +27 -4
  26. package/dist/content/agents/hatch3r-reviewer.md +153 -103
  27. package/dist/content/agents/hatch3r-scalability.md +162 -0
  28. package/dist/content/agents/hatch3r-security.md +197 -0
  29. package/dist/content/agents/hatch3r-testability.md +204 -0
  30. package/dist/content/agents/hatch3r-ui.md +175 -0
  31. package/dist/content/agents/hatch3r-ux.md +160 -0
  32. package/dist/content/agents/modes/requirements-elicitation.md +1 -1
  33. package/dist/content/agents/modes/user-flows.md +2 -2
  34. package/dist/content/agents/shared/clarification-default-block.md +44 -0
  35. package/dist/content/agents/shared/confidence-gate.md +42 -0
  36. package/dist/content/agents/shared/cq-specialist-roster.md +26 -0
  37. package/dist/content/agents/shared/efficiency-patterns.md +32 -1
  38. package/dist/content/agents/shared/injection-patterns.md +18 -7
  39. package/dist/content/agents/shared/principles.md +60 -0
  40. package/dist/content/agents/shared/prompt-structure.md +7 -1
  41. package/dist/content/agents/shared/quality-charter.md +48 -12
  42. package/dist/content/agents/shared/quality-specialist-frame.md +141 -0
  43. package/dist/content/agents/shared/rigor-contract.md +151 -0
  44. package/dist/content/agents/shared/severity-mapping.md +92 -0
  45. package/dist/content/agents/shared/triage-vocabulary.md +46 -0
  46. package/dist/content/agents/shared/user-content-templates.md +34 -8
  47. package/dist/content/agents/shared/user-question-protocol.md +45 -3
  48. package/dist/content/checks/README.md +5 -0
  49. package/dist/content/checks/accessibility.md +14 -7
  50. package/dist/content/checks/code-quality.md +1 -1
  51. package/dist/content/checks/performance.md +7 -4
  52. package/dist/content/checks/security.md +6 -6
  53. package/dist/content/checks/testing.md +1 -1
  54. package/dist/content/commands/board/pickup-delegation-multi.md +37 -10
  55. package/dist/content/commands/board/pickup-delegation.md +7 -5
  56. package/dist/content/commands/board/pickup-modes.md +1 -0
  57. package/dist/content/commands/board/pickup-post-impl.md +1 -1
  58. package/dist/content/commands/hatch3r-api-spec.md +79 -2
  59. package/dist/content/commands/hatch3r-auth-scaffold.md +250 -0
  60. package/dist/content/commands/hatch3r-benchmark.md +90 -7
  61. package/dist/content/commands/hatch3r-board-fill.md +97 -11
  62. package/dist/content/commands/hatch3r-board-pickup.md +93 -9
  63. package/dist/content/commands/hatch3r-bug-pipeline.md +240 -0
  64. package/dist/content/commands/hatch3r-bug-plan.md +79 -3
  65. package/dist/content/commands/hatch3r-codebase-map.md +80 -4
  66. package/dist/content/commands/hatch3r-create.md +105 -7
  67. package/dist/content/commands/hatch3r-debug.md +102 -14
  68. package/dist/content/commands/hatch3r-diagnose.md +238 -0
  69. package/dist/content/commands/hatch3r-feature-plan.md +125 -5
  70. package/dist/content/commands/hatch3r-handoff.md +83 -3
  71. package/dist/content/commands/hatch3r-healthcheck.md +105 -5
  72. package/dist/content/commands/hatch3r-incident-response.md +228 -0
  73. package/dist/content/commands/hatch3r-migration-plan.md +79 -3
  74. package/dist/content/commands/hatch3r-onboard.md +94 -3
  75. package/dist/content/commands/hatch3r-pack-install.md +243 -0
  76. package/dist/content/commands/hatch3r-pr-resolve.md +106 -23
  77. package/dist/content/commands/hatch3r-project-spec.md +82 -6
  78. package/dist/content/commands/hatch3r-quick-change.md +108 -13
  79. package/dist/content/commands/hatch3r-refactor-plan.md +78 -2
  80. package/dist/content/commands/hatch3r-release.md +401 -0
  81. package/dist/content/commands/hatch3r-revision.md +98 -12
  82. package/dist/content/commands/hatch3r-roadmap.md +92 -10
  83. package/dist/content/commands/hatch3r-security-audit.md +105 -5
  84. package/dist/content/commands/hatch3r-slo-scaffold.md +246 -0
  85. package/dist/content/commands/hatch3r-spec.md +216 -0
  86. package/dist/content/commands/hatch3r-test-plan.md +85 -9
  87. package/dist/content/commands/hatch3r-workflow.md +165 -41
  88. package/dist/content/commands/revision/revision-delegation.md +6 -5
  89. package/dist/content/commands/revision/revision-modes.md +49 -4
  90. package/dist/content/commands/revision/revision-quality.md +10 -7
  91. package/dist/content/commands/shared/orchestration-frame.md +119 -0
  92. package/dist/content/github-agents/hatch3r-docs-agent.md +21 -1
  93. package/dist/content/github-agents/hatch3r-lint-agent.md +21 -1
  94. package/dist/content/github-agents/hatch3r-security-agent.md +21 -1
  95. package/dist/content/github-agents/hatch3r-test-agent.md +21 -1
  96. package/dist/content/hooks/hatch3r-file-save.md +1 -1
  97. package/dist/content/hooks/hatch3r-pre-push.md +4 -4
  98. package/dist/content/hooks/hatch3r-review-loop-cap.md +52 -0
  99. package/dist/content/mcp/mcp.json +7 -5
  100. package/dist/content/rules/hatch3r-accessibility-standards.md +14 -2
  101. package/dist/content/rules/hatch3r-accessibility-standards.mdc +12 -1
  102. package/dist/content/rules/hatch3r-agent-orchestration-detail.md +58 -19
  103. package/dist/content/rules/hatch3r-agent-orchestration-detail.mdc +58 -19
  104. package/dist/content/rules/hatch3r-agent-orchestration.md +87 -213
  105. package/dist/content/rules/hatch3r-agent-orchestration.mdc +87 -213
  106. package/dist/content/rules/hatch3r-ai-evals.md +5 -4
  107. package/dist/content/rules/hatch3r-ai-evals.mdc +3 -3
  108. package/dist/content/rules/hatch3r-ai-ux-patterns.md +6 -2
  109. package/dist/content/rules/hatch3r-ai-ux-patterns.mdc +4 -1
  110. package/dist/content/rules/hatch3r-android-patterns.md +107 -0
  111. package/dist/content/rules/hatch3r-android-patterns.mdc +102 -0
  112. package/dist/content/rules/hatch3r-anti-duplication.md +115 -0
  113. package/dist/content/rules/hatch3r-anti-duplication.mdc +115 -0
  114. package/dist/content/rules/hatch3r-api-design.md +5 -1
  115. package/dist/content/rules/hatch3r-api-design.mdc +3 -0
  116. package/dist/content/rules/hatch3r-api-versioning.md +2 -1
  117. package/dist/content/rules/hatch3r-auth-patterns.md +3 -1
  118. package/dist/content/rules/hatch3r-auth-patterns.mdc +1 -0
  119. package/dist/content/rules/hatch3r-browser-verification.md +2 -0
  120. package/dist/content/rules/hatch3r-browser-verification.mdc +2 -0
  121. package/dist/content/rules/hatch3r-capability-matrix.md +108 -0
  122. package/dist/content/rules/hatch3r-capability-matrix.mdc +108 -0
  123. package/dist/content/rules/hatch3r-ci-cd.md +8 -1
  124. package/dist/content/rules/hatch3r-ci-cd.mdc +6 -0
  125. package/dist/content/rules/hatch3r-clarification-default.md +73 -0
  126. package/dist/content/rules/hatch3r-clarification-default.mdc +73 -0
  127. package/dist/content/rules/hatch3r-code-standards.md +23 -47
  128. package/dist/content/rules/hatch3r-code-standards.mdc +22 -46
  129. package/dist/content/rules/hatch3r-component-conventions.md +3 -0
  130. package/dist/content/rules/hatch3r-component-conventions.mdc +3 -0
  131. package/dist/content/rules/hatch3r-container-hardening.md +11 -2
  132. package/dist/content/rules/hatch3r-container-hardening.mdc +9 -1
  133. package/dist/content/rules/hatch3r-contract-testing.md +2 -1
  134. package/dist/content/rules/hatch3r-cost-visibility.md +135 -0
  135. package/dist/content/rules/hatch3r-cost-visibility.mdc +135 -0
  136. package/dist/content/rules/hatch3r-cq-rule-frame.md +54 -0
  137. package/dist/content/rules/hatch3r-cq-rule-frame.mdc +49 -0
  138. package/dist/content/rules/hatch3r-data-classification.md +3 -1
  139. package/dist/content/rules/hatch3r-data-classification.mdc +2 -1
  140. package/dist/content/rules/hatch3r-deep-context.md +13 -13
  141. package/dist/content/rules/hatch3r-deep-context.mdc +13 -13
  142. package/dist/content/rules/hatch3r-dependency-management.md +16 -3
  143. package/dist/content/rules/hatch3r-dependency-management.mdc +15 -3
  144. package/dist/content/rules/hatch3r-design-system-detection.md +2 -1
  145. package/dist/content/rules/hatch3r-dotnet-patterns.md +104 -0
  146. package/dist/content/rules/hatch3r-dotnet-patterns.mdc +99 -0
  147. package/dist/content/rules/hatch3r-edge-case-discipline.md +65 -0
  148. package/dist/content/rules/hatch3r-edge-case-discipline.mdc +65 -0
  149. package/dist/content/rules/hatch3r-enhancability.md +147 -0
  150. package/dist/content/rules/hatch3r-enhancability.mdc +142 -0
  151. package/dist/content/rules/hatch3r-event-schema-evolution.md +2 -1
  152. package/dist/content/rules/hatch3r-fan-out-discipline.md +91 -0
  153. package/dist/content/rules/hatch3r-fan-out-discipline.mdc +91 -0
  154. package/dist/content/rules/hatch3r-feature-flags.md +2 -0
  155. package/dist/content/rules/hatch3r-feature-flags.mdc +2 -0
  156. package/dist/content/rules/hatch3r-flutter-patterns.md +88 -0
  157. package/dist/content/rules/hatch3r-flutter-patterns.mdc +83 -0
  158. package/dist/content/rules/hatch3r-git-conventions.md +4 -1
  159. package/dist/content/rules/hatch3r-git-conventions.mdc +2 -0
  160. package/dist/content/rules/hatch3r-go-patterns.md +98 -0
  161. package/dist/content/rules/hatch3r-go-patterns.mdc +93 -0
  162. package/dist/content/rules/hatch3r-handoff-readiness.md +10 -0
  163. package/dist/content/rules/hatch3r-handoff-readiness.mdc +10 -0
  164. package/dist/content/rules/hatch3r-i18n.md +2 -0
  165. package/dist/content/rules/hatch3r-i18n.mdc +2 -0
  166. package/dist/content/rules/hatch3r-iteration-summary.md +75 -57
  167. package/dist/content/rules/hatch3r-iteration-summary.mdc +77 -54
  168. package/dist/content/rules/hatch3r-learning-system.md +202 -0
  169. package/dist/content/rules/hatch3r-learning-system.mdc +202 -0
  170. package/dist/content/rules/hatch3r-maintainability.md +157 -0
  171. package/dist/content/rules/hatch3r-maintainability.mdc +152 -0
  172. package/dist/content/rules/hatch3r-migrations.md +2 -1
  173. package/dist/content/rules/hatch3r-observability-logging.md +1 -1
  174. package/dist/content/rules/hatch3r-observability-metrics.md +1 -1
  175. package/dist/content/rules/hatch3r-observability-tracing.md +45 -36
  176. package/dist/content/rules/hatch3r-observability-tracing.mdc +44 -35
  177. package/dist/content/rules/hatch3r-operability.md +2 -1
  178. package/dist/content/rules/hatch3r-passkey-server.md +2 -1
  179. package/dist/content/rules/hatch3r-performance-budgets.md +2 -0
  180. package/dist/content/rules/hatch3r-performance-budgets.mdc +2 -0
  181. package/dist/content/rules/hatch3r-php-laravel-patterns.md +109 -0
  182. package/dist/content/rules/hatch3r-php-laravel-patterns.mdc +104 -0
  183. package/dist/content/rules/hatch3r-progressive-delivery.md +5 -1
  184. package/dist/content/rules/hatch3r-progressive-delivery.mdc +3 -0
  185. package/dist/content/rules/hatch3r-proof-model.md +131 -0
  186. package/dist/content/rules/hatch3r-proof-model.mdc +131 -0
  187. package/dist/content/rules/hatch3r-python-patterns.md +70 -0
  188. package/dist/content/rules/hatch3r-python-patterns.mdc +65 -0
  189. package/dist/content/rules/hatch3r-react-native-patterns.md +83 -0
  190. package/dist/content/rules/hatch3r-react-native-patterns.mdc +78 -0
  191. package/dist/content/rules/hatch3r-resilience-patterns.md +2 -1
  192. package/dist/content/rules/hatch3r-reviewer-calibration.md +84 -0
  193. package/dist/content/rules/hatch3r-reviewer-calibration.mdc +84 -0
  194. package/dist/content/rules/hatch3r-right-sizing.md +68 -0
  195. package/dist/content/rules/hatch3r-right-sizing.mdc +66 -0
  196. package/dist/content/rules/hatch3r-ruby-rails-patterns.md +111 -0
  197. package/dist/content/rules/hatch3r-ruby-rails-patterns.mdc +106 -0
  198. package/dist/content/rules/hatch3r-rust-patterns.md +107 -0
  199. package/dist/content/rules/hatch3r-rust-patterns.mdc +102 -0
  200. package/dist/content/rules/hatch3r-scalability.md +137 -0
  201. package/dist/content/rules/hatch3r-scalability.mdc +132 -0
  202. package/dist/content/rules/hatch3r-secrets-management.md +10 -1
  203. package/dist/content/rules/hatch3r-secrets-management.mdc +8 -0
  204. package/dist/content/rules/hatch3r-security-patterns.md +36 -34
  205. package/dist/content/rules/hatch3r-security-patterns.mdc +35 -34
  206. package/dist/content/rules/hatch3r-security.md +97 -0
  207. package/dist/content/rules/hatch3r-security.mdc +92 -0
  208. package/dist/content/rules/hatch3r-swiftui-patterns.md +98 -0
  209. package/dist/content/rules/hatch3r-swiftui-patterns.mdc +93 -0
  210. package/dist/content/rules/hatch3r-testability.md +115 -0
  211. package/dist/content/rules/hatch3r-testability.mdc +110 -0
  212. package/dist/content/rules/hatch3r-testing.md +4 -1
  213. package/dist/content/rules/hatch3r-testing.mdc +2 -0
  214. package/dist/content/rules/hatch3r-theming.md +2 -0
  215. package/dist/content/rules/hatch3r-theming.mdc +2 -0
  216. package/dist/content/rules/hatch3r-tool-currency.md +91 -0
  217. package/dist/content/rules/hatch3r-tool-currency.mdc +86 -0
  218. package/dist/content/rules/hatch3r-tooling-hierarchy.md +29 -31
  219. package/dist/content/rules/hatch3r-tooling-hierarchy.mdc +27 -30
  220. package/dist/content/rules/hatch3r-typescript-patterns.md +58 -0
  221. package/dist/content/rules/hatch3r-typescript-patterns.mdc +53 -0
  222. package/dist/content/rules/hatch3r-ux-states-and-flows.md +11 -4
  223. package/dist/content/rules/hatch3r-ux-states-and-flows.mdc +9 -3
  224. package/dist/content/skills/hatch3r-a11y-audit/SKILL.md +10 -8
  225. package/dist/content/skills/hatch3r-a11y-audit/references/manual-audit-checklist.md +7 -5
  226. package/dist/content/skills/hatch3r-adhoc-orchestrate/SKILL.md +131 -0
  227. package/dist/content/skills/hatch3r-ai-feature/SKILL.md +4 -6
  228. package/dist/content/skills/hatch3r-api-spec/SKILL.md +27 -2
  229. package/dist/content/skills/hatch3r-architecture-review/SKILL.md +4 -7
  230. package/dist/content/skills/hatch3r-board-groom/SKILL.md +11 -0
  231. package/dist/content/skills/hatch3r-board-init/SKILL.md +17 -1
  232. package/dist/content/skills/hatch3r-board-refresh/SKILL.md +12 -1
  233. package/dist/content/skills/hatch3r-board-shared/SKILL.md +38 -1
  234. package/dist/content/skills/hatch3r-browser-verify/SKILL.md +307 -0
  235. package/dist/content/skills/hatch3r-bug-fix/SKILL.md +15 -2
  236. package/dist/content/skills/hatch3r-ci-pipeline/SKILL.md +17 -7
  237. package/dist/content/skills/hatch3r-cli-fd/SKILL.md +33 -1
  238. package/dist/content/skills/hatch3r-cli-fzf/SKILL.md +33 -1
  239. package/dist/content/skills/hatch3r-cli-gh/SKILL.md +50 -1
  240. package/dist/content/skills/hatch3r-cli-jq/SKILL.md +40 -6
  241. package/dist/content/skills/hatch3r-cli-ripgrep/SKILL.md +33 -1
  242. package/dist/content/skills/hatch3r-cli-toolbox/SKILL.md +130 -23
  243. package/dist/content/skills/hatch3r-containerize/SKILL.md +157 -0
  244. package/dist/content/skills/hatch3r-context-health/SKILL.md +9 -7
  245. package/dist/content/skills/hatch3r-cost-tracking/SKILL.md +37 -17
  246. package/dist/content/skills/hatch3r-customize/SKILL.md +5 -8
  247. package/dist/content/skills/hatch3r-dep-audit/SKILL.md +23 -7
  248. package/dist/content/skills/hatch3r-design-system-detect/SKILL.md +3 -7
  249. package/dist/content/skills/hatch3r-docs-writing/SKILL.md +159 -0
  250. package/dist/content/skills/hatch3r-enhancability-verify/SKILL.md +152 -0
  251. package/dist/content/skills/hatch3r-feature/SKILL.md +53 -3
  252. package/dist/content/skills/hatch3r-feedback/SKILL.md +103 -0
  253. package/dist/content/skills/hatch3r-gh-agentic-workflows/SKILL.md +10 -8
  254. package/dist/content/skills/hatch3r-handoff-prepare/SKILL.md +4 -7
  255. package/dist/content/skills/hatch3r-handoff-resume/SKILL.md +4 -7
  256. package/dist/content/{commands/hatch3r-hooks.md → skills/hatch3r-hooks/SKILL.md} +48 -137
  257. package/dist/content/skills/hatch3r-incident-response/SKILL.md +66 -7
  258. package/dist/content/skills/hatch3r-issue-workflow/SKILL.md +11 -0
  259. package/dist/content/skills/hatch3r-learn/SKILL.md +317 -0
  260. package/dist/content/skills/hatch3r-logical-refactor/SKILL.md +6 -7
  261. package/dist/content/skills/hatch3r-maintainability-verify/SKILL.md +146 -0
  262. package/dist/content/skills/hatch3r-migration/SKILL.md +8 -7
  263. package/dist/content/skills/hatch3r-observability-verify/SKILL.md +17 -12
  264. package/dist/content/skills/hatch3r-perf-audit/SKILL.md +13 -9
  265. package/dist/content/skills/hatch3r-pr-creation/SKILL.md +4 -7
  266. package/dist/content/skills/hatch3r-qa-validation/SKILL.md +6 -5
  267. package/dist/content/skills/hatch3r-recipe/SKILL.md +63 -60
  268. package/dist/content/skills/hatch3r-refactor/SKILL.md +6 -7
  269. package/dist/content/skills/hatch3r-release/SKILL.md +123 -11
  270. package/dist/content/skills/hatch3r-reliability-verify/SKILL.md +9 -5
  271. package/dist/content/{commands/hatch3r-report.md → skills/hatch3r-report/SKILL.md} +20 -17
  272. package/dist/content/skills/hatch3r-scalability-verify/SKILL.md +145 -0
  273. package/dist/content/skills/hatch3r-security-verify/SKILL.md +144 -0
  274. package/dist/content/skills/hatch3r-team-convention-author/SKILL.md +126 -0
  275. package/dist/content/skills/hatch3r-testability-verify/SKILL.md +147 -0
  276. package/dist/content/skills/hatch3r-ui-ux-verify/SKILL.md +19 -11
  277. package/dist/content/skills/hatch3r-visual-refactor/SKILL.md +11 -7
  278. package/package.json +50 -31
  279. package/dist/cli/index.d.ts +0 -2
  280. package/dist/cli/index.js.map +0 -1
  281. package/dist/content/agents/hatch3r-a11y-auditor.md +0 -159
  282. package/dist/content/agents/hatch3r-dependency-auditor.md +0 -219
  283. package/dist/content/agents/hatch3r-perf-profiler.md +0 -166
  284. package/dist/content/agents/hatch3r-security-auditor.md +0 -180
  285. package/dist/content/agents/hatch3r-test-writer.md +0 -171
  286. package/dist/content/commands/hatch3r-learn.md +0 -312
  287. package/dist/content/rules/hatch3r-learning-consult.md +0 -42
  288. package/dist/content/rules/hatch3r-learning-consult.mdc +0 -38
@@ -1,38 +1,37 @@
1
1
  ---
2
2
  id: hatch3r-hooks
3
- type: command
4
- orchestrator: false
5
- description: Define and manage event-driven hooks that activate agents on project events
3
+ name: hatch3r-hooks
4
+ type: skill
5
+ description: Define, edit, and manage event-driven hooks that activate agents on project events. Tool-agnostic — adapters translate hook definitions into tool-native configurations during `npx hatch3r sync`.
6
6
  tags: [devops, orchestration]
7
7
  quality_charter: agents/shared/quality-charter.md
8
8
  efficiency_patterns: agents/shared/efficiency-patterns.md
9
9
  cache_friendly: true
10
- parallel_tool_default: true
11
10
  ---
12
11
 
13
- ## §0 Detect Ambiguity (P8 B1)
12
+ # Hooks Event-Driven Agent Activation
14
13
 
15
- Before any action, scan the user's request and provided context for unresolved questions in scope, acceptance criteria, irreversibility, or constraint conflicts (contradictory inputs, missing target, unknown convention). If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` — do not proceed under silent assumption. This is the default path, not an exception. Acceptable to proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable. Any residual ambiguity discovered mid-workflow invokes the same protocol.
14
+ ## Quick Start
16
15
 
17
- ## Agent Pipeline
16
+ ```
17
+ Task Progress:
18
+ - [ ] Step 0: Detect ambiguity (P8 B1)
19
+ - [ ] Step 1: Discover current state
20
+ - [ ] Step 2: Define a hook (add) — select event, agent, conditions, write definition file
21
+ - [ ] Step 3: Edit an existing hook
22
+ - [ ] Step 4: Remove a hook
23
+ - [ ] Step 5: Sync hooks to tools
24
+ ```
18
25
 
19
- This command runs as a single orchestrator without sub-agent delegation. Hook definition and management are performed inline.
26
+ ## Step 0 Detect Ambiguity (P8 B1)
27
+
28
+ Before any action, scan the user's request and provided context for unresolved questions in scope, acceptance criteria, irreversibility, or constraint conflicts (contradictory inputs, missing target, unknown convention). If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` — do not proceed under silent assumption. This is the default path, not an exception. Acceptable to proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable. Any residual ambiguity discovered mid-workflow invokes the same protocol.
20
29
 
21
30
  ## Learnings Consultation
22
31
 
23
32
  If `.hatch3r/learnings/` exists, scan for learnings related to hook configurations, event trigger patterns, or prior hook issues before starting.
24
33
 
25
- # Hooks Event-Driven Agent Activation
26
-
27
- Define, edit, and manage event-driven hooks that automatically activate hatch3r agents when specific project events occur. Hook definitions are tool-agnostic — the adapter pipeline translates them into tool-native configurations during `npx hatch3r sync`.
28
-
29
- ---
30
-
31
- ## Workflow
32
-
33
- Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
34
-
35
- ### Step 1: Discover Current State
34
+ ## Step 1: Discover Current State
36
35
 
37
36
  1. Check `hooks/` for existing hook definition files (`.md` files with frontmatter).
38
37
  2. Read `.hatch3r/hatch.json` for configured tools and features.
@@ -48,13 +47,11 @@ Hooks Feature: {enabled/disabled}
48
47
 
49
48
  **ASK:** "Current hooks: {list or 'none'}. Tools: {list}. What would you like to do? (a) Add a new hook, (b) Edit existing hook, (c) Remove a hook, (d) List all hooks, (e) Sync hooks to tools"
50
49
 
51
- ---
52
-
53
- ### Step 2: Define Hook
50
+ ## Step 2: Define Hook
54
51
 
55
52
  For adding a new hook:
56
53
 
57
- #### 2a. Select Event
54
+ ### 2a. Select Event
58
55
 
59
56
  Present available events with descriptions:
60
57
 
@@ -79,19 +76,22 @@ Present available events with descriptions:
79
76
  | `on-dependency-change` | Triggered when dependencies are added/updated/removed | Security audit, compatibility check, license validation |
80
77
  | `on-security-finding` | Triggered when a security issue is discovered | Alert escalation, auto-fix suggestions, incident creation |
81
78
 
79
+ > [!IMPORTANT]
80
+ > Claude Code only maps `session-start` → `SessionStart` semantically. Every other event above (pre-commit, post-merge, ci-failure, file-save, pre-push, etc.) is a git/project lifecycle event with NO native Claude Code mapping — the adapter emits a no-op or alternative strategy, NOT a PreToolUse/PostToolUse binding. If the user picks one of these and targets Claude Code, say so before writing the definition. Full detail: the "Claude Code event mapping" note in Step 2d below.
81
+
82
82
  **ASK:** "Select an event for this hook."
83
83
 
84
- #### 2b. Select Agent
84
+ ### 2b. Select Agent
85
85
 
86
86
  Present available hatch3r agents:
87
87
 
88
88
  - `lint-fixer` — Automatic lint error resolution
89
- - `test-writer` — Test generation for new or changed code
89
+ - `hatch3r-testability` — Test generation for new or changed code
90
90
  - `reviewer` — Code review and quality checks
91
- - `security-auditor` — Security vulnerability scanning
91
+ - `hatch3r-security` — Security vulnerability scanning
92
92
  - `ci-watcher` — CI/CD pipeline monitoring and diagnosis
93
93
  - `a11y-auditor` — Accessibility compliance checks
94
- - `perf-profiler` — Performance analysis and optimization
94
+ - `hatch3r-performance` — Performance analysis and optimization
95
95
  - `dependency-auditor` — Dependency security and update checks
96
96
  - `docs-writer` — Documentation generation and updates
97
97
 
@@ -99,14 +99,14 @@ If the user wants a custom agent name not in this list, accept it but warn that
99
99
 
100
100
  **ASK:** "Select an agent to activate when this event fires."
101
101
 
102
- #### 2c. Define Conditions (Optional)
102
+ ### 2c. Define Conditions (Optional)
103
103
 
104
104
  - **Glob patterns:** Which files trigger this hook (e.g., `src/**/*.ts`, `*.css`)
105
105
  - **Branch patterns:** Which branches (e.g., `main`, `release/*`)
106
106
 
107
107
  **ASK:** "Add conditions? (glob patterns, branch patterns, or skip for 'always activate')"
108
108
 
109
- #### 2d. Write Hook Definition File
109
+ ### 2d. Write Hook Definition File
110
110
 
111
111
  Generate the hook definition file at `hooks/{event}-{agent-short-name}.md`:
112
112
 
@@ -141,9 +141,7 @@ Claude Code event mapping: **Claude Code's native hook events (PreToolUse, PostT
141
141
 
142
142
  **ASK:** "Hook definition: {summary}. Create? (yes / adjust / cancel)"
143
143
 
144
- ---
145
-
146
- ### Step 3: Edit Existing Hook
144
+ ## Step 3: Edit Existing Hook
147
145
 
148
146
  For editing an existing hook:
149
147
 
@@ -154,9 +152,7 @@ For editing an existing hook:
154
152
 
155
153
  **ASK:** "Updated hook: {summary}. Save? (yes / revert / cancel)"
156
154
 
157
- ---
158
-
159
- ### Step 4: Remove a Hook
155
+ ## Step 4: Remove a Hook
160
156
 
161
157
  1. List all hooks and ask which to remove.
162
158
  2. Show the hook definition.
@@ -165,9 +161,7 @@ For editing an existing hook:
165
161
 
166
162
  3. Delete the file. Warn that tool-specific generated files (e.g., `.cursor/rules/hatch3r-hook-*.mdc`) will be cleaned up on the next `npx hatch3r sync`.
167
163
 
168
- ---
169
-
170
- ### Step 5: Sync Hooks to Tools
164
+ ## Step 5: Sync Hooks to Tools
171
165
 
172
166
  1. Read all hook definitions from `hooks/`.
173
167
  2. For each configured tool in `hatch.json`, describe what will be generated:
@@ -176,111 +170,28 @@ For editing an existing hook:
176
170
  - **Others:** No-op (hook definitions stored for future adapter support)
177
171
  3. Present the list of files that will be generated/updated.
178
172
 
173
+ > [!IMPORTANT]
174
+ > For Claude Code, only `session-start` becomes an executable native hook. Git/project-event hooks (pre-commit, post-merge, ci-failure, file-save, pre-push, etc.) are written to `CLAUDE.md` as documentation, NOT registered as native Claude Code hooks — they do not fire on the named event. State this explicitly when listing the generated Claude Code output (see the "Claude Code event mapping" note in Step 2d).
175
+
179
176
  **ASK:** "Hooks will generate these files: {list}. Run `npx hatch3r sync` to apply. (understood / sync now)"
180
177
 
181
178
  If user chooses "sync now", instruct them to run `npx hatch3r sync` in the terminal.
182
179
 
183
- ---
184
-
185
- ## Custom Events
186
-
187
- Define project-specific hook events beyond the built-in types:
180
+ ## Hook Definition Schema (implemented surface)
188
181
 
189
- - **Event naming**: `custom:{domain}:{action}` (e.g., `custom:billing:subscription-change`)
190
- - **Event registration**: Add custom events to `hatch.json` under `hooks.customEvents`
191
- - **Event triggering**: Agents trigger custom events via `emit-hook custom:{name}` in their workflows
192
- - **Event payload**: Custom events can pass structured data to hook handlers via JSON payload
182
+ A hook is a single canonical artifact: one event fires one agent, optionally narrowed by conditions. The fields below are the complete config that adapters honor today (`src/hooks/types.ts` `HookDefinition` + `HookCondition`):
193
183
 
194
- ### Custom Event Definition
184
+ | Field | Required | Meaning |
185
+ |-------|----------|---------|
186
+ | `id` | yes | Unique hook identifier (sanitized for shell safety). |
187
+ | `event` | yes | Lifecycle event from the events table in Step 2a. |
188
+ | `agent` | yes | Agent ID dispatched when the event fires. |
189
+ | `description` | yes | Human-readable purpose. |
190
+ | `globs` | no | File glob patterns — hook fires only when matching files are affected. |
191
+ | `branches` | no | Branch name patterns — hook fires only on matching branches. |
192
+ | `labels` | no | Issue/PR labels — hook fires only when matching labels are present. |
195
193
 
196
- In `hatch.json`:
197
-
198
- ```json
199
- {
200
- "hooks": {
201
- "customEvents": [
202
- {
203
- "name": "custom:billing:subscription-change",
204
- "description": "Fired when a subscription plan changes",
205
- "payload": { "userId": "string", "oldPlan": "string", "newPlan": "string" }
206
- }
207
- ]
208
- }
209
- }
210
- ```
211
-
212
- Custom events follow the same hook definition format as built-in events — create a hook file in `hooks/` with `event: custom:{domain}:{action}`.
213
-
214
- ---
215
-
216
- ## Hook Chaining
217
-
218
- Hooks can trigger other hooks in sequence:
219
-
220
- - **Chain definition**: Define ordered hook chains in `hatch.json` under `hooks.chains`
221
- - **Execution order**: Hooks in a chain execute sequentially; failure in any hook stops the chain
222
- - **Error handling**: Chain-level error handlers can catch and handle failures from individual hooks
223
- - **Conditional chaining**: Hooks can conditionally trigger next hook based on output (pass/fail/skip)
224
-
225
- ### Chain Definition
226
-
227
- In `hatch.json`:
228
-
229
- ```json
230
- {
231
- "hooks": {
232
- "chains": [
233
- {
234
- "id": "pre-release-pipeline",
235
- "description": "Full pre-release validation chain",
236
- "steps": [
237
- { "hook": "pre-release-security-auditor", "on_fail": "stop" },
238
- { "hook": "pre-release-test-writer", "on_fail": "stop" },
239
- { "hook": "pre-release-docs-writer", "on_fail": "warn" }
240
- ],
241
- "on_error": "notify"
242
- }
243
- ]
244
- }
245
- }
246
- ```
247
-
248
- Chains are triggered by referencing the chain ID as the hook target. Individual hook results (`pass`, `fail`, `skip`) determine whether the chain continues.
249
-
250
- ---
251
-
252
- ## Hook Execution Ordering
253
-
254
- When multiple hooks are registered for the same event:
255
-
256
- - **Priority**: Hooks have a priority field (1-100, lower runs first, default 50)
257
- - **Parallel vs Sequential**: Hooks at the same priority level run in parallel; different priority levels run sequentially
258
- - **Timeout**: Each hook has a configurable timeout (default 30 seconds). Timed-out hooks are reported as failures.
259
- - **Isolation**: Each hook runs in its own context. Hook outputs are collected but don't affect other hooks unless chained.
260
-
261
- ### Priority Configuration
262
-
263
- Add `priority` and `timeout` to hook frontmatter:
264
-
265
- ```markdown
266
- ---
267
- id: my-pre-commit-lint-fixer
268
- type: hook
269
- event: pre-commit
270
- agent: lint-fixer
271
- priority: 10
272
- timeout: 60
273
- ---
274
- ```
275
-
276
- ### Execution Example
277
-
278
- For `pre-commit` with three hooks:
279
- 1. `lint-fixer` (priority 10) — runs first
280
- 2. `security-auditor` (priority 20) — runs second
281
- 3. `test-writer` (priority 50) and `reviewer` (priority 50) — run in parallel, third
282
-
283
- ---
194
+ There is no chaining, custom-event, priority, timeout, or parallel-by-priority config: each hook is independent, the adapter emits one tool-native entry per hook, and ordering across multiple hooks on the same event is the tool's own (Claude Code stacks matcher entries; Cursor stacks `.cursor/hooks.json` entries). Do not author `hooks.chains`, `hooks.customEvents`, `emit-hook`, `priority:`, or `timeout:` — no code consumes them.
284
195
 
285
196
  ## Error Handling
286
197
 
@@ -297,5 +208,5 @@ For `pre-commit` with three hooks:
297
208
  - Never delete hook files without explicit user confirmation.
298
209
  - Always validate event names against the known events list.
299
210
  - Hook IDs must be unique across all hook definitions.
300
- - The command creates hook DEFINITIONS only — actual hook registration happens via `npx hatch3r sync`.
211
+ - The skill creates hook DEFINITIONS only — actual hook registration happens via `npx hatch3r sync`.
301
212
  - Do not modify adapter output files directly — they are managed by the sync pipeline.
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  id: hatch3r-incident-response
3
- description: Handle production incidents with structured triage, mitigation, and post-mortem. Use when responding to production issues, outages, or security incidents.
3
+ name: hatch3r-incident-response
4
+ type: skill
5
+ description: Handles production incidents with structured triage, mitigation, and post-mortem. Use when responding to production issues, outages, or security incidents.
4
6
  tags: [devops]
5
7
  quality_charter: agents/shared/quality-charter.md
6
8
  efficiency_patterns: agents/shared/efficiency-patterns.md
@@ -8,12 +10,23 @@ cache_friendly: true
8
10
  ---
9
11
  # Incident Response Workflow
10
12
 
13
+ ## Relationship to `commands/hatch3r-incident-response.md` (Decision 13 handoff)
14
+
15
+ This skill shares the `id: hatch3r-incident-response` with the orchestrator command `commands/hatch3r-incident-response.md`. The two are NOT duplicates — they split the incident workflow by execution model per CONSTITUTION §6 Decision 13:
16
+
17
+ - **`commands/hatch3r-incident-response.md` (orchestrator entry):** the delegated live-incident pipeline — a hatch3r-incident-responder specialist drives triage → bounded-autonomy mitigation → communication → blameless post-mortem, and a hatch3r-reliability specialist runs the post-incident telemetry/SLO reconstruction in parallel once stabilized (`agentPipeline: [hatch3r-incident-responder, hatch3r-reliability]`). Use the command for a live production incident that warrants specialist fan-out (parallel mitigation + reliability reconstruction); a security-suspected incident adds hatch3r-security.
18
+ - **This skill (inline procedure):** the single-pass reference body the responder follows for the classify → topology → triage → mitigate → root-cause → post-mortem sequence. Use the skill directly for a Tier 1 single-service incident where no fan-out is needed, OR as the step-by-step procedure the command's incident-responder stage executes.
19
+ - **Unique to this skill:** the Bounded Autonomy & Escalation matrix (auto-action vs human-gate threshold by severity) and the Telemetry Sources adapter (signal-by-capability-class) are the inline-procedure detail the command references rather than restates.
20
+
21
+ The merge-candidate review (F16.3-H3) flagged the shared id; this handoff documentation is the explicit workflow-split declaration that disambiguates the pair, enforced by the Decision-13 command↔skill gate in `src/cli/commands/validate.ts`. A future collapse into a single command appendix requires coordinated edits to the command body, the bundled content inventory (skills count), and that gate.
22
+
11
23
  ## Quick Start
12
24
 
13
25
  ```
14
26
  Task Progress:
15
27
  - [ ] Step 0: Detect ambiguity (P8 B1)
16
28
  - [ ] Step 1: Classify severity (P0-P3) based on impact
29
+ - [ ] Step 1b: Capture topology context — impacted service graph + upstream/downstream deps
17
30
  - [ ] Step 2: Triage — identify affected systems, user impact, blast radius
18
31
  - [ ] Step 3: Mitigate — apply hotfix or rollback, verify mitigation works
19
32
  - [ ] Step 4: Root cause analysis — trace the failure chain
@@ -21,18 +34,47 @@ Task Progress:
21
34
  - [ ] Step 6: Create follow-up issues for permanent fixes and preventive measures
22
35
  ```
23
36
 
37
+ Two policies bound this workflow before any remediation action runs: the **Bounded Autonomy & Escalation** matrix (which actions auto-execute vs require a human gate, by severity) and the **Telemetry Sources** adapter (where to read signal, by capability class). Both are defined below; read them before Step 3.
38
+
24
39
  ## Step 0 — Detect Ambiguity (P8 B1)
25
40
 
26
41
  Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target environment, or irreversibility. If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md`. Do not proceed under silent assumption. Default path, not an exception. Triggers for THIS skill: user-facing impact vs internal-only, blast radius known (single tenant vs all users), rollback safety verified, stakeholder notification scope (engineering vs exec vs public), and whether mitigation requires data write (irreversible) vs config flip (reversible).
27
42
 
28
43
  ## Fan-out Discipline (P8 B2)
29
44
 
30
- This skill delegates per task size:
31
- - Tier 1 (trivial single-file): inline execution acceptable.
32
- - Tier 2 (multi-file or multi-concern): spawn parallel sub-agents per concern via the Task tool.
33
- - Tier 3 (multi-module / high-risk): one fresh sub-agent per independent module or gate; orchestrator integrates only.
45
+ Fan-out scales with task size; token cost never justifies serializing independent work (`rules/hatch3r-fan-out-discipline.md` P8 B2; `agents/shared/efficiency-patterns.md`). Emit `sub_agents_spawned: { count, rationale }` in your output.
46
+
47
+ ## Bounded Autonomy & Escalation
48
+
49
+ An agent acting in a live incident operates under bounded autonomy: actions are bounded, reversible-first, and gated on a human-in-the-loop for high-blast-radius severities. This matrix sets the auto-action vs escalation threshold by severity. Match the row to the severity assigned in Step 1.
50
+
51
+ | Severity | Autonomy bound | Required gate before action |
52
+ | -------- | -------------- | --------------------------- |
53
+ | P0 | No autonomous mutation. Investigate, build the timeline, propose a diff — do not apply. | Human approval required before any mitigation. Page on-call; do not self-execute. |
54
+ | P1 | Confidence-routed. High-confidence reversible action (flag flip, scale-up, documented rollback) may auto-apply WITH a diff preview emitted first; low-confidence or irreversible action escalates. | Human gate when confidence is medium/low OR the action writes data / is irreversible. |
55
+ | P2 | Auto-remediation acceptable for reversible actions with a diff preview emitted before apply. | Human gate only for irreversible (data-write, schema, destructive) actions. |
56
+ | P3 | Auto-remediation acceptable. | None for reversible actions; flag irreversible actions for review. |
57
+
58
+ Rules that hold across all rows:
59
+
60
+ - **Reversibility-first.** Prefer the reversible mitigation (feature-flag flip, config revert, scale-up, deploy rollback) over an irreversible one (data write, schema change). An irreversible action escalates one severity band on the gate column.
61
+ - **Diff preview before apply.** Any auto-applied mutation emits the exact change (command, flag, config delta) before execution, never after.
62
+ - **Confidence routing.** State confidence (high/medium/low per `agents/shared/quality-charter.md` section 1) on every proposed mitigation. Medium/low confidence on P1 routes to a human gate.
63
+ - **Audit trail.** Every action (auto or gated) is recorded in the incident timeline (Step 5) with actor, timestamp, and the gate decision.
34
64
 
35
- Never under-fan-out to save tokens. Token cost is dominated by quality and completeness gains. Emit `sub_agents_spawned: { count, rationale }` in your output.
65
+ ## Telemetry Sources
66
+
67
+ Capture signal from the project's observability stack before declaring blast radius (Step 1b) and when verifying mitigation (Step 3). Read the configured stack from project conventions; do not assume a vendor. Adapter patterns by capability class:
68
+
69
+ | Capability class | What to read | Common providers |
70
+ | ---------------- | ------------ | ---------------- |
71
+ | Distributed traces | Request path spans, `trace_id`/`span_id` correlation, latency percentiles | OpenTelemetry-compatible backend, Datadog APM, Grafana Tempo |
72
+ | Metrics (RED/USE) | Rate, Errors, Duration per route; Utilization, Saturation, Errors per resource | Prometheus/Grafana, CloudWatch, Datadog |
73
+ | Logs | Structured JSON with `trace_id`, service+version+environment, error-level stack traces | Splunk, CloudWatch Logs, Loki |
74
+ | Error tracking | Grouped exceptions with release + environment tags | Sentry-class tracker |
75
+ | Deploy/change history | Recent deploys, config changes, dependency bumps correlated to incident start | Platform CLI (`gh`/`az`/`glab`), CI deploy log |
76
+
77
+ Reference `rules/hatch3r-observability-tracing.md` and `rules/hatch3r-observability-logging.md` for the end-user instrumentation floor these sources read from. When a capability class is not instrumented in the project, record the gap as a post-mortem action item rather than assuming data exists.
36
78
 
37
79
  ## Step 1: Classify Severity
38
80
 
@@ -49,6 +91,17 @@ Never under-fan-out to save tokens. Token cost is dominated by quality and compl
49
91
  - **GitLab:** `glab issue list --search "..."` or `glab issue view N`
50
92
  - For external library docs and current best practices, follow the project's tooling hierarchy.
51
93
 
94
+ ## Step 1b: Capture Topology Context
95
+
96
+ Before declaring blast radius in Step 2, map the impacted service graph. A correct blast-radius estimate depends on knowing what the failing component talks to — upstream callers amplify user impact, downstream dependencies are candidate root causes.
97
+
98
+ 1. **Identify the impacted node(s):** which service, function, or resource is emitting the failure signal (from the Telemetry Sources above).
99
+ 2. **Trace upstream:** which services/clients call the impacted node? These define the user-facing blast radius — a failure in a shared dependency fans out to every caller.
100
+ 3. **Trace downstream:** which dependencies does the impacted node call (database, queue, third-party API, RPC peer)? A downstream failure is a candidate root cause, not a symptom site.
101
+ 4. **Record the graph:** capture the upstream/downstream edges (from distributed traces, a service catalog, or an architecture ADR in project docs) before estimating blast radius. If no service map exists, reconstruct it from trace spans and note the absence as a post-mortem action item.
102
+
103
+ Output a one-line topology summary: `impacted: {node} | upstream callers: {list} | downstream deps: {list}`. Step 2 blast-radius estimation consumes this directly.
104
+
52
105
  ## Step 2: Triage
53
106
 
54
107
  - **Affected systems:** Frontend, backend, database, auth, payment, third-party services?
@@ -61,7 +114,8 @@ Never under-fan-out to save tokens. Token cost is dominated by quality and compl
61
114
 
62
115
  - **Immediate actions:** Rollback last deploy, disable feature flag, revert config, scale up, or apply hotfix.
63
116
  - **Verification:** Confirm mitigation works — error rate drops, affected flow recovers.
64
- - **Communication:** Notify stakeholders if P0/P1. Document status in incident channel or issue.
117
+ - **Communication:** Notify stakeholders per the page-target SLA below. Document status in incident channel or issue.
118
+ - Default page-target by severity (tune per org): P0 — page on-call ≤5 min after detection; P1 — ≤15 min; P2 — ≤1 h; P3 — next business day.
65
119
  - Do not spend time on perfect fixes during active incident — stabilize first.
66
120
 
67
121
  ## Step 4: Root Cause Analysis
@@ -113,3 +167,8 @@ Store in project incident docs or as an issue/wiki page on the platform. Follow
113
167
  - Privacy/security specs: project documentation
114
168
  - Observability: project logging and correlation conventions
115
169
  - Error handling: project error handling patterns
170
+
171
+ ## References
172
+
173
+ - [Managing Incidents — Google SRE Book, ch. 14](https://sre.google/sre-book/managing-incidents/) — accessed 2026-05-31, official-docs (Google SRE). Source for the severity-tiered incident command structure and the timeline / post-mortem discipline in Steps 1–5.
174
+ - [Monitoring distributed systems (RED / USE / four golden signals) — Google SRE Book, ch. 6](https://sre.google/sre-book/monitoring-distributed-systems/) — accessed 2026-05-31, official-docs (Google SRE). Source for the RED/USE metric classes in the Telemetry Sources adapter and the blast-radius signal capture in Step 1b.
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-issue-workflow
3
+ name: hatch3r-issue-workflow
4
+ type: skill
3
5
  description: Guides the 8-step agentic development workflow for issues/work items. Covers parsing issues, loading skills, reading specs, planning, implementing, testing, opening PRs/MRs, and addressing review. Use when working on any issue/work item or when the user mentions an issue number.
4
6
  tags: [implementation, orchestration]
5
7
  quality_charter: agents/shared/quality-charter.md
@@ -121,6 +123,15 @@ Skip this step if the issue has no user-facing UI changes.
121
123
  - Push fixes as new commits (don't force-push during review).
122
124
  - Re-request review after addressing all comments.
123
125
 
126
+ ## Fan-out Discipline (P8 B2)
127
+
128
+ Fan-out scales with task size; token cost never justifies serializing independent work (`rules/hatch3r-fan-out-discipline.md` P8 B2; `agents/shared/efficiency-patterns.md`). Tier boundaries for THIS skill:
129
+ - Tier 1 (trivial single-file issue): inline.
130
+ - Tier 2 (multi-file or multi-concern issue): spawn parallel sub-agents per concern (researcher, implementer, reviewer) via the Task tool.
131
+ - Tier 3 (multi-module / high-risk issue): one fresh sub-agent per independent module or gate; orchestrator integrates only.
132
+
133
+ Emit `sub_agents_spawned: { count, rationale }` in your output.
134
+
124
135
  ## Error Handling
125
136
 
126
137
  - **Issue description is too vague to implement**: Do not guess. Ask the user for clarification on acceptance criteria, scope boundaries, and expected behavior before starting Step 3 (planning).