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
|
@@ -10,9 +10,13 @@ cache_friendly: true
|
|
|
10
10
|
|
|
11
11
|
Canonical reference for the body and frontmatter shapes `hatch3r-creator` produces when a user invokes `/hatch3r-create`. Five sections, one per artifact type. Each provides the minimum frontmatter (YAML), a body skeleton with `<PLACEHOLDER>` substitution slots, and notes on required versus optional fields. Placeholder convention: `<NAME>` is replaced at composition time; `[<TAG-1>, <TAG-2>]` indicates an array.
|
|
12
12
|
|
|
13
|
+
The `type` field appears in the Required list and skeleton of all five sections, but the author never sets it by hand: `composeArtifactFile` (`src/content/userContent.ts`) re-pins `derived.type = artifact.type` from the type branch the user already selected at Step 1.1, so a user-supplied value is authoritatively overridden. It is listed as Required because every on-disk artifact carries it, not because the user types it (D20-SA20.1-F20.1.C1).
|
|
14
|
+
|
|
13
15
|
### 1. Agent Skeleton
|
|
14
16
|
|
|
15
|
-
**Path:** `.
|
|
17
|
+
**Path:** `.hatch3r/overrides/agents/<NAME>.md`. **Required:** `id`, `type`, `description`, `model`, `tags`. **Optional:** `protected` (always `false` for user agents), `quality_charter` (auto-injected), `adapters` (restricts adapter propagation when present), `tools` (per-agent allow/deny allowlist — when `tools.allow` cardinality exceeds 3, a **Security baseline:** body reference is required, see below).
|
|
18
|
+
|
|
19
|
+
**Security baseline (tool-grant inheritance).** A user agent that grants more than 3 tools in `tools.allow` MUST cite `rules/hatch3r-security-patterns.md` in a `**Security baseline:**` body line and inherit its deny-by-default posture (no unscoped `Bash`, no destructive subcommands, secrets via `${env:VAR}` only). `hatch3r-creator` surfaces a gentle warning when a wide `tools.allow` ships without this citation; at maturity tier `team`/`scaleup`/`enterprise` the warning is promoted to a strict gate per F20.2.A1's tier-aware floor (gate path: `src/content/userContent.ts`). Without this slot a broad tool grant is an unbounded-grant risk (audit Cycle 10 F20.2.A3).
|
|
16
20
|
|
|
17
21
|
```yaml
|
|
18
22
|
---
|
|
@@ -21,15 +25,21 @@ type: agent
|
|
|
21
25
|
description: <DESCRIPTION>
|
|
22
26
|
model: <MODEL>
|
|
23
27
|
tags: [<TAG-1>, <TAG-2>]
|
|
28
|
+
pillars: [<P1-OR-CQ1-PILLAR-ID>]
|
|
24
29
|
quality_charter: agents/shared/quality-charter.md
|
|
25
30
|
---
|
|
26
31
|
```
|
|
27
32
|
|
|
33
|
+
The `pillars:` array carries the governance-axis (P1–P8) or content-quality-axis (CQ1–CQ9) ids the artifact serves. Required by the strict pillar-declaration gate in `runUserContentGates` (`src/content/userContent.ts`); omit the field only if the body carries a `**Pillars:**` line instead. Values outside the P1–P8 ∪ CQ1–CQ9 union are rejected at save time (`validateStructuredPillars`).
|
|
34
|
+
|
|
28
35
|
```markdown
|
|
29
36
|
You are <ROLE-STATEMENT> for the project. You receive <INPUT-SUMMARY> and produce <OUTPUT-SUMMARY>.
|
|
30
37
|
|
|
31
38
|
Prompt structure follows `agents/shared/prompt-structure.md` — `<task>`, `<context>`, `<rules>` tags wrap role, runtime state, and constraints.
|
|
32
39
|
|
|
40
|
+
## §0 Detect Ambiguity (P8 B1)
|
|
41
|
+
Before any action, scan the request for unresolved scope, target, irreversibility, or constraint conflicts. If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` before proceeding — default path, not exception. Proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable.
|
|
42
|
+
|
|
33
43
|
<task>
|
|
34
44
|
## Your Role
|
|
35
45
|
- <BULLET-1>
|
|
@@ -54,10 +64,11 @@ Prompt structure follows `agents/shared/prompt-structure.md` — `<task>`, `<con
|
|
|
54
64
|
## Boundaries
|
|
55
65
|
- **Always:** <ALWAYS-1>
|
|
56
66
|
- **Never:** <NEVER-1>
|
|
67
|
+
- **Security baseline:** inherits `rules/hatch3r-security-patterns.md` (deny-by-default tools, no destructive subcommands, secrets via `${env:VAR}`). Required line when `tools.allow` grants more than 3 tools.
|
|
57
68
|
</rules>
|
|
58
69
|
|
|
59
70
|
## Confidence Expression
|
|
60
|
-
Per `agents/shared/quality-charter.md` §1 and `
|
|
71
|
+
Per `agents/shared/quality-charter.md` §1 and `agents/shared/rigor-contract.md`, rate every recommendation and decision as **high**, **medium**, or **low** confidence and name the basis (direct measurement, sampled observation, inference from analogue).
|
|
61
72
|
|
|
62
73
|
- **High:** Verified against the specific code/document path read this turn (<FILE-OR-FIXTURE-VERIFIED>).
|
|
63
74
|
- **Medium:** Pattern-based on convention or analogue (<NAMED-PATTERN-OR-ANALOGUE>); not fully traced.
|
|
@@ -82,9 +93,11 @@ This agent inherits `agents/shared/quality-charter.md` via the frontmatter `qual
|
|
|
82
93
|
|
|
83
94
|
The three sections above (Confidence Expression, Failure Modes, Quality Charter) are required on every user-authored agent. `hatch3r-creator` injects placeholders during composition and reports `gentleWarnings` when any section is missing or left unsubstituted at save time.
|
|
84
95
|
|
|
96
|
+
**§0 ambiguity gate (D13-10).** The `## §0 Detect Ambiguity` block above (or any `user-question-protocol.md` reference) is required so a user agent opens with a clarification-first gate, matching CONSTITUTION §2 P5 ambiguity-gate coverage (agents/skills/commands) at 100%. `hatch3r-creator` surfaces a gentle warning when a user agent ships without it; at maturity tier `team`/`scaleup`/`enterprise` the warning is promoted to a strict gate per F20.2.A1's tier-aware floor (gate path: `src/content/userContent.ts`, the agent/skill branch of `runUserContentGates`).
|
|
97
|
+
|
|
85
98
|
### 2. Skill Skeleton
|
|
86
99
|
|
|
87
|
-
**Path:** `.
|
|
100
|
+
**Path:** `.hatch3r/overrides/skills/<NAME>/SKILL.md` inside a new directory created via `mkdir -p`. The layout matches the canonical pattern at `skills/hatch3r-<name>/SKILL.md`. **Required:** `id`, `type`, `description`, `tags`. **Optional:** `quality_charter` (auto-injected).
|
|
88
101
|
|
|
89
102
|
```yaml
|
|
90
103
|
---
|
|
@@ -92,6 +105,7 @@ id: <NAME>
|
|
|
92
105
|
type: skill
|
|
93
106
|
description: <DESCRIPTION>
|
|
94
107
|
tags: [<TAG-1>, <TAG-2>]
|
|
108
|
+
pillars: [<P1-OR-CQ1-PILLAR-ID>]
|
|
95
109
|
quality_charter: agents/shared/quality-charter.md
|
|
96
110
|
---
|
|
97
111
|
```
|
|
@@ -101,11 +115,15 @@ quality_charter: agents/shared/quality-charter.md
|
|
|
101
115
|
|
|
102
116
|
## Quick Start
|
|
103
117
|
Task Progress:
|
|
118
|
+
- [ ] Step 0: Detect ambiguity (P8 B1)
|
|
104
119
|
- [ ] Step 1: <STEP-1-TITLE>
|
|
105
120
|
- [ ] Step 2: <STEP-2-TITLE>
|
|
106
121
|
- [ ] Step 3: <STEP-3-TITLE>
|
|
107
122
|
- [ ] Step 4: Verification
|
|
108
123
|
|
|
124
|
+
## §0 Detect Ambiguity (P8 B1)
|
|
125
|
+
Before any action, scan the request for unresolved scope, target, irreversibility, or constraint conflicts. If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` before proceeding — default path, not exception. Proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable.
|
|
126
|
+
|
|
109
127
|
## Step 1: <STEP-1-TITLE>
|
|
110
128
|
<STEP-1-BODY>
|
|
111
129
|
|
|
@@ -121,11 +139,13 @@ Run `<VERIFICATION-COMMAND>`. The skill is complete when:
|
|
|
121
139
|
2. <ACCEPTANCE-CRITERION-2>
|
|
122
140
|
```
|
|
123
141
|
|
|
124
|
-
Recommended step count: 3-7. Skills with more than 7 steps trigger a gentle warning suggesting decomposition.
|
|
142
|
+
Recommended step count: 3-7 (the §0 ambiguity gate does not count toward the limit). Skills with more than 7 steps trigger a gentle warning suggesting decomposition.
|
|
143
|
+
|
|
144
|
+
**§0 ambiguity gate (D13-10).** The `## §0 Detect Ambiguity` block above (or any `user-question-protocol.md` reference) is required so a user skill that drives an agentic workflow opens with a clarification-first gate, matching CONSTITUTION §2 P5 ambiguity-gate coverage (agents/skills/commands) at 100%. `hatch3r-creator` surfaces a gentle warning when a user skill ships without it; at maturity tier `team`/`scaleup`/`enterprise` the warning is promoted to a strict gate per F20.2.A1's tier-aware floor (gate path: `src/content/userContent.ts`, the agent/skill branch of `runUserContentGates`).
|
|
125
145
|
|
|
126
146
|
### 3. Rule Skeleton
|
|
127
147
|
|
|
128
|
-
**Path:** `.
|
|
148
|
+
**Path:** `.hatch3r/overrides/rules/<NAME>.md` plus the auto-generated companion `.hatch3r/overrides/rules/<NAME>.mdc`. The `.md` is canonical; `.mdc` is generated by `saveUserContent` using the `.md → .mdc` scope transform implemented in `src/content/userContent.ts`. **Required:** `id`, `type`, `description`, `scope`, `tags`. **Required when scope=conditional:** `globs`. **Optional:** `precedence` (default `normal`), `quality_charter` (auto-injected).
|
|
129
149
|
|
|
130
150
|
Three scope shapes (pick one):
|
|
131
151
|
|
|
@@ -144,6 +164,7 @@ scope: <SHAPE-A-VALUE-OR-SHAPE-B-CSV-OR-conditional>
|
|
|
144
164
|
globs: "<GLOB-CSV>" # required for Shape C; omit for A/B
|
|
145
165
|
precedence: <PRECEDENCE> # Shape C only; default normal
|
|
146
166
|
tags: [<TAG-1>]
|
|
167
|
+
pillars: [<P1-OR-CQ1-PILLAR-ID>]
|
|
147
168
|
quality_charter: agents/shared/quality-charter.md
|
|
148
169
|
---
|
|
149
170
|
```
|
|
@@ -164,26 +185,27 @@ quality_charter: agents/shared/quality-charter.md
|
|
|
164
185
|
<POSITIVE-AND-NEGATIVE-EXAMPLES>
|
|
165
186
|
```
|
|
166
187
|
|
|
167
|
-
The body bytes of `.md` and `.mdc` must match exactly (paired-file parity is a strict gate). The `.mdc` companion has different frontmatter — `saveUserContent` derives it from the `.md` scope shape per the
|
|
188
|
+
The body bytes of `.md` and `.mdc` must match exactly (paired-file parity is a strict gate). The `.mdc` companion has different frontmatter — `saveUserContent` derives it from the `.md` scope shape per the transform implemented in `src/content/userContent.ts`.
|
|
168
189
|
|
|
169
190
|
### 4. Command Skeleton
|
|
170
191
|
|
|
171
|
-
**Path:** `.
|
|
192
|
+
**Path:** `.hatch3r/overrides/commands/<NAME>.md`. **Required:** `id`, `type`, `description`, `orchestrator`, `tags`. **Required when orchestrator=true:** `agentPipeline` (non-empty array). **Optional:** `quality_charter` (auto-injected). Two variants follow; pick by the `orchestrator` value.
|
|
172
193
|
|
|
173
194
|
```yaml
|
|
174
|
-
# 4a. Inline command — orchestrator: false. Modeled after commands/hatch3r-
|
|
195
|
+
# 4a. Inline command — orchestrator: false. Modeled after commands/hatch3r-debug.md.
|
|
175
196
|
---
|
|
176
197
|
id: <NAME>
|
|
177
198
|
type: command
|
|
178
199
|
orchestrator: false
|
|
179
200
|
description: <DESCRIPTION>
|
|
180
201
|
tags: [<TAG-1>]
|
|
202
|
+
pillars: [<P1-OR-CQ1-PILLAR-ID>]
|
|
181
203
|
quality_charter: agents/shared/quality-charter.md
|
|
182
204
|
---
|
|
183
205
|
```
|
|
184
206
|
|
|
185
207
|
```yaml
|
|
186
|
-
# 4b. Orchestrator command — orchestrator: true. Modeled after commands/hatch3r-board-
|
|
208
|
+
# 4b. Orchestrator command — orchestrator: true. Modeled after commands/hatch3r-board-fill.md.
|
|
187
209
|
---
|
|
188
210
|
id: <NAME>
|
|
189
211
|
type: command
|
|
@@ -191,6 +213,7 @@ orchestrator: true
|
|
|
191
213
|
agentPipeline: [<AGENT-ID-1>, <AGENT-ID-2>]
|
|
192
214
|
description: <DESCRIPTION>
|
|
193
215
|
tags: [<TAG-1>]
|
|
216
|
+
pillars: [<P1-OR-CQ1-PILLAR-ID>]
|
|
194
217
|
quality_charter: agents/shared/quality-charter.md
|
|
195
218
|
---
|
|
196
219
|
```
|
|
@@ -239,13 +262,13 @@ Use the Task tool to invoke <AGENT-ID-1>. Pass collected slots as structured inp
|
|
|
239
262
|
- <GUARDRAIL-1>
|
|
240
263
|
```
|
|
241
264
|
|
|
242
|
-
|
|
265
|
+
Every user-authored orchestrator command MUST contain the §0 block above per CONSTITUTION §2 P8 B1 (Clarification-First, Default-Path), and the block should reference `agents/shared/user-question-protocol.md` verbatim. This is a live runtime strict gate: `runUserContentGates` (`src/content/userContent.ts`) rejects any `orchestrator: true` command whose body lacks a `## §0` / `## Step 0` heading or a `user-question-protocol` reference, at every maturity tier (D20-F20.1.B1, shipped). `hatch3r-creator` also emits the skeleton above at composition time, so authoring discipline and the runtime gate reinforce each other. The same §0 gate extends to user agents and skills (gentle at `solo`, strict at `team`+) per D13-10 — see the agent and skill skeleton notes above and the agent/skill branch of `runUserContentGates`.
|
|
243
266
|
|
|
244
267
|
The strict gate `validateCommandOrchestratorFrontmatter` (`src/cli/commands/validate.ts:171`) rejects `orchestrator: true` without a non-empty `agentPipeline` array.
|
|
245
268
|
|
|
246
269
|
### 5. Hook Skeleton
|
|
247
270
|
|
|
248
|
-
**Path:** `.
|
|
271
|
+
**Path:** `.hatch3r/overrides/hooks/<NAME>.md`. **Required:** `id`, `type`, `event`, `agent`, `description`, `tags`. **Optional:** `globs` (file-save filtering), `condition`, `quality_charter` (auto-injected). **Event enum:** `pre-commit | post-merge | ci-failure | file-save | session-start | pre-push | worktree-create | worktree-remove` (8 values), enforced by `isValidHookEvent` (`src/hooks/types.ts:30`).
|
|
249
272
|
|
|
250
273
|
```yaml
|
|
251
274
|
---
|
|
@@ -256,6 +279,7 @@ agent: <AGENT-ID>
|
|
|
256
279
|
description: <DESCRIPTION>
|
|
257
280
|
globs: "<GLOB-CSV>"
|
|
258
281
|
tags: [<TAG-1>]
|
|
282
|
+
pillars: [<P1-OR-CQ1-PILLAR-ID>]
|
|
259
283
|
quality_charter: agents/shared/quality-charter.md
|
|
260
284
|
---
|
|
261
285
|
```
|
|
@@ -274,14 +298,16 @@ When this hook fires, the assigned agent should:
|
|
|
274
298
|
<DESCRIBES-WHAT-THE-AGENT-RETURNS-OR-WRITES>
|
|
275
299
|
```
|
|
276
300
|
|
|
277
|
-
The `agent` field must reference an existing agent — canonical (e.g., `lint-fixer` resolves to `agents/hatch3r-lint-fixer.md`) or under `.
|
|
301
|
+
The `agent` field must reference an existing agent — canonical (e.g., `lint-fixer` resolves to `agents/hatch3r-lint-fixer.md`) or under `.hatch3r/overrides/agents/`. Missing references are rejected at strict-gate time.
|
|
302
|
+
|
|
303
|
+
**Transitive trust warning (D20-M6).** A hook fires its referenced agent with that agent's declared tool grants. When `agent: <AGENT-ID>` resolves to a user-authored agent under `.hatch3r/overrides/agents/`, the hook inherits whatever `tools.allowed` set that user agent declared — a broad allowlist on the referenced agent silently widens the hook's blast radius. `hatch3r-creator` surfaces a gentle warning when a hook references a user-authored agent (rather than a canonical `agents/hatch3r-*.md` agent) so authors verify the downstream tool grants are intentional. Mitigation: prefer canonical agents for hooks, or pin the referenced user agent to a narrow `tools.allowed` list with a cited `**Security baseline:**` per §1.
|
|
278
304
|
|
|
279
305
|
## Reference Implementations
|
|
280
306
|
|
|
281
|
-
For each user type, mirror the canonical shape below — minus the `hatch3r-` filename prefix; the user-tier path is always under `.
|
|
307
|
+
For each user type, mirror the canonical shape below — minus the `hatch3r-` filename prefix; the user-tier path is always under `.hatch3r/overrides/{type}/`:
|
|
282
308
|
|
|
283
309
|
- **Agent:** `agents/hatch3r-implementer.md` (full body) or `agents/hatch3r-fixer.md` (compact body).
|
|
284
310
|
- **Skill:** `skills/hatch3r-bug-fix/SKILL.md` or `skills/hatch3r-feature/SKILL.md`.
|
|
285
311
|
- **Rule:** `rules/hatch3r-deep-context.md` (`scope: always`) or `rules/hatch3r-component-conventions.md` (`scope: conditional`).
|
|
286
|
-
- **Command:** `commands/hatch3r-
|
|
312
|
+
- **Command:** `commands/hatch3r-debug.md` (inline) or `commands/hatch3r-board-fill.md` (orchestrator).
|
|
287
313
|
- **Hook:** `hooks/hatch3r-pre-commit.md` (with globs) or `hooks/hatch3r-session-start.md` (always-fire).
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: shared-user-question-protocol
|
|
3
|
+
type: reference
|
|
4
|
+
description: Protocol for how hatch3r agents and commands ask the user clarifying questions — when to ask, native-tool preference, and a plain-text fallback shape.
|
|
5
|
+
tags: [shared, ux, p1, p4]
|
|
6
|
+
cache_friendly: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
> Last updated: 2026-06-09
|
|
12
|
+
|
|
13
|
+
This protocol defines how hatch3r agents and commands surface clarifying or triage questions to the user across the 3 supported AI coding tools (Claude Code, Cursor, GitHub Copilot per `governance/CONSTITUTION.md` §6 Decision 12). It is the single source of truth for the *how* of asking; the *whether* is governed by [quality-charter §3 "Question Unclear Requirements"](./quality-charter.md) and §8 "Escalate Ambiguity Early". Coverage is a 100% floor, not a fixed file list: every framework-dev workflow that can mutate canonical artifacts routes its ASK through this protocol — the requirements-elicitation mode (`agents/modes/requirements-elicitation.md`), the shared §0 gate block (`agents/shared/clarification-default-block.md`), and every `agents/hatch3r-*.md` agent and `commands/hatch3r-*.md` command that detects ambiguity (counts: `governance/inventory.json` `counts.agents`, `counts.commands`, `counts.skills`). The "3 supported AI coding tools" figure above is drift-guarded against `inventory.json` `counts.adapters` by `scripts/inventory.ts` (`npm run inventory:check-docs`).
|
|
14
|
+
|
|
15
|
+
## When To Ask
|
|
16
|
+
|
|
17
|
+
- **Ambiguous requirement** — the request maps to two or more reasonable interpretations that produce different code.
|
|
18
|
+
- **Irreversible decision** — deleting data, renaming a public API, dropping a column, force-pushing a branch.
|
|
19
|
+
- **Branching path** — two or more viable approaches with materially different cost, scope, or risk.
|
|
20
|
+
- **Conflicting constraints** — requirements that cannot all hold (e.g., "no new dependencies" and "use library X").
|
|
21
|
+
- **Missing acceptance criteria** — no testable definition of done for the requested change.
|
|
22
|
+
- **Architectural premise concern** — request is well-specified and single-interpretation, but the chosen approach is architecturally misguided (wrong pattern for the constraint, mis-applied abstraction, foreseeable scaling failure). Surface the concern as a §0.5 Challenge the Premise question per quality-charter §3 — phrase it constructively ("Before I implement this, I want to confirm the approach because [specific concern]"), then offer 2-4 options (proceed as requested / proposed alternative / hybrid). Default-if-no-response: proceed as requested (lowest-blast-radius assumption is that the user has context the agent lacks).
|
|
23
|
+
|
|
24
|
+
## When NOT To Ask
|
|
25
|
+
|
|
26
|
+
- The user already decided scope in this turn or an earlier turn of the same session.
|
|
27
|
+
- You are in free-text discussion, planning, or a status update — questions belong inside actionable workflows.
|
|
28
|
+
- The answer is verifiable by reading code, running a test, or grepping the repo — verify first, ask only if verification fails.
|
|
29
|
+
- The choice is reversible, low-stakes, and the safer default is obvious — pick the default and note it.
|
|
30
|
+
|
|
31
|
+
## How To Ask
|
|
32
|
+
|
|
33
|
+
1. Check whether your target platform exposes a native question or triage tool (see Platform-Native Tool below).
|
|
34
|
+
2. If yes, use the native tool — it produces better UX than free-text replies and is structured for the host runtime.
|
|
35
|
+
3. If no native tool exists on this platform, use the Plain-Text Fallback Template.
|
|
36
|
+
4. Ask at most one question per turn. Bundle related sub-questions into a single multiple-choice prompt rather than firing multiple turns.
|
|
37
|
+
|
|
38
|
+
## Platform-Native Tool
|
|
39
|
+
|
|
40
|
+
The marker below is replaced at canonical-write time with the enumeration table generated from `src/pipeline/adapterToolTranslator.ts::ASK_USER_TOOLS`. Look up your runtime platform and follow its row. If your platform's row reads "No documented native tool", use the Plain-Text Fallback Template defined in the next section.
|
|
41
|
+
|
|
42
|
+
<!-- HATCH3R:PLATFORM-TOOL -->
|
|
43
|
+
|
|
44
|
+
When viewing this file in the source repo (pre-generation), the marker is unsubstituted — refer to the adapter map in `src/pipeline/adapterToolTranslator.ts` for the same mappings.
|
|
45
|
+
|
|
46
|
+
**Sub-agent caveat (Claude Code).** The native `AskUserQuestion` tool is a main-agent / orchestrator affordance only. Claude Code filters it out of every Task-tool sub-agent context (foreground and background) regardless of the agent's `tools` declaration, so a spawned `hatch3r-*` sub-agent cannot call it (upstream-confirmed via `anthropics/claude-code` issues #18721, #12890, #34592; verified 2026-06-06 @ https://code.claude.com/docs/en/sub-agents). A sub-agent that hits an ASK trigger therefore does NOT use the native tool: it RETURNS Status `BLOCKED_AMBIGUITY` (`agents/shared/quality-charter.md` §17) with the question rendered via the Plain-Text Fallback Template below, and the orchestrator owns the live ASK (`agents/shared/clarification-default-block.md` → Protocol). This exclusion is re-verified each audit cycle against the date stamp on `src/pipeline/adapterToolTranslator.ts::ASK_USER_TOOLS` (`claude` entry) — a date drift there is a D09 Medium finding.
|
|
47
|
+
|
|
48
|
+
## Plain-Text Fallback Template
|
|
49
|
+
|
|
50
|
+
Use this exact shape when no native tool is available:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
**Question:** <one-sentence question stating the choice>
|
|
54
|
+
|
|
55
|
+
1. <Option A> — <one-line rationale or trade-off>
|
|
56
|
+
2. <Option B> — <one-line rationale or trade-off>
|
|
57
|
+
3. <Option C> — <one-line rationale or trade-off>
|
|
58
|
+
|
|
59
|
+
Default if no response: <option number, e.g., 2>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Rules for the template:
|
|
63
|
+
|
|
64
|
+
- Two to four numbered options. One option is too few; five or more signals you have not narrowed the design.
|
|
65
|
+
- Each option carries a one-line trade-off so the user can pick without re-deriving the problem.
|
|
66
|
+
- The default-if-no-response line is mandatory — it removes the deadlock when the user is away or replies "you decide".
|
|
67
|
+
- The default option is the safest reversible choice, not the most ambitious one.
|
|
68
|
+
|
|
69
|
+
### Optional preview attachment (orchestrator-scoped, platform-conditional)
|
|
70
|
+
|
|
71
|
+
For questions whose options differ along a **visual or layout dimension** — a color/spacing/typography choice, two candidate component arrangements, a copy-tone A/B, a before/after of an async-view state — a rendered preview alongside the numbered options lets the user decide from the artifact instead of from prose. This is most useful for the UI (CQ1) and UX (CQ2) ASK gates, where "which of these reads better" is the decision.
|
|
72
|
+
|
|
73
|
+
Attach a preview only when BOTH hold:
|
|
74
|
+
|
|
75
|
+
- **You are the orchestrator** (main-conversation `commands/hatch3r-*.md`), not a Task-tool sub-agent. Sub-agents cannot call the native question tool at all (see the Sub-agent caveat above); they render the question — and any preview snippet — in the `BLOCKED_AMBIGUITY` structured result, and the orchestrator owns the live ASK.
|
|
76
|
+
- **The runtime's native question tool supports rich/rendered option content.** Capability is per-platform; look up your runtime's row in the adapter map (`src/pipeline/adapterToolTranslator.ts::ASK_USER_TOOLS`) before relying on a preview, exactly as you would for the question tool itself. When the platform's native tool is text-only (or absent), embed the preview as a fenced code block inside the Plain-Text Fallback Template instead — never assume a rendering affordance the platform row does not document.
|
|
77
|
+
|
|
78
|
+
**Concrete affordance (Claude Code orchestrator).** On the `claude` platform, populate the per-option `markdown` field of the `AskUserQuestion` tool: when any option carries a `markdown` value, Claude Code switches to a side-by-side preview layout (numbered options on the left, the rendered markdown on the right), so a diagram, code/diff block, or token-swatch table renders inline with the choice. The field accepts markdown only (no HTML), and long content is truncated to a scrollable panel — keep each option's preview to about one screen of markup. One documented constraint: supplying a `markdown` field suppresses the free-text "Other / Type something" option on that question, so reserve the preview layout for closed-option visual decisions. Other platforms expose no documented preview field (their `ASK_USER_TOOLS` row is `null` — `cursor`, `copilot` as of 2026-06-09); on those, fall back to the fenced-code-block-in-plain-text shape above.
|
|
79
|
+
|
|
80
|
+
The preview is an enrichment, not a replacement: the numbered options and the mandatory `Default if no response:` line are still required. Keep the preview small (one screen of markup or a single mock) so it does not bury the decision.
|
|
81
|
+
|
|
82
|
+
## Examples
|
|
83
|
+
|
|
84
|
+
**Example 1 — Ambiguous requirement.** Request: "Add caching to the user profile endpoint."
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
**Question:** Which cache scope matches your needs for the profile endpoint?
|
|
88
|
+
|
|
89
|
+
1. Per-user, 60s TTL — fastest response, stale data tolerated up to 60s.
|
|
90
|
+
2. Per-user, write-through invalidation — fresh data, +1 cache write per profile update.
|
|
91
|
+
3. Edge cache only — no app changes, but TTL is fixed by the CDN config.
|
|
92
|
+
|
|
93
|
+
Default if no response: 2
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Example 2 — Branching path.** Request: "Migrate the build to Vite."
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
**Question:** Should the Vite migration land in one PR or staged behind a feature flag?
|
|
100
|
+
|
|
101
|
+
1. Single PR — shorter total time, larger blast radius if a regression ships.
|
|
102
|
+
2. Staged with VITE_BUILD flag — two PRs, lets you A/B locally before flipping.
|
|
103
|
+
|
|
104
|
+
Default if no response: 2
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Operationalising Default-if-no-Response
|
|
108
|
+
|
|
109
|
+
The "Default if no response" line is mandatory in every plain-text fallback question (per the rules above) and is the canonical deadlock-breaker for every ASK gate across the framework. To operationalise the default at runtime rather than leaving it as documented prose:
|
|
110
|
+
|
|
111
|
+
1. **Detect non-response.** If a question goes unanswered within the host runtime's question window (Claude Code: idle session timeout; Cursor: AskUserQuestion timeout; Copilot Workspace: prompt-cycle gap), or if the user replies "you decide" / "default" / empty, treat as non-response.
|
|
112
|
+
2. **Apply the safe default.** Pick the option declared on the `Default if no response: <option number>` line — the lowest-blast-radius reversible choice the question's author named.
|
|
113
|
+
3. **Log the default-taken decision.** Emit in the Iteration Summary §8 (Open Questions / Blockers) a single line: `Default applied: <question summary> → option <N> (<one-line reason>)`. This is the operational counterpart to the prose mandate — every agent / command ASK output that exercises the default MUST log the decision. The §8 line is a required field of the canonical Iteration Summary template (`rules/hatch3r-iteration-summary.md` → The 9 Sections, item 8), and the catching-gate ownership is named in `rules/hatch3r-clarification-default.md` → How to ask — those two files are the enforcing surface for this step.
|
|
114
|
+
4. **Never silent-pick.** If no `Default if no response: <option>` line was emitted with the question (an authoring bug per the rules in this file), return `BLOCKED_AMBIGUITY` in the structured result rather than guessing.
|
|
115
|
+
|
|
116
|
+
The §8 log is the audit-visible evidence that the default-if-no-response contract was honored; absence of the log when a default was applied is a P8 B1 gate failure. Runtime emission of the §8 line is orchestrator-produced interpreted markdown, so no static gate can verify it fired — D05 (prompt-engineering) and D13 (human-AI collaboration) audit-cycle spot checks plus the per-run Iteration Summary validation gate are the enforcement, not a compiled check.
|
|
117
|
+
|
|
118
|
+
The contract has a single named owner so it is not re-declared per command: the always-on, `precedence: high` rule `rules/hatch3r-clarification-default.md` (`scope: always`) binds every `commands/hatch3r-*.md` orchestrator and mutating skill corpus-wide, and that rule's "How to ask" section is the catching gate. An individual command body therefore need not repeat the default-handling vocabulary to be bound by it — the rule + this protocol + the Iteration Summary §8 template are the three-anchor owner set, and a command inherits the contract by being in scope. Treat a command that *does* restate it as a convenience, not the source of truth.
|
|
119
|
+
|
|
120
|
+
## Cross-Phase Aggregation
|
|
121
|
+
|
|
122
|
+
This protocol defines the *shape* of a single question (numbered options, mandatory default). It does not define where pending questions accumulate when several fire across one pipeline run. That cross-phase aggregation layer is the `PipelineContext.pendingUserInputs: PendingUserInput[]` field (`src/pipeline/pipelineContext.ts`, Finding D7-SA7.1-F-10): each phase pushes a `PendingUserInput` — whose `options` + `defaultIfNoResponse` mirror the Plain-Text Fallback Template above — instead of emitting a direct prompt mid-phase. The orchestrator drains the array between phases, paginating when more than three accumulate, so a Tier 3 run's multiple ASK checkpoints are batched rather than each rendered independently. Per-question UX (this file) and cross-phase batching (the field) are complementary: author each request to this template, enqueue it on the field.
|
|
123
|
+
|
|
124
|
+
## Anti-Patterns
|
|
125
|
+
|
|
126
|
+
- **Multi-question barrage** — asking five questions in one turn. Ask the highest-leverage one first; the answer often collapses the rest.
|
|
127
|
+
- **Options-free questions** — "What should I do?" forces the user to design the prompt. Always supply 2–4 candidate options with trade-offs.
|
|
128
|
+
- **Silent assumption** — proceeding when ambiguity is real. Apply quality-charter §8: log the ambiguity in structured output even if you decide to proceed under a default.
|
|
129
|
+
- **Echo-as-question** — restating the user's request back as a question ("So you want me to add caching?"). Confirm only when you have a specific decision point with options to offer.
|
|
130
|
+
- **Inflated default** — choosing the most disruptive option as the no-response default. Defaults must be the reversible, lowest-blast-radius choice.
|
|
131
|
+
|
|
132
|
+
## References
|
|
133
|
+
|
|
134
|
+
The `markdown`-field preview affordance documented in "Optional preview attachment" above is corroborated by:
|
|
135
|
+
|
|
136
|
+
- `anthropics/claude-code` issue #27348 — names the `markdown` field on `AskUserQuestion` options as the trigger for the preview layout and the "Other / Type something" suppression constraint (accessed 2026-06-09; trust tier: official-vendor issue tracker). https://github.com/anthropics/claude-code/issues/27348
|
|
137
|
+
- `anthropics/claude-code` issue #33062 — documents the side-by-side preview panel and its scroll/truncation behavior for long content (accessed 2026-06-09; trust tier: official-vendor issue tracker). https://github.com/anthropics/claude-code/issues/33062
|
|
138
|
+
|
|
139
|
+
Per-platform tool names and the `null`-means-no-native-tool convention are sourced in `src/pipeline/adapterToolTranslator.ts::ASK_USER_TOOLS` (each entry carries its own `// verified <date> @ <docs URL>` stamp, refreshed on the D09 per-cycle web-research pass).
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: checks-readme
|
|
3
|
+
type: documentation
|
|
4
|
+
description: Authoring guide and directory contract for the checks/ review-criteria files. Not a check itself — excluded from check enumeration by its documentation type.
|
|
5
|
+
---
|
|
1
6
|
# Checks
|
|
2
7
|
|
|
3
8
|
Review criteria definitions for automated and agent-assisted code review. Each check file defines a set of criteria that agents reference when reviewing code changes.
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: accessibility
|
|
3
3
|
type: check
|
|
4
|
-
description: Accessibility review criteria covering WCAG compliance, semantic HTML, keyboard navigation, screen reader support, and inclusive design patterns
|
|
4
|
+
description: Accessibility review criteria covering WCAG 2.2 AA compliance, semantic HTML, keyboard navigation, screen reader support, and inclusive design patterns
|
|
5
|
+
tags: [accessibility]
|
|
5
6
|
cache_friendly: true
|
|
6
7
|
---
|
|
7
8
|
# Accessibility Check
|
|
8
9
|
|
|
9
|
-
> **Severity vocabulary:** see [
|
|
10
|
+
> **Severity vocabulary:** see [agents/shared/severity-mapping.md](../agents/shared/severity-mapping.md) for canonical 5-column mapping.
|
|
10
11
|
|
|
11
12
|
Review criteria for evaluating accessibility in pull requests.
|
|
12
13
|
|
|
13
14
|
## Semantic HTML and ARIA
|
|
14
15
|
|
|
15
16
|
- `[CRITICAL]` Interactive elements use native HTML controls (`<button>`, `<a>`, `<input>`, `<select>`) rather than styled `<div>` or `<span>` elements with click handlers.
|
|
16
|
-
- `[CRITICAL]` Custom interactive components
|
|
17
|
+
- `[CRITICAL]` Custom interactive components carry ARIA roles, states, and properties that match the WAI-ARIA 1.2 Authoring Practices pattern for the widget type (`role`, `aria-expanded`, `aria-selected`, `aria-disabled`, etc.); axe-core 4.5+ reports 0 `aria-required-attr` / `aria-allowed-role` violations.
|
|
17
18
|
- `[CRITICAL]` Images have meaningful `alt` text, or `alt=""` and `aria-hidden="true"` if purely decorative.
|
|
18
19
|
- `[CRITICAL]` Form inputs have associated `<label>` elements (via `for`/`id` or nesting). No input relies solely on placeholder text for identification.
|
|
19
20
|
- `[RECOMMENDED]` Headings follow a logical hierarchy (`h1` > `h2` > `h3`) without skipping levels.
|
|
@@ -21,22 +22,28 @@ Review criteria for evaluating accessibility in pull requests.
|
|
|
21
22
|
|
|
22
23
|
## Keyboard Navigation
|
|
23
24
|
|
|
24
|
-
- `[CRITICAL]` All interactive elements are reachable and operable via keyboard (Tab, Shift+Tab, Enter, Space
|
|
25
|
+
- `[CRITICAL]` All interactive elements are reachable and operable via keyboard (Tab, Shift+Tab, Enter, Space; Arrow keys for composite widgets per the WAI-ARIA APG keyboard-interaction table for that widget — menu, listbox, tablist, grid).
|
|
25
26
|
- `[CRITICAL]` Focus is not trapped in a component unless it is a modal dialog with an explicit close mechanism.
|
|
26
27
|
- `[CRITICAL]` Custom keyboard shortcuts do not conflict with screen reader or browser shortcuts.
|
|
27
28
|
- `[RECOMMENDED]` Focus order follows the visual reading order (logical DOM order). No use of positive `tabindex` values.
|
|
28
|
-
- `[
|
|
29
|
+
- `[CRITICAL]` WCAG 2.2 SC 2.4.7 Focus Visible (AA): the keyboard focus indicator is visible on every operable element. No `outline: none` without a conforming custom focus style.
|
|
30
|
+
- `[CRITICAL]` WCAG 2.2 SC 2.4.11 Focus Not Obscured (Minimum) (AA): the focused element is not entirely hidden by author-created content (sticky headers, footers, cookie banners, overlays). `[RECOMMENDED]` SC 2.4.13 Focus Appearance (AAA) as the enhanced target: the focus indicator has a contrast ratio of at least 3:1 against adjacent colors and a minimum area equal to a 1px-thick perimeter (or 4px-thick along the shortest side).
|
|
29
31
|
|
|
30
32
|
## Visual Design and Color
|
|
31
33
|
|
|
32
|
-
- `[CRITICAL]` Text meets WCAG 2.
|
|
34
|
+
- `[CRITICAL]` Text meets WCAG 2.2 AA contrast ratios: 4.5:1 for normal text, 3:1 for large text (18px+ or 14px+ bold). Verify with axe-core 4.5+ `color-contrast` rule — 0 violations.
|
|
33
35
|
- `[CRITICAL]` Information is not conveyed by color alone. Status indicators, errors, and required fields use icons, text, or patterns in addition to color.
|
|
34
36
|
- `[CRITICAL]` UI remains functional and readable at 200% browser zoom without horizontal scrolling or content clipping.
|
|
35
|
-
- `[RECOMMENDED]` Touch targets are at least 44x44 CSS pixels for mobile interfaces.
|
|
36
37
|
- `[RECOMMENDED]` Animations respect the `prefers-reduced-motion` media query — reduce or remove motion for users who have requested it.
|
|
37
38
|
|
|
39
|
+
## Touch and Pointer Targets (WCAG 2.2)
|
|
40
|
+
|
|
41
|
+
- `[CRITICAL]` WCAG 2.2 SC 2.5.8 Target Size (Minimum): pointer targets are at least 24x24 CSS px, OR have 24px of spacing to adjacent targets, unless an inline/essential exception applies. Mobile interfaces target 44x44 CSS px (Apple HIG / Material).
|
|
42
|
+
- `[CRITICAL]` WCAG 2.2 SC 2.5.7 Dragging Movements: any drag operation (slider, drag-to-reorder, map pan) provides a single-pointer alternative that does not require dragging (tap, click, or button control).
|
|
43
|
+
|
|
38
44
|
## Screen Reader Support
|
|
39
45
|
|
|
46
|
+
- `[CRITICAL]` WCAG 2.2 SC 4.1.3 Status Messages: status messages (success/error/progress, search-result counts, loading state) are programmatically conveyed via `role="status"`, `role="alert"`, or an `aria-live` region without moving focus, so assistive tech announces them.
|
|
40
47
|
- `[CRITICAL]` Dynamic content updates (toast notifications, live regions, inline validation) use `aria-live` regions (`polite` or `assertive`) to announce changes.
|
|
41
48
|
- `[CRITICAL]` Modal dialogs trap focus, announce their title via `aria-labelledby`, and return focus to the trigger element on close.
|
|
42
49
|
- `[CRITICAL]` Icon-only buttons and links have accessible names via `aria-label`, `aria-labelledby`, or visually hidden text.
|
|
@@ -6,7 +6,7 @@ cache_friendly: true
|
|
|
6
6
|
---
|
|
7
7
|
# Code Quality Check
|
|
8
8
|
|
|
9
|
-
> **Severity vocabulary:** see [
|
|
9
|
+
> **Severity vocabulary:** see [agents/shared/severity-mapping.md](../agents/shared/severity-mapping.md) for canonical 5-column mapping.
|
|
10
10
|
|
|
11
11
|
Review criteria for evaluating code quality in pull requests.
|
|
12
12
|
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
id: performance
|
|
3
3
|
type: check
|
|
4
4
|
description: Performance review criteria covering bundle size, render performance, memory usage, network optimization, database queries, and runtime efficiency
|
|
5
|
+
tags: [performance]
|
|
5
6
|
cache_friendly: true
|
|
6
7
|
---
|
|
7
8
|
# Performance Check
|
|
8
9
|
|
|
9
|
-
> **Severity vocabulary:** see [
|
|
10
|
+
> **Severity vocabulary:** see [agents/shared/severity-mapping.md](../agents/shared/severity-mapping.md) for canonical 5-column mapping.
|
|
11
|
+
|
|
12
|
+
**Applies when:** the project declares performance budgets. Without declared budgets this check is advisory, not gating (per `rules/hatch3r-right-sizing.md`).
|
|
10
13
|
|
|
11
14
|
Review criteria for evaluating performance in pull requests.
|
|
12
15
|
|
|
@@ -14,7 +17,7 @@ Review criteria for evaluating performance in pull requests.
|
|
|
14
17
|
|
|
15
18
|
- `[CRITICAL]` New dependencies do not increase the total bundle size (gzipped) beyond the defined budget. Measure before and after.
|
|
16
19
|
- `[CRITICAL]` No unintentional import of full libraries when a subpath import or tree-shakable alternative exists (e.g., `import _ from "lodash"` vs `import groupBy from "lodash/groupBy"`).
|
|
17
|
-
- `[RECOMMENDED]` Images and static assets are
|
|
20
|
+
- `[RECOMMENDED]` Images and static assets are compressed and served in WebP or AVIF, with intrinsic dimensions no larger than the maximum rendered size at 2x device pixel ratio (no downscaling a >2x-oversized source in the browser).
|
|
18
21
|
- `[RECOMMENDED]` CSS and JavaScript are minified and dead-code-eliminated in production builds.
|
|
19
22
|
|
|
20
23
|
## Render and Paint Performance
|
|
@@ -35,7 +38,7 @@ Review criteria for evaluating performance in pull requests.
|
|
|
35
38
|
|
|
36
39
|
- `[CRITICAL]` No N+1 request patterns — batch or aggregate related requests instead of issuing one per item.
|
|
37
40
|
- `[CRITICAL]` API response payloads return only required fields. No over-fetching of large objects when a subset is needed.
|
|
38
|
-
- `[RECOMMENDED]` Cacheable responses
|
|
41
|
+
- `[RECOMMENDED]` Cacheable responses set `Cache-Control` with an explicit `max-age` (immutable static assets `max-age=31536000, immutable`; mutable API responses `no-cache` or a documented TTL) plus an `ETag` or `Last-Modified` validator. Responses that mutate state or carry per-user data set `Cache-Control: private` or `no-store`.
|
|
39
42
|
- `[RECOMMENDED]` Request waterfalls are minimized — parallelize independent requests and preload critical resources.
|
|
40
43
|
|
|
41
44
|
## Database Query Performance
|
|
@@ -49,7 +52,7 @@ Review criteria for evaluating performance in pull requests.
|
|
|
49
52
|
## Runtime Performance
|
|
50
53
|
|
|
51
54
|
- `[CRITICAL]` No synchronous blocking operations (heavy computation, synchronous I/O) on the main thread or event loop.
|
|
52
|
-
- `[CRITICAL]` Hot-path code (called per-request, per-frame, or per-event) does not
|
|
55
|
+
- `[CRITICAL]` Hot-path code (called per-request, per-frame, or per-event) does not recompute a pure result whose inputs are unchanged since the last call — memoize or cache any such repeated pure computation, and bound the cache with an eviction policy (size cap or TTL).
|
|
53
56
|
- `[RECOMMENDED]` CPU-intensive work is offloaded to workers, background jobs, or streaming pipelines.
|
|
54
57
|
- `[RECOMMENDED]` Object allocation in tight loops is minimized — reuse buffers and avoid creating short-lived objects per iteration.
|
|
55
58
|
|
|
@@ -6,7 +6,7 @@ cache_friendly: true
|
|
|
6
6
|
---
|
|
7
7
|
# Security Check
|
|
8
8
|
|
|
9
|
-
> **Severity vocabulary:** see [
|
|
9
|
+
> **Severity vocabulary:** see [agents/shared/severity-mapping.md](../agents/shared/severity-mapping.md) for canonical 5-column mapping.
|
|
10
10
|
|
|
11
11
|
Review criteria for evaluating security posture in pull requests.
|
|
12
12
|
|
|
@@ -20,10 +20,10 @@ Review criteria for evaluating security posture in pull requests.
|
|
|
20
20
|
|
|
21
21
|
## Authentication and Authorization
|
|
22
22
|
|
|
23
|
-
- `[CRITICAL]` New endpoints
|
|
23
|
+
- `[CRITICAL]` New endpoints enforce authentication and resource-level authorization per an OAuth 2.1 / RBAC rubric — every non-public route rejects unauthenticated requests (401) and out-of-scope authenticated requests (403). No accidental public exposure of protected resources.
|
|
24
24
|
- `[CRITICAL]` Authorization checks verify the authenticated user has access to the specific resource, not just that they're logged in.
|
|
25
25
|
- `[CRITICAL]` Authentication tokens are not logged, included in URLs, or exposed in error messages.
|
|
26
|
-
- `[RECOMMENDED]` Session tokens use secure attributes: `HttpOnly`, `Secure`, `SameSite=Strict`,
|
|
26
|
+
- `[RECOMMENDED]` Session tokens use secure attributes: `HttpOnly`, `Secure`, `SameSite=Strict`, and a `Max-Age` no longer than the session policy (default ≤24h for access tokens, ≤30d for refresh tokens).
|
|
27
27
|
- `[RECOMMENDED]` Rate limiting is applied to authentication endpoints (login, password reset, OTP verification).
|
|
28
28
|
|
|
29
29
|
## Secrets and Credentials
|
|
@@ -38,8 +38,8 @@ Review criteria for evaluating security posture in pull requests.
|
|
|
38
38
|
|
|
39
39
|
- `[CRITICAL]` New dependencies are from trusted sources with active maintenance (recent commits, multiple maintainers).
|
|
40
40
|
- `[CRITICAL]` No known critical or high vulnerabilities in new or updated dependencies (`npm audit`, `pip audit`, etc.).
|
|
41
|
-
- `[RECOMMENDED]`
|
|
42
|
-
- `[RECOMMENDED]` New dependencies
|
|
41
|
+
- `[RECOMMENDED]` Each added runtime dependency is justified in the PR description; a standard-library or already-present-dependency equivalent that covers the same use case is preferred over a new transitive dependency tree.
|
|
42
|
+
- `[RECOMMENDED]` New dependencies carry an OSI-approved license compatible with the project license (no GPL/AGPL copyleft in a permissively-licensed product unless legal-approved).
|
|
43
43
|
|
|
44
44
|
## Data Exposure
|
|
45
45
|
|
|
@@ -58,4 +58,4 @@ Review criteria for evaluating security posture in pull requests.
|
|
|
58
58
|
## Error Handling
|
|
59
59
|
|
|
60
60
|
- `[CRITICAL]` Error responses to clients do not include stack traces, internal paths, or database details.
|
|
61
|
-
- `[RECOMMENDED]` Security-relevant errors (auth failures, permission denials) are logged with
|
|
61
|
+
- `[RECOMMENDED]` Security-relevant errors (auth failures, permission denials) are logged with the five fields an incident responder needs — timestamp, actor/subject identifier, action attempted, resource, and outcome — and never the secret or credential that was rejected.
|
|
@@ -6,7 +6,7 @@ cache_friendly: true
|
|
|
6
6
|
---
|
|
7
7
|
# Testing Check
|
|
8
8
|
|
|
9
|
-
> **Severity vocabulary:** see [
|
|
9
|
+
> **Severity vocabulary:** see [agents/shared/severity-mapping.md](../agents/shared/severity-mapping.md) for canonical 5-column mapping.
|
|
10
10
|
|
|
11
11
|
Review criteria for evaluating test coverage and quality in pull requests.
|
|
12
12
|
|
|
@@ -56,7 +56,7 @@ Follow the **Azure Boards Work Item State Sync** from `commands/board/shared-azu
|
|
|
56
56
|
**Create PR:**
|
|
57
57
|
`az repos pr create --org https://dev.azure.com/{namespace} --project {project} --source-branch {branch} --target-branch {base} --title "..." --description "..."` (fall back to `create_pull_request` MCP).
|
|
58
58
|
|
|
59
|
-
`{base}` = `board.defaultBranch` from `.
|
|
59
|
+
`{base}` = `board.defaultBranch` from `.hatch3r/hatch.json` (fallback: `"main"`).
|
|
60
60
|
|
|
61
61
|
**Link PR to epic:**
|
|
62
62
|
`az boards work-item relation add --id {epic_id} --relation-type "ArtifactLink" --target-id {pr_id}` or link via PR description.
|