hatch3r 1.8.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 (396) hide show
  1. package/README.md +68 -178
  2. package/dist/cli/index.js +26966 -15942
  3. package/{agents → dist/content/agents}/hatch3r-architect.md +39 -9
  4. package/dist/content/agents/hatch3r-brownfield-spec.md +254 -0
  5. package/{agents → dist/content/agents}/hatch3r-ci-watcher.md +10 -3
  6. package/{agents → dist/content/agents}/hatch3r-context-rules.md +24 -6
  7. package/{agents → dist/content/agents}/hatch3r-creator.md +78 -39
  8. package/dist/content/agents/hatch3r-dependency-drafter.md +162 -0
  9. package/{agents → dist/content/agents}/hatch3r-devops.md +14 -4
  10. package/{agents → 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/{agents → dist/content/agents}/hatch3r-fixer.md +61 -10
  14. package/dist/content/agents/hatch3r-greenfield-spec.md +256 -0
  15. package/{agents → dist/content/agents}/hatch3r-handoff-loader.md +40 -14
  16. package/{agents → dist/content/agents}/hatch3r-handoff-preparer.md +17 -8
  17. package/dist/content/agents/hatch3r-implementer.md +409 -0
  18. package/dist/content/agents/hatch3r-incident-responder.md +96 -0
  19. package/dist/content/agents/hatch3r-learnings-loader.md +377 -0
  20. package/{agents → dist/content/agents}/hatch3r-lint-fixer.md +16 -4
  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/{agents → dist/content/agents}/hatch3r-researcher.md +30 -7
  26. package/dist/content/agents/hatch3r-reviewer.md +364 -0
  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/{agents → dist/content/agents}/modes/requirements-elicitation.md +1 -1
  33. package/{agents → 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/{agents → dist/content/agents}/shared/efficiency-patterns.md +32 -1
  38. package/{agents → dist/content/agents}/shared/external-knowledge.md +1 -1
  39. package/{agents → dist/content/agents}/shared/injection-patterns.md +19 -8
  40. package/dist/content/agents/shared/principles.md +60 -0
  41. package/{agents → dist/content/agents}/shared/prompt-structure.md +7 -1
  42. package/{agents → dist/content/agents}/shared/quality-charter.md +73 -9
  43. package/dist/content/agents/shared/quality-specialist-frame.md +141 -0
  44. package/dist/content/agents/shared/rigor-contract.md +151 -0
  45. package/dist/content/agents/shared/severity-mapping.md +92 -0
  46. package/dist/content/agents/shared/triage-vocabulary.md +46 -0
  47. package/{agents → dist/content/agents}/shared/user-content-templates.md +40 -14
  48. package/dist/content/agents/shared/user-question-protocol.md +139 -0
  49. package/{checks → dist/content/checks}/README.md +5 -0
  50. package/{checks → dist/content/checks}/accessibility.md +14 -7
  51. package/{checks → dist/content/checks}/code-quality.md +1 -1
  52. package/{checks → dist/content/checks}/performance.md +7 -4
  53. package/{checks → dist/content/checks}/security.md +6 -6
  54. package/{checks → dist/content/checks}/testing.md +1 -1
  55. package/{commands → dist/content/commands}/board/pickup-azure-devops.md +1 -1
  56. package/{commands → dist/content/commands}/board/pickup-delegation-multi.md +41 -14
  57. package/{commands → dist/content/commands}/board/pickup-delegation.md +10 -8
  58. package/{commands → dist/content/commands}/board/pickup-github.md +1 -1
  59. package/{commands → dist/content/commands}/board/pickup-gitlab.md +1 -1
  60. package/{commands → dist/content/commands}/board/pickup-modes.md +1 -0
  61. package/{commands → dist/content/commands}/board/pickup-post-impl.md +2 -2
  62. package/{commands → dist/content/commands}/board/shared-azure-devops.md +1 -1
  63. package/{commands → dist/content/commands}/board/shared-github.md +2 -2
  64. package/{commands → dist/content/commands}/board/shared-gitlab.md +1 -1
  65. package/{commands → dist/content/commands}/hatch3r-api-spec.md +80 -3
  66. package/dist/content/commands/hatch3r-auth-scaffold.md +250 -0
  67. package/{commands → dist/content/commands}/hatch3r-benchmark.md +91 -8
  68. package/{commands → dist/content/commands}/hatch3r-board-fill.md +104 -18
  69. package/{commands → dist/content/commands}/hatch3r-board-pickup.md +99 -15
  70. package/dist/content/commands/hatch3r-bug-pipeline.md +240 -0
  71. package/{commands → dist/content/commands}/hatch3r-bug-plan.md +84 -8
  72. package/{commands → dist/content/commands}/hatch3r-codebase-map.md +82 -6
  73. package/{commands → dist/content/commands}/hatch3r-create.md +116 -18
  74. package/{commands → dist/content/commands}/hatch3r-debug.md +112 -24
  75. package/dist/content/commands/hatch3r-diagnose.md +238 -0
  76. package/{commands → dist/content/commands}/hatch3r-feature-plan.md +130 -10
  77. package/dist/content/commands/hatch3r-handoff.md +213 -0
  78. package/{commands → dist/content/commands}/hatch3r-healthcheck.md +106 -6
  79. package/dist/content/commands/hatch3r-incident-response.md +228 -0
  80. package/{commands → dist/content/commands}/hatch3r-migration-plan.md +81 -5
  81. package/{commands → dist/content/commands}/hatch3r-onboard.md +100 -9
  82. package/dist/content/commands/hatch3r-pack-install.md +243 -0
  83. package/{commands → dist/content/commands}/hatch3r-pr-resolve.md +114 -31
  84. package/{commands → dist/content/commands}/hatch3r-project-spec.md +85 -9
  85. package/{commands → dist/content/commands}/hatch3r-quick-change.md +115 -20
  86. package/{commands → dist/content/commands}/hatch3r-refactor-plan.md +82 -6
  87. package/dist/content/commands/hatch3r-release.md +401 -0
  88. package/{commands → dist/content/commands}/hatch3r-revision.md +104 -18
  89. package/{commands → dist/content/commands}/hatch3r-roadmap.md +94 -12
  90. package/{commands → dist/content/commands}/hatch3r-security-audit.md +107 -7
  91. package/dist/content/commands/hatch3r-slo-scaffold.md +246 -0
  92. package/dist/content/commands/hatch3r-spec.md +216 -0
  93. package/{commands → dist/content/commands}/hatch3r-test-plan.md +90 -14
  94. package/dist/content/commands/hatch3r-workflow.md +628 -0
  95. package/{commands → dist/content/commands}/revision/revision-delegation.md +8 -7
  96. package/{commands → dist/content/commands}/revision/revision-modes.md +49 -4
  97. package/{commands → dist/content/commands}/revision/revision-quality.md +12 -9
  98. package/dist/content/commands/shared/orchestration-frame.md +119 -0
  99. package/{github-agents → dist/content/github-agents}/hatch3r-docs-agent.md +22 -2
  100. package/dist/content/github-agents/hatch3r-lint-agent.md +66 -0
  101. package/{github-agents → dist/content/github-agents}/hatch3r-security-agent.md +22 -2
  102. package/{github-agents → dist/content/github-agents}/hatch3r-test-agent.md +22 -2
  103. package/{hooks → dist/content/hooks}/hatch3r-ci-failure.md +3 -3
  104. package/{hooks → dist/content/hooks}/hatch3r-file-save.md +4 -4
  105. package/{hooks → dist/content/hooks}/hatch3r-post-merge.md +1 -1
  106. package/{hooks → dist/content/hooks}/hatch3r-pre-commit.md +1 -1
  107. package/{hooks → dist/content/hooks}/hatch3r-pre-push.md +7 -7
  108. package/dist/content/hooks/hatch3r-review-loop-cap.md +52 -0
  109. package/{hooks → dist/content/hooks}/hatch3r-session-start.md +3 -3
  110. package/{mcp → dist/content/mcp}/mcp.json +7 -5
  111. package/{rules → dist/content/rules}/hatch3r-accessibility-standards.md +16 -3
  112. package/{rules → dist/content/rules}/hatch3r-accessibility-standards.mdc +13 -1
  113. package/dist/content/rules/hatch3r-agent-orchestration-detail.md +250 -0
  114. package/dist/content/rules/hatch3r-agent-orchestration-detail.mdc +245 -0
  115. package/dist/content/rules/hatch3r-agent-orchestration.md +250 -0
  116. package/dist/content/rules/hatch3r-agent-orchestration.mdc +245 -0
  117. package/{rules → dist/content/rules}/hatch3r-ai-evals.md +7 -5
  118. package/{rules → dist/content/rules}/hatch3r-ai-evals.mdc +5 -4
  119. package/{rules → dist/content/rules}/hatch3r-ai-ux-patterns.md +7 -3
  120. package/{rules → dist/content/rules}/hatch3r-ai-ux-patterns.mdc +4 -1
  121. package/dist/content/rules/hatch3r-android-patterns.md +107 -0
  122. package/dist/content/rules/hatch3r-android-patterns.mdc +102 -0
  123. package/dist/content/rules/hatch3r-anti-duplication.md +115 -0
  124. package/dist/content/rules/hatch3r-anti-duplication.mdc +115 -0
  125. package/{rules → dist/content/rules}/hatch3r-api-design.md +5 -1
  126. package/{rules → dist/content/rules}/hatch3r-api-design.mdc +3 -0
  127. package/{rules → dist/content/rules}/hatch3r-api-versioning.md +3 -1
  128. package/{rules → dist/content/rules}/hatch3r-api-versioning.mdc +1 -0
  129. package/{rules → dist/content/rules}/hatch3r-auth-patterns.md +5 -2
  130. package/{rules → dist/content/rules}/hatch3r-auth-patterns.mdc +2 -0
  131. package/{rules → dist/content/rules}/hatch3r-browser-verification.md +8 -10
  132. package/{rules → dist/content/rules}/hatch3r-browser-verification.mdc +8 -10
  133. package/dist/content/rules/hatch3r-capability-matrix.md +108 -0
  134. package/dist/content/rules/hatch3r-capability-matrix.mdc +108 -0
  135. package/{rules → dist/content/rules}/hatch3r-ci-cd.md +9 -1
  136. package/{rules → dist/content/rules}/hatch3r-ci-cd.mdc +7 -0
  137. package/dist/content/rules/hatch3r-clarification-default.md +73 -0
  138. package/dist/content/rules/hatch3r-clarification-default.mdc +73 -0
  139. package/{rules → dist/content/rules}/hatch3r-code-standards.md +23 -47
  140. package/{rules → dist/content/rules}/hatch3r-code-standards.mdc +22 -46
  141. package/{rules → dist/content/rules}/hatch3r-component-conventions.md +4 -1
  142. package/{rules → dist/content/rules}/hatch3r-component-conventions.mdc +3 -0
  143. package/{rules → dist/content/rules}/hatch3r-container-hardening.md +13 -3
  144. package/{rules → dist/content/rules}/hatch3r-container-hardening.mdc +10 -1
  145. package/{rules → dist/content/rules}/hatch3r-contract-testing.md +3 -1
  146. package/{rules → dist/content/rules}/hatch3r-contract-testing.mdc +1 -0
  147. package/dist/content/rules/hatch3r-cost-visibility.md +135 -0
  148. package/dist/content/rules/hatch3r-cost-visibility.mdc +135 -0
  149. package/dist/content/rules/hatch3r-cq-rule-frame.md +54 -0
  150. package/dist/content/rules/hatch3r-cq-rule-frame.mdc +49 -0
  151. package/{rules → dist/content/rules}/hatch3r-data-classification.md +5 -2
  152. package/{rules → dist/content/rules}/hatch3r-data-classification.mdc +3 -1
  153. package/{rules → dist/content/rules}/hatch3r-deep-context.md +14 -14
  154. package/{rules → dist/content/rules}/hatch3r-deep-context.mdc +13 -13
  155. package/{rules → dist/content/rules}/hatch3r-dependency-management.md +18 -4
  156. package/{rules → dist/content/rules}/hatch3r-dependency-management.mdc +16 -3
  157. package/{rules → dist/content/rules}/hatch3r-design-system-detection.md +4 -2
  158. package/{rules → dist/content/rules}/hatch3r-design-system-detection.mdc +1 -0
  159. package/dist/content/rules/hatch3r-dotnet-patterns.md +104 -0
  160. package/dist/content/rules/hatch3r-dotnet-patterns.mdc +99 -0
  161. package/dist/content/rules/hatch3r-edge-case-discipline.md +65 -0
  162. package/dist/content/rules/hatch3r-edge-case-discipline.mdc +65 -0
  163. package/dist/content/rules/hatch3r-enhancability.md +147 -0
  164. package/dist/content/rules/hatch3r-enhancability.mdc +142 -0
  165. package/{rules → dist/content/rules}/hatch3r-event-schema-evolution.md +3 -1
  166. package/{rules → dist/content/rules}/hatch3r-event-schema-evolution.mdc +1 -0
  167. package/dist/content/rules/hatch3r-fan-out-discipline.md +91 -0
  168. package/dist/content/rules/hatch3r-fan-out-discipline.mdc +91 -0
  169. package/{rules → dist/content/rules}/hatch3r-feature-flags.md +2 -0
  170. package/{rules → dist/content/rules}/hatch3r-feature-flags.mdc +2 -0
  171. package/dist/content/rules/hatch3r-flutter-patterns.md +88 -0
  172. package/dist/content/rules/hatch3r-flutter-patterns.mdc +83 -0
  173. package/{rules → dist/content/rules}/hatch3r-git-conventions.md +5 -2
  174. package/{rules → dist/content/rules}/hatch3r-git-conventions.mdc +2 -0
  175. package/dist/content/rules/hatch3r-go-patterns.md +98 -0
  176. package/dist/content/rules/hatch3r-go-patterns.mdc +93 -0
  177. package/{rules → dist/content/rules}/hatch3r-handoff-readiness.md +14 -4
  178. package/{rules → dist/content/rules}/hatch3r-handoff-readiness.mdc +13 -3
  179. package/{rules → dist/content/rules}/hatch3r-i18n.md +3 -1
  180. package/{rules → dist/content/rules}/hatch3r-i18n.mdc +2 -0
  181. package/dist/content/rules/hatch3r-iteration-summary.md +108 -0
  182. package/dist/content/rules/hatch3r-iteration-summary.mdc +108 -0
  183. package/dist/content/rules/hatch3r-learning-system.md +202 -0
  184. package/dist/content/rules/hatch3r-learning-system.mdc +202 -0
  185. package/dist/content/rules/hatch3r-maintainability.md +157 -0
  186. package/dist/content/rules/hatch3r-maintainability.mdc +152 -0
  187. package/{rules → dist/content/rules}/hatch3r-migrations.md +4 -2
  188. package/{rules → dist/content/rules}/hatch3r-migrations.mdc +1 -0
  189. package/{rules → dist/content/rules}/hatch3r-observability-logging.md +2 -1
  190. package/{rules → dist/content/rules}/hatch3r-observability-logging.mdc +1 -0
  191. package/{rules → dist/content/rules}/hatch3r-observability-metrics.md +2 -1
  192. package/{rules → dist/content/rules}/hatch3r-observability-metrics.mdc +1 -0
  193. package/{rules → dist/content/rules}/hatch3r-observability-tracing.md +46 -36
  194. package/{rules → dist/content/rules}/hatch3r-observability-tracing.mdc +45 -35
  195. package/{rules → dist/content/rules}/hatch3r-operability.md +3 -1
  196. package/{rules → dist/content/rules}/hatch3r-operability.mdc +1 -0
  197. package/{rules → dist/content/rules}/hatch3r-passkey-server.md +4 -2
  198. package/{rules → dist/content/rules}/hatch3r-passkey-server.mdc +1 -0
  199. package/{rules → dist/content/rules}/hatch3r-performance-budgets.md +3 -1
  200. package/{rules → dist/content/rules}/hatch3r-performance-budgets.mdc +3 -1
  201. package/dist/content/rules/hatch3r-php-laravel-patterns.md +109 -0
  202. package/dist/content/rules/hatch3r-php-laravel-patterns.mdc +104 -0
  203. package/{rules → dist/content/rules}/hatch3r-progressive-delivery.md +5 -1
  204. package/{rules → dist/content/rules}/hatch3r-progressive-delivery.mdc +3 -0
  205. package/dist/content/rules/hatch3r-proof-model.md +131 -0
  206. package/dist/content/rules/hatch3r-proof-model.mdc +131 -0
  207. package/dist/content/rules/hatch3r-python-patterns.md +70 -0
  208. package/dist/content/rules/hatch3r-python-patterns.mdc +65 -0
  209. package/dist/content/rules/hatch3r-react-native-patterns.md +83 -0
  210. package/dist/content/rules/hatch3r-react-native-patterns.mdc +78 -0
  211. package/{rules → dist/content/rules}/hatch3r-resilience-patterns.md +3 -1
  212. package/{rules → dist/content/rules}/hatch3r-resilience-patterns.mdc +1 -0
  213. package/dist/content/rules/hatch3r-reviewer-calibration.md +84 -0
  214. package/dist/content/rules/hatch3r-reviewer-calibration.mdc +84 -0
  215. package/dist/content/rules/hatch3r-right-sizing.md +68 -0
  216. package/dist/content/rules/hatch3r-right-sizing.mdc +66 -0
  217. package/dist/content/rules/hatch3r-ruby-rails-patterns.md +111 -0
  218. package/dist/content/rules/hatch3r-ruby-rails-patterns.mdc +106 -0
  219. package/dist/content/rules/hatch3r-rust-patterns.md +107 -0
  220. package/dist/content/rules/hatch3r-rust-patterns.mdc +102 -0
  221. package/dist/content/rules/hatch3r-scalability.md +137 -0
  222. package/dist/content/rules/hatch3r-scalability.mdc +132 -0
  223. package/{rules → dist/content/rules}/hatch3r-secrets-management.md +12 -2
  224. package/{rules → dist/content/rules}/hatch3r-secrets-management.mdc +9 -0
  225. package/{rules → dist/content/rules}/hatch3r-security-patterns.md +38 -35
  226. package/{rules → dist/content/rules}/hatch3r-security-patterns.mdc +36 -34
  227. package/dist/content/rules/hatch3r-security.md +97 -0
  228. package/dist/content/rules/hatch3r-security.mdc +92 -0
  229. package/dist/content/rules/hatch3r-swiftui-patterns.md +98 -0
  230. package/dist/content/rules/hatch3r-swiftui-patterns.mdc +93 -0
  231. package/dist/content/rules/hatch3r-testability.md +115 -0
  232. package/dist/content/rules/hatch3r-testability.mdc +110 -0
  233. package/{rules → dist/content/rules}/hatch3r-testing.md +6 -2
  234. package/{rules → dist/content/rules}/hatch3r-testing.mdc +3 -0
  235. package/{rules → dist/content/rules}/hatch3r-theming.md +3 -1
  236. package/{rules → dist/content/rules}/hatch3r-theming.mdc +2 -0
  237. package/dist/content/rules/hatch3r-tool-currency.md +91 -0
  238. package/dist/content/rules/hatch3r-tool-currency.mdc +86 -0
  239. package/{rules → dist/content/rules}/hatch3r-tooling-hierarchy.md +30 -32
  240. package/{rules → dist/content/rules}/hatch3r-tooling-hierarchy.mdc +28 -31
  241. package/dist/content/rules/hatch3r-typescript-patterns.md +58 -0
  242. package/dist/content/rules/hatch3r-typescript-patterns.mdc +53 -0
  243. package/{rules → dist/content/rules}/hatch3r-ux-states-and-flows.md +13 -5
  244. package/{rules → dist/content/rules}/hatch3r-ux-states-and-flows.mdc +10 -3
  245. package/{skills → dist/content/skills}/hatch3r-a11y-audit/SKILL.md +11 -9
  246. package/{skills → dist/content/skills}/hatch3r-a11y-audit/references/manual-audit-checklist.md +7 -5
  247. package/dist/content/skills/hatch3r-adhoc-orchestrate/SKILL.md +131 -0
  248. package/{skills → dist/content/skills}/hatch3r-ai-feature/SKILL.md +4 -6
  249. package/{skills → dist/content/skills}/hatch3r-api-spec/SKILL.md +27 -2
  250. package/{skills → dist/content/skills}/hatch3r-architecture-review/SKILL.md +5 -8
  251. package/{commands/hatch3r-board-groom.md → dist/content/skills/hatch3r-board-groom/SKILL.md} +16 -18
  252. package/{commands/hatch3r-board-init.md → dist/content/skills/hatch3r-board-init/SKILL.md} +34 -31
  253. package/{commands/hatch3r-board-refresh.md → dist/content/skills/hatch3r-board-refresh/SKILL.md} +17 -19
  254. package/{commands/hatch3r-board-shared.md → dist/content/skills/hatch3r-board-shared/SKILL.md} +45 -15
  255. package/dist/content/skills/hatch3r-browser-verify/SKILL.md +307 -0
  256. package/{skills → dist/content/skills}/hatch3r-bug-fix/SKILL.md +16 -3
  257. package/{skills → dist/content/skills}/hatch3r-ci-pipeline/SKILL.md +17 -7
  258. package/{skills → dist/content/skills}/hatch3r-cli-fd/SKILL.md +34 -2
  259. package/{skills → dist/content/skills}/hatch3r-cli-fzf/SKILL.md +34 -2
  260. package/dist/content/skills/hatch3r-cli-gh/SKILL.md +139 -0
  261. package/{skills → dist/content/skills}/hatch3r-cli-jq/SKILL.md +43 -9
  262. package/{skills → dist/content/skills}/hatch3r-cli-ripgrep/SKILL.md +36 -4
  263. package/dist/content/skills/hatch3r-cli-toolbox/SKILL.md +376 -0
  264. package/dist/content/skills/hatch3r-containerize/SKILL.md +157 -0
  265. package/{skills → dist/content/skills}/hatch3r-context-health/SKILL.md +27 -9
  266. package/dist/content/skills/hatch3r-cost-tracking/SKILL.md +164 -0
  267. package/{skills → dist/content/skills}/hatch3r-customize/SKILL.md +9 -13
  268. package/{skills → dist/content/skills}/hatch3r-dep-audit/SKILL.md +29 -9
  269. package/{skills → dist/content/skills}/hatch3r-design-system-detect/SKILL.md +4 -8
  270. package/dist/content/skills/hatch3r-docs-writing/SKILL.md +159 -0
  271. package/dist/content/skills/hatch3r-enhancability-verify/SKILL.md +152 -0
  272. package/{skills → dist/content/skills}/hatch3r-feature/SKILL.md +54 -4
  273. package/dist/content/skills/hatch3r-feedback/SKILL.md +103 -0
  274. package/{skills → dist/content/skills}/hatch3r-gh-agentic-workflows/SKILL.md +14 -12
  275. package/{skills → dist/content/skills}/hatch3r-gh-agentic-workflows/references/azure-devops.md +2 -2
  276. package/{skills → dist/content/skills}/hatch3r-gh-agentic-workflows/references/gitlab-ci.md +1 -1
  277. package/{skills → dist/content/skills}/hatch3r-handoff-prepare/SKILL.md +12 -15
  278. package/{skills → dist/content/skills}/hatch3r-handoff-resume/SKILL.md +5 -8
  279. package/{commands/hatch3r-hooks.md → dist/content/skills/hatch3r-hooks/SKILL.md} +59 -148
  280. package/dist/content/skills/hatch3r-incident-response/SKILL.md +174 -0
  281. package/{skills → dist/content/skills}/hatch3r-issue-workflow/SKILL.md +15 -4
  282. package/dist/content/skills/hatch3r-learn/SKILL.md +317 -0
  283. package/{skills → dist/content/skills}/hatch3r-logical-refactor/SKILL.md +6 -7
  284. package/dist/content/skills/hatch3r-maintainability-verify/SKILL.md +146 -0
  285. package/{skills → dist/content/skills}/hatch3r-migration/SKILL.md +9 -8
  286. package/{skills → dist/content/skills}/hatch3r-observability-verify/SKILL.md +17 -13
  287. package/{skills → dist/content/skills}/hatch3r-perf-audit/SKILL.md +14 -10
  288. package/{skills → dist/content/skills}/hatch3r-pr-creation/SKILL.md +8 -11
  289. package/{skills → dist/content/skills}/hatch3r-qa-validation/SKILL.md +8 -7
  290. package/dist/content/skills/hatch3r-recipe/SKILL.md +174 -0
  291. package/{skills → dist/content/skills}/hatch3r-refactor/SKILL.md +7 -8
  292. package/dist/content/skills/hatch3r-release/SKILL.md +265 -0
  293. package/{skills → dist/content/skills}/hatch3r-reliability-verify/SKILL.md +9 -5
  294. package/{commands/hatch3r-report.md → dist/content/skills/hatch3r-report/SKILL.md} +21 -18
  295. package/dist/content/skills/hatch3r-scalability-verify/SKILL.md +145 -0
  296. package/dist/content/skills/hatch3r-security-verify/SKILL.md +144 -0
  297. package/dist/content/skills/hatch3r-team-convention-author/SKILL.md +126 -0
  298. package/dist/content/skills/hatch3r-testability-verify/SKILL.md +147 -0
  299. package/{skills → dist/content/skills}/hatch3r-ui-ux-verify/SKILL.md +20 -12
  300. package/{skills → dist/content/skills}/hatch3r-visual-refactor/SKILL.md +12 -8
  301. package/package.json +53 -46
  302. package/agents/hatch3r-a11y-auditor.md +0 -159
  303. package/agents/hatch3r-dependency-auditor.md +0 -219
  304. package/agents/hatch3r-implementer.md +0 -278
  305. package/agents/hatch3r-learnings-loader.md +0 -343
  306. package/agents/hatch3r-perf-profiler.md +0 -166
  307. package/agents/hatch3r-reviewer.md +0 -314
  308. package/agents/hatch3r-security-auditor.md +0 -180
  309. package/agents/hatch3r-test-writer.md +0 -171
  310. package/agents/shared/user-question-protocol.md +0 -95
  311. package/commands/hatch3r-agent-customize.md +0 -201
  312. package/commands/hatch3r-command-customize.md +0 -113
  313. package/commands/hatch3r-context-health.md +0 -147
  314. package/commands/hatch3r-cost-tracking.md +0 -163
  315. package/commands/hatch3r-dep-audit.md +0 -188
  316. package/commands/hatch3r-handoff.md +0 -133
  317. package/commands/hatch3r-learn.md +0 -312
  318. package/commands/hatch3r-recipe.md +0 -194
  319. package/commands/hatch3r-release.md +0 -350
  320. package/commands/hatch3r-rule-customize.md +0 -133
  321. package/commands/hatch3r-skill-customize.md +0 -112
  322. package/commands/hatch3r-workflow.md +0 -504
  323. package/dist/cli/index.d.ts +0 -2
  324. package/dist/cli/index.js.map +0 -1
  325. package/github-agents/hatch3r-lint-agent.md +0 -46
  326. package/prompts/hatch3r-bug-triage.md +0 -158
  327. package/prompts/hatch3r-code-review.md +0 -134
  328. package/prompts/hatch3r-pr-description.md +0 -176
  329. package/rules/hatch3r-agent-orchestration-detail.md +0 -211
  330. package/rules/hatch3r-agent-orchestration-detail.mdc +0 -206
  331. package/rules/hatch3r-agent-orchestration.md +0 -376
  332. package/rules/hatch3r-agent-orchestration.mdc +0 -371
  333. package/rules/hatch3r-iteration-summary.md +0 -90
  334. package/rules/hatch3r-iteration-summary.mdc +0 -85
  335. package/rules/hatch3r-learning-consult.md +0 -42
  336. package/rules/hatch3r-learning-consult.mdc +0 -38
  337. package/rules/hatch3r-observability-tracing-detail.md +0 -20
  338. package/rules/hatch3r-observability-tracing-detail.mdc +0 -14
  339. package/rules/hatch3r-observability.md +0 -20
  340. package/rules/hatch3r-observability.mdc +0 -14
  341. package/skills/hatch3r-agent-customize/SKILL.md +0 -23
  342. package/skills/hatch3r-cli-aichat/SKILL.md +0 -84
  343. package/skills/hatch3r-cli-ast-grep/SKILL.md +0 -85
  344. package/skills/hatch3r-cli-az-devops/SKILL.md +0 -89
  345. package/skills/hatch3r-cli-bat/SKILL.md +0 -85
  346. package/skills/hatch3r-cli-comby/SKILL.md +0 -85
  347. package/skills/hatch3r-cli-csvkit/SKILL.md +0 -84
  348. package/skills/hatch3r-cli-delta/SKILL.md +0 -86
  349. package/skills/hatch3r-cli-difftastic/SKILL.md +0 -84
  350. package/skills/hatch3r-cli-docker/SKILL.md +0 -89
  351. package/skills/hatch3r-cli-duckdb/SKILL.md +0 -84
  352. package/skills/hatch3r-cli-gh/SKILL.md +0 -90
  353. package/skills/hatch3r-cli-glab/SKILL.md +0 -89
  354. package/skills/hatch3r-cli-lazygit/SKILL.md +0 -78
  355. package/skills/hatch3r-cli-llm/SKILL.md +0 -84
  356. package/skills/hatch3r-cli-miller/SKILL.md +0 -84
  357. package/skills/hatch3r-cli-mods/SKILL.md +0 -84
  358. package/skills/hatch3r-cli-overview/SKILL.md +0 -60
  359. package/skills/hatch3r-cli-playwright/SKILL.md +0 -89
  360. package/skills/hatch3r-cli-podman/SKILL.md +0 -84
  361. package/skills/hatch3r-cli-qsv/SKILL.md +0 -91
  362. package/skills/hatch3r-cli-rtk/SKILL.md +0 -91
  363. package/skills/hatch3r-cli-sd/SKILL.md +0 -85
  364. package/skills/hatch3r-cli-stagehand/SKILL.md +0 -111
  365. package/skills/hatch3r-cli-taplo/SKILL.md +0 -84
  366. package/skills/hatch3r-cli-yq/SKILL.md +0 -85
  367. package/skills/hatch3r-cli-zstd/SKILL.md +0 -85
  368. package/skills/hatch3r-command-customize/SKILL.md +0 -23
  369. package/skills/hatch3r-cost-tracking/SKILL.md +0 -92
  370. package/skills/hatch3r-incident-response/SKILL.md +0 -115
  371. package/skills/hatch3r-recipe/SKILL.md +0 -91
  372. package/skills/hatch3r-release/SKILL.md +0 -120
  373. package/skills/hatch3r-rule-customize/SKILL.md +0 -23
  374. package/skills/hatch3r-skill-customize/SKILL.md +0 -23
  375. /package/{agents → dist/content/agents}/modes/architecture.md +0 -0
  376. /package/{agents → dist/content/agents}/modes/boundary-analysis.md +0 -0
  377. /package/{agents → dist/content/agents}/modes/codebase-impact.md +0 -0
  378. /package/{agents → dist/content/agents}/modes/complexity-risk.md +0 -0
  379. /package/{agents → dist/content/agents}/modes/coverage-analysis.md +0 -0
  380. /package/{agents → dist/content/agents}/modes/current-state.md +0 -0
  381. /package/{agents → dist/content/agents}/modes/feature-design.md +0 -0
  382. /package/{agents → dist/content/agents}/modes/impact-analysis.md +0 -0
  383. /package/{agents → dist/content/agents}/modes/library-docs.md +0 -0
  384. /package/{agents → dist/content/agents}/modes/migration-path.md +0 -0
  385. /package/{agents → dist/content/agents}/modes/prior-art.md +0 -0
  386. /package/{agents → dist/content/agents}/modes/refactoring-strategy.md +0 -0
  387. /package/{agents → dist/content/agents}/modes/regression.md +0 -0
  388. /package/{agents → dist/content/agents}/modes/risk-assessment.md +0 -0
  389. /package/{agents → dist/content/agents}/modes/risk-prioritization.md +0 -0
  390. /package/{agents → dist/content/agents}/modes/root-cause.md +0 -0
  391. /package/{agents → dist/content/agents}/modes/similar-implementation.md +0 -0
  392. /package/{agents → dist/content/agents}/modes/symptom-trace.md +0 -0
  393. /package/{agents → dist/content/agents}/modes/test-pattern.md +0 -0
  394. /package/{commands → dist/content/commands}/board/shared-board-overview.md +0 -0
  395. /package/{commands → dist/content/commands}/revision/revision-board-integration.md +0 -0
  396. /package/{skills → dist/content/skills}/hatch3r-issue-workflow/references/delegation-patterns.md +0 -0
@@ -0,0 +1,164 @@
1
+ ---
2
+ id: hatch3r-cost-tracking
3
+ name: hatch3r-cost-tracking
4
+ type: skill
5
+ description: Tracks token usage and estimate costs for agent sessions. Use when monitoring spend, approaching budget limits, or generating cost reports.
6
+ tags: [maintenance]
7
+ quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ ---
11
+ # Cost Tracking Workflow
12
+
13
+ ## Quick Start
14
+
15
+ **Applies when:** the project tracks cloud/LLM spend against a budget. On a project with no cost-accounting need, skip (per `rules/hatch3r-right-sizing.md`).
16
+
17
+ ```
18
+ Task Progress:
19
+ - [ ] Step 0: Detect ambiguity (P8 B1)
20
+ - [ ] Step 1: Review cost tracking configuration
21
+ - [ ] Step 2: Estimate current session token usage
22
+ - [ ] Step 2a: Re-fetch pricing before reporting (currency gate)
23
+ - [ ] Step 3: Identify cost optimization opportunities
24
+ - [ ] Step 4: Generate cost report
25
+ ```
26
+
27
+ ## Step 0 — Detect Ambiguity (P8 B1)
28
+
29
+ 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: tracking scope (session vs issue vs epic), budget values when missing from hatch.json, hardStop authority (block vs warn), report format target, and whether to defer non-critical work over budget.
30
+
31
+ ## Fan-out Discipline (P8 B2)
32
+
33
+ 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.
34
+
35
+ ## Step 1: Review Configuration
36
+
37
+ 1. Check `hatch.json` for a `costTracking` section.
38
+ 2. Note configured budgets: `sessionBudget`, `issueBudget`, `epicBudget`.
39
+ 3. Note warning thresholds and whether `hardStop` is enabled.
40
+ 4. If no configuration exists, operate in report-only mode.
41
+
42
+ ## Step 2: Estimate Token Usage
43
+
44
+ Estimate tokens for the current session using these rules:
45
+
46
+ | Content Type | Rule | Accuracy |
47
+ |-------------|------|----------|
48
+ | Messages | ~4 characters per token | High -- stable ratio for English text |
49
+ | Tool calls | JSON length / 4 (input), response length / 4 (output) | Medium -- JSON has more overhead characters |
50
+ | File reads | Character count / 4 | High -- but large files may be truncated by the tool |
51
+ | Web searches | ~500 tokens per search | Low -- varies widely by result length |
52
+ | Subagent spawns | Estimate full context re-sent per spawn (~2000-5000 tokens base) | Medium -- depends on included rules/context |
53
+
54
+ **Subagent cost multiplier.** Each subagent spawn carries a base cost for the agent protocol, included rules, and context. A pipeline with 8 subagents (researcher + implementer + reviewer + fixer + 4 Phase 4 specialists) has significant overhead from context re-transmission. Factor this into budget estimates.
55
+
56
+ Calculate estimated cost using named-model rates tied to model IDs. Published-vendor rates drift between model releases — re-fetch before every report per Step 2a; the `accessed:` date marks when each row was last verified.
57
+
58
+ | Model | Model ID | Input (per 1M) | Output (per 1M) | accessed |
59
+ |-------|----------|---------------:|----------------:|----------|
60
+ | Claude Haiku 4.5 | `claude-haiku-4-5` | $1.00 | $5.00 | 2026-06-05 |
61
+ | Claude Sonnet 4.6 | `claude-sonnet-4-6` | $3.00 | $15.00 | 2026-06-05 |
62
+ | Claude Opus 4.8 | `claude-opus-4-8` | $5.00 | $25.00 | 2026-06-05 |
63
+
64
+ **Cache-read multiplier.** Cached input tokens (`cache_read_input_tokens` in the API `usage` block) bill at ~0.1× the model's base input rate; cache writes bill at 1.25× (5-minute TTL) or 2× (1-hour TTL). When a session reuses a large cached prefix, price `cache_read_input_tokens` separately at 0.1× base input — counting them at full input rate overstates spend by up to 10× on cache-heavy agent loops. Total prompt size = `input_tokens` (uncached) + `cache_creation_input_tokens` + `cache_read_input_tokens`.
65
+
66
+ ### Step 2a: Re-fetch Pricing Before Reporting (currency gate)
67
+
68
+ Published per-token rates change between model releases. Before emitting a cost figure, verify the rate table is current:
69
+
70
+ 1. If any row's `accessed:` date is older than 30 days, re-fetch the vendor's current pricing (Anthropic: https://www.anthropic.com/pricing, or the live `claude-api` skill's models/pricing reference) and update the row's rates + `accessed:` date in place.
71
+ 2. Confirm the model the session actually ran on maps to a named row. If the session used a model ID absent from the table (e.g. an older or non-Anthropic model), add a row with its published rates and `accessed:` date rather than defaulting to the nearest tier.
72
+ 3. State the `accessed:` date of the rate used directly in the report (see Step 4). A cost figure with no rate-provenance date is unverifiable — never report a dollar amount without it.
73
+
74
+ If pricing cannot be re-fetched (offline, vendor page unreachable), proceed with the on-file rates but flag the figure as `(rates as of <accessed-date>, not re-verified)` in the report.
75
+
76
+ ### Default Budgets
77
+
78
+ When `hatch.json` has no `costTracking` section, apply these defaults (report-only — no hard stop unless `hardStop: true`):
79
+
80
+ | Budget Type | Default |
81
+ |------------|---------|
82
+ | `sessionBudget` | $10.00 |
83
+ | `issueBudget` | $5.00 |
84
+ | `epicBudget` | $25.00 |
85
+ | `warningThresholds` | [0.5, 0.75, 0.9] |
86
+ | `hardStop` | false |
87
+
88
+ ### Enforcement
89
+
90
+ | Threshold | Action |
91
+ |-----------|--------|
92
+ | 50% | Log warning, continue |
93
+ | 75% | Alert user, suggest optimization |
94
+ | 90% | Strong warning, recommend delegation or checkpoint |
95
+ | 100% | Stop (if `hardStop: true`) or alert and continue |
96
+
97
+ ## Step 3: Identify Optimizations
98
+
99
+ Review usage patterns for savings:
100
+
101
+ - **Large file reads**: Were files read multiple times without changes? Cache instead.
102
+ - **Model tier**: Could routine tasks (linting, formatting) use a faster/cheaper model?
103
+ - **Context bloat**: Is irrelevant context accumulating? Summarize and trim.
104
+ - **Batching**: Were multiple small tool calls made that could be combined?
105
+ - **Scope creep**: Did work expand beyond the original issue? Scope back.
106
+
107
+ ## Step 4: Generate Report
108
+
109
+ Produce a cost report in this format:
110
+
111
+ ```
112
+ ## Cost Report: {scope}
113
+
114
+ **Period:** {session/issue/sprint}
115
+
116
+ **Token Usage:**
117
+ - Input tokens (uncached): ~{n}
118
+ - Cache-read tokens: ~{n} (billed ~0.1x base input)
119
+ - Cache-write tokens: ~{n} (billed 1.25x / 2x by TTL)
120
+ - Output tokens: ~{n}
121
+ - Total tokens: ~{n}
122
+
123
+ **Estimated Cost:** ${amount} ({model-id}, rates accessed {YYYY-MM-DD})
124
+
125
+ **Budget Status:** {amount} / {budget} ({percentage}%)
126
+
127
+ **Breakdown:**
128
+
129
+ | Phase | Tokens | Cost | % of Total |
130
+ |-------|--------|------|-----------|
131
+ | Planning | ~{n} | ${x} | {%} |
132
+ | Implementation | ~{n} | ${x} | {%} |
133
+ | Testing | ~{n} | ${x} | {%} |
134
+ | Review | ~{n} | ${x} | {%} |
135
+ | Sub-agents | ~{n} | ${x} | {%} |
136
+
137
+ **Optimization Opportunities:**
138
+ - {suggestions based on usage patterns}
139
+ ```
140
+
141
+ Include total estimated tokens (uncached input + cache-read + cache-write + output), estimated cost at the named-model rate with its `accessed:` date, budget status (if configured), and top optimization opportunities. Always present estimated values with the `~` prefix. Never report a dollar figure without the model ID and rate-access date. Never suppress threshold alerts.
142
+
143
+ ## Error Handling
144
+
145
+ - **Token usage data unavailable**: If the platform does not expose token metrics, use input/output character counts divided by 4 as an estimate. Note the approximation method in the report.
146
+ - **Budget limit exceeded mid-session**: Stop non-critical operations, produce a partial cost report, and recommend which remaining tasks to defer or delegate to a lower-cost model.
147
+ - **Cost configuration missing from hatch.json**: Operate in report-only mode and note that budget enforcement is inactive. Recommend adding cost configuration to enable guardrails.
148
+
149
+ ## Definition of Done
150
+
151
+ - [ ] Cost configuration reviewed (or report-only mode noted)
152
+ - [ ] Token usage estimated for current session (uncached input / cache-read / cache-write / output split)
153
+ - [ ] Pricing rates verified current per Step 2a; report cites model ID + rate `accessed:` date
154
+ - [ ] Optimization opportunities identified
155
+ - [ ] Cost report generated with budget status
156
+
157
+ ## Related Skills & Agents
158
+
159
+ - **Skill**: `hatch3r-context-health` — context health monitoring complements cost tracking for session management
160
+
161
+ ## References
162
+
163
+ - [Anthropic API pricing](https://www.anthropic.com/pricing) — accessed 2026-06-05, official-docs (Anthropic). Source for the per-million-token input/output rates per named model (Haiku 4.5 $1/$5, Sonnet 4.6 $3/$15, Opus 4.8 $5/$25) and the cache-read 0.1x / cache-write 1.25x-2x multipliers in Step 2; these drift between model releases — re-verify per Step 2a when running a cost report.
164
+ - [Token counting — Anthropic API docs](https://docs.anthropic.com/en/docs/build-with-claude/token-counting) — accessed 2026-06-05, official-docs (Anthropic). Source for treating the ~4-characters-per-token figure as an approximation; the documented count-tokens endpoint is authoritative when exact counts are required.
@@ -1,15 +1,16 @@
1
1
  ---
2
2
  id: hatch3r-customize
3
- description: Create and manage customization files for any hatch3r artifact type (agents, commands, rules, skills). Supports model overrides, description changes, scope overrides, enable/disable control, and project-specific markdown instructions.
3
+ name: hatch3r-customize
4
+ type: skill
5
+ description: Creates and manages customization files for any hatch3r artifact type (agents, commands, rules, skills). Supports model overrides, description changes, scope overrides, enable/disable control, and project-specific markdown instructions.
4
6
  tags: [customize]
5
7
  quality_charter: agents/shared/quality-charter.md
6
8
  efficiency_patterns: agents/shared/efficiency-patterns.md
7
9
  cache_friendly: true
8
- canonical_for: [hatch3r-agent-customize, hatch3r-command-customize, hatch3r-rule-customize, hatch3r-skill-customize]
9
10
  ---
10
11
  # Artifact Customization Management
11
12
 
12
- > **Canonical entry point.** Four type-specific skills (`hatch3r-agent-customize`, `hatch3r-command-customize`, `hatch3r-rule-customize`, `hatch3r-skill-customize`) redirect here via `redirect_to: hatch3r-customize` frontmatter. Their body documents the rejected-merge alternative per `governance/audit/domains/D16-compound-system.md` SA 16.3.
13
+ > **Canonical entry point.** This is the single skill for all per-artifact customization (agents, commands, rules, skills). The four prior type-specific skill stubs were removed in v1.9.0 per the Decision #13 Command-vs-Skill criterion; hatch3r's artifact-inventory and redundancy analysis documents the rejected-merge alternative.
13
14
 
14
15
  ## Quick Start
15
16
 
@@ -30,12 +31,7 @@ Before any work, scan the invocation for unresolved questions in scope, intent,
30
31
 
31
32
  ## Fan-out Discipline (P8 B2)
32
33
 
33
- This skill delegates per task size:
34
- - Tier 1 (trivial single-file): inline execution acceptable.
35
- - Tier 2 (multi-file or multi-concern): spawn parallel sub-agents per concern via the Task tool.
36
- - Tier 3 (multi-module / high-risk): one fresh sub-agent per independent module or gate; orchestrator integrates only.
37
-
38
- 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.
34
+ 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.
39
35
 
40
36
  ## Artifact Types
41
37
 
@@ -43,10 +39,10 @@ This skill handles customization for all artifact types. The `type` parameter de
43
39
 
44
40
  | Type | Source Directory | Customization Directory | YAML Fields |
45
41
  |------|-----------------|------------------------|-------------|
46
- | `agent` | `.agents/agents/` | `.hatch3r/agents/` | `model`, `description`, `enabled` |
47
- | `command` | `.agents/commands/` | `.hatch3r/commands/` | `description`, `enabled` |
48
- | `rule` | `.agents/rules/` | `.hatch3r/rules/` | `scope`, `description`, `enabled` |
49
- | `skill` | `.agents/skills/` | `.hatch3r/skills/` | `description`, `enabled` |
42
+ | `agent` | `agents/` | `.hatch3r/agents/` | `model`, `description`, `enabled` |
43
+ | `command` | `commands/` | `.hatch3r/commands/` | `description`, `enabled` |
44
+ | `rule` | `rules/` | `.hatch3r/rules/` | `scope`, `description`, `enabled` |
45
+ | `skill` | `skills/` | `.hatch3r/skills/` | `description`, `enabled` |
50
46
 
51
47
  **Protected agents:** Some agents have `protected: true` in their canonical frontmatter. For these agents, `description` and `enabled` overrides are ignored — only `model` and markdown instructions can be customized.
52
48
 
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  id: hatch3r-dep-audit
3
- description: Audit and update npm dependencies for security, freshness, and bundle impact. Use when auditing dependencies, responding to CVEs, or upgrading packages.
4
- tags: [maintenance, security]
3
+ name: hatch3r-dep-audit
4
+ type: skill
5
+ description: Audits and updates npm dependencies for security, freshness, and bundle impact. Use when auditing dependencies, responding to CVEs, or upgrading packages.
6
+ tags: [maintenance, floor:security]
5
7
  quality_charter: agents/shared/quality-charter.md
6
8
  efficiency_patterns: agents/shared/efficiency-patterns.md
7
9
  cache_friendly: true
@@ -29,12 +31,19 @@ Before any work, scan the invocation for unresolved questions in scope, intent,
29
31
 
30
32
  ## Fan-out Discipline (P8 B2)
31
33
 
32
- This skill delegates per task size:
33
- - Tier 1 (trivial single-file): inline execution acceptable.
34
- - Tier 2 (multi-file or multi-concern): spawn parallel sub-agents per concern via the Task tool.
35
- - Tier 3 (multi-module / high-risk): one fresh sub-agent per independent module or gate; orchestrator integrates only.
34
+ 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.
36
35
 
37
- 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.
36
+ ## Required Agent Delegation
37
+
38
+ > **Note:** When this skill is invoked via an orchestration pipeline (a `commands/hatch3r-*.md` flow), skip this section — the orchestrator handles agent delegation.
39
+
40
+ This skill realizes the two-agent dependency pattern (governance PRD Decision 13, F13.1-F04): the agent that *assesses* upgrade risk is distinct from the agent that *applies* it. Spawn these agents via the Task tool (`subagent_type: "generalPurpose"`) at the points below:
41
+
42
+ - **`hatch3r-dependency-drafter`** (analysis phase, Steps 1–3) — MUST spawn to inventory the dependency surface, classify each candidate by SemVer band, cross-check advisories, and draft the per-dependency proposal (current pin → proposed pin, band, driver, risk, consumer call sites, verification gate). The drafter is read-only (its `tools.deny` forbids manifest edits and installs), so its proposal is a reviewable decision artifact, not a mutation. Skip only for a trivial single-package patch already scoped by the invocation.
43
+ - **`hatch3r-fixer`** (apply phase, Step 4) — MUST spawn under reviewer authority to perform the manifest edit + `npm install` + per-upgrade verification the drafter's proposal names. The fixer flips each proposal from `drafted` to `applied` after its row's verification gate passes.
44
+ - **`hatch3r-devops`** (apply phase, Step 4 — CI-wiring variant) — spawn instead of `hatch3r-fixer` when the upgrade requires CI manifest wiring (lockfile-cache keys, build-matrix version pins, Renovate/Dependabot config) rather than only a source-tree dependency bump.
45
+
46
+ The drafter never applies and the fixer/devops never re-assess risk — the split keeps risk assessment separate from risk acceptance.
38
47
 
39
48
  ## Step 1: Gather Findings
40
49
 
@@ -48,7 +57,7 @@ Never under-fan-out to save tokens. Token cost is dominated by quality and compl
48
57
  For critical and high vulnerabilities:
49
58
 
50
59
  - Use **web search** to look up each CVE: exploitability, affected versions, fix version, workarounds.
51
- - Check npm advisories and platform-specific security tools for official guidance (check `platform` in `.agents/hatch.json`):
60
+ - Check npm advisories and platform-specific security tools for official guidance (check `platform` in `.hatch3r/hatch.json`):
52
61
  - **GitHub:** GitHub Security Advisories (`gh api /repos/{owner}/{repo}/security-advisories`)
53
62
  - **Azure DevOps:** Azure Artifacts security scanning and Azure Boards advisory tracking
54
63
  - **GitLab:** GitLab Dependency Scanning (Security & Compliance → Vulnerability Report)
@@ -75,10 +84,12 @@ Before changing anything:
75
84
  ## Step 5: Verify
76
85
 
77
86
  ```bash
78
- npm run lint && npm run typecheck && npm run test
87
+ ${HATCH3R:VERIFY_GATE_ALL}
79
88
  npm run build
80
89
  ```
81
90
 
91
+ The gate line is resolved to the project's language-aware command set at sync time (fallback when detection is unknown: `npm run lint && npm run typecheck && npm run test`); the build line is illustrative — substitute the project's build command.
92
+
82
93
  - Confirm bundle size within budget (if defined).
83
94
  - Run `npm audit` — no critical or high vulnerabilities remaining.
84
95
  - Verify `package-lock.json` is committed by checking `git status` for untracked or modified lockfile.
@@ -99,6 +110,10 @@ Use the project's PR template. Include:
99
110
  - **Major version upgrade breaks tests**: Roll back the upgrade, document the breaking changes encountered, and create a dedicated migration issue with the specific test failures and required code changes.
100
111
  - **Lockfile conflicts after upgrade**: Regenerate the lockfile from scratch (`rm package-lock.json && npm install`), verify all tests pass, and commit the clean lockfile.
101
112
 
113
+ ## Tracking Issues for Deferred Items
114
+
115
+ For CVEs or outdated packages not addressed in this session, create a tracking issue on the project's platform (GitHub Issues, ADO Work Item, or GitLab Issue per `platform` in `.hatch3r/hatch.json`). Use severity-based priority labels: Critical/High → `priority:p0`/`priority:p1`; Medium/Low → `priority:p2`; Major outdated → `priority:p2`; Minor/patch → `priority:p3`. Include package name, current version, target version, severity, CVE ID (if applicable), and migration notes. Never close out a critical/high CVE without either a fix or a tracking issue.
116
+
102
117
  ## Definition of Done
103
118
 
104
119
  - [ ] No critical or high CVEs remaining
@@ -107,3 +122,8 @@ Use the project's PR template. Include:
107
122
  - [ ] `package-lock.json` committed
108
123
  - [ ] PR includes upgrade rationale and bundle impact
109
124
  - [ ] No duplicate packages; unused deps removed
125
+
126
+ ## References
127
+
128
+ - [npm audit — npm CLI docs](https://docs.npmjs.com/cli/v10/commands/npm-audit) — accessed 2026-05-31, official-docs (npm, Inc.). Source for the `npm audit` severity buckets (critical/high/moderate/low) and `npm outdated` semantics used in Step 1.
129
+ - [GitHub security advisories REST API](https://docs.github.com/en/rest/security-advisories/repository-advisories) — accessed 2026-05-31, official-docs (GitHub). Source for the `gh api /repos/{owner}/{repo}/security-advisories` CVE-research path in Step 2.
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  id: hatch3r-design-system-detect
3
+ name: hatch3r-design-system-detect
3
4
  type: skill
4
- description: Detect existing design tokens, component library, and theming convention in a project before authoring new UI primitives — output a concise inventory for downstream implementers
5
- tags: [ui, design-system, frontend]
5
+ description: Detects existing design tokens, component library, and theming convention in a project before authoring new UI primitives — output a concise inventory for downstream implementers
6
+ tags: [implementation, floor:ui-ux, ui, design-system, frontend]
6
7
  quality_charter: agents/shared/quality-charter.md
7
8
  efficiency_patterns: agents/shared/efficiency-patterns.md
8
9
  cache_friendly: true
@@ -29,12 +30,7 @@ Before any work, scan the invocation for unresolved questions in scope, intent,
29
30
 
30
31
  ## Fan-out Discipline (P8 B2)
31
32
 
32
- This skill delegates per task size:
33
- - Tier 1 (trivial single-file): inline execution acceptable.
34
- - Tier 2 (multi-file or multi-concern): spawn parallel sub-agents per concern via the Task tool.
35
- - Tier 3 (multi-module / high-risk): one fresh sub-agent per independent module or gate; orchestrator integrates only.
36
-
37
- 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.
33
+ 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.
38
34
 
39
35
  ## Step 1: Scan package.json for design-system signals
40
36
 
@@ -0,0 +1,159 @@
1
+ ---
2
+ id: hatch3r-docs-writing
3
+ name: hatch3r-docs-writing
4
+ type: skill
5
+ description: Authors technical documentation through a repeatable workflow — audience analysis, Diátaxis-mode selection, structure, draft, review, publish. Covers READMEs, ADRs, API docs, and runbooks. Use when writing or restructuring any project documentation.
6
+ tags: [maintenance]
7
+ quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ ---
11
+
12
+ # Technical Documentation Workflow
13
+
14
+ Companion workflow to the `hatch3r-docs-writer` agent: that agent is the Phase-4 specialist invoked to update specs after a code change; this skill is the step-by-step procedure a human or agent follows to author a documentation artifact from scratch. Use the agent when documentation must track a `src/` diff; use this skill when authoring a new doc and you need the audience-analysis-through-publish sequence.
15
+
16
+ ## Quick Start
17
+
18
+ ```
19
+ Task Progress:
20
+ - [ ] Step 0: Detect ambiguity (P8 B1)
21
+ - [ ] Step 1: Classify the doc by Diátaxis mode + name the audience
22
+ - [ ] Step 2: Pick the structure template for the chosen mode
23
+ - [ ] Step 3: Draft to the template, one mode per document
24
+ - [ ] Step 4: Run the review checklist (audience, accuracy, style, structure)
25
+ - [ ] Step 5: Publish — link from an index, set owner + last-updated, verify cross-references
26
+ ```
27
+
28
+ The load-bearing decision is Step 1: a document serves exactly one of four user needs. Mixing learning content into a reference table, or burying a how-to procedure inside an explanation, is the most common defect this workflow prevents (Diátaxis — see References).
29
+
30
+ ## Step 0 — Detect Ambiguity (P8 B1)
31
+
32
+ Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target audience, 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: which doc type is wanted (README vs ADR vs API reference vs runbook), the reader's existing competence (new user vs maintainer vs on-call), whether an existing doc is being restructured (irreversible section moves), and where the published doc is linked from.
33
+
34
+ ## Fan-out Discipline (P8 B2)
35
+
36
+ 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:
37
+ - Tier 1 (single doc, single mode): inline.
38
+ - Tier 2 (multi-doc set, e.g. README + API reference + runbook for one feature): spawn one sub-agent per document via the Task tool; each authors to its own Diátaxis mode.
39
+ - Tier 3 (full docs-site restructure across many modes): one fresh sub-agent per top-level section; orchestrator integrates the index only.
40
+
41
+ Emit `sub_agents_spawned: { count, rationale }` in your output.
42
+
43
+ ## Step 1: Classify by Diátaxis Mode and Name the Audience
44
+
45
+ Every document answers exactly one of four user needs. Pick one mode before writing a single sentence; if a request spans two, split it into two documents.
46
+
47
+ | Mode | User need | Reader state | Writing stance |
48
+ |------|-----------|--------------|----------------|
49
+ | Tutorial | Learning by doing | Newcomer, no prior context | Lesson — guarantee a working result, hide edge cases |
50
+ | How-to guide | Achieving a stated goal | Already competent, has a task | Recipe — numbered steps to one outcome, no theory |
51
+ | Reference | Looking up a fact | Working, needs accuracy | Description — complete, dry, structured, no narrative |
52
+ | Explanation | Understanding why | Studying, off-task | Discussion — context, trade-offs, alternatives, rationale |
53
+
54
+ Map common artifacts to modes:
55
+
56
+ | Artifact | Primary mode | Note |
57
+ |----------|--------------|------|
58
+ | README | How-to (quickstart) + Reference (config) | Lead with the 60-second "get it running" path; link out to deep docs |
59
+ | API docs | Reference | Endpoint, params, request/response shapes, error codes, auth — one entry per endpoint |
60
+ | Runbook | How-to | Operational procedure: prerequisites, numbered steps, verification, rollback |
61
+ | ADR | Explanation | A decision and its rationale — context, decision, consequences |
62
+
63
+ Name the audience explicitly in one sentence (e.g., "on-call engineer mid-incident, has shell access, has not seen this service before"). Write to a US-English global-audience reader: short unambiguous sentences, active voice, direct address with "you" (Google dev-docs style — see References). The audience sentence drives every later choice — vocabulary, assumed prerequisites, depth.
64
+
65
+ ## Step 2: Pick the Structure Template
66
+
67
+ Use the template for the mode chosen in Step 1.
68
+
69
+ **README (how-to + reference):**
70
+ 1. One-line description of what the project is.
71
+ 2. Quickstart — the shortest verified path from clone to a running result.
72
+ 3. Prerequisites (versions, accounts, tools).
73
+ 4. Configuration reference (table: option, type, default, description).
74
+ 5. Links to deeper docs (tutorial, full reference, contributing).
75
+
76
+ **ADR (Nygard format — see References):**
77
+ 1. Title (`NNNN-short-decision-name`).
78
+ 2. Status (proposed | accepted | rejected | deprecated | superseded by NNNN).
79
+ 3. Context (the forces and problem that motivate the decision).
80
+ 4. Decision (the change, stated as "we will…").
81
+ 5. Consequences (positive and negative effects, including new obligations).
82
+
83
+ **API reference (one block per endpoint):**
84
+ - Method + path; one-line purpose.
85
+ - Authentication required (scheme + scope).
86
+ - Request: path/query/body params (table: name, type, required, description).
87
+ - Response: success shape + status, paginated where applicable.
88
+ - Errors: status code + meaning + when it fires.
89
+
90
+ **Runbook (how-to):**
91
+ 1. Trigger — what condition this runbook handles.
92
+ 2. Prerequisites — access, tools, on-call context.
93
+ 3. Numbered steps — each step one action with the exact command.
94
+ 4. Verification — the observable signal that confirms success.
95
+ 5. Rollback — how to undo if a step fails.
96
+ 6. Escalation — who to page if the runbook does not resolve it.
97
+
98
+ ## Step 3: Draft to the Template
99
+
100
+ - Write to the one chosen mode. If you reach for "but first, some background" inside a how-to, that background belongs in a separate explanation doc — link to it instead.
101
+ - Use a descriptive heading that matches the content type: a bare infinitive for a task heading ("Configure the database"), a noun phrase for a concept heading ("Database configuration") — Google dev-docs style.
102
+ - Put structured facts in tables (config options, params, error codes, invariants), not prose.
103
+ - Put acceptance criteria and operational steps in checklists or numbered lists.
104
+ - Use stable IDs from the project glossary (event IDs, invariant IDs) so the doc survives renames.
105
+ - Every code example uses a current, non-deprecated API — verify against the library's docs at draft time.
106
+ - State confidence on any claim you could not verify against source: mark it `[unverified]` and recommend a maintainer check before publish (quality charter — confidence levels).
107
+
108
+ ## Step 4: Review Checklist
109
+
110
+ Run all four lenses before publishing. A failure on any line is a blocker.
111
+
112
+ **Audience:**
113
+ - [ ] The named reader can act on this doc with only the prerequisites it lists — no unstated assumed knowledge.
114
+ - [ ] Depth matches the audience: a tutorial hides edge cases; a reference omits none.
115
+
116
+ **Accuracy:**
117
+ - [ ] Every command, code block, and config value was run or read against the current source — no copy-from-memory.
118
+ - [ ] Cross-references resolve (no dead links, no renamed-away anchors).
119
+ - [ ] Stable IDs match the glossary.
120
+
121
+ **Style:**
122
+ - [ ] Active voice, second person, short sentences (Google dev-docs style).
123
+ - [ ] No filler ("it is important to note", "simply", "just"); state the fact directly.
124
+ - [ ] Headings match content type (infinitive for task, noun phrase for concept).
125
+
126
+ **Structure:**
127
+ - [ ] One Diátaxis mode per document — no learning content in a reference, no theory in a how-to.
128
+ - [ ] Findable from an index or parent doc.
129
+ - [ ] README leads with a runnable quickstart; runbook ends with verification + rollback; ADR records consequences.
130
+
131
+ ## Step 5: Publish
132
+
133
+ - Link the new doc from its index or parent (a doc no one can find does not exist).
134
+ - Add an ownership footer: owner, reviewers, last-updated date.
135
+ - Re-verify cross-references after the file lands at its final path (anchors shift when filenames change).
136
+ - For docs that mirror code (API reference, config reference), note the source-of-truth file path so the next editor knows what to re-check against.
137
+ - Lint markdown before declaring done (e.g., `npx markdownlint <path>`); a broken table or heading level is a structure defect.
138
+
139
+ ## Error Handling
140
+
141
+ - **Source code contradicts the existing doc:** the code is the source of truth for behavior. Update the doc to match observed behavior and flag the stale section in the change summary; do not document the intended-but-absent behavior.
142
+ - **Request spans two Diátaxis modes:** do not blend them. Split into two documents (e.g., a how-to guide plus a linked explanation) and state the split in your output.
143
+ - **Cannot verify a code example against source:** mark the example `[unverified]`, recommend a maintainer run it, and lower the document's stated confidence to medium rather than publishing an unverified example as fact.
144
+ - **No index or parent to link from:** create or identify the index entry as part of this work — an unlinked doc fails Step 5.
145
+
146
+ ## Definition of Done
147
+
148
+ - [ ] Document classified to exactly one Diátaxis mode with a one-sentence named audience
149
+ - [ ] Authored to the matching structure template
150
+ - [ ] All four review-checklist lenses pass (audience, accuracy, style, structure)
151
+ - [ ] Linked from an index/parent; ownership + last-updated footer present
152
+ - [ ] Cross-references resolve and code examples verified against current source (or marked `[unverified]`)
153
+ - [ ] No secrets, tokens, or internal-only URLs in the published text
154
+
155
+ ## References
156
+
157
+ - Procida, Daniele. "Diátaxis — Start here." `https://diataxis.fr/start-here/` (accessed 2026-06-02, diataxis.fr, peer-reviewed-methodology). Source for the four-mode classification in Step 1 (tutorial / how-to / reference / explanation) and the one-mode-per-document discipline enforced in Steps 3–4.
158
+ - Google. "Google developer documentation style guide — Highlights." `https://developers.google.com/style/highlights` (accessed 2026-06-02, Google for Developers, official-docs). Source for the global-audience writing stance (active voice, second person, short sentences) and the task-vs-concept heading rule (bare infinitive vs noun phrase) in Steps 1–4. Procedures guidance: `https://developers.google.com/style/procedures`.
159
+ - Nygard, Michael. "Documenting Architecture Decisions." `https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions` (accessed 2026-06-02, Cognitect, established-library; ADR template used in 723+ open-source repositories per `https://adr.github.io/`). Source for the ADR structure template in Step 2 (Title / Status / Context / Decision / Consequences).
@@ -0,0 +1,152 @@
1
+ ---
2
+ id: hatch3r-enhancability-verify
3
+ name: hatch3r-enhancability-verify
4
+ type: skill
5
+ description: Enhancability verification gate before commit/release — feature-flag adoption on behavior changes, config externalization, semver-versioned APIs, forward-compat headers, extension-point definition, startup config validation
6
+ tags: [review, enhancability, code-standards, floor:content-quality]
7
+ scope: conditional
8
+ globs: "src/**,openapi.yaml,openapi.json,**/*.proto,**/schema.graphql,**/asyncapi.yaml,**/flags.yaml,**/.env*,**/config/**"
9
+ precedence: normal
10
+ quality_charter: agents/shared/quality-charter.md
11
+ efficiency_patterns: agents/shared/efficiency-patterns.md
12
+ cache_friendly: true
13
+ ---
14
+ # Enhancability Verification Gate
15
+
16
+ ## Quick Start
17
+
18
+ This skill defines what "done" means for any feature shipping user-visible behavior, public API changes, config schema changes, or extension-point interfaces. Run before declaring a feature complete. The 8 gates below mix automated checks (machine-checkable on every PR) with one release-cadence gate (semver bump + deprecation headers at release-cut). Skipping any gate = the feature is not done. Reviewer approval and passing tests alone do not satisfy this bar — a behavior change shipped without a flag commits the whole user base to the new path; a breaking change without a major bump breaks consumers silently.
19
+
20
+ Inputs the skill expects:
21
+
22
+ - A repository with `src/` source modules + a feature-flag client wired (OpenFeature, LaunchDarkly, Unleash, Flagsmith, Split, flagd).
23
+ - A config schema file (Zod under `src/config/`, Joi, Pydantic `BaseSettings`, envalid).
24
+ - Per-environment config files (`.env.development`, `.env.staging`, `.env.production`).
25
+ - API spec files (`openapi.yaml`, `openapi.json`, `asyncapi.yaml`, GraphQL SDL) with `info.version` declared.
26
+ - A flag-key inventory file (`flags.yaml` or registry-of-record).
27
+
28
+ Outputs the skill produces: an 8-line verdict block written to the PR conversation, plus a JSON artifact at `.audit-workspace/enhancability-verify-<sha>.json` for downstream consumption by `hatch3r-release`.
29
+
30
+ ## Step 0 — Detect Ambiguity (P8 B1)
31
+
32
+ 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`. Default path, not exception. Triggers for THIS skill: behavior change classification (new user-visible behavior vs modified API surface vs config-driven threshold change vs extension-point addition), gate selection (flag-adoption vs config-externalization vs API-versioning vs forward-compat vs full), target client audience (every consumer vs N-2 majors vs single internal caller), and irreversible-action scope (retiring a flag, dropping an endpoint, un-externalizing a previously externalized value).
33
+
34
+ ## Fan-out Discipline (P8 B2)
35
+
36
+ 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.
37
+
38
+ ## Invoked by
39
+
40
+ This skill is the verification HARNESS — it declares HOW each enhancability gate is checked. The DISPATCHER that decides WHEN to run it is the CQ specialist agent:
41
+
42
+ - `agents/hatch3r-enhancability.md` — invokes this skill as the closing enhancability gate (CQ9) on PRs modifying behavior, API surfaces, config schema, or extension-point interfaces. The agent contributes the review trigger and Phase-4 dispatch; this skill contributes the 8-gate procedure.
43
+
44
+ No duplication: the agent decides WHEN, this skill defines HOW.
45
+
46
+ ## Gate 1: Feature-flag adoption 100% on user-visible behavior changes
47
+
48
+ - Every new user-visible behavior gated behind an OpenFeature flag (or vendor-equivalent: LaunchDarkly, Flagsmith, Unleash, flagd, Split, CloudBees) with a documented default value, evaluation-context schema (`targetingKey`, plus user / org / region attributes), and rollout plan attached to the PR description.
49
+ - Verify via `grep -rnE "OpenFeature|getBooleanValue|getStringValue|getNumberValue|getObjectValue" <src>` matched against the PR's behavior-change diff.
50
+ - Default value matches the pre-change behavior (no surprise activations on flag-service outage); fallback path tested via `flagd --offline` or `offlineMode: true`.
51
+ - Flag-key inventory entry present in `flags.yaml` with owner, rollout schedule, retirement date.
52
+ - Miss → CRITICAL.
53
+
54
+ ## Gate 2: Configuration externalization 100% on env-dependent values
55
+
56
+ - No hardcoded URLs, timeouts, retry counts, batch sizes, thresholds, or feature toggles in `src/` paths.
57
+ - Every env-dependent value defined in a config schema (Zod / Joi / Pydantic `BaseSettings` / envalid) and overrideable via env var or config file.
58
+ - Verify via `grep -rnE "https?://|setTimeout\([0-9]{4,}|MAX_RETRIES = [0-9]+|BATCH_SIZE = [0-9]+" <src>` against the externalization allow-list.
59
+ - Per-environment config files (`.env.development`, `.env.staging`, `.env.production`) with parity in declared keys.
60
+ - Hardcoded value → FINDINGS; credential, API key, or secret hardcoded → CRITICAL (cross-references `rules/hatch3r-secrets-management.md`).
61
+
62
+ ## Gate 3: Versioned APIs — semver 2.0.0 compliance per public surface
63
+
64
+ - Each public REST / GraphQL / event surface declares its semver version in the spec (`info.version` in OpenAPI, `version:` in AsyncAPI, schema version directive in GraphQL SDL).
65
+ - Follows semver.org rule: MAJOR on breaking change, MINOR on additive change, PATCH on bug fix.
66
+ - Carries a deprecation policy section in the spec stating the per-tier timeline floor: 12 months notice for `team` tier, 18 months for `scaleup` / `enterprise` per 2026 industry guidance.
67
+ - N-2 support policy declared (current major plus two previous majors supported).
68
+ - Missing policy → FINDINGS; semver violation → CRITICAL.
69
+
70
+ ## Gate 4: Forward-compatibility on stable endpoints — additive only + RFC 9745 + RFC 8594 headers
71
+
72
+ - Run `npx oasdiff breaking <prev-spec> <curr-spec>` (REST), `buf breaking --against` (Protobuf), `graphql-inspector diff` (GraphQL); breaking change on a stable endpoint blocks merge.
73
+ - Retiring endpoint emits `Deprecation` header in `@<unix-time>` or IMF-fixdate form per RFC 9745 §2 AND a `Sunset` header in IMF-fixdate GMT form per RFC 8594 §3 where Sunset > Deprecation.
74
+ - `Link: <…>; rel="deprecation"` and `Link: <…>; rel="sunset"` reference migration docs at a stable URL.
75
+ - Verify via `curl -sI <endpoint> | grep -iE "deprecation|sunset|link"`.
76
+ - Breaking change on stable surface → CRITICAL; missing header → FINDINGS; ordering violation → FINDINGS.
77
+
78
+ ## Gate 5: Extension-point definition for cross-cutting concerns
79
+
80
+ - Cross-cutting concerns (auth provider, telemetry exporter, storage backend, notification channel, payment gateway, search index) ship with a named interface (`AuthProvider`, `TelemetryExporter`, `StorageBackend`, `NotificationChannel`).
81
+ - A plugin registration mechanism (`registry.register(name, impl)` or DI-container binding) wires concrete implementations to the interface.
82
+ - A version-stable contract documented inline as a TypeScript / Java / Python interface or in the spec with a `## Stability` block stating `stable | experimental | deprecated` plus the semver version at which the interface stabilized.
83
+ - Missing interface or contract → FINDINGS on optional surfaces, CRITICAL on declared cross-cutting concerns.
84
+
85
+ ## Gate 6: Plugin architecture for pluggable behavior where applicable
86
+
87
+ - Where the design declares pluggable behavior (per ADR or `rules/hatch3r-plugin-architecture.md`), the implementation ships:
88
+ - (a) a registry (Map / class-based with `register()` + `resolve()` methods),
89
+ - (b) DI wiring (NestJS providers, Spring `@Component` scanning, tsyringe containers, Apache PF4J),
90
+ - (c) lifecycle hooks (`onInit`, `onShutdown`, optionally `onConfigChange`, `onHealthCheck`) documented in README or spec.
91
+ - Missing registry → CRITICAL on cross-cutting plugin surfaces, FINDINGS on optional.
92
+ - Skip rule when no pluggable behavior is declared.
93
+
94
+ ## Gate 7: Config schema validated at startup; boot fails on schema violation
95
+
96
+ - Run the schema validator at process boot (`loadConfig()` throws on Zod parse error, Pydantic `BaseSettings()` raises `ValidationError`, Joi `validateSync` returns error, envalid `cleanEnv` exits process).
97
+ - Verify via `node -e "require('./dist/config').loadConfig()"` with an invalid env var injected — process must exit non-zero with a human-readable error message naming the offending field and the expected shape.
98
+ - Silent fallback to defaults on validation error → CRITICAL.
99
+ - Validation deferred to first request (lazy init) → FINDINGS (surfaces config errors as 5xx instead of boot failure).
100
+
101
+ ## Gate 8: Backward-compat tests on every API change
102
+
103
+ - Consumer-driven contract tests (Pact published to broker, `pact-broker can-i-deploy --pacticipant <svc> --version <sha>` exit 0) run in CI.
104
+ - Provider-driven spec-diff CI gate (`oasdiff breaking` / `buf breaking` / `graphql-inspector diff --rule no-breaking-changes`) blocks merge on breaking changes against the stable surface.
105
+ - Experimental surfaces explicitly marked (`x-stability: experimental` in OpenAPI, `@experimental` directive in GraphQL SDL) and exempt; a `## Stability` block in the spec declares the path to stable.
106
+ - Missing CI gate → CRITICAL; failing gate → CRITICAL on stable surface, FINDINGS on experimental.
107
+
108
+ ## Pass criteria
109
+
110
+ All 8 gates pass = the feature is "done". Anything less = not done.
111
+
112
+ - Feature-flag adoption: 100% on user-visible behavior changes; default = pre-change behavior; flag-key inventory entry present.
113
+ - Config externalization: 100% of env-dependent values in schema; 0 hardcoded secrets in `src/`.
114
+ - Semver: spec `info.version` aligned to release tag; deprecation policy 12-18 months declared.
115
+ - Forward-compat: 0 breaking changes on stable endpoints; `Sunset` > `Deprecation` ordering on retiring endpoints.
116
+ - Extension points: 100% of declared cross-cutting concerns have named interface + registration + stability block.
117
+ - Plugin lifecycle: registry + DI + lifecycle hooks present when pluggable behavior declared.
118
+ - Startup validation: process exits non-zero on invalid env var; field + expected shape in error message.
119
+ - Backward-compat tests: Pact + spec-diff CI gates exit 0 on stable surfaces.
120
+
121
+ ## On fail
122
+
123
+ The orchestrator running this skill emits a single-line verdict per gate (`GATE_N: PASS|FAIL <evidence-path>`) and aggregates them. One FAIL on a required gate blocks the merge regardless of reviewer approval status.
124
+
125
+ Failure escalation per `agents/hatch3r-enhancability.md` status mapping: Gate 1 fail (behavior change without flag) → CRITICAL; Gate 2 credential hardcoded → CRITICAL; Gate 3 semver violation → CRITICAL; Gate 4 breaking change on stable surface → CRITICAL; Gate 7 silent fallback → CRITICAL; Gate 8 missing CI gate → CRITICAL; Gates 5/6 on optional surfaces → FINDINGS.
126
+
127
+ ## When this skill runs
128
+
129
+ - Reviewer on any PR modifying user-visible behavior, public API surfaces (OpenAPI / GraphQL SDL / AsyncAPI), config schema, or extension-point interfaces.
130
+ - Implementer pre-write when authoring a new user-visible behavior.
131
+ - Verifier pre-merge gate before `gh pr merge` on protected branches touching public API or behavior-toggle surface.
132
+ - API change audit during a `D14` or `D22` cycle, or whenever the maturity tier increases.
133
+ - Plugin / extension-point surface review before declaring an interface stable.
134
+
135
+ ## Cross-References
136
+
137
+ - `rules/hatch3r-feature-flags.md` — OpenFeature client wiring + flag-key inventory.
138
+ - `rules/hatch3r-api-versioning.md` — semver bumps + deprecation timeline + Sunset header policy.
139
+ - `rules/hatch3r-api-design.md` — RFC 9457 error format + spec-first mandate.
140
+ - `rules/hatch3r-secrets-management.md` — hardcoded credential ban.
141
+ - `agents/shared/quality-charter.md` §API quality + §AI feature backend.
142
+
143
+ ## References
144
+
145
+ - Semantic Versioning 2.0.0 — `semver.org/`
146
+ - RFC 9745 Deprecation header — `www.rfc-editor.org/rfc/rfc9745.html`
147
+ - RFC 8594 Sunset header — `datatracker.ietf.org/doc/html/rfc8594`
148
+ - OpenFeature Specification — `openfeature.dev/specification/`
149
+ - Zuplo Semantic API Versioning — `zuplo.com/learning-center/semantic-api-versioning`
150
+ - Zuplo HTTP Deprecation Header — `zuplo.com/learning-center/http-deprecation-header`
151
+ - oasdiff — `oasdiff.com`
152
+ - Pact — `docs.pact.io/`