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
|
@@ -2,22 +2,25 @@
|
|
|
2
2
|
id: hatch3r-pr-resolve
|
|
3
3
|
type: command
|
|
4
4
|
orchestrator: true
|
|
5
|
-
agentPipeline: [hatch3r-implementer, hatch3r-lint-fixer, hatch3r-
|
|
6
|
-
description: Read
|
|
7
|
-
|
|
5
|
+
agentPipeline: [hatch3r-implementer, hatch3r-lint-fixer, hatch3r-testability, hatch3r-reviewer, hatch3r-fixer, hatch3r-security, hatch3r-docs-writer, hatch3r-ui, hatch3r-performance]
|
|
6
|
+
description: "Read open PR comments, evaluate each against current code via the rigor contract, implement accepted findings, reply inline. Multi-platform."
|
|
7
|
+
argument-hint: "[pr-number]"
|
|
8
|
+
tags: [implementation, review, ctx:team-only]
|
|
8
9
|
quality_charter: agents/shared/quality-charter.md
|
|
9
10
|
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
11
|
cache_friendly: true
|
|
11
12
|
parallel_tool_default: true
|
|
13
|
+
efficiency_tier: standard
|
|
12
14
|
triage_tiers: [1, 2, 3]
|
|
15
|
+
supports_resume: true
|
|
13
16
|
sub_agents_spawned:
|
|
14
17
|
count: 9
|
|
15
|
-
rationale: Per-PR fanout — implementer, lint-fixer,
|
|
18
|
+
rationale: Per-PR fanout — implementer, lint-fixer, testability (CQ5, FIX NOW group, parallel), reviewer ↔ fixer review loop (max 3 iterations), then parallel Tier-3 final-quality specialists (security (CQ3), docs-writer, ui (CQ1), performance (CQ7)) per the Tier-3 specialist mandate. Cost-dominance per CONSTITUTION §2 P8 — token cost never serializes independent work.
|
|
16
19
|
---
|
|
17
20
|
|
|
18
21
|
## §0 Detect Ambiguity (P8 B1)
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → §0 Detect Ambiguity (P8 B1). Triggers: contradictory inputs, missing target, unknown convention.
|
|
21
24
|
|
|
22
25
|
## Agent Pipeline
|
|
23
26
|
|
|
@@ -28,14 +31,16 @@ Before any action, scan the user's request and provided context for unresolved q
|
|
|
28
31
|
| 3. Normalize | Orchestrator (inline) | No | Yes |
|
|
29
32
|
| 4. Evaluate (rigor contract) | Orchestrator (inline) | Per finding | Yes |
|
|
30
33
|
| 5. Triage routing + ASK gate | Orchestrator (inline) | No | Yes |
|
|
31
|
-
| 6. Fix implementation | `hatch3r-implementer`, `hatch3r-lint-fixer`, `hatch3r-
|
|
34
|
+
| 6. Fix implementation | `hatch3r-implementer`, `hatch3r-lint-fixer`, `hatch3r-testability` | Per finding group | When FIX NOW items exist |
|
|
32
35
|
| 7a. Review loop | `hatch3r-reviewer` -> `hatch3r-fixer` (max 3 iterations) | No (sequential) | When code changed (Tier 2/3) |
|
|
33
|
-
| 7b. Final quality — mandatory | `hatch3r-
|
|
34
|
-
| 7c. Final quality — conditional | `hatch3r-docs-writer`, `hatch3r-
|
|
36
|
+
| 7b. Final quality — mandatory | `hatch3r-testability`, `hatch3r-security` | Yes | When code changed |
|
|
37
|
+
| 7c. Final quality — conditional | `hatch3r-docs-writer`, `hatch3r-ui`, `hatch3r-performance`, `hatch3r-lint-fixer` | Yes | When triggered |
|
|
35
38
|
| 8. Post replies | Orchestrator (inline, platform CLI) | Per comment | Yes |
|
|
36
39
|
| 9. Commit and push | Orchestrator (inline) | No | When code changed |
|
|
37
40
|
| 10. Iteration Summary | Orchestrator (inline) | No | Yes |
|
|
38
41
|
|
|
42
|
+
**Parallel-safety conditions** (per `rules/hatch3r-agent-orchestration.md` §Parallel Safety): every parallel fan-out above holds all three — read-only or disjoint writes, deterministic aggregation, no shared mutable state.
|
|
43
|
+
|
|
39
44
|
---
|
|
40
45
|
|
|
41
46
|
# PR Resolve -- Read, Evaluate, Implement, and Reply
|
|
@@ -58,7 +63,7 @@ Optional positional argument: `<pr-number>` (integer).
|
|
|
58
63
|
|
|
59
64
|
## Shared Context
|
|
60
65
|
|
|
61
|
-
If board context exists (current branch has an associated PR or board configuration in `.
|
|
66
|
+
If board context exists (current branch has an associated PR or board configuration in `.hatch3r/hatch.json`), **read the `hatch3r-board-shared` skill at the start of the run.** Cache `board.platform`, `board.owner`, `board.repo`, `board.defaultBranch`, and `board.projectNumber` for the duration of the run.
|
|
62
67
|
|
|
63
68
|
After loading `hatch3r-board-shared`, **read the platform-specific shared file** matching `board.platform`:
|
|
64
69
|
- GitHub → `commands/board/shared-github.md`
|
|
@@ -67,7 +72,7 @@ After loading `hatch3r-board-shared`, **read the platform-specific shared file**
|
|
|
67
72
|
|
|
68
73
|
Each platform file's **Cross-Cutting Tooling** table now includes PR-comment read and reply endpoints used in Steps 2 and 8.
|
|
69
74
|
|
|
70
|
-
If no `.
|
|
75
|
+
If no `.hatch3r/hatch.json` exists, fall back to GitHub and proceed — the command can still run on any GitHub repo where `gh auth login` has been completed.
|
|
71
76
|
|
|
72
77
|
---
|
|
73
78
|
|
|
@@ -83,7 +88,7 @@ If no `.agents/hatch.json` exists, fall back to GitHub and proceed — the comma
|
|
|
83
88
|
1. **One fetch per comment scope.** Issue exactly one paginated request per scope in Step 2; cache and reuse for Steps 3, 4, and 8.
|
|
84
89
|
2. **One diff computation.** Compute `git diff {defaultBranch}...HEAD` once in Step 1; reuse for Steps 4 (outdated detection) and 7 (review loop input).
|
|
85
90
|
3. **Targeted file reads.** In Step 4, read only the files referenced by a comment's `path`/`line` — not the full codebase.
|
|
86
|
-
4. **No re-reading shared rules.** `scope: always` rules from
|
|
91
|
+
4. **No re-reading shared rules.** `scope: always` rules from `rules/` load once at session start; pass their content into sub-agent prompts (Step 6) rather than reloading.
|
|
87
92
|
5. **Per-platform reference cache.** Load the matching `commands/board/shared-{platform}.md` once at run start (Shared Context). Step 8 reads templates from the cache, not from disk.
|
|
88
93
|
|
|
89
94
|
---
|
|
@@ -146,12 +151,36 @@ Execute these steps in order. **Do not skip any step.** The only ASK gate is Ste
|
|
|
146
151
|
|
|
147
152
|
Classify the run before delegating. Counts and severity come from the Step 4 evaluation, so reorder if needed — for runs with no comments at all, take the early-exit path in Step 2.
|
|
148
153
|
|
|
149
|
-
- **Tier 1** (≤5 comments, all single-line nits, 0 critical, 0 architectural-discussion items): reduced pipeline — implement inline or via one specialist; skip Step 7a review loop; still run Step 7b mandatory specialists (
|
|
154
|
+
- **Tier 1** (≤5 comments, all single-line nits, 0 critical, 0 architectural-discussion items): reduced pipeline — implement inline or via one specialist; skip Step 7a review loop; still run Step 7b mandatory specialists (hatch3r-testability, hatch3r-security).
|
|
150
155
|
- **Tier 2** (6–30 comments, mixed severity, no critical disagreements or design objections): standard pipeline — Steps 6, 7a (review loop, max 3 iterations), 7b mandatory + 7c triggered.
|
|
151
156
|
- **Tier 3** (>30 comments OR any Critical-severity item OR any architectural-discussion item OR cross-cutting changes): full pipeline + merge-readiness assessment after Step 9.
|
|
152
157
|
|
|
153
158
|
Tier assignment is recomputed after Step 4 (when severity is known). If the initial Step 0 read of raw counts says Tier 1 but Step 4 reveals a Critical-severity item, upgrade to Tier 3 before the Step 5 ASK.
|
|
154
159
|
|
|
160
|
+
### Step 0.5: Emit Pre-Execution Cost Preview
|
|
161
|
+
|
|
162
|
+
Before the Step 5 ASK gate (the only mutation gate, after which fan-out begins in Step 6), surface the cost preview so a large comment-resolution run is never approved blind. Emit the `cost_estimate` block per `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate, calibrated to the Step 0 tier (recomputed in Step 4e once severities are known). A PR with zero unresolved comments short-circuits at Step 2d and spawns nothing, so `expected_sa_count: 0` is correct for that case.
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
cost_estimate:
|
|
166
|
+
expected_sa_count: <tier → Tier 1 ~1, Tier 2 ~4, Tier 3 up to 9; 0 when no unresolved comments>
|
|
167
|
+
estimated_input_tokens_static_frame: <int>
|
|
168
|
+
estimated_web_research_queries: <int>
|
|
169
|
+
triage_tier: light | standard | deep
|
|
170
|
+
estimated_duration_min: <int>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Post-execution actuals + delta land in the Step 10 Resolution Summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
|
|
174
|
+
|
|
175
|
+
### Effort Override (Decision 17)
|
|
176
|
+
|
|
177
|
+
Auto-tiering can misclassify — a 40-comment PR of pure nits scored as Tier 3, or a 3-comment PR with a hidden Critical scored as Tier 1. The user override is the recovery path mandated by hatch3r's universal `--effort` override contract ("User overridable via `--effort` flag"):
|
|
178
|
+
|
|
179
|
+
- `--effort=light|standard|deep` forces the named tier, bypassing the Step 0/Step 4e auto-classification.
|
|
180
|
+
- 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.
|
|
181
|
+
- The override does NOT suppress the Critical-severity upgrade: a `--effort=light` run that surfaces a Critical item in Step 4 still runs the Tier-3 specialist mandate (Step 5). Safety dominates the cost override.
|
|
182
|
+
- No override passed → the Step 0/Step 4e auto-classification stands.
|
|
183
|
+
|
|
155
184
|
---
|
|
156
185
|
|
|
157
186
|
## Step 1: Resolve PR Identity
|
|
@@ -163,7 +192,7 @@ Tier assignment is recomputed after Step 4 (when severity is known). If the init
|
|
|
163
192
|
|
|
164
193
|
#### 1b. Detect Platform
|
|
165
194
|
|
|
166
|
-
1. Read `.
|
|
195
|
+
1. Read `.hatch3r/hatch.json`. Extract `board.platform` (`github | azure-devops | gitlab`).
|
|
167
196
|
2. If absent or unreadable, default to GitHub and record a Low-confidence platform-detection finding in `run_cache.errors`.
|
|
168
197
|
|
|
169
198
|
#### 1c. Look Up the PR
|
|
@@ -294,7 +323,7 @@ finding:
|
|
|
294
323
|
|
|
295
324
|
## Step 4: Comment Evaluation (Rigor Contract Applied)
|
|
296
325
|
|
|
297
|
-
For each normalized finding, evaluate against the current code in the working tree using the six-test Scientific Rigor Contract from `
|
|
326
|
+
For each normalized finding, evaluate against the current code in the working tree using the six-test Scientific Rigor Contract from `agents/shared/rigor-contract.md`.
|
|
298
327
|
|
|
299
328
|
#### 4a. Targeted Code Read
|
|
300
329
|
|
|
@@ -344,7 +373,7 @@ After Step 4 completes, recompute Step 0's tier using the now-known severities.
|
|
|
344
373
|
|
|
345
374
|
## Step 5: Triage Routing + ASK Checkpoint (only mutation gate)
|
|
346
375
|
|
|
347
|
-
**Tier-3 specialist mandate (P8 B2).** For Tier 3 PRs (6+ findings OR any Critical severity), the post-fix specialist pass (`hatch3r-
|
|
376
|
+
**Tier-3 specialist mandate (P8 B2).** For Tier 3 PRs (6+ findings OR any Critical severity), the post-fix specialist pass (`hatch3r-testability`, `hatch3r-security`, `hatch3r-docs-writer`) MUST run in parallel. Specialists may NOT be deferred via "Needs your call" for cost reasons. Cost-dominance principle applies: token cost of specialist sub-agents is dominated by the quality gain of catching defects pre-merge.
|
|
348
377
|
|
|
349
378
|
#### 5a. Apply Routing Heuristics
|
|
350
379
|
|
|
@@ -390,7 +419,7 @@ NEEDS_CLARIFICATION ({n}):
|
|
|
390
419
|
Needs your call ({n}):
|
|
391
420
|
[7] @bob • inline src/cache.ts:88 • Important/Low → may be intentional eviction
|
|
392
421
|
|
|
393
|
-
Escalation for low-confidence accepted findings: trigger a mandatory `hatch3r-security
|
|
422
|
+
Escalation for low-confidence accepted findings: trigger a mandatory `hatch3r-security` pass if any are security-adjacent (auth, crypto, input validation, access control, secret handling); otherwise flag in commit message for elevated reviewer attention.
|
|
394
423
|
|
|
395
424
|
DEFER (cosmetic, with reply) ({n}):
|
|
396
425
|
[8] @eve • inline src/auth.ts:55 • Cosmetic/Medium → naming nitpick
|
|
@@ -412,7 +441,7 @@ Total: {N} comments • {fix_now_n} fix now • {decline_n} decline • {clarify
|
|
|
412
441
|
>
|
|
413
442
|
> (accept / adjust / show N / fix all)
|
|
414
443
|
|
|
415
|
-
If the user attempts to defer a Critical finding, execute the Critical Deferral Protocol from `commands/hatch3r-revision.md:
|
|
444
|
+
If the user attempts to defer a Critical finding, execute the Critical Deferral Protocol from `commands/hatch3r-revision.md` §5b Routing ASK → Critical Deferral Protocol: structured warning + required written rationale + `Critical-deferred` tag in todo.md + flag for elevated visibility in the next board-fill.
|
|
416
445
|
|
|
417
446
|
After the user accepts, the run is autonomous until Step 10.
|
|
418
447
|
|
|
@@ -441,9 +470,9 @@ Delegate every FIX NOW finding to specialist sub-agents using the delegation con
|
|
|
441
470
|
|------------------|-----------|----------|
|
|
442
471
|
| Bugs, missing features, error handling, logic fixes | `hatch3r-implementer` | hatch3r-implementer agent protocol |
|
|
443
472
|
| Dead code, unused imports, type fixes, lint errors | `hatch3r-lint-fixer` | hatch3r-lint-fixer agent protocol |
|
|
444
|
-
| Missing tests, insufficient coverage | `hatch3r-
|
|
473
|
+
| Missing tests, insufficient coverage | `hatch3r-testability` | hatch3r-testability agent protocol |
|
|
445
474
|
|
|
446
|
-
Blast-radius rule: same-file findings → same sub-agent (priority: implementer > lint-fixer >
|
|
475
|
+
Blast-radius rule: same-file findings → same sub-agent (priority: hatch3r-implementer > hatch3r-lint-fixer > hatch3r-testability); disjoint files → parallel sub-agents.
|
|
447
476
|
|
|
448
477
|
#### 6b. Spawn Sub-Agents
|
|
449
478
|
|
|
@@ -453,16 +482,16 @@ Each sub-agent prompt MUST include:
|
|
|
453
482
|
|
|
454
483
|
1. The findings list for that agent: `(comment_id, file, line, comment body verbatim as the "ask", proposed_action from Step 4)`.
|
|
455
484
|
2. Instruction to follow the corresponding agent protocol.
|
|
456
|
-
3. All `scope: always` rule directives from
|
|
485
|
+
3. All `scope: always` rule directives from `rules/`.
|
|
457
486
|
4. Acceptance criteria from `run_cache.pr.linked_issues` (read once at Step 1, cached).
|
|
458
|
-
5. Relevant `.
|
|
487
|
+
5. Relevant `.hatch3r/learnings/` matching the affected areas.
|
|
459
488
|
6. Explicit: do NOT create branches, commits, or PRs.
|
|
460
489
|
7. Confidence expression requirement (verbatim from the Confidence Propagation Contract above).
|
|
461
490
|
8. PR-resolve-specific constraint: "You are addressing reviewer comments on an existing PR. Stay within the architecture established by the PR's existing changes; do not introduce scope creep beyond the comments listed below."
|
|
462
491
|
|
|
463
492
|
#### 6c. Await and Integrate
|
|
464
493
|
|
|
465
|
-
Await all sub-agents. Collect structured results: files changed, tests written, findings addressed, BLOCKED / PARTIAL items. Apply cross-agent conflict resolution per `commands/revision/revision-delegation.md
|
|
494
|
+
Await all sub-agents. Collect structured results: files changed, tests written, findings addressed, BLOCKED / PARTIAL items. Apply cross-agent conflict resolution per `commands/revision/revision-delegation.md` §6c → Cross-Agent Conflict Resolution (disjoint regions accept both; overlapping regions merge larger-scope; semantic conflicts surface in Step 10 Iteration Summary).
|
|
466
495
|
|
|
467
496
|
Update `run_cache.fix_results`.
|
|
468
497
|
|
|
@@ -485,6 +514,7 @@ Spawn `hatch3r-reviewer` -> `hatch3r-fixer` per `commands/revision/revision-qual
|
|
|
485
514
|
- All `scope: always` rule directives.
|
|
486
515
|
- Iteration number and prior findings.
|
|
487
516
|
- The Confidence expression requirement (verbatim).
|
|
517
|
+
- **Cross-PR Findings block (D13-SA13.1-F08).** Before the first reviewer spawn, scan `.hatch3r/review-findings/` (skip silently if the directory is absent) for entries whose `applies-to` glob matches any file in the cached diff; pass the 5 most-recent matches (by `created` descending) into the reviewer prompt as a `## Cross-PR Findings` block of `{id, applies-to, severity, pr, verdict, summary}` rows. The reviewer (which declares `consults_cross_pr_findings: true`) weighs these as prior organisational memory per its Cross-PR Finding Memory section. After the loop terminates clean, append one `.hatch3r/review-findings/<id>.md` entry per Critical/Warning finding resolved this run (atomic write via `src/merge/safeWrite.ts`), so the next PR on the same files inherits the memory.
|
|
488
518
|
|
|
489
519
|
The reviewer's output MUST include a top-level `confidence: high | medium | low` so the gate evaluates pass/second_pass/escalate per `src/pipeline/reviewLoop.ts` semantics.
|
|
490
520
|
|
|
@@ -495,16 +525,16 @@ After the loop terminates, re-run Step 7a quality gates.
|
|
|
495
525
|
After 7b is clean:
|
|
496
526
|
|
|
497
527
|
**Mandatory when code changed:**
|
|
498
|
-
- `hatch3r-
|
|
499
|
-
- `hatch3r-security
|
|
528
|
+
- `hatch3r-testability` (CQ5) — verify tests for changed code paths meet the mandate map / coverage floor.
|
|
529
|
+
- `hatch3r-security` (CQ3) — security review of all changes.
|
|
500
530
|
|
|
501
531
|
**Conditional:**
|
|
502
532
|
- `hatch3r-docs-writer` — when fixes touched public APIs, architectural patterns, or user-facing behavior.
|
|
503
|
-
- `hatch3r-
|
|
504
|
-
- `hatch3r-
|
|
533
|
+
- `hatch3r-ui` (CQ1) — when the diff includes UI component or style files.
|
|
534
|
+
- `hatch3r-performance` (CQ7) — when the diff includes hot-path changes (DB queries, API handlers, render loops).
|
|
505
535
|
- `hatch3r-lint-fixer` — when residual lint/type errors surfaced after Step 6.
|
|
506
536
|
|
|
507
|
-
Each specialist prompt mirrors the requirements in `commands/revision/revision-quality.md
|
|
537
|
+
Each specialist prompt mirrors the requirements in `commands/revision/revision-quality.md` §Stage 2 → Specialist Prompt Requirements (agent protocol, scope:always rules, diff, acceptance criteria, confidence requirement). Apply specialist outputs; re-run 7a gates if changes were made.
|
|
508
538
|
|
|
509
539
|
---
|
|
510
540
|
|
|
@@ -543,7 +573,7 @@ All reply bodies are signed with a trailing line: `_— hatch3r-pr-resolve (conf
|
|
|
543
573
|
|
|
544
574
|
Reply bodies are written to a `mktemp` file and passed with `-f body=@{file}` (GitHub/GitLab) or via the JSON `--body` argument (Azure); this avoids shell-quoting issues with markdown content.
|
|
545
575
|
|
|
546
|
-
**Field typing for `gh api`:** Integer-typed fields like `in_reply_to` require `-F` (capital); string fields like `body` use `-f` (lowercase). Mixing them returns HTTP 422 and the reply silently fails into the retry/backoff path. See `commands/board/shared-github.md` → GitHub CLI Field-Typing Notes for the full table. **Pager:** Every `gh api` invocation from this command must run with `GH_PAGER=cat` and `PAGER=cat` set; see `commands/hatch3r-board-shared.md` → Pager-Bypass Directive.
|
|
576
|
+
**Field typing for `gh api`:** Integer-typed fields like `in_reply_to` require `-F` (capital); string fields like `body` use `-f` (lowercase). Mixing them returns HTTP 422 and the reply silently fails into the retry/backoff path. See `commands/board/shared-github.md` → GitHub CLI Field-Typing Notes for the full table. **Pager:** Every `gh api` invocation from this command must run with `GH_PAGER=cat` and `PAGER=cat` set; see `commands/hatch3r-board-shared/SKILL.md` → Pager-Bypass Directive.
|
|
547
577
|
|
|
548
578
|
#### 8c. Resilience
|
|
549
579
|
|
|
@@ -633,8 +663,8 @@ Emit the canonical Iteration Summary block from `rules/hatch3r-iteration-summary
|
|
|
633
663
|
| typecheck | pass |
|
|
634
664
|
| tests | pass ({n} passed) |
|
|
635
665
|
| reviewer/fixer loop | clean after {n} iteration(s) |
|
|
636
|
-
| security
|
|
637
|
-
|
|
|
666
|
+
| hatch3r-security | pass |
|
|
667
|
+
| hatch3r-testability | pass — added {n} test(s) |
|
|
638
668
|
|
|
639
669
|
**Suggested Next Action:** {one line — e.g., "Wait for reviewer response on the 2 NEEDS_CLARIFICATION items, then re-run /hatch3r-pr-resolve."}
|
|
640
670
|
```
|
|
@@ -647,6 +677,53 @@ Status decision rules:
|
|
|
647
677
|
|
|
648
678
|
---
|
|
649
679
|
|
|
680
|
+
## Resumability (Decision 27/30)
|
|
681
|
+
|
|
682
|
+
pr-resolve is long-running — a Tier 3 PR with many open comments runs identity resolution (Step 1), full-platform comment fetch (Step 2), normalization + rigor-contract evaluation (Steps 3–4), the only mutation-gate ASK (Step 5), parallel-per-finding fix implementation (Step 6), the reviewer ↔ fixer review loop + Phase 4 specialist batch (Step 7), per-comment platform-API replies (Step 8), and commit + push (Step 9). Per hatch3r's workspace-checkpointed resumability contract, checkpoint progress so an interrupted run re-enters at the last completed step rather than re-fetching comments, re-evaluating findings, or re-posting platform-API replies that already shipped.
|
|
683
|
+
|
|
684
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Checkpoint Contract. Per-command slots: workspace `.pr-resolve-workspace/`; step range the Step 0 → Step 10 progression; `wave` = per-finding fix-batch index in Step 6 and review-loop iteration index in Step 7a; snapshot/rollback paths pre-commit working-tree state and the per-comment reply attempt log. Write points: after Step 1 PR identity resolves, after Step 2 comment fetch locks the normalizedFindings input, after Step 3 normalization, after Step 4 rigor-contract evaluation, after the Step 5 ASK checkpoint (only mutation gate — confirmed routing decisions persist so resume does not re-prompt), after each Step 6 per-finding implementer/lint-fixer/testability batch returns, after each Step 7a review-loop iteration, after each Step 7b–7c specialist batch returns, after each Step 8 platform-API reply records its commentId in `postedCommentIds` (the resume path skips replies with an entry there — no double-posts), and after Step 9 commit + push.
|
|
685
|
+
|
|
686
|
+
---
|
|
687
|
+
|
|
688
|
+
## Per-Turn Pipeline-State Header (Bypass Protection)
|
|
689
|
+
|
|
690
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Per-Turn Pipeline-State Header. Phase mapping for pr-resolve: `1` = comment fetch + triage classification, `2` = per-comment researcher/implementer/fixer dispatch, `3` = reply drafting + reviewer verdict, `4` = posting + Step 10 resolution-summary + iteration-summary. Tier 1 runs are exempt per the Tier 1 exemption.
|
|
691
|
+
|
|
692
|
+
## End-of-Turn Delegation Attestation (Bypass Protection)
|
|
693
|
+
|
|
694
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → End-of-Turn Delegation Attestation. Per-command mutated-file slot: PR file changes, reply drafts, status updates.
|
|
695
|
+
|
|
696
|
+
## Iteration Summary (mandatory output)
|
|
697
|
+
|
|
698
|
+
Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output (the Step 10 Resolution Summary block above adapts these sections to the PR-resolution domain — both the Step 10 block and the 9-section canonical contract apply). The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
|
|
699
|
+
|
|
700
|
+
The 9 sections:
|
|
701
|
+
|
|
702
|
+
1. **Request** — verbatim restatement of the user's ask in one sentence.
|
|
703
|
+
2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
|
|
704
|
+
3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
|
|
705
|
+
4. **Files Mutated** — list with diff summary (lines added / removed / files created).
|
|
706
|
+
5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
|
|
707
|
+
6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
|
|
708
|
+
7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
|
|
709
|
+
8. **Open Questions / Blockers** — explicit `None` if fully closed.
|
|
710
|
+
9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
|
|
711
|
+
|
|
712
|
+
### Cost Visibility (Decision 24)
|
|
713
|
+
|
|
714
|
+
> 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.
|
|
715
|
+
|
|
716
|
+
## Cost estimate (Decision 24)
|
|
717
|
+
|
|
718
|
+
This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
|
|
719
|
+
|
|
720
|
+
- **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the Step 5 ASK gate (the only mutation gate; fan-out begins in Step 6).
|
|
721
|
+
- **Post-execution `cost_actuals` + `delta`** — appended to the Step 10 Resolution Summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
|
|
722
|
+
|
|
723
|
+
Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 9` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 1 (one specialist, no review loop); Tier 2 ≈ 4 (FIX NOW fix group + review loop); Tier 3 up to 9 (full pipeline including the parallel Tier-3 final-quality specialist mandate). A no-comment short-circuit (Step 2d) emits `actual_sa_count: 0`. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
650
727
|
## Error Handling
|
|
651
728
|
|
|
652
729
|
| Condition | Action |
|
|
@@ -658,7 +735,7 @@ Status decision rules:
|
|
|
658
735
|
| Sub-agent (Step 6) reports BLOCKED on a finding | Skip the finding for FIX NOW; surface in Step 10 `Not Done`; reply with "Attempted but blocked" template. |
|
|
659
736
|
| Sub-agent (Step 6) returns PARTIAL | Apply partial changes; mark the unaddressed sub-findings as deferred; reply notes partial implementation. |
|
|
660
737
|
| Reply POST persistently fails (Step 8c) | Continue run; record in `run_cache.reply_post_results`; surface in Step 10. |
|
|
661
|
-
| Review loop hits 3 iterations with findings remaining | ASK the user per `commands/revision/revision-quality.md`
|
|
738
|
+
| Review loop hits 3 iterations with findings remaining | ASK the user per `commands/revision/revision-quality.md` §Stage 1 Review Loop step 3 (3-iteration ASK). |
|
|
662
739
|
| Quality gate fails 2 retries (Step 7a) | Record in `run_cache.errors`; Step 10 `Status: PARTIAL`. |
|
|
663
740
|
| `git push` rejected (e.g., upstream changed mid-run) | Halt at Step 9 with: "Remote branch changed during run. Run `git pull --rebase`, resolve conflicts, then re-run /hatch3r-pr-resolve to repost any failed replies." |
|
|
664
741
|
| GraphQL `reviewThreads` query fails (GitHub resolution state) | Fall back to evaluating every inline comment (no resolution filter); record a Low-confidence note in `run_cache.errors`. |
|
|
@@ -677,3 +754,9 @@ Status decision rules:
|
|
|
677
754
|
8. **Bot-comment parity.** Per user decision, comments from bot accounts are evaluated under the same rigor contract as human comments — no special-case skipping or downgrading.
|
|
678
755
|
9. **Skip resolved by default.** Step 2 filters resolved threads (`isResolved` for GitHub, `status: fixed/closed` for Azure, `resolved: true` for GitLab) unless a future flag explicitly opts in.
|
|
679
756
|
10. **Confidence propagation.** Every reply body, every triage row, every Step 10 verdict carries a confidence rating from the upstream sub-agent or evaluation. Dropping the signal is a gate failure.
|
|
757
|
+
|
|
758
|
+
## References
|
|
759
|
+
|
|
760
|
+
- `agents/shared/user-question-protocol.md` (B1 gate — applies at §0 Detect Ambiguity above plus the Step 5 ASK gate per Finding D7-M14)
|
|
761
|
+
- `agents/shared/quality-charter.md` §1, §3, §7, §8 (confidence, ambiguity, measurable criteria)
|
|
762
|
+
- `rules/hatch3r-agent-orchestration.md` (Per-Turn Pipeline-State Header, End-of-Turn Delegation Attestation, Mandatory Delegation Directive)
|
|
@@ -4,20 +4,22 @@ type: command
|
|
|
4
4
|
orchestrator: true
|
|
5
5
|
agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
|
|
6
6
|
description: Translate a greenfield vision into future-state design artifacts -- ADRs, domain model, API contracts, per-module technical specs, and a board-ready todo.md
|
|
7
|
-
tags: [planning, greenfield]
|
|
7
|
+
tags: [planning, ctx:greenfield-only]
|
|
8
8
|
quality_charter: agents/shared/quality-charter.md
|
|
9
9
|
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
10
|
cache_friendly: true
|
|
11
11
|
parallel_tool_default: true
|
|
12
|
+
efficiency_tier: deep
|
|
12
13
|
triage_tiers: [1, 2, 3]
|
|
14
|
+
supports_resume: true
|
|
13
15
|
sub_agents_spawned:
|
|
14
16
|
count: 7
|
|
15
|
-
rationale: Seven parallel hatch3r-researcher domains per vision brief in Step 3 — stack, features, architecture, pitfalls, UX, business-model-and-market, production-and-scale; docs-writers fan out in a second parallel batch in Step 7 (one per document category).
|
|
17
|
+
rationale: Seven parallel hatch3r-researcher domains per vision brief in Step 3 — stack, features, architecture, pitfalls, UX, business-model-and-market, production-and-scale; docs-writers fan out in a second parallel batch in Step 7 (one per document category). Cost-dominance per CONSTITUTION §2 P8 — token cost never serializes independent work.
|
|
16
18
|
---
|
|
17
19
|
|
|
18
20
|
## §0 Detect Ambiguity (P8 B1)
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → §0 Detect Ambiguity (P8 B1). Triggers: contradictory inputs, missing target, unknown convention.
|
|
21
23
|
|
|
22
24
|
# Project Spec — Greenfield Project Specification from Vision to Docs
|
|
23
25
|
|
|
@@ -31,11 +33,13 @@ Take a project idea or vision and produce complete project documentation across
|
|
|
31
33
|
| 2. Document Generation | `hatch3r-docs-writer` (parallel: business spec, technical spec, ADRs) | Yes | Yes |
|
|
32
34
|
| 3. AGENTS.md | `hatch3r-docs-writer` (AGENTS.md generation/rework) | No | Yes |
|
|
33
35
|
|
|
36
|
+
**Parallel-safety conditions** (per `rules/hatch3r-agent-orchestration.md` §Parallel Safety): every parallel fan-out above holds all three — read-only or disjoint writes, deterministic aggregation, no shared mutable state.
|
|
37
|
+
|
|
34
38
|
---
|
|
35
39
|
|
|
36
40
|
## Shared Context
|
|
37
41
|
|
|
38
|
-
**Read the `hatch3r-board-shared`
|
|
42
|
+
**Read the `hatch3r-board-shared` skill at the start of the run** if it exists. While this command does not perform board operations directly, it establishes patterns and context (GitHub owner/repo, tooling directives) that downstream commands like `hatch3r-board-fill` rely on. Cache any values found.
|
|
39
43
|
|
|
40
44
|
## Token-Saving Directives
|
|
41
45
|
|
|
@@ -45,6 +49,12 @@ Take a project idea or vision and produce complete project documentation across
|
|
|
45
49
|
|
|
46
50
|
---
|
|
47
51
|
|
|
52
|
+
## Confidence Propagation Contract
|
|
53
|
+
|
|
54
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Confidence Propagation Contract. Readiness kind: spec.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
48
58
|
## Workflow
|
|
49
59
|
|
|
50
60
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK. When in doubt, **ASK** — it is better to ask one question too many than to make one wrong assumption. Discovery questions are never wasted.
|
|
@@ -59,6 +69,25 @@ Classify the project-spec request before delegating:
|
|
|
59
69
|
|
|
60
70
|
If Tier 1, run the reduced researcher set and skip Sub-Agents 6–7 unless the user opts in. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including the production-blueprint and confirm scope with the user before generating ADRs.
|
|
61
71
|
|
|
72
|
+
### Step 0.5: Emit Pre-Execution Cost Preview
|
|
73
|
+
|
|
74
|
+
Before the first researcher dispatch (Step 3), surface the cost preview so a multi-researcher project-spec run is never started blind. Emit the `cost_estimate` block per `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate, calibrated to the Step 0 triage tier:
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
cost_estimate:
|
|
78
|
+
expected_sa_count: <triage tier → Tier 1 ~3-4, Tier 2 ~7, Tier 3 up to 7>
|
|
79
|
+
estimated_input_tokens_static_frame: <int>
|
|
80
|
+
estimated_web_research_queries: <int>
|
|
81
|
+
triage_tier: light | standard | deep
|
|
82
|
+
estimated_duration_min: <int>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Post-execution actuals + delta land in the iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
|
|
86
|
+
|
|
87
|
+
### Effort Override (Decision 17)
|
|
88
|
+
|
|
89
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Effort Override (Decision 17). Misclassification example: a focused greenfield scored as Deep, or a regulated multi-platform project scored as Light.
|
|
90
|
+
|
|
62
91
|
---
|
|
63
92
|
|
|
64
93
|
### Step 1: Gather Project Vision & Business Context
|
|
@@ -463,7 +492,7 @@ Launch one sub-agent per research domain below concurrently using the Task tool
|
|
|
463
492
|
|
|
464
493
|
**Prompt context:** Full vision summary, business context, company stage, and stack researcher output (if available via sequential dependency — otherwise use the vision's platform targets).
|
|
465
494
|
|
|
466
|
-
**Task:** Design
|
|
495
|
+
**Task:** Design infrastructure calibrated to the company maturity tier per CONSTITUTION §6 Decision 4 (solo / team / scaleup / enterprise). Use **web search** for cloud provider pricing, infrastructure patterns for the chosen stack, and SLA benchmarks for the industry.
|
|
467
496
|
|
|
468
497
|
1. **Infrastructure architecture**:
|
|
469
498
|
- Hosting recommendation (cloud provider, serverless, containers, edge)
|
|
@@ -987,7 +1016,7 @@ Confirm, or tell me what to adjust."
|
|
|
987
1016
|
|
|
988
1017
|
### Step 6: Generate Initial todo.md
|
|
989
1018
|
|
|
990
|
-
From the feature researcher's priority ordering, the business model researcher's GTM requirements, and the production researcher's infrastructure needs, create a `todo.md` at the project root in the
|
|
1019
|
+
From the feature researcher's priority ordering, the business model researcher's GTM requirements, and the production researcher's infrastructure needs, create a `todo.md` at the project root in the canonical **Todo Grammar** defined in `hatch3r-board-shared` — the single source of truth that `hatch3r-board-fill` Step 1 parses. Emit `## P{N} — {Label}` priority headers and `- [ ] **[BIZ|TECH|BOTH] {title}**: {description}. Ref: {path}.` item lines; tag each item with `[BIZ]`, `[TECH]`, or `[BOTH]`.
|
|
991
1020
|
|
|
992
1021
|
```markdown
|
|
993
1022
|
## P0 — Critical / Launch Blockers
|
|
@@ -1189,12 +1218,59 @@ Which would you like to run next? (or none)"
|
|
|
1189
1218
|
|
|
1190
1219
|
---
|
|
1191
1220
|
|
|
1221
|
+
## Resumability (Decision 27/30)
|
|
1222
|
+
|
|
1223
|
+
project-spec is long-running — a Tier 3 enterprise-scale greenfield fans out seven parallel hatch3r-researcher domains in Step 3 (stack, features, architecture, pitfalls, UX, business-model-and-market, production-and-scale), then runs a second parallel batch of docs-writers in Step 7 (one per document category: business spec, technical spec, ADRs) plus an AGENTS.md generation pass. Per hatch3r's workspace-checkpointed resumability contract, checkpoint progress so an interrupted run re-enters at the last completed step rather than re-running the seven-researcher + docs-writer-batch fan-out.
|
|
1224
|
+
|
|
1225
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Checkpoint Contract. Per-command slots: workspace `.project-spec-workspace/`; step range the Step 0 → Step 9 progression; `wave` = researcher-batch index across the 7 parallel domains, then docs-writer-batch index; snapshot/rollback paths `docs/specs/business/`, `docs/specs/technical/`, `docs/adr/`, `AGENTS.md`, and `todo.md`. Write points: after Step 1 project-vision context locks, after Step 2 scope ASK, after the Step 3 seven-researcher fan-out returns (all domains complete), after Step 4 synthesis confirmed by ASK, after each Step 5 file write under `docs/specs/business/` and `docs/specs/technical/`, after Step 6 ADR generation, after the Step 7 docs-writer batch returns, after Step 8 AGENTS.md generation, and after Step 9 todo.md entry generation.
|
|
1226
|
+
|
|
1227
|
+
---
|
|
1228
|
+
|
|
1229
|
+
## Per-Turn Pipeline-State Header (Bypass Protection)
|
|
1230
|
+
|
|
1231
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Per-Turn Pipeline-State Header. Phase mapping for project-spec: `1` = product intake + persona detection, `2` = spec sub-agent dispatch (vision / personas / scope / data-model / architecture), `3` = synthesis + cross-spec consistency check, `4` = spec write + iteration-summary. Tier 1 runs are exempt per the Tier 1 exemption.
|
|
1232
|
+
|
|
1233
|
+
## End-of-Turn Delegation Attestation (Bypass Protection)
|
|
1234
|
+
|
|
1235
|
+
> Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → End-of-Turn Delegation Attestation. Per-command mutated-file slot: vision doc, persona files, scope spec, architecture spec.
|
|
1236
|
+
|
|
1237
|
+
## Iteration Summary (mandatory output)
|
|
1238
|
+
|
|
1239
|
+
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).
|
|
1240
|
+
|
|
1241
|
+
The 9 sections:
|
|
1242
|
+
|
|
1243
|
+
1. **Request** — verbatim restatement of the user's ask in one sentence.
|
|
1244
|
+
2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
|
|
1245
|
+
3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
|
|
1246
|
+
4. **Files Mutated** — list with diff summary (lines added / removed / files created).
|
|
1247
|
+
5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
|
|
1248
|
+
6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
|
|
1249
|
+
7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
|
|
1250
|
+
8. **Open Questions / Blockers** — explicit `None` if fully closed.
|
|
1251
|
+
9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
|
|
1252
|
+
|
|
1253
|
+
### Cost Visibility (Decision 24)
|
|
1254
|
+
|
|
1255
|
+
> 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.
|
|
1256
|
+
|
|
1257
|
+
## Cost estimate (Decision 24)
|
|
1258
|
+
|
|
1259
|
+
This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
|
|
1260
|
+
|
|
1261
|
+
- **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first researcher dispatch.
|
|
1262
|
+
- **Post-execution `cost_actuals` + `delta`** — appended to the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
|
|
1263
|
+
|
|
1264
|
+
Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 7` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 3-4 (reduced researcher set, no production-blueprint); Tier 2/3 spawn up to 7 parallel researchers plus the production-blueprint sub-agent. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
|
|
1265
|
+
|
|
1266
|
+
---
|
|
1267
|
+
|
|
1192
1268
|
## Error Handling
|
|
1193
1269
|
|
|
1194
1270
|
- **Sub-agent failure:** Retry the failed sub-agent once. If it fails again, present partial results from the remaining sub-agents and ask the user how to proceed (continue without that researcher's input / provide the missing information manually / abort).
|
|
1195
1271
|
- **Conflicting researcher outputs:** Present both options side by side with trade-offs. Ask the user to decide. Do not silently pick one.
|
|
1196
1272
|
- **File write failure:** Report the error and provide the full file content so the user can create the file manually.
|
|
1197
|
-
- **Missing project context:** If no `hatch3r-board-shared` or `.
|
|
1273
|
+
- **Missing project context:** If no `hatch3r-board-shared` or `.hatch3r/hatch.json` exists, proceed without board context — this command does not require board configuration.
|
|
1198
1274
|
- **Business context gaps:** If the user cannot answer business discovery questions, proceed with "TBD" markers and flag these as open items in the business specs.
|
|
1199
1275
|
- **Stage assessment unclear:** Default to "early-revenue" if the user is unsure. This provides balanced analysis depth without over- or under-engineering recommendations.
|
|
1200
1276
|
- **Competitor research gaps:** If web search returns insufficient data for a competitor, note it as "limited public information" and present what was found.
|
|
@@ -1208,9 +1284,9 @@ Which would you like to run next? (or none)"
|
|
|
1208
1284
|
- **Always use web search** in business model and production researcher sub-agents. These sub-agents MUST research externally — do not rely solely on training data.
|
|
1209
1285
|
- **Stay within the project scope** defined by the user in Step 1. Do not invent features or modules the user did not describe or imply.
|
|
1210
1286
|
- **Specs must use stable IDs from the glossaries.** Generate glossaries first, then reference their IDs in all subsequent specs. Business and technical glossaries must cross-reference each other.
|
|
1211
|
-
- **todo.md must
|
|
1287
|
+
- **todo.md must match the canonical Todo Grammar** in `hatch3r-board-shared` — the single source of truth `hatch3r-board-fill` Step 1 parses (`## P{N} — {Label}` headers; `- [ ] **[BIZ|TECH|BOTH] {title}**: {description}. Ref: {path}.` items referencing source specs).
|
|
1212
1288
|
- **Do not over-specify.** Keep specs at the right level of detail for the project's stage. Avoid implementation details that belong in code, not documentation.
|
|
1213
|
-
- **Stage-adaptive recommendations.** Never recommend enterprise-
|
|
1289
|
+
- **Stage-adaptive recommendations.** Never recommend enterprise-tier (per CONSTITUTION §6 Decision 4) solutions for solo-tier pre-revenue startups. Never recommend MVP shortcuts for scaleup-tier or enterprise-tier companies. Calibrate all recommendations to the company stage from Step 1c.
|
|
1214
1290
|
- **All 7 researchers must complete before proceeding to Step 3.** Do not generate specs from partial research.
|
|
1215
1291
|
- **Sub-agents must not create files.** They return structured text results to the orchestrator. Only the orchestrator writes files in Step 7.
|
|
1216
1292
|
- **Never overwrite `AGENTS.md`** without explicit user confirmation.
|