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
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-workflow
|
|
3
|
+
type: command
|
|
4
|
+
orchestrator: true
|
|
5
|
+
agentPipeline: [hatch3r-researcher, hatch3r-implementer, hatch3r-reviewer, hatch3r-fixer, hatch3r-docs-writer, hatch3r-lint-fixer, hatch3r-ui, hatch3r-ux, hatch3r-security, hatch3r-reliability, hatch3r-testability, hatch3r-scalability, hatch3r-performance, hatch3r-maintainability, hatch3r-enhancability]
|
|
6
|
+
description: Guided development lifecycle with 4 phases (Analyze, Plan, Implement, Review) and scale-adaptive Quick Mode for small tasks.
|
|
7
|
+
tags: [implementation, orchestration]
|
|
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
|
+
efficiency_tier: standard
|
|
13
|
+
triage_tiers: [1, 2, 3]
|
|
14
|
+
supports_resume: true
|
|
15
|
+
sub_agents_spawned:
|
|
16
|
+
count: 15
|
|
17
|
+
rationale: Full 4-phase delivery pipeline — researcher (Phase 1), implementer (one per independent module, Phase 3), reviewer ↔ fixer review loop (Phase 4a), then a parallel Phase-4b final-quality batch (docs-writer + lint-fixer + CQ1-CQ9 vector specialists ui/ux/security/reliability/testability/scalability/performance/maintainability/enhancability — testability and security cover the always-on test + security gates) bounded by max_phase4_parallel. Cost-dominance per CONSTITUTION §2 P8 — token cost never serializes independent work.
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## §0 Detect Ambiguity (P8 B1)
|
|
21
|
+
|
|
22
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → §0 Detect Ambiguity (P8 B1). Triggers: contradictory inputs, missing target, unknown convention.
|
|
23
|
+
|
|
24
|
+
# Development Workflow -- Guided Lifecycle for Structured Implementation
|
|
25
|
+
|
|
26
|
+
Optional guided development lifecycle command that walks through structured phases — Analyze, Plan, Implement, Review — using hatch3r's existing agents and skills. Includes a Quick Mode that collapses phases for small tasks. Scale-adaptive: detects task complexity and recommends the appropriate mode. Works standalone or when invoked from `hatch3r-board-pickup`.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Agent Pipeline
|
|
31
|
+
|
|
32
|
+
| Stage | Agent(s) | Parallel | Required |
|
|
33
|
+
|-------|----------|----------|----------|
|
|
34
|
+
| 1. Research | `hatch3r-researcher` (modes by task type) | Per focus area | Yes (skip for trivial edits) |
|
|
35
|
+
| 2. Implementation | `hatch3r-implementer` (one per module) | Yes (independent modules) | Yes |
|
|
36
|
+
| 3a. Review Loop | `hatch3r-reviewer` -> `hatch3r-fixer` (max 3 iterations until clean) | No (sequential loop) | Yes |
|
|
37
|
+
| 3b. Final Quality — Testing | `hatch3r-testability` | Yes | Yes (code changes) |
|
|
38
|
+
| 3c. Final Quality — Security | `hatch3r-security` | Yes | Yes (code changes) |
|
|
39
|
+
| 3d. Final Quality — Docs | `hatch3r-docs-writer` | Yes | When APIs/architecture/UX affected |
|
|
40
|
+
| 3e. Final Quality — Conditional | `hatch3r-lint-fixer` + all conditional CQ specialists (CQ1-CQ9: `hatch3r-ui`, `hatch3r-ux`, `hatch3r-reliability`, `hatch3r-scalability`, `hatch3r-performance`, `hatch3r-maintainability`, `hatch3r-enhancability`) per `SPECIALIST_TRIGGER_TABLE` | Yes | Spawn each whose trigger matches the diff |
|
|
41
|
+
|
|
42
|
+
**Parallel-safety conditions** (per `rules/hatch3r-agent-orchestration.md` §Parallel Safety): every parallel fan-out above (multi-module implementers in Phase 3, the Phase-4b final-quality batch) holds all three — read-only or disjoint writes, deterministic aggregation, no shared mutable state.
|
|
43
|
+
|
|
44
|
+
## Browser Automation
|
|
45
|
+
|
|
46
|
+
At the start of this command, ask the user once:
|
|
47
|
+
|
|
48
|
+
> "Would you like to enable browser verification for this session? This uses Playwright to test changes in the running application."
|
|
49
|
+
|
|
50
|
+
If **yes**: implementation (Phase 3) and review (Phase 4) stages include browser verification steps — navigate to affected pages, interact with changed elements, check console for errors, capture screenshots.
|
|
51
|
+
|
|
52
|
+
If **no**: all browser verification steps are skipped silently throughout the entire command.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Shared Context
|
|
57
|
+
|
|
58
|
+
**Read the `hatch3r-board-shared` skill at the start of the run.** It contains Board Configuration, GitHub Context, Project Reference, Projects v2 sync procedure, and tooling directives. Cache all values for the duration of this run.
|
|
59
|
+
|
|
60
|
+
## Global Rule Overrides
|
|
61
|
+
|
|
62
|
+
- **Git commands are fully permitted** during Phase 3 (Implement), including `git add`, `git commit`, and `git push`. This override applies to delegated skills and sub-agents invoked during implementation.
|
|
63
|
+
|
|
64
|
+
## Token-Saving Directives
|
|
65
|
+
|
|
66
|
+
Follow the **Token-Saving Directives** in `hatch3r-board-shared`.
|
|
67
|
+
|
|
68
|
+
## Confidence Propagation Contract
|
|
69
|
+
|
|
70
|
+
Every sub-agent delegation prompt in this command MUST include the confidence expression requirement below (verbatim). Sub-agents are invoked with the `quality_charter: agents/shared/quality-charter.md` reference in their frontmatter, but the orchestrator repeats the directive to override runtime prompt defaults per the charter §1 rule.
|
|
71
|
+
|
|
72
|
+
> Confidence expression requirement: rate every recommendation and finding as high/medium/low confidence per the quality charter (`agents/shared/quality-charter.md`). High = verified against current code. Medium = pattern-based, not fully verified. Low = best judgment, recommend human review.
|
|
73
|
+
|
|
74
|
+
Downstream propagation: every ASK checkpoint that reports verification quality, every gate that evaluates a sub-agent verdict, and every output block that surfaces merge-readiness MUST carry a high/medium/low confidence rating sourced from the upstream sub-agent. Dropping the signal between stages is a gate failure.
|
|
75
|
+
|
|
76
|
+
Absent-confidence clause (D13-SA13.2-F3): a clean verdict (0 Critical + 0 Warning) whose reviewer `confidence` field is absent or unparseable is treated as `confidence: low` at every gate — trigger the second pass / ASK, never proceed. This matches the code gate in `src/pipeline/reviewLoop.ts` (`evaluateReviewGate`), where an `unknown`/absent confidence ranks below `low` (`CONFIDENCE_RANK.unknown = 0`) and so does not pass. A prose gate that reads `confidence != low` would otherwise let absence pass silently — inverting the code gate. Resolve absence to `low` before applying the Step 0.7 floor.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Triage
|
|
81
|
+
|
|
82
|
+
Classify the development task before delegating. Detailed mode classification runs in Step 0 (Triage / Scale-Adaptive Mode Selection); this section summarizes the routing:
|
|
83
|
+
|
|
84
|
+
- **Tier 1 (trivial)**: single-line edit, typo, or trivial config change; Quick Mode runs the streamlined 3-step path. The B1 ambiguity gate (`§0 Detect Ambiguity` per `.claude/rules/clarification-default.md`) is NEVER skipped — Tier 1 admission already requires that the brief alone be testable, single-file, and single-concern, so the gate evaluates trivially and passes silently when those preconditions hold. ASK checkpoints downstream of the brief (mid-plan, end-of-implementation, mid-review) are reduced to one consolidated end-of-run "merge or revise?" prompt rather than per-phase prompts — Tier 1 work is short enough that incremental ASK fatigue would dominate the workflow without proportional benefit. Any mid-run ambiguity that wasn't visible at the brief surface re-invokes the B1 protocol on the spot. This satisfies P8 B1 default-not-exception: the protocol still applies; the checkpoint cadence is right-sized (Finding D7-M11 / D7-SA7.4-4).
|
|
85
|
+
- **Tier 2 (standard)**: bug fix or small feature in 1–3 files; Quick Mode with full sub-agent delegation (researcher, implementer, reviewer, fixer, hatch3r-testability, hatch3r-security).
|
|
86
|
+
- **Tier 3 (deep)**: multi-module feature, architectural change, or cross-cutting refactor; Full Mode with all 4 phases (Analyze, Plan, Implement, Review) and deep research before mutating files.
|
|
87
|
+
|
|
88
|
+
If Tier 1, take Quick Mode with reduced sub-agent prompts. If Tier 2, take Quick Mode below. If Tier 3, switch to Full Mode and confirm the plan with the user before implementation.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Workflow
|
|
93
|
+
|
|
94
|
+
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK. For every ASK checkpoint, use the platform-native question tool per `agents/shared/user-question-protocol.md`.
|
|
95
|
+
|
|
96
|
+
### Step 0: Triage (Scale-Adaptive Mode Selection)
|
|
97
|
+
|
|
98
|
+
Assess the task to recommend a mode.
|
|
99
|
+
|
|
100
|
+
#### Complexity Signals for Full Mode
|
|
101
|
+
|
|
102
|
+
- Multiple files or modules affected
|
|
103
|
+
- Architectural decisions needed
|
|
104
|
+
- New dependencies or integrations
|
|
105
|
+
- Security-sensitive changes
|
|
106
|
+
- Cross-cutting concerns (database schema, API contracts, event schemas)
|
|
107
|
+
- Estimated effort > 1 day
|
|
108
|
+
- Task is an epic or has sub-issues
|
|
109
|
+
|
|
110
|
+
#### Complexity Signals for Quick Mode
|
|
111
|
+
|
|
112
|
+
- Single file change
|
|
113
|
+
- Bug fix with clear reproduction
|
|
114
|
+
- Small refactor (rename, extract function)
|
|
115
|
+
- Documentation update
|
|
116
|
+
- Test addition for existing code
|
|
117
|
+
- Estimated effort < 2 hours
|
|
118
|
+
|
|
119
|
+
#### Assessment
|
|
120
|
+
|
|
121
|
+
Evaluate the task against both signal sets. Count matching signals to determine recommendation.
|
|
122
|
+
|
|
123
|
+
**ASK:** "Task: {user's task description}. Complexity assessment: {assessment}. Recommended mode: {Full/Quick}. Proceed with {recommended}? (yes / switch to {other} / let me decide per phase)"
|
|
124
|
+
|
|
125
|
+
### Step 0.5: Emit Pre-Execution Cost Preview
|
|
126
|
+
|
|
127
|
+
Before the first sub-agent dispatch (Phase 1 / Quick Step 1), surface the cost preview to the user so a multi-agent run is never started blind. Emit the `cost_estimate` block per `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate, calibrated to the triage tier selected in Step 0:
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
cost_estimate:
|
|
131
|
+
expected_sa_count: <triage tier → Quick Tier 1 ~2, Quick Tier 2 ~6, Full Tier 3 up to 15>
|
|
132
|
+
estimated_input_tokens_static_frame: <int>
|
|
133
|
+
estimated_web_research_queries: <int>
|
|
134
|
+
triage_tier: light | standard | deep
|
|
135
|
+
estimated_duration_min: <int>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Post-execution actuals + delta land in the Phase 4 / Quick Step 3 iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
|
|
139
|
+
|
|
140
|
+
### Step 0.6: Effort Override (Decision 17)
|
|
141
|
+
|
|
142
|
+
Auto-tiering (Step 0 mode selection) can misclassify — a single-file edit scored as Full Mode, or a cross-cutting refactor scored as Quick Mode. The user override is the recovery path mandated by hatch3r's universal `--effort` override contract ("User overridable via `--effort` flag"):
|
|
143
|
+
|
|
144
|
+
- `--effort=light|standard|deep` forces the named tier (light → Quick Tier 1, standard → Quick Tier 2, deep → Full Tier 3), bypassing the Step 0 auto-classification. This composes with the existing `--mode=full|quick` flag: an explicit `--mode` wins over the `--effort`-derived mode.
|
|
145
|
+
- The override wins over the auto-detected tier; record both the auto-detected tier and the override in the run context so the Cost estimate block reports the budget delta.
|
|
146
|
+
- The override never disables the Safety Guardrails (destructive operations, breaking changes, open questions, quality-gate failures always stop) — those are mode-independent.
|
|
147
|
+
- No override passed → the Step 0 auto-classification stands.
|
|
148
|
+
|
|
149
|
+
### Step 0.7: Confidence Floor (Decision 16 / D13-SA13.3-F13.3.3)
|
|
150
|
+
|
|
151
|
+
`--effort` calibrates work-effort depth; `--confidence-floor` calibrates the confidence threshold at which the review gate blocks. They are orthogonal — a Tier 1 typo fix and a Tier 3 refactor can each carry any floor. This is the user's pre-flight assertiveness knob (the forced-second-pass on low confidence in Phase 4a is post-hoc; the floor lets the user set the bar before the run):
|
|
152
|
+
|
|
153
|
+
- `--confidence-floor=any|medium|high` (default `any`). Resolution order: explicit flag wins over the persisted `hatch3r config confidence_floor=...` default, which wins over the built-in `any`.
|
|
154
|
+
- **`any`** (current behavior): the Phase 4a confidence-aware gate forces a second reviewer pass only when reviewer confidence `== low` with 0 Critical + 0 Warning.
|
|
155
|
+
- **`medium`**: force a second pass on ANY finding rated `confidence == low`, even with 0 Critical + 0 Warning.
|
|
156
|
+
- **`high`**: force a second pass on any finding rated `confidence != high`, AND ASK the user on every low-confidence finding regardless of severity.
|
|
157
|
+
- Per P1 maturity tier (Decision 16): solo defaults `any`, enterprise defaults `high`. The floor never relaxes a Safety Guardrail — it only tightens the second-pass / ASK trigger.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Full Mode
|
|
162
|
+
|
|
163
|
+
### Phase 1: Analyze
|
|
164
|
+
|
|
165
|
+
**Goal:** Fully understand the task, its context, and constraints before writing any code.
|
|
166
|
+
|
|
167
|
+
#### 1a. Parse the Task
|
|
168
|
+
|
|
169
|
+
- **GitHub issue:** Read issue body, acceptance criteria, labels, parent epic context using `gh issue view` (fall back to `issue_read` MCP).
|
|
170
|
+
- **User description:** Extract requirements, scope, constraints from the provided description.
|
|
171
|
+
- **Board-pickup invocation:** Use the issue context already gathered by board-pickup. Skip re-fetching.
|
|
172
|
+
|
|
173
|
+
#### 1b. Complexity Scoring and Deep Context
|
|
174
|
+
|
|
175
|
+
Score the task's complexity per the `hatch3r-deep-context` rule to determine the analysis tier (Light / Standard / Deep). This determines which additional researcher modes run in Step 3a alongside the standard task-type modes.
|
|
176
|
+
|
|
177
|
+
For **Tier 2 and Tier 3** tasks, spawn the tier-appropriate researcher modes now (in parallel with context loading):
|
|
178
|
+
|
|
179
|
+
- **Tier 2**: `requirements-elicitation` at `quick` depth + `similar-implementation` at `quick` depth
|
|
180
|
+
- **Tier 3**: `requirements-elicitation` at `deep` depth + `similar-implementation` at `deep` depth + `codebase-impact` at `deep` depth (with transitive tracing)
|
|
181
|
+
|
|
182
|
+
Cache the researcher outputs for use in Phase 2 and Phase 3.
|
|
183
|
+
|
|
184
|
+
#### 1c. Load Relevant Context
|
|
185
|
+
|
|
186
|
+
1. Read project specs from `docs/specs/` — headers first (~30 lines), expand relevant sections only.
|
|
187
|
+
2. Read ADRs that might constrain the approach.
|
|
188
|
+
3. Scan existing code in the affected area using targeted file reads and searches.
|
|
189
|
+
4. Use **Context7 MCP** (`resolve-library-id` then `query-docs`) for external library documentation referenced by the task.
|
|
190
|
+
5. Use **web research** for current best practices, security advisories, or novel problems not covered by local docs or Context7.
|
|
191
|
+
|
|
192
|
+
#### 1d. Consult Learnings
|
|
193
|
+
|
|
194
|
+
If `.hatch3r/learnings/` exists:
|
|
195
|
+
|
|
196
|
+
1. Search for learnings tagged with relevant areas or technologies.
|
|
197
|
+
2. Surface any applicable past experiences that inform this task.
|
|
198
|
+
|
|
199
|
+
#### 1e. Present Analysis
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
Task Analysis:
|
|
203
|
+
Complexity: Tier {1/2/3} ({Light/Standard/Deep}) — score {N}
|
|
204
|
+
Scope: {what's in / what's out}
|
|
205
|
+
Affected files: {list}
|
|
206
|
+
Blast radius: {N direct + M transitive files at risk} (Tier 3 only)
|
|
207
|
+
Similar implementations found: {reference names} (Tier 2/3 only)
|
|
208
|
+
Constraints: {from specs, ADRs}
|
|
209
|
+
Relevant learnings: {if any}
|
|
210
|
+
Open questions: {if any — including unresolved requirements-elicitation questions}
|
|
211
|
+
Cross-cutting concerns: {list with addressed/unaddressed status} (Tier 2/3 only)
|
|
212
|
+
Risk: {low/med/high}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**For Tier 2:** Present the `requirements-elicitation` questions inline and await answers before proceeding.
|
|
216
|
+
|
|
217
|
+
**For Tier 3:** Present a full Pre-Implementation Summary per the `hatch3r-deep-context` rule. Do NOT proceed until all unresolved questions are answered.
|
|
218
|
+
|
|
219
|
+
**ASK:** "Analysis complete. {Unresolved questions list, if any}. Proceed to Plan phase? (yes / clarify questions first / adjust scope)"
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
### Phase 2: Plan
|
|
224
|
+
|
|
225
|
+
**Goal:** Design the solution before implementing.
|
|
226
|
+
|
|
227
|
+
**Research-completeness directive (P8 B2).** If the Plan phase discovers unknowns not covered by Phase 1 research, spawn additional researcher modes before Phase 3 (Implementation). Do not defer research unknowns to implementation time. Spawning more researcher sub-agents is cheaper than discovered rework.
|
|
228
|
+
|
|
229
|
+
#### 2a. Draft Implementation Plan
|
|
230
|
+
|
|
231
|
+
1. List all files to create or modify.
|
|
232
|
+
2. For each file: describe the specific changes.
|
|
233
|
+
3. Identify test requirements (unit, integration, e2e).
|
|
234
|
+
4. Note any dependency changes needed.
|
|
235
|
+
5. Consider rollback strategy for risky changes.
|
|
236
|
+
6. **Convention alignment** (Tier 2/3 only): If `similar-implementation` output is available from Phase 1, specify which reference implementation's conventions the plan follows for file structure, state management, error handling, data fetching, and testing. Note planned divergences with justification.
|
|
237
|
+
|
|
238
|
+
#### 2b. Select hatch3r Agents and Skills
|
|
239
|
+
|
|
240
|
+
Map the task type to the appropriate skill:
|
|
241
|
+
|
|
242
|
+
| Task Type | Skill |
|
|
243
|
+
| ---------------- | ------------------------------ |
|
|
244
|
+
| Bug report | hatch3r-bug-fix |
|
|
245
|
+
| Feature request | hatch3r-feature |
|
|
246
|
+
| Code refactor | hatch3r-refactor |
|
|
247
|
+
| Logical refactor | hatch3r-logical-refactor |
|
|
248
|
+
| Visual refactor | hatch3r-visual-refactor |
|
|
249
|
+
| QA validation | hatch3r-qa-validation |
|
|
250
|
+
|
|
251
|
+
Identify supporting agents needed: hatch3r-testability, docs-writer, reviewer, hatch3r-security.
|
|
252
|
+
|
|
253
|
+
#### 2c. Identify Risks
|
|
254
|
+
|
|
255
|
+
- Breaking changes? Migration needed?
|
|
256
|
+
- Performance implications?
|
|
257
|
+
- Security implications?
|
|
258
|
+
|
|
259
|
+
#### 2d. Present Plan
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
Implementation Plan:
|
|
263
|
+
Approach: {description}
|
|
264
|
+
Skill: {selected hatch3r skill}
|
|
265
|
+
Convention reference: {reference module name — "following patterns from X"} (Tier 2/3 only)
|
|
266
|
+
Files to modify: {list with change descriptions}
|
|
267
|
+
New files: {list}
|
|
268
|
+
Tests: {what to test}
|
|
269
|
+
Risks: {list with mitigations}
|
|
270
|
+
Resolved requirements: {N}/{M} answered (Tier 2/3 only)
|
|
271
|
+
Estimated effort: {time}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**ASK:** "Plan ready. Proceed to Implement? (yes / revise plan / request review of plan first)"
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### Phase 3: Implement
|
|
279
|
+
|
|
280
|
+
**Goal:** Execute the plan using the selected hatch3r skill, delegating to sub-agents per the Universal sub-agent Pipeline.
|
|
281
|
+
|
|
282
|
+
#### 3a. Context Gathering (Researcher sub-agent)
|
|
283
|
+
|
|
284
|
+
You MUST spawn a `hatch3r-researcher` sub-agent via the Task tool (`subagent_type: "generalPurpose"`) before implementation. Skip only for trivial single-line edits (typos, comment fixes, single-value config changes).
|
|
285
|
+
|
|
286
|
+
- Select research modes by task type (bug → symptom-trace/root-cause/codebase-impact, feature → codebase-impact/feature-design/architecture, refactor → current-state/refactoring-strategy/migration-path, QA → codebase-impact).
|
|
287
|
+
- Add tier-appropriate modes per the `hatch3r-deep-context` rule if not already run in Phase 1 Step 1b.
|
|
288
|
+
- Use depth `quick` for low-risk, `standard` for medium-risk, `deep` for high-risk. The complexity tier may override depth upward.
|
|
289
|
+
- **Question decomposition (K-parallel-researcher path, per `rules/hatch3r-agent-orchestration.md` → Scaling Heuristic):** when the task decomposes into ≥2 independent research questions — answers that do not depend on each other (e.g. "what is the current auth flow?" and "what does the billing webhook expect?" for a cross-cutting feature) — spawn one `hatch3r-researcher` sub-agent per question in parallel (each scoped to its question with the modes above), then union their structured findings into a single Phase-1 brief before Step 3b. This is the parallel-safe Phase-1 case (read-only, deterministic union, no shared mutable state per the Three Conditions to Parallelize). Keep the single-researcher path for a single-question task; do not serialize independent questions to save tokens (P8 dominates P7).
|
|
290
|
+
- Await the researcher result(s). Use the structured output (unioned across researchers when fanned out) to inform Step 3b.
|
|
291
|
+
|
|
292
|
+
#### 3b. Core Implementation (Implementer sub-agent)
|
|
293
|
+
|
|
294
|
+
You MUST spawn a `hatch3r-implementer` sub-agent via the Task tool (`subagent_type: "generalPurpose"`). Do NOT implement inline — always delegate to a dedicated implementer.
|
|
295
|
+
|
|
296
|
+
1. Read the matching hatch3r skill file and include it in the implementer prompt.
|
|
297
|
+
2. Do NOT execute the skill's PR creation steps if invoked from `hatch3r-board-pickup` (board-pickup handles PR creation in its own Steps 7a–8).
|
|
298
|
+
3. For tasks spanning multiple independent parts, spawn one `hatch3r-implementer` per independent module. Launch as many in parallel as the platform supports.
|
|
299
|
+
4. Coordinate changes across files to avoid conflicts.
|
|
300
|
+
|
|
301
|
+
The implementer sub-agent prompt MUST include:
|
|
302
|
+
- The task description, acceptance criteria, and type.
|
|
303
|
+
- The researcher output from Step 3a (if not skipped).
|
|
304
|
+
- The selected hatch3r skill name and instructions.
|
|
305
|
+
- All `scope: always` rule directives from `rules/`.
|
|
306
|
+
- Relevant learnings from `.hatch3r/learnings/`.
|
|
307
|
+
- Explicit instruction: do NOT create branches, commits, or PRs.
|
|
308
|
+
- **Reference conventions** from `similar-implementation` output (Tier 2/3) — triggers the implementer's Convention Lock step.
|
|
309
|
+
- **Resolved requirements** from `requirements-elicitation` answers (Tier 2/3) — explicit decisions on ambiguities.
|
|
310
|
+
- **Blast radius data** from enhanced `codebase-impact` (Tier 3) — transitive dependency trace and API consumer map.
|
|
311
|
+
- `correlation_id` (UUID v4 generated per top-level task per `rules/hatch3r-agent-orchestration.md` → Correlation ID) — the sub-agent echoes it in logs, outputs, and status reports for cross-phase attribution.
|
|
312
|
+
- Confidence expression requirement: rate every recommendation and finding as high/medium/low confidence per the quality charter (`agents/shared/quality-charter.md`). High = verified against current code. Medium = pattern-based, not fully verified. Low = best judgment, recommend human review.
|
|
313
|
+
|
|
314
|
+
Await the implementer sub-agent. Collect its structured result.
|
|
315
|
+
|
|
316
|
+
#### 3c. Track Progress
|
|
317
|
+
|
|
318
|
+
1. Mark completed items from the plan.
|
|
319
|
+
2. Note any deviations from the plan and the reasoning.
|
|
320
|
+
|
|
321
|
+
#### 3d. Run Quality Checks
|
|
322
|
+
|
|
323
|
+
Run the project's quality checks (adapt to project conventions; resolved to the project's language-aware command set at sync time, fallback when detection is unknown: `npm run lint && npm run typecheck && npm run test`):
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
${HATCH3R:VERIFY_GATE_ALL}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Fix any issues before proceeding. If quality checks fail, loop back and resolve before advancing to Phase 4.
|
|
330
|
+
|
|
331
|
+
**ASK:** "Implementation complete. All quality checks pass. Confidence in implementation quality: {high/medium/low — based on test coverage depth, edge case handling, and researcher coverage}. Proceed to Review? (yes / fix issues first)"
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
### Phase 4: Review (sub-agent Quality Pipeline)
|
|
336
|
+
|
|
337
|
+
**Goal:** Verify quality and completeness via a two-stage sub-agent pipeline before finalizing. The Review Loop (4a) iterates until code quality is clean, then Final Quality (4b) runs remaining specialists in parallel.
|
|
338
|
+
|
|
339
|
+
#### 4a. Review Loop (Reviewer → Fixer)
|
|
340
|
+
|
|
341
|
+
Spawn a `hatch3r-reviewer` sub-agent via the Task tool (`subagent_type: "generalPurpose"`). Include the diff and acceptance criteria in the prompt.
|
|
342
|
+
|
|
343
|
+
1. **Review:** Await the reviewer result. Extract Critical and Warning findings AND the reviewer's top-level `confidence` field (high/medium/low).
|
|
344
|
+
2. **Confidence-aware gate** (the second-pass trigger tightens with the `--confidence-floor` set in Step 0.7 — `any` = default below, `medium`/`high` raise the bar). First resolve the reviewer `confidence` field per the Confidence Propagation Contract absent-confidence clause: an absent or unparseable value is treated as `low` (it does NOT satisfy `!= low`), matching the code gate where `unknown` ranks below `low`.
|
|
345
|
+
- **0 Critical + 0 Warning AND reviewer confidence == high or medium:** Review loop is clean. Proceed to 4b. (Floor `medium`: also force a second pass if any individual finding is `confidence == low`. Floor `high`: force a second pass if reviewer confidence `!= high` OR any finding is `!= high`, AND ASK on every low-confidence finding.)
|
|
346
|
+
- **0 Critical + 0 Warning AND reviewer confidence == low (including absent/unparseable, resolved to `low` above):** Trigger a second reviewer pass before exiting. Do not proceed to 4b until the second pass returns high/medium confidence OR the user explicitly accepts the low-confidence PASS at the ASK checkpoint in step 5.
|
|
347
|
+
3. **If Critical or Warning findings exist:** Spawn a `hatch3r-fixer` sub-agent with the reviewer output. The fixer applies fixes for all Critical and Warning findings.
|
|
348
|
+
4. **Re-review:** After the fixer completes, spawn `hatch3r-reviewer` again to verify fixes.
|
|
349
|
+
5. **Repeat** steps 2-4 for a maximum of **3 iterations** (code-class cap). If still not clean after 3 iterations, **ASK** the user how to proceed (force continue / manual fix / abort).
|
|
350
|
+
|
|
351
|
+
> **Iteration-cap rationale (D10-SA10.7-F10.7.7).** Code reviews diverge faster than spec reviews — a code finding can spawn a regression the next iteration must catch — so the code-class loop here caps at 3. The spec-class loop in `hatch3r-board-fill` Step 7.9d caps at 4 because issue-spec reviews converge more slowly and deterministically (text refinement, no runtime regressions). Both are bounded below `DEFAULT_MAX_REVIEW_ITERATIONS` (4) in `src/pipeline/reviewLoop.ts`, which keeps the oscillation detector reachable in default config. Expected convergence is 1–2 iterations; the cap is the divergence backstop, not the target.
|
|
352
|
+
|
|
353
|
+
After each reviewer iteration, assess the reviewer's findings confidence: if the reviewer rates any finding as low-confidence, flag it separately in the ASK prompt so the user can prioritize human review of uncertain findings. The reviewer sub-agent output MUST include a top-level `confidence: high | medium | low` field (not just per-finding) so step 2 can evaluate it deterministically.
|
|
354
|
+
|
|
355
|
+
Each reviewer/fixer sub-agent prompt MUST include:
|
|
356
|
+
- The agent protocol to follow.
|
|
357
|
+
- All `scope: always` rule directives from `rules/`.
|
|
358
|
+
- The diff or file changes to review/fix.
|
|
359
|
+
- The task's acceptance criteria.
|
|
360
|
+
- `correlation_id` (UUID v4 per top-level task per `rules/hatch3r-agent-orchestration.md` → Correlation ID).
|
|
361
|
+
- Confidence expression requirement: rate every recommendation and finding as high/medium/low confidence per the quality charter (`agents/shared/quality-charter.md`). High = verified against current code. Medium = pattern-based, not fully verified. Low = best judgment, recommend human review.
|
|
362
|
+
|
|
363
|
+
#### 4b. Final Quality (Parallel Specialists)
|
|
364
|
+
|
|
365
|
+
**ONLY after the review loop (4a) reports 0 Critical + 0 Warning findings**, spawn the remaining specialist sub-agents. Use the Task tool with `subagent_type: "generalPurpose"`. Dispatch is bounded by the orchestrator-honored fan-out width `max_phase4_parallel` (default `8`) per `rules/hatch3r-agent-orchestration.md` Phase 4 — Final Quality — LLM-honored guidance, not a code-enforced cap (the host Task tool applies no platform fan-out limit). The bound exists for upstream provider rate-limit headroom, not per-orchestrator context cost (P8 dominates P7). When the applicable specialists exceed the bound, batch by severity priority `CRITICAL → HIGH → MEDIUM → LOW`; each batch runs to completion before the next.
|
|
366
|
+
|
|
367
|
+
**Always spawn (mandatory for every code change):**
|
|
368
|
+
|
|
369
|
+
1. **`hatch3r-testability`** (CQ5) — confirm tests meet the mandate map / coverage floor for all code changes. Unit tests for new logic, regression tests for bug fixes, integration tests for cross-module changes.
|
|
370
|
+
2. **`hatch3r-security`** (CQ3) — security review of all code changes. Audit data flows, access control, input validation, and secret management against the CQ3 threshold set.
|
|
371
|
+
|
|
372
|
+
**Always evaluate (spawn when applicable):**
|
|
373
|
+
|
|
374
|
+
3. **`hatch3r-docs-writer`** — spawn when changes affect public APIs, architectural patterns, user-facing behavior, or when specs/ADRs need updating. Skip silently if no documentation impact.
|
|
375
|
+
|
|
376
|
+
**Conditional specialists (spawn each whose trigger matches the diff):**
|
|
377
|
+
|
|
378
|
+
Spawn **all conditional CQ specialists (CQ1-CQ9) per `SPECIALIST_TRIGGER_TABLE`** plus `hatch3r-lint-fixer` — not the lint/ui/performance subset alone. Evaluate each via `shouldTriggerSpecialist(specialist, changedFiles, projectType)` (D6-M11); spawn the ones that return `{ triggered: true }`:
|
|
379
|
+
|
|
380
|
+
4. **`hatch3r-lint-fixer`** — lint or type errors present after implementation.
|
|
381
|
+
5. **`hatch3r-ui`** (CQ1) — UI component / design-token / theme files modified.
|
|
382
|
+
6. **`hatch3r-ux`** (CQ2) — flow / route-transition / modal / error-state files or microcopy/i18n strings modified.
|
|
383
|
+
7. **`hatch3r-reliability`** (CQ4) — service/request handler, OTel/SLO, retry/circuit-breaker, or Kubernetes-probe code modified.
|
|
384
|
+
8. **`hatch3r-scalability`** (CQ6) — request handler, queue client, connection-pool, cache, or background-job code modified.
|
|
385
|
+
9. **`hatch3r-performance`** (CQ7) — ORM/data-access, UI-rendering, or bundle/hot-path code modified.
|
|
386
|
+
10. **`hatch3r-maintainability`** (CQ8) — any code mutation (duplication + complexity scan); schema / migration / API spec modified.
|
|
387
|
+
11. **`hatch3r-enhancability`** (CQ9) — user-visible behavior, public API surface, config schema, or extension-point interface modified.
|
|
388
|
+
|
|
389
|
+
(`hatch3r-architect` and `hatch3r-devops` are also conditional in `SPECIALIST_TRIGGER_TABLE` but are not CQ-vector specialists; spawn them too when their architectural / CI-CD triggers match.)
|
|
390
|
+
|
|
391
|
+
> **Single source of truth for triggers (D6-M11):** the canonical trigger map lives in `src/pipeline/pipelineContext.ts::SPECIALIST_TRIGGER_TABLE` and the predicate `shouldTriggerSpecialist(specialist, changedFiles, projectType)` returns `{ triggered, reasons }` for any specialist. The brief prose list above is a quick reference only; for the authoritative trigger evaluation at runtime, call `shouldTriggerSpecialist` from the orchestrator harness (or the equivalent mirror in `rules/hatch3r-agent-orchestration.md` → Phase 4 Specialist Trigger Table). Adding a specialist to the prose without updating the TS table is rejected by `npm run validate:specialist-roster`.
|
|
392
|
+
|
|
393
|
+
Each specialist sub-agent prompt MUST include:
|
|
394
|
+
- The agent protocol to follow.
|
|
395
|
+
- All `scope: always` rule directives from `rules/`.
|
|
396
|
+
- The diff or file changes to review.
|
|
397
|
+
- The task's acceptance criteria.
|
|
398
|
+
- `correlation_id` (UUID v4 per top-level task per `rules/hatch3r-agent-orchestration.md` → Correlation ID).
|
|
399
|
+
- Confidence expression requirement: rate every recommendation and finding as high/medium/low confidence per the quality charter (`agents/shared/quality-charter.md`). High = verified against current code. Medium = pattern-based, not fully verified. Low = best judgment, recommend human review.
|
|
400
|
+
|
|
401
|
+
Await all specialist sub-agents. Apply their feedback (fixes, additional tests, documentation updates).
|
|
402
|
+
|
|
403
|
+
#### 4b.1. Re-Review After Phase 4 Fixes
|
|
404
|
+
|
|
405
|
+
If any Phase 4 specialist produced fixes (not just findings), run a lightweight re-review to catch regressions introduced by the specialist changes. Spawn `hatch3r-reviewer` with a focused prompt covering only the files modified by Phase 4 specialists. If the re-review finds Critical findings, spawn `hatch3r-fixer` and re-review once more (max 1 additional iteration). This prevents Phase 4 fixes from bypassing the review gate.
|
|
406
|
+
|
|
407
|
+
#### 4b.2. Post-Write Duplication Scan (Decision 21)
|
|
408
|
+
|
|
409
|
+
Before clearing the review gate, run a duplication scan on the working-tree diff to catch near-duplicate code that parallel Phase-3 implementers (one per module) can each pass their own review independently (D13-SA13.2-F7). This operationalizes the CONSTITUTION §6 Decision 21 post-write duplication scan at runtime, not only at audit time.
|
|
410
|
+
|
|
411
|
+
1. Run `npx jscpd --min-lines 40 --threshold 80 --reporters json --silent <changed-paths>` (or the project's configured duplication tool). The gate fires when any cross-file clone block is **≥40 lines OR ≥80% byte-similar**.
|
|
412
|
+
2. **If a clone is detected:** route the duplication report back to `hatch3r-fixer` to extract the shared logic (DRY refactor), then re-run 4b.1 re-review on the refactored files. Max 1 duplication-fix iteration; if it persists, surface to the user with the clone locations.
|
|
413
|
+
3. **If no clone is detected:** proceed to 4c. Skip silently when the diff touches a single file (no cross-file clone possible).
|
|
414
|
+
|
|
415
|
+
#### 4c. Verify Against Acceptance Criteria
|
|
416
|
+
|
|
417
|
+
Check each acceptance criterion from the original task or issue. Mark as met or not-met with evidence.
|
|
418
|
+
|
|
419
|
+
For each criterion, rate verification confidence: high (tested and confirmed via code, tests, or browser), medium (logically satisfied but not independently verified), low (uncertain, recommend human testing).
|
|
420
|
+
|
|
421
|
+
#### 4d. Present Review
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
Review Results:
|
|
425
|
+
Acceptance Criteria: {N/M met}
|
|
426
|
+
Code Quality: {reviewer findings}
|
|
427
|
+
Security: {hatch3r-security findings}
|
|
428
|
+
Test Coverage: {hatch3r-testability results}
|
|
429
|
+
Documentation: {docs-writer results / not applicable}
|
|
430
|
+
Performance: {pass/issues}
|
|
431
|
+
Overall Confidence: {high/medium/low}
|
|
432
|
+
Lowest-confidence area: {description or "none"}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
**ASK:** "Review complete. {summary}. Ready to finalize? (yes / address review issues / request human review)"
|
|
436
|
+
|
|
437
|
+
#### 4e. Capture Learnings
|
|
438
|
+
|
|
439
|
+
If `.hatch3r/learnings/` exists:
|
|
440
|
+
|
|
441
|
+
1. Extract learnings from this implementation session (patterns discovered, pitfalls encountered, decisions made).
|
|
442
|
+
2. Store in `.hatch3r/learnings/` with appropriate area tags.
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## Quick Mode
|
|
447
|
+
|
|
448
|
+
Collapses the 4 phases into a streamlined flow for small, well-defined tasks. Sub-agent delegation is still mandatory — Quick Mode uses lighter prompts, not fewer sub-agents.
|
|
449
|
+
|
|
450
|
+
### Quick Step 1: Rapid Analysis + Plan (Combined)
|
|
451
|
+
|
|
452
|
+
1. Score complexity per `hatch3r-deep-context`. If the score yields Tier 3, recommend switching to Full Mode.
|
|
453
|
+
2. Spawn `hatch3r-researcher` with depth `quick` for brief context gathering. Skip only for trivial single-line edits. For Tier 2, include `requirements-elicitation` and `similar-implementation` at `quick` depth.
|
|
454
|
+
3. Quick plan: list changes, identify the appropriate hatch3r skill. If `similar-implementation` found a reference, note the convention to follow.
|
|
455
|
+
4. Skip ADR/spec review unless the task touches architecture.
|
|
456
|
+
|
|
457
|
+
**ASK:** "Quick analysis: {scope}, {approach}. {Unresolved questions from elicitation, if any.} Proceed? (yes / switch to Full Mode)"
|
|
458
|
+
|
|
459
|
+
### Quick Step 2: Implement
|
|
460
|
+
|
|
461
|
+
1. Spawn `hatch3r-implementer` sub-agent via the Task tool. Do NOT implement inline.
|
|
462
|
+
2. Run quality checks (lint, typecheck, test).
|
|
463
|
+
3. Fix any issues before proceeding.
|
|
464
|
+
|
|
465
|
+
### Quick Step 3: Quick Review (sub-agent Quality Pipeline)
|
|
466
|
+
|
|
467
|
+
Same two-stage pipeline as Full Mode, with lighter prompts:
|
|
468
|
+
|
|
469
|
+
**Stage 1 — Review Loop:**
|
|
470
|
+
|
|
471
|
+
1. Spawn **`hatch3r-reviewer`** with a focused prompt covering correctness and quality. Extract Critical/Warning findings AND the reviewer's top-level `confidence` field.
|
|
472
|
+
2. If Critical or Warning findings exist, spawn **`hatch3r-fixer`**, then re-review. Max 3 iterations.
|
|
473
|
+
3. **Confidence-aware gate (parity with Full Mode 4a step 2 — the `--confidence-floor` from Step 0.7 is NOT inert in Quick Mode):** resolve an absent/unparseable reviewer `confidence` to `low` per the Confidence Propagation Contract, then apply the same floor branch as Full Mode 4a:
|
|
474
|
+
- **0 Critical + 0 Warning AND confidence == high or medium:** clean — proceed to Stage 2. (Floor `medium`: also force a second pass on any finding `confidence == low`. Floor `high`: force a second pass if reviewer confidence `!= high` OR any finding is `!= high`, AND ASK on every low-confidence finding.)
|
|
475
|
+
- **0 Critical + 0 Warning AND confidence == low (including absent/unparseable):** trigger a second reviewer pass before exiting; do not proceed to Stage 2 until it returns high/medium confidence OR the user accepts the low-confidence PASS at the finalize ASK.
|
|
476
|
+
|
|
477
|
+
**Stage 2 — Final Quality (after review loop is clean):**
|
|
478
|
+
|
|
479
|
+
4. **`hatch3r-testability`** (CQ5) — ALWAYS for code changes.
|
|
480
|
+
5. **`hatch3r-security`** (CQ3) — ALWAYS for code changes.
|
|
481
|
+
6. **`hatch3r-docs-writer`** — evaluate; spawn when documentation impact exists.
|
|
482
|
+
7. Verify acceptance criteria are met (rate each criterion high/medium/low per Full Mode 4c).
|
|
483
|
+
8. Confirm lint/typecheck/test pass.
|
|
484
|
+
|
|
485
|
+
Before the finalize ASK, emit an `Overall Confidence` line (parity with Full Mode 4d) sourced from the lowest upstream confidence across reviewer, testability, security, and the acceptance-criteria checks:
|
|
486
|
+
|
|
487
|
+
```
|
|
488
|
+
Overall Confidence: {high/medium/low}
|
|
489
|
+
Lowest-confidence area: {description or "none"}
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**ASK:** "Changes complete. Quality checks pass. Overall confidence: {high/medium/low}. Finalize? (yes / deeper review needed → switch to Full Mode Phase 4)"
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
## Integration with Board Workflow
|
|
497
|
+
|
|
498
|
+
### Invoked from `hatch3r-board-pickup`
|
|
499
|
+
|
|
500
|
+
- Phase 1 uses the issue context already gathered by board-pickup — skip re-fetching.
|
|
501
|
+
- Phase 3 skips PR creation — board-pickup handles it in its own Steps 7a–8.
|
|
502
|
+
- Phase 4 results feed into board-pickup's quality verification (Step 7).
|
|
503
|
+
|
|
504
|
+
When operating with board context, all issue operations MUST follow the Projects v2 Enforcement rules defined in `hatch3r-board-shared`.
|
|
505
|
+
|
|
506
|
+
### Invoked Standalone
|
|
507
|
+
|
|
508
|
+
- All phases run independently with full context loading.
|
|
509
|
+
- User decides whether to create a PR at the end of Phase 4.
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## Auto-Advance Mode
|
|
514
|
+
|
|
515
|
+
When invoked with `--auto` or `--unattended`, the workflow operates with reduced human checkpoints for sustained autonomous operation. Compatible with both Full Mode and Quick Mode.
|
|
516
|
+
|
|
517
|
+
### Behavior Changes in Auto Mode
|
|
518
|
+
|
|
519
|
+
| Checkpoint | Normal Mode | Auto Mode |
|
|
520
|
+
|-----------|-------------|-----------|
|
|
521
|
+
| Mode selection (Step 0) | ASK user to confirm | Auto-select based on complexity signals |
|
|
522
|
+
| Analysis review (Phase 1) | ASK user to proceed | Auto-proceed if no open questions |
|
|
523
|
+
| Plan review (Phase 2) | ASK user to approve | Auto-proceed with plan |
|
|
524
|
+
| Implementation review (Phase 3) | ASK user before Review | Auto-proceed if quality checks pass |
|
|
525
|
+
| Review finalization (Phase 4) | ASK user to finalize | Auto-finalize if all AC met |
|
|
526
|
+
|
|
527
|
+
### Safety Guardrails (Always Active)
|
|
528
|
+
|
|
529
|
+
These checkpoints are NEVER skipped, even in auto mode:
|
|
530
|
+
- **Destructive operations**: Database migrations, file deletions, security rule changes always require confirmation
|
|
531
|
+
- **Breaking changes**: API contract changes, public interface modifications always require confirmation
|
|
532
|
+
- **Open questions**: If Phase 1 analysis surfaces unresolvable ambiguity, stop and ASK regardless of mode
|
|
533
|
+
- **Quality gate failures**: If lint/typecheck/test fail after 2 fix attempts, stop and ASK
|
|
534
|
+
- **Cost thresholds**: When the estimated cost for the selected tier exceeds the configured limit (default: $10 per task), do NOT abort silently. Call `proposeAlternativeTier(currentTier, currentEstimate, budget)` from `src/pipeline/costEstimator.ts` and surface a 3-option ASK: **(a) downgrade** to the suggested lower tier (saves the reported delta — drops the deep researcher modes / Phase-4 specialist depth that the lower tier omits), **(b) raise the budget** and proceed at the current tier, **(c) abort**. Default-if-no-response: abort (preserves the fail-closed contract). When `proposeAlternativeTier` returns `null` (current tier is already the cheapest, or no lower tier fits), present only raise-budget / abort.
|
|
535
|
+
|
|
536
|
+
### Activation
|
|
537
|
+
|
|
538
|
+
```
|
|
539
|
+
/hatch3r workflow --auto
|
|
540
|
+
/hatch3r workflow --auto --mode=full
|
|
541
|
+
/hatch3r workflow --auto --mode=quick
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### Auto Mode with Board Pickup
|
|
545
|
+
|
|
546
|
+
When invoked from `hatch3r board-pickup --auto`, the workflow inherits the auto flag. All non-safety ASK checkpoints are automatically resolved. The workflow reports its structured result back to board-pickup for PR creation.
|
|
547
|
+
|
|
548
|
+
### Session Report
|
|
549
|
+
|
|
550
|
+
At the end of an auto workflow session, generate a summary:
|
|
551
|
+
- Mode used: {Full/Quick}
|
|
552
|
+
- Phases completed: {list}
|
|
553
|
+
- Quality checks: {pass/fail with details}
|
|
554
|
+
- Acceptance criteria: {N/M met}
|
|
555
|
+
- Learnings captured: {count}
|
|
556
|
+
- Time in auto mode: {duration}
|
|
557
|
+
|
|
558
|
+
---
|
|
559
|
+
|
|
560
|
+
## Resumability (Decision 27/30)
|
|
561
|
+
|
|
562
|
+
workflow is long-running — a Tier 2/3 run walks the 4-phase delivery pipeline (Analyze → Plan → Implement → Review), fans out one implementer per independent module in Phase 3, and runs a reviewer ↔ fixer loop plus Phase 4b CQ1–CQ9 specialist batch in Phase 4. Per hatch3r's workspace-checkpointed resumability contract, checkpoint progress so an interrupted run re-enters at the last completed phase rather than re-running researchers or re-implementing already-applied module changes.
|
|
563
|
+
|
|
564
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Checkpoint Contract. Per-command slots: workspace `.workflow-workspace/`; step range the command's step progression; `wave` = per-module implementer batch index for Phase 3 and reviewer-fixer iteration count for Phase 4a; snapshot/rollback paths every file touched by Phase 3 implementers and Phase 4a fixers. Write points: after Phase 1 researcher fan-out returns, after the Phase 2 plan synthesis is confirmed by ASK, after each Phase 3 implementer sub-agent returns (one write per module so a mid-batch crash preserves prior `delegation_proof_id`s), after each Phase 4a reviewer-fixer iteration, and after the Phase 4b parallel specialist batch (docs-writer + lint-fixer + CQ1–CQ9 specialists) completes.
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
## Per-Turn Pipeline-State Header (Bypass Protection)
|
|
569
|
+
|
|
570
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Per-Turn Pipeline-State Header. Phase mapping for workflow: `1` = workflow intake + step decomposition, `2` = per-step sub-agent dispatch, `3` = aggregation + verification of step outputs, `4` = workflow report + iteration-summary. Tier 1 runs are exempt per the Tier 1 exemption.
|
|
571
|
+
|
|
572
|
+
## End-of-Turn Delegation Attestation (Bypass Protection)
|
|
573
|
+
|
|
574
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → End-of-Turn Delegation Attestation. Per-command mutated-file slot: workflow definition, step outputs, automation manifests.
|
|
575
|
+
|
|
576
|
+
## Iteration Summary (mandatory output)
|
|
577
|
+
|
|
578
|
+
Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
|
|
579
|
+
|
|
580
|
+
The 9 sections:
|
|
581
|
+
|
|
582
|
+
1. **Request** — verbatim restatement of the user's ask in one sentence.
|
|
583
|
+
2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
|
|
584
|
+
3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
|
|
585
|
+
4. **Files Mutated** — list with diff summary (lines added / removed / files created).
|
|
586
|
+
5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
|
|
587
|
+
6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
|
|
588
|
+
7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
|
|
589
|
+
8. **Open Questions / Blockers** — explicit `None` if fully closed.
|
|
590
|
+
9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
|
|
591
|
+
|
|
592
|
+
### Cost Visibility (Decision 24)
|
|
593
|
+
|
|
594
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
|
|
595
|
+
|
|
596
|
+
## Cost estimate (Decision 24)
|
|
597
|
+
|
|
598
|
+
This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
|
|
599
|
+
|
|
600
|
+
- **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first sub-agent dispatch (both Full and Quick Mode).
|
|
601
|
+
- **Post-execution `cost_actuals` + `delta`** — appended to the Phase 4 / Quick Step 3 iteration summary's Fan-out + Cost section.
|
|
602
|
+
|
|
603
|
+
Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 15` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Quick Tier 1 ≈ 2 (researcher + implementer, reviewer/fixer/testability/security when triggered), Quick Tier 2 ≈ 6 (researcher + implementer + reviewer + fixer + testability + security), Full Tier 3 up to 15 (full pipeline including the Phase-4b CQ1-CQ9 specialist batch bounded by `max_phase4_parallel`). Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
## Error Handling
|
|
608
|
+
|
|
609
|
+
- **Quality check failure in Phase 3:** Loop back and fix before proceeding to Phase 4. Do not advance with failing checks.
|
|
610
|
+
- **Acceptance criteria not met in Phase 4:** Loop back to Phase 3 with specific items to address.
|
|
611
|
+
- **Sub-agent failure:** Per the shared sub-agent-failure clause in `rules/hatch3r-agent-orchestration.md` -> Cross-Phase Error Propagation: retry once, then re-spawn `hatch3r-fixer` with the failure context, then `BLOCKED_OTHER` + ASK. Never fall back to inline implementation (issue #73 bypass mode).
|
|
612
|
+
- **Context degradation:** per the canonical Context-Degradation Policy (`rules/hatch3r-agent-orchestration-detail.md` -> Context-Degradation Policy) — compress at `>50%` context window, restart at `>75%`; the coarse turn-count fallback for this command is ~25 turns, at which point suggest a fresh chat with a progress summary capturing completed work and remaining items.
|
|
613
|
+
- **Handoff information loss (>0.3):** When a lossy phase transition crosses the `informationLossEstimate > 0.3` threshold, emit the `formatPhaseHandoffWarning` line in the iteration summary per `rules/hatch3r-agent-orchestration.md` -> Phase Handoff Contract (Handoff-loss trigger) so the next phase verifies critical context survived — distinct from the turn-count degradation rule above.
|
|
614
|
+
- **Mode switch:** User can switch from Quick to Full (or vice versa) at any ASK checkpoint. State carries forward — no work is lost.
|
|
615
|
+
|
|
616
|
+
## Guardrails
|
|
617
|
+
|
|
618
|
+
- **Never skip ASK checkpoints.**
|
|
619
|
+
- **Never skip Phase 4 (Review) in Full Mode** — even if implementation seems complete.
|
|
620
|
+
- **Quick Mode is opt-in** — user must confirm the mode selection in Step 0.
|
|
621
|
+
- **Always run quality checks** before declaring implementation complete.
|
|
622
|
+
- **Stay within the task scope** — note related work but do not implement it.
|
|
623
|
+
- **Recommend Full Mode** if the task grows beyond Quick Mode complexity during execution.
|
|
624
|
+
- **All phases produce structured output** that can feed into other hatch3r commands.
|
|
625
|
+
- **Respect the project's tooling hierarchy** for knowledge augmentation (Context7 MCP for library docs, web research for current events).
|
|
626
|
+
- **Never force a mode** — user always has final say at every ASK checkpoint.
|
|
627
|
+
- **Concurrent invocation:** acquire `.hatch3r/.lock` before Phase 1 and detect-then-warn on a conflicting active pipeline (same branch / open `.hatch3r/hatch.json` transaction) per `rules/hatch3r-agent-orchestration.md` → Parallel Safety → Concurrent Invocation Handling. Cross-task learnings consolidate at completion, never mid-pipeline.
|
|
628
|
+
- **This command composes existing hatch3r agents and skills** — it does not replace them.
|