hatch3r 1.0.0 → 1.2.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 +93 -322
- package/agents/hatch3r-a11y-auditor.md +24 -6
- package/agents/hatch3r-architect.md +20 -1
- package/agents/hatch3r-ci-watcher.md +31 -8
- package/agents/hatch3r-context-rules.md +14 -2
- package/agents/hatch3r-dependency-auditor.md +21 -5
- package/agents/hatch3r-devops.md +37 -6
- package/agents/hatch3r-docs-writer.md +19 -3
- package/agents/hatch3r-fixer.md +171 -0
- package/agents/hatch3r-implementer.md +84 -11
- package/agents/hatch3r-learnings-loader.md +69 -13
- package/agents/hatch3r-lint-fixer.md +19 -14
- package/agents/hatch3r-perf-profiler.md +18 -1
- package/agents/hatch3r-researcher.md +440 -5
- package/agents/hatch3r-reviewer.md +97 -5
- package/agents/hatch3r-security-auditor.md +23 -5
- package/agents/hatch3r-test-writer.md +21 -10
- package/checks/README.md +49 -0
- package/checks/code-quality.md +49 -0
- package/checks/performance.md +58 -0
- package/checks/security.md +58 -0
- package/checks/testing.md +53 -0
- package/commands/board/pickup-azure-devops.md +81 -0
- package/commands/board/pickup-delegation-multi.md +197 -0
- package/commands/board/pickup-delegation.md +100 -0
- package/commands/board/pickup-github.md +82 -0
- package/commands/board/pickup-gitlab.md +81 -0
- package/commands/board/pickup-modes.md +143 -0
- package/commands/board/pickup-post-impl.md +120 -0
- package/commands/board/shared-azure-devops.md +149 -0
- package/commands/board/shared-board-overview.md +215 -0
- package/commands/board/shared-github.md +169 -0
- package/commands/board/shared-gitlab.md +142 -0
- package/commands/hatch3r-agent-customize.md +40 -2
- package/commands/hatch3r-api-spec.md +294 -32
- package/commands/hatch3r-benchmark.md +386 -32
- package/commands/hatch3r-board-fill.md +161 -25
- package/commands/hatch3r-board-groom.md +595 -0
- package/commands/hatch3r-board-init.md +203 -46
- package/commands/hatch3r-board-pickup.md +79 -457
- package/commands/hatch3r-board-refresh.md +98 -27
- package/commands/hatch3r-board-shared.md +87 -238
- package/commands/hatch3r-bug-plan.md +16 -3
- package/commands/hatch3r-codebase-map.md +43 -10
- package/commands/hatch3r-command-customize.md +6 -0
- package/commands/hatch3r-context-health.md +5 -0
- package/commands/hatch3r-cost-tracking.md +5 -0
- package/commands/hatch3r-debug.md +426 -0
- package/commands/hatch3r-dep-audit.md +7 -1
- package/commands/hatch3r-feature-plan.md +74 -12
- package/commands/hatch3r-healthcheck.md +17 -1
- package/commands/hatch3r-hooks.md +16 -10
- package/commands/hatch3r-learn.md +15 -9
- package/commands/hatch3r-migration-plan.md +333 -33
- package/commands/hatch3r-onboard.md +327 -38
- package/commands/hatch3r-project-spec.md +46 -10
- package/commands/hatch3r-quick-change.md +336 -0
- package/commands/hatch3r-recipe.md +6 -0
- package/commands/hatch3r-refactor-plan.md +29 -13
- package/commands/hatch3r-release.md +13 -3
- package/commands/hatch3r-revision.md +395 -0
- package/commands/hatch3r-roadmap.md +18 -3
- package/commands/hatch3r-rule-customize.md +6 -0
- package/commands/hatch3r-security-audit.md +17 -1
- package/commands/hatch3r-skill-customize.md +6 -0
- package/commands/hatch3r-test-plan.md +532 -0
- package/commands/hatch3r-workflow.md +113 -38
- package/dist/cli/index.js +5184 -2593
- package/dist/cli/index.js.map +1 -0
- package/github-agents/hatch3r-docs-agent.md +1 -0
- package/github-agents/hatch3r-lint-agent.md +1 -0
- package/github-agents/hatch3r-security-agent.md +1 -0
- package/github-agents/hatch3r-test-agent.md +1 -0
- package/hooks/hatch3r-ci-failure.md +30 -0
- package/hooks/hatch3r-file-save.md +22 -0
- package/hooks/hatch3r-post-merge.md +23 -0
- package/hooks/hatch3r-pre-commit.md +23 -0
- package/hooks/hatch3r-pre-push.md +22 -0
- package/hooks/hatch3r-session-start.md +22 -0
- package/mcp/mcp.json +22 -3
- package/package.json +4 -7
- package/prompts/hatch3r-bug-triage.md +1 -0
- package/prompts/hatch3r-code-review.md +1 -0
- package/prompts/hatch3r-pr-description.md +1 -0
- package/rules/hatch3r-accessibility-standards.md +1 -0
- package/rules/hatch3r-agent-orchestration.md +326 -53
- package/rules/hatch3r-agent-orchestration.mdc +225 -0
- package/rules/hatch3r-api-design.md +4 -1
- package/rules/hatch3r-browser-verification.md +33 -1
- package/rules/hatch3r-browser-verification.mdc +29 -0
- package/rules/hatch3r-ci-cd.md +5 -1
- package/rules/hatch3r-ci-cd.mdc +4 -1
- package/rules/hatch3r-code-standards.md +18 -0
- package/rules/hatch3r-code-standards.mdc +10 -1
- package/rules/hatch3r-component-conventions.md +4 -1
- package/rules/hatch3r-data-classification.md +1 -0
- package/rules/hatch3r-deep-context.md +94 -0
- package/rules/hatch3r-deep-context.mdc +69 -0
- package/rules/hatch3r-dependency-management.md +13 -0
- package/rules/hatch3r-feature-flags.md +4 -1
- package/rules/hatch3r-git-conventions.md +1 -0
- package/rules/hatch3r-i18n.md +4 -1
- package/rules/hatch3r-learning-consult.md +4 -2
- package/rules/hatch3r-learning-consult.mdc +3 -2
- package/rules/hatch3r-migrations.md +12 -0
- package/rules/hatch3r-observability.md +293 -1
- package/rules/hatch3r-performance-budgets.md +5 -2
- package/rules/hatch3r-performance-budgets.mdc +1 -1
- package/rules/hatch3r-secrets-management.md +11 -3
- package/rules/hatch3r-secrets-management.mdc +10 -3
- package/rules/hatch3r-security-patterns.md +23 -3
- package/rules/hatch3r-security-patterns.mdc +8 -2
- package/rules/hatch3r-testing.md +1 -0
- package/rules/hatch3r-theming.md +4 -1
- package/rules/hatch3r-tooling-hierarchy.md +42 -15
- package/rules/hatch3r-tooling-hierarchy.mdc +27 -4
- package/skills/hatch3r-a11y-audit/SKILL.md +1 -0
- package/skills/hatch3r-agent-customize/SKILL.md +3 -0
- package/skills/hatch3r-api-spec/SKILL.md +1 -0
- package/skills/hatch3r-architecture-review/SKILL.md +6 -2
- package/skills/hatch3r-bug-fix/SKILL.md +4 -1
- package/skills/hatch3r-ci-pipeline/SKILL.md +1 -0
- package/skills/hatch3r-command-customize/SKILL.md +1 -0
- package/skills/hatch3r-context-health/SKILL.md +2 -1
- package/skills/hatch3r-cost-tracking/SKILL.md +1 -0
- package/skills/hatch3r-dep-audit/SKILL.md +6 -2
- package/skills/hatch3r-feature/SKILL.md +9 -2
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +130 -21
- package/skills/hatch3r-incident-response/SKILL.md +11 -5
- package/skills/hatch3r-issue-workflow/SKILL.md +12 -7
- package/skills/hatch3r-logical-refactor/SKILL.md +1 -0
- package/skills/hatch3r-migration/SKILL.md +1 -0
- package/skills/hatch3r-perf-audit/SKILL.md +2 -1
- package/skills/hatch3r-pr-creation/SKILL.md +20 -10
- package/skills/hatch3r-qa-validation/SKILL.md +2 -1
- package/skills/hatch3r-recipe/SKILL.md +1 -0
- package/skills/hatch3r-refactor/SKILL.md +7 -1
- package/skills/hatch3r-release/SKILL.md +15 -11
- 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 +1 -0
- package/dist/cli/hooks-ZOTFDEA3.js +0 -59
- package/rules/hatch3r-error-handling.md +0 -17
- package/rules/hatch3r-error-handling.mdc +0 -15
|
@@ -3,11 +3,16 @@ id: hatch3r-agent-orchestration
|
|
|
3
3
|
type: rule
|
|
4
4
|
description: Mandatory agent delegation, skill loading, and subagent usage directives for ALL tasks in ALL contexts
|
|
5
5
|
scope: always
|
|
6
|
+
tags: [core]
|
|
6
7
|
---
|
|
7
8
|
# Agent Orchestration
|
|
8
9
|
|
|
9
10
|
This rule governs when and how to delegate work to hatch3r agents, load skills, and spawn subagents. These directives are mandatory — not suggestions.
|
|
10
11
|
|
|
12
|
+
## Orchestration Differentiation
|
|
13
|
+
|
|
14
|
+
Hatch3r's orchestration is not free-form agent chat. It differs from simpler approaches in three structural ways: (1) a **phase-gated pipeline** that enforces Research, Implement, Review, and Quality as distinct stages with explicit entry/exit criteria; (2) **structured handoffs** between phases via the `PipelineContext` schema, ensuring no context is lost or fabricated between agents; and (3) a **mandatory review gate** before the quality phase, preventing untested or unreviewed code from reaching final quality checks.
|
|
15
|
+
|
|
11
16
|
## Universal Applicability
|
|
12
17
|
|
|
13
18
|
This rule applies to EVERY context without exception:
|
|
@@ -22,54 +27,57 @@ Whether the user invokes a command or simply asks for a task in conversation, th
|
|
|
22
27
|
|
|
23
28
|
## Universal Sub-Agent Pipeline
|
|
24
29
|
|
|
25
|
-
Every task MUST follow this
|
|
26
|
-
|
|
27
|
-
**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.
|
|
28
|
-
|
|
29
|
-
**Phase 2 — Implement:** Spawn `hatch3r-implementer` for ALL code changes. One dedicated implementer per task. Never implement inline — always delegate via the Task tool.
|
|
30
|
-
|
|
31
|
-
**Phase 3 — Quality:** Spawn ALL applicable specialists in parallel after implementation:
|
|
32
|
-
|
|
33
|
-
| Specialist | When | Mandatory? |
|
|
34
|
-
|-----------|------|------------|
|
|
35
|
-
| `hatch3r-reviewer` | After every implementation | YES — always |
|
|
36
|
-
| `hatch3r-test-writer` | After every code change | YES — always for code changes |
|
|
37
|
-
| `hatch3r-security-auditor` | After every code change | YES — always for code changes |
|
|
38
|
-
| `hatch3r-docs-writer` | After every implementation | EVALUATE — spawn when changes affect APIs, architecture, user-facing behavior, or when specs/ADRs need updating |
|
|
39
|
-
| `hatch3r-lint-fixer` | When lint errors present | Conditional |
|
|
40
|
-
| `hatch3r-a11y-auditor` | When UI/accessibility changes | Conditional |
|
|
41
|
-
| `hatch3r-perf-profiler` | When performance-sensitive changes | Conditional |
|
|
42
|
-
| `hatch3r-dependency-auditor` | When dependencies change | Conditional |
|
|
43
|
-
| `hatch3r-ci-watcher` | When CI fails | Conditional |
|
|
30
|
+
Every task MUST follow this four-phase pipeline: **Phase 1 — Research** (context gathering via `hatch3r-researcher`), **Phase 2 — Implement** (code changes via `hatch3r-implementer`), **Phase 3 — Review Loop** (review/fix cycle via `hatch3r-reviewer` and `hatch3r-fixer`), **Phase 4 — Final Quality** (parallel specialists after review is clean). See **Mandatory Delegation Directives** below for full phase definitions, entry/exit criteria, and specialist invocation rules.
|
|
44
31
|
|
|
45
32
|
## Agent Roster
|
|
46
33
|
|
|
47
34
|
| Agent | Purpose | Invoke When |
|
|
48
35
|
|-------|---------|-------------|
|
|
49
|
-
| `hatch3r-researcher` | Context gathering
|
|
50
|
-
| `hatch3r-implementer` |
|
|
51
|
-
| `hatch3r-reviewer` | Code review
|
|
52
|
-
| `hatch3r-
|
|
53
|
-
| `hatch3r-
|
|
54
|
-
| `hatch3r-
|
|
55
|
-
| `hatch3r-
|
|
56
|
-
| `hatch3r-
|
|
57
|
-
| `hatch3r-
|
|
58
|
-
| `hatch3r-
|
|
59
|
-
| `hatch3r-
|
|
36
|
+
| `hatch3r-researcher` | Context gathering (15 modes) | Always — before implementation (skip trivial edits) |
|
|
37
|
+
| `hatch3r-implementer` | Single-task implementation | Always — one per task |
|
|
38
|
+
| `hatch3r-reviewer` | Code review | Always — Phase 3 review loop |
|
|
39
|
+
| `hatch3r-fixer` | Fix reviewer findings | Phase 3 — Critical/Warning findings |
|
|
40
|
+
| `hatch3r-test-writer` | Tests | Always — Phase 4 (every code change) |
|
|
41
|
+
| `hatch3r-security-auditor` | Security review | Always — Phase 4 (every code change) |
|
|
42
|
+
| `hatch3r-docs-writer` | Documentation | Phase 4 — evaluate when APIs/architecture/UX affected |
|
|
43
|
+
| `hatch3r-lint-fixer` | Lint/type fixes | Conditional — lint errors present |
|
|
44
|
+
| `hatch3r-a11y-auditor` | WCAG AA checks | Conditional — UI/accessibility changes |
|
|
45
|
+
| `hatch3r-perf-profiler` | Performance profiling | Conditional — performance-sensitive changes |
|
|
46
|
+
| `hatch3r-dependency-auditor` | CVE/supply chain | Conditional — dependencies change |
|
|
47
|
+
| `hatch3r-ci-watcher` | CI failure diagnosis | Conditional — CI fails |
|
|
48
|
+
| `hatch3r-architect` | Architecture design | Conditional — architectural decisions needed |
|
|
49
|
+
| `hatch3r-devops` | CI/CD and deployment | Conditional — infrastructure tasks |
|
|
50
|
+
|
|
51
|
+
## Deep Context Integration
|
|
52
|
+
|
|
53
|
+
Score task complexity per the `hatch3r-deep-context` rule (always-loaded) before Phase 1. That rule defines the full tier criteria, researcher modes per tier, and implementer enrichment fields. Apply the resulting tier as follows:
|
|
54
|
+
|
|
55
|
+
- **Tier 2 (Standard):** Present elicitation questions to the user inline. Await answers before proceeding to Phase 2.
|
|
56
|
+
- **Tier 3 (Deep):** Present a consolidated Pre-Implementation Summary and ASK for confirmation. Do NOT proceed to Phase 2 until all unresolved questions are answered.
|
|
60
57
|
|
|
61
58
|
## Mandatory Delegation Directives
|
|
62
59
|
|
|
63
60
|
### Context Gathering (Before Implementation)
|
|
64
61
|
|
|
65
|
-
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:
|
|
62
|
+
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:
|
|
63
|
+
|
|
64
|
+
- **`type:bug`**: modes `symptom-trace`, `root-cause`, `codebase-impact` + tier modes
|
|
65
|
+
- **`type:feature`**: modes `codebase-impact`, `feature-design`, `architecture` + tier modes
|
|
66
|
+
- **`type:refactor`**: modes `current-state`, `refactoring-strategy`, `migration-path` + tier modes
|
|
67
|
+
- **`type:qa`**: modes `codebase-impact` + tier modes
|
|
68
|
+
|
|
69
|
+
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`).
|
|
70
|
+
|
|
71
|
+
### Research Completeness Checklist
|
|
72
|
+
|
|
73
|
+
Before handing off from Phase 1 (Research) to Phase 2 (Implement), the researcher output MUST be verified against this completeness checklist. Do NOT proceed to implementation until all items are confirmed:
|
|
66
74
|
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
75
|
+
- [ ] **All affected files identified** — every file that will be created, modified, or deleted is listed explicitly.
|
|
76
|
+
- [ ] **Blast radius assessed** — downstream consumers, dependents, and integration points that could break are documented.
|
|
77
|
+
- [ ] **Existing tests located** — relevant test files and test cases that cover the affected code are identified (or absence of coverage is noted).
|
|
78
|
+
- [ ] **Dependencies mapped** — internal module dependencies and external package dependencies relevant to the change are enumerated.
|
|
71
79
|
|
|
72
|
-
|
|
80
|
+
If any item cannot be confirmed, the researcher MUST flag the gap and the orchestrator MUST either: (a) re-run the researcher with additional modes targeting the gap, or (b) surface the gap to the user for manual input before proceeding.
|
|
73
81
|
|
|
74
82
|
### Implementation Delegation
|
|
75
83
|
|
|
@@ -80,26 +88,72 @@ You MUST spawn a `hatch3r-implementer` subagent via the Task tool for ALL code c
|
|
|
80
88
|
- **Epics with sub-issues**: Spawn one `hatch3r-implementer` per sub-issue. Execute level-by-level respecting dependency order.
|
|
81
89
|
- **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.
|
|
82
90
|
|
|
91
|
+
**Implementer prompt enrichment:** For Tier 2 and Tier 3 tasks, include the deep context outputs in the implementer prompt:
|
|
92
|
+
- `similar-implementation` findings as "Reference Conventions" (triggers the implementer's Convention Lock step)
|
|
93
|
+
- Resolved `requirements-elicitation` answers as "Resolved Requirements"
|
|
94
|
+
- Enhanced `codebase-impact` blast radius data (Tier 3 only)
|
|
95
|
+
|
|
96
|
+
### Per-Task Mini-Review
|
|
97
|
+
|
|
98
|
+
When a single implementation involves multiple sub-tasks (e.g., an epic with ordered steps, a feature requiring schema change + service layer + UI), the implementer MUST perform a lightweight mini-review after completing each sub-task before starting the next:
|
|
99
|
+
|
|
100
|
+
1. **Verify sub-task correctness** — confirm the sub-task's output compiles/parses without errors and meets its local acceptance criteria.
|
|
101
|
+
2. **Check interface contracts** — ensure any interfaces, types, or contracts introduced or modified by the sub-task are consistent with what subsequent sub-tasks will consume.
|
|
102
|
+
3. **Validate no regressions** — confirm the sub-task has not broken existing functionality visible at that point (e.g., existing tests still pass if applicable).
|
|
103
|
+
4. **Gate progression** — if the mini-review surfaces issues, fix them before moving to the next sub-task. Do not accumulate debt across sub-tasks.
|
|
104
|
+
|
|
105
|
+
Mini-reviews are internal to the implementer and do not require spawning a separate reviewer agent. They are lighter weight than the full Phase 3 review loop, which still runs after all sub-tasks are complete.
|
|
106
|
+
|
|
83
107
|
### Post-Implementation Quality Pipeline
|
|
84
108
|
|
|
85
|
-
You MUST
|
|
109
|
+
You MUST run the review loop and final quality phases after implementation completes.
|
|
110
|
+
|
|
111
|
+
**Phase 3 — Review Loop:**
|
|
112
|
+
|
|
113
|
+
1. Spawn `hatch3r-reviewer` — code review. Include the diff and acceptance criteria in the prompt. The reviewer MUST include a **blast radius summary** in its output: number of files changed, number of lines added/removed, and whether any public APIs (exported interfaces, route signatures, event schemas) were changed. This summary gives the orchestrator and the user a quick gauge of change scope and risk.
|
|
114
|
+
2. If the reviewer reports Critical or Warning findings: spawn `hatch3r-fixer` with the full reviewer output (findings, file paths, line references, suggested fixes). When fixes touch shared or public interfaces, also include deep context enrichment (blast radius data, reference conventions) per the Implementation Delegation section above.
|
|
115
|
+
3. After fixes: spawn `hatch3r-reviewer` again to re-review the fixed code.
|
|
116
|
+
4. Repeat steps 2–3 until the reviewer reports 0 Critical + 0 Warning, or max 3 iterations reached.
|
|
117
|
+
5. **Confirmation pass** — after the reviewer reports 0 Critical + 0 Warning, run one final lightweight re-review. This confirmation pass focuses ONLY on: (1) the reviewer's own fix-driven changes were not missed or introduced new issues, (2) no accidental regressions in adjacent code touched by fixes, (3) all acceptance criteria are fully met. If the confirmation pass surfaces new Critical or Warning findings, route them back through steps 2–4 (these iterations count toward the max 3 cap).
|
|
118
|
+
6. If max iterations reached with remaining findings: surface to user for manual resolution. Do not proceed to Phase 4 until the user acknowledges.
|
|
119
|
+
|
|
120
|
+
**Phase 4 — Final Quality** (runs ONLY after the review loop is clean):
|
|
121
|
+
|
|
122
|
+
Launch as many independent subagents in parallel as the platform supports — no artificial concurrency limit.
|
|
86
123
|
|
|
87
124
|
**Always spawn (mandatory for every code change):**
|
|
88
125
|
|
|
89
|
-
1. `hatch3r-
|
|
90
|
-
2. `hatch3r-
|
|
91
|
-
3. `hatch3r-security-auditor` — security review of all code changes. Audit data flows, access control, input validation, and secret management.
|
|
126
|
+
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.
|
|
127
|
+
2. `hatch3r-security-auditor` — security review of all code changes. Audit data flows, access control, input validation, and secret management.
|
|
92
128
|
|
|
93
129
|
**Always evaluate (spawn when applicable):**
|
|
94
130
|
|
|
95
|
-
|
|
131
|
+
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.
|
|
96
132
|
|
|
97
133
|
**Conditional specialists (spawn when triggered):**
|
|
98
134
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
135
|
+
4. `hatch3r-lint-fixer` — when lint or type errors are present after implementation.
|
|
136
|
+
5. `hatch3r-a11y-auditor` — when UI or accessibility changes are made.
|
|
137
|
+
6. `hatch3r-perf-profiler` — when performance-sensitive changes are made.
|
|
138
|
+
7. `hatch3r-dependency-auditor` — when dependencies change or new packages are added.
|
|
139
|
+
8. `hatch3r-architect` — when architectural decisions are needed or system design review is requested.
|
|
140
|
+
9. `hatch3r-devops` — when CI/CD, deployment, or infrastructure tasks are involved.
|
|
141
|
+
|
|
142
|
+
### Specialist Success Criteria
|
|
143
|
+
|
|
144
|
+
Each Phase 4 specialist agent has a defined success criterion. The specialist's output is considered successful only when its criterion is met. If not met, the orchestrator MUST surface the gap to the user.
|
|
145
|
+
|
|
146
|
+
| Specialist | Success Criterion |
|
|
147
|
+
|-----------|-------------------|
|
|
148
|
+
| `hatch3r-test-writer` | All new and modified code paths have corresponding tests; no untested branches remain in changed files. |
|
|
149
|
+
| `hatch3r-security-auditor` | No HIGH or CRITICAL severity findings remain unresolved; all MEDIUM findings are documented with remediation plan. |
|
|
150
|
+
| `hatch3r-docs-writer` | All affected APIs, architectural changes, and user-facing behavior changes are reflected in documentation. |
|
|
151
|
+
| `hatch3r-lint-fixer` | Zero lint errors and zero type errors in all changed files. |
|
|
152
|
+
| `hatch3r-a11y-auditor` | All changed UI components meet WCAG AA compliance; no new accessibility violations introduced. |
|
|
153
|
+
| `hatch3r-perf-profiler` | No performance regressions detected; any new hot paths are documented with benchmark baselines. |
|
|
154
|
+
| `hatch3r-dependency-auditor` | No known CVEs in added or updated dependencies; license compatibility verified. |
|
|
155
|
+
| `hatch3r-architect` | Architectural decisions are documented in ADRs; design aligns with existing system patterns or divergence is justified. |
|
|
156
|
+
| `hatch3r-devops` | CI/CD pipeline passes end-to-end; deployment configuration is validated against target environment. |
|
|
103
157
|
|
|
104
158
|
## Skill Loading Directives
|
|
105
159
|
|
|
@@ -108,10 +162,10 @@ Before implementing any task, you MUST read and follow the matching hatch3r skil
|
|
|
108
162
|
| Task Type | Skill |
|
|
109
163
|
|-----------|-------|
|
|
110
164
|
| `type:bug` | `hatch3r-bug-fix` |
|
|
111
|
-
| `type:feature` | `hatch3r-feature`
|
|
165
|
+
| `type:feature` | `hatch3r-feature` |
|
|
112
166
|
| `type:refactor` + `area:ui` | `hatch3r-visual-refactor` |
|
|
113
167
|
| `type:refactor` + behavior change | `hatch3r-logical-refactor` |
|
|
114
|
-
| `type:refactor` (other) | `hatch3r-refactor`
|
|
168
|
+
| `type:refactor` (other) | `hatch3r-refactor` |
|
|
115
169
|
| `type:qa` | `hatch3r-qa-validation` |
|
|
116
170
|
|
|
117
171
|
When a skill references agents under "Required Agent Delegation", those delegations are mandatory — you MUST spawn the listed agents via the Task tool.
|
|
@@ -123,20 +177,185 @@ When spawning any subagent via the Task tool:
|
|
|
123
177
|
1. **Use `subagent_type: "generalPurpose"`** for all hatch3r agent delegations.
|
|
124
178
|
2. **Include in every subagent prompt**:
|
|
125
179
|
- The agent protocol to follow (e.g., "Follow the hatch3r-implementer agent protocol").
|
|
126
|
-
- All `scope: always` rules from
|
|
180
|
+
- All `scope: always` rules from `.agents/rules/` that apply.
|
|
127
181
|
- The project's tooling hierarchy (Context7 MCP for library docs, web research for current context).
|
|
128
|
-
- Relevant learnings from
|
|
182
|
+
- Relevant learnings from `.agents/learnings/` if the directory exists.
|
|
129
183
|
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.
|
|
130
184
|
4. **Await and review results** before proceeding. If a subagent reports BLOCKED or PARTIAL, surface to the user.
|
|
131
185
|
|
|
186
|
+
## Correlation ID
|
|
187
|
+
|
|
188
|
+
The orchestrator MUST generate a unique correlation ID (UUID v4 or equivalent) for each top-level task at the start of the pipeline. This ID enables end-to-end tracing across multi-agent workflows.
|
|
189
|
+
|
|
190
|
+
1. **Generation**: Create one correlation ID per top-level task before Phase 1 begins. Format: UUID v4 (e.g., `550e8400-e29b-41d4-a716-446655440000`).
|
|
191
|
+
2. **Propagation**: Include the correlation ID in every subagent prompt — researchers, implementers, reviewers, fixers, and all Phase 4 specialists. Pass it as a top-level field: `correlation_id: "<value>"`.
|
|
192
|
+
3. **Usage in subagents**: All subagents MUST include the correlation ID in any logs, error messages, structured outputs, or status reports they produce. This applies to both success and failure paths.
|
|
193
|
+
4. **Scope**: One correlation ID per top-level task. Epic sub-issues each get their own correlation ID. Batch tasks share one correlation ID per batch but include a sub-task index (e.g., `correlation_id: "<uuid>", sub_task: 2`).
|
|
194
|
+
|
|
195
|
+
## Severity Scale
|
|
196
|
+
|
|
197
|
+
All agents across the pipeline MUST use this canonical severity scale when classifying findings, issues, or audit results. This ensures consistent triage and gating across phases.
|
|
198
|
+
|
|
199
|
+
| Severity | Definition | Pipeline Action |
|
|
200
|
+
|----------|-----------|-----------------|
|
|
201
|
+
| **CRITICAL** | Blocks merge; must fix immediately. Security vulnerabilities, data loss risks, broken core functionality. | Merge is blocked. Findings must be resolved before the pipeline can proceed past Phase 3. |
|
|
202
|
+
| **HIGH** | Should fix before merge. Significant bugs, performance regressions, incomplete acceptance criteria. | Strongly recommended to fix before merge. Escalate to user if the fix is deferred. |
|
|
203
|
+
| **MEDIUM** | Fix in same sprint. Code quality issues, minor bugs, non-critical security findings. | Document with a remediation plan. May merge with tracking issue created. |
|
|
204
|
+
| **LOW** | Track for future. Style nits, minor refactoring opportunities, non-blocking improvements. | Log in findings summary. No merge gate. |
|
|
205
|
+
| **INFO** | Informational only. Observations, suggestions, context for future work. | Include in output for awareness. No action required. |
|
|
206
|
+
|
|
207
|
+
All subagents — reviewers, security auditors, test writers, and other specialists — MUST map their findings to this scale. When a subagent uses a different internal scale, it MUST translate to this canonical scale in its output.
|
|
208
|
+
|
|
209
|
+
## Pipeline Context
|
|
210
|
+
|
|
211
|
+
The orchestrator MUST maintain a `PipelineContext` object throughout the pipeline lifecycle. This object serves as the data contract between pipeline phases, ensuring structured handoff of findings, decisions, and artifacts.
|
|
212
|
+
|
|
213
|
+
### PipelineContext Schema
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
PipelineContext {
|
|
217
|
+
correlationId: string // UUID v4 from the Correlation ID directive
|
|
218
|
+
phase: "research" | "implement" | "review" | "quality" // Current active phase
|
|
219
|
+
findings: Finding[] // Accumulated findings from all phases
|
|
220
|
+
decisions: Decision[] // Decisions made during the pipeline (user answers, trade-offs, overrides)
|
|
221
|
+
artifacts: string[] // File paths created or modified during the pipeline
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
Finding {
|
|
225
|
+
id: string // Unique finding identifier (e.g., "F-001")
|
|
226
|
+
phase: string // Phase that produced the finding
|
|
227
|
+
agent: string // Agent that produced the finding
|
|
228
|
+
severity: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "INFO" // Per Severity Scale
|
|
229
|
+
description: string // Human-readable finding description
|
|
230
|
+
filePath?: string // Affected file, if applicable
|
|
231
|
+
resolved: boolean // Whether the finding has been addressed
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
Decision {
|
|
235
|
+
id: string // Unique decision identifier (e.g., "D-001")
|
|
236
|
+
phase: string // Phase where the decision was made
|
|
237
|
+
description: string // What was decided
|
|
238
|
+
rationale: string // Why this option was chosen
|
|
239
|
+
madeBy: "user" | "agent" // Who made the decision
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Phase Handoff Metadata
|
|
244
|
+
|
|
245
|
+
When transitioning between pipeline phases, the orchestrator MUST include the following metadata fields in each handoff to enable traceability and performance analysis:
|
|
246
|
+
|
|
247
|
+
- `timestamp` -- ISO 8601 timestamp of the handoff event
|
|
248
|
+
- `agentId` -- identifier of the agent completing the phase (e.g., `hatch3r-researcher`, `hatch3r-implementer`)
|
|
249
|
+
- `phase` -- the phase being completed (e.g., `research`, `implement`, `review`, `quality`)
|
|
250
|
+
- `duration` -- elapsed time in seconds for the completed phase
|
|
251
|
+
- `filesModified` -- list of file paths created, modified, or deleted during the phase
|
|
252
|
+
|
|
253
|
+
These fields are appended to the `PipelineContext` at each phase transition, providing a structured audit trail of which agent did what, when, and for how long.
|
|
254
|
+
|
|
255
|
+
### Context Caching
|
|
256
|
+
|
|
257
|
+
When multiple agents need the same context (e.g., project structure, test results, blast radius data, reference conventions), cache it in the shared `PipelineContext` rather than having each agent re-read or re-compute it independently. Specifically:
|
|
258
|
+
|
|
259
|
+
- Research output from Phase 1 (file lists, dependency maps, convention extractions) should be stored once and passed by reference to the implementer, reviewer, and any Phase 4 specialists that need it.
|
|
260
|
+
- Test suite results captured during implementation verification should be cached and forwarded to the reviewer and test-writer rather than re-running the full suite in each phase.
|
|
261
|
+
- This reduces redundant file reads, avoids inconsistencies from reading files at different points in time, and conserves token budget across subagent prompts.
|
|
262
|
+
|
|
263
|
+
### PipelineContext Usage
|
|
264
|
+
|
|
265
|
+
1. **Initialization**: The orchestrator creates a `PipelineContext` at the start of Phase 1 with the `correlationId` and `phase` set to `"research"`. All other fields are initialized as empty arrays.
|
|
266
|
+
2. **Phase transitions**: When moving between phases, update the `phase` field. Do not clear previous phase data — findings and decisions accumulate across the full pipeline.
|
|
267
|
+
3. **Subagent input**: Pass the current `PipelineContext` (or relevant subsets) to each subagent so it has full pipeline history.
|
|
268
|
+
4. **Subagent output**: Each subagent appends its findings and decisions to the context. The orchestrator merges subagent outputs back into the canonical `PipelineContext`.
|
|
269
|
+
5. **Final output**: The completed `PipelineContext` is included in the task summary, giving the user full traceability from research through quality.
|
|
270
|
+
|
|
271
|
+
## Resilience Directives
|
|
272
|
+
|
|
273
|
+
This section covers all failure/recovery paths — researcher failure, test failure, reviewer failure, and all other subagent failures.
|
|
274
|
+
|
|
275
|
+
When a subagent fails (error, timeout, or BLOCKED status), apply the following retry-and-fallback protocol:
|
|
276
|
+
|
|
277
|
+
1. **Retry once**: Re-send the same prompt to the same agent type exactly once. Do not modify the prompt on retry.
|
|
278
|
+
2. **Fallback on second failure**: If the retry also fails, fall back to degraded mode for that phase:
|
|
279
|
+
- **Researcher failure** → Proceed to Phase 2 (Implement) without research context. Add a warning to the implementer prompt: `"WARNING: Research phase failed. Proceeding without research context. Exercise extra caution with assumptions."` The orchestrator should note this gap in the final output.
|
|
280
|
+
- **Reviewer failure** → Surface the raw diff to the user for manual review. Do not proceed to Phase 4 automatically.
|
|
281
|
+
- **Test-writer failure** → Flag the deliverable as "untested" in the PR description. Add label `needs-tests` if the platform supports it.
|
|
282
|
+
- **Fixer failure** → Surface the original reviewer findings to the user. Do not re-enter the review loop.
|
|
283
|
+
- **Security-auditor failure** → Flag as "security-unaudited" in the PR description. Add label `needs-security-review` if the platform supports it.
|
|
284
|
+
- **Other specialist failure** → Skip that specialist, document the gap in the final output (e.g., "docs-writer skipped due to failure").
|
|
285
|
+
3. **Retry budget**: Maximum 3 total retries across all subagents per top-level task. Once the budget is exhausted, any subsequent failures go directly to fallback without retry.
|
|
286
|
+
4. **Reporting**: Include all failures and fallbacks in the task summary so the user has full visibility into degraded phases.
|
|
287
|
+
|
|
288
|
+
### Circuit Breaker Tracking
|
|
289
|
+
|
|
290
|
+
The orchestrator MUST track consecutive failures per agent type and per pipeline phase to prevent repeated invocations of persistently failing agents.
|
|
291
|
+
|
|
292
|
+
1. **Tracking**: Maintain a per-agent failure counter that increments on each consecutive failure (error, timeout, or BLOCKED) and resets to zero on any success.
|
|
293
|
+
2. **Trip threshold**: After **3 consecutive failures** for the same agent type within a single pipeline run, mark that agent as **"tripped"** and skip all subsequent invocations of it for the remainder of the task.
|
|
294
|
+
3. **State transitions**: Log every circuit breaker state change with the correlation ID, agent type, and transition:
|
|
295
|
+
- `CLOSED → OPEN` — agent tripped after 3 consecutive failures. Log: `"Circuit breaker OPEN for <agent>: <failure_count> consecutive failures"`.
|
|
296
|
+
- `OPEN → HALF-OPEN` — cooldown period elapsed or manual reset issued. Log: `"Circuit breaker HALF-OPEN for <agent>: attempting probe"`.
|
|
297
|
+
- `HALF-OPEN → CLOSED` — probe invocation succeeded. Log: `"Circuit breaker CLOSED for <agent>: probe succeeded"`.
|
|
298
|
+
- `HALF-OPEN → OPEN` — probe invocation failed. Log: `"Circuit breaker re-OPEN for <agent>: probe failed"`.
|
|
299
|
+
4. **Skipping tripped agents**: When an agent is tripped, apply its fallback behavior from the Resilience Directives above and note `"Skipped: circuit breaker OPEN"` in the task summary.
|
|
300
|
+
5. **Reset policy**: A tripped agent can be re-enabled by either:
|
|
301
|
+
- **Manual reset** — the user explicitly requests retrying the agent (e.g., "retry the reviewer").
|
|
302
|
+
- **Cooldown period** — if the pipeline spans multiple top-level tasks in a session, a tripped agent automatically transitions to HALF-OPEN after **10 minutes** of inactivity. The next invocation is a probe: success closes the breaker; failure re-opens it.
|
|
303
|
+
6. **Cross-task persistence**: Circuit breaker state persists within a session. If an agent trips during task A, it remains tripped for task B unless manually reset or the cooldown period has elapsed.
|
|
304
|
+
|
|
305
|
+
### Stall Detection
|
|
306
|
+
|
|
307
|
+
If an agent produces no output for 2 minutes, consider it stalled. The orchestrator MUST:
|
|
308
|
+
|
|
309
|
+
1. **Log the stall** with the correlation ID, agent type, phase, and elapsed idle time: `"STALL detected for <agent> in <phase>: <elapsed>s with no output"`.
|
|
310
|
+
2. **Terminate the stalled agent** and capture any partial output produced before the stall.
|
|
311
|
+
3. **Retry once** by re-spawning the same agent type with the same prompt. If the retry also stalls, skip the agent and apply the relevant fallback from the Resilience Directives (e.g., proceed without research context, flag as untested).
|
|
312
|
+
4. **Include a warning** in the `PipelineContext` noting the stall and whether the retry succeeded or the agent was skipped.
|
|
313
|
+
|
|
314
|
+
A stalled invocation counts as a failure for both the retry budget and the circuit breaker failure counter.
|
|
315
|
+
|
|
316
|
+
### Timeout Policy
|
|
317
|
+
|
|
318
|
+
Each pipeline phase has an explicit time budget. If a phase exceeds its timeout, capture partial results and move to the next phase. Do not block the pipeline indefinitely.
|
|
319
|
+
|
|
320
|
+
| Phase / Activity | Per-Item Timeout | Phase Total Timeout |
|
|
321
|
+
|-----------------|-----------------|-------------------|
|
|
322
|
+
| **Phase 1 — Research** | 5 minutes per file | 30 minutes total |
|
|
323
|
+
| **Phase 2 — Implement** | 10 minutes per task | — |
|
|
324
|
+
| **Phase 3 — Review Loop** | 5 minutes per review cycle | — |
|
|
325
|
+
| **Phase 4 — Final Quality** | 5 minutes per specialist | — |
|
|
326
|
+
|
|
327
|
+
**Timeout behavior:**
|
|
328
|
+
|
|
329
|
+
1. **Partial capture**: When a timeout fires, the orchestrator MUST capture whatever output the subagent has produced so far. Partial research context, partial reviews, or partial test suites are preferable to no output.
|
|
330
|
+
2. **Logging**: Log the timeout with the correlation ID, phase, agent, elapsed time, and whether partial results were captured: `"TIMEOUT in <phase> for <agent>: <elapsed>s elapsed, partial results captured: <yes/no>"`.
|
|
331
|
+
3. **Phase advancement**: After capturing partial results, proceed to the next phase. Include a warning in downstream prompts: `"WARNING: <phase> timed out. Partial results only. Exercise extra caution."`.
|
|
332
|
+
4. **Retry interaction**: A timed-out invocation counts as a failure for both the retry budget and the circuit breaker failure counter.
|
|
333
|
+
|
|
334
|
+
### Observability Span Naming
|
|
335
|
+
|
|
336
|
+
For observability, name tracing spans consistently using the pattern `hatch3r.{phase}.{agent}`. This convention enables filtering and aggregation across pipeline runs in any OpenTelemetry-compatible backend.
|
|
337
|
+
|
|
338
|
+
Examples:
|
|
339
|
+
- `hatch3r.research.researcher`
|
|
340
|
+
- `hatch3r.implement.implementer`
|
|
341
|
+
- `hatch3r.review.reviewer`
|
|
342
|
+
- `hatch3r.review.fixer`
|
|
343
|
+
- `hatch3r.quality.test-writer`
|
|
344
|
+
- `hatch3r.quality.security-auditor`
|
|
345
|
+
|
|
346
|
+
The orchestrator creates a root span `hatch3r.pipeline` for the full task, with child spans for each phase and grandchild spans for each agent invocation within that phase. Include the `correlationId` as a span attribute on every span.
|
|
347
|
+
|
|
132
348
|
## Single-Task Plain Chat Protocol
|
|
133
349
|
|
|
134
350
|
When the user provides a single task in plain chat (no command invoked, no issue reference), the full sub-agent pipeline still applies:
|
|
135
351
|
|
|
136
352
|
1. **Classify** the task by type (bug/feature/refactor/QA/other) based on context.
|
|
137
353
|
2. **Create synthetic issue context** — title, acceptance criteria, and type — from the user's instruction.
|
|
138
|
-
3. **Run the Universal Sub-Agent Pipeline**: Phase 1 (Research) → Phase 2 (Implement) → Phase 3 (Quality).
|
|
139
|
-
4. For
|
|
354
|
+
3. **Run the Universal Sub-Agent Pipeline**: Phase 1 (Research) → Phase 2 (Implement) → Phase 3 (Review Loop) → Phase 4 (Final Quality).
|
|
355
|
+
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:
|
|
356
|
+
- **GitHub:** `gh issue view`
|
|
357
|
+
- **Azure DevOps:** `az boards work-item show --id`
|
|
358
|
+
- **GitLab:** `glab issue view`
|
|
140
359
|
|
|
141
360
|
This ensures consistent quality regardless of how the task was initiated.
|
|
142
361
|
|
|
@@ -149,12 +368,66 @@ When the user provides multiple tasks in a single message — numbered lists, co
|
|
|
149
368
|
3. **Build a dependency graph** among the tasks. Independent tasks share the same level and run in parallel.
|
|
150
369
|
4. **Spawn one `hatch3r-researcher` subagent per task** (skip for trivial single-line edits only). Launch in parallel.
|
|
151
370
|
5. **Spawn one `hatch3r-implementer` subagent per task** per dependency level.
|
|
152
|
-
6. **For
|
|
371
|
+
6. **For issue references**: fetch issue details using the platform CLI (check `platform` in `.agents/hatch.json`):
|
|
372
|
+
- **GitHub:** `gh issue view`
|
|
373
|
+
- **Azure DevOps:** `az boards work-item show --id`
|
|
374
|
+
- **GitLab:** `glab issue view`
|
|
153
375
|
7. **For natural language tasks**: create synthetic issue context (title, acceptance criteria, type) from the instruction. Pass this context to the implementer subagent.
|
|
154
|
-
8. **
|
|
376
|
+
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).
|
|
377
|
+
9. **Spawn final quality subagents** (Phase 4, after review loop is clean): test-writer + security-auditor (always), plus docs-writer, auditors as applicable.
|
|
155
378
|
|
|
156
379
|
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.
|
|
157
380
|
|
|
381
|
+
## Auto-Mode Guardrails
|
|
382
|
+
|
|
383
|
+
When agents run in auto-mode (unattended execution without real-time user oversight), the orchestrator MUST apply additional verification after each phase completes:
|
|
384
|
+
|
|
385
|
+
1. **Scope containment** — verify the agent stayed within its declared scope. If a researcher was scoped to `codebase-impact`, it must not have performed `feature-design` work. If an implementer was scoped to specific files, it must not have modified files outside that set.
|
|
386
|
+
2. **No destructive operations without prior approval** — verify the agent did not perform destructive operations (file deletions, database migrations, force-pushes, dependency removals) unless those operations were explicitly listed in the task prompt as approved actions. Any destructive operation not pre-approved MUST be flagged and rolled back before proceeding.
|
|
387
|
+
3. **Output schema compliance** — verify all agent outputs match their expected schemas. Researcher output must contain the required sections for its modes. Implementer output must include changed file paths and acceptance criteria status. Reviewer output must use the canonical severity scale. Malformed outputs MUST trigger a retry or escalation, not silent acceptance.
|
|
388
|
+
|
|
389
|
+
If any guardrail check fails, the orchestrator MUST halt the pipeline and surface the violation to the user (or to a persistent log if fully unattended) before continuing.
|
|
390
|
+
|
|
391
|
+
## Status Codes
|
|
392
|
+
|
|
393
|
+
All agents MUST use these canonical status codes when reporting task or phase outcomes. This ensures consistent interpretation across the pipeline.
|
|
394
|
+
|
|
395
|
+
| Status | Meaning |
|
|
396
|
+
|--------|---------|
|
|
397
|
+
| **SUCCESS** | Task completed fully, all acceptance criteria met. |
|
|
398
|
+
| **PARTIAL** | Task partially completed; some acceptance criteria met, others remain open or degraded. |
|
|
399
|
+
| **FAILED** | Task could not be completed; no usable output produced. |
|
|
400
|
+
| **SKIPPED** | Task was intentionally not executed (e.g., non-applicable phase, trivial edit bypass). |
|
|
401
|
+
| **TIMEOUT** | Task exceeded its time budget; partial results may be available. |
|
|
402
|
+
|
|
403
|
+
When a subagent returns PARTIAL or FAILED, it MUST include a `reason` field explaining what succeeded and what did not. When a subagent returns TIMEOUT, any captured partial output MUST be forwarded to the next phase.
|
|
404
|
+
|
|
158
405
|
## Rule Application
|
|
159
406
|
|
|
160
407
|
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.
|
|
408
|
+
|
|
409
|
+
### Tiered Rule Inclusion
|
|
410
|
+
|
|
411
|
+
To manage token budgets when constructing subagent prompts, include rules in tiers. Higher tiers are only loaded when relevant to the specific agent or task phase.
|
|
412
|
+
|
|
413
|
+
**Tier 1 -- Always include (every subagent prompt):**
|
|
414
|
+
- `hatch3r-security-patterns` -- security invariants apply to all code changes
|
|
415
|
+
- `hatch3r-code-standards` -- code quality conventions apply universally
|
|
416
|
+
|
|
417
|
+
**Tier 2 -- Include by phase (match to the active agent):**
|
|
418
|
+
- `hatch3r-testing` -- include for `hatch3r-test-writer`, `hatch3r-implementer`, `hatch3r-reviewer`
|
|
419
|
+
- `hatch3r-accessibility-standards` -- include for `hatch3r-a11y-auditor`, `hatch3r-reviewer` (UI changes)
|
|
420
|
+
- `hatch3r-git-conventions` -- include for orchestrator git operations
|
|
421
|
+
- `hatch3r-ci-cd` -- include for `hatch3r-ci-watcher`, `hatch3r-devops`
|
|
422
|
+
- `hatch3r-dependency-management` -- include for `hatch3r-dependency-auditor`
|
|
423
|
+
|
|
424
|
+
**Tier 3 -- On-demand (reference only when the task context requires it):**
|
|
425
|
+
- `hatch3r-api-design` -- when designing or reviewing API contracts
|
|
426
|
+
- `hatch3r-secrets-management` -- when handling credentials or environment config
|
|
427
|
+
- `hatch3r-data-classification` -- when handling PII or sensitive data flows
|
|
428
|
+
- `hatch3r-performance-budgets` -- when profiling or reviewing performance
|
|
429
|
+
- `hatch3r-browser-verification` -- when verifying UI in browser
|
|
430
|
+
- `hatch3r-component-conventions` -- when writing UI components
|
|
431
|
+
- `hatch3r-i18n`, `hatch3r-theming`, `hatch3r-migrations`, `hatch3r-feature-flags`, `hatch3r-observability` -- when the task specifically touches these areas
|
|
432
|
+
|
|
433
|
+
For tools with limited context windows, Tier 1 rules are mandatory. Tier 2 and Tier 3 rules should be included selectively based on the subagent's role and the task scope to avoid exceeding token budgets.
|