hatch3r 1.4.0 → 1.5.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 +10 -6
- package/agents/hatch3r-a11y-auditor.md +13 -2
- package/agents/hatch3r-architect.md +20 -1
- package/agents/hatch3r-ci-watcher.md +25 -1
- package/agents/hatch3r-context-rules.md +15 -3
- package/agents/hatch3r-dependency-auditor.md +23 -2
- package/agents/hatch3r-devops.md +11 -0
- package/agents/hatch3r-docs-writer.md +27 -2
- package/agents/hatch3r-fixer.md +46 -3
- package/agents/hatch3r-implementer.md +19 -1
- package/agents/hatch3r-learnings-loader.md +19 -0
- package/agents/hatch3r-lint-fixer.md +11 -0
- package/agents/hatch3r-perf-profiler.md +21 -1
- package/agents/hatch3r-researcher.md +51 -911
- package/agents/hatch3r-reviewer.md +24 -2
- package/agents/hatch3r-security-auditor.md +20 -0
- package/agents/hatch3r-test-writer.md +24 -0
- package/agents/modes/architecture.md +1 -0
- package/agents/modes/boundary-analysis.md +2 -1
- package/agents/modes/codebase-impact.md +1 -0
- package/agents/modes/complexity-risk.md +1 -0
- package/agents/modes/coverage-analysis.md +1 -0
- package/agents/modes/current-state.md +1 -0
- package/agents/modes/feature-design.md +1 -0
- package/agents/modes/impact-analysis.md +1 -0
- package/agents/modes/library-docs.md +2 -1
- package/agents/modes/migration-path.md +1 -0
- package/agents/modes/prior-art.md +1 -0
- package/agents/modes/refactoring-strategy.md +1 -0
- package/agents/modes/regression.md +1 -0
- package/agents/modes/requirements-elicitation.md +1 -0
- package/agents/modes/risk-assessment.md +1 -0
- package/agents/modes/risk-prioritization.md +1 -0
- package/agents/modes/root-cause.md +1 -0
- package/agents/modes/similar-implementation.md +2 -1
- package/agents/modes/symptom-trace.md +1 -0
- package/agents/modes/test-pattern.md +2 -1
- package/agents/shared/external-knowledge.md +10 -0
- package/agents/shared/quality-charter.md +18 -0
- package/checks/README.md +1 -0
- package/checks/accessibility.md +55 -0
- package/commands/board/pickup-azure-devops.md +1 -0
- package/commands/board/pickup-delegation-multi.md +6 -1
- package/commands/board/pickup-delegation.md +1 -0
- package/commands/board/pickup-github.md +1 -0
- package/commands/board/pickup-gitlab.md +1 -0
- package/commands/board/pickup-modes.md +1 -0
- package/commands/board/pickup-post-impl.md +2 -1
- package/commands/board/shared-azure-devops.md +1 -0
- package/commands/board/shared-board-overview.md +1 -0
- package/commands/board/shared-github.md +1 -0
- package/commands/board/shared-gitlab.md +1 -0
- package/commands/hatch3r-agent-customize.md +1 -0
- package/commands/hatch3r-api-spec.md +1 -0
- package/commands/hatch3r-benchmark.md +4 -3
- package/commands/hatch3r-board-fill.md +52 -9
- package/commands/hatch3r-board-groom.md +69 -5
- package/commands/hatch3r-board-init.md +2 -1
- package/commands/hatch3r-board-pickup.md +1 -0
- package/commands/hatch3r-board-refresh.md +1 -0
- package/commands/hatch3r-board-shared.md +34 -3
- package/commands/hatch3r-bug-plan.md +2 -1
- package/commands/hatch3r-codebase-map.md +4 -3
- package/commands/hatch3r-command-customize.md +2 -1
- package/commands/hatch3r-context-health.md +1 -0
- package/commands/hatch3r-cost-tracking.md +1 -0
- package/commands/hatch3r-debug.md +4 -3
- package/commands/hatch3r-dep-audit.md +3 -0
- package/commands/hatch3r-feature-plan.md +3 -2
- package/commands/hatch3r-healthcheck.md +1 -0
- package/commands/hatch3r-hooks.md +5 -0
- package/commands/hatch3r-learn.md +1 -0
- package/commands/hatch3r-migration-plan.md +3 -2
- package/commands/hatch3r-onboard.md +2 -1
- package/commands/hatch3r-project-spec.md +4 -3
- package/commands/hatch3r-quick-change.md +2 -0
- package/commands/hatch3r-recipe.md +1 -0
- package/commands/hatch3r-refactor-plan.md +2 -1
- package/commands/hatch3r-release.md +4 -1
- package/commands/hatch3r-revision.md +2 -1
- package/commands/hatch3r-roadmap.md +5 -4
- package/commands/hatch3r-rule-customize.md +1 -0
- package/commands/hatch3r-security-audit.md +1 -0
- package/commands/hatch3r-skill-customize.md +1 -0
- package/commands/hatch3r-test-plan.md +3 -2
- package/commands/hatch3r-workflow.md +5 -0
- package/dist/cli/index.js +7467 -4582
- package/dist/cli/index.js.map +1 -1
- package/hooks/hatch3r-ci-failure.md +1 -0
- package/hooks/hatch3r-file-save.md +1 -0
- package/hooks/hatch3r-post-merge.md +1 -0
- package/hooks/hatch3r-pre-commit.md +1 -0
- package/hooks/hatch3r-pre-push.md +1 -0
- package/hooks/hatch3r-session-start.md +1 -0
- package/package.json +19 -4
- package/rules/hatch3r-accessibility-standards.md +2 -1
- package/rules/hatch3r-accessibility-standards.mdc +1 -1
- package/rules/hatch3r-agent-orchestration-detail.md +49 -1
- package/rules/hatch3r-agent-orchestration-detail.mdc +47 -1
- package/rules/hatch3r-agent-orchestration.md +87 -5
- package/rules/hatch3r-agent-orchestration.mdc +85 -5
- package/rules/hatch3r-api-design.md +2 -1
- package/rules/hatch3r-api-design.mdc +1 -1
- package/rules/hatch3r-browser-verification.md +4 -2
- package/rules/hatch3r-browser-verification.mdc +1 -0
- package/rules/hatch3r-ci-cd.md +2 -1
- package/rules/hatch3r-ci-cd.mdc +1 -1
- package/rules/hatch3r-code-standards.md +15 -2
- package/rules/hatch3r-code-standards.mdc +12 -0
- package/rules/hatch3r-component-conventions.md +2 -1
- package/rules/hatch3r-component-conventions.mdc +1 -0
- package/rules/hatch3r-data-classification.md +2 -1
- package/rules/hatch3r-data-classification.mdc +1 -1
- package/rules/hatch3r-deep-context.md +26 -1
- package/rules/hatch3r-deep-context.mdc +25 -1
- package/rules/hatch3r-dependency-management.md +2 -1
- package/rules/hatch3r-dependency-management.mdc +1 -1
- package/rules/hatch3r-feature-flags.md +2 -0
- package/rules/hatch3r-feature-flags.mdc +1 -0
- package/rules/hatch3r-git-conventions.md +2 -1
- package/rules/hatch3r-git-conventions.mdc +2 -1
- package/rules/hatch3r-i18n.md +2 -1
- package/rules/hatch3r-i18n.mdc +1 -0
- package/rules/hatch3r-learning-consult.md +11 -1
- package/rules/hatch3r-learning-consult.mdc +11 -1
- package/rules/hatch3r-migrations.md +2 -1
- package/rules/hatch3r-migrations.mdc +1 -1
- package/rules/hatch3r-observability-logging.md +34 -0
- package/rules/hatch3r-observability-logging.mdc +30 -0
- package/rules/hatch3r-observability-metrics.md +74 -0
- package/rules/hatch3r-observability-metrics.mdc +70 -0
- package/rules/hatch3r-observability-tracing-detail.md +160 -0
- package/rules/hatch3r-observability-tracing-detail.mdc +63 -0
- package/rules/hatch3r-observability-tracing.md +86 -0
- package/rules/hatch3r-observability-tracing.mdc +77 -0
- package/rules/hatch3r-observability.md +9 -448
- package/rules/hatch3r-observability.mdc +7 -448
- package/rules/hatch3r-performance-budgets.md +2 -0
- package/rules/hatch3r-performance-budgets.mdc +1 -0
- package/rules/hatch3r-secrets-management.md +2 -1
- package/rules/hatch3r-secrets-management.mdc +1 -1
- package/rules/hatch3r-security-patterns.md +3 -2
- package/rules/hatch3r-security-patterns.mdc +1 -1
- package/rules/hatch3r-testing.md +12 -2
- package/rules/hatch3r-testing.mdc +10 -1
- package/rules/hatch3r-theming.md +3 -2
- package/rules/hatch3r-theming.mdc +1 -0
- package/rules/hatch3r-tooling-hierarchy.md +3 -2
- package/rules/hatch3r-tooling-hierarchy.mdc +1 -1
- package/skills/hatch3r-a11y-audit/SKILL.md +11 -4
- package/skills/hatch3r-agent-customize/SKILL.md +1 -0
- package/skills/hatch3r-api-spec/SKILL.md +9 -2
- package/skills/hatch3r-architecture-review/SKILL.md +7 -0
- package/skills/hatch3r-bug-fix/SKILL.md +16 -7
- package/skills/hatch3r-ci-pipeline/SKILL.md +8 -1
- package/skills/hatch3r-command-customize/SKILL.md +1 -0
- package/skills/hatch3r-context-health/SKILL.md +23 -2
- package/skills/hatch3r-cost-tracking/SKILL.md +16 -6
- package/skills/hatch3r-customize/SKILL.md +8 -1
- package/skills/hatch3r-dep-audit/SKILL.md +9 -2
- package/skills/hatch3r-feature/SKILL.md +12 -4
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +7 -0
- package/skills/hatch3r-incident-response/SKILL.md +7 -0
- package/skills/hatch3r-issue-workflow/SKILL.md +8 -1
- package/skills/hatch3r-logical-refactor/SKILL.md +8 -1
- package/skills/hatch3r-migration/SKILL.md +7 -0
- package/skills/hatch3r-perf-audit/SKILL.md +9 -2
- package/skills/hatch3r-pr-creation/SKILL.md +8 -1
- package/skills/hatch3r-qa-validation/SKILL.md +8 -1
- package/skills/hatch3r-recipe/SKILL.md +8 -1
- package/skills/hatch3r-refactor/SKILL.md +10 -2
- package/skills/hatch3r-release/SKILL.md +8 -1
- package/skills/hatch3r-rule-customize/SKILL.md +1 -0
- package/skills/hatch3r-skill-customize/SKILL.md +1 -0
- package/skills/hatch3r-visual-refactor/SKILL.md +12 -5
|
@@ -4,6 +4,7 @@ description: Expert code reviewer for the project. Proactively reviews code for
|
|
|
4
4
|
protected: true
|
|
5
5
|
model: standard
|
|
6
6
|
tags: [core, review]
|
|
7
|
+
quality_charter: agents/shared/quality-charter.md
|
|
7
8
|
---
|
|
8
9
|
You are a senior code reviewer for the project.
|
|
9
10
|
|
|
@@ -38,7 +39,17 @@ Verify compliance with `.agents/rules/hatch3r-security-patterns.md`, `.agents/ru
|
|
|
38
39
|
6. **Performance:** No hot-path regressions. Bundle size impact. No per-keystroke cloud writes.
|
|
39
40
|
7. **Accessibility:** Reduced motion respected. WCAG AA contrast. Keyboard accessible. ARIA attributes.
|
|
40
41
|
8. **Dead code:** No unused imports, obsolete comments, or abandoned logic.
|
|
41
|
-
9. **Root-cause verification:** Do the changes address the underlying cause of the issue, not just the symptom? Identify what the original issue was (from the issue body, acceptance criteria, or diff context), then verify the change fixes the root cause. Flag superficial fixes
|
|
42
|
+
9. **Root-cause verification:** Do the changes address the underlying cause of the issue, not just the symptom? Identify what the original issue was (from the issue body, acceptance criteria, or diff context), then verify the change fixes the root cause. Flag superficial fixes -- e.g., adding a try-catch that swallows errors, adding a comment saying "fixed", disabling a test, or suppressing a warning without resolving the underlying condition. If the change treats only the symptom, classify as Critical and specify what root-cause fix is needed.
|
|
43
|
+
10. **Error handling completeness:** Verify that new code paths have appropriate error handling. Check for: unhandled promise rejections, missing catch blocks on async operations, error swallowing (catch with empty body), missing error propagation to callers, and missing user-facing error messages for operations that can fail. Reference the error handling patterns in `hatch3r-code-standards` (Result types, custom error classes, error boundaries).
|
|
44
|
+
11. **Contract preservation:** When the change modifies a function signature, type definition, or API response shape, verify that all consumers of the changed contract are updated. Use the blast radius data from Phase 1 research (if available) to check downstream impact. Flag missing consumer updates as Critical.
|
|
45
|
+
|
|
46
|
+
## Review Verdicts
|
|
47
|
+
|
|
48
|
+
| Verdict | Meaning |
|
|
49
|
+
|---------|---------|
|
|
50
|
+
| `APPROVE` | 0 Critical + 0 Warning findings. Code is ready to merge. |
|
|
51
|
+
| `REQUEST CHANGES` | Critical or Warning findings exist. Author must address before merge. |
|
|
52
|
+
| `DESIGN_OBJECTION` | The implementation approach has a fundamental design flaw that cannot be fixed by iterating on the current code. The review loop should terminate and surface the objection to the user for an architectural decision rather than cycling through fixer iterations. Include the objection rationale and at least one alternative approach. |
|
|
42
53
|
|
|
43
54
|
## Output Format
|
|
44
55
|
|
|
@@ -62,7 +73,7 @@ Include specific file paths and line references. Propose fixes where possible.
|
|
|
62
73
|
Follow the shared protocol in `agents/shared/external-knowledge.md` (tooling hierarchy, platform CLI, Context7 MCP, web research).
|
|
63
74
|
|
|
64
75
|
**Context7 focus for this agent:**
|
|
65
|
-
- Verify that reviewed code uses library APIs
|
|
76
|
+
- Verify that reviewed code uses library APIs with valid method signatures, structured error handling, and non-deprecated usage
|
|
66
77
|
|
|
67
78
|
**Web research focus for this agent:**
|
|
68
79
|
- Known vulnerability patterns and security advisories when reviewing security-sensitive code (auth flows, cryptographic operations)
|
|
@@ -129,6 +140,17 @@ Example in a review finding:
|
|
|
129
140
|
|
|
130
141
|
Apply this format whenever the review verdict is non-obvious, when downgrading or upgrading severity, or when recommending a specific fix over alternatives.
|
|
131
142
|
|
|
143
|
+
## Review Loop Termination Conditions
|
|
144
|
+
|
|
145
|
+
This agent participates in the Phase 3 review loop (see `hatch3r-agent-orchestration`). The loop terminates when any of these conditions is met:
|
|
146
|
+
|
|
147
|
+
1. **Clean verdict** -- 0 Critical + 0 Warning findings. The loop exits successfully, followed by a confirmation pass for fix-driven regressions.
|
|
148
|
+
2. **Design objection** -- Verdict is `DESIGN_OBJECTION`. The loop exits immediately without fixer iteration. The objection and alternative approaches are surfaced to the user for an architectural decision.
|
|
149
|
+
3. **Max iterations reached** -- After 3 review-fix cycles (default, configurable up to 10), the loop exits with status UNRESOLVED. Remaining findings are surfaced to the user.
|
|
150
|
+
4. **Manual termination** -- The orchestrator or user explicitly halts the loop.
|
|
151
|
+
|
|
152
|
+
Accurate severity classification directly affects loop termination. Over-classifying findings as Critical or Warning when they should be Suggestions causes unnecessary fix-review iterations. Under-classifying causes real issues to slip through. Use structured reasoning (above) when severity is non-obvious.
|
|
153
|
+
|
|
132
154
|
## Boundaries
|
|
133
155
|
|
|
134
156
|
- **Always:** Check privacy invariants, verify tests exist, review security implications, use the platform CLI for PR/issue reads
|
|
@@ -4,6 +4,7 @@ description: Security analyst who audits database rules, cloud functions, event
|
|
|
4
4
|
protected: true
|
|
5
5
|
model: standard
|
|
6
6
|
tags: [review, security]
|
|
7
|
+
quality_charter: agents/shared/quality-charter.md
|
|
7
8
|
---
|
|
8
9
|
You are an expert security analyst for the project.
|
|
9
10
|
|
|
@@ -56,6 +57,16 @@ Follow the shared protocol in `agents/shared/external-knowledge.md` (tooling hie
|
|
|
56
57
|
- Latest CVEs, security advisories, OWASP Top 10, CWE references, and NIST guidelines for classifying findings
|
|
57
58
|
- Known exploit techniques, attack patterns, and security hardening best practices for the application's technology stack
|
|
58
59
|
|
|
60
|
+
## Confidence Expression
|
|
61
|
+
|
|
62
|
+
Rate every security finding, vulnerability assessment, and fix suggestion as **high**, **medium**, or **low** confidence per the quality charter (`agents/shared/quality-charter.md`):
|
|
63
|
+
|
|
64
|
+
- **High:** Verified against current code and security rules — you traced the auth flow, confirmed the vulnerability exists, and validated the exploit path.
|
|
65
|
+
- **Medium:** Based on established security patterns and OWASP guidelines but not fully exploited or tested. Likely a real vulnerability but could be mitigated by other controls not visible in the audited scope.
|
|
66
|
+
- **Low:** Best professional judgment based on code patterns — the threat model is unclear or the finding depends on runtime configuration. Recommend security team review before prioritizing.
|
|
67
|
+
|
|
68
|
+
Include confidence in the output: each finding row and the overall **Status** should state their confidence level.
|
|
69
|
+
|
|
59
70
|
## Sub-Agent Delegation
|
|
60
71
|
|
|
61
72
|
When auditing a large application with multiple modules:
|
|
@@ -99,6 +110,15 @@ When auditing a large application with multiple modules:
|
|
|
99
110
|
- (deferred audits, areas needing deeper investigation)
|
|
100
111
|
```
|
|
101
112
|
|
|
113
|
+
## Error Handling Security Audit
|
|
114
|
+
|
|
115
|
+
In addition to the 8 security domains above, audit error handling for security implications:
|
|
116
|
+
|
|
117
|
+
- **Information leakage in errors.** Verify that error responses do not include stack traces, internal file paths, database query fragments, or dependency version numbers. Reference `hatch3r-code-standards` error boundary patterns.
|
|
118
|
+
- **Error-based authentication bypass.** Check that authentication/authorization failures return generic error messages. Distinct error messages for "user not found" vs. "wrong password" enable account enumeration.
|
|
119
|
+
- **Fail-open conditions.** Verify that exception handlers in authorization paths default to deny (fail-closed). A catch block that returns `true` or allows access on error is a Critical finding.
|
|
120
|
+
- **Rate limiting on error paths.** Verify that repeated failed authentication attempts, validation errors, and resource-not-found responses are rate-limited to prevent brute-force and enumeration attacks.
|
|
121
|
+
|
|
102
122
|
## Boundaries
|
|
103
123
|
|
|
104
124
|
- **Always:** Test both allow and deny cases, verify invariants, check for secret leakage, validate input sanitization, use the platform CLI for issue/code reads
|
|
@@ -4,6 +4,7 @@ description: QA engineer who writes deterministic, isolated tests. Covers unit,
|
|
|
4
4
|
model: standard
|
|
5
5
|
protected: true
|
|
6
6
|
tags: [core, review]
|
|
7
|
+
quality_charter: agents/shared/quality-charter.md
|
|
7
8
|
---
|
|
8
9
|
You are an expert QA engineer for the project.
|
|
9
10
|
|
|
@@ -62,6 +63,16 @@ Follow the shared protocol in `agents/shared/external-knowledge.md` (tooling hie
|
|
|
62
63
|
- Testing best practices for specific scenarios (race conditions, WebSocket handlers, file uploads, streaming responses)
|
|
63
64
|
- Security testing techniques (injection test patterns, auth bypass test cases) and known flaky test patterns
|
|
64
65
|
|
|
66
|
+
## Confidence Expression
|
|
67
|
+
|
|
68
|
+
Rate every recommendation, coverage assessment, and test design decision as **high**, **medium**, or **low** confidence per the quality charter (`agents/shared/quality-charter.md`):
|
|
69
|
+
|
|
70
|
+
- **High:** Verified against current code — you read the source, traced the logic, and confirmed the test covers the actual behavior.
|
|
71
|
+
- **Medium:** Based on established patterns and conventions but not fully verified against the specific code path. Likely correct but could have edge cases.
|
|
72
|
+
- **Low:** Best professional judgment based on general principles. Recommend human review before relying on this coverage assessment.
|
|
73
|
+
|
|
74
|
+
Include confidence in the output: the **Status** line and any coverage gap assessments should state their confidence level. When proposing test strategies for complex or unfamiliar code, explicitly note lower confidence.
|
|
75
|
+
|
|
65
76
|
## Output Format
|
|
66
77
|
|
|
67
78
|
```
|
|
@@ -98,6 +109,19 @@ Follow the shared protocol in `agents/shared/external-knowledge.md` (tooling hie
|
|
|
98
109
|
- (suggested refactors to improve testability, coverage gaps remaining)
|
|
99
110
|
```
|
|
100
111
|
|
|
112
|
+
## Review Loop Awareness
|
|
113
|
+
|
|
114
|
+
This agent runs in Phase 4, after the Phase 3 review loop has reached a clean verdict or terminated at max iterations. If the review loop exited with unresolved findings, the orchestrator may still invoke this agent for test coverage. Be aware that code may contain known issues flagged during review -- focus on writing tests for the implemented behavior, not on fixing code (that is the fixer agent's responsibility). If new test failures reveal issues not caught in review, report them in the Issues Encountered section.
|
|
115
|
+
|
|
116
|
+
## Error Path Testing Requirements
|
|
117
|
+
|
|
118
|
+
When writing tests for new or modified code, cover error paths proportionally to happy paths:
|
|
119
|
+
|
|
120
|
+
- **Every function that can fail** (returns Result, throws, calls async operations) must have at least one test for the failure case.
|
|
121
|
+
- **Error messages must be tested.** Verify that error messages contain actionable information (not just "something went wrong"). Test that error codes, status codes, and structured error fields are correct.
|
|
122
|
+
- **Boundary conditions.** Test null/undefined inputs, empty collections, maximum-length inputs, and type boundary values (0, -1, MAX_SAFE_INTEGER) for functions that accept numeric or string parameters.
|
|
123
|
+
- **Async error handling.** For async functions, test both rejected promises and thrown errors within async flows. Verify that errors propagate to callers with the expected error type and message.
|
|
124
|
+
|
|
101
125
|
## Boundaries
|
|
102
126
|
|
|
103
127
|
- **Always:** Write tests to `tests/`, run tests before submitting, verify edge cases, check invariants from specs, use the platform CLI for issue reads
|
|
@@ -3,6 +3,7 @@ id: researcher-mode-architecture
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Design the architectural approach with data model changes, API contracts, and component design.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `architecture`
|
|
8
9
|
|
|
@@ -3,10 +3,11 @@ id: researcher-mode-boundary-analysis
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Map integration boundaries, external dependencies, and data flow seams for test targeting.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `boundary-analysis`
|
|
8
9
|
|
|
9
|
-
Map integration boundaries, external dependencies, data flow boundaries, and event chains to identify where integration and contract tests are most needed. Used by `hatch3r-test-plan` to
|
|
10
|
+
Map integration boundaries, external dependencies, data flow boundaries, and event chains to identify where integration and contract tests are most needed. Used by `hatch3r-test-plan` to target test coverage at system seams.
|
|
10
11
|
|
|
11
12
|
**Output structure:**
|
|
12
13
|
|
|
@@ -3,6 +3,7 @@ id: researcher-mode-feature-design
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Break the subject down into implementable sub-tasks with user stories and acceptance criteria.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `feature-design`
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: researcher-mode-library-docs
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Look up current API documentation for specific libraries via Context7 MCP.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `library-docs`
|
|
8
9
|
|
|
@@ -24,7 +25,7 @@ Look up current API documentation for specific libraries or frameworks using Con
|
|
|
24
25
|
| {API} | {signature or usage pattern} | {relevant constraints, deprecations, or gotchas} |
|
|
25
26
|
|
|
26
27
|
### Key Patterns
|
|
27
|
-
- {pattern}: {
|
|
28
|
+
- {pattern}: {usage example with required parameters and expected output}
|
|
28
29
|
|
|
29
30
|
### Breaking Changes / Deprecations
|
|
30
31
|
- {item}: {migration path}
|
|
@@ -3,6 +3,7 @@ id: researcher-mode-refactoring-strategy
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Design the refactoring approach with transformations, invariants, and patterns.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `refactoring-strategy`
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: researcher-mode-requirements-elicitation
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Detect ambiguities and missing requirements, generate structured questions across 10 dimensions.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `requirements-elicitation`
|
|
8
9
|
|
|
@@ -3,10 +3,11 @@ id: researcher-mode-similar-implementation
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Search the codebase for analogous features and extract implementation conventions.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `similar-implementation`
|
|
8
9
|
|
|
9
|
-
Search the codebase for analogous features, components, or modules and extract their implementation conventions as a reference for the implementer. The goal is
|
|
10
|
+
Search the codebase for analogous features, components, or modules and extract their implementation conventions as a reference for the implementer. The goal is that new code follows established patterns rather than inventing new approaches.
|
|
10
11
|
|
|
11
12
|
**Protocol:**
|
|
12
13
|
|
|
@@ -3,10 +3,11 @@ id: researcher-mode-test-pattern
|
|
|
3
3
|
type: mode
|
|
4
4
|
description: Extract existing test conventions, framework usage, mock patterns, and helper libraries.
|
|
5
5
|
parent: hatch3r-researcher
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
### Mode: `test-pattern`
|
|
8
9
|
|
|
9
|
-
Extract existing test conventions, framework usage, mock patterns, and helper libraries
|
|
10
|
+
Extract existing test conventions, framework usage, mock patterns, and helper libraries so new tests follow established patterns. Used by `hatch3r-test-plan` to align the test strategy with the project's existing test infrastructure.
|
|
10
11
|
|
|
11
12
|
**Output structure:**
|
|
12
13
|
|
|
@@ -30,3 +30,13 @@ Use web search when Context7 does not cover the topic, or for information that c
|
|
|
30
30
|
- **GitHub:** GitHub Security Advisories, Dependabot alerts
|
|
31
31
|
- **Azure DevOps:** Microsoft Defender for DevOps, WhiteSource/Mend
|
|
32
32
|
- **GitLab:** GitLab Dependency Scanning, Advisory Database
|
|
33
|
+
|
|
34
|
+
## When NOT to Use External Knowledge
|
|
35
|
+
|
|
36
|
+
Skip external knowledge lookups when:
|
|
37
|
+
|
|
38
|
+
- The answer is available in project documentation or codebase (tiers 1-2 of the hierarchy). Re-reading a local spec is faster and more accurate than a web search.
|
|
39
|
+
- The question is about project-specific conventions (naming, file structure, state management). These are defined in local rules and learnings, not external sources.
|
|
40
|
+
- The information is not time-sensitive and the agent's training data is sufficient (basic language features, well-established patterns like REST, SQL, HTTP status codes).
|
|
41
|
+
|
|
42
|
+
Unnecessary external lookups waste tokens and introduce latency. Follow the hierarchy strictly: only escalate to the next tier when the current tier cannot answer the question.
|
|
@@ -76,3 +76,21 @@ Where possible, state acceptance criteria in measurable, verifiable terms:
|
|
|
76
76
|
- **Not measurable:** "Make the app faster."
|
|
77
77
|
|
|
78
78
|
When a recommendation cannot be quantified (e.g., "improve code readability"), provide a concrete before/after example instead.
|
|
79
|
+
|
|
80
|
+
### 8. Escalate Ambiguity Early
|
|
81
|
+
|
|
82
|
+
When encountering conflicting requirements, unclear acceptance criteria, or missing context:
|
|
83
|
+
|
|
84
|
+
- **Stop and ask** rather than making assumptions that could cascade through later pipeline phases.
|
|
85
|
+
- State what is ambiguous, what the possible interpretations are, and which interpretation you would choose if forced to proceed.
|
|
86
|
+
- Log the ambiguity in the structured output (e.g., `researchGaps`, `Issues encountered`) so downstream agents inherit awareness.
|
|
87
|
+
|
|
88
|
+
Ambiguity detected in Phase 1 costs minutes to resolve; ambiguity discovered in Phase 3 costs an entire review-fix cycle.
|
|
89
|
+
|
|
90
|
+
### 9. Preserve Contracts
|
|
91
|
+
|
|
92
|
+
When modifying code that is consumed by other modules, agents, or external systems:
|
|
93
|
+
|
|
94
|
+
- Verify existing consumers before changing function signatures, type shapes, event schemas, or API responses.
|
|
95
|
+
- If a contract change is necessary, document it explicitly in the structured output and flag for reviewer attention.
|
|
96
|
+
- Prefer additive changes (new optional fields, overloaded signatures) over breaking changes.
|
package/checks/README.md
CHANGED
|
@@ -40,6 +40,7 @@ Agents (particularly `hatch3r-reviewer`) reference checks during code review:
|
|
|
40
40
|
| `security` | Vulnerability patterns, input validation, secrets |
|
|
41
41
|
| `testing` | Test coverage, test quality, regression tests |
|
|
42
42
|
| `performance` | Bundle size, render performance, memory usage, network optimization, database queries |
|
|
43
|
+
| `accessibility` | WCAG compliance, semantic HTML, keyboard navigation, screen reader support, inclusive design |
|
|
43
44
|
|
|
44
45
|
## Adding New Checks
|
|
45
46
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: accessibility
|
|
3
|
+
type: check
|
|
4
|
+
description: Accessibility review criteria covering WCAG compliance, semantic HTML, keyboard navigation, screen reader support, and inclusive design patterns
|
|
5
|
+
---
|
|
6
|
+
# Accessibility Check
|
|
7
|
+
|
|
8
|
+
Review criteria for evaluating accessibility in pull requests.
|
|
9
|
+
|
|
10
|
+
## Semantic HTML and ARIA
|
|
11
|
+
|
|
12
|
+
- `[CRITICAL]` Interactive elements use native HTML controls (`<button>`, `<a>`, `<input>`, `<select>`) rather than styled `<div>` or `<span>` elements with click handlers.
|
|
13
|
+
- `[CRITICAL]` Custom interactive components have appropriate ARIA roles, states, and properties (`role`, `aria-expanded`, `aria-selected`, `aria-disabled`, etc.).
|
|
14
|
+
- `[CRITICAL]` Images have meaningful `alt` text, or `alt=""` and `aria-hidden="true"` if purely decorative.
|
|
15
|
+
- `[CRITICAL]` Form inputs have associated `<label>` elements (via `for`/`id` or nesting). No input relies solely on placeholder text for identification.
|
|
16
|
+
- `[RECOMMENDED]` Headings follow a logical hierarchy (`h1` > `h2` > `h3`) without skipping levels.
|
|
17
|
+
- `[RECOMMENDED]` Landmark regions (`<main>`, `<nav>`, `<aside>`, `<header>`, `<footer>`) are used to structure the page.
|
|
18
|
+
|
|
19
|
+
## Keyboard Navigation
|
|
20
|
+
|
|
21
|
+
- `[CRITICAL]` All interactive elements are reachable and operable via keyboard (Tab, Shift+Tab, Enter, Space, Arrow keys as appropriate).
|
|
22
|
+
- `[CRITICAL]` Focus is not trapped in a component unless it is a modal dialog with an explicit close mechanism.
|
|
23
|
+
- `[CRITICAL]` Custom keyboard shortcuts do not conflict with screen reader or browser shortcuts.
|
|
24
|
+
- `[RECOMMENDED]` Focus order follows the visual reading order (logical DOM order). No use of positive `tabindex` values.
|
|
25
|
+
- `[RECOMMENDED]` Focus indicators are visible and meet contrast requirements. No `outline: none` without a custom visible focus style.
|
|
26
|
+
|
|
27
|
+
## Visual Design and Color
|
|
28
|
+
|
|
29
|
+
- `[CRITICAL]` Text meets WCAG 2.1 AA contrast ratios: 4.5:1 for normal text, 3:1 for large text (18px+ or 14px+ bold).
|
|
30
|
+
- `[CRITICAL]` Information is not conveyed by color alone. Status indicators, errors, and required fields use icons, text, or patterns in addition to color.
|
|
31
|
+
- `[CRITICAL]` UI remains functional and readable at 200% browser zoom without horizontal scrolling or content clipping.
|
|
32
|
+
- `[RECOMMENDED]` Touch targets are at least 44x44 CSS pixels for mobile interfaces.
|
|
33
|
+
- `[RECOMMENDED]` Animations respect the `prefers-reduced-motion` media query — reduce or remove motion for users who have requested it.
|
|
34
|
+
|
|
35
|
+
## Screen Reader Support
|
|
36
|
+
|
|
37
|
+
- `[CRITICAL]` Dynamic content updates (toast notifications, live regions, inline validation) use `aria-live` regions (`polite` or `assertive`) to announce changes.
|
|
38
|
+
- `[CRITICAL]` Modal dialogs trap focus, announce their title via `aria-labelledby`, and return focus to the trigger element on close.
|
|
39
|
+
- `[CRITICAL]` Icon-only buttons and links have accessible names via `aria-label`, `aria-labelledby`, or visually hidden text.
|
|
40
|
+
- `[RECOMMENDED]` Tables use `<th>` with `scope` attributes for column and row headers. Complex tables use `id`/`headers` associations.
|
|
41
|
+
- `[RECOMMENDED]` Loading states are announced to screen readers, not just shown visually (e.g., `aria-busy="true"` on the updating region).
|
|
42
|
+
|
|
43
|
+
## Content and Language
|
|
44
|
+
|
|
45
|
+
- `[CRITICAL]` The page has a `lang` attribute on the `<html>` element matching the content language.
|
|
46
|
+
- `[CRITICAL]` Error messages are descriptive, identify the field in error, and suggest how to fix the problem.
|
|
47
|
+
- `[RECOMMENDED]` Link text is descriptive and makes sense out of context. Avoid generic "click here" or "read more" links.
|
|
48
|
+
- `[RECOMMENDED]` Abbreviations and acronyms are expanded on first use or wrapped in `<abbr>` with a `title` attribute.
|
|
49
|
+
|
|
50
|
+
## Media and Embedded Content
|
|
51
|
+
|
|
52
|
+
- `[CRITICAL]` Video content has captions. Audio content has transcripts.
|
|
53
|
+
- `[CRITICAL]` Auto-playing media can be paused or stopped by the user. No content flashes more than 3 times per second.
|
|
54
|
+
- `[RECOMMENDED]` Audio descriptions are provided for video content where visual information is not conveyed through the audio track.
|
|
55
|
+
- `[RECOMMENDED]` Embedded content (iframes, embeds) has a descriptive `title` attribute.
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-pickup-azure-devops
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Azure DevOps-specific platform procedures for board-pickup. Covers az CLI commands for work item listing, status updates, collision detection, PR creation, and state transitions.
|
|
5
5
|
tags: [board, team, azure-devops]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Pickup — Azure DevOps Platform Details
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-pickup-delegation-multi
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Multi-issue sub-agent delegation protocols for board-pickup Steps 6b (epics) and 6c (batch). Covers level-by-level parallel execution, shared context, and quality pipelines.
|
|
5
5
|
tags: [board, team]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Pickup — Multi-Issue Delegation (Steps 6b, 6c)
|
|
8
9
|
|
|
@@ -163,7 +164,11 @@ For each dependency level, starting at Level 1:
|
|
|
163
164
|
After all implementer sub-agents complete across all levels:
|
|
164
165
|
|
|
165
166
|
1. Run a combined quality check across all changes from all issues.
|
|
166
|
-
2.
|
|
167
|
+
2. **File conflict resolution:** When parallel sub-agents modify the same file, apply this resolution protocol:
|
|
168
|
+
- **Disjoint regions:** Accept both changes (non-overlapping edits to different functions/sections).
|
|
169
|
+
- **Overlapping regions:** If changes touch the same lines or function, merge manually using the sub-agent that modified the larger scope as the base, then apply the smaller-scope change on top. Run tests after merge.
|
|
170
|
+
- **Semantic conflicts:** If two sub-agents make contradictory changes to the same interface, type, or contract, halt and surface both changes to the user with the conflict description. Do not auto-resolve semantic conflicts.
|
|
171
|
+
- **Prevention:** Step 3 (collision detection) should move file-overlapping issues to sequential dependency levels. Conflicts at this stage indicate a missed overlap in Step 3.4.
|
|
167
172
|
3. Verify no regressions between parallel sub-agent outputs.
|
|
168
173
|
|
|
169
174
|
### 6c.5. Post-Implementation Quality Pipeline
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-pickup-delegation
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Single-issue sub-agent delegation protocol for board-pickup Step 6a. Covers research, implementation, and quality pipeline for standalone issues.
|
|
5
5
|
tags: [board, team]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Pickup — Single-Issue Delegation (Step 6a)
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-pickup-github
|
|
|
3
3
|
type: command
|
|
4
4
|
description: GitHub-specific platform procedures for board-pickup. Covers gh CLI commands for issue listing, status updates, collision detection, PR creation, and label transitions.
|
|
5
5
|
tags: [board, team, github]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Pickup — GitHub Platform Details
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-pickup-gitlab
|
|
|
3
3
|
type: command
|
|
4
4
|
description: GitLab-specific platform procedures for board-pickup. Covers glab CLI commands for issue listing, status updates, collision detection, MR creation, and label transitions.
|
|
5
5
|
tags: [board, team, gitlab]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Pickup — GitLab Platform Details
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-pickup-modes
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Auto-advance mode, error handling, and guardrails for board-pickup. Covers --auto/--unattended operation, safety guardrails, and specification generation.
|
|
5
5
|
tags: [board, team]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Pickup — Modes, Guardrails, and Error Handling
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-pickup-post-impl
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Post-implementation steps for board-pickup (Steps 7-10). Covers quality verification, commit/push, PR/MR creation, label transitions, board sync, dashboard refresh, reconciliation, and learnings capture.
|
|
5
5
|
tags: [board, team]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Pickup — Post-Implementation Steps (7-10)
|
|
8
9
|
|
|
@@ -87,7 +88,7 @@ Follow the project's PR/MR creation skill or conventions:
|
|
|
87
88
|
2. Remind user `Closes #N` auto-closes on merge.
|
|
88
89
|
3. **Post-merge board state advisory:** After merge, `Closes #N` will auto-close the issue, but label and board status updates to `status:done` / "Done" depend on platform automation:
|
|
89
90
|
- **GitHub:** Automatic IF the Projects V2 "Item closed" workflow is enabled (verify in Project > Workflows). Labels are NOT auto-updated — `status:in-review` remains on the closed issue.
|
|
90
|
-
- **Azure DevOps:**
|
|
91
|
+
- **Azure DevOps:** Verify the "Complete linked work items after merging" checkbox is checked during PR completion. State transitions to "Closed" only when this option is selected.
|
|
91
92
|
- **GitLab:** Labels are NOT updated on auto-close. `status::in-review` remains. Consider setting up a CI pipeline trigger on issue close events for automated cleanup.
|
|
92
93
|
- If automation is not configured, `board-groom` with the `health-fix` action will detect and fix the drift during the next grooming session.
|
|
93
94
|
4. If partial:
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-shared-azure-devops
|
|
|
3
3
|
type: shared-context
|
|
4
4
|
description: Azure DevOps-specific platform details for board shared context. Covers Work Items, Azure Boards, az CLI, and MCP tools.
|
|
5
5
|
tags: [board, team, azure-devops]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Shared Reference — Azure DevOps Platform Details
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-shared-overview
|
|
|
3
3
|
type: shared-context
|
|
4
4
|
description: Board overview dashboard template, model pool, model selection heuristic, and lane computation algorithm. Referenced from hatch3r-board-shared.
|
|
5
5
|
tags: [board, team]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Overview Reference
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-shared-github
|
|
|
3
3
|
type: shared-context
|
|
4
4
|
description: GitHub-specific platform details for board shared context. Covers GitHub Issues, Projects V2, gh CLI, and MCP tools.
|
|
5
5
|
tags: [board, team, github]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Shared Reference — GitHub Platform Details
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-board-shared-gitlab
|
|
|
3
3
|
type: shared-context
|
|
4
4
|
description: GitLab-specific platform details for board shared context. Covers GitLab Issues, Issue Boards, glab CLI, and label-based sync.
|
|
5
5
|
tags: [board, team, gitlab]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
# Board Shared Reference — GitLab Platform Details
|
|
8
9
|
|
|
@@ -3,6 +3,7 @@ id: hatch3r-agent-customize
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Configure per-agent customization including model overrides, description changes, and project-specific markdown instructions
|
|
5
5
|
tags: [customize]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
## Agent Pipeline
|
|
@@ -3,6 +3,7 @@ id: hatch3r-api-spec
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Generate or validate an OpenAPI specification from the codebase. Scans route definitions, extracts schemas, and produces a complete API spec.
|
|
5
5
|
tags: [planning]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
## Agent Pipeline
|
|
@@ -3,6 +3,7 @@ id: hatch3r-benchmark
|
|
|
3
3
|
type: command
|
|
4
4
|
description: Run and analyze performance benchmarks. Compare results against baselines, identify regressions, and produce performance reports.
|
|
5
5
|
tags: [review, performance]
|
|
6
|
+
quality_charter: agents/shared/quality-charter.md
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
## Agent Pipeline
|
|
@@ -60,7 +61,7 @@ Benchmark Brief:
|
|
|
60
61
|
Metrics: {time / memory / throughput / all}
|
|
61
62
|
```
|
|
62
63
|
|
|
63
|
-
**ASK:** "Does this capture the benchmark plan
|
|
64
|
+
**ASK:** "Does this capture the benchmark plan? Adjust anything before I begin discovery."
|
|
64
65
|
|
|
65
66
|
---
|
|
66
67
|
|
|
@@ -287,7 +288,7 @@ Files Created/Updated:
|
|
|
287
288
|
|
|
288
289
|
**ASK:** "Results saved. Should these become the new baseline for future comparisons? (yes — overwrites previous baseline / no — keep existing baseline)"
|
|
289
290
|
|
|
290
|
-
If yes,
|
|
291
|
+
If yes, save `results.json` as the canonical baseline for the next `previous-run` comparison.
|
|
291
292
|
|
|
292
293
|
---
|
|
293
294
|
|
|
@@ -392,7 +393,7 @@ The benchmark report follows this structure:
|
|
|
392
393
|
- **Always exclude the cold start run from statistics.** The first iteration warms caches and JIT — including it skews results.
|
|
393
394
|
- **Never overwrite baseline without confirmation.** Step 10 explicitly asks before promoting results to baseline status.
|
|
394
395
|
- **Preserve existing `.benchmarks/results.json` history.** Append new runs; do not truncate historical data without user approval.
|
|
395
|
-
- **Do not benchmark in debug mode.**
|
|
396
|
+
- **Do not benchmark in debug mode.** Verify `NODE_ENV=production` and no debug flags are active unless explicitly requested.
|
|
396
397
|
- **Respect the project's tooling hierarchy** for knowledge augmentation: project docs first, then codebase exploration, then Context7 MCP, then web research.
|
|
397
398
|
- **Report, don't interpret subjectively.** Present statistical facts. Flag regressions by threshold, not opinion. Let the user decide what matters.
|
|
398
399
|
|