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
@@ -2,17 +2,18 @@
2
2
  id: hatch3r-quick-change
3
3
  type: command
4
4
  orchestrator: true
5
- agentPipeline: [hatch3r-implementer, hatch3r-lint-fixer, hatch3r-reviewer, hatch3r-fixer, hatch3r-test-writer, hatch3r-security-auditor]
6
- description: Lightweight command for small changes not worth tracking on the board. Adaptive ceremony with inline or sub-agent implementation, batch support, and soft scope guards.
7
- tags: [core, implementation]
5
+ agentPipeline: [hatch3r-implementer, hatch3r-lint-fixer, hatch3r-reviewer, hatch3r-fixer, hatch3r-ui, hatch3r-ux, hatch3r-security, hatch3r-reliability, hatch3r-testability, hatch3r-scalability, hatch3r-performance, hatch3r-maintainability, hatch3r-enhancability]
6
+ description: "Lightweight workflow for small changes not tracked on the board: adaptive ceremony, inline or sub-agent implementation, batch support."
7
+ tags: [implementation, orchestration]
8
8
  quality_charter: agents/shared/quality-charter.md
9
9
  efficiency_patterns: agents/shared/efficiency-patterns.md
10
10
  cache_friendly: true
11
11
  parallel_tool_default: true
12
+ efficiency_tier: standard
12
13
  triage_tiers: [1, 2, 3]
13
14
  sub_agents_spawned:
14
- count: 6
15
- rationale: Six-stage pipeline per agentPipeline implementer (one per independent area in batch mode), lint-fixer, reviewer fixer review loop, then parallel test-writer + security-auditor; final-quality runs in parallel where independent.
15
+ count: 13
16
+ rationale: Four-stage core pipeline (implementer + lint-fixer + reviewer fixer) plus 9 CQ vector specialists (ui/ux/security/reliability/testability/scalability/performance/maintainability/enhancability) dispatched conditionally per their trigger conditions; the always-on testing + security gates collapse onto `hatch3r-testability` (CQ5) and `hatch3r-security` (CQ3) respectively. Tier 1 trivial edits skip CQ specialists per Phase Skip Criteria. Cost-dominance per CONSTITUTION §2 P8 — token cost never serializes independent work.
16
17
  ---
17
18
 
18
19
  ## §0 Detect Ambiguity (P8 B1)
@@ -27,7 +28,9 @@ Before any action, scan the user's change description for unresolved questions i
27
28
  | 2. Implementation | `hatch3r-implementer` (nontrivial items) | Per item | Nontrivial only |
28
29
  | 3. Lint Fix | `hatch3r-lint-fixer` | No | When lint/type errors |
29
30
  | 4a. Review Loop | `hatch3r-reviewer` -> `hatch3r-fixer` (max 3 iterations) | No (sequential) | Nontrivial only |
30
- | 4b. Final Quality | `hatch3r-test-writer` + `hatch3r-security-auditor` | Yes | Nontrivial code changes |
31
+ | 4b. Final Quality | `hatch3r-testability` + `hatch3r-security` | Yes | Nontrivial code changes |
32
+
33
+ **Parallel-safety conditions** (per `rules/hatch3r-agent-orchestration.md` §Parallel Safety): every parallel fan-out above holds all three — read-only or disjoint writes, deterministic aggregation, no shared mutable state.
31
34
 
32
35
  ## Browser Automation
33
36
 
@@ -53,14 +56,14 @@ This command intentionally skips:
53
56
  - Board context (`hatch3r-board-shared`)
54
57
  - GitHub issues and PRs
55
58
  - Researcher sub-agent
56
- - Full review pipeline (security-auditor, test-writer, docs-writer)
59
+ - Full review pipeline (deep security audit, full test authoring, docs-writer)
57
60
  - Learnings capture (consultation of existing learnings retained — see Step 2c)
58
61
 
59
62
  It retains:
60
63
  - Quality checks (lint, typecheck, test) -- always mandatory
61
64
  - Adaptive sub-agent delegation (implementer for nontrivial items)
62
65
  - Light code review (reviewer for nontrivial items only)
63
- - `scope: always` rules from `.agents/rules/`
66
+ - `scope: always` rules from `rules/`
64
67
  - Soft scope guards to prevent misuse
65
68
  - Lightweight learnings consultation (file-path scan, 150-token budget)
66
69
 
@@ -98,6 +101,39 @@ Classify the change request before delegating. Detailed tier scoring runs in Ste
98
101
 
99
102
  If Tier 1, run inline. If Tier 2, run the implementer-only pipeline below. If Tier 3, exit and recommend `hatch3r-workflow`.
100
103
 
104
+ ### Pre-Execution Cost Preview
105
+
106
+ Before any sub-agent dispatch (Step 4b implementer), surface the cost preview so a nontrivial change is never started blind. Emit the `cost_estimate` block per `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate, calibrated to the Triage tier. Tier 1 trivial inline edits skip the sub-agent path entirely, so `expected_sa_count: 0` is the correct value for them.
107
+
108
+ ```yaml
109
+ cost_estimate:
110
+ expected_sa_count: <Tier 1 inline ~0, Tier 2 ~3 (researcher + implementer + reviewer), up to 13 when CQ specialists trigger>
111
+ estimated_input_tokens_static_frame: <int>
112
+ estimated_web_research_queries: <int>
113
+ triage_tier: light | standard | deep
114
+ estimated_duration_min: <int>
115
+ ```
116
+
117
+ Post-execution actuals + delta land in the Step 8 summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
118
+
119
+ ### Effort Override (Decision 17)
120
+
121
+ Auto-tiering can misclassify — a multi-file change scored as Tier 1, or a one-line edit scored as Tier 2. The user override is the recovery path mandated by hatch3r's universal `--effort` override contract ("User overridable via `--effort` flag"):
122
+
123
+ - `--effort=light|standard` forces the named tier, bypassing the Triage auto-classification. `--effort=deep` is rejected here — quick-change hard-blocks Tier 3 and routes to `hatch3r-workflow`.
124
+ - The override wins over the auto-detected tier; record both the auto-detected tier and the override in the run context so the Cost estimate block reports the budget delta.
125
+ - No override passed → the Triage auto-classification stands.
126
+
127
+ ### Confidence Floor (Decision 16 / D13-SA13.3-F13.3.3)
128
+
129
+ `--effort` calibrates work-effort depth; `--confidence-floor` calibrates the confidence threshold at which the Step 6a review gate blocks. They are orthogonal. This is the user's pre-flight assertiveness knob (the forced-second-pass on low confidence in Step 6a is post-hoc; the floor sets the bar before the run):
130
+
131
+ - `--confidence-floor=any|medium|high` (default `any`). Resolution order: explicit flag wins over the persisted `hatch3r config confidence_floor=...` default, which wins over the built-in `any`.
132
+ - **`any`** (current behavior): Step 6a forces a second reviewer pass only when reviewer confidence `== low` with 0 Critical + 0 Warning.
133
+ - **`medium`**: force a second pass on ANY finding rated `confidence == low`, even with 0 Critical + 0 Warning.
134
+ - **`high`**: force a second pass on any finding rated `confidence != high`, AND ASK the user on every low-confidence finding regardless of severity.
135
+ - Per P1 maturity tier (Decision 16): solo defaults `any`, enterprise defaults `high`. Tier 1 trivial inline edits skip the review loop entirely, so the floor applies only to nontrivial items that reach Step 6a. The floor never relaxes a quality gate.
136
+
101
137
  ---
102
138
 
103
139
  ## Workflow
@@ -137,9 +173,9 @@ Aggregate across the batch for total estimated scope.
137
173
 
138
174
  **Hard block — Tier 3 (Deep):** If any item scores Tier 3, quick-change is not appropriate.
139
175
 
140
- **ASK:** "This change scores Tier 3 (Deep complexity): {reason}. Quick-change does not provide the research depth needed. Options: (a) switch to `/h4tcher-workflow`, (b) narrow the scope."
176
+ **ASK:** "This change scores Tier 3 (Deep complexity): {reason}. Quick-change does not provide the research depth needed. Options: (a) switch to `/hatch3r-workflow`, (b) narrow the scope."
141
177
 
142
- Do NOT offer a "proceed anyway" option for Tier 3. The user must switch to `/h4tcher-workflow` or narrow scope.
178
+ Do NOT offer a "proceed anyway" option for Tier 3. The user must switch to `/hatch3r-workflow` or narrow scope.
143
179
 
144
180
  **Soft guard — Tier 2 (Standard) or threshold triggers:** If any item scores Tier 2, or if any of these threshold triggers fire (any one is sufficient):
145
181
  - Estimated total exceeds **5 files**
@@ -163,7 +199,7 @@ Quick Change Scope:
163
199
 
164
200
  #### 2c. Lightweight Learnings Scan (Optional)
165
201
 
166
- If `.agents/learnings/` exists:
202
+ If `.hatch3r/learnings/` exists:
167
203
 
168
204
  1. Collect the file paths from the affected areas identified in Step 1.
169
205
  2. Scan learning file frontmatter for `area` or `tags` that match the affected file paths or directories.
@@ -179,7 +215,7 @@ If `.agents/learnings/` exists:
179
215
 
180
216
  **Token budget:** Max 150 tokens for this entire step. Read frontmatter only — do not read learning bodies unless the frontmatter matches. Limit to 3 surfaced learnings. If more than 3 match, show the 3 with highest confidence.
181
217
 
182
- If `.agents/learnings/` does not exist, skip this step silently.
218
+ If `.hatch3r/learnings/` does not exist, skip this step silently.
183
219
 
184
220
  **ASK:** "Proceed with these changes? (yes / adjust)"
185
221
 
@@ -231,7 +267,7 @@ No sub-agent delegation. No researcher. Implement and move on.
231
267
 
232
268
  For each nontrivial item (or group of related nontrivial items):
233
269
 
234
- 1. Read `scope: always` rules from `.agents/rules/`.
270
+ 1. Read `scope: always` rules from `rules/`.
235
271
 
236
272
  2. **Lightweight research (Tier 2 items only):** If the item scored Tier 2 in Step 2b and the user chose to proceed with lightweight research, spawn a `hatch3r-researcher` sub-agent with:
237
273
  - **Modes:** `similar-implementation` at `quick` depth (1 reference implementation)
@@ -246,6 +282,7 @@ The implementer prompt MUST include:
246
282
  - Explicit instruction: do NOT create branches, commits, or PRs.
247
283
  - **Reference conventions** from `similar-implementation` output (if step 2 ran) — triggers the implementer's Convention Lock step.
248
284
  - If no researcher ran: explicit instruction that no researcher context is available; work from the change description and codebase alone.
285
+ - `correlation_id` (UUID v4 per top-level task per `rules/hatch3r-agent-orchestration.md` → Correlation ID; batch items share one id with a sub-task index).
249
286
  - Confidence expression requirement: rate every recommendation and finding as high/medium/low confidence per the quality charter (`agents/shared/quality-charter.md`). High = verified against current code. Medium = pattern-based, not fully verified. Low = best judgment, recommend human review.
250
287
 
251
288
  If multiple nontrivial items affect **independent areas** (no shared files), spawn one implementer per area and run them in parallel.
@@ -291,13 +328,14 @@ For nontrivial items, run an iterative review loop (max 3 iterations) until 0 Cr
291
328
  The reviewer prompt MUST include:
292
329
  - The diff of all changes made (use `git diff` on the working tree).
293
330
  - Focus areas: **correctness and code quality only**. Skip security deep-dive, performance profiling, and documentation review.
294
- - All `scope: always` rule directives from `.agents/rules/`.
331
+ - All `scope: always` rule directives from `rules/`.
295
332
  - Iteration number and previous findings (if not the first iteration).
333
+ - `correlation_id` (UUID v4 per top-level task per `rules/hatch3r-agent-orchestration.md` → Correlation ID).
296
334
  - Confidence expression requirement: rate every recommendation and finding as high/medium/low confidence per the quality charter (`agents/shared/quality-charter.md`). High = verified against current code. Medium = pattern-based, not fully verified. Low = best judgment, recommend human review.
297
335
  - Requirement that the reviewer output include a top-level `confidence: high | medium | low` field (not just per-finding) so the gate in step 2 can evaluate it deterministically.
298
336
 
299
- 2. Process reviewer output (confidence-aware gate):
300
- - If **0 Critical + 0 Warning AND reviewer confidence != low**: review loop is clean. Proceed to Step 6b.
337
+ 2. Process reviewer output (confidence-aware gate — the second-pass trigger tightens with the `--confidence-floor` set in the Effort Override section above; `any` = default below, `medium`/`high` raise the bar):
338
+ - If **0 Critical + 0 Warning AND reviewer confidence != low**: review loop is clean. Proceed to Step 6b. (Floor `medium`: also force a second pass if any individual finding is `confidence == low`. Floor `high`: force a second pass if reviewer confidence `!= high` OR any finding is `!= high`, AND ASK on every low-confidence finding.)
301
339
  - If **0 Critical + 0 Warning AND reviewer confidence == low**: trigger a second reviewer pass before exiting. Do not proceed to 6b until the second pass returns non-low confidence OR the user explicitly accepts the low-confidence PASS.
302
340
  - If Critical or Warning findings remain: spawn `hatch3r-fixer` sub-agent to address them, then re-run the reviewer (next iteration).
303
341
  The fixer prompt MUST include: the reviewer findings, all `scope: always` rule directives, and the confidence expression requirement (high/medium/low per the quality charter).
@@ -312,16 +350,25 @@ The reviewer prompt MUST include:
312
350
 
313
351
  After the review loop is clean, spawn both agents in parallel via the Task tool:
314
352
 
315
- 1. `hatch3r-test-writer` — write or update tests for nontrivial code changes.
316
- 2. `hatch3r-security-auditor` — lightweight security review of nontrivial code changes.
353
+ 1. `hatch3r-testability` (CQ5) confirm tests for nontrivial code changes meet the mandate map / coverage floor.
354
+ 2. `hatch3r-security` (CQ3) — lightweight security review of nontrivial code changes (OAuth/OIDC, secrets, supply-chain).
317
355
 
318
356
  Both prompts MUST include:
319
357
  - The diff of all changes made.
320
- - All `scope: always` rule directives from `.agents/rules/`.
358
+ - All `scope: always` rule directives from `rules/`.
359
+ - `correlation_id` (UUID v4 per top-level task per `rules/hatch3r-agent-orchestration.md` → Correlation ID).
321
360
  - Confidence expression requirement: rate every recommendation and finding as high/medium/low confidence per the quality charter (`agents/shared/quality-charter.md`). High = verified against current code. Medium = pattern-based, not fully verified. Low = best judgment, recommend human review.
322
361
 
323
362
  Apply any resulting changes (new tests, security fixes). Re-run quality checks (Step 5a) if changes were made.
324
363
 
364
+ #### 6c. Post-Write Duplication Scan (Decision 21)
365
+
366
+ When the batch ran **2+ parallel implementers** (independent areas, per Step 4b), run a duplication scan before finishing — parallel implementers can each emit near-duplicate helpers that pass their own path independently (D13-SA13.2-F7). Skip when only one implementer ran or all items were trivial (no cross-file clone possible).
367
+
368
+ 1. Run `npx jscpd --min-lines 40 --threshold 80 --reporters json --silent <changed-paths>`. The gate fires on any cross-file clone block **≥40 lines OR ≥80% byte-similar**.
369
+ 2. **If detected:** route the report to `hatch3r-fixer` for a DRY refactor, then re-run quality checks (Step 5a). Max 1 iteration; if it persists, surface the clone locations to the user.
370
+ 3. **If not detected:** proceed to Step 7.
371
+
325
372
  ---
326
373
 
327
374
  ### Step 7: Git Action
@@ -379,6 +426,53 @@ Quick Change Complete:
379
426
 
380
427
  ---
381
428
 
429
+ ## Resumability (Decision 27/30)
430
+
431
+ quick-change runs adaptive ceremony — trivial items execute inline with no checkpoint surface, but a Tier 2/3 batch of multiple nontrivial items can grow to span per-item implementer delegation (Step 4), lint-fix (Step 5), the reviewer ↔ fixer review loop (Step 6), parallel CQ specialist Phase 4 batch (Step 6 final-quality), and the commit phase (Step 7). Per hatch3r's workspace-checkpointed resumability contract, checkpoint progress on nontrivial batches so an interrupted run re-enters at the last completed step rather than re-implementing items that already wrote code.
432
+
433
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Checkpoint Contract. Per-command slots: workspace `.quick-change-workspace/`; step range the Step 1 → Step 8 progression; `wave` = per-item implementer-batch index when batch mode is active; snapshot/rollback paths per-item working-tree state. Write points: Tier 1 trivial inline items skip checkpoint emission (the resume cost would exceed the re-run cost). For nontrivial items: after Step 1 input + batch parsing, after Step 2 tier assessment + soft-guard pass, after Step 3 per-item classification, after each Step 4 implementer batch returns per item (so completed implementations survive a crash and are not re-implemented on resume), after Step 5 lint-fix, after each Step 6 review-loop iteration, after the Step 6 final-quality batch, and after Step 7 git commit.
434
+
435
+ ---
436
+
437
+ ## Per-Turn Pipeline-State Header (Bypass Protection)
438
+
439
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Per-Turn Pipeline-State Header. Phase mapping for quick-change: `1` = scope intake + complexity scoring, `2` = inline edit OR implementer dispatch (Tier 1 carve-out per `rules/hatch3r-agent-orchestration.md` Mandatory Delegation Directive applies only at Tier 1), `3` = lint + typecheck + test verification, `4` = Step 8 summary + iteration-summary. Tier 1 runs are exempt per the Tier 1 exemption.
440
+
441
+ ## End-of-Turn Delegation Attestation (Bypass Protection)
442
+
443
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → End-of-Turn Delegation Attestation. Per-command mutated-file slot: target edit, test additions. quick-change is the one command with a Tier-1 inline-edit carve-out (per `rules/hatch3r-agent-orchestration.md` Mandatory Delegation Directive): a Tier-1 inline edit by the orchestrator sets `inline_edits_by_orchestrator: <carve-out: Tier-1 inline edit per quick-change scope>` instead of `none`.
444
+
445
+ ## Iteration Summary (mandatory output)
446
+
447
+ Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output (the Step 8 Summary above is the quick-change-specific rendering — both the Step 8 block and the 9-section canonical contract apply). The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
448
+
449
+ The 9 sections:
450
+
451
+ 1. **Request** — verbatim restatement of the user's ask in one sentence.
452
+ 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
453
+ 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
454
+ 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
455
+ 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
456
+ 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
457
+ 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
458
+ 8. **Open Questions / Blockers** — explicit `None` if fully closed.
459
+ 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
460
+
461
+ ### Cost Visibility (Decision 24)
462
+
463
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
464
+
465
+ ## Cost estimate (Decision 24)
466
+
467
+ This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
468
+
469
+ - **Pre-execution `cost_estimate`** — emitted in the Pre-Execution Cost Preview above before the first sub-agent dispatch.
470
+ - **Post-execution `cost_actuals` + `delta`** — appended to the Step 8 summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
471
+
472
+ Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 13` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 trivial inline ≈ 0 (no sub-agent); Tier 2 ≈ 3 (researcher + implementer + reviewer, plus lint-fixer/fixer/testability/security when triggered); up to 13 when the conditional CQ vector specialists fire per their trigger conditions. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
473
+
474
+ ---
475
+
382
476
  ## Error Handling
383
477
 
384
478
  - **Quality check failure after 2 retries**: Present the specific failures and ASK the user whether to commit partial progress, keep trying, or abort.
@@ -386,7 +480,7 @@ Quick Change Complete:
386
480
  - **Reviewer flags critical issues**: Present them and ASK whether to fix or proceed without fixing.
387
481
  - **Scope creep during implementation**: If actual changes exceed the soft guard thresholds (5 files / 200 lines), warn the user and suggest deferring remaining items to a `hatch3r-workflow` session.
388
482
  - **Push failure**: Present the error. Use `git push -u origin {branch}` for new branches. For diverged branches, suggest `git pull --rebase` and ASK before proceeding.
389
- - **Context degradation (>15 turns)**: Quick changes should complete fast. If the session exceeds 15 turns, suggest starting fresh or switching to `hatch3r-workflow`.
483
+ - **Context degradation**: per the canonical Context-Degradation Policy (`rules/hatch3r-agent-orchestration-detail.md` -> Context-Degradation Policy) compress at `>50%` context window, restart at `>75%`; the coarse turn-count fallback for this fast-completion command is ~15 turns, at which point suggest starting fresh or switching to `hatch3r-workflow`.
390
484
 
391
485
  ## Guardrails
392
486
 
@@ -398,4 +492,5 @@ Quick Change Complete:
398
492
  - **No board operations.** Never create issues, update project boards, or sync with GitHub Projects.
399
493
  - **No PR creation.** Quick changes commit directly; PRs are the user's responsibility if needed.
400
494
  - **Respect `scope: always` rules** when delegating to sub-agents. Sub-agents do not inherit rules automatically.
495
+ - **Concurrent invocation:** for Tier 2/3 batches, acquire `.hatch3r/.lock` and detect-then-warn on a conflicting active pipeline (same branch / open `.hatch3r/hatch.json` transaction) per `rules/hatch3r-agent-orchestration.md` → Parallel Safety → Concurrent Invocation Handling. Tier 1 inline edits with no checkpoint surface are exempt.
401
496
  - **This command composes existing hatch3r agents** (implementer, reviewer, lint-fixer) -- it does not replace them.
@@ -9,15 +9,17 @@ quality_charter: agents/shared/quality-charter.md
9
9
  efficiency_patterns: agents/shared/efficiency-patterns.md
10
10
  cache_friendly: true
11
11
  parallel_tool_default: true
12
+ efficiency_tier: deep
12
13
  triage_tiers: [1, 2, 3]
14
+ supports_resume: true
13
15
  sub_agents_spawned:
14
16
  count: 4
15
- rationale: Four parallel hatch3r-researcher modes per refactoring brief — current-state, refactoring-strategy, impact-and-risk, migration-path — dispatched concurrently in Step 3; a docs-writer composes the refactoring spec on their merged output.
17
+ rationale: Four parallel hatch3r-researcher modes per refactoring brief — current-state, refactoring-strategy, impact-and-risk, migration-path — dispatched concurrently in Step 3; a docs-writer composes the refactoring spec on their merged output. Cost-dominance per CONSTITUTION §2 P8 — token cost never serializes independent work.
16
18
  ---
17
19
 
18
20
  ## §0 Detect Ambiguity (P8 B1)
19
21
 
20
- 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.
22
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` §0 Detect Ambiguity (P8 B1). Triggers: contradictory inputs, missing target, unknown convention.
21
23
 
22
24
  ## Agent Pipeline
23
25
 
@@ -27,6 +29,8 @@ Before any action, scan the user's request and provided context for unresolved q
27
29
  | 2. Document Generation | `hatch3r-docs-writer` (refactoring spec, ADRs) | Yes | Yes |
28
30
  | 3. Todo Generation | Orchestrator (inline) | No | Yes |
29
31
 
32
+ **Parallel-safety conditions** (per `rules/hatch3r-agent-orchestration.md` §Parallel Safety): every parallel fan-out above holds all three — read-only or disjoint writes, deterministic aggregation, no shared mutable state.
33
+
30
34
  # Refactor Plan — Refactoring & Migration Specification from Problem to Phased Execution
31
35
 
32
36
  Take a refactoring goal or migration need and produce a complete refactoring specification (`docs/specs/`), architectural decision records (`docs/adr/`) when the approach involves significant design choices, and structured `todo.md` entries (phased work items) ready for `hatch3r-board-fill`. Spawns parallel researcher sub-agents (current state analysis, refactoring strategy, impact & risk assessment, migration path planning) to design the refactoring from multiple angles before generating artifacts. AI proposes all outputs; user confirms before any files are written. Optionally chains into `hatch3r-board-fill` to create GitHub issues immediately.
@@ -44,7 +48,7 @@ The command produces phased todo.md entries that map to the appropriate executio
44
48
 
45
49
  ## Shared Context
46
50
 
47
- **Read the `hatch3r-board-shared` command at the start of the run** if it exists. While this command does not perform board operations directly, it establishes patterns and context (GitHub owner/repo, tooling directives) that downstream commands like `hatch3r-board-fill` rely on. Cache any values found.
51
+ **Read the `hatch3r-board-shared` skill at the start of the run** if it exists. While this command does not perform board operations directly, it establishes patterns and context (GitHub owner/repo, tooling directives) that downstream commands like `hatch3r-board-fill` rely on. Cache any values found.
48
52
 
49
53
  ## Token-Saving Directives
50
54
 
@@ -54,6 +58,12 @@ The command produces phased todo.md entries that map to the appropriate executio
54
58
 
55
59
  ---
56
60
 
61
+ ## Confidence Propagation Contract
62
+
63
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Confidence Propagation Contract. Readiness kind: plan.
64
+
65
+ ---
66
+
57
67
  ## Workflow
58
68
 
59
69
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
@@ -68,6 +78,25 @@ Classify the refactor-planning request before delegating:
68
78
 
69
79
  If Tier 1, run the reduced researcher set and skip ADR generation unless decisions are obvious. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including ADR generation and confirm phasing with the user before writing files.
70
80
 
81
+ ### Step 0.5: Emit Pre-Execution Cost Preview
82
+
83
+ Before the first researcher dispatch (Step 3), surface the cost preview so a multi-researcher refactor-planning run is never started blind. Emit the `cost_estimate` block per `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate, calibrated to the Step 0 triage tier:
84
+
85
+ ```yaml
86
+ cost_estimate:
87
+ expected_sa_count: <triage tier → Tier 1 ~2, Tier 2 ~4, Tier 3 up to 4>
88
+ estimated_input_tokens_static_frame: <int>
89
+ estimated_web_research_queries: <int>
90
+ triage_tier: light | standard | deep
91
+ estimated_duration_min: <int>
92
+ ```
93
+
94
+ Post-execution actuals + delta land in the iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
95
+
96
+ ### Effort Override (Decision 17)
97
+
98
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Effort Override (Decision 17). Misclassification example: a localized refactor scored as Deep, or a cross-cutting refactor scored as Light.
99
+
71
100
  ---
72
101
 
73
102
  ### Step 1: Gather Refactoring Goal
@@ -114,10 +143,10 @@ Refactoring Brief:
114
143
  - `docs/specs/` — project specifications (read TOC/headers first, expand relevant sections only)
115
144
  - `docs/adr/` — architectural decision records (scan for decisions relevant to the target area)
116
145
  - `README.md` — project overview
117
- - `.agents/hatch.json` — board configuration
146
+ - `.hatch3r/hatch.json` — board configuration
118
147
  - Existing `todo.md` — current backlog (check for overlap or related items)
119
148
  2. Scan GitHub issues via `search_issues` for existing work related to the refactoring area. Note in-progress work, dependencies, or prior refactoring attempts.
120
- 3. If `.agents/learnings/` exists, scan for learnings relevant to the target area. Match by area and tags against the refactoring brief.
149
+ 3. If `.hatch3r/learnings/` exists, scan for learnings relevant to the target area. Match by area and tags against the refactoring brief.
121
150
  4. Scan test coverage in the target area — identify which parts have strong test coverage (safe to refactor) vs. weak coverage (need tests first).
122
151
  5. Present a context summary:
123
152
 
@@ -440,12 +469,59 @@ If yes, instruct the user to invoke the `hatch3r-board-fill` command. Note that
440
469
 
441
470
  ---
442
471
 
472
+ ## Resumability (Decision 27/30)
473
+
474
+ refactor-plan is long-running — a Tier 3 refactor brief fans out 5 parallel researcher sub-agents (Step 3), drives an ASK checkpoint synthesis (Step 4), and writes a multi-file spec + ADRs + todo.md (Steps 5–8). Per hatch3r's workspace-checkpointed resumability contract, checkpoint progress so an interrupted run re-enters at the last completed step rather than re-running the researcher batch.
475
+
476
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Checkpoint Contract. Per-command slots: workspace `.refactor-plan-workspace/`; step range the Step 0 → Step 8 progression; `wave` = researcher-batch index; snapshot/rollback paths `docs/specs/`, `docs/adr/`, and `todo.md`; `meta` adds `refactorSlug`. Write points: after Step 1 brief confirmation, after Step 3 researcher fan-out completes, after the Step 4 ASK synthesis is confirmed, and after each Step 5–8 file write so already-generated spec/ADR/todo entries survive a crash and are not regenerated on resume.
477
+
478
+ ---
479
+
480
+ ## Per-Turn Pipeline-State Header (Bypass Protection)
481
+
482
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Per-Turn Pipeline-State Header. Phase mapping for refactor-plan: `1` = scope + blast-radius intake, `2` = researcher sub-agent dispatch (consumer map, contract inventory), `3` = plan synthesis + sequencing, `4` = plan write + iteration-summary. Tier 1 runs are exempt per the Tier 1 exemption.
483
+
484
+ ## End-of-Turn Delegation Attestation (Bypass Protection)
485
+
486
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → End-of-Turn Delegation Attestation. Per-command mutated-file slot: plan document, sequencing spec, regression-test scaffolding.
487
+
488
+ ## Iteration Summary (mandatory output)
489
+
490
+ Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
491
+
492
+ The 9 sections:
493
+
494
+ 1. **Request** — verbatim restatement of the user's ask in one sentence.
495
+ 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
496
+ 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
497
+ 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
498
+ 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
499
+ 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
500
+ 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
501
+ 8. **Open Questions / Blockers** — explicit `None` if fully closed.
502
+ 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
503
+
504
+ ### Cost Visibility (Decision 24)
505
+
506
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
507
+
508
+ ## Cost estimate (Decision 24)
509
+
510
+ This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
511
+
512
+ - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first researcher dispatch.
513
+ - **Post-execution `cost_actuals` + `delta`** — appended to the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
514
+
515
+ Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 4` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 2 (reduced researcher set); Tier 2/3 spawn up to 4 parallel researcher modes (current-state + refactoring-strategy + migration-path + risk). Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
516
+
517
+ ---
518
+
443
519
  ## Error Handling
444
520
 
445
521
  - **Sub-agent failure:** Retry the failed sub-agent once. If it fails again, present partial results from the remaining sub-agents and ask the user how to proceed (continue without that researcher's input / provide the missing information manually / abort).
446
522
  - **Conflicting researcher outputs:** Present both options side by side with trade-offs. Ask the user to decide. Do not silently pick one.
447
523
  - **File write failure:** Report the error and provide the full file content so the user can create the file manually.
448
- - **Missing project context:** If no `hatch3r-board-shared` or `.agents/hatch.json` exists, proceed without board context — this command does not require board configuration.
524
+ - **Missing project context:** If no `hatch3r-board-shared` or `.hatch3r/hatch.json` exists, proceed without board context — this command does not require board configuration.
449
525
  - **No existing specs or docs:** Proceed without spec references. Warn that the refactoring spec will be less contextualized without existing project documentation. Recommend running `hatch3r-project-spec` or `hatch3r-codebase-map` first for best results.
450
526
  - **Duplicate detection:** If the refactoring overlaps significantly with existing todo.md items or GitHub issues found in Step 2, present the overlap and ASK whether to proceed (augment existing / replace / abort).
451
527
  - **Weak test coverage:** If the current state analyzer finds weak test coverage in the target area, the migration path planner MUST include a Phase 0 for test scaffolding. Do not proceed with refactoring phases without adequate coverage.