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