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,8 +2,10 @@
|
|
|
2
2
|
id: hatch3r-container-hardening
|
|
3
3
|
type: rule
|
|
4
4
|
description: Container image hardening — digest pinning, distroless / Wolfi base, non-root user, SBOM-in-image, cosign signing + verification, multi-stage builds, CVE scanning
|
|
5
|
-
scope:
|
|
6
|
-
|
|
5
|
+
scope: conditional
|
|
6
|
+
globs: "**/Dockerfile*,**/docker-compose*,**/*.containerfile,**/charts/**,**/k8s/**,**/kubernetes/**,**/manifests/**"
|
|
7
|
+
tags: [devops, floor:security]
|
|
8
|
+
precedence: high
|
|
7
9
|
quality_charter: agents/shared/quality-charter.md
|
|
8
10
|
cache_friendly: true
|
|
9
11
|
---
|
|
@@ -50,6 +52,8 @@ Every image carries a CycloneDX 1.6 SBOM, generated at build time and either emb
|
|
|
50
52
|
|
|
51
53
|
## Image Signing — cosign
|
|
52
54
|
|
|
55
|
+
> Maturity tier: team+ — solo projects with no external consumers may defer signing. Cosign keyless + admission enforcement becomes mandatory once images are pulled by anyone outside the build pipeline.
|
|
56
|
+
|
|
53
57
|
Every image is signed with cosign keyless mode via OIDC. Sigstore Fulcio issues a short-lived signing certificate scoped to the workflow identity; Rekor records the signature for tamper-evident audit.
|
|
54
58
|
|
|
55
59
|
- Sign in CI: `cosign sign --yes <registry>/<image>@<digest>`. Workflow grants `id-token: write` permission; no long-lived signing key.
|
|
@@ -58,6 +62,8 @@ Every image is signed with cosign keyless mode via OIDC. Sigstore Fulcio issues
|
|
|
58
62
|
|
|
59
63
|
## CVE Scanning in CI
|
|
60
64
|
|
|
65
|
+
> Maturity tier: team+ — solo projects may run a single scanner ad hoc. Two-scanner CI gating with suppression lifecycle earns its cost once a team owns the release pipeline.
|
|
66
|
+
|
|
61
67
|
Two scanners are run per image build: `trivy` for breadth (Wolfi advisory database, OS+language deps) and `grype` for Chainguard parity. Release is blocked on unpatched Critical or High CVEs without a documented suppression record.
|
|
62
68
|
|
|
63
69
|
- `trivy image --severity HIGH,CRITICAL --exit-code 1 <image>:<tag>` fails the job on any High/Critical.
|
|
@@ -75,6 +81,8 @@ The same digest-not-tag rule extends beyond `FROM` lines to every place the imag
|
|
|
75
81
|
|
|
76
82
|
## Reproducible Builds
|
|
77
83
|
|
|
84
|
+
> Maturity tier: scaleup+ — team projects may defer the `repro-build` verification step until a compliance or supply-chain audit requests it. Solo and team projects still pin syntax + package versions; the digest-comparison gate is the scaleup add.
|
|
85
|
+
|
|
78
86
|
Build inputs are pinned so the same `git checkout` produces the same image digest.
|
|
79
87
|
|
|
80
88
|
- `# syntax=docker/dockerfile:1.<minor>.<patch>` — pin to a specific BuildKit syntax version.
|
|
@@ -109,6 +117,8 @@ Runtime image targets under 200 MB compressed. Builds exceeding 500 MB compresse
|
|
|
109
117
|
|
|
110
118
|
## Verification Gate at Release
|
|
111
119
|
|
|
120
|
+
> Maturity tier: team+ — solo projects may defer the full five-gate release block. The non-root + digest-pin gates remain mandatory at every tier; cosign verification, dual-scanner thresholds, and SBOM attachment fire once a team owns admission policy.
|
|
121
|
+
|
|
112
122
|
Every release pipeline executes the following gates before publish, all green:
|
|
113
123
|
|
|
114
124
|
- `cosign verify` against the workflow OIDC identity.
|
|
@@ -117,7 +127,7 @@ Every release pipeline executes the following gates before publish, all green:
|
|
|
117
127
|
- Pod spec runs as non-root (`runAsNonRoot: true`), read-only root filesystem, dropped capabilities.
|
|
118
128
|
- SBOM attached and downloadable via `cosign download sbom`.
|
|
119
129
|
|
|
120
|
-
Cross-reference `agents/hatch3r-security
|
|
130
|
+
Cross-reference `agents/hatch3r-security.md` (CQ3) for runtime security audit; `agents/hatch3r-devops.md` for delivery integration; `rules/hatch3r-secrets-management.md` for OIDC trust-policy conditions; `rules/hatch3r-dependency-management.md` for SBOM tooling and SLSA provenance.
|
|
121
131
|
|
|
122
132
|
## References
|
|
123
133
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
description: Container image hardening — digest pinning, distroless / Wolfi base, non-root user, SBOM-in-image, cosign signing + verification, multi-stage builds, CVE scanning
|
|
3
3
|
globs: ["**/Dockerfile*", "**/docker-compose*", "**/*.containerfile", "**/charts/**", "**/k8s/**", "**/kubernetes/**", "**/manifests/**"]
|
|
4
4
|
alwaysApply: false
|
|
5
|
+
precedence: high
|
|
5
6
|
---
|
|
6
7
|
# Container Hardening
|
|
7
8
|
|
|
@@ -46,6 +47,8 @@ Every image carries a CycloneDX 1.6 SBOM, generated at build time and either emb
|
|
|
46
47
|
|
|
47
48
|
## Image Signing — cosign
|
|
48
49
|
|
|
50
|
+
> Maturity tier: team+ — solo projects with no external consumers may defer signing. Cosign keyless + admission enforcement becomes mandatory once images are pulled by anyone outside the build pipeline.
|
|
51
|
+
|
|
49
52
|
Every image is signed with cosign keyless mode via OIDC. Sigstore Fulcio issues a short-lived signing certificate scoped to the workflow identity; Rekor records the signature for tamper-evident audit.
|
|
50
53
|
|
|
51
54
|
- Sign in CI: `cosign sign --yes <registry>/<image>@<digest>`. Workflow grants `id-token: write` permission; no long-lived signing key.
|
|
@@ -54,6 +57,8 @@ Every image is signed with cosign keyless mode via OIDC. Sigstore Fulcio issues
|
|
|
54
57
|
|
|
55
58
|
## CVE Scanning in CI
|
|
56
59
|
|
|
60
|
+
> Maturity tier: team+ — solo projects may run a single scanner ad hoc. Two-scanner CI gating with suppression lifecycle earns its cost once a team owns the release pipeline.
|
|
61
|
+
|
|
57
62
|
Two scanners are run per image build: `trivy` for breadth (Wolfi advisory database, OS+language deps) and `grype` for Chainguard parity. Release is blocked on unpatched Critical or High CVEs without a documented suppression record.
|
|
58
63
|
|
|
59
64
|
- `trivy image --severity HIGH,CRITICAL --exit-code 1 <image>:<tag>` fails the job on any High/Critical.
|
|
@@ -71,6 +76,8 @@ The same digest-not-tag rule extends beyond `FROM` lines to every place the imag
|
|
|
71
76
|
|
|
72
77
|
## Reproducible Builds
|
|
73
78
|
|
|
79
|
+
> Maturity tier: scaleup+ — team projects may defer the `repro-build` verification step until a compliance or supply-chain audit requests it. Solo and team projects still pin syntax + package versions; the digest-comparison gate is the scaleup add.
|
|
80
|
+
|
|
74
81
|
Build inputs are pinned so the same `git checkout` produces the same image digest.
|
|
75
82
|
|
|
76
83
|
- `# syntax=docker/dockerfile:1.<minor>.<patch>` — pin to a specific BuildKit syntax version.
|
|
@@ -105,6 +112,8 @@ Runtime image targets under 200 MB compressed. Builds exceeding 500 MB compresse
|
|
|
105
112
|
|
|
106
113
|
## Verification Gate at Release
|
|
107
114
|
|
|
115
|
+
> Maturity tier: team+ — solo projects may defer the full five-gate release block. The non-root + digest-pin gates remain mandatory at every tier; cosign verification, dual-scanner thresholds, and SBOM attachment fire once a team owns admission policy.
|
|
116
|
+
|
|
108
117
|
Every release pipeline executes the following gates before publish, all green:
|
|
109
118
|
|
|
110
119
|
- `cosign verify` against the workflow OIDC identity.
|
|
@@ -113,7 +122,7 @@ Every release pipeline executes the following gates before publish, all green:
|
|
|
113
122
|
- Pod spec runs as non-root (`runAsNonRoot: true`), read-only root filesystem, dropped capabilities.
|
|
114
123
|
- SBOM attached and downloadable via `cosign download sbom`.
|
|
115
124
|
|
|
116
|
-
Cross-reference `agents/hatch3r-security
|
|
125
|
+
Cross-reference `agents/hatch3r-security.md` (CQ3) for runtime security audit; `agents/hatch3r-devops.md` for delivery integration; `rules/hatch3r-secrets-management.md` for OIDC trust-policy conditions; `rules/hatch3r-dependency-management.md` for SBOM tooling and SLSA provenance.
|
|
117
126
|
|
|
118
127
|
## References
|
|
119
128
|
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
id: hatch3r-contract-testing
|
|
3
3
|
type: rule
|
|
4
4
|
description: Consumer-driven and spec-driven contract testing between services — Pact, Schemathesis, Dredd, pact-broker can-i-deploy gate
|
|
5
|
-
scope:
|
|
5
|
+
scope: conditional
|
|
6
|
+
globs: "**/contracts/**,**/pacts/**,**/api/**,**/openapi*,**/asyncapi*,**/*.proto,**/__tests__/contract/**"
|
|
6
7
|
tags: [review, implementation]
|
|
8
|
+
precedence: high
|
|
7
9
|
quality_charter: agents/shared/quality-charter.md
|
|
8
10
|
cache_friendly: true
|
|
9
11
|
---
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
description: Consumer-driven and spec-driven contract testing between services — Pact, Schemathesis, Dredd, pact-broker can-i-deploy gate
|
|
3
3
|
globs: ["**/contracts/**", "**/pacts/**", "**/api/**", "**/openapi*", "**/asyncapi*", "**/*.proto", "**/__tests__/contract/**"]
|
|
4
4
|
alwaysApply: false
|
|
5
|
+
precedence: high
|
|
5
6
|
---
|
|
6
7
|
# Contract Testing
|
|
7
8
|
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-cost-visibility
|
|
3
|
+
type: rule
|
|
4
|
+
description: Pre-execution cost estimate + post-execution actuals + delta surfacing in iteration summary. Every orchestrator command emits cost data.
|
|
5
|
+
tags: [cost, telemetry, observability, floor:content-quality]
|
|
6
|
+
precedence: high
|
|
7
|
+
scope: always
|
|
8
|
+
---
|
|
9
|
+
# hatch3r Cost Visibility
|
|
10
|
+
|
|
11
|
+
**Pillars:** P7 (Speed & Token Efficiency), P5 (Governance Self-Quality)
|
|
12
|
+
|
|
13
|
+
Source: the cost-visibility design decision and the cost-transparency principle (pillar P7; see `agents/shared/principles.md`).
|
|
14
|
+
|
|
15
|
+
Every orchestrator command (`commands/hatch3r-*.md` with `orchestrator: true`) and every meaningful skill run that mutates state MUST emit cost data — pre-execution estimate at plan time and post-execution actuals + delta at completion time. The delta lands in the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
|
|
16
|
+
|
|
17
|
+
## Pre-Execution Estimate
|
|
18
|
+
|
|
19
|
+
Emit at plan time, before fan-out begins:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
cost_estimate:
|
|
23
|
+
expected_sa_count: <int>
|
|
24
|
+
estimated_input_tokens_static_frame: <int>
|
|
25
|
+
estimated_web_research_queries: <int>
|
|
26
|
+
triage_tier: light | standard | deep
|
|
27
|
+
estimated_duration_min: <int>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Derived from:
|
|
31
|
+
|
|
32
|
+
- Frontmatter `sub_agents_spawned` declaration when present (static intent declared by the artifact).
|
|
33
|
+
- Triage-tier heuristics: Light = 1-3 SAs, Standard = 4-9 SAs, Deep = 10+ SAs.
|
|
34
|
+
- Past-cycle telemetry baseline from `src/pipeline/observability.ts` — phase-level `inputTokens` + `outputTokens` averaged across recent runs of the same artifact ID.
|
|
35
|
+
- Static-prompt frame character count divided by `CHARS_PER_TOKEN` (default 4) per `src/pipeline/observability.ts::estimateTokens`.
|
|
36
|
+
|
|
37
|
+
Triage tier maps directly to `triage_tiers` frontmatter declared per Decision 17 (CONSTITUTION §6 Decision #20 in 2.0.0 mapping) — the runtime-selected tier is the one emitted in the estimate block.
|
|
38
|
+
|
|
39
|
+
## Post-Execution Actuals
|
|
40
|
+
|
|
41
|
+
Emit at completion time, after the last sub-agent returns:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
cost_actuals:
|
|
45
|
+
actual_sa_count: <int>
|
|
46
|
+
actual_input_tokens: <int>
|
|
47
|
+
actual_output_tokens: <int>
|
|
48
|
+
actual_web_research_queries: <int>
|
|
49
|
+
actual_duration_min: <float>
|
|
50
|
+
delta:
|
|
51
|
+
sa_count_delta: <int>
|
|
52
|
+
input_tokens_delta_percent: <float>
|
|
53
|
+
duration_delta_percent: <float>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`sa_count_delta` is `actual_sa_count - expected_sa_count` (signed integer). `input_tokens_delta_percent` is `(actual - estimated) / estimated * 100` rounded to one decimal. `duration_delta_percent` follows the same formula on duration.
|
|
57
|
+
|
|
58
|
+
## Surfacing in Iteration Summary
|
|
59
|
+
|
|
60
|
+
Per `rules/hatch3r-iteration-summary.md` §2 Fan-out + Cost: both blocks appear in the iteration summary's Cost section. Deltas exceeding 25% (absolute value) flag for review — they signal under- or over-estimation patterns that the next cycle should investigate. The flag is informational, not a gate failure.
|
|
61
|
+
|
|
62
|
+
A run with no Cost section in its iteration summary fails the iteration-summary validation gate (`.claude/rules/capability-lifecycle.md` Gate Checklist).
|
|
63
|
+
|
|
64
|
+
### Worked Example
|
|
65
|
+
|
|
66
|
+
A Tier 2 capability-add run that spawns 5 sub-agents (1 researcher + 4 implementers) emits at plan time:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
cost_estimate:
|
|
70
|
+
expected_sa_count: 5
|
|
71
|
+
estimated_input_tokens_static_frame: 18000
|
|
72
|
+
estimated_web_research_queries: 2
|
|
73
|
+
triage_tier: standard
|
|
74
|
+
estimated_duration_min: 12
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
At completion (one extra implementer spawned due to scope expansion discovered mid-run, two extra web queries):
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
cost_actuals:
|
|
81
|
+
actual_sa_count: 6
|
|
82
|
+
actual_input_tokens: 22400
|
|
83
|
+
actual_output_tokens: 8900
|
|
84
|
+
actual_web_research_queries: 4
|
|
85
|
+
actual_duration_min: 15.3
|
|
86
|
+
delta:
|
|
87
|
+
sa_count_delta: 1
|
|
88
|
+
input_tokens_delta_percent: 24.4
|
|
89
|
+
duration_delta_percent: 27.5
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`duration_delta_percent` exceeds 25% — flagged informational for next-cycle EVOLVE review. `input_tokens_delta_percent` is 24.4% — under threshold, no flag.
|
|
93
|
+
|
|
94
|
+
## Source of Telemetry
|
|
95
|
+
|
|
96
|
+
`src/pipeline/observability.ts` records:
|
|
97
|
+
|
|
98
|
+
- Input + output tokens per LLM call via `createPhaseTokenEstimate` → `PhaseTokenEstimate`.
|
|
99
|
+
- Per-pipeline aggregation via `createTokenSummary` → `PipelineTokenSummary` (`totalInputTokens`, `totalOutputTokens`, `grandTotal`).
|
|
100
|
+
- Cost estimation via `estimateCost` → `CostEstimate` with `DEFAULT_INPUT_COST_PER_1M = 3.0` USD and `DEFAULT_OUTPUT_COST_PER_1M = 15.0` USD as default rates.
|
|
101
|
+
- Opt-in `EfficiencyEvent` JSONL telemetry via `recordEfficiencyEvent` (env-gated by `HATCH3R_EFFICIENCY_TELEMETRY=1`) — fields: `artifactId`, `phase`, `tokensIn`, `tokensOut`, `latencyMs`, `modelHint?`, `cacheHit?`.
|
|
102
|
+
- Sub-agent spawn count per orchestrator phase (consumed by `rules/hatch3r-agent-orchestration.md` Per-Turn Pipeline-State Header).
|
|
103
|
+
- Web research query count per cycle (incremented by adapter web-research integrations).
|
|
104
|
+
- Duration per phase via phase timeout instrumentation (`src/pipeline/phaseTimeout.ts`).
|
|
105
|
+
|
|
106
|
+
Implementation contract: `src/pipeline/costEstimator.ts` (to be authored under Bucket 2.3) consumes the baseline from past `EfficiencyEvent` records and emits `cost_estimate`; `src/pipeline/observability.ts` already provides the actuals primitives.
|
|
107
|
+
|
|
108
|
+
## End-User Visibility
|
|
109
|
+
|
|
110
|
+
Cost data appears in user-facing iteration summaries by default. Suppressing via the `--quiet` CLI flag still records telemetry to `.hatch3r/telemetry/<session-id>.json` for later review — the channel is preserved per the Silent Failure Contract (P5). Suppression at the user surface does not suppress at the persistence layer.
|
|
111
|
+
|
|
112
|
+
Telemetry I/O failures route through `src/pipeline/failureLog.ts` per the Silent Failure Contract — never silently swallowed.
|
|
113
|
+
|
|
114
|
+
## Acceptance Criteria
|
|
115
|
+
|
|
116
|
+
A change to a `commands/hatch3r-*.md` orchestrator or to a meaningful state-mutating skill satisfies this rule when ALL hold:
|
|
117
|
+
|
|
118
|
+
1. The artifact emits `cost_estimate` before the first sub-agent spawn.
|
|
119
|
+
2. The artifact emits `cost_actuals` + `delta` before declaring iteration-summary status.
|
|
120
|
+
3. The iteration summary's Fan-out + Cost section (per `rules/hatch3r-iteration-summary.md` §2) carries both blocks.
|
|
121
|
+
4. Telemetry persists to `.hatch3r/telemetry/<session-id>.json` even under `--quiet`.
|
|
122
|
+
5. Delta thresholds beyond 25% absolute value carry an explicit `flagged_for_review: true` annotation in the iteration summary.
|
|
123
|
+
|
|
124
|
+
## Emission-Rate Telemetry (current status: per-run gate only; cross-run rate not yet wired)
|
|
125
|
+
|
|
126
|
+
The acceptance criteria above are checked per run. They do NOT measure the cost-block emission rate across runs, and no automated cross-run measurement exists today.
|
|
127
|
+
|
|
128
|
+
The SPACE-shaped activity/performance instrumentation (`src/pipeline/spaceTelemetry.ts`) provides the recording primitive `recordSpaceMetric`, the in-process aggregator `getSpaceSummary`, and the across-runs reader `loadSpaceMetricsFromDisk`, but they are not invoked on the cost-visibility path: orchestrator commands and skills are LLM-interpreted markdown with no binding to compiled `src/`, and no command, skill, hook, or `src/` code emits a `costVisibilityEmitted` metric. The cross-run emission-rate loop is therefore unwired — a future capability, not a live measurement (origin: D10-SA10.8-F-6; gap corrected D10-18). The module records on the `activity` and `performance` axes only; its `satisfaction` and `communication` axes are reserved with no feeder, so "SPACE" names the data shape, not full five-axis coverage (D10-40).
|
|
129
|
+
|
|
130
|
+
To wire it, a host-runtime bridge (a Claude Code / Cursor / Copilot post-turn hook or an MCP shim) would need to call `recordSpaceMetric({ metricId: "costVisibilityEmitted", axis: "activity", value: <1 if both cost_estimate and cost_actuals were produced else 0> })` after each orchestrator/meaningful-skill turn, persisting one JSONL line per run to `.hatch3r/telemetry/space-<YYYY-MM-DD>.jsonl`; the audit cycle could then read the persisted JSONL across runs via `loadSpaceMetricsFromDisk` + `summarizeSpaceMetricRecords` (NOT `getSpaceSummary`, which sees only the current process's ring buffer) to check the 100% cost-visibility emission target against observed runs instead of only mandating it. `recordSpaceMetric` already routes I/O failures through `src/pipeline/failureLog.ts` and never throws (Silent Failure Contract), so building the bridge adds no failure surface. Until that bridge ships, cost-visibility compliance is enforced by the per-run acceptance criteria above plus audit-cycle spot checks, not by an aggregate metric.
|
|
131
|
+
|
|
132
|
+
## Pillar Service
|
|
133
|
+
|
|
134
|
+
- **P7** — surfaces token + duration measurements to the user; closes the loop on the P7 token-economy goal. Estimation accuracy improves cycle-over-cycle via the past-cycle telemetry baseline.
|
|
135
|
+
- **P5** — every orchestrator measures itself; deltas become first-class governance signals consumed by the governance evolve-cycle.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-cost-visibility
|
|
3
|
+
type: rule
|
|
4
|
+
description: Pre-execution cost estimate + post-execution actuals + delta surfacing in iteration summary. Every orchestrator command emits cost data.
|
|
5
|
+
tags: [cost, telemetry, observability, floor:content-quality]
|
|
6
|
+
precedence: high
|
|
7
|
+
alwaysApply: true
|
|
8
|
+
---
|
|
9
|
+
# hatch3r Cost Visibility
|
|
10
|
+
|
|
11
|
+
**Pillars:** P7 (Speed & Token Efficiency), P5 (Governance Self-Quality)
|
|
12
|
+
|
|
13
|
+
Source: the cost-visibility design decision and the cost-transparency principle (pillar P7; see `agents/shared/principles.md`).
|
|
14
|
+
|
|
15
|
+
Every orchestrator command (`commands/hatch3r-*.md` with `orchestrator: true`) and every meaningful skill run that mutates state MUST emit cost data — pre-execution estimate at plan time and post-execution actuals + delta at completion time. The delta lands in the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
|
|
16
|
+
|
|
17
|
+
## Pre-Execution Estimate
|
|
18
|
+
|
|
19
|
+
Emit at plan time, before fan-out begins:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
cost_estimate:
|
|
23
|
+
expected_sa_count: <int>
|
|
24
|
+
estimated_input_tokens_static_frame: <int>
|
|
25
|
+
estimated_web_research_queries: <int>
|
|
26
|
+
triage_tier: light | standard | deep
|
|
27
|
+
estimated_duration_min: <int>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Derived from:
|
|
31
|
+
|
|
32
|
+
- Frontmatter `sub_agents_spawned` declaration when present (static intent declared by the artifact).
|
|
33
|
+
- Triage-tier heuristics: Light = 1-3 SAs, Standard = 4-9 SAs, Deep = 10+ SAs.
|
|
34
|
+
- Past-cycle telemetry baseline from `src/pipeline/observability.ts` — phase-level `inputTokens` + `outputTokens` averaged across recent runs of the same artifact ID.
|
|
35
|
+
- Static-prompt frame character count divided by `CHARS_PER_TOKEN` (default 4) per `src/pipeline/observability.ts::estimateTokens`.
|
|
36
|
+
|
|
37
|
+
Triage tier maps directly to `triage_tiers` frontmatter declared per Decision 17 (CONSTITUTION §6 Decision #20 in 2.0.0 mapping) — the runtime-selected tier is the one emitted in the estimate block.
|
|
38
|
+
|
|
39
|
+
## Post-Execution Actuals
|
|
40
|
+
|
|
41
|
+
Emit at completion time, after the last sub-agent returns:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
cost_actuals:
|
|
45
|
+
actual_sa_count: <int>
|
|
46
|
+
actual_input_tokens: <int>
|
|
47
|
+
actual_output_tokens: <int>
|
|
48
|
+
actual_web_research_queries: <int>
|
|
49
|
+
actual_duration_min: <float>
|
|
50
|
+
delta:
|
|
51
|
+
sa_count_delta: <int>
|
|
52
|
+
input_tokens_delta_percent: <float>
|
|
53
|
+
duration_delta_percent: <float>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`sa_count_delta` is `actual_sa_count - expected_sa_count` (signed integer). `input_tokens_delta_percent` is `(actual - estimated) / estimated * 100` rounded to one decimal. `duration_delta_percent` follows the same formula on duration.
|
|
57
|
+
|
|
58
|
+
## Surfacing in Iteration Summary
|
|
59
|
+
|
|
60
|
+
Per `rules/hatch3r-iteration-summary.md` §2 Fan-out + Cost: both blocks appear in the iteration summary's Cost section. Deltas exceeding 25% (absolute value) flag for review — they signal under- or over-estimation patterns that the next cycle should investigate. The flag is informational, not a gate failure.
|
|
61
|
+
|
|
62
|
+
A run with no Cost section in its iteration summary fails the iteration-summary validation gate (`.claude/rules/capability-lifecycle.md` Gate Checklist).
|
|
63
|
+
|
|
64
|
+
### Worked Example
|
|
65
|
+
|
|
66
|
+
A Tier 2 capability-add run that spawns 5 sub-agents (1 researcher + 4 implementers) emits at plan time:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
cost_estimate:
|
|
70
|
+
expected_sa_count: 5
|
|
71
|
+
estimated_input_tokens_static_frame: 18000
|
|
72
|
+
estimated_web_research_queries: 2
|
|
73
|
+
triage_tier: standard
|
|
74
|
+
estimated_duration_min: 12
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
At completion (one extra implementer spawned due to scope expansion discovered mid-run, two extra web queries):
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
cost_actuals:
|
|
81
|
+
actual_sa_count: 6
|
|
82
|
+
actual_input_tokens: 22400
|
|
83
|
+
actual_output_tokens: 8900
|
|
84
|
+
actual_web_research_queries: 4
|
|
85
|
+
actual_duration_min: 15.3
|
|
86
|
+
delta:
|
|
87
|
+
sa_count_delta: 1
|
|
88
|
+
input_tokens_delta_percent: 24.4
|
|
89
|
+
duration_delta_percent: 27.5
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`duration_delta_percent` exceeds 25% — flagged informational for next-cycle EVOLVE review. `input_tokens_delta_percent` is 24.4% — under threshold, no flag.
|
|
93
|
+
|
|
94
|
+
## Source of Telemetry
|
|
95
|
+
|
|
96
|
+
`src/pipeline/observability.ts` records:
|
|
97
|
+
|
|
98
|
+
- Input + output tokens per LLM call via `createPhaseTokenEstimate` → `PhaseTokenEstimate`.
|
|
99
|
+
- Per-pipeline aggregation via `createTokenSummary` → `PipelineTokenSummary` (`totalInputTokens`, `totalOutputTokens`, `grandTotal`).
|
|
100
|
+
- Cost estimation via `estimateCost` → `CostEstimate` with `DEFAULT_INPUT_COST_PER_1M = 3.0` USD and `DEFAULT_OUTPUT_COST_PER_1M = 15.0` USD as default rates.
|
|
101
|
+
- Opt-in `EfficiencyEvent` JSONL telemetry via `recordEfficiencyEvent` (env-gated by `HATCH3R_EFFICIENCY_TELEMETRY=1`) — fields: `artifactId`, `phase`, `tokensIn`, `tokensOut`, `latencyMs`, `modelHint?`, `cacheHit?`.
|
|
102
|
+
- Sub-agent spawn count per orchestrator phase (consumed by `rules/hatch3r-agent-orchestration.md` Per-Turn Pipeline-State Header).
|
|
103
|
+
- Web research query count per cycle (incremented by adapter web-research integrations).
|
|
104
|
+
- Duration per phase via phase timeout instrumentation (`src/pipeline/phaseTimeout.ts`).
|
|
105
|
+
|
|
106
|
+
Implementation contract: `src/pipeline/costEstimator.ts` (to be authored under Bucket 2.3) consumes the baseline from past `EfficiencyEvent` records and emits `cost_estimate`; `src/pipeline/observability.ts` already provides the actuals primitives.
|
|
107
|
+
|
|
108
|
+
## End-User Visibility
|
|
109
|
+
|
|
110
|
+
Cost data appears in user-facing iteration summaries by default. Suppressing via the `--quiet` CLI flag still records telemetry to `.hatch3r/telemetry/<session-id>.json` for later review — the channel is preserved per the Silent Failure Contract (P5). Suppression at the user surface does not suppress at the persistence layer.
|
|
111
|
+
|
|
112
|
+
Telemetry I/O failures route through `src/pipeline/failureLog.ts` per the Silent Failure Contract — never silently swallowed.
|
|
113
|
+
|
|
114
|
+
## Acceptance Criteria
|
|
115
|
+
|
|
116
|
+
A change to a `commands/hatch3r-*.md` orchestrator or to a meaningful state-mutating skill satisfies this rule when ALL hold:
|
|
117
|
+
|
|
118
|
+
1. The artifact emits `cost_estimate` before the first sub-agent spawn.
|
|
119
|
+
2. The artifact emits `cost_actuals` + `delta` before declaring iteration-summary status.
|
|
120
|
+
3. The iteration summary's Fan-out + Cost section (per `rules/hatch3r-iteration-summary.md` §2) carries both blocks.
|
|
121
|
+
4. Telemetry persists to `.hatch3r/telemetry/<session-id>.json` even under `--quiet`.
|
|
122
|
+
5. Delta thresholds beyond 25% absolute value carry an explicit `flagged_for_review: true` annotation in the iteration summary.
|
|
123
|
+
|
|
124
|
+
## Emission-Rate Telemetry (current status: per-run gate only; cross-run rate not yet wired)
|
|
125
|
+
|
|
126
|
+
The acceptance criteria above are checked per run. They do NOT measure the cost-block emission rate across runs, and no automated cross-run measurement exists today.
|
|
127
|
+
|
|
128
|
+
The SPACE-shaped activity/performance instrumentation (`src/pipeline/spaceTelemetry.ts`) provides the recording primitive `recordSpaceMetric`, the in-process aggregator `getSpaceSummary`, and the across-runs reader `loadSpaceMetricsFromDisk`, but they are not invoked on the cost-visibility path: orchestrator commands and skills are LLM-interpreted markdown with no binding to compiled `src/`, and no command, skill, hook, or `src/` code emits a `costVisibilityEmitted` metric. The cross-run emission-rate loop is therefore unwired — a future capability, not a live measurement (origin: D10-SA10.8-F-6; gap corrected D10-18). The module records on the `activity` and `performance` axes only; its `satisfaction` and `communication` axes are reserved with no feeder, so "SPACE" names the data shape, not full five-axis coverage (D10-40).
|
|
129
|
+
|
|
130
|
+
To wire it, a host-runtime bridge (a Claude Code / Cursor / Copilot post-turn hook or an MCP shim) would need to call `recordSpaceMetric({ metricId: "costVisibilityEmitted", axis: "activity", value: <1 if both cost_estimate and cost_actuals were produced else 0> })` after each orchestrator/meaningful-skill turn, persisting one JSONL line per run to `.hatch3r/telemetry/space-<YYYY-MM-DD>.jsonl`; the audit cycle could then read the persisted JSONL across runs via `loadSpaceMetricsFromDisk` + `summarizeSpaceMetricRecords` (NOT `getSpaceSummary`, which sees only the current process's ring buffer) to check the 100% cost-visibility emission target against observed runs instead of only mandating it. `recordSpaceMetric` already routes I/O failures through `src/pipeline/failureLog.ts` and never throws (Silent Failure Contract), so building the bridge adds no failure surface. Until that bridge ships, cost-visibility compliance is enforced by the per-run acceptance criteria above plus audit-cycle spot checks, not by an aggregate metric.
|
|
131
|
+
|
|
132
|
+
## Pillar Service
|
|
133
|
+
|
|
134
|
+
- **P7** — surfaces token + duration measurements to the user; closes the loop on the P7 token-economy goal. Estimation accuracy improves cycle-over-cycle via the past-cycle telemetry baseline.
|
|
135
|
+
- **P5** — every orchestrator measures itself; deltas become first-class governance signals consumed by the governance evolve-cycle.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-cq-rule-frame
|
|
3
|
+
type: rule
|
|
4
|
+
description: Shared output frame for the CQ measurement rules — the per-finding rigor-field schema and the Specialist-Status to canonical-severity map cited by hatch3r-{security,testability,scalability,maintainability,enhancability}
|
|
5
|
+
scope: conditional
|
|
6
|
+
globs: "src/**,**/__tests__/**,**/handlers/**,**/routes/**,**/services/**,**/api/**,**/migrations/**,**/openapi.yaml,**/openapi.json,**/*.proto,**/schema.graphql,**/asyncapi.yaml"
|
|
7
|
+
tags: [review, floor:content-quality]
|
|
8
|
+
precedence: high
|
|
9
|
+
quality_charter: agents/shared/quality-charter.md
|
|
10
|
+
cache_friendly: true
|
|
11
|
+
---
|
|
12
|
+
# CQ Rule Frame
|
|
13
|
+
|
|
14
|
+
**Pillars:** P4 (Comprehensive Lean Coverage), P7 (Speed & Token Efficiency)
|
|
15
|
+
|
|
16
|
+
## Scope
|
|
17
|
+
|
|
18
|
+
This rule is the single source of two blocks that every CQ measurement rule emits: the per-finding rigor-field schema and the Specialist-Status to canonical-severity map. It is consumed by the CQ vector rules:
|
|
19
|
+
|
|
20
|
+
- `rules/hatch3r-security.md` (CQ3)
|
|
21
|
+
- `rules/hatch3r-testability.md` (CQ5)
|
|
22
|
+
- `rules/hatch3r-scalability.md` (CQ6)
|
|
23
|
+
- `rules/hatch3r-maintainability.md` (CQ8)
|
|
24
|
+
- `rules/hatch3r-enhancability.md` (CQ9)
|
|
25
|
+
|
|
26
|
+
Each consuming rule cites this file for both blocks and adds only its rule-specific Action list (the Status-to-Action consequences that differ per CQ vector). The upstream canonical vocabulary owner is `agents/shared/severity-mapping.md` — this file restates only the 3-row Specialist-Status subset that the CQ rules share, parameterized by CQ vector.
|
|
27
|
+
|
|
28
|
+
## Per-Finding Output Format
|
|
29
|
+
|
|
30
|
+
Every finding emitted under a CQ measurement rule MUST include the rigor-contract fields per `agents/shared/rigor-contract.md`. `<N>` is the consuming rule's CQ number (3, 5, 6, 8, or 9); the proof-trace artifact named in the first field is the consuming rule's measurement surface (file, test file, handler, or spec diff):
|
|
31
|
+
|
|
32
|
+
- `proof_trace`: file:line citation + the consuming rule's measurement-output excerpt (command, runner, jscpd/oasdiff/buf-breaking, or spec-diff/grep).
|
|
33
|
+
- `impact_horizon`: short | medium | long per CONSTITUTION Decision 17.
|
|
34
|
+
- `progress_toward_pillar: content-quality.CQ<N>+<delta>`: numeric delta against the threshold (e.g. `+0.05` for a 5% step toward the consuming rule's target).
|
|
35
|
+
- `confidence`: high | medium | low with explicit basis.
|
|
36
|
+
- `causal_chain`: ≥3-step linkage from observation → root cause → impact.
|
|
37
|
+
|
|
38
|
+
## Specialist-Status to Canonical-Severity Map
|
|
39
|
+
|
|
40
|
+
Specialist status maps to canonical audit severity per `agents/shared/severity-mapping.md` (the canonical mapping owner). The 3-row subset the CQ rules share:
|
|
41
|
+
|
|
42
|
+
| Specialist Status | Canonical Severity |
|
|
43
|
+
|-------------------|--------------------|
|
|
44
|
+
| `CRITICAL` | Critical |
|
|
45
|
+
| `FINDINGS` | High + Medium |
|
|
46
|
+
| `PASS` | Low + Info |
|
|
47
|
+
|
|
48
|
+
The Action column is rule-specific and stays in each consuming rule's Severity Mapping section: the consuming rule lists, per Specialist Status row, the merge/release consequence for its CQ vector (block-release triggers, block-merge triggers, iteration-summary surfacing).
|
|
49
|
+
|
|
50
|
+
## References
|
|
51
|
+
|
|
52
|
+
- `agents/shared/severity-mapping.md` (canonical severity-vocabulary owner — 6-column map + Specialist Status column).
|
|
53
|
+
- `agents/shared/rigor-contract.md` (the rigor-field definitions referenced by the output format).
|
|
54
|
+
- `rules/hatch3r-security.md`, `rules/hatch3r-testability.md`, `rules/hatch3r-scalability.md`, `rules/hatch3r-maintainability.md`, `rules/hatch3r-enhancability.md` (the 5 consuming CQ rules).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Shared output frame for the CQ measurement rules — the per-finding rigor-field schema and the Specialist-Status to canonical-severity map cited by hatch3r-{security,testability,scalability,maintainability,enhancability}
|
|
3
|
+
globs: ["src/**", "**/__tests__/**", "**/handlers/**", "**/routes/**", "**/services/**", "**/api/**", "**/migrations/**", "**/openapi.yaml", "**/openapi.json", "**/*.proto", "**/schema.graphql", "**/asyncapi.yaml"]
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
precedence: high
|
|
6
|
+
---
|
|
7
|
+
# CQ Rule Frame
|
|
8
|
+
|
|
9
|
+
**Pillars:** P4 (Comprehensive Lean Coverage), P7 (Speed & Token Efficiency)
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
This rule is the single source of two blocks that every CQ measurement rule emits: the per-finding rigor-field schema and the Specialist-Status to canonical-severity map. It is consumed by the CQ vector rules:
|
|
14
|
+
|
|
15
|
+
- `rules/hatch3r-security.md` (CQ3)
|
|
16
|
+
- `rules/hatch3r-testability.md` (CQ5)
|
|
17
|
+
- `rules/hatch3r-scalability.md` (CQ6)
|
|
18
|
+
- `rules/hatch3r-maintainability.md` (CQ8)
|
|
19
|
+
- `rules/hatch3r-enhancability.md` (CQ9)
|
|
20
|
+
|
|
21
|
+
Each consuming rule cites this file for both blocks and adds only its rule-specific Action list (the Status-to-Action consequences that differ per CQ vector). The upstream canonical vocabulary owner is `agents/shared/severity-mapping.md` — this file restates only the 3-row Specialist-Status subset that the CQ rules share, parameterized by CQ vector.
|
|
22
|
+
|
|
23
|
+
## Per-Finding Output Format
|
|
24
|
+
|
|
25
|
+
Every finding emitted under a CQ measurement rule MUST include the rigor-contract fields per `agents/shared/rigor-contract.md`. `<N>` is the consuming rule's CQ number (3, 5, 6, 8, or 9); the proof-trace artifact named in the first field is the consuming rule's measurement surface (file, test file, handler, or spec diff):
|
|
26
|
+
|
|
27
|
+
- `proof_trace`: file:line citation + the consuming rule's measurement-output excerpt (command, runner, jscpd/oasdiff/buf-breaking, or spec-diff/grep).
|
|
28
|
+
- `impact_horizon`: short | medium | long per CONSTITUTION Decision 17.
|
|
29
|
+
- `progress_toward_pillar: content-quality.CQ<N>+<delta>`: numeric delta against the threshold (e.g. `+0.05` for a 5% step toward the consuming rule's target).
|
|
30
|
+
- `confidence`: high | medium | low with explicit basis.
|
|
31
|
+
- `causal_chain`: ≥3-step linkage from observation → root cause → impact.
|
|
32
|
+
|
|
33
|
+
## Specialist-Status to Canonical-Severity Map
|
|
34
|
+
|
|
35
|
+
Specialist status maps to canonical audit severity per `agents/shared/severity-mapping.md` (the canonical mapping owner). The 3-row subset the CQ rules share:
|
|
36
|
+
|
|
37
|
+
| Specialist Status | Canonical Severity |
|
|
38
|
+
|-------------------|--------------------|
|
|
39
|
+
| `CRITICAL` | Critical |
|
|
40
|
+
| `FINDINGS` | High + Medium |
|
|
41
|
+
| `PASS` | Low + Info |
|
|
42
|
+
|
|
43
|
+
The Action column is rule-specific and stays in each consuming rule's Severity Mapping section: the consuming rule lists, per Specialist Status row, the merge/release consequence for its CQ vector (block-release triggers, block-merge triggers, iteration-summary surfacing).
|
|
44
|
+
|
|
45
|
+
## References
|
|
46
|
+
|
|
47
|
+
- `agents/shared/severity-mapping.md` (canonical severity-vocabulary owner — 6-column map + Specialist Status column).
|
|
48
|
+
- `agents/shared/rigor-contract.md` (the rigor-field definitions referenced by the output format).
|
|
49
|
+
- `rules/hatch3r-security.md`, `rules/hatch3r-testability.md`, `rules/hatch3r-scalability.md`, `rules/hatch3r-maintainability.md`, `rules/hatch3r-enhancability.md` (the 5 consuming CQ rules).
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
id: hatch3r-data-classification
|
|
3
3
|
type: rule
|
|
4
4
|
description: Data classification standards covering PII handling, encryption, retention policies, and regulatory compliance
|
|
5
|
-
scope:
|
|
6
|
-
|
|
5
|
+
scope: conditional
|
|
6
|
+
globs: "**/models/**,**/schemas/**,**/schema*,**/database/**,**/db/**,**/*model*,**/*entity*,**/prisma/**,**/drizzle/**,**/*migration*,**/log*,**/*logger*,**/analytics/**,**/*analytics*,**/events/**,**/*telemetry*,**/export*,**/*export*"
|
|
7
|
+
tags: [floor:security]
|
|
8
|
+
precedence: high
|
|
7
9
|
quality_charter: agents/shared/quality-charter.md
|
|
8
10
|
cache_friendly: true
|
|
9
11
|
---
|
|
@@ -26,6 +28,7 @@ cache_friendly: true
|
|
|
26
28
|
- Never log PII. Use structured logging with PII fields explicitly excluded or masked.
|
|
27
29
|
- Pseudonymize PII in analytics and reporting. Use irreversible hashing for identifiers.
|
|
28
30
|
- Provide data export and deletion endpoints for data subject requests (GDPR Article 15/17, CCPA).
|
|
31
|
+
- This rule's PII review applies wherever PII can leave the data model — not just schemas and migrations, but log statements, loggers, analytics/telemetry emitters, event payloads, and export paths. Before merging a change to any of these surfaces, confirm no Level 3+ field is logged, emitted, or exported unmasked.
|
|
29
32
|
|
|
30
33
|
## Encryption
|
|
31
34
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Data classification standards covering PII handling, encryption, retention policies, and regulatory compliance
|
|
3
|
-
globs: ["**/models/**", "**/schemas/**", "**/schema*", "**/database/**", "**/db/**", "**/*model*", "**/*entity*", "**/prisma/**", "**/drizzle/**", "**/*migration*"]
|
|
3
|
+
globs: ["**/models/**", "**/schemas/**", "**/schema*", "**/database/**", "**/db/**", "**/*model*", "**/*entity*", "**/prisma/**", "**/drizzle/**", "**/*migration*", "**/log*", "**/*logger*", "**/analytics/**", "**/*analytics*", "**/events/**", "**/*telemetry*", "**/export*", "**/*export*"]
|
|
4
4
|
alwaysApply: false
|
|
5
|
+
precedence: high
|
|
5
6
|
---
|
|
6
7
|
# Data Classification Standards
|
|
7
8
|
|
|
@@ -22,6 +23,7 @@ alwaysApply: false
|
|
|
22
23
|
- Never log PII. Use structured logging with PII fields explicitly excluded or masked.
|
|
23
24
|
- Pseudonymize PII in analytics and reporting. Use irreversible hashing for identifiers.
|
|
24
25
|
- Provide data export and deletion endpoints for data subject requests (GDPR Article 15/17, CCPA).
|
|
26
|
+
- This rule's PII review applies wherever PII can leave the data model — not just schemas and migrations, but log statements, loggers, analytics/telemetry emitters, event payloads, and export paths. Before merging a change to any of these surfaces, confirm no Level 3+ field is logged, emitted, or exported unmasked.
|
|
25
27
|
|
|
26
28
|
## Encryption
|
|
27
29
|
|
|
@@ -3,12 +3,15 @@ id: hatch3r-deep-context
|
|
|
3
3
|
type: rule
|
|
4
4
|
description: Adaptive pre-implementation analysis — complexity scoring, requirements elicitation, similar implementation discovery, and transitive dependency tracing before coding
|
|
5
5
|
scope: always
|
|
6
|
-
tags: [
|
|
6
|
+
tags: [orchestration, floor:protocol]
|
|
7
|
+
precedence: high
|
|
7
8
|
quality_charter: agents/shared/quality-charter.md
|
|
8
9
|
cache_friendly: true
|
|
9
10
|
---
|
|
10
11
|
# Deep Context Analysis
|
|
11
12
|
|
|
13
|
+
**Pillars:** P2 (Scientific & Practical Quality), P7 (Speed & Token Efficiency)
|
|
14
|
+
|
|
12
15
|
Before implementing any non-trivial task, assess its complexity and run proportional pre-implementation analysis. This rule ensures the agent asks the right questions, discovers existing patterns to follow, and maps the full blast radius before writing code.
|
|
13
16
|
|
|
14
17
|
## Complexity Scoring
|
|
@@ -28,11 +31,13 @@ Score every task against these signals before implementation. Each signal adds w
|
|
|
28
31
|
|
|
29
32
|
### Tier Assignment
|
|
30
33
|
|
|
31
|
-
| Total Weight | Tier | Label |
|
|
32
|
-
|
|
33
|
-
| 0–2 | 1 | Light |
|
|
34
|
-
| 3–5 | 2 | Standard |
|
|
35
|
-
| 6+ | 3 | Deep |
|
|
34
|
+
| Total Weight | Tier | Label | Model Class (per-adapter) |
|
|
35
|
+
|-------------|------|-------|---------------------------|
|
|
36
|
+
| 0–2 | 1 | Light | economy |
|
|
37
|
+
| 3–5 | 2 | Standard | default |
|
|
38
|
+
| 6+ | 3 | Deep | strongest |
|
|
39
|
+
|
|
40
|
+
The **Model Class** column is an abstract effort lever: tier scales the model class the same way it scales researcher depth (`quick`/`deep`) and Phase 4 specialist depth — `economy` for cheap mechanical changes, `default` for routine multi-file work, `strongest` for high-blast-radius reasoning. It is a hint resolved per-adapter against that adapter's model map (`src/models/resolve.ts::resolveAgentModel`, `models.default`), not a literal model id — adapters with no model-routing surface ignore it. Model class is a first-order effort lever alongside depth (`hatch3r-agent-orchestration` -> Tier-to-Phase-4 specialist depth mapping).
|
|
36
41
|
|
|
37
42
|
## Tier Actions
|
|
38
43
|
|
|
@@ -93,24 +98,19 @@ This rule augments — not replaces — the existing Universal Sub-Agent Pipelin
|
|
|
93
98
|
|
|
94
99
|
## Scoring Examples
|
|
95
100
|
|
|
96
|
-
|
|
101
|
+
Worked examples that reconcile signals to a tier (only firing signals listed):
|
|
97
102
|
|
|
98
103
|
**Example 1: "Fix typo in error message" -- Tier 1 (score 0)**
|
|
99
104
|
No signals triggered. Single file, no cross-module impact, no ambiguity.
|
|
100
105
|
|
|
101
106
|
**Example 2: "Add email validation to signup form" -- Tier 2 (score 4)**
|
|
102
107
|
- Multiple layers touched (API + UI): +3
|
|
103
|
-
- Estimated 2-3 files: +0
|
|
104
|
-
- Input validation is security-adjacent but not in a security-sensitive area: +0
|
|
105
|
-
- Clear requirements ("validate email format"): +0
|
|
106
108
|
- May trigger cross-cutting i18n for error messages: +1 (partial cross-cutting)
|
|
109
|
+
- 2-3 files, clear requirements, input validation not in a security-sensitive area: +0 each
|
|
107
110
|
|
|
108
111
|
**Example 3: "Migrate auth from session-based to JWT" -- Tier 3 (score 12)**
|
|
109
112
|
- Multiple layers (auth middleware + API + UI + storage): +3
|
|
110
|
-
- Vague term "migrate" (
|
|
111
|
-
- Cross-cutting auth concern: +2
|
|
112
|
-
- Security-sensitive area: +2
|
|
113
|
-
- Behavioral contract change (session API to JWT API): +2
|
|
113
|
+
- Vague term "migrate", cross-cutting auth, security-sensitive area, behavioral contract change (session API to JWT API): +2 each
|
|
114
114
|
- Estimated >5 files: +1 (partial -- easily >5)
|
|
115
115
|
|
|
116
116
|
When a signal partially applies (e.g., "maybe 5 files, maybe 4"), round down. Tier upgrades from adaptation (see `hatch3r-agent-orchestration-detail`) compensate for underestimates.
|