hatch3r 1.9.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 +52 -143
- package/dist/cli/index.js +28453 -15831
- package/dist/content/agents/hatch3r-architect.md +39 -9
- package/dist/content/agents/hatch3r-brownfield-spec.md +254 -0
- package/dist/content/agents/hatch3r-ci-watcher.md +8 -1
- package/dist/content/agents/hatch3r-context-rules.md +19 -1
- package/dist/content/agents/hatch3r-creator.md +65 -26
- package/dist/content/agents/hatch3r-dependency-drafter.md +162 -0
- package/dist/content/agents/hatch3r-devops.md +11 -1
- package/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/dist/content/agents/hatch3r-fixer.md +59 -8
- package/dist/content/agents/hatch3r-greenfield-spec.md +256 -0
- package/dist/content/agents/hatch3r-handoff-loader.md +29 -3
- package/dist/content/agents/hatch3r-handoff-preparer.md +10 -1
- package/dist/content/agents/hatch3r-implementer.md +139 -8
- package/dist/content/agents/hatch3r-incident-responder.md +96 -0
- package/dist/content/agents/hatch3r-learnings-loader.md +122 -88
- package/dist/content/agents/hatch3r-lint-fixer.md +15 -3
- 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/dist/content/agents/hatch3r-researcher.md +27 -4
- package/dist/content/agents/hatch3r-reviewer.md +153 -103
- 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/dist/content/agents/modes/requirements-elicitation.md +1 -1
- package/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/dist/content/agents/shared/efficiency-patterns.md +32 -1
- package/dist/content/agents/shared/injection-patterns.md +18 -7
- package/dist/content/agents/shared/principles.md +60 -0
- package/dist/content/agents/shared/prompt-structure.md +7 -1
- package/dist/content/agents/shared/quality-charter.md +48 -12
- 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/dist/content/agents/shared/user-content-templates.md +34 -8
- package/dist/content/agents/shared/user-question-protocol.md +45 -3
- package/dist/content/checks/README.md +5 -0
- package/dist/content/checks/accessibility.md +14 -7
- package/dist/content/checks/code-quality.md +1 -1
- package/dist/content/checks/performance.md +7 -4
- package/dist/content/checks/security.md +6 -6
- package/dist/content/checks/testing.md +1 -1
- package/dist/content/commands/board/pickup-delegation-multi.md +37 -10
- package/dist/content/commands/board/pickup-delegation.md +7 -5
- package/dist/content/commands/board/pickup-modes.md +1 -0
- package/dist/content/commands/board/pickup-post-impl.md +1 -1
- package/dist/content/commands/hatch3r-api-spec.md +79 -2
- package/dist/content/commands/hatch3r-auth-scaffold.md +250 -0
- package/dist/content/commands/hatch3r-benchmark.md +90 -7
- package/dist/content/commands/hatch3r-board-fill.md +97 -11
- package/dist/content/commands/hatch3r-board-pickup.md +93 -9
- package/dist/content/commands/hatch3r-bug-pipeline.md +240 -0
- package/dist/content/commands/hatch3r-bug-plan.md +79 -3
- package/dist/content/commands/hatch3r-codebase-map.md +80 -4
- package/dist/content/commands/hatch3r-create.md +105 -7
- package/dist/content/commands/hatch3r-debug.md +102 -14
- package/dist/content/commands/hatch3r-diagnose.md +238 -0
- package/dist/content/commands/hatch3r-feature-plan.md +125 -5
- package/dist/content/commands/hatch3r-handoff.md +83 -3
- package/dist/content/commands/hatch3r-healthcheck.md +105 -5
- package/dist/content/commands/hatch3r-incident-response.md +228 -0
- package/dist/content/commands/hatch3r-migration-plan.md +79 -3
- package/dist/content/commands/hatch3r-onboard.md +94 -3
- package/dist/content/commands/hatch3r-pack-install.md +243 -0
- package/dist/content/commands/hatch3r-pr-resolve.md +106 -23
- package/dist/content/commands/hatch3r-project-spec.md +82 -6
- package/dist/content/commands/hatch3r-quick-change.md +108 -13
- package/dist/content/commands/hatch3r-refactor-plan.md +78 -2
- package/dist/content/commands/hatch3r-release.md +401 -0
- package/dist/content/commands/hatch3r-revision.md +98 -12
- package/dist/content/commands/hatch3r-roadmap.md +92 -10
- package/dist/content/commands/hatch3r-security-audit.md +105 -5
- package/dist/content/commands/hatch3r-slo-scaffold.md +246 -0
- package/dist/content/commands/hatch3r-spec.md +216 -0
- package/dist/content/commands/hatch3r-test-plan.md +85 -9
- package/dist/content/commands/hatch3r-workflow.md +165 -41
- package/dist/content/commands/revision/revision-delegation.md +6 -5
- package/dist/content/commands/revision/revision-modes.md +49 -4
- package/dist/content/commands/revision/revision-quality.md +10 -7
- package/dist/content/commands/shared/orchestration-frame.md +119 -0
- package/dist/content/github-agents/hatch3r-docs-agent.md +21 -1
- package/dist/content/github-agents/hatch3r-lint-agent.md +21 -1
- package/dist/content/github-agents/hatch3r-security-agent.md +21 -1
- package/dist/content/github-agents/hatch3r-test-agent.md +21 -1
- package/dist/content/hooks/hatch3r-file-save.md +1 -1
- package/dist/content/hooks/hatch3r-pre-push.md +4 -4
- package/dist/content/hooks/hatch3r-review-loop-cap.md +52 -0
- package/dist/content/mcp/mcp.json +7 -5
- package/dist/content/rules/hatch3r-accessibility-standards.md +14 -2
- package/dist/content/rules/hatch3r-accessibility-standards.mdc +12 -1
- package/dist/content/rules/hatch3r-agent-orchestration-detail.md +58 -19
- package/dist/content/rules/hatch3r-agent-orchestration-detail.mdc +58 -19
- package/dist/content/rules/hatch3r-agent-orchestration.md +87 -213
- package/dist/content/rules/hatch3r-agent-orchestration.mdc +87 -213
- package/dist/content/rules/hatch3r-ai-evals.md +5 -4
- package/dist/content/rules/hatch3r-ai-evals.mdc +3 -3
- package/dist/content/rules/hatch3r-ai-ux-patterns.md +6 -2
- package/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/dist/content/rules/hatch3r-api-design.md +5 -1
- package/dist/content/rules/hatch3r-api-design.mdc +3 -0
- package/dist/content/rules/hatch3r-api-versioning.md +2 -1
- package/dist/content/rules/hatch3r-auth-patterns.md +3 -1
- package/dist/content/rules/hatch3r-auth-patterns.mdc +1 -0
- package/dist/content/rules/hatch3r-browser-verification.md +2 -0
- package/dist/content/rules/hatch3r-browser-verification.mdc +2 -0
- package/dist/content/rules/hatch3r-capability-matrix.md +108 -0
- package/dist/content/rules/hatch3r-capability-matrix.mdc +108 -0
- package/dist/content/rules/hatch3r-ci-cd.md +8 -1
- package/dist/content/rules/hatch3r-ci-cd.mdc +6 -0
- package/dist/content/rules/hatch3r-clarification-default.md +73 -0
- package/dist/content/rules/hatch3r-clarification-default.mdc +73 -0
- package/dist/content/rules/hatch3r-code-standards.md +23 -47
- package/dist/content/rules/hatch3r-code-standards.mdc +22 -46
- package/dist/content/rules/hatch3r-component-conventions.md +3 -0
- package/dist/content/rules/hatch3r-component-conventions.mdc +3 -0
- package/dist/content/rules/hatch3r-container-hardening.md +11 -2
- package/dist/content/rules/hatch3r-container-hardening.mdc +9 -1
- package/dist/content/rules/hatch3r-contract-testing.md +2 -1
- 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/dist/content/rules/hatch3r-data-classification.md +3 -1
- package/dist/content/rules/hatch3r-data-classification.mdc +2 -1
- package/dist/content/rules/hatch3r-deep-context.md +13 -13
- package/dist/content/rules/hatch3r-deep-context.mdc +13 -13
- package/dist/content/rules/hatch3r-dependency-management.md +16 -3
- package/dist/content/rules/hatch3r-dependency-management.mdc +15 -3
- package/dist/content/rules/hatch3r-design-system-detection.md +2 -1
- 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/dist/content/rules/hatch3r-event-schema-evolution.md +2 -1
- package/dist/content/rules/hatch3r-fan-out-discipline.md +91 -0
- package/dist/content/rules/hatch3r-fan-out-discipline.mdc +91 -0
- package/dist/content/rules/hatch3r-feature-flags.md +2 -0
- package/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/dist/content/rules/hatch3r-git-conventions.md +4 -1
- package/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/dist/content/rules/hatch3r-handoff-readiness.md +10 -0
- package/dist/content/rules/hatch3r-handoff-readiness.mdc +10 -0
- package/dist/content/rules/hatch3r-i18n.md +2 -0
- package/dist/content/rules/hatch3r-i18n.mdc +2 -0
- package/dist/content/rules/hatch3r-iteration-summary.md +75 -57
- package/dist/content/rules/hatch3r-iteration-summary.mdc +77 -54
- 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/dist/content/rules/hatch3r-migrations.md +2 -1
- package/dist/content/rules/hatch3r-observability-logging.md +1 -1
- package/dist/content/rules/hatch3r-observability-metrics.md +1 -1
- package/dist/content/rules/hatch3r-observability-tracing.md +45 -36
- package/dist/content/rules/hatch3r-observability-tracing.mdc +44 -35
- package/dist/content/rules/hatch3r-operability.md +2 -1
- package/dist/content/rules/hatch3r-passkey-server.md +2 -1
- package/dist/content/rules/hatch3r-performance-budgets.md +2 -0
- package/dist/content/rules/hatch3r-performance-budgets.mdc +2 -0
- package/dist/content/rules/hatch3r-php-laravel-patterns.md +109 -0
- package/dist/content/rules/hatch3r-php-laravel-patterns.mdc +104 -0
- package/dist/content/rules/hatch3r-progressive-delivery.md +5 -1
- package/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/dist/content/rules/hatch3r-resilience-patterns.md +2 -1
- 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/dist/content/rules/hatch3r-secrets-management.md +10 -1
- package/dist/content/rules/hatch3r-secrets-management.mdc +8 -0
- package/dist/content/rules/hatch3r-security-patterns.md +36 -34
- package/dist/content/rules/hatch3r-security-patterns.mdc +35 -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/dist/content/rules/hatch3r-testing.md +4 -1
- package/dist/content/rules/hatch3r-testing.mdc +2 -0
- package/dist/content/rules/hatch3r-theming.md +2 -0
- package/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/dist/content/rules/hatch3r-tooling-hierarchy.md +29 -31
- package/dist/content/rules/hatch3r-tooling-hierarchy.mdc +27 -30
- package/dist/content/rules/hatch3r-typescript-patterns.md +58 -0
- package/dist/content/rules/hatch3r-typescript-patterns.mdc +53 -0
- package/dist/content/rules/hatch3r-ux-states-and-flows.md +11 -4
- package/dist/content/rules/hatch3r-ux-states-and-flows.mdc +9 -3
- package/dist/content/skills/hatch3r-a11y-audit/SKILL.md +10 -8
- package/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/dist/content/skills/hatch3r-ai-feature/SKILL.md +4 -6
- package/dist/content/skills/hatch3r-api-spec/SKILL.md +27 -2
- package/dist/content/skills/hatch3r-architecture-review/SKILL.md +4 -7
- package/dist/content/skills/hatch3r-board-groom/SKILL.md +11 -0
- package/dist/content/skills/hatch3r-board-init/SKILL.md +17 -1
- package/dist/content/skills/hatch3r-board-refresh/SKILL.md +12 -1
- package/dist/content/skills/hatch3r-board-shared/SKILL.md +38 -1
- package/dist/content/skills/hatch3r-browser-verify/SKILL.md +307 -0
- package/dist/content/skills/hatch3r-bug-fix/SKILL.md +15 -2
- package/dist/content/skills/hatch3r-ci-pipeline/SKILL.md +17 -7
- package/dist/content/skills/hatch3r-cli-fd/SKILL.md +33 -1
- package/dist/content/skills/hatch3r-cli-fzf/SKILL.md +33 -1
- package/dist/content/skills/hatch3r-cli-gh/SKILL.md +50 -1
- package/dist/content/skills/hatch3r-cli-jq/SKILL.md +40 -6
- package/dist/content/skills/hatch3r-cli-ripgrep/SKILL.md +33 -1
- package/dist/content/skills/hatch3r-cli-toolbox/SKILL.md +130 -23
- package/dist/content/skills/hatch3r-containerize/SKILL.md +157 -0
- package/dist/content/skills/hatch3r-context-health/SKILL.md +9 -7
- package/dist/content/skills/hatch3r-cost-tracking/SKILL.md +37 -17
- package/dist/content/skills/hatch3r-customize/SKILL.md +5 -8
- package/dist/content/skills/hatch3r-dep-audit/SKILL.md +23 -7
- package/dist/content/skills/hatch3r-design-system-detect/SKILL.md +3 -7
- package/dist/content/skills/hatch3r-docs-writing/SKILL.md +159 -0
- package/dist/content/skills/hatch3r-enhancability-verify/SKILL.md +152 -0
- package/dist/content/skills/hatch3r-feature/SKILL.md +53 -3
- package/dist/content/skills/hatch3r-feedback/SKILL.md +103 -0
- package/dist/content/skills/hatch3r-gh-agentic-workflows/SKILL.md +10 -8
- package/dist/content/skills/hatch3r-handoff-prepare/SKILL.md +4 -7
- package/dist/content/skills/hatch3r-handoff-resume/SKILL.md +4 -7
- package/dist/content/{commands/hatch3r-hooks.md → skills/hatch3r-hooks/SKILL.md} +48 -137
- package/dist/content/skills/hatch3r-incident-response/SKILL.md +66 -7
- package/dist/content/skills/hatch3r-issue-workflow/SKILL.md +11 -0
- package/dist/content/skills/hatch3r-learn/SKILL.md +317 -0
- package/dist/content/skills/hatch3r-logical-refactor/SKILL.md +6 -7
- package/dist/content/skills/hatch3r-maintainability-verify/SKILL.md +146 -0
- package/dist/content/skills/hatch3r-migration/SKILL.md +8 -7
- package/dist/content/skills/hatch3r-observability-verify/SKILL.md +17 -12
- package/dist/content/skills/hatch3r-perf-audit/SKILL.md +13 -9
- package/dist/content/skills/hatch3r-pr-creation/SKILL.md +4 -7
- package/dist/content/skills/hatch3r-qa-validation/SKILL.md +6 -5
- package/dist/content/skills/hatch3r-recipe/SKILL.md +63 -60
- package/dist/content/skills/hatch3r-refactor/SKILL.md +6 -7
- package/dist/content/skills/hatch3r-release/SKILL.md +123 -11
- package/dist/content/skills/hatch3r-reliability-verify/SKILL.md +9 -5
- package/dist/content/{commands/hatch3r-report.md → skills/hatch3r-report/SKILL.md} +20 -17
- 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/dist/content/skills/hatch3r-ui-ux-verify/SKILL.md +19 -11
- package/dist/content/skills/hatch3r-visual-refactor/SKILL.md +11 -7
- package/package.json +50 -31
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js.map +0 -1
- package/dist/content/agents/hatch3r-a11y-auditor.md +0 -159
- package/dist/content/agents/hatch3r-dependency-auditor.md +0 -219
- package/dist/content/agents/hatch3r-perf-profiler.md +0 -166
- package/dist/content/agents/hatch3r-security-auditor.md +0 -180
- package/dist/content/agents/hatch3r-test-writer.md +0 -171
- package/dist/content/commands/hatch3r-learn.md +0 -312
- package/dist/content/rules/hatch3r-learning-consult.md +0 -42
- package/dist/content/rules/hatch3r-learning-consult.mdc +0 -38
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Extended orchestration reference — PipelineContext schemas, resilience protocols, observability integration, and auto-mode guardrails
|
|
3
3
|
globs: ["**/.hatch3r/**", "**/pipeline/**", "**/*orchestrat*", "**/*agent*"]
|
|
4
4
|
alwaysApply: false
|
|
5
|
-
precedence:
|
|
5
|
+
precedence: high
|
|
6
6
|
detail_rule: true
|
|
7
7
|
consumed_by: hatch3r-agent-orchestration
|
|
8
8
|
---
|
|
@@ -19,7 +19,11 @@ PipelineContext {
|
|
|
19
19
|
correlationId: string // UUID v4, generated before Phase 1
|
|
20
20
|
taskType: "bug" | "feature" | "refactor" | "qa"
|
|
21
21
|
issueRef: string | null // Issue number or null for plain chat
|
|
22
|
-
deepContextTier: 1 | 2 | 3 //
|
|
22
|
+
deepContextTier: 1 | 2 | 3 // Pre-Phase-1 baseline from hatch3r-deep-context scoring
|
|
23
|
+
|
|
24
|
+
// Mid-run tier upgrade (Finding D7-14): set when execution surfaces complexity
|
|
25
|
+
// the baseline missed (see Complexity-Driven Adaptation + Tier-upgrade propagation).
|
|
26
|
+
tierUpgrade?: { from: 1|2|3; to: 1|2|3; reason: string; atPhase: 1|2|3|4 }
|
|
23
27
|
|
|
24
28
|
// Detected project type for specialist selection (Finding #56)
|
|
25
29
|
projectType?: {
|
|
@@ -53,7 +57,7 @@ PipelineContext {
|
|
|
53
57
|
|
|
54
58
|
// Phase 3 outputs (Review)
|
|
55
59
|
reviewResult: {
|
|
56
|
-
iterations: number // 1-3
|
|
60
|
+
iterations: number // 1 to code-class cap (DEFAULT_MAX_REVIEW_ITERATIONS - 1 = 3)
|
|
57
61
|
finalVerdict: "CLEAN" | "UNRESOLVED"
|
|
58
62
|
findings: ReviewFinding[]
|
|
59
63
|
confirmationPassResult: "PASS" | "FAIL"
|
|
@@ -89,24 +93,24 @@ The TypeScript implementation of this schema with runtime validation is in `src/
|
|
|
89
93
|
| Phase 1 (Research) | No relevant findings | Surface to user; ask whether to proceed with implementation. |
|
|
90
94
|
| Phase 2 (Implementation) | Build/test failure | Attempt self-fix (max 2 iterations). Escalate to user if unresolved. |
|
|
91
95
|
| Phase 2 (Implementation) | Scope creep detected | Halt. Surface deviation to user. Resume only with approval. |
|
|
92
|
-
| Phase 3 (Review) | Max iterations (3) | Surface unresolved findings to user. Do not merge. |
|
|
96
|
+
| Phase 3 (Review) | Max iterations (3) (code-class cap = `DEFAULT_MAX_REVIEW_ITERATIONS` - 1) | Surface unresolved findings to user. Do not merge. |
|
|
93
97
|
| Phase 3 (Review) | DESIGN_OBJECTION verdict | Terminate review loop immediately. Surface the objection and alternative approaches to the user for an architectural decision. Do not spawn fixer. |
|
|
94
98
|
| Phase 3 (Review) | Fixer introduces regressions | Revert fixer changes. Surface original findings + regression to user. |
|
|
95
|
-
| Phase 4 (Quality) |
|
|
99
|
+
| Phase 4 (Quality) | Conditional-specialist timeout | Log timeout. Continue with available results. Flag in output. |
|
|
100
|
+
| Phase 4 (Quality) | Mandatory CQ3/CQ5 specialist non-completion (TIMEOUT / crash / no-output) | Fail closed. Surface `BLOCKED`. A mandatory always-mode specialist (`hatch3r-security` CQ3, `hatch3r-testability` CQ5 per `hatch3r-agent-orchestration.md` Phase 4 Specialist Trigger Table) that does not return `COMPLETE` leaves its gate absent; absence-of-finding is NOT an implicit pass. This row is the prose face of the typed gate `evaluatePhase4Completion` (`src/pipeline/pipelineContext.ts`): a non-SUCCESS floor specialist yields `mandatoryFloorsSatisfied: false` → `complete: false`. Do not merge/release. Require an explicit operator decision (re-run, accept-risk, or abort) before advancing. |
|
|
96
101
|
| Phase 4 (Quality) | Validation pass fails | Spawn fixer (max 2 attempts). Surface if unresolved. |
|
|
97
102
|
|
|
98
103
|
### Subagent Error Recovery
|
|
99
104
|
|
|
100
|
-
1. **Timeout:** Forward partial output. Mark status `TIMEOUT`. Continue pipeline.
|
|
101
|
-
2. **Crash/no output:** Mark status `FAILED`. Log reason. Continue if non-blocking.
|
|
105
|
+
1. **Timeout:** Forward partial output. Mark status `TIMEOUT`. Continue pipeline ONLY for conditional specialists. A mandatory always-mode CQ3/CQ5 specialist on TIMEOUT fails closed — surface `BLOCKED`, never treat the missing gate as a pass.
|
|
106
|
+
2. **Crash/no output:** Mark status `FAILED`. Log reason. Continue if non-blocking. A mandatory always-mode CQ3/CQ5 specialist is blocking — a crash or no-output return fails closed (surface `BLOCKED`, explicit operator decision before merge/release), it is never "non-blocking".
|
|
102
107
|
3. **Conflicting outputs:** When two specialists disagree (e.g., security vs performance), escalate to user with both positions.
|
|
103
|
-
4. **Resource exhaustion:**
|
|
108
|
+
4. **Resource exhaustion:** Apply the Context-Degradation Policy (this file) — compress at `>50%` window, restart at `>75%`.
|
|
104
109
|
|
|
105
110
|
### Retry Policies
|
|
106
111
|
|
|
107
|
-
- Subagent retries: 0
|
|
108
|
-
- Phase retries: Phase 3 review loop retries up to 3 iterations. All other phases: 0 retries (escalate to user).
|
|
109
|
-
- Never retry the same failed operation identically — adjust the prompt or approach.
|
|
112
|
+
- Subagent retries: 0 — never retry the same failed operation identically; spawn a new agent with an adjusted prompt/approach instead.
|
|
113
|
+
- Phase retries: Phase 3 review loop retries up to 3 iterations (code-class cap = `DEFAULT_MAX_REVIEW_ITERATIONS` - 1). All other phases: 0 retries (escalate to user).
|
|
110
114
|
|
|
111
115
|
## Observability Integration
|
|
112
116
|
|
|
@@ -164,7 +168,7 @@ After each phase, validate that the output conforms to the expected PipelineCont
|
|
|
164
168
|
Auto-mode MUST halt and surface to user when:
|
|
165
169
|
1. A CRITICAL finding is detected in Phase 3.
|
|
166
170
|
2. Phase 4 validation pass fails after 2 fix attempts.
|
|
167
|
-
3. Any specialist reports FAILED status.
|
|
171
|
+
3. Any specialist reports FAILED status, OR a mandatory always-mode CQ3/CQ5 specialist (`hatch3r-security`, `hatch3r-testability`) returns any of {FAILED, TIMEOUT, no-output} — a mandatory gate that did not return `COMPLETE` is BLOCKED, not a silent pass.
|
|
168
172
|
4. Scope containment violation detected.
|
|
169
173
|
5. Implementation touches more than 20 files (may indicate scope creep).
|
|
170
174
|
|
|
@@ -181,26 +185,61 @@ The pipeline should adapt its behavior based on observed task complexity, not ju
|
|
|
181
185
|
|
|
182
186
|
| Signal During Execution | Adaptation |
|
|
183
187
|
|------------------------|------------|
|
|
184
|
-
| Phase 1 research finds >10 affected files (initial estimate was <5) | Upgrade tier to 3 if currently 2.
|
|
188
|
+
| Phase 1 research finds >10 affected files (initial estimate was <5) | Upgrade tier to 3 if currently 2. Record the upgrade in `PipelineContext.tierUpgrade` (`src/pipeline/pipelineContext.ts::TierUpgrade`: `{from, to, reason, atPhase}`) and re-run `codebase-impact` at `deep` depth before Phase 2. |
|
|
185
189
|
| Phase 2 implementer reports >3 research gaps | Pause Phase 2. Run targeted researcher with gap-specific modes before continuing. |
|
|
186
190
|
| Phase 3 review loop reaches iteration 2 with increasing Critical count | Classify as complexity underestimate. Surface to user with recommendation to break the task into smaller sub-tasks. |
|
|
187
|
-
| Phase 4 validation pass fails on first attempt | Check whether failure is in
|
|
191
|
+
| Phase 4 validation pass fails on first attempt | Check whether failure is in hatch3r-testability's new tests (expected -- fix test) or in pre-existing tests (regression -- fix implementation). Route to appropriate fixer. |
|
|
192
|
+
|
|
193
|
+
**Tier-upgrade propagation (Finding D7-14).** A mid-run upgrade is not just a log line — it MUST change downstream behavior. After populating `PipelineContext.tierUpgrade`, the orchestrator reads the tier for every subsequent depth decision via `resolveEffectiveTier(context)` (returns `tierUpgrade.to` when an upgrade is recorded, else `deepContextTier`), so the Tier→Phase-4-specialist-depth mapping in `hatch3r-agent-orchestration.md` (Deep Context Integration) scales to the upgraded tier instead of staying pinned to the stale baseline. The carrier only ever raises the tier (a recorded `to <= from` is ignored). Surface the upgrade once in the iteration summary via `formatTierUpgradeNote(context)` (one line, returns `null` when no upgrade occurred) so the adaptation is visible, not silent.
|
|
188
194
|
|
|
189
195
|
### Post-Pipeline Learning
|
|
190
196
|
|
|
191
|
-
After pipeline completion, the orchestrator
|
|
197
|
+
After pipeline completion, the orchestrator captures lessons for future runs:
|
|
192
198
|
|
|
193
|
-
1. **Tier accuracy:** Was the initial tier correct? If the pipeline needed adaptation (above),
|
|
199
|
+
1. **Tier accuracy:** Was the initial tier correct? If the pipeline needed adaptation (above), persist a tier-accuracy record (`taskId`, `initialTier`, `finalTier`, `adjustmentReasons`, `correlationId`, `ts`) to `.hatch3r/telemetry/<session-id>-tier.json` via the atomic-write path in `src/pipeline/costEstimator.ts` (sibling of `CostTelemetryRecord`). Tier mismatch beyond ±10% across 50 tasks triggers a CL-3 signal-weight recalibration proposal.
|
|
194
200
|
2. **Phase duration ratios:** Record time spent per phase. Anomalous ratios (e.g., Phase 3 taking 5x Phase 2) indicate systemic issues worth investigating.
|
|
195
201
|
3. **Specialist value:** Record which Phase 4 specialists produced actionable findings vs. clean reports. Over time, this data informs smarter specialist dispatch.
|
|
196
202
|
|
|
197
|
-
##
|
|
203
|
+
## Multi-Task and Concurrent Pipeline Support
|
|
204
|
+
|
|
205
|
+
Canonical schema for the one-sentence multi-task / epic / batch handling in the orchestration rule's `Task Context Protocols`, so pack integrators have a deterministic specification (Finding D7-M13 / D7-SA7.5-3).
|
|
206
|
+
|
|
207
|
+
**Dependency-graph construction.** Multi-task input (epic, plain-chat multi-request, or board batch) is parsed into discrete units. Each unit carries its own `correlationId` (epic sub-issues get individual IDs sharing a parent epic ID; batch tasks share one ID with a sub-task index). The orchestrator builds a directed acyclic dependency graph from declared inter-unit constraints (e.g., "issue B depends on issue A's API changes"); units with no declared dependency form the root level.
|
|
208
|
+
|
|
209
|
+
**Per-level parallelism.** At each dependency level, the orchestrator parallelizes researchers + implementers across all units in that level subject to the three Parallel Safety conditions in the canonical rule. The parallelism width per level is bounded by the same orchestrator-honored `max_phase4_parallel` width (default `8`) the Phase 4 specialists honor — LLM-honored guidance, not a code-enforced cap (no hatch3r module reads an env var; the host Task tool is the dispatcher and applies no platform fan-out limit, per the canonical rule's Phase 4 — Final Quality).
|
|
210
|
+
|
|
211
|
+
**Concurrent primitive — `concurrent_pipeline_unit`.** Each unit in a level is a `concurrent_pipeline_unit` record: `{ unitId: string; correlationId: string; parentEpicId?: string; level: number; dependsOn: string[]; priority: "p0"|"p1"|"p2"|"p3"; status: "pending"|"running"|"complete"|"blocked"; }`. Within a level the orchestrator dispatches by priority descending (p0 first); when concurrency limits cap the level, the in-flight pool is filled with highest-priority units first and the rest queue for the next dispatch slot.
|
|
212
|
+
|
|
213
|
+
**File-overlap reconciliation.** When two parallel implementers in the same level touch the same file: accept disjoint-region edits without conflict; merge overlapping regions using the larger-scope change as base (the smaller change replays onto the larger); halt on semantic conflicts for user resolution. Per Parallel Safety condition 3, NO mid-pipeline writes to shared mutable state (`.hatch3r/hatch.json`, `.hatch3r/learnings/INDEX.md`) — learnings consolidation happens at pipeline completion only.
|
|
214
|
+
|
|
215
|
+
**Review loop coordination.** After all level-N implementers complete, the orchestrator runs ONE consolidated Phase 3 review loop covering the union diff produced by the level. Per-unit Phase 4 specialist dispatch then runs in parallel bounded by `max_phase4_parallel`. Level-N+1 begins only after Level-N reaches Phase 4 completion (validated by `evaluatePhase4Completion`). Cross-pipeline concurrent invocation (two `hatch3r` commands in two shells against the same repo) is deferred per the cross-command note below + the audit CL-2 spec.
|
|
216
|
+
|
|
217
|
+
## Pipeline Pattern (Cross-Command Consistency)
|
|
218
|
+
|
|
219
|
+
Finding D7-M12 / D7-SA7.5-2: implementation-flavored orchestrators (`workflow`, `board-pickup`, `revision`, `quick-change`, `board-fill`) MUST follow the canonical pattern below. Per-command deviations require an explicit rationale in the command body's "Pipeline Deviations" subsection.
|
|
220
|
+
|
|
221
|
+
| Stage | Canonical agent | Required at Tier | Carve-out |
|
|
222
|
+
|-------|-----------------|------------------|-----------|
|
|
223
|
+
| Phase 1 Research | `hatch3r-researcher` | T2/T3 | T1 skip per Phase Skip Criteria |
|
|
224
|
+
| Phase 2 Implement | `hatch3r-implementer` | All | T1 quick-change inline carve-out only |
|
|
225
|
+
| Phase 3 Review Loop | `hatch3r-reviewer` ↔ `hatch3r-fixer` (max `DEFAULT_MAX_REVIEW_ITERATIONS`) | T2/T3 nontrivial | T1 all-trivial skip per Phase Skip Criteria |
|
|
226
|
+
| Phase 4 Final Quality | CQ + SSOT specialists, batched by severity, bounded by `max_phase4_parallel` | T2/T3 | T1 — only always-mode floor (`security` + `testability`) |
|
|
227
|
+
| Phase 4 Validation Pass | re-run tests/typecheck vs Phase-3 baseline; re-review on specialist code mutations | T2/T3 | — |
|
|
228
|
+
|
|
229
|
+
Cross-command error-handling defaults: sub-agent failure → retry once then fall back to direct/inline implementation per command's carve-out; quality-check failure → max 2 retry loops then ASK; context degradation → the single Context-Degradation Policy below (window-fraction primary: compress `>50%`, restart `>75%`; turn counts a coarse fallback). Concurrent-invocation handling and lockfile semantics are deferred to a future cycle pending the Decision 27 resumability work.
|
|
230
|
+
|
|
231
|
+
## Context-Degradation Policy
|
|
232
|
+
|
|
233
|
+
Single canonical policy for every pipeline command (reconciles the per-command turn bullets, Finding D7-24). **Window-fraction is the authoritative axis**; the per-command turn count is a coarse fallback for the same threshold at that command's pace, used only when the host surfaces no context-window percentage. Commands cite this policy, not restated numbers.
|
|
198
234
|
|
|
199
|
-
|
|
235
|
+
| Window fraction (primary) | Action | Turn-count fallback (coarse) |
|
|
236
|
+
|---------------------------|--------|------------------------------|
|
|
237
|
+
| `> 50%` | Compress: apply the numbered strategies below in order. | implementation/review ≈ 25 turns; quick-change ≈ 15 (fast-completion scope); debug ≈ 20 |
|
|
238
|
+
| `> 75%` | Restart: suggest a fresh chat / batch split carrying a progress summary of completed + remaining work; a fresh-context command (`hatch3r-revision`) just re-runs. | ≈ 1.5× the compress turn count |
|
|
200
239
|
|
|
201
240
|
1. **Summarize Phase 1 output.** Replace full research findings with a structured summary: affected files (list), blast radius (count + top 3), key conventions (bullet points). Keep raw data only for the fields the current phase needs.
|
|
202
241
|
2. **Prune resolved findings.** After Phase 3 review loop, remove findings that were fixed and confirmed. Only carry forward unresolved findings.
|
|
203
242
|
3. **Collapse specialist results.** In the final output, summarize specialist results as a single status table rather than including full specialist reports. Full reports are available on request.
|
|
204
243
|
4. **Never truncate security findings.** Security auditor output is always included in full regardless of context pressure.
|
|
205
244
|
|
|
206
|
-
|
|
245
|
+
**Handoff loss measurement.** Compression is lossy, so measure it. At each phase transition the orchestrator records a `PhaseHandoffMetrics` record (`src/pipeline/observability.ts::createPhaseHandoffMetrics`) capturing input bytes, output bytes, whether summarisation was applied, and an `informationLossEstimate` (0-1 fraction of input bytes dropped). When `informationLossEstimate` exceeds `0.3`, surface the `formatPhaseHandoffWarning` line in the iteration summary so downstream phases validate that critical context survived — closing the gap where a phase silently receives a summary when it needed the full upstream output.
|