hatch3r 1.3.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.
Files changed (175) hide show
  1. package/README.md +12 -7
  2. package/agents/hatch3r-a11y-auditor.md +18 -11
  3. package/agents/hatch3r-architect.md +27 -12
  4. package/agents/hatch3r-ci-watcher.md +30 -9
  5. package/agents/hatch3r-context-rules.md +18 -8
  6. package/agents/hatch3r-dependency-auditor.md +30 -15
  7. package/agents/hatch3r-devops.md +18 -13
  8. package/agents/hatch3r-docs-writer.md +33 -12
  9. package/agents/hatch3r-fixer.md +46 -9
  10. package/agents/hatch3r-implementer.md +21 -9
  11. package/agents/hatch3r-learnings-loader.md +24 -7
  12. package/agents/hatch3r-lint-fixer.md +18 -9
  13. package/agents/hatch3r-perf-profiler.md +26 -10
  14. package/agents/hatch3r-researcher.md +57 -919
  15. package/agents/hatch3r-reviewer.md +29 -10
  16. package/agents/hatch3r-security-auditor.md +25 -10
  17. package/agents/hatch3r-test-writer.md +29 -9
  18. package/agents/modes/architecture.md +1 -0
  19. package/agents/modes/boundary-analysis.md +2 -1
  20. package/agents/modes/codebase-impact.md +1 -0
  21. package/agents/modes/complexity-risk.md +1 -0
  22. package/agents/modes/coverage-analysis.md +1 -0
  23. package/agents/modes/current-state.md +1 -0
  24. package/agents/modes/feature-design.md +1 -0
  25. package/agents/modes/impact-analysis.md +1 -0
  26. package/agents/modes/library-docs.md +2 -1
  27. package/agents/modes/migration-path.md +1 -0
  28. package/agents/modes/prior-art.md +1 -0
  29. package/agents/modes/refactoring-strategy.md +1 -0
  30. package/agents/modes/regression.md +1 -0
  31. package/agents/modes/requirements-elicitation.md +1 -0
  32. package/agents/modes/risk-assessment.md +1 -0
  33. package/agents/modes/risk-prioritization.md +1 -0
  34. package/agents/modes/root-cause.md +1 -0
  35. package/agents/modes/similar-implementation.md +2 -1
  36. package/agents/modes/symptom-trace.md +1 -0
  37. package/agents/modes/test-pattern.md +2 -1
  38. package/agents/shared/external-knowledge.md +31 -0
  39. package/agents/shared/quality-charter.md +96 -0
  40. package/checks/README.md +1 -0
  41. package/checks/accessibility.md +55 -0
  42. package/commands/board/pickup-azure-devops.md +5 -0
  43. package/commands/board/pickup-delegation-multi.md +9 -1
  44. package/commands/board/pickup-delegation.md +4 -0
  45. package/commands/board/pickup-github.md +5 -0
  46. package/commands/board/pickup-gitlab.md +5 -0
  47. package/commands/board/pickup-modes.md +1 -0
  48. package/commands/board/pickup-post-impl.md +9 -1
  49. package/commands/board/shared-azure-devops.md +14 -3
  50. package/commands/board/shared-board-overview.md +1 -0
  51. package/commands/board/shared-github.md +2 -0
  52. package/commands/board/shared-gitlab.md +10 -2
  53. package/commands/hatch3r-agent-customize.md +6 -1
  54. package/commands/hatch3r-api-spec.md +1 -0
  55. package/commands/hatch3r-benchmark.md +4 -3
  56. package/commands/hatch3r-board-fill.md +52 -9
  57. package/commands/hatch3r-board-groom.md +124 -7
  58. package/commands/hatch3r-board-init.md +7 -3
  59. package/commands/hatch3r-board-pickup.md +1 -0
  60. package/commands/hatch3r-board-refresh.md +1 -0
  61. package/commands/hatch3r-board-shared.md +71 -5
  62. package/commands/hatch3r-bug-plan.md +2 -1
  63. package/commands/hatch3r-codebase-map.md +4 -3
  64. package/commands/hatch3r-command-customize.md +6 -1
  65. package/commands/hatch3r-context-health.md +1 -0
  66. package/commands/hatch3r-cost-tracking.md +1 -0
  67. package/commands/hatch3r-debug.md +4 -3
  68. package/commands/hatch3r-dep-audit.md +3 -0
  69. package/commands/hatch3r-feature-plan.md +3 -2
  70. package/commands/hatch3r-healthcheck.md +1 -0
  71. package/commands/hatch3r-hooks.md +6 -1
  72. package/commands/hatch3r-learn.md +1 -0
  73. package/commands/hatch3r-migration-plan.md +3 -2
  74. package/commands/hatch3r-onboard.md +2 -1
  75. package/commands/hatch3r-project-spec.md +4 -3
  76. package/commands/hatch3r-quick-change.md +31 -3
  77. package/commands/hatch3r-recipe.md +1 -0
  78. package/commands/hatch3r-refactor-plan.md +2 -1
  79. package/commands/hatch3r-release.md +4 -1
  80. package/commands/hatch3r-revision.md +138 -17
  81. package/commands/hatch3r-roadmap.md +5 -4
  82. package/commands/hatch3r-rule-customize.md +5 -0
  83. package/commands/hatch3r-security-audit.md +1 -0
  84. package/commands/hatch3r-skill-customize.md +5 -0
  85. package/commands/hatch3r-test-plan.md +3 -2
  86. package/commands/hatch3r-workflow.md +15 -1
  87. package/dist/cli/index.js +7595 -4548
  88. package/dist/cli/index.js.map +1 -1
  89. package/hooks/hatch3r-ci-failure.md +1 -0
  90. package/hooks/hatch3r-file-save.md +1 -0
  91. package/hooks/hatch3r-post-merge.md +1 -0
  92. package/hooks/hatch3r-pre-commit.md +1 -0
  93. package/hooks/hatch3r-pre-push.md +1 -0
  94. package/hooks/hatch3r-session-start.md +1 -0
  95. package/package.json +30 -12
  96. package/rules/hatch3r-accessibility-standards.md +2 -1
  97. package/rules/hatch3r-accessibility-standards.mdc +1 -1
  98. package/rules/hatch3r-agent-orchestration-detail.md +207 -0
  99. package/rules/hatch3r-agent-orchestration-detail.mdc +202 -0
  100. package/rules/hatch3r-agent-orchestration.md +161 -318
  101. package/rules/hatch3r-agent-orchestration.mdc +212 -154
  102. package/rules/hatch3r-api-design.md +2 -1
  103. package/rules/hatch3r-api-design.mdc +1 -1
  104. package/rules/hatch3r-browser-verification.md +4 -2
  105. package/rules/hatch3r-browser-verification.mdc +1 -0
  106. package/rules/hatch3r-ci-cd.md +2 -1
  107. package/rules/hatch3r-ci-cd.mdc +1 -1
  108. package/rules/hatch3r-code-standards.md +15 -2
  109. package/rules/hatch3r-code-standards.mdc +22 -2
  110. package/rules/hatch3r-component-conventions.md +2 -1
  111. package/rules/hatch3r-component-conventions.mdc +1 -1
  112. package/rules/hatch3r-data-classification.md +2 -1
  113. package/rules/hatch3r-data-classification.mdc +1 -1
  114. package/rules/hatch3r-deep-context.md +26 -1
  115. package/rules/hatch3r-deep-context.mdc +54 -8
  116. package/rules/hatch3r-dependency-management.md +2 -1
  117. package/rules/hatch3r-dependency-management.mdc +17 -5
  118. package/rules/hatch3r-feature-flags.md +2 -0
  119. package/rules/hatch3r-feature-flags.mdc +1 -0
  120. package/rules/hatch3r-git-conventions.md +2 -1
  121. package/rules/hatch3r-git-conventions.mdc +2 -1
  122. package/rules/hatch3r-i18n.md +2 -1
  123. package/rules/hatch3r-i18n.mdc +1 -1
  124. package/rules/hatch3r-learning-consult.md +11 -1
  125. package/rules/hatch3r-learning-consult.mdc +11 -1
  126. package/rules/hatch3r-migrations.md +2 -1
  127. package/rules/hatch3r-migrations.mdc +12 -1
  128. package/rules/hatch3r-observability-logging.md +34 -0
  129. package/rules/hatch3r-observability-logging.mdc +30 -0
  130. package/rules/hatch3r-observability-metrics.md +74 -0
  131. package/rules/hatch3r-observability-metrics.mdc +70 -0
  132. package/rules/hatch3r-observability-tracing-detail.md +160 -0
  133. package/rules/hatch3r-observability-tracing-detail.mdc +63 -0
  134. package/rules/hatch3r-observability-tracing.md +86 -0
  135. package/rules/hatch3r-observability-tracing.mdc +77 -0
  136. package/rules/hatch3r-observability.md +9 -448
  137. package/rules/hatch3r-observability.mdc +7 -159
  138. package/rules/hatch3r-performance-budgets.md +2 -0
  139. package/rules/hatch3r-performance-budgets.mdc +1 -0
  140. package/rules/hatch3r-secrets-management.md +2 -1
  141. package/rules/hatch3r-secrets-management.mdc +1 -1
  142. package/rules/hatch3r-security-patterns.md +3 -2
  143. package/rules/hatch3r-security-patterns.mdc +12 -1
  144. package/rules/hatch3r-testing.md +12 -2
  145. package/rules/hatch3r-testing.mdc +11 -2
  146. package/rules/hatch3r-theming.md +3 -2
  147. package/rules/hatch3r-theming.mdc +1 -1
  148. package/rules/hatch3r-tooling-hierarchy.md +3 -2
  149. package/rules/hatch3r-tooling-hierarchy.mdc +19 -5
  150. package/skills/hatch3r-a11y-audit/SKILL.md +11 -4
  151. package/skills/hatch3r-agent-customize/SKILL.md +5 -72
  152. package/skills/hatch3r-api-spec/SKILL.md +9 -2
  153. package/skills/hatch3r-architecture-review/SKILL.md +7 -0
  154. package/skills/hatch3r-bug-fix/SKILL.md +16 -7
  155. package/skills/hatch3r-ci-pipeline/SKILL.md +8 -1
  156. package/skills/hatch3r-command-customize/SKILL.md +5 -62
  157. package/skills/hatch3r-context-health/SKILL.md +23 -2
  158. package/skills/hatch3r-cost-tracking/SKILL.md +16 -6
  159. package/skills/hatch3r-customize/SKILL.md +124 -0
  160. package/skills/hatch3r-dep-audit/SKILL.md +9 -2
  161. package/skills/hatch3r-feature/SKILL.md +12 -4
  162. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +7 -0
  163. package/skills/hatch3r-incident-response/SKILL.md +7 -0
  164. package/skills/hatch3r-issue-workflow/SKILL.md +8 -1
  165. package/skills/hatch3r-logical-refactor/SKILL.md +8 -1
  166. package/skills/hatch3r-migration/SKILL.md +7 -0
  167. package/skills/hatch3r-perf-audit/SKILL.md +9 -2
  168. package/skills/hatch3r-pr-creation/SKILL.md +8 -1
  169. package/skills/hatch3r-qa-validation/SKILL.md +8 -1
  170. package/skills/hatch3r-recipe/SKILL.md +8 -1
  171. package/skills/hatch3r-refactor/SKILL.md +10 -2
  172. package/skills/hatch3r-release/SKILL.md +8 -1
  173. package/skills/hatch3r-rule-customize/SKILL.md +5 -65
  174. package/skills/hatch3r-skill-customize/SKILL.md +5 -62
  175. package/skills/hatch3r-visual-refactor/SKILL.md +12 -5
@@ -4,222 +4,280 @@ alwaysApply: true
4
4
  ---
5
5
  # Agent Orchestration
6
6
 
7
- This rule governs when and how to delegate work to hatch3r agents, load skills, and spawn subagents. These directives are mandatory — not suggestions.
7
+ This rule governs when and how to delegate work to hatch3r agents, load skills, and spawn subagents. These directives are mandatory — not suggestions. For extended reference on pipeline context schemas, resilience/failure handling, and observability, see `hatch3r-agent-orchestration-detail`.
8
8
 
9
- ## Universal Applicability
9
+ ## Orchestration Differentiation
10
10
 
11
- This rule applies to EVERY context without exception:
11
+ Hatch3r's orchestration uses a **phase-gated pipeline** (Research, Implement, Review, Quality) with **structured handoffs** via `PipelineContext` and a **mandatory review gate** before the quality phase. This is not free-form agent chat.
12
12
 
13
- - **Board-pickup** (epic, sub-issue, standalone, batch)
14
- - **Workflow command** (full mode and quick mode)
15
- - **Plain chat** (single task or multiple tasks)
16
- - **Issue references** (e.g., "implement #5")
17
- - **Natural language requests** (e.g., "add a dark mode toggle")
13
+ ## Universal Applicability
18
14
 
19
- Whether the user invokes a command or simply asks for a task in conversation, the full sub-agent pipeline defined below is mandatory. There is no context where implementing code inline (without sub-agents) is acceptable.
15
+ This rule applies to EVERY context without exception: board-pickup (epic, sub-issue, standalone, batch), workflow command (full/quick), plain chat, issue references, and natural language requests. The full sub-agent pipeline is mandatory never implement code inline without sub-agents.
20
16
 
21
17
  ## Universal Sub-Agent Pipeline
22
18
 
23
- Every task MUST follow this four-phase pipeline:
24
-
25
- **Phase 1 — Research:** Spawn `hatch3r-researcher` for context gathering. Skip only for trivial single-line edits (typos, comment fixes, single-value config changes). All other tasks require researcher context. **Before spawning researchers, score the task's complexity per the `hatch3r-deep-context` rule** and add the tier-appropriate researcher modes alongside the standard task-type modes (see Deep Context Integration below).
26
-
27
- **Phase 2 — Implement:** Spawn `hatch3r-implementer` for ALL code changes. One dedicated implementer per task. Never implement inline — always delegate via the Task tool. **Include reference conventions, resolved requirements, and blast radius data** from Phase 1 in the implementer prompt when available (see Deep Context Integration below).
28
-
29
- **Phase 3 — Review Loop:**
30
-
31
- - 3a. Spawn `hatch3r-reviewer` to review the implementation.
32
- - 3b. If Critical or Warning findings exist: spawn `hatch3r-fixer` with the reviewer output. When fixes touch shared or public interfaces, also include blast radius data and reference conventions from Phase 1 (if available).
33
- - 3c. Re-review: spawn `hatch3r-reviewer` on the fixed code.
34
- - 3d. Repeat 3b–3c until the reviewer reports 0 Critical + 0 Warning, or max 3 iterations reached.
35
- - 3e. If max iterations reached with remaining findings: surface to user for manual resolution.
36
-
37
- **Phase 4 — Final Quality** (runs ONLY after the review loop is clean):
38
-
39
- Spawn all applicable specialists in parallel:
40
-
41
- | Specialist | When | Mandatory? |
42
- |-----------|------|------------|
43
- | `hatch3r-test-writer` | After every code change | YES — always for code changes |
44
- | `hatch3r-security-auditor` | After every code change | YES — always for code changes |
45
- | `hatch3r-docs-writer` | After every implementation | EVALUATE — spawn when changes affect APIs, architecture, user-facing behavior, or when specs/ADRs need updating |
46
- | `hatch3r-lint-fixer` | When lint errors present | Conditional |
47
- | `hatch3r-a11y-auditor` | When UI/accessibility changes | Conditional |
48
- | `hatch3r-perf-profiler` | When performance-sensitive changes | Conditional |
49
- | `hatch3r-dependency-auditor` | When dependencies change | Conditional |
50
- | `hatch3r-ci-watcher` | When CI fails | Conditional |
51
- | `hatch3r-architect` | When architectural decisions are needed or system design review is requested | Conditional |
52
- | `hatch3r-devops` | When CI/CD, deployment, or infrastructure tasks are involved | Conditional |
19
+ Every task MUST follow this four-phase pipeline: **Phase 1 — Research** (`hatch3r-researcher`), **Phase 2 — Implement** (`hatch3r-implementer`), **Phase 3 — Review Loop** (`hatch3r-reviewer` + `hatch3r-fixer`), **Phase 4 — Final Quality** (parallel specialists). See Mandatory Delegation Directives below.
53
20
 
54
21
  ## Agent Roster
55
22
 
56
23
  | Agent | Purpose | Invoke When |
57
24
  |-------|---------|-------------|
58
- | `hatch3r-researcher` | Context gathering across 15 research modes | ALWAYS before implementation. Skip only for trivial single-line edits. Select modes by task type + tier-appropriate deep context modes. |
59
- | `hatch3r-implementer` | Focused single-task implementation | ALWAYS. One dedicated implementer per task — standalone issues, epic sub-issues, batched issues, and plain chat tasks all get dedicated implementers. |
60
- | `hatch3r-reviewer` | Code review for quality, security, performance | ALWAYS in review loop (Phase 3). Reviews implementation, then re-reviews after fixes. |
61
- | `hatch3r-fixer` | Targeted fixes for reviewer findings | When `hatch3r-reviewer` reports Critical or Warning findings during the review loop (Phase 3). |
62
- | `hatch3r-test-writer` | Regression and coverage tests | ALWAYS for code changes in final quality (Phase 4). Not just bugs — every code change gets tests. |
63
- | `hatch3r-security-auditor` | Security rules, data flows, access control | ALWAYS for code changes in final quality (Phase 4). Not just `area:security` — every code change gets a security review. |
64
- | `hatch3r-docs-writer` | Specs, ADRs, documentation maintenance | ALWAYS evaluate in final quality (Phase 4). Spawn when changes affect APIs, architecture, or user-facing behavior. |
65
- | `hatch3r-lint-fixer` | Style, formatting, type error cleanup | After implementation when lint errors are present. |
66
- | `hatch3r-a11y-auditor` | WCAG AA compliance checks | When UI/accessibility changes are made. |
67
- | `hatch3r-perf-profiler` | Performance profiling and optimization | When performance-sensitive changes are made. |
68
- | `hatch3r-dependency-auditor` | Supply chain security, CVE scanning | When dependencies change or new packages are added. |
69
- | `hatch3r-ci-watcher` | CI/CD failure diagnosis and fix suggestions | When CI fails during or after implementation. |
70
- | `hatch3r-architect` | Architecture design, system design review, technical decision documentation | When architectural decisions are needed or system design review is requested. |
71
- | `hatch3r-devops` | CI/CD pipeline operations, deployment configuration, infrastructure setup | When CI/CD, deployment, or infrastructure tasks are involved. |
25
+ | `hatch3r-researcher` | Context gathering (15 modes) | Always before implementation (skip trivial edits) |
26
+ | `hatch3r-implementer` | Single-task implementation | Always one per task |
27
+ | `hatch3r-reviewer` | Code review | Always Phase 3 review loop |
28
+ | `hatch3r-fixer` | Fix reviewer findings | Phase 3 Critical/Warning findings |
29
+ | `hatch3r-test-writer` | Tests | Always Phase 4 (every code change) |
30
+ | `hatch3r-security-auditor` | Security review | Always Phase 4 (every code change) |
31
+ | `hatch3r-docs-writer` | Documentation | Phase 4 evaluate when APIs/architecture/UX affected |
32
+ | `hatch3r-lint-fixer` | Lint/type fixes | Conditional lint errors present |
33
+ | `hatch3r-a11y-auditor` | WCAG AA checks | Conditional UI/accessibility changes |
34
+ | `hatch3r-perf-profiler` | Performance profiling | Conditional performance-sensitive changes |
35
+ | `hatch3r-dependency-auditor` | CVE/supply chain | Conditional dependencies change |
36
+ | `hatch3r-ci-watcher` | CI failure diagnosis | Conditional CI fails |
37
+ | `hatch3r-architect` | Architecture design | Conditional architectural decisions needed |
38
+ | `hatch3r-devops` | CI/CD and deployment | Conditional infrastructure tasks |
72
39
 
73
40
  ## Deep Context Integration
74
41
 
75
- Before spawning researchers in Phase 1, score the task's complexity using the `hatch3r-deep-context` rule criteria. The resulting tier determines which additional researcher modes to include alongside the standard task-type modes.
76
-
77
- ### Tier-Adjusted Research Modes
78
-
79
- **Tier 1 (Light — score 0–2):** Use only the standard task-type modes below. No additional modes.
80
-
81
- **Tier 2 (Standard — score 3–5):** Add these modes at `quick` depth alongside the task-type modes:
82
- - `requirements-elicitation` — scan for top ambiguities, ask 3–5 clarifying questions
83
- - `similar-implementation` — find 1 reference implementation, extract top-level patterns
42
+ Score task complexity per the `hatch3r-deep-context` rule before Phase 1. Apply the resulting tier:
84
43
 
85
- Present the elicitation questions to the user inline. Await answers before proceeding to Phase 2.
86
-
87
- **Tier 3 (Deep — score 6+):** Add these modes at `deep` depth alongside the task-type modes:
88
- - `requirements-elicitation` — full 10-dimension ambiguity scan, dependency questions, cross-cutting concern checklist
89
- - `similar-implementation` — find 2–3 references, full convention extraction, divergence analysis
90
- - `codebase-impact` at `deep` depth (with transitive tracing, API consumer map, blast radius)
91
-
92
- **Mandatory Tier 3 checkpoint:** Present a consolidated Pre-Implementation Summary to the user and ASK for confirmation. Do NOT proceed to Phase 2 until all unresolved questions are answered.
93
-
94
- ### Implementer Prompt Enrichment
95
-
96
- When spawning `hatch3r-implementer` in Phase 2, include the following from Phase 1 results when available:
97
- - **Reference Conventions**: `similar-implementation` output — the implementer uses this in its Convention Lock step (Step 1b)
98
- - **Resolved Requirements**: User's answers to `requirements-elicitation` questions — explicit decisions the implementer should follow instead of guessing
99
- - **Blast Radius**: Enhanced `codebase-impact` output with transitive traces and API consumer maps — informs which consumers and contracts must be preserved
44
+ - **Tier 2 (Standard):** Present elicitation questions inline. Await answers before Phase 2.
45
+ - **Tier 3 (Deep):** Present Pre-Implementation Summary and ASK for confirmation. Do NOT proceed until all unresolved questions are answered.
100
46
 
101
47
  ## Mandatory Delegation Directives
102
48
 
103
49
  ### Context Gathering (Before Implementation)
104
50
 
105
- You MUST spawn a `hatch3r-researcher` subagent before implementing any task. Skip only for trivial single-line edits (typos, comment fixes, single-value config changes). Select research modes by task type, then add tier-appropriate modes per the Deep Context Integration section above:
51
+ Spawn `hatch3r-researcher` before implementing any task. Skip only for trivial single-line edits. Select modes by task type, then add tier-appropriate modes per Deep Context Integration:
106
52
 
107
- - **`type:bug`**: modes `symptom-trace`, `root-cause`, `codebase-impact` + tier modes
108
- - **`type:feature`**: modes `codebase-impact`, `feature-design`, `architecture` + tier modes
109
- - **`type:refactor`**: modes `current-state`, `refactoring-strategy`, `migration-path` + tier modes
110
- - **`type:qa`**: modes `codebase-impact` + tier modes
53
+ - **`type:bug`**: `symptom-trace`, `root-cause`, `codebase-impact` + tier modes
54
+ - **`type:feature`**: `codebase-impact`, `feature-design`, `architecture` + tier modes
55
+ - **`type:refactor`**: `current-state`, `refactoring-strategy`, `migration-path` + tier modes
56
+ - **`type:qa`**: `codebase-impact` + tier modes
111
57
 
112
- Use depth `quick` for low-risk tasks, `standard` for medium-risk, `deep` for high-risk. The `hatch3r-deep-context` tier may override depth upward (e.g., a Tier 3 task always uses `deep` depth for the additional modes, even if the task-type modes use `standard`).
58
+ Use depth `quick` for low-risk, `standard` for medium-risk, `deep` for high-risk. Tier 3 always uses `deep` depth.
113
59
 
114
- ### Implementation Delegation
60
+ ### Research Completeness Checklist
115
61
 
116
- You MUST spawn a `hatch3r-implementer` subagent via the Task tool for ALL code changes. Never implement inline.
62
+ Before Phase 1 to Phase 2 handoff, verify:
117
63
 
118
- - **Single standalone issue**: Spawn one `hatch3r-implementer`. The orchestrator coordinates git, PR, and board operations.
119
- - **Plain chat single task**: Spawn one `hatch3r-implementer`. Create synthetic issue context first (title, acceptance criteria, type).
120
- - **Epics with sub-issues**: Spawn one `hatch3r-implementer` per sub-issue. Execute level-by-level respecting dependency order.
121
- - **Multiple standalone issues (batch)**: Treat as a batch. Group by dependency level, spawn one `hatch3r-implementer` per issue, execute level-by-level. Shared branch, combined PR.
64
+ - [ ] **All affected files identified** files to be created, modified, or deleted are listed.
65
+ - [ ] **Blast radius assessed** downstream consumers and integration points documented.
66
+ - [ ] **Existing tests located** test files covering affected code identified (or absence noted).
67
+ - [ ] **Dependencies mapped** internal and external dependencies enumerated.
122
68
 
123
- **Implementer prompt enrichment:** For Tier 2 and Tier 3 tasks, include the deep context outputs in the implementer prompt:
124
- - `similar-implementation` findings as "Reference Conventions" (triggers the implementer's Convention Lock step)
125
- - Resolved `requirements-elicitation` answers as "Resolved Requirements"
126
- - Enhanced `codebase-impact` blast radius data (Tier 3 only)
69
+ If any item is unconfirmed, re-run researcher with additional modes or surface to user.
127
70
 
128
- ### Post-Implementation Quality Pipeline
71
+ ### Implementation Delegation
129
72
 
130
- You MUST run the review loop and final quality phases after implementation completes.
73
+ Spawn `hatch3r-implementer` via Task tool for ALL code changes. Never implement inline.
131
74
 
132
- **Phase 3 Review Loop:**
75
+ - **Single issue**: One implementer. Orchestrator owns git/PR/board.
76
+ - **Plain chat task**: One implementer. Create synthetic issue context first.
77
+ - **Epics**: One implementer per sub-issue, level-by-level respecting dependency order.
78
+ - **Batch**: Group by dependency level, one implementer per issue, shared branch + combined PR.
133
79
 
134
- 1. Spawn `hatch3r-reviewer` code review. Include the diff and acceptance criteria in the prompt.
135
- 2. If the reviewer reports Critical or Warning findings: spawn `hatch3r-fixer` with the full reviewer output (findings, file paths, line references, suggested fixes).
136
- 3. After fixes: spawn `hatch3r-reviewer` again to re-review the fixed code.
137
- 4. Repeat steps 2–3 until the reviewer reports 0 Critical + 0 Warning, or max 3 iterations reached.
138
- 5. If max iterations reached with remaining findings: surface to user for manual resolution. Do not proceed to Phase 4 until the user acknowledges.
80
+ **Implementer prompt enrichment (Tier 2+):** Include `similar-implementation` findings as "Reference Conventions", resolved `requirements-elicitation` answers as "Resolved Requirements", and blast radius data (Tier 3 only).
139
81
 
140
- **Phase 4 Final Quality** (runs ONLY after the review loop is clean):
82
+ ### Mid-Implementation Research Gap Checkpoint
141
83
 
142
- Launch as many independent subagents in parallel as the platform supports no artificial concurrency limit.
84
+ At the midpoint of Phase 2 (after initial files are modified but before completion), the implementer MUST evaluate whether research gaps exist. This prevents discovering missing context too late in the pipeline.
143
85
 
144
- **Always spawn (mandatory for every code change):**
86
+ **Checkpoint triggers:**
87
+ 1. Implementation requires modifying a file not listed in `researchFindings.affectedFiles`.
88
+ 2. An undocumented dependency or integration point is discovered.
89
+ 3. The implementer's confidence drops below "medium" for any sub-task.
90
+ 4. A test file expected from research does not exist or covers different behavior.
145
91
 
146
- 1. `hatch3r-test-writer` tests for all code changes. Unit tests for new logic, regression tests for bug fixes, integration tests for cross-module changes.
147
- 2. `hatch3r-security-auditor` security review of all code changes. Audit data flows, access control, input validation, and secret management.
92
+ **Actions when gaps are detected:**
93
+ - Log the gap in `PipelineContext.researchGaps`.
94
+ - If the gap is blocking (cannot proceed without the missing context): pause implementation, surface the gap to the orchestrator, and request a targeted re-run of `hatch3r-researcher` with the specific modes needed.
95
+ - If the gap is non-blocking (can proceed with assumptions): document the assumption, continue implementation, and flag for reviewer attention in Phase 3.
148
96
 
149
- **Always evaluate (spawn when applicable):**
97
+ ### Per-Task Mini-Review
150
98
 
151
- 3. `hatch3r-docs-writer` spawn when changes affect public APIs, architectural patterns, user-facing behavior, or when specs/ADRs need updating. If no documentation impact exists, skip silently.
99
+ For multi-sub-task implementations, the implementer performs a lightweight mini-review after each sub-task: verify correctness, check interface contracts, validate no regressions, gate progression. Mini-reviews are internal (no separate reviewer agent).
152
100
 
153
- **Conditional specialists (spawn when triggered):**
101
+ ### Post-Implementation Quality Pipeline
154
102
 
155
- 4. `hatch3r-lint-fixer`when lint or type errors are present after implementation.
156
- 5. `hatch3r-a11y-auditor` — when UI or accessibility changes are made.
157
- 6. `hatch3r-perf-profiler` when performance-sensitive changes are made.
158
- 7. `hatch3r-dependency-auditor` when dependencies change or new packages are added.
159
- 8. `hatch3r-architect` when architectural decisions are needed or system design review is requested.
160
- 9. `hatch3r-devops` when CI/CD, deployment, or infrastructure tasks are involved.
103
+ **Phase 3Review Loop:**
104
+
105
+ 1. Spawn `hatch3r-reviewer` with diff and acceptance criteria. Reviewer includes blast radius summary.
106
+ 2. Critical/Warning findings: spawn `hatch3r-fixer` with full reviewer output.
107
+ 3. Re-review after fixes. Repeat until 0 Critical + 0 Warning, or max 3 iterations.
108
+ 4. **Confirmation pass** after clean review: lightweight re-review for fix-driven regressions and acceptance criteria completeness. The confirmation pass checks only: (a) no new test failures compared to Phase 2 baseline, (b) no type errors introduced, (c) acceptance criteria from the issue are still met. It does not re-run the full review checklist.
109
+ 5. Max iterations reached: surface to user with a structured summary: iteration count, remaining Critical findings (with file:line), remaining Warning findings, and a recommendation (fix manually vs. accept risk). Never present raw reviewer output without summarization.
110
+
111
+ **Phase 4 — Final Quality** (after review loop is clean):
112
+
113
+ Launch parallel subagents -- no artificial concurrency limit.
114
+
115
+ - **Always:** `hatch3r-test-writer`, `hatch3r-security-auditor`
116
+ - **Evaluate:** `hatch3r-docs-writer` (when APIs/architecture/UX affected)
117
+ - **Conditional:** `hatch3r-lint-fixer`, `hatch3r-a11y-auditor`, `hatch3r-perf-profiler`, `hatch3r-dependency-auditor`, `hatch3r-architect`, `hatch3r-devops`
118
+
119
+ **Specialist Prompt Enrichment:** When spawning Phase 4 specialists, include:
120
+ - The `filesChanged` list from Phase 2 so specialists focus on affected code.
121
+ - The review verdict summary from Phase 3 so specialists do not re-flag already-reviewed issues.
122
+ - The `researchFindings.blastRadius` so specialists can assess downstream impact of their changes.
123
+
124
+ **Phase 4 Specialist Trigger Table:**
125
+
126
+ | Specialist | Mode | Trigger Conditions |
127
+ |-----------|------|--------------------|
128
+ | `hatch3r-test-writer` | Always | Any code change |
129
+ | `hatch3r-security-auditor` | Always | Any code change |
130
+ | `hatch3r-docs-writer` | Evaluate | Public API, architecture, or UX changes |
131
+ | `hatch3r-lint-fixer` | Conditional | Lint/type errors present |
132
+ | `hatch3r-a11y-auditor` | Conditional | UI/accessibility changes |
133
+ | `hatch3r-perf-profiler` | Conditional | Performance-sensitive changes |
134
+ | `hatch3r-dependency-auditor` | Conditional | Dependency files modified (package.json, go.mod, Cargo.toml, requirements.txt, Gemfile, pom.xml, pubspec.yaml, mix.exs, composer.json, and their lockfiles) |
135
+ | `hatch3r-architect` | Conditional | Architectural decisions, new modules/services |
136
+ | `hatch3r-devops` | Conditional | CI/CD or infrastructure changes |
137
+
138
+ **Project-Type-Aware Specialist Selection:**
139
+
140
+ When `PipelineContext.projectType` is available (populated from repo analysis), use the detected languages and frameworks to enrich specialist prompts with language-specific hints. For example:
141
+ - **TypeScript/JavaScript:** Include strict mode checks for lint-fixer, framework-specific test patterns for test-writer.
142
+ - **Python:** Include ruff/mypy hints for lint-fixer, pytest patterns for test-writer, SSTI/SQLi checks for security-auditor.
143
+ - **Go:** Include golangci-lint for lint-fixer, govulncheck for security-auditor, table-driven test patterns for test-writer.
144
+ - **Rust:** Include clippy lints for lint-fixer, cargo-audit for security-auditor.
145
+
146
+ See `src/pipeline/pipelineContext.ts` for the full `LANGUAGE_SPECIALIST_CONFIGS` mapping.
147
+
148
+ ### Phase 4 Validation Pass
149
+
150
+ After all Phase 4 specialists complete, run a validation pass to catch regressions:
151
+
152
+ 1. Run test suite and type checker. Compare against Phase 3 baseline cached in `PipelineContext`.
153
+ 2. No new failures: proceed to completion.
154
+ 3. New failures: identify causing specialist, spawn `hatch3r-fixer`, re-validate (max 2 iterations).
155
+ 4. Persistent regressions: surface to user. Do not silently accept.
156
+ 5. If any specialist produced code fixes (not just findings), spawn a lightweight `hatch3r-reviewer` re-review scoped to files modified by Phase 4 specialists. This prevents specialist fixes from bypassing the Phase 3 review gate. Max 1 re-review iteration; Critical findings trigger a single fixer pass.
157
+
158
+ ### Specialist Success Criteria
159
+
160
+ | Specialist | Success Criterion |
161
+ |-----------|-------------------|
162
+ | `hatch3r-test-writer` | All new/modified code paths have tests; no untested branches in changed files. |
163
+ | `hatch3r-security-auditor` | No HIGH/CRITICAL findings unresolved; MEDIUM findings documented with plan. |
164
+ | `hatch3r-docs-writer` | Affected APIs, architecture, and UX changes reflected in docs. |
165
+ | `hatch3r-lint-fixer` | Zero lint/type errors in changed files. |
166
+ | `hatch3r-a11y-auditor` | WCAG AA compliance; no new a11y violations. |
167
+ | `hatch3r-perf-profiler` | No performance regressions; new hot paths benchmarked. |
168
+ | `hatch3r-dependency-auditor` | No known CVEs; license compatibility verified. |
169
+ | `hatch3r-architect` | ADRs documented; design aligns with patterns or divergence justified. |
170
+ | `hatch3r-devops` | CI/CD passes end-to-end; deployment config validated. |
161
171
 
162
172
  ## Skill Loading Directives
163
173
 
164
- Before implementing any task, you MUST read and follow the matching hatch3r skill:
174
+ Load the matching skill before implementation:
165
175
 
166
176
  | Task Type | Skill |
167
177
  |-----------|-------|
168
178
  | `type:bug` | `hatch3r-bug-fix` |
169
- | `type:feature` | `hatch3r-feature` (aka `hatch3r-feature-implementation`) |
179
+ | `type:feature` | `hatch3r-feature` |
170
180
  | `type:refactor` + `area:ui` | `hatch3r-visual-refactor` |
171
181
  | `type:refactor` + behavior change | `hatch3r-logical-refactor` |
172
- | `type:refactor` (other) | `hatch3r-refactor` (aka `hatch3r-code-refactor`) |
182
+ | `type:refactor` (other) | `hatch3r-refactor` |
173
183
  | `type:qa` | `hatch3r-qa-validation` |
174
184
 
175
- When a skill references agents under "Required Agent Delegation", those delegations are mandatory — you MUST spawn the listed agents via the Task tool.
185
+ Skill-referenced agent delegations are mandatory.
176
186
 
177
187
  ## Subagent Spawning Protocol
178
188
 
179
- When spawning any subagent via the Task tool:
189
+ 1. Use `subagent_type: "generalPurpose"` for all delegations.
190
+ 2. Include: agent protocol, applicable `scope: always` rules, tooling hierarchy, relevant learnings.
191
+ 3. Launch independent subagents in parallel — maximum parallelism.
192
+ 4. Await and review results. Surface BLOCKED or PARTIAL to user.
193
+
194
+ ## Cross-Phase Error Propagation
195
+
196
+ When a phase produces a non-SUCCESS status, the orchestrator must propagate error context to downstream phases rather than silently dropping it:
197
+
198
+ 1. **Phase 1 PARTIAL** (incomplete research): Include the `researchGaps` list in the implementer prompt so the implementer knows which areas lack verified context. Set implementer confidence expectations accordingly.
199
+ 2. **Phase 2 PARTIAL** (incomplete implementation): Include the `reason` field and list of unimplemented acceptance criteria in the reviewer prompt. The reviewer must distinguish between "not done yet" and "done incorrectly."
200
+ 3. **Phase 3 UNRESOLVED** (review loop exhausted): Include the unresolved findings list in the Phase 4 specialist prompts. Specialists must not introduce changes that conflict with known unresolved issues.
201
+ 4. **Phase 4 specialist FAILED**: Include the failure reason when surfacing to the user. Never report "Phase 4 failed" without specifying which specialist failed and why.
202
+
203
+ ## Correlation ID
204
+
205
+ Generate a UUID v4 per top-level task before Phase 1. Include in every subagent prompt as `correlation_id`. All subagents include it in logs, outputs, and status reports. Epic sub-issues get individual IDs; batch tasks share one ID with a sub-task index.
206
+
207
+ ## Severity Scale
208
+
209
+ | Severity | Definition | Pipeline Action |
210
+ |----------|-----------|-----------------|
211
+ | **CRITICAL** | Blocks merge. Security vulnerabilities, data loss, broken core functionality. | Must resolve before Phase 3 exit. |
212
+ | **HIGH** | Should fix before merge. Significant bugs, performance regressions. | Fix or escalate to user. |
213
+ | **MEDIUM** | Fix in same sprint. Code quality, minor bugs. | Document with remediation plan. |
214
+ | **LOW** | Track for future. Style nits, minor improvements. | Log only. No merge gate. |
215
+ | **INFO** | Informational. Observations, suggestions. | Awareness only. |
216
+
217
+ All subagents MUST map findings to this scale.
218
+
219
+ ## Status Codes
180
220
 
181
- 1. **Use `subagent_type: "generalPurpose"`** for all hatch3r agent delegations.
182
- 2. **Include in every subagent prompt**:
183
- - The agent protocol to follow (e.g., "Follow the hatch3r-implementer agent protocol").
184
- - All `scope: always` rules from `.agents/rules/` that apply.
185
- - The project's tooling hierarchy (Context7 MCP for library docs, web research for current context).
186
- - Relevant learnings from `.agents/learnings/` if the directory exists.
187
- 3. **Launch as many independent subagents in parallel as the platform supports.** Do not impose an artificial concurrency limit. Use maximum parallelism for independent work.
188
- 4. **Await and review results** before proceeding. If a subagent reports BLOCKED or PARTIAL, surface to the user.
221
+ | Status | Meaning |
222
+ |--------|---------|
223
+ | **SUCCESS** | Fully completed, all criteria met. |
224
+ | **PARTIAL** | Partially completed; include `reason` field. |
225
+ | **FAILED** | No usable output; include `reason` field. |
226
+ | **SKIPPED** | Intentionally not executed. |
227
+ | **TIMEOUT** | Time budget exceeded; forward partial output. |
189
228
 
190
- ## Single-Task Plain Chat Protocol
229
+ ## Phase Skip Criteria
191
230
 
192
- When the user provides a single task in plain chat (no command invoked, no issue reference), the full sub-agent pipeline still applies:
231
+ Consistent criteria for when each pipeline phase can be safely skipped. All commands that use the pipeline MUST reference these criteria — do not invent command-specific skip rules.
193
232
 
194
- 1. **Classify** the task by type (bug/feature/refactor/QA/other) based on context.
195
- 2. **Create synthetic issue context** — title, acceptance criteria, and type — from the user's instruction.
196
- 3. **Run the Universal Sub-Agent Pipeline**: Phase 1 (Research) Phase 2 (Implement) Phase 3 (Review Loop) Phase 4 (Final Quality).
197
- 4. For issue references in chat (e.g., "fix #5"), fetch issue details using the platform CLI (check `platform` in `.agents/hatch.json`) and use them as the task context instead of creating synthetic context:
198
- - **GitHub:** `gh issue view`
199
- - **Azure DevOps:** `az boards work-item show --id`
200
- - **GitLab:** `glab issue view`
233
+ | Phase | Can Skip When | Mandatory Minimum (even when skipped) |
234
+ |-------|--------------|--------------------------------------|
235
+ | **Phase 1 (Research)** | Trivial single-line edit (typo, comment, single-value config); Tier 1 single-file change with no cross-module impact; Research already cached in PipelineContext | Affected files identified (even via quick scan); existing tests noted |
236
+ | **Phase 2 (Implement)** | Never implementation is always required for code changes | All changes via hatch3r-implementer (never inline except trivial items in quick-change) |
237
+ | **Phase 3 (Review)** | All items trivial (quick-change only); documentation-only change with no code | Quality checks (lint/typecheck/test) must pass; acceptance criteria verified |
238
+ | **Phase 4 (Quality)** | Review loop unresolved AND user chose manual resolution; documentation-only; all trivial + quality checks pass (quick-change only) | test-writer + security-auditor always required for code changes; quality checks must pass |
201
239
 
202
- This ensures consistent quality regardless of how the task was initiated.
240
+ See `src/pipeline/pipelineContext.ts` for the programmatic `PHASE_SKIP_CRITERIA` constant.
203
241
 
204
- ## Multi-Task Detection (Plain Chat)
242
+ ## Root-Cause Depth Requirements
205
243
 
206
- When the user provides multiple tasks in a single message numbered lists, comma-separated instructions, multiple issue references (e.g., "implement #1, #3, #7"), or multiple distinct requests — you MUST parallelize them:
244
+ When a pipeline phase reports a failure or unexpected result, the orchestrator must perform root-cause classification before deciding the next action:
207
245
 
208
- 1. **Parse** the message into individual discrete tasks. Each distinct implementation request is one task.
209
- 2. **Classify** each task by type (bug/feature/refactor/QA/other) based on context or explicit labels.
210
- 3. **Build a dependency graph** among the tasks. Independent tasks share the same level and run in parallel.
211
- 4. **Spawn one `hatch3r-researcher` subagent per task** (skip for trivial single-line edits only). Launch in parallel.
212
- 5. **Spawn one `hatch3r-implementer` subagent per task** per dependency level.
213
- 6. **For issue references**: fetch issue details using the platform CLI (check `platform` in `.agents/hatch.json`):
214
- - **GitHub:** `gh issue view`
215
- - **Azure DevOps:** `az boards work-item show --id`
216
- - **GitLab:** `glab issue view`
217
- 7. **For natural language tasks**: create synthetic issue context (title, acceptance criteria, type) from the instruction. Pass this context to the implementer subagent.
218
- 8. **Run the review loop** (Phase 3) after all implementations complete: spawn reviewer, then fixer for Critical/Warning findings, re-review, repeat until clean (max 3 iterations).
219
- 9. **Spawn final quality subagents** (Phase 4, after review loop is clean): test-writer + security-auditor (always), plus docs-writer, auditors as applicable.
246
+ | Symptom | Shallow Fix (avoid) | Root-Cause Fix (required) |
247
+ |---------|---------------------|---------------------------|
248
+ | Test failure after Phase 2 | Disable or skip the failing test | Identify why the implementation breaks the test -- fix the code or update the test with justification |
249
+ | Lint errors after Phase 4 | Add `eslint-disable` comments | Fix the underlying code pattern that triggers the lint rule |
250
+ | Type errors after fixer changes | Cast with `as any` | Trace the type mismatch to its source and fix the type definition or usage |
251
+ | Review loop not converging | Surface to user after 3 iterations without analysis | Classify whether findings are oscillating (fixer A breaks what fixer B fixed) and surface the conflict pattern |
220
252
 
221
- This directive applies regardless of whether board-pickup was invoked. Any context where implementation tasks are identified MUST use one subagent per task with maximum parallelism.
253
+ The orchestrator must reject superficial fixes from any subagent. If a fixer's output contains suppression patterns (disable comments, `any` casts, test skips without linked issues), classify as PARTIAL and re-run with an adjusted prompt that requests a root-cause fix.
254
+
255
+ ## Task Context Protocols
256
+
257
+ **Single-task plain chat:** Classify task type, create synthetic issue context, run full pipeline. For issue references, fetch details via platform CLI.
258
+
259
+ **Multi-task plain chat:** Parse into discrete tasks, classify each, build dependency graph, parallelize researchers and implementers per dependency level, run review loop after all implementations, then Phase 4 specialists. When parallel implementers modify the same file: accept disjoint region edits, merge overlapping regions using the larger-scope change as base, and halt on semantic conflicts (contradictory interface/contract changes) for user resolution.
260
+
261
+ **Auto-mode guardrails:** In unattended execution, verify scope containment, no unapproved destructive operations, and output schema compliance after each phase. Halt on violation. See `hatch3r-agent-orchestration-detail` for full guardrail specifications.
222
262
 
223
263
  ## Rule Application
224
264
 
225
- All hatch3r rules with `scope: always` apply to every implementation task, including work delegated to subagents. When constructing subagent prompts, include the rule directives subagents do not automatically inherit the parent's rule context.
265
+ All `scope: always` rules apply to every task including subagent work. Include rule directives in subagent prompts.
266
+
267
+ ### Tiered Rule Inclusion
268
+
269
+ **Tier 1 -- Always include (every subagent):**
270
+ - `hatch3r-security-patterns` -- security invariants
271
+ - `hatch3r-code-standards` -- code quality
272
+
273
+ **Tier 2 -- Include by phase:**
274
+ - `hatch3r-testing` -- test-writer, implementer, reviewer
275
+ - `hatch3r-accessibility-standards` -- a11y-auditor, reviewer (UI)
276
+ - `hatch3r-git-conventions` -- orchestrator git ops
277
+ - `hatch3r-ci-cd` -- ci-watcher, devops
278
+ - `hatch3r-dependency-management` -- dependency-auditor
279
+
280
+ **Tier 3 -- On-demand:**
281
+ - `hatch3r-api-design`, `hatch3r-secrets-management`, `hatch3r-data-classification`, `hatch3r-performance-budgets`, `hatch3r-browser-verification`, `hatch3r-component-conventions`, `hatch3r-i18n`, `hatch3r-theming`, `hatch3r-migrations`, `hatch3r-feature-flags`, `hatch3r-observability-logging`, `hatch3r-observability-metrics`, `hatch3r-observability-tracing`, `hatch3r-observability-tracing-detail`
282
+
283
+ For limited context windows, Tier 1 is mandatory. Tier 2/3 included selectively by agent role and task scope.
@@ -2,8 +2,9 @@
2
2
  id: hatch3r-api-design
3
3
  type: rule
4
4
  description: API endpoint and contract design patterns for the project
5
- scope: always
5
+ scope: "**/api/**,**/routes/**,**/controllers/**,**/endpoints/**,**/*route*,**/*controller*,**/*endpoint*,**/*handler*,**/graphql/**,**/trpc/**"
6
6
  tags: [planning]
7
+ quality_charter: agents/shared/quality-charter.md
7
8
  ---
8
9
  # API Design
9
10
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: API endpoint and contract design patterns for the project
3
- alwaysApply: true
3
+ globs: ["**/api/**", "**/routes/**", "**/controllers/**", "**/endpoints/**", "**/*route*", "**/*controller*", "**/*endpoint*", "**/*handler*", "**/graphql/**", "**/trpc/**"]
4
4
  ---
5
5
  # API Design
6
6
 
@@ -3,7 +3,9 @@ id: hatch3r-browser-verification
3
3
  type: rule
4
4
  description: Browser-based verification for UI and user-facing changes
5
5
  scope: conditional
6
+ globs: "**/*.vue,**/*.jsx,**/*.tsx,**/*.svelte,**/components/**,**/*.html,**/*.css,**/*.scss"
6
7
  tags: [review]
8
+ quality_charter: agents/shared/quality-charter.md
7
9
  ---
8
10
  # Browser Verification
9
11
 
@@ -60,7 +62,7 @@ Commands in the "Does NOT Support" column are documentation-only, planning-only,
60
62
 
61
63
  ## Verification Protocol
62
64
 
63
- ### 1. Ensure Dev Server is Running
65
+ ### 1. Confirm Dev Server is Running
64
66
 
65
67
  - Check if the project's dev server is already running (check terminal output or process list).
66
68
  - If not running, start it in the background using the project's dev command (e.g., `npm run dev`).
@@ -77,7 +79,7 @@ Commands in the "Does NOT Support" column are documentation-only, planning-only,
77
79
 
78
80
  ### 3. Capture Evidence
79
81
 
80
- - Take screenshots of the affected surfaces showing the change works correctly.
82
+ - Take screenshots of the affected surfaces showing the change produces the expected visual and interactive result.
81
83
  - For before/after changes (visual refactors, bug fixes), capture both states when possible.
82
84
  - Note any browser console errors or warnings in the verification summary.
83
85
  - Include screenshots in the PR description or attach to the issue.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Browser-based verification for UI and user-facing changes
3
+ globs: ["**/*.vue", "**/*.jsx", "**/*.tsx", "**/*.svelte", "**/components/**", "**/*.html", "**/*.css", "**/*.scss"]
3
4
  alwaysApply: false
4
5
  ---
5
6
  # Browser Verification
@@ -2,8 +2,9 @@
2
2
  id: hatch3r-ci-cd
3
3
  type: rule
4
4
  description: CI/CD pipeline standards covering stage gates, deployment strategies, and rollback procedures
5
- scope: always
5
+ scope: "**/.github/workflows/**,**/Dockerfile*,**/docker-compose*,**/.gitlab-ci*,**/Jenkinsfile,**/azure-pipelines*,**/.circleci/**,**/deploy/**,**/*pipeline*"
6
6
  tags: [devops]
7
+ quality_charter: agents/shared/quality-charter.md
7
8
  ---
8
9
  # CI/CD Standards
9
10
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: CI/CD pipeline standards covering stage gates, deployment strategies, and rollback procedures
3
- alwaysApply: true
3
+ globs: ["**/.github/workflows/**", "**/Dockerfile*", "**/docker-compose*", "**/.gitlab-ci*", "**/Jenkinsfile", "**/azure-pipelines*", "**/.circleci/**", "**/deploy/**", "**/*pipeline*"]
4
4
  ---
5
5
  # CI/CD Standards
6
6
 
@@ -3,7 +3,8 @@ id: hatch3r-code-standards
3
3
  type: rule
4
4
  description: Code quality and file naming conventions for the project
5
5
  scope: always
6
- tags: [core]
6
+ tags: [core, lang:typescript]
7
+ quality_charter: agents/shared/quality-charter.md
7
8
  ---
8
9
  # Code Standards
9
10
 
@@ -29,7 +30,7 @@ tags: [core]
29
30
  ### Discriminated Unions
30
31
 
31
32
  - Model domain variants with discriminated unions over polymorphic classes or `type` string checks. Every variant must share a common literal discriminant field (e.g., `kind`, `type`, `status`).
32
- - Use exhaustive `switch` with a `never` default case to ensure all variants are handled. The compiler will error when a new variant is added but not handled.
33
+ - Use exhaustive `switch` with a `never` default case so the compiler errors when a new variant is added but not handled.
33
34
 
34
35
  ### Branded Types
35
36
 
@@ -91,6 +92,18 @@ tags: [core]
91
92
  - Include `correlationId` in all error logs for tracing across client and server.
92
93
  - No secrets, tokens, or PII in error messages or logs.
93
94
 
95
+ ### Error Handling Anti-Patterns (Prohibited)
96
+
97
+ The following patterns are always wrong and must be flagged in review:
98
+
99
+ | Anti-Pattern | Why It Is Wrong | Correct Alternative |
100
+ |-------------|-----------------|---------------------|
101
+ | `catch (e) {}` (empty catch) | Silently swallows errors; failures become invisible | `catch (e) { logger.error('context', e); throw e; }` or handle with Result type |
102
+ | `catch (e) { return null; }` in auth paths | Fail-open: returns "no user" instead of "auth failed" | `catch (e) { throw new AuthError('auth_failed', e); }` |
103
+ | `as any` to fix type errors | Bypasses type safety; hides real type mismatches | Fix the actual type or use a proper type guard |
104
+ | `// @ts-ignore` without linked issue | Permanent type-safety hole | Fix the type error or add `// @ts-expect-error` with issue link |
105
+ | `try { ... } catch { return defaultValue; }` for all errors | Treats transient errors (network) same as permanent ones (validation) | Discriminate error types: retry transient, fail permanent |
106
+
94
107
  ## Import Ordering
95
108
 
96
109
  Enforce consistent import ordering via linter rules (e.g., `eslint-plugin-import`). The canonical order: