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
@@ -1,147 +0,0 @@
1
- ---
2
- id: hatch3r-context-health
3
- type: command
4
- orchestrator: false
5
- description: Monitor conversation context health, detect degradation, and auto-suggest fresh context or sub-agent delegation
6
- tags: [maintenance]
7
- quality_charter: agents/shared/quality-charter.md
8
- efficiency_patterns: agents/shared/efficiency-patterns.md
9
- cache_friendly: true
10
- parallel_tool_default: true
11
- ---
12
-
13
- ## §0 Detect Ambiguity (P8 B1)
14
-
15
- Before any action, scan the user's request and provided context for unresolved questions in scope, acceptance criteria, irreversibility, or constraint conflicts (contradictory inputs, missing target, unknown convention). If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` — do not proceed under silent assumption. This is the default path, not an exception. Acceptable to proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable. Any residual ambiguity discovered mid-workflow invokes the same protocol.
16
-
17
- ## Agent Pipeline
18
-
19
- This command monitors context health and recommends delegation. It does not spawn sub-agents directly — it recommends when the orchestrator should delegate to sub-agents due to context degradation.
20
-
21
- # Context Health — Conversation Context Monitoring
22
-
23
- Monitor and maintain healthy conversation context during long-running agent sessions. Detects context degradation before it impacts output quality and recommends corrective actions.
24
-
25
- ---
26
-
27
- ## Context Health Indicators
28
-
29
- ### Degradation Signals
30
-
31
- | Signal | Detection Method | Default Threshold |
32
- |--------|-----------------|-------------------|
33
- | Conversation depth | Count user/assistant turns | > 30 turns |
34
- | Token accumulation | Estimate total context tokens | > 80% of model context window |
35
- | Topic drift | Compare current task to original issue scope | Cosine similarity < 0.6 |
36
- | Repeated errors | Track consecutive failed attempts | > 2 failures on same task |
37
- | File staleness | Track time since last file re-read | > 20 turns since last read |
38
- | Tool failure rate | Track tool call success/failure ratio | > 30% failure rate |
39
-
40
- ### Model-Aware Threshold Profiles
41
-
42
- Different models have different context window sizes and degradation characteristics. The default thresholds above assume a large-context model. When the active model is known, apply the matching profile to adjust thresholds dynamically.
43
-
44
- | Model Tier | Context Window | Token Warning | Turn Limit | File Staleness |
45
- |-----------|---------------|---------------|------------|----------------|
46
- | Small (< 32K) | ~32K tokens | > 60% of window | > 15 turns | > 10 turns |
47
- | Medium (32K--128K) | ~128K tokens | > 70% of window | > 25 turns | > 15 turns |
48
- | Large (128K--200K) | ~200K tokens | > 80% of window | > 30 turns | > 20 turns |
49
- | Extended (> 200K) | 200K+ tokens | > 85% of window | > 40 turns | > 25 turns |
50
-
51
- **Profile resolution:**
52
-
53
- 1. Check `models` in `hatch.json` for the configured model. If a model name or tier is specified, use the matching profile.
54
- 2. If no model is configured, default to the **Large** profile (backward-compatible with existing thresholds).
55
- 3. When the runtime reports the model name (e.g., via API response headers or tool metadata), map it to the appropriate tier using known model context sizes.
56
- 4. Log the active profile at the start of each health check: `"Context health using <tier> profile (<window_size> tokens)"`.
57
-
58
- **Custom thresholds:** If `hatch.json` includes a `contextHealth` section with explicit thresholds, those values override the model-aware profile. This allows teams to tune thresholds for their specific workflow patterns.
59
-
60
- ### Health Levels
61
-
62
- | Level | Status | Action |
63
- |-------|--------|--------|
64
- | Green | Healthy (< 50% indicators triggered) | Continue normally |
65
- | Yellow | Degrading (50-70% indicators triggered) | Refresh key context, summarize progress |
66
- | Orange | At risk (70-90% indicators triggered) | Delegate remaining work to sub-agent |
67
- | Red | Degraded (> 90% indicators triggered) | Stop, create checkpoint, spawn fresh agent |
68
-
69
- ## Monitoring Protocol
70
-
71
- ### Passive Monitoring (Always Active)
72
-
73
- Agents should self-assess context health at natural breakpoints:
74
- - After completing each sub-task or implementation step
75
- - Before starting a new file or module
76
- - After receiving an error or unexpected result
77
- - Every 10 conversation turns
78
-
79
- ### Self-Assessment Checklist
80
-
81
- At each checkpoint, the agent evaluates:
82
- 1. **Can I accurately recall the original task requirements without re-reading?**
83
- 2. **Am I making progress or cycling on the same issue?**
84
- 3. **Are my tool calls succeeding at a reasonable rate?**
85
- 4. **Is my understanding of the codebase still current?**
86
- 5. **Have I drifted from the issue's acceptance criteria?**
87
-
88
- ### Corrective Actions
89
-
90
- #### Refresh (Yellow)
91
- - Re-read the issue body and acceptance criteria
92
- - Re-read key files that have been modified
93
- - Summarize progress so far in a structured checkpoint
94
-
95
- #### Delegate (Orange)
96
- - Create a structured handoff document with: completed work, remaining tasks, key context, file list
97
- - Spawn a sub-agent with the handoff document using the Task tool
98
- - The sub-agent starts fresh with full context window
99
-
100
- #### Checkpoint and Stop (Red)
101
- - Save a progress checkpoint: files changed, tests written, current blockers
102
- - Post a status comment on the GitHub issue with progress
103
- - Recommend the user start a new conversation for the remaining work
104
-
105
- ## Integration with Board Pickup
106
-
107
- When `board-pickup` operates in auto-advance mode:
108
- - Context health is checked between each issue
109
- - If health drops to Orange, the current issue is completed and a fresh agent handles the next one
110
- - If health drops to Red mid-issue, the issue is marked as PARTIAL and moved back to Ready
111
-
112
- ## Output Format
113
-
114
- ```
115
- ## Context Health Check
116
-
117
- **Level:** GREEN | YELLOW | ORANGE | RED
118
-
119
- **Indicators:**
120
- - Conversation depth: {turns} / 30
121
- - Token usage: ~{estimated}% of context window
122
- - Topic coherence: {assessment}
123
- - Error rate: {n} failures in last {m} operations
124
- - File staleness: {n} files not re-read in {m} turns
125
-
126
- **Recommendation:** {CONTINUE | REFRESH | DELEGATE | CHECKPOINT}
127
-
128
- **Action taken:** {what corrective action was performed, if any}
129
- ```
130
-
131
- ---
132
-
133
- ## Error Handling
134
-
135
- - **Self-assessment failure:** If the agent cannot determine its own health level, default to Yellow and perform a context refresh.
136
- - **Delegation failure:** If sub-agent spawn fails, fall back to Checkpoint and Stop (Red protocol).
137
- - **Board integration failure:** Log warning and continue. Context health operates independently of board state.
138
-
139
- ---
140
-
141
- ## Guardrails
142
-
143
- - **Never ignore Red status.** A Red assessment always results in a checkpoint and stop.
144
- - **Do not inflate health.** When uncertain, round toward the more degraded level.
145
- - **Passive monitoring is mandatory** during board-pickup auto-advance mode.
146
- - **Handoff documents must be complete.** Never delegate without listing completed work, remaining tasks, key context, and file list.
147
- - **Do not expand scope during refresh.** Re-reading context is not an invitation to add new tasks.
@@ -1,163 +0,0 @@
1
- ---
2
- id: hatch3r-cost-tracking
3
- type: command
4
- orchestrator: false
5
- description: Track and report token usage and estimated costs across agent workflows and board operations
6
- tags: [maintenance]
7
- quality_charter: agents/shared/quality-charter.md
8
- efficiency_patterns: agents/shared/efficiency-patterns.md
9
- cache_friendly: true
10
- parallel_tool_default: true
11
- ---
12
- ## Agent Pipeline
13
-
14
- This command tracks token usage and costs. It does not spawn sub-agents directly — it monitors sub-agent usage across the session.
15
-
16
- # Cost Tracking — Token Usage and Cost Reporting
17
-
18
- Track token consumption and estimated costs across sub-agent workflows, board operations, and development sessions. Provides visibility into AI usage patterns and enforces cost guardrails.
19
-
20
- ---
21
-
22
- ## Cost Tracking Model
23
-
24
- ### Token Estimation
25
-
26
- Since exact token counts are not always available from the runtime, use estimation:
27
-
28
- | Content Type | Estimation Rule |
29
- |-------------|----------------|
30
- | User message | ~4 characters per token |
31
- | Assistant response | ~4 characters per token |
32
- | Tool call (input) | JSON stringified length / 4 |
33
- | Tool call (output) | Response length / 4 |
34
- | File read | File character count / 4 |
35
- | Web search | ~500 tokens per search |
36
-
37
- ### Cost Estimation
38
-
39
- | Model Tier | Input (per 1M tokens) | Output (per 1M tokens) |
40
- |-----------|----------------------|----------------------|
41
- | Fast | $0.25 | $1.00 |
42
- | Standard | $3.00 | $15.00 |
43
- | Premium | $15.00 | $75.00 |
44
-
45
- These are reference rates — update based on actual provider pricing.
46
-
47
- ## Tracking Scope
48
-
49
- ### Per-Issue Tracking
50
- - Total tokens consumed implementing an issue
51
- - Breakdown: planning vs implementation vs testing vs review
52
- - Sub-agent token usage (each sub-agent reports independently)
53
- - Estimated cost at current model pricing
54
-
55
- ### Per-Session Tracking
56
- - Total tokens in the current conversation
57
- - Running cost estimate
58
- - Comparison to session budget (if configured)
59
- - Warning at 50%, 75%, 90% of budget
60
-
61
- ### Board Operation Tracking
62
- - Tokens consumed per board-pickup cycle
63
- - Tokens per issue type (bug fix vs feature vs refactor)
64
- - Historical trends across sessions
65
- - Average cost per completed issue
66
-
67
- ## Cost Guardrails
68
-
69
- ### Budget Configuration
70
-
71
- Configure in `hatch.json`:
72
- ```json
73
- {
74
- "costTracking": {
75
- "sessionBudget": 10.00,
76
- "issueBudget": 5.00,
77
- "epicBudget": 50.00,
78
- "currency": "USD",
79
- "warningThresholds": [0.5, 0.75, 0.9],
80
- "hardStop": true
81
- }
82
- }
83
- ```
84
-
85
- ### Default Budgets
86
-
87
- When `hatch.json` has no `costTracking` section, the following defaults are applied automatically. These defaults provide baseline guardrails without requiring explicit configuration.
88
-
89
- | Budget Type | Default Value | Rationale |
90
- |------------|--------------|-----------|
91
- | `sessionBudget` | $10.00 | Covers a typical multi-issue development session (~3-4 issues at ~$3 each, with headroom) |
92
- | `issueBudget` | $5.00 | Accommodates the full 4-phase pipeline (Research + Implement + Review + Quality) for a standard task |
93
- | `epicBudget` | $25.00 | Covers ~5 sub-issues with shared overhead for batch coherence assessment |
94
- | `warningThresholds` | [0.5, 0.75, 0.9] | Progressive alerts at 50%, 75%, and 90% of budget |
95
- | `hardStop` | false | Defaults to soft warnings (log + alert) rather than blocking. Teams can opt into hard stops explicitly. |
96
-
97
- These defaults activate reporting mode: budget warnings are surfaced to the user at each threshold, but work is not halted unless `hardStop` is explicitly set to `true`. To override any default, add the corresponding key to `costTracking` in `hatch.json`.
98
-
99
- ### Enforcement
100
-
101
- | Threshold | Action |
102
- |-----------|--------|
103
- | 50% of budget | Log warning, continue |
104
- | 75% of budget | Alert user, suggest optimization |
105
- | 90% of budget | Strong warning, recommend delegation or checkpoint |
106
- | 100% of budget | Stop (if hardStop=true) or alert and continue |
107
-
108
- ### Cost Optimization Strategies
109
-
110
- When approaching budget limits:
111
- 1. **Reduce context**: Summarize long conversations, drop irrelevant file content
112
- 2. **Delegate to faster models**: Use fast-tier sub-agents for routine tasks
113
- 3. **Cache results**: Avoid re-reading unchanged files
114
- 4. **Batch operations**: Combine multiple small tool calls into fewer larger ones
115
- 5. **Scope reduction**: Break remaining work into a new issue for a fresh session
116
-
117
- ## Output Format
118
-
119
- ```
120
- ## Cost Report: {scope}
121
-
122
- **Period:** {session/issue/sprint}
123
-
124
- **Token Usage:**
125
- - Input tokens: ~{n}
126
- - Output tokens: ~{n}
127
- - Total tokens: ~{n}
128
-
129
- **Estimated Cost:** ${amount}
130
-
131
- **Budget Status:** {amount} / {budget} ({percentage}%)
132
-
133
- **Breakdown:**
134
-
135
- | Phase | Tokens | Cost | % of Total |
136
- |-------|--------|------|-----------|
137
- | Planning | ~{n} | ${x} | {%} |
138
- | Implementation | ~{n} | ${x} | {%} |
139
- | Testing | ~{n} | ${x} | {%} |
140
- | Review | ~{n} | ${x} | {%} |
141
- | Sub-agents | ~{n} | ${x} | {%} |
142
-
143
- **Optimization Opportunities:**
144
- - {suggestions based on usage patterns}
145
- ```
146
-
147
- ---
148
-
149
- ## Error Handling
150
-
151
- - **Token estimation inaccuracy:** Estimates may drift ±30% from actual usage. Always present values with `~` prefix.
152
- - **Missing budget config:** If `hatch.json` has no `costTracking` section, operate in report-only mode (no guardrails enforced).
153
- - **Sub-agent reporting failure:** If a sub-agent does not report token usage, estimate from its output length and log a warning.
154
-
155
- ---
156
-
157
- ## Guardrails
158
-
159
- - **Never suppress budget warnings.** All threshold alerts must be surfaced to the user.
160
- - **Hard stop is respected.** When `hardStop: true` and budget is exhausted, the agent must stop and checkpoint.
161
- - **Estimates are clearly labeled.** Never present estimated costs as exact figures.
162
- - **Budget config is read-only.** This command reads budget configuration but never modifies `hatch.json`.
163
- - **Cost data does not leak across sessions.** Each session starts with a fresh cost counter unless explicitly aggregating historical data.
@@ -1,188 +0,0 @@
1
- ---
2
- id: hatch3r-dep-audit
3
- type: command
4
- orchestrator: false
5
- description: Scan, assess, and upgrade npm dependencies. Categorizes findings by severity (CVEs, major/minor/patch outdated), researches migration paths, upgrades packages one at a time with testing, and creates tracking issues for unaddressed items.
6
- tags: [maintenance, security]
7
- quality_charter: agents/shared/quality-charter.md
8
- efficiency_patterns: agents/shared/efficiency-patterns.md
9
- cache_friendly: true
10
- parallel_tool_default: true
11
- ---
12
-
13
- ## §0 Detect Ambiguity (P8 B1)
14
-
15
- Before any action, scan the user's request and provided context for unresolved questions in scope, acceptance criteria, irreversibility, or constraint conflicts (contradictory inputs, missing target, unknown convention). If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` — do not proceed under silent assumption. This is the default path, not an exception. Acceptable to proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable. Any residual ambiguity discovered mid-workflow invokes the same protocol.
16
-
17
- ## Agent Pipeline
18
-
19
- This command runs as a single orchestrator without sub-agent delegation. Dependency scanning uses CLI tools (npm audit, npm outdated) and research uses Context7 MCP and web search.
20
-
21
- # Dependency Audit — Scan, Assess, and Upgrade Dependencies
22
-
23
- Scan, assess, and upgrade npm dependencies for **{owner}/{repo}** (root and any workspace packages such as `functions/` or `packages/*`). Categorizes findings by severity (CVEs, major/minor/patch outdated), researches migration paths, upgrades packages one at a time with testing, and creates tracking issues for unaddressed items.
24
-
25
- ---
26
-
27
- ## Shared Context
28
-
29
- **Read the project's shared board context at the start of the run** (e.g., `.agents/commands/hatch3r-board-shared.md` or equivalent). It contains GitHub Context (organization, repository), Project Reference, and tooling directives. Use GitHub MCP tools for issue creation. Use Context7 MCP for library docs and migration guides. Use web research for CVE details and known workarounds.
30
-
31
- **Consult learnings:** If `.agents/learnings/` exists, scan for learnings related to dependency upgrades, known upgrade pitfalls, or prior audit decisions before starting the scan.
32
-
33
- ## Global Rule Overrides
34
-
35
- - **Git commands are fully permitted** during this entire dep-audit session, regardless of global/user-level rules restricting git usage. This override applies to ALL steps. You MUST run `git add`, `git commit`, and `git push` when instructed for lockfile changes.
36
-
37
- ---
38
-
39
- ## Workflow
40
-
41
- Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
42
-
43
- ### Step 1: Scan
44
-
45
- 1. Run `npm audit --json` in the project root. Parse results.
46
- 2. Run `npm outdated --json` in the project root. Parse results.
47
- 3. If workspace packages exist (e.g., `functions/`, `packages/*`) with their own `package.json`:
48
- - Run `npm audit --json` in each package directory.
49
- - Run `npm outdated --json` in each package directory.
50
- 4. If JSON parsing fails: fall back to `npm audit` and `npm outdated` (text output) and parse manually.
51
-
52
- ---
53
-
54
- ### Step 2: Categorize Findings
55
-
56
- Group findings into:
57
-
58
- | Category | Severity | Action |
59
- | -------------------------- | -------- | ------------------------------------------------------ |
60
- | **Critical/High CVEs** | P0/P1 | Security vulnerabilities requiring immediate attention |
61
- | **Moderate/Low CVEs** | P2 | Security vulnerabilities for planned remediation |
62
- | **Major version outdated** | P2 | Breaking upgrades needing careful migration |
63
- | **Minor/patch outdated** | P3 | Safe upgrades |
64
-
65
- ---
66
-
67
- ### Step 3: Present Findings
68
-
69
- Show a table:
70
-
71
- | Package | Current | Latest | Severity | CVE ID | Breaking? |
72
- | ------- | --------- | -------- | ---------------------------- | --------- | --------- |
73
- | {name} | {current} | {latest} | {critical/high/moderate/low} | {CVE-XXX} | {yes/no} |
74
-
75
- Include a brief summary of breaking changes for major versions.
76
-
77
- **ASK:** "Which categories to address? (a) all, (b) critical/high CVEs only, (c) specific packages, (d) skip and create tracking issues only"
78
-
79
- ---
80
-
81
- ### Step 4: Research
82
-
83
- For each selected package:
84
-
85
- 1. Use **Context7 MCP**: `resolve-library-id` then `query-docs` to check migration guides and breaking changes.
86
- 2. Use **web research** for CVE details and known workarounds.
87
- 3. Summarize migration path and risks for the user.
88
-
89
- **ASK:** "Research complete for selected packages. Proceed with upgrades? (yes / review specific package / abort)"
90
-
91
- ---
92
-
93
- ### Step 5: Upgrade
94
-
95
- For each selected package, **one at a time**:
96
-
97
- 1. Install the new version in the appropriate directory (root or workspace package):
98
-
99
- ```bash
100
- npm install {package}@{version}
101
- ```
102
-
103
- 2. Run quality checks (adapt to project conventions):
104
-
105
- ```bash
106
- npm run lint && npm run typecheck && npm run test
107
- ```
108
-
109
- 3. If tests fail:
110
- - Assess whether it's a breaking change needing code updates or a genuine regression.
111
- - **STOP** and report the failure.
112
- - **ASK:** "Tests failed for {package}. (a) roll back and create tracking issue, (b) attempt code fixes, (c) skip this package and continue"
113
-
114
- 4. If code changes are needed (e.g., API changes):
115
-
116
- **ASK:** "Code changes required for {package}. Proceed with fixes? (yes / roll back and create tracking issue)"
117
-
118
- 5. If upgrade succeeds: commit lockfile changes:
119
-
120
- ```bash
121
- git add package-lock.json
122
- # or package-specific lockfile if applicable
123
- git commit -m "chore(deps): upgrade {package} to {version}"
124
- ```
125
-
126
- 6. Proceed to the next package in the selected set.
127
-
128
- ---
129
-
130
- ### Step 6: Create Tracking Issues
131
-
132
- For any CVEs or outdated packages **NOT** addressed in this session:
133
-
134
- 1. Create GitHub issues via `issue_write` with:
135
- - **Owner:** from shared context
136
- - **Repo:** from shared context
137
- - **Labels:** `type:bug`, `area:security`, `priority:{based on severity}`, `executor:agent`
138
- - **Title:** e.g., `[CVE] {package}: {CVE-ID} - {brief description}` or `[Deps] Upgrade {package} to {version}`
139
- - **Body:** Include package name, current version, target version, severity, CVE ID (if applicable), and migration notes from research.
140
-
141
- 2. Use severity-based priority:
142
- - Critical/High → `priority:p0` or `priority:p1`
143
- - Moderate/Low → `priority:p2`
144
- - Major outdated → `priority:p2`
145
- - Minor/patch → `priority:p3`
146
-
147
- **ASK:** "Tracking issues created for {N} unaddressed items. Proceed to summary? (yes / review issues)"
148
-
149
- ---
150
-
151
- ### Step 7: Summary
152
-
153
- Present a report:
154
-
155
- ```
156
- ## Dependency Audit Summary
157
-
158
- ### Upgraded
159
- - {package} {old} → {new}
160
- - ...
161
-
162
- ### Tracking Issues Created
163
- - #{N} — [CVE] {package}: {CVE-ID}
164
- - #{N} — [Deps] Upgrade {package} to {version}
165
- - ...
166
-
167
- ### Remaining Technical Debt
168
- - {package} — {reason not addressed}
169
- - ...
170
- ```
171
-
172
- ---
173
-
174
- ## Error Handling
175
-
176
- - **npm audit parse failure:** Fall back to `npm audit` text output. Parse manually.
177
- - **npm install failure:** Roll back. `git checkout package.json package-lock.json` (and workspace equivalents if applicable). Report error.
178
- - **Test failure:** Stop. Do not proceed with that package. Report and ask user (roll back / fix / skip).
179
-
180
- ---
181
-
182
- ## Guardrails
183
-
184
- - **Never ignore critical CVEs without creating a tracking issue.** Every critical/high CVE must either be fixed or have a tracking issue.
185
- - **Always test after each upgrade.** Do not batch upgrades without testing.
186
- - **Never upgrade all packages at once.** One package at a time.
187
- - **Always commit lockfile changes** after successful upgrades.
188
- - **ASK at every checkpoint.** Do not proceed without user confirmation.
@@ -1,133 +0,0 @@
1
- ---
2
- id: hatch3r-handoff
3
- type: command
4
- orchestrator: true
5
- agentPipeline: [hatch3r-handoff-preparer]
6
- description: Prepare, resume, list, complete, and prune cross-session handoff documents.
7
- tags: [core, maintenance]
8
- quality_charter: agents/shared/quality-charter.md
9
- efficiency_patterns: agents/shared/efficiency-patterns.md
10
- cache_friendly: true
11
- parallel_tool_default: true
12
- triage_tiers: [1, 2]
13
- sub_agents_spawned:
14
- count: 1
15
- rationale: Single hatch3r-handoff-preparer delegation for the `prepare` Tier-2 subcommand; `resume`, `list`, `complete`, `prune` run inline with no sub-agent fan-out (filesystem-read or single-file rename per the Triage table).
16
- ---
17
-
18
- ## §0 Detect Ambiguity (P8 B1)
19
-
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.
21
-
22
- ## Agent Pipeline
23
-
24
- The `prepare` subcommand delegates to `hatch3r-handoff-preparer` via the Task tool. The other four subcommands (`resume`, `list`, `complete`, `prune`) run inline within this command — they read, list, transition status, or archive files and do not require a sub-agent.
25
-
26
- ## Learnings Consultation
27
-
28
- Before starting, scan `.agents/learnings/` for entries tagged `handoff`, `context-switch`, `resume`, or `session-state`. Apply the protocol in `rules/hatch3r-learning-consult.md` (frontmatter-first scan; surface top 5 by confidence). Skip if the directory has fewer than 3 files.
29
-
30
- # Handoff Management — Cross-Session Work Continuity
31
-
32
- Manage canonical handoff documents at `.agents/handoffs/active/` for mid-work state capture and resumption across sessions, tools, or developers.
33
-
34
- ---
35
-
36
- ## Step 0: Triage
37
-
38
- Classify the handoff request by subcommand and operation size before routing:
39
-
40
- - **Tier 1 (trivial)**: `list`, `complete`, `prune --dry-run`. Filesystem-read or single-file rename; no body composition, no validation gate, no sub-agent. Run inline.
41
- - **Tier 2 (standard)**: `prepare`, `resume`, `prune` (non-dry-run). Body composition with readiness gate (`prepare`), drift check + status transition (`resume`), or batch archival (`prune`). `prepare` delegates to `hatch3r-handoff-preparer` via the Task tool; the others run inline.
42
-
43
- There is no Tier 3 for this command — multi-issue or epic-scale handoffs are out of scope; the caller decomposes into per-work-item handoffs upstream.
44
-
45
- ## Workflow
46
-
47
- Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with **ASK**.
48
-
49
- ### Step 1: Detect Subcommand
50
-
51
- Read the first positional argument and route to the matching subcommand. If absent or unrecognized:
52
-
53
- **ASK:** "Which handoff action? `prepare | resume | list | complete | prune`."
54
-
55
- ### Step 2: Route
56
-
57
- | Subcommand | Semantics |
58
- |------------|-----------|
59
- | `prepare` | Capture current session state into a new handoff document |
60
- | `resume` | Load and surface a previously-prepared handoff for continuation |
61
- | `list` | Show active (and optionally archived) handoffs in a table |
62
- | `complete`| Transition a handoff to `completed` and move to `archived/` |
63
- | `prune` | Archive expired actives and prune archives older than 90 days |
64
-
65
- ---
66
-
67
- ## Subcommand: prepare
68
-
69
- 1. Parse optional flags: `--work-item <ref>` (e.g. `gh:owner/repo#42`, `ado:org/project:work-item/123`, `gl:owner/repo!42`), `--summary "<text>"`.
70
- 2. Invoke `hatch3r-handoff-preparer` via the Task tool. Pass `work_item` and `summary` if provided.
71
- 3. The preparer returns the written path plus an Iteration Summary block. Surface both to the user.
72
-
73
- **ASK** (before invocation): "Capturing handoff for {current branch}. Confirm or specify `--work-item` / `--summary`."
74
-
75
- ## Subcommand: resume
76
-
77
- 1. Parse optional `<id>` positional. If provided, route directly to `skills/hatch3r-handoff-resume` with that id.
78
- 2. If `<id>` absent, call `listHandoffs({ status: ["open","in-progress","blocked","handed-off"] })` from `src/content/handoffs/index.ts` and present a numbered table (id, status, branch, summary, updated).
79
-
80
- **ASK:** "Which handoff to resume? (number, or `cancel`)"
81
-
82
- 3. Invoke `skills/hatch3r-handoff-resume` with the chosen id. The skill performs validation, drift check, and status transition.
83
-
84
- ## Subcommand: list
85
-
86
- 1. Parse flags: `--status <status>`, `--work-item <ref>`, `--include-archived`.
87
- 2. Call `listHandoffs(filter)` and render:
88
-
89
- ```
90
- ID STATUS BRANCH SUMMARY UPDATED
91
- 2026-05-17_T1430_a3f2c_issue-42-cache-refactor in-progress feat/cache-refactor Token caching for board-fill researcher 2026-05-17 14:30
92
- ```
93
-
94
- 3. If empty, display: `No active handoffs. Run 'hatch3r-handoff prepare' to capture one.`
95
-
96
- ## Subcommand: complete
97
-
98
- 1. Parse positional `<id>` (required). If absent, **ASK** the user to pick from `list`.
99
- 2. Read the handoff via `readHandoff(id)`. Display the `summary` and `Work Remaining` section.
100
- 3. Parse optional `--reason "<text>"` for the archival notice.
101
-
102
- **ASK:** "Mark `{id}` completed and archive? (y/N). Reason will be recorded: `{reason or 'no reason given'}`."
103
-
104
- 4. On confirm: transition `status` to `completed`, stamp `updated` to now, prepend the archival notice (mirrors learnings archival format), then atomic-rename to `.agents/handoffs/archived/<id>.md`.
105
-
106
- ## Subcommand: prune
107
-
108
- 1. Parse `--dry-run` flag.
109
- 2. Scan `.agents/handoffs/active/`: collect entries whose `expires_after` ISO-8601 timestamp is at-or-before now (preparer default stamps `created + 30 days`).
110
- 3. Scan `.agents/handoffs/archived/`: collect entries where `updated` is older than 90 days.
111
- 4. Present a two-section preview (Active expirations to archive, Archives to delete).
112
- 5. If `--dry-run`: print the preview and exit.
113
-
114
- **ASK:** "Proceed with prune? Will archive {n} active and delete {m} archived. (y/N)"
115
-
116
- 6. On confirm: archive each expired active (prepend `Expired on {date}` notice, move to `archived/`); delete each over-90-day archive.
117
-
118
- ---
119
-
120
- ## Error Handling
121
-
122
- - `.agents/handoffs/active/` missing or empty: emit `No active handoffs. Run 'hatch3r-handoff prepare' to capture one.` and exit 0.
123
- - Ambiguous `<id>` (multiple partial matches): list the matches and **ASK** the user to pick one.
124
- - Write conflict (concurrent prepare for same `work_item`): surface the existing handoff path and **ASK** whether to overwrite (only if existing handoff is older than 24 hours per `writeHandoff` policy).
125
- - `complete` or `prune` requested on a missing id: report the path that was looked up and suggest `hatch3r-handoff list`.
126
-
127
- ## Guardrails
128
-
129
- - **Never delete** a handoff without explicit user confirmation. Prune deletes only archives older than 90 days, and only after the confirm prompt.
130
- - **Never modify** a file already in `.agents/handoffs/archived/`. Archived entries are immutable history.
131
- - **Never include secrets** (API keys, tokens, credentials) in any handoff body. The preparer scans for credential-shaped strings; reject the write if any are detected.
132
- - **Never write** outside `.agents/handoffs/active/` for new handoffs. Archival is the only path into `archived/`.
133
- - **Always emit the Iteration Summary block** at the end of the iteration per `rules/hatch3r-iteration-summary.md`.