hatch3r 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -143
- package/dist/cli/index.js +28453 -15831
- package/dist/content/agents/hatch3r-architect.md +39 -9
- package/dist/content/agents/hatch3r-brownfield-spec.md +254 -0
- package/dist/content/agents/hatch3r-ci-watcher.md +8 -1
- package/dist/content/agents/hatch3r-context-rules.md +19 -1
- package/dist/content/agents/hatch3r-creator.md +65 -26
- package/dist/content/agents/hatch3r-dependency-drafter.md +162 -0
- package/dist/content/agents/hatch3r-devops.md +11 -1
- package/dist/content/agents/hatch3r-docs-writer.md +11 -1
- package/dist/content/agents/hatch3r-edge-case-analyst.md +134 -0
- package/dist/content/agents/hatch3r-enhancability.md +192 -0
- package/dist/content/agents/hatch3r-fixer.md +59 -8
- package/dist/content/agents/hatch3r-greenfield-spec.md +256 -0
- package/dist/content/agents/hatch3r-handoff-loader.md +29 -3
- package/dist/content/agents/hatch3r-handoff-preparer.md +10 -1
- package/dist/content/agents/hatch3r-implementer.md +139 -8
- package/dist/content/agents/hatch3r-incident-responder.md +96 -0
- package/dist/content/agents/hatch3r-learnings-loader.md +122 -88
- package/dist/content/agents/hatch3r-lint-fixer.md +15 -3
- package/dist/content/agents/hatch3r-maintainability.md +183 -0
- package/dist/content/agents/hatch3r-pack-installer.md +113 -0
- package/dist/content/agents/hatch3r-performance.md +179 -0
- package/dist/content/agents/hatch3r-reliability.md +193 -0
- package/dist/content/agents/hatch3r-researcher.md +27 -4
- package/dist/content/agents/hatch3r-reviewer.md +153 -103
- package/dist/content/agents/hatch3r-scalability.md +162 -0
- package/dist/content/agents/hatch3r-security.md +197 -0
- package/dist/content/agents/hatch3r-testability.md +204 -0
- package/dist/content/agents/hatch3r-ui.md +175 -0
- package/dist/content/agents/hatch3r-ux.md +160 -0
- package/dist/content/agents/modes/requirements-elicitation.md +1 -1
- package/dist/content/agents/modes/user-flows.md +2 -2
- package/dist/content/agents/shared/clarification-default-block.md +44 -0
- package/dist/content/agents/shared/confidence-gate.md +42 -0
- package/dist/content/agents/shared/cq-specialist-roster.md +26 -0
- package/dist/content/agents/shared/efficiency-patterns.md +32 -1
- package/dist/content/agents/shared/injection-patterns.md +18 -7
- package/dist/content/agents/shared/principles.md +60 -0
- package/dist/content/agents/shared/prompt-structure.md +7 -1
- package/dist/content/agents/shared/quality-charter.md +48 -12
- package/dist/content/agents/shared/quality-specialist-frame.md +141 -0
- package/dist/content/agents/shared/rigor-contract.md +151 -0
- package/dist/content/agents/shared/severity-mapping.md +92 -0
- package/dist/content/agents/shared/triage-vocabulary.md +46 -0
- package/dist/content/agents/shared/user-content-templates.md +34 -8
- package/dist/content/agents/shared/user-question-protocol.md +45 -3
- package/dist/content/checks/README.md +5 -0
- package/dist/content/checks/accessibility.md +14 -7
- package/dist/content/checks/code-quality.md +1 -1
- package/dist/content/checks/performance.md +7 -4
- package/dist/content/checks/security.md +6 -6
- package/dist/content/checks/testing.md +1 -1
- package/dist/content/commands/board/pickup-delegation-multi.md +37 -10
- package/dist/content/commands/board/pickup-delegation.md +7 -5
- package/dist/content/commands/board/pickup-modes.md +1 -0
- package/dist/content/commands/board/pickup-post-impl.md +1 -1
- package/dist/content/commands/hatch3r-api-spec.md +79 -2
- package/dist/content/commands/hatch3r-auth-scaffold.md +250 -0
- package/dist/content/commands/hatch3r-benchmark.md +90 -7
- package/dist/content/commands/hatch3r-board-fill.md +97 -11
- package/dist/content/commands/hatch3r-board-pickup.md +93 -9
- package/dist/content/commands/hatch3r-bug-pipeline.md +240 -0
- package/dist/content/commands/hatch3r-bug-plan.md +79 -3
- package/dist/content/commands/hatch3r-codebase-map.md +80 -4
- package/dist/content/commands/hatch3r-create.md +105 -7
- package/dist/content/commands/hatch3r-debug.md +102 -14
- package/dist/content/commands/hatch3r-diagnose.md +238 -0
- package/dist/content/commands/hatch3r-feature-plan.md +125 -5
- package/dist/content/commands/hatch3r-handoff.md +83 -3
- package/dist/content/commands/hatch3r-healthcheck.md +105 -5
- package/dist/content/commands/hatch3r-incident-response.md +228 -0
- package/dist/content/commands/hatch3r-migration-plan.md +79 -3
- package/dist/content/commands/hatch3r-onboard.md +94 -3
- package/dist/content/commands/hatch3r-pack-install.md +243 -0
- package/dist/content/commands/hatch3r-pr-resolve.md +106 -23
- package/dist/content/commands/hatch3r-project-spec.md +82 -6
- package/dist/content/commands/hatch3r-quick-change.md +108 -13
- package/dist/content/commands/hatch3r-refactor-plan.md +78 -2
- package/dist/content/commands/hatch3r-release.md +401 -0
- package/dist/content/commands/hatch3r-revision.md +98 -12
- package/dist/content/commands/hatch3r-roadmap.md +92 -10
- package/dist/content/commands/hatch3r-security-audit.md +105 -5
- package/dist/content/commands/hatch3r-slo-scaffold.md +246 -0
- package/dist/content/commands/hatch3r-spec.md +216 -0
- package/dist/content/commands/hatch3r-test-plan.md +85 -9
- package/dist/content/commands/hatch3r-workflow.md +165 -41
- package/dist/content/commands/revision/revision-delegation.md +6 -5
- package/dist/content/commands/revision/revision-modes.md +49 -4
- package/dist/content/commands/revision/revision-quality.md +10 -7
- package/dist/content/commands/shared/orchestration-frame.md +119 -0
- package/dist/content/github-agents/hatch3r-docs-agent.md +21 -1
- package/dist/content/github-agents/hatch3r-lint-agent.md +21 -1
- package/dist/content/github-agents/hatch3r-security-agent.md +21 -1
- package/dist/content/github-agents/hatch3r-test-agent.md +21 -1
- package/dist/content/hooks/hatch3r-file-save.md +1 -1
- package/dist/content/hooks/hatch3r-pre-push.md +4 -4
- package/dist/content/hooks/hatch3r-review-loop-cap.md +52 -0
- package/dist/content/mcp/mcp.json +7 -5
- package/dist/content/rules/hatch3r-accessibility-standards.md +14 -2
- package/dist/content/rules/hatch3r-accessibility-standards.mdc +12 -1
- package/dist/content/rules/hatch3r-agent-orchestration-detail.md +58 -19
- package/dist/content/rules/hatch3r-agent-orchestration-detail.mdc +58 -19
- package/dist/content/rules/hatch3r-agent-orchestration.md +87 -213
- package/dist/content/rules/hatch3r-agent-orchestration.mdc +87 -213
- package/dist/content/rules/hatch3r-ai-evals.md +5 -4
- package/dist/content/rules/hatch3r-ai-evals.mdc +3 -3
- package/dist/content/rules/hatch3r-ai-ux-patterns.md +6 -2
- package/dist/content/rules/hatch3r-ai-ux-patterns.mdc +4 -1
- package/dist/content/rules/hatch3r-android-patterns.md +107 -0
- package/dist/content/rules/hatch3r-android-patterns.mdc +102 -0
- package/dist/content/rules/hatch3r-anti-duplication.md +115 -0
- package/dist/content/rules/hatch3r-anti-duplication.mdc +115 -0
- package/dist/content/rules/hatch3r-api-design.md +5 -1
- package/dist/content/rules/hatch3r-api-design.mdc +3 -0
- package/dist/content/rules/hatch3r-api-versioning.md +2 -1
- package/dist/content/rules/hatch3r-auth-patterns.md +3 -1
- package/dist/content/rules/hatch3r-auth-patterns.mdc +1 -0
- package/dist/content/rules/hatch3r-browser-verification.md +2 -0
- package/dist/content/rules/hatch3r-browser-verification.mdc +2 -0
- package/dist/content/rules/hatch3r-capability-matrix.md +108 -0
- package/dist/content/rules/hatch3r-capability-matrix.mdc +108 -0
- package/dist/content/rules/hatch3r-ci-cd.md +8 -1
- package/dist/content/rules/hatch3r-ci-cd.mdc +6 -0
- package/dist/content/rules/hatch3r-clarification-default.md +73 -0
- package/dist/content/rules/hatch3r-clarification-default.mdc +73 -0
- package/dist/content/rules/hatch3r-code-standards.md +23 -47
- package/dist/content/rules/hatch3r-code-standards.mdc +22 -46
- package/dist/content/rules/hatch3r-component-conventions.md +3 -0
- package/dist/content/rules/hatch3r-component-conventions.mdc +3 -0
- package/dist/content/rules/hatch3r-container-hardening.md +11 -2
- package/dist/content/rules/hatch3r-container-hardening.mdc +9 -1
- package/dist/content/rules/hatch3r-contract-testing.md +2 -1
- package/dist/content/rules/hatch3r-cost-visibility.md +135 -0
- package/dist/content/rules/hatch3r-cost-visibility.mdc +135 -0
- package/dist/content/rules/hatch3r-cq-rule-frame.md +54 -0
- package/dist/content/rules/hatch3r-cq-rule-frame.mdc +49 -0
- package/dist/content/rules/hatch3r-data-classification.md +3 -1
- package/dist/content/rules/hatch3r-data-classification.mdc +2 -1
- package/dist/content/rules/hatch3r-deep-context.md +13 -13
- package/dist/content/rules/hatch3r-deep-context.mdc +13 -13
- package/dist/content/rules/hatch3r-dependency-management.md +16 -3
- package/dist/content/rules/hatch3r-dependency-management.mdc +15 -3
- package/dist/content/rules/hatch3r-design-system-detection.md +2 -1
- package/dist/content/rules/hatch3r-dotnet-patterns.md +104 -0
- package/dist/content/rules/hatch3r-dotnet-patterns.mdc +99 -0
- package/dist/content/rules/hatch3r-edge-case-discipline.md +65 -0
- package/dist/content/rules/hatch3r-edge-case-discipline.mdc +65 -0
- package/dist/content/rules/hatch3r-enhancability.md +147 -0
- package/dist/content/rules/hatch3r-enhancability.mdc +142 -0
- package/dist/content/rules/hatch3r-event-schema-evolution.md +2 -1
- package/dist/content/rules/hatch3r-fan-out-discipline.md +91 -0
- package/dist/content/rules/hatch3r-fan-out-discipline.mdc +91 -0
- package/dist/content/rules/hatch3r-feature-flags.md +2 -0
- package/dist/content/rules/hatch3r-feature-flags.mdc +2 -0
- package/dist/content/rules/hatch3r-flutter-patterns.md +88 -0
- package/dist/content/rules/hatch3r-flutter-patterns.mdc +83 -0
- package/dist/content/rules/hatch3r-git-conventions.md +4 -1
- package/dist/content/rules/hatch3r-git-conventions.mdc +2 -0
- package/dist/content/rules/hatch3r-go-patterns.md +98 -0
- package/dist/content/rules/hatch3r-go-patterns.mdc +93 -0
- package/dist/content/rules/hatch3r-handoff-readiness.md +10 -0
- package/dist/content/rules/hatch3r-handoff-readiness.mdc +10 -0
- package/dist/content/rules/hatch3r-i18n.md +2 -0
- package/dist/content/rules/hatch3r-i18n.mdc +2 -0
- package/dist/content/rules/hatch3r-iteration-summary.md +75 -57
- package/dist/content/rules/hatch3r-iteration-summary.mdc +77 -54
- package/dist/content/rules/hatch3r-learning-system.md +202 -0
- package/dist/content/rules/hatch3r-learning-system.mdc +202 -0
- package/dist/content/rules/hatch3r-maintainability.md +157 -0
- package/dist/content/rules/hatch3r-maintainability.mdc +152 -0
- package/dist/content/rules/hatch3r-migrations.md +2 -1
- package/dist/content/rules/hatch3r-observability-logging.md +1 -1
- package/dist/content/rules/hatch3r-observability-metrics.md +1 -1
- package/dist/content/rules/hatch3r-observability-tracing.md +45 -36
- package/dist/content/rules/hatch3r-observability-tracing.mdc +44 -35
- package/dist/content/rules/hatch3r-operability.md +2 -1
- package/dist/content/rules/hatch3r-passkey-server.md +2 -1
- package/dist/content/rules/hatch3r-performance-budgets.md +2 -0
- package/dist/content/rules/hatch3r-performance-budgets.mdc +2 -0
- package/dist/content/rules/hatch3r-php-laravel-patterns.md +109 -0
- package/dist/content/rules/hatch3r-php-laravel-patterns.mdc +104 -0
- package/dist/content/rules/hatch3r-progressive-delivery.md +5 -1
- package/dist/content/rules/hatch3r-progressive-delivery.mdc +3 -0
- package/dist/content/rules/hatch3r-proof-model.md +131 -0
- package/dist/content/rules/hatch3r-proof-model.mdc +131 -0
- package/dist/content/rules/hatch3r-python-patterns.md +70 -0
- package/dist/content/rules/hatch3r-python-patterns.mdc +65 -0
- package/dist/content/rules/hatch3r-react-native-patterns.md +83 -0
- package/dist/content/rules/hatch3r-react-native-patterns.mdc +78 -0
- package/dist/content/rules/hatch3r-resilience-patterns.md +2 -1
- package/dist/content/rules/hatch3r-reviewer-calibration.md +84 -0
- package/dist/content/rules/hatch3r-reviewer-calibration.mdc +84 -0
- package/dist/content/rules/hatch3r-right-sizing.md +68 -0
- package/dist/content/rules/hatch3r-right-sizing.mdc +66 -0
- package/dist/content/rules/hatch3r-ruby-rails-patterns.md +111 -0
- package/dist/content/rules/hatch3r-ruby-rails-patterns.mdc +106 -0
- package/dist/content/rules/hatch3r-rust-patterns.md +107 -0
- package/dist/content/rules/hatch3r-rust-patterns.mdc +102 -0
- package/dist/content/rules/hatch3r-scalability.md +137 -0
- package/dist/content/rules/hatch3r-scalability.mdc +132 -0
- package/dist/content/rules/hatch3r-secrets-management.md +10 -1
- package/dist/content/rules/hatch3r-secrets-management.mdc +8 -0
- package/dist/content/rules/hatch3r-security-patterns.md +36 -34
- package/dist/content/rules/hatch3r-security-patterns.mdc +35 -34
- package/dist/content/rules/hatch3r-security.md +97 -0
- package/dist/content/rules/hatch3r-security.mdc +92 -0
- package/dist/content/rules/hatch3r-swiftui-patterns.md +98 -0
- package/dist/content/rules/hatch3r-swiftui-patterns.mdc +93 -0
- package/dist/content/rules/hatch3r-testability.md +115 -0
- package/dist/content/rules/hatch3r-testability.mdc +110 -0
- package/dist/content/rules/hatch3r-testing.md +4 -1
- package/dist/content/rules/hatch3r-testing.mdc +2 -0
- package/dist/content/rules/hatch3r-theming.md +2 -0
- package/dist/content/rules/hatch3r-theming.mdc +2 -0
- package/dist/content/rules/hatch3r-tool-currency.md +91 -0
- package/dist/content/rules/hatch3r-tool-currency.mdc +86 -0
- package/dist/content/rules/hatch3r-tooling-hierarchy.md +29 -31
- package/dist/content/rules/hatch3r-tooling-hierarchy.mdc +27 -30
- package/dist/content/rules/hatch3r-typescript-patterns.md +58 -0
- package/dist/content/rules/hatch3r-typescript-patterns.mdc +53 -0
- package/dist/content/rules/hatch3r-ux-states-and-flows.md +11 -4
- package/dist/content/rules/hatch3r-ux-states-and-flows.mdc +9 -3
- package/dist/content/skills/hatch3r-a11y-audit/SKILL.md +10 -8
- package/dist/content/skills/hatch3r-a11y-audit/references/manual-audit-checklist.md +7 -5
- package/dist/content/skills/hatch3r-adhoc-orchestrate/SKILL.md +131 -0
- package/dist/content/skills/hatch3r-ai-feature/SKILL.md +4 -6
- package/dist/content/skills/hatch3r-api-spec/SKILL.md +27 -2
- package/dist/content/skills/hatch3r-architecture-review/SKILL.md +4 -7
- package/dist/content/skills/hatch3r-board-groom/SKILL.md +11 -0
- package/dist/content/skills/hatch3r-board-init/SKILL.md +17 -1
- package/dist/content/skills/hatch3r-board-refresh/SKILL.md +12 -1
- package/dist/content/skills/hatch3r-board-shared/SKILL.md +38 -1
- package/dist/content/skills/hatch3r-browser-verify/SKILL.md +307 -0
- package/dist/content/skills/hatch3r-bug-fix/SKILL.md +15 -2
- package/dist/content/skills/hatch3r-ci-pipeline/SKILL.md +17 -7
- package/dist/content/skills/hatch3r-cli-fd/SKILL.md +33 -1
- package/dist/content/skills/hatch3r-cli-fzf/SKILL.md +33 -1
- package/dist/content/skills/hatch3r-cli-gh/SKILL.md +50 -1
- package/dist/content/skills/hatch3r-cli-jq/SKILL.md +40 -6
- package/dist/content/skills/hatch3r-cli-ripgrep/SKILL.md +33 -1
- package/dist/content/skills/hatch3r-cli-toolbox/SKILL.md +130 -23
- package/dist/content/skills/hatch3r-containerize/SKILL.md +157 -0
- package/dist/content/skills/hatch3r-context-health/SKILL.md +9 -7
- package/dist/content/skills/hatch3r-cost-tracking/SKILL.md +37 -17
- package/dist/content/skills/hatch3r-customize/SKILL.md +5 -8
- package/dist/content/skills/hatch3r-dep-audit/SKILL.md +23 -7
- package/dist/content/skills/hatch3r-design-system-detect/SKILL.md +3 -7
- package/dist/content/skills/hatch3r-docs-writing/SKILL.md +159 -0
- package/dist/content/skills/hatch3r-enhancability-verify/SKILL.md +152 -0
- package/dist/content/skills/hatch3r-feature/SKILL.md +53 -3
- package/dist/content/skills/hatch3r-feedback/SKILL.md +103 -0
- package/dist/content/skills/hatch3r-gh-agentic-workflows/SKILL.md +10 -8
- package/dist/content/skills/hatch3r-handoff-prepare/SKILL.md +4 -7
- package/dist/content/skills/hatch3r-handoff-resume/SKILL.md +4 -7
- package/dist/content/{commands/hatch3r-hooks.md → skills/hatch3r-hooks/SKILL.md} +48 -137
- package/dist/content/skills/hatch3r-incident-response/SKILL.md +66 -7
- package/dist/content/skills/hatch3r-issue-workflow/SKILL.md +11 -0
- package/dist/content/skills/hatch3r-learn/SKILL.md +317 -0
- package/dist/content/skills/hatch3r-logical-refactor/SKILL.md +6 -7
- package/dist/content/skills/hatch3r-maintainability-verify/SKILL.md +146 -0
- package/dist/content/skills/hatch3r-migration/SKILL.md +8 -7
- package/dist/content/skills/hatch3r-observability-verify/SKILL.md +17 -12
- package/dist/content/skills/hatch3r-perf-audit/SKILL.md +13 -9
- package/dist/content/skills/hatch3r-pr-creation/SKILL.md +4 -7
- package/dist/content/skills/hatch3r-qa-validation/SKILL.md +6 -5
- package/dist/content/skills/hatch3r-recipe/SKILL.md +63 -60
- package/dist/content/skills/hatch3r-refactor/SKILL.md +6 -7
- package/dist/content/skills/hatch3r-release/SKILL.md +123 -11
- package/dist/content/skills/hatch3r-reliability-verify/SKILL.md +9 -5
- package/dist/content/{commands/hatch3r-report.md → skills/hatch3r-report/SKILL.md} +20 -17
- package/dist/content/skills/hatch3r-scalability-verify/SKILL.md +145 -0
- package/dist/content/skills/hatch3r-security-verify/SKILL.md +144 -0
- package/dist/content/skills/hatch3r-team-convention-author/SKILL.md +126 -0
- package/dist/content/skills/hatch3r-testability-verify/SKILL.md +147 -0
- package/dist/content/skills/hatch3r-ui-ux-verify/SKILL.md +19 -11
- package/dist/content/skills/hatch3r-visual-refactor/SKILL.md +11 -7
- package/package.json +50 -31
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js.map +0 -1
- package/dist/content/agents/hatch3r-a11y-auditor.md +0 -159
- package/dist/content/agents/hatch3r-dependency-auditor.md +0 -219
- package/dist/content/agents/hatch3r-perf-profiler.md +0 -166
- package/dist/content/agents/hatch3r-security-auditor.md +0 -180
- package/dist/content/agents/hatch3r-test-writer.md +0 -171
- package/dist/content/commands/hatch3r-learn.md +0 -312
- package/dist/content/rules/hatch3r-learning-consult.md +0 -42
- package/dist/content/rules/hatch3r-learning-consult.mdc +0 -38
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-browser-verify
|
|
3
|
+
name: hatch3r-browser-verify
|
|
4
|
+
type: skill
|
|
5
|
+
description: Opt-in browser verification skill — Playwright-driven visual checks, axe-core a11y audits, screenshot regression diffs, and E2E test scaffolds. Default ON for UI-affecting agent invocations; disable globally via hatch3r config browser=off.
|
|
6
|
+
tags: [browser, playwright, accessibility, visual-regression, floor:content-quality]
|
|
7
|
+
pillars:
|
|
8
|
+
governance: [P2]
|
|
9
|
+
content-quality: [CQ1, CQ2, CQ7]
|
|
10
|
+
quality_charter: agents/shared/quality-charter.md
|
|
11
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
12
|
+
efficiency_tier: standard
|
|
13
|
+
cache_friendly: true
|
|
14
|
+
parallel_tool_default: true
|
|
15
|
+
opt_in: true
|
|
16
|
+
default_on_for: [hatch3r-ui, hatch3r-ux]
|
|
17
|
+
disable_via: hatch3r config browser=off
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Skill: hatch3r-browser-verify
|
|
21
|
+
|
|
22
|
+
> Last updated: 2026-05-26
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
Invoke this skill whenever a UI-affecting change reaches a verification gate — specifically when `agents/hatch3r-ui.md` or `agents/hatch3r-ux.md` runs against a built artifact. The skill is default ON for those two agents (frontmatter `browser_capability: opt-in`) and OFF elsewhere. Disable globally with `hatch3r config browser=off`; disable per-invocation with `--no-browser`.
|
|
27
|
+
|
|
28
|
+
Four capabilities, run in order or independently:
|
|
29
|
+
|
|
30
|
+
1. **Visual verification** — per-route screenshot capture against a built artifact.
|
|
31
|
+
2. **Accessibility audit** — axe-core via `@axe-core/playwright` with 0 serious + 0 critical gate per `rules/hatch3r-accessibility-standards.md`.
|
|
32
|
+
3. **Regression screenshot diffs** — `toHaveScreenshot()` with threshold + masks for dynamic content.
|
|
33
|
+
4. **E2E test scaffolds** — generate a starter spec under `tests/e2e/<feature>.spec.ts`.
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Task Progress:
|
|
37
|
+
- [ ] Step 0: Detect ambiguity (P8 B1)
|
|
38
|
+
- [ ] Step 1: Install Playwright + axe-core (if not present)
|
|
39
|
+
- [ ] Step 2: Visual verification of UI changes
|
|
40
|
+
- [ ] Step 3: Accessibility audit via axe-core + Playwright
|
|
41
|
+
- [ ] Step 4: Regression screenshot diffs
|
|
42
|
+
- [ ] Step 5: E2E test authoring scaffold
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Step 0 — Detect Ambiguity (P8 B1)
|
|
46
|
+
|
|
47
|
+
Before any browser action, scan the invocation for unresolved questions per `agents/shared/user-question-protocol.md`. Triggers: which build artifact to verify against (dev server vs `npm run build` output vs deployed preview URL), which routes are in scope, headed vs headless, whether to install browser binaries when missing, and which baseline branch supplies the screenshot reference set. Ask one multiple-choice question per turn; declare the default-if-no-response.
|
|
48
|
+
|
|
49
|
+
## Fan-out Discipline (P8 B2)
|
|
50
|
+
|
|
51
|
+
Fan-out scales with task size; token cost never justifies serializing independent work (`rules/hatch3r-fan-out-discipline.md` P8 B2; `agents/shared/efficiency-patterns.md`). Emit `sub_agents_spawned: { count, rationale }` in your output.
|
|
52
|
+
|
|
53
|
+
## Invoked by
|
|
54
|
+
|
|
55
|
+
This skill is the verification HARNESS for the browser sub-vector of CQ1 — it declares HOW Playwright-driven visual, a11y, regression, and E2E checks run against a built artifact. The DISPATCHER that decides WHEN to run it is the CQ specialist agent:
|
|
56
|
+
|
|
57
|
+
- `agents/hatch3r-ui.md` — invokes this skill when a UI-affecting change reaches a verification gate (frontmatter `default_on_for: [hatch3r-ui, hatch3r-ux]`). The agent contributes the review trigger; this skill contributes the Playwright + axe-core procedure.
|
|
58
|
+
|
|
59
|
+
Kept standalone (not merged into `hatch3r-ui-ux-verify`): Playwright is also a general `hatch3r-feature` workflow tool, not exclusively a CQ1 gate. No duplication: the agent decides WHEN, this skill defines HOW.
|
|
60
|
+
|
|
61
|
+
## Step 1: Install Playwright (if not present)
|
|
62
|
+
|
|
63
|
+
Detection first — skip install if `@playwright/test` is already in `devDependencies` of `package.json`:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
jq -r '.devDependencies["@playwright/test"], .devDependencies["@axe-core/playwright"]' package.json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If either returns `null`, ask the user before installing (binaries are large; user machine state changes). On confirmation, pin to the tested-against versions (see Configuration "Tested-against versions" row) so verification outcomes and the bundled Chromium CVE surface stay reproducible across machines:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
npm install -D @playwright/test@~1.60.0 @axe-core/playwright@~4.11.3
|
|
73
|
+
npx playwright install chromium
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The `~` pin floats patch releases within the tested minor line but blocks an uncontrolled minor bump that would swap the bundled Chromium build (and its CVE exposure) out from under the verification gate. Bump the pin deliberately when upstream Playwright ships a Chromium roll that closes a tracked advisory — see "Known Issues — Browser CVE Awareness".
|
|
77
|
+
|
|
78
|
+
Use Chromium-only by default — adds ~280MB. Add `firefox` and `webkit` only when the project's browser-support matrix demands them. Record the installed Playwright version AND the bundled Chromium revision (`npx playwright --version` plus `cat node_modules/playwright-core/browsers.json | jq '.browsers[] | select(.name=="chromium")'`) in the verification output for traceability. See "Known Issues — Browser CVE Awareness" below before targeting untrusted or third-party content; the bundled Chromium is intentionally not a security boundary per upstream maintainer guidance.
|
|
79
|
+
|
|
80
|
+
## Step 2: Visual verification of UI changes
|
|
81
|
+
|
|
82
|
+
Run against the built artifact (not the dev server) so the verification matches the release surface. Production builds catch tree-shaking regressions, CSS purge mistakes, and asset-pipeline drift that dev servers hide.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
npm run build
|
|
86
|
+
npm run preview & # or `npx serve dist` for static builds
|
|
87
|
+
PREVIEW_PID=$!
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Capture per-route screenshots into `.audit-workspace/visual/<timestamp>/`:
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
// tests/visual/capture.spec.ts
|
|
94
|
+
import { test, expect } from '@playwright/test';
|
|
95
|
+
|
|
96
|
+
const routes = ['/', '/dashboard', '/settings', '/onboarding'];
|
|
97
|
+
|
|
98
|
+
for (const route of routes) {
|
|
99
|
+
test(`capture ${route}`, async ({ page }) => {
|
|
100
|
+
await page.goto(`http://localhost:4173${route}`);
|
|
101
|
+
await page.waitForLoadState('networkidle');
|
|
102
|
+
await page.screenshot({
|
|
103
|
+
path: `.audit-workspace/visual/${Date.now()}/${route.replace(/\//g, '_') || 'root'}.png`,
|
|
104
|
+
fullPage: true,
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
After capture: `kill $PREVIEW_PID`. Attach the screenshot directory path to the verification output so reviewers can open the images directly.
|
|
111
|
+
|
|
112
|
+
## Step 3: Accessibility audit via axe-core + Playwright
|
|
113
|
+
|
|
114
|
+
Gate: 0 serious + 0 critical violations per route per `rules/hatch3r-accessibility-standards.md`. Moderate violations are recorded but do not fail the gate — they feed the next CQ1 audit cycle.
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
// tests/a11y/audit.spec.ts
|
|
118
|
+
import { test, expect } from '@playwright/test';
|
|
119
|
+
import AxeBuilder from '@axe-core/playwright';
|
|
120
|
+
|
|
121
|
+
const routes = ['/', '/dashboard', '/settings', '/onboarding'];
|
|
122
|
+
|
|
123
|
+
for (const route of routes) {
|
|
124
|
+
test(`a11y ${route}`, async ({ page }) => {
|
|
125
|
+
await page.goto(`http://localhost:4173${route}`);
|
|
126
|
+
await page.waitForLoadState('networkidle');
|
|
127
|
+
|
|
128
|
+
const results = await new AxeBuilder({ page })
|
|
129
|
+
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'])
|
|
130
|
+
.analyze();
|
|
131
|
+
|
|
132
|
+
const blocking = results.violations.filter(
|
|
133
|
+
(v) => v.impact === 'serious' || v.impact === 'critical',
|
|
134
|
+
);
|
|
135
|
+
expect(blocking, JSON.stringify(blocking, null, 2)).toEqual([]);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Run: `npx playwright test tests/a11y --reporter=json > .audit-workspace/a11y-results.json`.
|
|
141
|
+
|
|
142
|
+
Per-cycle reminder: axe-core automated checks cover roughly 57% of WCAG issues by volume (Deque Systems). The remaining ~43% require a keyboard trace (`hatch3r-ui` Step) plus one human screen-reader pass per release per `agents/shared/quality-charter.md` §UI/UX quality verification gate.
|
|
143
|
+
|
|
144
|
+
## Step 4: Regression screenshot diffs
|
|
145
|
+
|
|
146
|
+
Use `toHaveScreenshot()` for pixel-diff comparison against a baseline. First run produces baselines under `tests/__screenshots__/`; subsequent runs compare.
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
// tests/visual/regression.spec.ts
|
|
150
|
+
import { test, expect } from '@playwright/test';
|
|
151
|
+
|
|
152
|
+
test('dashboard regression', async ({ page }) => {
|
|
153
|
+
await page.goto('http://localhost:4173/dashboard');
|
|
154
|
+
await page.waitForLoadState('networkidle');
|
|
155
|
+
|
|
156
|
+
await expect(page).toHaveScreenshot('dashboard.png', {
|
|
157
|
+
fullPage: true,
|
|
158
|
+
maxDiffPixelRatio: 0.01, // 1% pixel tolerance for sub-pixel font rendering
|
|
159
|
+
threshold: 0.2, // YIQ color delta tolerance
|
|
160
|
+
mask: [
|
|
161
|
+
page.locator('[data-testid="timestamp"]'),
|
|
162
|
+
page.locator('[data-testid="user-avatar"]'),
|
|
163
|
+
], // mask non-deterministic regions
|
|
164
|
+
animations: 'disabled', // disable CSS animations during capture
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Update baselines deliberately after intentional UI changes:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
npx playwright test tests/visual --update-snapshots
|
|
173
|
+
git add tests/__screenshots__/
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Commit the baseline diff in the same PR as the UI change so reviewers can verify the visual delta is intentional.
|
|
177
|
+
|
|
178
|
+
## Step 5: E2E test authoring scaffold
|
|
179
|
+
|
|
180
|
+
When a new feature ships, emit a starter spec at `tests/e2e/<feature>.spec.ts`. The scaffold covers happy path + one error path + one keyboard-only path — the minimum surface to gate the CQ2 error-recovery + first-run-success metrics.
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
// tests/e2e/<feature>.spec.ts
|
|
184
|
+
import { test, expect } from '@playwright/test';
|
|
185
|
+
|
|
186
|
+
test.describe('<feature>', () => {
|
|
187
|
+
test('happy path produces expected outcome', async ({ page }) => {
|
|
188
|
+
await page.goto('/<feature-entry>');
|
|
189
|
+
// arrange: seed required state
|
|
190
|
+
// act: drive the user flow
|
|
191
|
+
// assert: outcome visible to user + URL or DOM state matches spec
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
test('error recovery shows actionable next step', async ({ page }) => {
|
|
195
|
+
await page.goto('/<feature-entry>');
|
|
196
|
+
// force the error path (network failure, validation rejection)
|
|
197
|
+
await expect(page.getByRole('alert')).toBeVisible();
|
|
198
|
+
await expect(page.getByRole('button', { name: /retry|try again/i })).toBeVisible();
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
test('keyboard-only completes the flow', async ({ page }) => {
|
|
202
|
+
await page.goto('/<feature-entry>');
|
|
203
|
+
await page.keyboard.press('Tab'); // first interactive element
|
|
204
|
+
// ...drive through Tab + Enter only; assert outcome
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Cross-reference the scaffold in the PR description and link it to the feature ticket so the maintainer can flesh it out before merge.
|
|
210
|
+
|
|
211
|
+
## Configuration
|
|
212
|
+
|
|
213
|
+
| Setting | Default | Override |
|
|
214
|
+
|---------|---------|----------|
|
|
215
|
+
| Browser verification globally | enabled | `hatch3r config browser=off` (writes `.hatch3r/hatch.json` schemaVersion 3; re-enable with `browser=on`) |
|
|
216
|
+
| Default ON for agent | `hatch3r-ui`, `hatch3r-ux` (frontmatter `browser_capability: opt-in`) | per-invocation `--no-browser` |
|
|
217
|
+
| Browser binary scope | Chromium only | `npx playwright install firefox webkit` |
|
|
218
|
+
| Build artifact source | `npm run build` + `npm run preview` | `--target-url=<url>` for deployed preview |
|
|
219
|
+
| Screenshot baseline | branch `main` | `--baseline=<ref>` |
|
|
220
|
+
| Pixel-diff tolerance | `maxDiffPixelRatio: 0.01`, `threshold: 0.2` | per-test override in spec |
|
|
221
|
+
| `minBrowserVersion` advisory | Chromium ≥145.0.7632.75 (CVE-2026-2441 fix floor; bundled with Playwright ≥1.59.0) | bump when upstream Chrome stable channel ships a new high-severity advisory; verify via `npx playwright --version` + `node_modules/playwright-core/browsers.json` |
|
|
222
|
+
| Tested-against versions | `@playwright/test@~1.60.0` (bundled Chromium 148.0.7778.96) + `@axe-core/playwright@~4.11.3` — cycle 10, verified 2026-05-27 | re-pin on the next D21 cycle when upstream releases a Playwright minor that rolls Chromium past a tracked advisory |
|
|
223
|
+
| Trust posture for `target_url` | first-party content only | use `channel: "chrome"` (or `channel: "chromium-tip-of-tree"`) when the verified UI loads third-party scripts/iframes — see "Known Issues — Browser CVE Awareness" |
|
|
224
|
+
|
|
225
|
+
## Output contract
|
|
226
|
+
|
|
227
|
+
Return structured result with proof_trace per state-dependent claim:
|
|
228
|
+
|
|
229
|
+
```yaml
|
|
230
|
+
skill: hatch3r-browser-verify
|
|
231
|
+
run_id: <uuid>
|
|
232
|
+
playwright_version: <semver>
|
|
233
|
+
target_url: <http://localhost:4173 | deployed-preview-url>
|
|
234
|
+
sub_agents_spawned:
|
|
235
|
+
count: <int>
|
|
236
|
+
rationale: <one-sentence justification>
|
|
237
|
+
capabilities_executed: [visual, a11y, regression, e2e-scaffold]
|
|
238
|
+
results:
|
|
239
|
+
visual:
|
|
240
|
+
routes_captured: <int>
|
|
241
|
+
output_dir: .audit-workspace/visual/<timestamp>/
|
|
242
|
+
a11y:
|
|
243
|
+
routes_audited: <int>
|
|
244
|
+
serious_critical_violations: <int>
|
|
245
|
+
proof_trace: .audit-workspace/a11y-results.json
|
|
246
|
+
gate_status: PASS | FAIL
|
|
247
|
+
regression:
|
|
248
|
+
snapshots_compared: <int>
|
|
249
|
+
diffs_above_threshold: <int>
|
|
250
|
+
diff_artifacts: tests/__screenshots__/**/diff.png
|
|
251
|
+
e2e_scaffold:
|
|
252
|
+
file_path: tests/e2e/<feature>.spec.ts
|
|
253
|
+
test_count: 3
|
|
254
|
+
verification:
|
|
255
|
+
build_artifact_used: <bool> # true = npm run build output; false = dev server
|
|
256
|
+
baseline_branch: <ref>
|
|
257
|
+
binaries_installed_this_run: <bool>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Every state-dependent claim (violation count, diff count, screenshot path) carries a `proof_trace` pointer to the artifact on disk so reviewers can re-open it.
|
|
261
|
+
|
|
262
|
+
## Known Issues — Browser CVE Awareness
|
|
263
|
+
|
|
264
|
+
The Chromium binary bundled with `npx playwright install chromium` rolls on Playwright's release cadence (roughly every 4–6 weeks), not Chrome's stable channel cadence (typically weekly for security patches). This means there is a window after each Chrome stable advisory during which `npx playwright install chromium` ships a Chromium build that lacks the latest fixes.
|
|
265
|
+
|
|
266
|
+
Upstream maintainer position (microsoft/playwright issue #39574, closed 2026-04-03 by maintainer): "We assume that the browsers downloaded with Playwright are used for first-party content and are not serving a security boundary. Once you target untrusted content, you should secure your system with a VM, even if Chrome you are using does not suffer from any CVEs."
|
|
267
|
+
|
|
268
|
+
What this means for verification runs:
|
|
269
|
+
|
|
270
|
+
- **First-party content (your own built artifact, no third-party iframes/scripts):** bundled Chromium is the supported path; verify the installed version against the Chromium roll line in the Playwright release notes for your installed Playwright version.
|
|
271
|
+
- **Third-party content (CMS embeds, analytics, marketing tags, deployed previews loading external assets):** switch to `channel: "chrome"` or `channel: "chromium-tip-of-tree"` in `playwright.config.ts`, OR run the verification under a VM/container with a hardened sandbox boundary. Bundled Chromium is explicitly NOT a security boundary for attacker-reachable surfaces.
|
|
272
|
+
- **Active-exploit watch:** historical reference — CVE-2026-2441 (CSS use-after-free, Chrome Threat Analysis Group flagged active exploitation; CISA KEV added 2026-02-17, due date 2026-03-10) was patched in Chromium 145.0.7632.75 per https://nvd.nist.gov/vuln/detail/CVE-2026-2441 (accessed 2026-05-27) and reached Playwright users in 1.59.0 (Chromium 141.0.7390.37 → rolled forward; later 1.60.0 ships 148.0.7778.96). The Playwright-release-to-Chrome-stable gap is the recurring exposure pattern this section guards against, not a single CVE.
|
|
273
|
+
- **Per-cycle hygiene:** before a release-gate verification run, check https://playwright.dev/docs/release-notes for the bundled Chromium revision in your installed Playwright version, then cross-reference https://chromereleases.googleblog.com/search/label/Stable%20updates for any post-bundle-cut advisories. If a Critical/High Chrome advisory landed after the Playwright bundle cut, either upgrade Playwright (when a roll is available) OR set `channel: "chrome"` for the run.
|
|
274
|
+
|
|
275
|
+
## When to disable
|
|
276
|
+
|
|
277
|
+
- **Headless CI environments without GPU** — fall back to axe-core CLI on serialized HTML (`@axe-core/cli`) when GPU-backed rendering is unavailable.
|
|
278
|
+
- **Initial bootstrap before any UI exists** — `npx hatch3r init` on an empty repo has no surface to verify; skill stays dormant until first UI commit.
|
|
279
|
+
- **Explicit user opt-out per CONSTITUTION §6 / VISION CLI scope** — `hatch3r config browser=off` respected unconditionally.
|
|
280
|
+
- **`hatch3r-ui` or `hatch3r-ux` invoked on non-UI scope** — e.g., a commit touching only `src/api/`. The opt-in flag is honored only when the agent's actual scope includes UI files.
|
|
281
|
+
|
|
282
|
+
## Boundaries
|
|
283
|
+
|
|
284
|
+
- **Always** — run against the built artifact (`npm run build` output) for release-verification gates. Dev-server verification is acceptable for in-flight implementation feedback only.
|
|
285
|
+
- **Ask first** — before installing browser binaries on the user's machine (~280MB for Chromium). One multiple-choice prompt per `agents/shared/user-question-protocol.md`.
|
|
286
|
+
- **Never** — skip axe-core when UI verification is in scope. CQ1 gate requires 0 serious + 0 critical violations per route; skipping the audit is a self-declared gate failure.
|
|
287
|
+
- **Never** — overwrite screenshot baselines without an explicit `--update-snapshots` run signed off by the maintainer. Drift in baselines silently passes regressions.
|
|
288
|
+
|
|
289
|
+
## Cross-references
|
|
290
|
+
|
|
291
|
+
- `rules/hatch3r-accessibility-standards.md` — WCAG 2.2 AA conformance gate (0 serious + 0 critical)
|
|
292
|
+
- `agents/hatch3r-ui.md` — CQ1 specialist; this skill is its primary verification engine
|
|
293
|
+
- `agents/hatch3r-ux.md` — CQ2 specialist; consumes the E2E scaffold + a11y audit
|
|
294
|
+
- `agents/shared/quality-charter.md` §UI/UX quality — the verification gate definition this skill implements
|
|
295
|
+
- `skills/hatch3r-ui-ux-verify` — sibling skill orchestrating the 9-gate release check; this skill provides gates 1, 3, 5
|
|
296
|
+
|
|
297
|
+
## References
|
|
298
|
+
|
|
299
|
+
- [Playwright Accessibility Testing](https://playwright.dev/docs/accessibility-testing) — official `@axe-core/playwright` integration guide. Accessed 2026-05-26. Trust tier: vendor-official.
|
|
300
|
+
- [Playwright Visual Comparisons](https://playwright.dev/docs/test-snapshots) — `toHaveScreenshot()` API, masks, threshold, `--update-snapshots`. Accessed 2026-05-26. Trust tier: vendor-official.
|
|
301
|
+
- [Playwright SnapshotAssertions API](https://playwright.dev/docs/api/class-snapshotassertions) — full option surface (`maxDiffPixels`, `maxDiffPixelRatio`, `threshold`, `animations`). Accessed 2026-05-26. Trust tier: vendor-official.
|
|
302
|
+
- [@axe-core/playwright on npm](https://www.npmjs.com/package/axe-playwright) — package metadata, current version, weekly downloads. Accessed 2026-05-26. Trust tier: registry-official.
|
|
303
|
+
- [Deque DevTools for Web — Playwright integration](https://docs.deque.com/devtools-for-web/4/en/node-pl-write-tests/) — `withTags`, WCAG 2.2 tag mapping, violation severity model. Accessed 2026-05-26. Trust tier: vendor-maintainer (Deque is axe-core author).
|
|
304
|
+
- [microsoft/playwright issue #39574](https://github.com/microsoft/playwright/issues/39574) — upstream maintainer stance on bundled Chromium as non-security-boundary; recommends `channel: "chrome"` for untrusted-content verification. Closed 2026-04-03 (state COMPLETED). Accessed 2026-05-27. Trust tier: vendor-official.
|
|
305
|
+
- [CVE-2026-2441 (NVD)](https://nvd.nist.gov/vuln/detail/CVE-2026-2441) — Chromium CSS use-after-free, Chromium fix in 145.0.7632.75; CISA KEV addition 2026-02-17. Accessed 2026-05-27. Trust tier: official-feed.
|
|
306
|
+
- [Playwright `channel` option (BrowserType.launch)](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-channel) — `chrome`, `chromium-tip-of-tree`, `msedge` channel switches for untrusted-content verification. Accessed 2026-05-27. Trust tier: vendor-official.
|
|
307
|
+
- [Chrome Releases — Stable channel updates](https://chromereleases.googleblog.com/search/label/Stable%20updates) — Chrome stable channel advisory feed; cross-reference per-cycle against your installed Playwright's bundled Chromium revision. Accessed 2026-05-27. Trust tier: vendor-official.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: hatch3r-bug-fix
|
|
3
|
+
name: hatch3r-bug-fix
|
|
4
|
+
type: skill
|
|
3
5
|
description: Step-by-step bug fix workflow. Diagnose root cause, implement minimal fix, write regression test. Use when fixing bugs, working on bug report issues, or when the user mentions a bug.
|
|
4
6
|
tags: [implementation, orchestration]
|
|
5
7
|
quality_charter: agents/shared/quality-charter.md
|
|
@@ -93,9 +95,11 @@ Skip TDD and use the standard flow (Steps 3→4) when:
|
|
|
93
95
|
## Step 5: Verify
|
|
94
96
|
|
|
95
97
|
```bash
|
|
96
|
-
|
|
98
|
+
${HATCH3R:VERIFY_GATE_ALL}
|
|
97
99
|
```
|
|
98
100
|
|
|
101
|
+
Resolved to the project's language-aware gate at sync time (fallback when detection is unknown: `npm run lint && npm run typecheck && npm run test`).
|
|
102
|
+
|
|
99
103
|
## Step 5b: Browser Verification (if UI Bug)
|
|
100
104
|
|
|
101
105
|
Skip this step if the bug had no visual or interactive symptoms.
|
|
@@ -115,6 +119,15 @@ Use the project's PR template. Include:
|
|
|
115
119
|
- Test evidence
|
|
116
120
|
- Rollback plan (required for P0/P1)
|
|
117
121
|
|
|
122
|
+
## Fan-out Discipline (P8 B2)
|
|
123
|
+
|
|
124
|
+
Fan-out scales with task size; token cost never justifies serializing independent work (`rules/hatch3r-fan-out-discipline.md` P8 B2; `agents/shared/efficiency-patterns.md`). Tier boundaries for THIS skill:
|
|
125
|
+
- Tier 1 (trivial single-file fix): inline.
|
|
126
|
+
- Tier 2 (multi-file or multi-concern fix): spawn parallel sub-agents per concern (researcher, implementer, reviewer, hatch3r-testability) via the Task tool.
|
|
127
|
+
- Tier 3 (multi-module / high-risk fix): one fresh sub-agent per independent module or gate; orchestrator integrates only.
|
|
128
|
+
|
|
129
|
+
Emit `sub_agents_spawned: { count, rationale }` in your output.
|
|
130
|
+
|
|
118
131
|
## Required Agent Delegation
|
|
119
132
|
|
|
120
133
|
> **Note:** When this skill is invoked via the orchestration pipeline (board-pickup or workflow commands), skip this section — the orchestrator handles agent delegation in Phases 3 and 4.
|
|
@@ -122,7 +135,7 @@ Use the project's PR template. Include:
|
|
|
122
135
|
You MUST spawn these agents via the Task tool (`subagent_type: "generalPurpose"`) at the appropriate points:
|
|
123
136
|
|
|
124
137
|
- **`hatch3r-researcher`** — MUST spawn before implementation with modes `symptom-trace`, `root-cause`, `codebase-impact`. For Tier 2+ tasks (per `hatch3r-deep-context`), also include `requirements-elicitation` (bugs often have underspecified reproduction steps and ambiguous expected behavior). Skip only for trivially simple bugs (`risk:low` AND `priority:p3`).
|
|
125
|
-
- **`hatch3r-
|
|
138
|
+
- **`hatch3r-testability`** (CQ5) — MUST spawn after fix implementation to author regression tests covering the fixed behavior and related edge cases and verify they meet the mandate map / coverage floor.
|
|
126
139
|
- **`hatch3r-reviewer`** — MUST spawn after implementation for code review before PR creation.
|
|
127
140
|
|
|
128
141
|
## Related Skills
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: hatch3r-ci-pipeline
|
|
3
|
+
name: hatch3r-ci-pipeline
|
|
3
4
|
type: skill
|
|
4
|
-
description:
|
|
5
|
+
description: Designs and optimizes CI/CD pipelines. Covers stage design, test parallelization, artifact management, and pipeline performance.
|
|
5
6
|
tags: [devops]
|
|
6
7
|
quality_charter: agents/shared/quality-charter.md
|
|
7
8
|
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
@@ -28,12 +29,7 @@ Before any work, scan the invocation for unresolved questions in scope, intent,
|
|
|
28
29
|
|
|
29
30
|
## Fan-out Discipline (P8 B2)
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
- Tier 1 (trivial single-file): inline execution acceptable.
|
|
33
|
-
- Tier 2 (multi-file or multi-concern): spawn parallel sub-agents per concern via the Task tool.
|
|
34
|
-
- Tier 3 (multi-module / high-risk): one fresh sub-agent per independent module or gate; orchestrator integrates only.
|
|
35
|
-
|
|
36
|
-
Never under-fan-out to save tokens. Token cost is dominated by quality and completeness gains. Emit `sub_agents_spawned: { count, rationale }` in your output.
|
|
32
|
+
Fan-out scales with task size; token cost never justifies serializing independent work (`rules/hatch3r-fan-out-discipline.md` P8 B2; `agents/shared/efficiency-patterns.md`). Emit `sub_agents_spawned: { count, rationale }` in your output.
|
|
37
33
|
|
|
38
34
|
## Step 1: Audit Existing Pipeline
|
|
39
35
|
|
|
@@ -75,6 +71,15 @@ Never under-fan-out to save tokens. Token cost is dominated by quality and compl
|
|
|
75
71
|
- Measure pipeline duration improvement against the baseline from Step 1.
|
|
76
72
|
- Document the pipeline architecture for the team.
|
|
77
73
|
|
|
74
|
+
## Supply-Chain Floor
|
|
75
|
+
|
|
76
|
+
A CI/CD pipeline is the supply-chain attack surface — design the floor in, do not bolt it on. The glob-scoped floor rules attach when you edit a workflow or Dockerfile; this callout surfaces them at pipeline-design time so the controls are planned, not discovered. Apply both rules as authored — this section cross-references, it does not restate:
|
|
77
|
+
|
|
78
|
+
- `rules/hatch3r-dependency-management.md` — SHA-pin every GitHub Action to a 40-char commit SHA (not a tag); `npm ci` / lockfile-only installs; CVE scan gate before merge; npm Trusted Publishing via GitHub OIDC with `--provenance` (no long-lived publish token), attestations signed by Sigstore.
|
|
79
|
+
- `rules/hatch3r-container-hardening.md` — pin base images by `@sha256:` digest; generate an SBOM (CycloneDX or SPDX) in the build stage; cosign-sign images and verify by digest at deploy; distroless / Wolfi runtime, non-root user.
|
|
80
|
+
|
|
81
|
+
Gate releases on these the same way Step 2 gates deploys on quality checks: a release stage that publishes without provenance + SBOM, or pulls an unpinned action / untagged base image, fails the gate.
|
|
82
|
+
|
|
78
83
|
## Pipeline Performance Targets
|
|
79
84
|
|
|
80
85
|
| Metric | Target |
|
|
@@ -98,3 +103,8 @@ Never under-fan-out to save tokens. Token cost is dominated by quality and compl
|
|
|
98
103
|
- [ ] Artifact management with retention policies
|
|
99
104
|
- [ ] Pipeline duration meets performance targets
|
|
100
105
|
- [ ] Documentation updated with pipeline architecture
|
|
106
|
+
|
|
107
|
+
## References
|
|
108
|
+
|
|
109
|
+
- [Caching dependencies to speed up workflows — GitHub Actions docs](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows) — accessed 2026-05-31, official-docs (GitHub). Source for the lockfile-hash cache-key strategy and cache-hit reporting behind the >80% cache-hit-ratio target.
|
|
110
|
+
- [actionlint — GitHub Actions workflow linter](https://github.com/rhysd/actionlint) — accessed 2026-05-31, independent-analysis (rhysd). Source for the local workflow-YAML validation step in Error Handling.
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: hatch3r-cli-fd
|
|
3
|
+
name: hatch3r-cli-fd
|
|
4
|
+
type: skill
|
|
3
5
|
description: "User-friendly find replacement, gitignore-aware. Use when locating filenames or directories by glob with parallel walking; invoke `fd`. Outputs newline-separated hit records; bound results with `-c` or `--max-count`."
|
|
4
6
|
tags: ["cli-tools", "search", "orchestration"]
|
|
5
7
|
quality_charter: agents/shared/quality-charter.md
|
|
6
8
|
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
7
9
|
cache_friendly: true
|
|
10
|
+
# D9-H-6 (D9, P1): pre-approve the wrapped shell binary on the GitHub Copilot
|
|
11
|
+
# Skills surface so the runtime skips per-invocation confirmation for `fd`.
|
|
12
|
+
# Rendered as an `allowed-tools:` frontmatter line on `.github/skills/.../SKILL.md`
|
|
13
|
+
# by the Copilot adapter; other adapters ignore the field.
|
|
14
|
+
allowed_tools: ["fd"]
|
|
8
15
|
cli_tool:
|
|
9
16
|
id: fd
|
|
10
17
|
bin: fd
|
|
@@ -17,6 +24,17 @@ cli_tool:
|
|
|
17
24
|
|
|
18
25
|
User-friendly find replacement, gitignore-aware
|
|
19
26
|
|
|
27
|
+
## §0 — Ambiguity & Safety Gate (P8 B1)
|
|
28
|
+
|
|
29
|
+
Before invoking `fd`, resolve these via `agents/shared/user-question-protocol.md` (default behavior, not exception-driven):
|
|
30
|
+
- **Scope:** when the search root or pattern matches more files than intended (a bare glob over the repo root, `-H` including dotfiles), confirm the target path before running.
|
|
31
|
+
- **Irreversibility:** `fd` is read-only on its own, but `fd … -x` / `-X` runs an arbitrary command per match. `fd <pat> -x rm` or any mutating `--exec` is destructive and fan-out-wide — confirm the command and the match set before running, and prefer printing the list first.
|
|
32
|
+
- **Ambiguity:** when the request maps to two or more matchers with materially different result sets (regex vs `-g` glob, `-e ext` vs path regex), ask which one.
|
|
33
|
+
|
|
34
|
+
## Fan-out Discipline (P8 B2)
|
|
35
|
+
|
|
36
|
+
Tier 1 reference card — no fan-out. This skill is a single-tool usage reference an agent consults inline; it spawns no sub-agents. Fan-out is owned by the calling workflow per its own Fan-out Discipline block. Source: `rules/hatch3r-fan-out-discipline.md` (P8 B2).
|
|
37
|
+
|
|
20
38
|
## When to Use
|
|
21
39
|
|
|
22
40
|
Reach for `fd` when the task is in the **search** category and the agent would otherwise call an MCP tool or read large outputs into context.
|
|
@@ -75,11 +93,25 @@ Verify with:
|
|
|
75
93
|
command -v fd
|
|
76
94
|
```
|
|
77
95
|
|
|
78
|
-
Install (
|
|
96
|
+
Install (macOS — default for this machine):
|
|
79
97
|
|
|
80
98
|
```bash
|
|
81
99
|
# brew
|
|
82
100
|
brew install fd
|
|
83
101
|
```
|
|
84
102
|
|
|
103
|
+
Install (Linux):
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# apt
|
|
107
|
+
sudo apt install fd-find
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Install (Windows):
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# scoop
|
|
114
|
+
scoop install fd
|
|
115
|
+
```
|
|
116
|
+
|
|
85
117
|
Homepage: https://github.com/sharkdp/fd
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: hatch3r-cli-fzf
|
|
3
|
+
name: hatch3r-cli-fzf
|
|
4
|
+
type: skill
|
|
3
5
|
description: "Interactive fuzzy finder for TTY pickers. Use when ad-hoc interactive picker over piped stdin streams from another command; invoke `fzf`. Requires a TTY; degrade gracefully to non-interactive batch in CI."
|
|
4
6
|
tags: ["cli-tools", "interactive", "maintenance"]
|
|
5
7
|
quality_charter: agents/shared/quality-charter.md
|
|
6
8
|
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
7
9
|
cache_friendly: true
|
|
10
|
+
# D9-H-6 (D9, P1): pre-approve the wrapped shell binary on the GitHub Copilot
|
|
11
|
+
# Skills surface so the runtime skips per-invocation confirmation for `fzf`.
|
|
12
|
+
# Rendered as an `allowed-tools:` frontmatter line on `.github/skills/.../SKILL.md`
|
|
13
|
+
# by the Copilot adapter; other adapters ignore the field.
|
|
14
|
+
allowed_tools: ["fzf"]
|
|
8
15
|
cli_tool:
|
|
9
16
|
id: fzf
|
|
10
17
|
bin: fzf
|
|
@@ -17,6 +24,17 @@ cli_tool:
|
|
|
17
24
|
|
|
18
25
|
Interactive fuzzy finder for TTY pickers
|
|
19
26
|
|
|
27
|
+
## §0 — Ambiguity & Safety Gate (P8 B1)
|
|
28
|
+
|
|
29
|
+
Before invoking `fzf`, resolve these via `agents/shared/user-question-protocol.md` (default behavior, not exception-driven):
|
|
30
|
+
- **Scope:** confirm the input stream piped into `fzf` is the intended candidate set; a wrong upstream command silently changes what gets ranked.
|
|
31
|
+
- **Irreversibility:** `fzf` only selects — it never mutates files. The real hazard is invoking interactive `fzf` (no `--filter`) in a non-TTY context (CI, agent loop): it blocks on stdin forever. Always use `--filter` headless mode from an autonomous agent; treat any downstream action on the selection (the command you pipe the pick into) under its own irreversibility check.
|
|
32
|
+
- **Ambiguity:** when more than one match scores closely and the workflow needs a single deterministic pick, pin it with `--filter … | head -1` rather than relying on interactive choice.
|
|
33
|
+
|
|
34
|
+
## Fan-out Discipline (P8 B2)
|
|
35
|
+
|
|
36
|
+
Tier 1 reference card — no fan-out. This skill is a single-tool usage reference an agent consults inline; it spawns no sub-agents. Fan-out is owned by the calling workflow per its own Fan-out Discipline block. Source: `rules/hatch3r-fan-out-discipline.md` (P8 B2).
|
|
37
|
+
|
|
20
38
|
## When to Use
|
|
21
39
|
|
|
22
40
|
Reach for `fzf` when the task is in the **interactive** category and the agent would otherwise call an MCP tool or read large outputs into context.
|
|
@@ -74,11 +92,25 @@ Verify with:
|
|
|
74
92
|
command -v fzf
|
|
75
93
|
```
|
|
76
94
|
|
|
77
|
-
Install (
|
|
95
|
+
Install (macOS — default for this machine):
|
|
78
96
|
|
|
79
97
|
```bash
|
|
80
98
|
# brew
|
|
81
99
|
brew install fzf
|
|
82
100
|
```
|
|
83
101
|
|
|
102
|
+
Install (Linux):
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# apt
|
|
106
|
+
sudo apt install fzf
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Install (Windows):
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# scoop
|
|
113
|
+
scoop install fzf
|
|
114
|
+
```
|
|
115
|
+
|
|
84
116
|
Homepage: https://github.com/junegunn/fzf
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: hatch3r-cli-gh
|
|
3
|
+
name: hatch3r-cli-gh
|
|
4
|
+
type: skill
|
|
3
5
|
description: "GitHub CLI — repos, issues, PRs, releases, gists. Use when drafting GitHub pull requests, issues, releases, gists, or workflow dispatches; invoke `gh`. Authenticates via the platform's native token mechanism (OAuth / PAT)."
|
|
4
6
|
tags: ["cli-tools", "forge", "orchestration"]
|
|
5
7
|
quality_charter: agents/shared/quality-charter.md
|
|
6
8
|
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
7
9
|
cache_friendly: true
|
|
10
|
+
# D9-H-6 (D9, P1): pre-approve the wrapped shell binary on the GitHub Copilot
|
|
11
|
+
# Skills surface so the runtime skips per-invocation confirmation for `gh`.
|
|
12
|
+
# Rendered as an `allowed-tools:` frontmatter line on `.github/skills/.../SKILL.md`
|
|
13
|
+
# by the Copilot adapter; other adapters ignore the field.
|
|
14
|
+
allowed_tools: ["gh"]
|
|
8
15
|
cli_tool:
|
|
9
16
|
id: gh
|
|
10
17
|
bin: gh
|
|
@@ -17,6 +24,17 @@ cli_tool:
|
|
|
17
24
|
|
|
18
25
|
GitHub CLI — repos, issues, PRs, releases, gists
|
|
19
26
|
|
|
27
|
+
## §0 — Ambiguity & Safety Gate (P8 B1)
|
|
28
|
+
|
|
29
|
+
Before invoking `gh`, resolve these via `agents/shared/user-question-protocol.md` (default behavior, not exception-driven):
|
|
30
|
+
- **Scope:** when the target repo/PR/issue number is not explicit (e.g. "close the PR" with several open), confirm which one before acting — never guess the number.
|
|
31
|
+
- **Irreversibility:** `gh pr close`, `gh pr merge`, `gh release create`, `gh issue close`, `gh repo delete`, and `gh api -X DELETE/POST/PATCH` mutate remote state. Confirm intent before running any of these; they are not safe to assume.
|
|
32
|
+
- **Ambiguity:** when the request maps to two or more flag combinations with materially different blast radius (e.g. `--squash` vs `--rebase` on `gh pr merge`), ask which one.
|
|
33
|
+
|
|
34
|
+
## Fan-out Discipline (P8 B2)
|
|
35
|
+
|
|
36
|
+
Tier 1 reference card — no fan-out. This skill is a single-tool usage reference an agent consults inline; it spawns no sub-agents. Fan-out is owned by the calling workflow per its own Fan-out Discipline block. Source: `rules/hatch3r-fan-out-discipline.md` (P8 B2).
|
|
37
|
+
|
|
20
38
|
## When to Use
|
|
21
39
|
|
|
22
40
|
Reach for `gh` when the task is in the **forge** category and the agent would otherwise call an MCP tool or read large outputs into context.
|
|
@@ -80,11 +98,42 @@ Verify with:
|
|
|
80
98
|
command -v gh
|
|
81
99
|
```
|
|
82
100
|
|
|
83
|
-
Install (
|
|
101
|
+
Install (macOS — default for this machine):
|
|
84
102
|
|
|
85
103
|
```bash
|
|
86
104
|
# brew
|
|
87
105
|
brew install gh
|
|
88
106
|
```
|
|
89
107
|
|
|
108
|
+
Install (Linux):
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# apt
|
|
112
|
+
sudo apt install gh
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Install (Windows):
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# winget
|
|
119
|
+
winget install GitHub.cli
|
|
120
|
+
```
|
|
121
|
+
|
|
90
122
|
Homepage: https://cli.github.com/
|
|
123
|
+
|
|
124
|
+
## Security
|
|
125
|
+
|
|
126
|
+
Minimum recommended version: `>=2.93.0`. Builds below this floor carry known unpatched advisories — upgrade before relying on the tool.
|
|
127
|
+
|
|
128
|
+
GHSA-8xvp-7hj6-mcj9 (CVE-2026-48501, High): gh CLI 2.92.0 and earlier attach the Authorization header to TUF repository-mirror requests issued by `gh attestation`, `gh release verify`, and `gh release verify-asset` — sending the github.com token (or `GH_ENTERPRISE_TOKEN` / `GITHUB_ENTERPRISE_TOKEN`) to hosts that are not GitHub API endpoints (`tuf-repo.github.com`, `tuf-repo-cdn.sigstore.dev`, and an Azure blob host). Any token previously used with those commands should be treated as exposed and rotated. Fixed in 2.93.0 — upgrade before running attestation or release-verify flows.
|
|
129
|
+
|
|
130
|
+
GHSA-crc3-h8v6-qh57 (CVE-2026-45803, Low): `gh run view --log` and `gh run view --log-failed` stream GitHub Actions workflow log lines to stdout or the pager without sanitizing terminal control sequences, so a malicious workflow can embed escape sequences that execute when a maintainer views the log (altered window titles, manipulated output, command execution in emulators such as `screen`). This is an escape-sequence-injection issue, not a token leak. Fixed in 2.92.0 — upgrade before viewing logs from untrusted workflows.
|
|
131
|
+
|
|
132
|
+
GHSA-55v3-xh23-96gh (token-leak note, `cli/go-gh` library): inside a codespace, `auth.TokenForHost` could source `GITHUB_TOKEN` for a non-`github.com`/`ghe.com` host, sending the token to an unintended host. Fixed in go-gh 2.11.1, vendored into gh ≥ 2.42.0; the `>=2.93.0` floor already clears it. Relevant when running gh against untrusted GitHub Enterprise hosts from a codespace.
|
|
133
|
+
|
|
134
|
+
## References
|
|
135
|
+
|
|
136
|
+
- GHSA-8xvp-7hj6-mcj9 / CVE-2026-48501 — https://github.com/cli/cli/security/advisories/GHSA-8xvp-7hj6-mcj9 (accessed 2026-06-06; tier: vendor advisory — GitHub CLI maintainers)
|
|
137
|
+
- GHSA-crc3-h8v6-qh57 / CVE-2026-45803 — https://github.com/cli/cli/security/advisories/GHSA-crc3-h8v6-qh57 (accessed 2026-06-05; tier: vendor advisory — GitHub CLI maintainers)
|
|
138
|
+
- GHSA-55v3-xh23-96gh — https://github.com/cli/go-gh/security/advisories/GHSA-55v3-xh23-96gh (accessed 2026-06-05; tier: vendor advisory — GitHub CLI maintainers)
|
|
139
|
+
- GitHub Advisory Database (queried via `gh api /repos/cli/cli/security-advisories`, accessed 2026-06-05; tier: official advisory feed)
|