hatch3r 1.1.0 → 1.3.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 +109 -364
- package/agents/hatch3r-a11y-auditor.md +8 -8
- package/agents/hatch3r-architect.md +2 -4
- package/agents/hatch3r-ci-watcher.md +2 -4
- package/agents/hatch3r-context-rules.md +2 -4
- package/agents/hatch3r-dependency-auditor.md +5 -7
- package/agents/hatch3r-devops.md +2 -4
- package/agents/hatch3r-docs-writer.md +2 -4
- package/agents/hatch3r-fixer.md +2 -0
- package/agents/hatch3r-implementer.md +32 -0
- package/agents/hatch3r-learnings-loader.md +189 -13
- package/agents/hatch3r-lint-fixer.md +3 -14
- package/agents/hatch3r-perf-profiler.md +2 -4
- package/agents/hatch3r-researcher.md +247 -0
- package/agents/hatch3r-reviewer.md +76 -7
- package/agents/hatch3r-security-auditor.md +4 -7
- package/agents/hatch3r-test-writer.md +3 -11
- package/agents/modes/architecture.md +44 -0
- package/agents/modes/boundary-analysis.md +45 -0
- package/agents/modes/codebase-impact.md +81 -0
- package/agents/modes/complexity-risk.md +40 -0
- package/agents/modes/coverage-analysis.md +44 -0
- package/agents/modes/current-state.md +52 -0
- package/agents/modes/feature-design.md +39 -0
- package/agents/modes/impact-analysis.md +45 -0
- package/agents/modes/library-docs.md +31 -0
- package/agents/modes/migration-path.md +55 -0
- package/agents/modes/prior-art.md +31 -0
- package/agents/modes/refactoring-strategy.md +55 -0
- package/agents/modes/regression.md +45 -0
- package/agents/modes/requirements-elicitation.md +68 -0
- package/agents/modes/risk-assessment.md +41 -0
- package/agents/modes/risk-prioritization.md +43 -0
- package/agents/modes/root-cause.md +39 -0
- package/agents/modes/similar-implementation.md +70 -0
- package/agents/modes/symptom-trace.md +39 -0
- package/agents/modes/test-pattern.md +61 -0
- package/agents/shared/external-knowledge.md +11 -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 +3 -2
- package/commands/hatch3r-api-spec.md +1 -0
- package/commands/hatch3r-benchmark.md +1 -0
- package/commands/hatch3r-board-fill.md +15 -16
- package/commands/hatch3r-board-groom.md +50 -10
- package/commands/hatch3r-board-init.md +1 -0
- package/commands/hatch3r-board-pickup.md +44 -572
- package/commands/hatch3r-board-refresh.md +31 -10
- package/commands/hatch3r-board-shared.md +87 -439
- package/commands/hatch3r-bug-plan.md +1 -0
- package/commands/hatch3r-codebase-map.md +1 -0
- package/commands/hatch3r-command-customize.md +1 -0
- package/commands/hatch3r-context-health.md +23 -2
- package/commands/hatch3r-cost-tracking.md +15 -0
- package/commands/hatch3r-debug.md +1 -0
- package/commands/hatch3r-dep-audit.md +2 -1
- package/commands/hatch3r-feature-plan.md +1 -0
- package/commands/hatch3r-healthcheck.md +2 -1
- package/commands/hatch3r-hooks.md +1 -0
- package/commands/hatch3r-learn.md +69 -2
- package/commands/hatch3r-migration-plan.md +1 -0
- package/commands/hatch3r-onboard.md +1 -0
- package/commands/hatch3r-project-spec.md +1 -0
- package/commands/hatch3r-quick-change.md +1 -0
- package/commands/hatch3r-recipe.md +1 -0
- package/commands/hatch3r-refactor-plan.md +1 -0
- package/commands/hatch3r-release.md +2 -1
- package/commands/hatch3r-revision.md +1 -0
- package/commands/hatch3r-roadmap.md +8 -1
- package/commands/hatch3r-rule-customize.md +1 -0
- package/commands/hatch3r-security-audit.md +2 -1
- package/commands/hatch3r-skill-customize.md +1 -0
- package/commands/hatch3r-test-plan.md +532 -0
- package/commands/hatch3r-workflow.md +1 -0
- package/dist/cli/index.js +4735 -1426
- package/dist/cli/index.js.map +1 -1
- 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 +1 -0
- package/hooks/hatch3r-file-save.md +1 -0
- package/hooks/hatch3r-post-merge.md +1 -0
- package/hooks/hatch3r-pre-commit.md +1 -0
- package/hooks/hatch3r-pre-push.md +1 -0
- package/hooks/hatch3r-session-start.md +1 -0
- package/package.json +2 -2
- 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 +289 -73
- package/rules/hatch3r-api-design.md +1 -0
- package/rules/hatch3r-browser-verification.md +1 -0
- package/rules/hatch3r-ci-cd.md +1 -0
- package/rules/hatch3r-code-standards.md +9 -0
- package/rules/hatch3r-component-conventions.md +1 -0
- package/rules/hatch3r-data-classification.md +1 -0
- package/rules/hatch3r-deep-context.md +1 -0
- package/rules/hatch3r-dependency-management.md +13 -0
- package/rules/hatch3r-feature-flags.md +1 -0
- package/rules/hatch3r-git-conventions.md +1 -0
- package/rules/hatch3r-i18n.md +1 -0
- package/rules/hatch3r-learning-consult.md +1 -0
- package/rules/hatch3r-migrations.md +12 -0
- package/rules/hatch3r-observability.md +290 -0
- package/rules/hatch3r-performance-budgets.md +1 -0
- package/rules/hatch3r-secrets-management.md +1 -0
- package/rules/hatch3r-security-patterns.md +12 -0
- package/rules/hatch3r-testing.md +1 -0
- package/rules/hatch3r-theming.md +1 -0
- package/rules/hatch3r-tooling-hierarchy.md +1 -0
- package/skills/hatch3r-a11y-audit/SKILL.md +1 -0
- package/skills/hatch3r-agent-customize/SKILL.md +1 -0
- package/skills/hatch3r-api-spec/SKILL.md +1 -0
- package/skills/hatch3r-architecture-review/SKILL.md +1 -0
- package/skills/hatch3r-bug-fix/SKILL.md +1 -0
- 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 +1 -0
- package/skills/hatch3r-cost-tracking/SKILL.md +1 -0
- package/skills/hatch3r-dep-audit/SKILL.md +2 -1
- package/skills/hatch3r-feature/SKILL.md +1 -0
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +1 -0
- package/skills/hatch3r-incident-response/SKILL.md +1 -0
- package/skills/hatch3r-issue-workflow/SKILL.md +1 -0
- package/skills/hatch3r-logical-refactor/SKILL.md +1 -0
- package/skills/hatch3r-migration/SKILL.md +1 -0
- package/skills/hatch3r-perf-audit/SKILL.md +1 -0
- package/skills/hatch3r-pr-creation/SKILL.md +1 -0
- package/skills/hatch3r-qa-validation/SKILL.md +1 -0
- package/skills/hatch3r-recipe/SKILL.md +1 -0
- package/skills/hatch3r-refactor/SKILL.md +1 -0
- package/skills/hatch3r-release/SKILL.md +1 -0
- 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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: researcher-mode-similar-implementation
|
|
3
|
+
type: mode
|
|
4
|
+
description: Search the codebase for analogous features and extract implementation conventions.
|
|
5
|
+
parent: hatch3r-researcher
|
|
6
|
+
---
|
|
7
|
+
### Mode: `similar-implementation`
|
|
8
|
+
|
|
9
|
+
Search the codebase for analogous features, components, or modules and extract their implementation conventions as a reference for the implementer. The goal is to ensure new code follows established patterns rather than inventing new approaches.
|
|
10
|
+
|
|
11
|
+
**Protocol:**
|
|
12
|
+
|
|
13
|
+
1. Parse the task to extract the core *type* of work — CRUD resource, dashboard widget, API endpoint, auth flow, data pipeline, form, modal, notification, list/table view, search feature, file upload, webhook handler, background job, etc.
|
|
14
|
+
2. Search the codebase for modules and components that perform the same *type* of work. Use file name patterns, directory structure, import analysis, and semantic code search.
|
|
15
|
+
3. Rank matches by structural similarity: file organization, patterns used, complexity level, recency.
|
|
16
|
+
4. For the top 2-3 matches, extract:
|
|
17
|
+
- File structure and naming conventions (file names, directory placement, barrel exports)
|
|
18
|
+
- State management pattern (local state, context, store, server state, URL state)
|
|
19
|
+
- Error handling approach (try/catch style, error boundaries, toast notifications, inline errors)
|
|
20
|
+
- Data fetching / API pattern (hooks, services, direct fetch, query library)
|
|
21
|
+
- Test structure and coverage approach (co-located vs separate, naming, mock strategy)
|
|
22
|
+
- Component composition pattern (container/presenter, compound components, render props — if UI)
|
|
23
|
+
5. Identify where the proposed feature MUST differ from references and why (different data shape, different auth model, different performance requirements).
|
|
24
|
+
6. Present reference implementations with a recommendation for which to follow.
|
|
25
|
+
|
|
26
|
+
**Output structure:**
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
## Similar Implementation Analysis
|
|
30
|
+
|
|
31
|
+
### Work Type Classification
|
|
32
|
+
- **Detected type:** {type of work — e.g., "CRUD resource with list view and detail page"}
|
|
33
|
+
- **Search strategy:** {how references were found — file patterns, directory scan, semantic search}
|
|
34
|
+
|
|
35
|
+
### Reference Implementations
|
|
36
|
+
| # | Module / Feature | Location | Similarity | Why It's a Good Reference |
|
|
37
|
+
|---|-----------------|----------|-----------|--------------------------|
|
|
38
|
+
| 1 | {name} | {directory/file path} | High/Med | {what makes it analogous} |
|
|
39
|
+
| 2 | {name} | {directory/file path} | High/Med | {what makes it analogous} |
|
|
40
|
+
|
|
41
|
+
### Convention Extraction
|
|
42
|
+
|
|
43
|
+
#### Reference 1: {name}
|
|
44
|
+
| Aspect | Convention | Files |
|
|
45
|
+
|--------|-----------|-------|
|
|
46
|
+
| File structure | {pattern — e.g., "feature directory with index barrel, component, hook, types, test files"} | {example files} |
|
|
47
|
+
| State management | {pattern — e.g., "React Query for server state + local useState for UI state"} | {example files} |
|
|
48
|
+
| Error handling | {pattern — e.g., "ErrorBoundary wrapper + toast for mutations + inline for forms"} | {example files} |
|
|
49
|
+
| Data fetching | {pattern — e.g., "custom hook wrapping useQuery, service layer for API calls"} | {example files} |
|
|
50
|
+
| Test structure | {pattern — e.g., "co-located .test.tsx, RTL for components, msw for API mocks"} | {example files} |
|
|
51
|
+
| Component composition | {pattern — e.g., "container fetches data, presenter renders, shared via compound"} | {example files} |
|
|
52
|
+
|
|
53
|
+
### Recommendation
|
|
54
|
+
- **Primary reference:** {name} — follow this for {rationale}
|
|
55
|
+
- **Secondary reference:** {name} — consult for {specific aspect}
|
|
56
|
+
|
|
57
|
+
### Divergence Warnings
|
|
58
|
+
| # | Aspect | Reference Pattern | Required Divergence | Reason |
|
|
59
|
+
|---|--------|------------------|-------------------|--------|
|
|
60
|
+
| 1 | {aspect} | {what the reference does} | {what the new feature must do differently} | {why} |
|
|
61
|
+
|
|
62
|
+
### Pattern-Match Checklist for Implementer
|
|
63
|
+
- [ ] File structure follows {reference} convention
|
|
64
|
+
- [ ] State management uses {pattern} as established in {reference}
|
|
65
|
+
- [ ] Error handling follows {pattern} from {reference}
|
|
66
|
+
- [ ] Data fetching uses {pattern} from {reference}
|
|
67
|
+
- [ ] Test structure matches {pattern} from {reference}
|
|
68
|
+
- [ ] Component composition follows {pattern} from {reference}
|
|
69
|
+
- [ ] Documented divergences with justification for each
|
|
70
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: researcher-mode-symptom-trace
|
|
3
|
+
type: mode
|
|
4
|
+
description: Trace reported symptoms through the codebase to find divergence points.
|
|
5
|
+
parent: hatch3r-researcher
|
|
6
|
+
---
|
|
7
|
+
### Mode: `symptom-trace`
|
|
8
|
+
|
|
9
|
+
Trace reported symptoms through the codebase. Map the execution path from user action to observed failure. Identify where expected behavior diverges from actual behavior.
|
|
10
|
+
|
|
11
|
+
**Output structure:**
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
## Symptom Trace
|
|
15
|
+
|
|
16
|
+
### Execution Path
|
|
17
|
+
| # | Step | File / Function | Expected Behavior | Observed / Likely Behavior |
|
|
18
|
+
|---|------|----------------|-------------------|---------------------------|
|
|
19
|
+
| 1 | {user action or trigger} | {entry point} | {what should happen} | {what likely happens} |
|
|
20
|
+
| 2 | {next step in flow} | {file:function} | {expected} | {observed or inferred} |
|
|
21
|
+
|
|
22
|
+
### Divergence Point
|
|
23
|
+
- **Where:** {file:function or module where behavior diverges}
|
|
24
|
+
- **What:** {description of the divergence}
|
|
25
|
+
- **Evidence:** {code patterns, conditions, or state that suggest this is the divergence point}
|
|
26
|
+
|
|
27
|
+
### Error Propagation
|
|
28
|
+
| From | To | How | Observable? |
|
|
29
|
+
|------|----|-----|-------------|
|
|
30
|
+
| {origin} | {downstream} | {mechanism — exception, bad state, silent failure} | Yes/No |
|
|
31
|
+
|
|
32
|
+
### Affected Code Paths
|
|
33
|
+
| Path | Entry Point | Risk of Symptom | Notes |
|
|
34
|
+
|------|-------------|----------------|-------|
|
|
35
|
+
| {flow name} | {file:function} | High/Med/Low | {why this path is affected} |
|
|
36
|
+
|
|
37
|
+
### Data Flow Concerns
|
|
38
|
+
- {any data integrity, state management, or concurrency concerns identified during tracing}
|
|
39
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: researcher-mode-test-pattern
|
|
3
|
+
type: mode
|
|
4
|
+
description: Extract existing test conventions, framework usage, mock patterns, and helper libraries.
|
|
5
|
+
parent: hatch3r-researcher
|
|
6
|
+
---
|
|
7
|
+
### Mode: `test-pattern`
|
|
8
|
+
|
|
9
|
+
Extract existing test conventions, framework usage, mock patterns, and helper libraries to ensure new tests follow established patterns. Used by `hatch3r-test-plan` to align the test strategy with the project's existing test infrastructure.
|
|
10
|
+
|
|
11
|
+
**Output structure:**
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
## Test Pattern Analysis
|
|
15
|
+
|
|
16
|
+
### Framework & Tooling Inventory
|
|
17
|
+
| Tool | Version | Config File | Purpose |
|
|
18
|
+
|------|---------|------------|---------|
|
|
19
|
+
| {vitest/jest/playwright/stryker/etc.} | {version} | {config path} | {unit/integration/E2E/mutation} |
|
|
20
|
+
|
|
21
|
+
### Directory Conventions
|
|
22
|
+
| Test Type | Directory | Naming Pattern | Co-located? |
|
|
23
|
+
|-----------|-----------|---------------|-------------|
|
|
24
|
+
| Unit | {path} | {pattern — e.g., *.test.ts} | Yes/No |
|
|
25
|
+
| Integration | {path} | {pattern} | Yes/No |
|
|
26
|
+
| E2E | {path} | {pattern} | Yes/No |
|
|
27
|
+
| Fixtures | {path} | {pattern} | — |
|
|
28
|
+
| Quarantine | {path or "none"} | {pattern} | — |
|
|
29
|
+
|
|
30
|
+
### Mock & Fixture Patterns
|
|
31
|
+
| Pattern | Where Used | Convention | Compliance with hatch3r-testing |
|
|
32
|
+
|---------|-----------|-----------|-------------------------------|
|
|
33
|
+
| {fakes / stubs / mocks / MSW / nock / etc.} | {example files} | {how the project uses this pattern} | {aligned — fakes > stubs > mocks / divergent — explain} |
|
|
34
|
+
|
|
35
|
+
### Test Helper Library
|
|
36
|
+
| Helper | Location | Purpose | Used By |
|
|
37
|
+
|--------|----------|---------|---------|
|
|
38
|
+
| {factory function / builder / custom matcher / setup utility} | {file path} | {what it does} | {which test files use it} |
|
|
39
|
+
|
|
40
|
+
### Property-Based Testing Usage
|
|
41
|
+
| Status | Library | Where Used | Coverage |
|
|
42
|
+
|--------|---------|-----------|---------|
|
|
43
|
+
| {Active / Not used / Minimal} | {fast-check / etc. or "none"} | {file paths or "N/A"} | {which function types are covered} |
|
|
44
|
+
|
|
45
|
+
### Convention Compliance
|
|
46
|
+
| Convention (hatch3r-testing rule) | Current State | Compliance |
|
|
47
|
+
|----------------------------------|--------------|-----------|
|
|
48
|
+
| Deterministic (no wall clock) | {compliant / violations found} | {details} |
|
|
49
|
+
| Isolated (own setup/teardown) | {compliant / violations found} | {details} |
|
|
50
|
+
| Fast (unit < 50ms, integration < 2s) | {compliant / unknown / violations} | {details} |
|
|
51
|
+
| Named clearly (behavior descriptions) | {compliant / mixed / non-compliant} | {details} |
|
|
52
|
+
| No network in unit tests | {compliant / violations found} | {details} |
|
|
53
|
+
| No type escape hatches | {compliant / violations found} | {details} |
|
|
54
|
+
| Fakes > stubs > mocks hierarchy | {followed / partially / not followed} | {details} |
|
|
55
|
+
| Factory over fixtures | {followed / partially / not followed} | {details} |
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Depth scaling:**
|
|
59
|
+
- **quick**: Framework inventory + directory conventions only.
|
|
60
|
+
- **standard**: Full inventory, directory conventions, mock patterns, and convention compliance summary.
|
|
61
|
+
- **deep**: All sections exhaustively. Include test helper library analysis, property-based testing status, and detailed convention compliance with file-level violations.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: shared-external-knowledge
|
|
3
|
+
type: reference
|
|
4
|
+
description: Shared external knowledge reference for all agents — tooling hierarchy, platform CLI, Context7 MCP, and web research guidance.
|
|
5
|
+
---
|
|
6
|
+
## External Knowledge
|
|
7
|
+
|
|
8
|
+
Follow the tooling hierarchy (specs > codebase > Context7 MCP > web research). Use the project's configured platform CLI (check `platform` in `.agents/hatch.json`):
|
|
9
|
+
- **GitHub:** `gh` CLI
|
|
10
|
+
- **Azure DevOps:** `az devops` / `az boards` / `az repos` CLI
|
|
11
|
+
- **GitLab:** `glab` CLI
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup-azure-devops
|
|
3
|
+
type: command
|
|
4
|
+
description: Azure DevOps-specific platform procedures for board-pickup. Covers az CLI commands for work item listing, status updates, collision detection, PR creation, and state transitions.
|
|
5
|
+
tags: [board, team, azure-devops]
|
|
6
|
+
---
|
|
7
|
+
# Board Pickup — Azure DevOps Platform Details
|
|
8
|
+
|
|
9
|
+
Platform-specific procedures for Azure DevOps. Referenced from `hatch3r-board-pickup`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 1a: Fetch and Parse Board State — Azure DevOps
|
|
14
|
+
|
|
15
|
+
**Fetch all open work items:**
|
|
16
|
+
1. `az boards query --org https://dev.azure.com/{namespace} --project {project} --wiql "SELECT [System.Id], [System.Title], [System.State], [System.Tags] FROM WorkItems WHERE [System.State] <> 'Closed' AND [System.State] <> 'Removed'"` (fall back to `list_work_items` MCP).
|
|
17
|
+
|
|
18
|
+
**Check sub-issues per work item:**
|
|
19
|
+
- `az boards work-item relation list --id N`.
|
|
20
|
+
|
|
21
|
+
**Fetch tags:**
|
|
22
|
+
- Extract from `System.Tags` field.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Step 3: Collision Detection — Azure DevOps
|
|
27
|
+
|
|
28
|
+
**In-progress work items:**
|
|
29
|
+
- `az boards query --wiql "SELECT ... WHERE [System.State] = 'Active' AND [System.Tags] CONTAINS 'status:in-progress'"`.
|
|
30
|
+
|
|
31
|
+
**Open PRs:**
|
|
32
|
+
- `az repos pr list --org https://dev.azure.com/{namespace} --project {project} --status active`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step 4: Update Issue Status — Azure DevOps
|
|
37
|
+
|
|
38
|
+
**Update work item state and tags:**
|
|
39
|
+
- `az boards work-item update --id N --state "Active"` and update tags to include `status:in-progress`.
|
|
40
|
+
|
|
41
|
+
**Sync board status:**
|
|
42
|
+
Follow the **Azure Boards Work Item State Sync** from `commands/board/shared-azure-devops.md` for each work item marked `status:in-progress` (including parent epic). Set state to "Active".
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 8: Create Pull Request — Azure DevOps
|
|
47
|
+
|
|
48
|
+
**PR template:** Check `.azuredevops/pull_request_template.md`.
|
|
49
|
+
|
|
50
|
+
**Create PR:**
|
|
51
|
+
`az repos pr create --org https://dev.azure.com/{namespace} --project {project} --source-branch {branch} --target-branch {base} --title "..." --description "..."` (fall back to `create_pull_request` MCP).
|
|
52
|
+
|
|
53
|
+
`{base}` = `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
|
|
54
|
+
|
|
55
|
+
**Link PR to epic:**
|
|
56
|
+
`az boards work-item relation add --id {epic_id} --relation-type "ArtifactLink" --target-id {pr_id}` or link via PR description.
|
|
57
|
+
|
|
58
|
+
**Verify PR body linkage:**
|
|
59
|
+
Read back the created PR description and verify it contains `Closes #N` for every work item addressed. If any reference is missing:
|
|
60
|
+
`az repos pr update --id {pr_number} --description "..."`.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Step 8a: Post-PR Label Transition — Azure DevOps
|
|
65
|
+
|
|
66
|
+
**Transition to `status:in-review`:**
|
|
67
|
+
`az boards work-item update --id N --state "Resolved"` and update tags to include `status:in-review`.
|
|
68
|
+
|
|
69
|
+
**Sync Board:**
|
|
70
|
+
Follow the full **Azure Boards Work Item State Sync** from `commands/board/shared-azure-devops.md` for:
|
|
71
|
+
- Each `Closes #N` work item: Set state to "Resolved".
|
|
72
|
+
- Parent epic (all sub-issues addressed): Set state to "Resolved".
|
|
73
|
+
- Parent epic (partial): Verify state is "Active"; set it if not.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Error Handling — Azure DevOps
|
|
78
|
+
|
|
79
|
+
- **Work item listing failure** (`az boards query`): retry once, then ask user for work item ID.
|
|
80
|
+
- **Work item update failure** (`az boards work-item update`): warn and continue (tags not blocking).
|
|
81
|
+
- **PR creation failure** (`az repos pr create`): present error and manual instructions.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup-delegation-multi
|
|
3
|
+
type: command
|
|
4
|
+
description: Multi-issue sub-agent delegation protocols for board-pickup Steps 6b (epics) and 6c (batch). Covers level-by-level parallel execution, shared context, and quality pipelines.
|
|
5
|
+
tags: [board, team]
|
|
6
|
+
---
|
|
7
|
+
# Board Pickup — Multi-Issue Delegation (Steps 6b, 6c)
|
|
8
|
+
|
|
9
|
+
Delegation details for Steps 6b and 6c of `hatch3r-board-pickup`. Referenced from the core command file.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 6b. Epics -- Sub-Agent Delegation (One Implementer Per Sub-Issue)
|
|
14
|
+
|
|
15
|
+
For epics with sub-issues, delegate each sub-issue to a dedicated implementer sub-agent. The parent orchestrator (this agent) coordinates dependency order, parallelism, and git operations.
|
|
16
|
+
|
|
17
|
+
### 6b.1. Parse Sub-Issues Into Dependency Levels
|
|
18
|
+
|
|
19
|
+
1. Fetch the epic's `## Implementation Order` section.
|
|
20
|
+
2. Group sub-issues by dependency level:
|
|
21
|
+
- **Level 1:** Sub-issues with no unsatisfied blockers (can start immediately).
|
|
22
|
+
- **Level N:** Sub-issues whose blockers are all in levels < N.
|
|
23
|
+
3. Within each level, identify parallelizable sub-issues (no mutual dependencies).
|
|
24
|
+
|
|
25
|
+
### 6b.2. Prepare Shared Context
|
|
26
|
+
|
|
27
|
+
Before spawning implementer sub-agents, delegate context gathering to the **hatch3r-researcher agent protocol**.
|
|
28
|
+
|
|
29
|
+
1. Read the epic body (goal, scope, constraints).
|
|
30
|
+
2. Spawn a researcher sub-agent following the **hatch3r-researcher agent protocol** with:
|
|
31
|
+
- **Research brief:** The epic title, goal, scope, constraints, and area labels.
|
|
32
|
+
- **Modes:** `codebase-impact`, `risk-assessment`
|
|
33
|
+
- **Depth:** `standard` for most epics. Use `quick` if the epic has fewer than 3 sub-issues or is well-specified with linked specs. Use `deep` if the epic spans multiple modules or introduces new patterns.
|
|
34
|
+
- **Project context:** Pre-loaded documentation references from area labels.
|
|
35
|
+
3. Await the researcher result. Include the structured output as shared context in all implementer sub-agent prompts in Step 6b.3.
|
|
36
|
+
|
|
37
|
+
### 6b.2b. Per-Sub-Issue Complexity Scoring and Tier-Adjusted Research
|
|
38
|
+
|
|
39
|
+
After the shared epic-level research, score each sub-issue individually and run additional research for sub-issues that warrant it.
|
|
40
|
+
|
|
41
|
+
1. **Score each sub-issue** per the `hatch3r-deep-context` rule to determine the analysis tier (Light / Standard / Deep).
|
|
42
|
+
|
|
43
|
+
2. **For Tier 2+ sub-issues**, spawn per-sub-issue **hatch3r-researcher** sub-agents via the Task tool (`subagent_type: "generalPurpose"`). Launch as many concurrently as the platform supports.
|
|
44
|
+
|
|
45
|
+
Each per-sub-issue researcher prompt must include:
|
|
46
|
+
- The sub-issue title, body, acceptance criteria, and area labels.
|
|
47
|
+
- Research modes by issue type (same as Step 6a.1).
|
|
48
|
+
- **Tier-adjusted modes** (per `hatch3r-deep-context`):
|
|
49
|
+
- Tier 2: add `requirements-elicitation` + `similar-implementation` at `quick` depth
|
|
50
|
+
- Tier 3: add `requirements-elicitation` + `similar-implementation` at `deep` depth, plus `codebase-impact` at `deep` depth with transitive tracing
|
|
51
|
+
- Depth by risk level, with complexity tier overriding upward.
|
|
52
|
+
- The shared epic-level researcher output from Step 6b.2 (to avoid redundant analysis).
|
|
53
|
+
|
|
54
|
+
3. **Await all per-sub-issue researchers.** Collect structured outputs. Each researcher's output feeds exclusively into its corresponding implementer in Step 6b.3.
|
|
55
|
+
|
|
56
|
+
4. **For Tier 2 sub-issues:** Present the `requirements-elicitation` questions to the user inline and await answers before proceeding.
|
|
57
|
+
|
|
58
|
+
5. **For Tier 3 sub-issues:** Present a full Pre-Implementation Summary per the `hatch3r-deep-context` rule. Do NOT proceed to 6b.3 until all unresolved questions are answered.
|
|
59
|
+
|
|
60
|
+
6. **Tier 1 sub-issues** skip this step — they use only the shared epic-level context from Step 6b.2.
|
|
61
|
+
|
|
62
|
+
### 6b.3. Execute Level-by-Level With Parallel Sub-Agents
|
|
63
|
+
|
|
64
|
+
For each dependency level, starting at Level 1:
|
|
65
|
+
|
|
66
|
+
1. **Spawn one implementer sub-agent per sub-issue in the current level.** Use the Task tool with `subagent_type: "generalPurpose"`. Launch as many sub-agents concurrently as the platform supports.
|
|
67
|
+
|
|
68
|
+
2. **Each sub-agent prompt must include:**
|
|
69
|
+
- The sub-issue number, title, full body, and acceptance criteria.
|
|
70
|
+
- The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
|
|
71
|
+
- Parent epic context (title, goal, related sub-issues at the same level).
|
|
72
|
+
- The shared researcher output from Step 6b.2 (codebase impact and risk assessment as shared context).
|
|
73
|
+
- The per-sub-issue researcher output from Step 6b.2b (if this sub-issue scored Tier 2+).
|
|
74
|
+
- **Reference conventions** from `similar-implementation` output (Tier 2/3) — triggers the implementer's Convention Lock step.
|
|
75
|
+
- **Resolved requirements** from `requirements-elicitation` answers (Tier 2/3) — explicit decisions on ambiguities.
|
|
76
|
+
- **Blast radius data** from enhanced `codebase-impact` (Tier 3) — transitive dependency trace and API consumer map.
|
|
77
|
+
- Documentation references relevant to this sub-issue.
|
|
78
|
+
- Instruction to follow the hatch3r-implementer agent protocol.
|
|
79
|
+
- All `scope: always` rule directives from `.agents/rules/` — subagents do not inherit rules automatically.
|
|
80
|
+
- Relevant learnings from `.agents/learnings/` (from Step 6.pre).
|
|
81
|
+
- Instruction to use GitHub MCP for issue reads, and follow the project's tooling hierarchy for external knowledge augmentation.
|
|
82
|
+
- Explicit instruction: do NOT create branches, commits, or PRs.
|
|
83
|
+
|
|
84
|
+
3. **Await all sub-agents in the current level.** Collect their structured results (files changed, tests written, issues encountered).
|
|
85
|
+
|
|
86
|
+
4. **Review sub-agent results:**
|
|
87
|
+
- If any sub-agent reports BLOCKED or PARTIAL, **ASK** the user how to proceed (skip, fix manually, retry).
|
|
88
|
+
- If sub-agents modified overlapping files, review for conflicts and resolve before proceeding.
|
|
89
|
+
|
|
90
|
+
5. **Advance to the next dependency level.** Repeat steps 1-4 until all levels are complete.
|
|
91
|
+
|
|
92
|
+
### 6b.4. Post-Delegation Verification
|
|
93
|
+
|
|
94
|
+
After all sub-agents complete:
|
|
95
|
+
|
|
96
|
+
1. Run a combined quality check across all changes.
|
|
97
|
+
2. Resolve any cross-sub-issue integration issues.
|
|
98
|
+
3. Verify no file conflicts between parallel sub-agent outputs.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 6c. Multi-Issue Batch -- Parallel Subagent Delegation (One Implementer Per Issue)
|
|
103
|
+
|
|
104
|
+
For batches of multiple standalone issues (selected via batch mode in Step 1d or by referencing multiple issue numbers), delegate each issue to a dedicated implementer sub-agent. The parent orchestrator (this agent) coordinates dependency levels, parallelism, collision avoidance, and git operations.
|
|
105
|
+
|
|
106
|
+
### 6c.1. Group Issues Into Dependency Levels
|
|
107
|
+
|
|
108
|
+
1. Use the updated cross-issue dependency graph (from Step 2e, adjusted by Step 3.4).
|
|
109
|
+
2. Group issues by dependency level:
|
|
110
|
+
- **Level 1:** Issues with no dependencies on other issues in the batch (can start immediately). Most standalone issues will be Level 1.
|
|
111
|
+
- **Level N:** Issues that depend on other issues in levels < N.
|
|
112
|
+
3. Within each level, all issues are parallelizable (no mutual dependencies — conflicts were moved to separate levels in Step 3).
|
|
113
|
+
|
|
114
|
+
### 6c.2. Context Gathering (Parallel Researchers)
|
|
115
|
+
|
|
116
|
+
**Skip this step only** if ALL issues in the batch are trivial single-line edits (typos, comment fixes, single-value config changes) that score Tier 1 per `hatch3r-deep-context`. The `risk:low` and `priority:p3` labels alone are not sufficient to skip research — always score complexity first.
|
|
117
|
+
|
|
118
|
+
Unlike epics (which share a single researcher), standalone issues in a batch are unrelated and each need individual context gathering.
|
|
119
|
+
|
|
120
|
+
1. **Spawn one hatch3r-researcher sub-agent per issue** via the Task tool (`subagent_type: "generalPurpose"`). Launch as many concurrently as the platform supports.
|
|
121
|
+
|
|
122
|
+
2. **Each researcher prompt must include:**
|
|
123
|
+
- The issue title, body, acceptance criteria, and area labels.
|
|
124
|
+
- Research modes by issue type (same as Step 6a.1).
|
|
125
|
+
- Tier-adjusted modes per `hatch3r-deep-context` (same as Step 6a.1).
|
|
126
|
+
- Depth by risk level (`quick` / `standard` / `deep`), with complexity tier overriding upward.
|
|
127
|
+
- Project context and documentation references.
|
|
128
|
+
|
|
129
|
+
3. **Await all researchers.** Collect structured outputs. Each researcher's output feeds exclusively into its corresponding implementer in Step 6c.3. For Tier 2/3 issues, present elicitation questions to the user and await answers before proceeding.
|
|
130
|
+
|
|
131
|
+
### 6c.3. Execute Level-by-Level With Parallel Implementers
|
|
132
|
+
|
|
133
|
+
For each dependency level, starting at Level 1:
|
|
134
|
+
|
|
135
|
+
1. **Spawn one hatch3r-implementer sub-agent per issue in the current level.** Use the Task tool with `subagent_type: "generalPurpose"`. Launch as many sub-agents concurrently as the platform supports.
|
|
136
|
+
|
|
137
|
+
2. **Each sub-agent prompt must include:**
|
|
138
|
+
- The issue number, title, full body, and acceptance criteria.
|
|
139
|
+
- The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
|
|
140
|
+
- Batch context: sibling issues in the batch at the same level (for awareness, not implementation).
|
|
141
|
+
- The researcher output from Step 6c.2 for this specific issue (if that step was not skipped).
|
|
142
|
+
- **Reference conventions** from `similar-implementation` output (Tier 2/3) — triggers the implementer's Convention Lock step.
|
|
143
|
+
- **Resolved requirements** from `requirements-elicitation` answers (Tier 2/3).
|
|
144
|
+
- **Blast radius data** from enhanced `codebase-impact` (Tier 3).
|
|
145
|
+
- Documentation references relevant to this issue.
|
|
146
|
+
- Instruction to follow the **hatch3r-implementer agent protocol**.
|
|
147
|
+
- All `scope: always` rule directives from `.agents/rules/` — subagents do not inherit rules automatically.
|
|
148
|
+
- Relevant learnings from `.agents/learnings/` (from Step 6.pre).
|
|
149
|
+
- Explicit instruction: do NOT create branches, commits, or PRs.
|
|
150
|
+
|
|
151
|
+
3. **Await all sub-agents in the current level.** Collect their structured results (files changed, tests written, issues encountered).
|
|
152
|
+
|
|
153
|
+
4. **Review sub-agent results:**
|
|
154
|
+
- If any sub-agent reports BLOCKED or PARTIAL, **ASK** the user how to proceed (skip, fix manually, retry).
|
|
155
|
+
- If sub-agents modified overlapping files, review for conflicts and resolve before proceeding.
|
|
156
|
+
|
|
157
|
+
5. **Advance to the next dependency level.** Repeat steps 1-4 until all levels are complete.
|
|
158
|
+
|
|
159
|
+
### 6c.4. Post-Batch Verification
|
|
160
|
+
|
|
161
|
+
After all implementer sub-agents complete across all levels:
|
|
162
|
+
|
|
163
|
+
1. Run a combined quality check across all changes from all issues.
|
|
164
|
+
2. Resolve any cross-issue file conflicts or integration issues.
|
|
165
|
+
3. Verify no regressions between parallel sub-agent outputs.
|
|
166
|
+
|
|
167
|
+
### 6c.5. Post-Implementation Quality Pipeline
|
|
168
|
+
|
|
169
|
+
After all implementations complete, run the two-stage quality pipeline across the entire batch. Use the Task tool with `subagent_type: "generalPurpose"`.
|
|
170
|
+
|
|
171
|
+
**Stage 1 — Review Loop (sequential):**
|
|
172
|
+
|
|
173
|
+
1. Spawn **`hatch3r-reviewer`** — code review of ALL changes across the batch. Include the full diff and acceptance criteria for each issue.
|
|
174
|
+
2. If the reviewer reports Critical or Warning findings, spawn **`hatch3r-fixer`** with the reviewer output to apply fixes. When fixes touch shared or public interfaces, also include:
|
|
175
|
+
- **Blast radius data** from Step 6c.2 (if available) — so the fixer knows which consumers and contracts must be preserved.
|
|
176
|
+
- **Reference conventions** from Step 6c.2 (if available) — so the fixer maintains established patterns when applying fixes.
|
|
177
|
+
3. Re-spawn **`hatch3r-reviewer`** to verify fixes.
|
|
178
|
+
4. Repeat steps 2-3 for a maximum of **3 iterations** until the reviewer reports 0 Critical + 0 Warning findings.
|
|
179
|
+
5. If still not clean after 3 iterations, **ASK** the user how to proceed.
|
|
180
|
+
|
|
181
|
+
**Stage 2 — Final Quality (parallel, after review loop is clean):**
|
|
182
|
+
|
|
183
|
+
Launch as many independent sub-agents in parallel as the platform supports.
|
|
184
|
+
|
|
185
|
+
**Always spawn (mandatory for every code change):**
|
|
186
|
+
- **hatch3r-test-writer** — tests for all code changes across the batch.
|
|
187
|
+
- **hatch3r-security-auditor** — security review of all code changes across the batch.
|
|
188
|
+
|
|
189
|
+
**Always evaluate (spawn when applicable):**
|
|
190
|
+
- **hatch3r-docs-writer** — spawn when any changes affect public APIs, architectural patterns, or user-facing behavior.
|
|
191
|
+
|
|
192
|
+
**Conditional specialists (spawn when triggered by any issue in the batch):**
|
|
193
|
+
- **hatch3r-lint-fixer** — spawn when lint errors are present after implementation.
|
|
194
|
+
- **hatch3r-a11y-auditor** — spawn when any issue has `area:ui` or `area:a11y` labels.
|
|
195
|
+
- **hatch3r-perf-profiler** — spawn when any issue has `area:performance` label.
|
|
196
|
+
|
|
197
|
+
Await all specialist sub-agents. Apply their feedback before proceeding to Step 7.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup-delegation
|
|
3
|
+
type: command
|
|
4
|
+
description: Single-issue sub-agent delegation protocol for board-pickup Step 6a. Covers research, implementation, and quality pipeline for standalone issues.
|
|
5
|
+
tags: [board, team]
|
|
6
|
+
---
|
|
7
|
+
# Board Pickup — Single-Issue Delegation (Step 6a)
|
|
8
|
+
|
|
9
|
+
Delegation details for Step 6a of `hatch3r-board-pickup`. Referenced from the core command file.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 6a. Single Standalone Issue -- Subagent Delegation
|
|
14
|
+
|
|
15
|
+
For a single standalone issue (no sub-issues, not part of a batch), follow this three-phase approach: research, delegate to implementer, then specialist review.
|
|
16
|
+
|
|
17
|
+
### 6a.1. Context Gathering (Researcher Subagent)
|
|
18
|
+
|
|
19
|
+
**Skip this step only** for trivial single-line edits (typos, comment fixes, single-value config changes) that score Tier 1 per `hatch3r-deep-context`. The `risk:low` and `priority:p3` labels alone are not sufficient to skip research — always score complexity first.
|
|
20
|
+
|
|
21
|
+
**Score the issue's complexity** per the `hatch3r-deep-context` rule to determine the analysis tier (Light / Standard / Deep). This determines which additional researcher modes to include alongside the standard task-type modes.
|
|
22
|
+
|
|
23
|
+
Spawn a **hatch3r-researcher** sub-agent via the Task tool (`subagent_type: "generalPurpose"`) with:
|
|
24
|
+
|
|
25
|
+
- **Research brief:** The issue title, body, acceptance criteria, and area labels.
|
|
26
|
+
- **Modes by issue type:**
|
|
27
|
+
- `type:bug` → `symptom-trace`, `root-cause`, `codebase-impact`
|
|
28
|
+
- `type:feature` → `codebase-impact`, `feature-design`, `architecture`
|
|
29
|
+
- `type:refactor` → `current-state`, `refactoring-strategy`, `migration-path`
|
|
30
|
+
- `type:qa` → `codebase-impact`
|
|
31
|
+
- `type:docs` → `codebase-impact`
|
|
32
|
+
- `type:infra` → `codebase-impact`, `risk-assessment`
|
|
33
|
+
- **Tier-adjusted modes** (per `hatch3r-deep-context`):
|
|
34
|
+
- Tier 2: add `requirements-elicitation` + `similar-implementation` at `quick` depth
|
|
35
|
+
- Tier 3: add `requirements-elicitation` + `similar-implementation` at `deep` depth, plus `codebase-impact` at `deep` depth with transitive tracing
|
|
36
|
+
- **Depth:** `quick` for `risk:low`, `standard` for `risk:med`, `deep` for `risk:high`. The complexity tier may override depth upward.
|
|
37
|
+
- **Project context:** Pre-loaded documentation references from area labels.
|
|
38
|
+
|
|
39
|
+
Await the researcher result. Use its structured output to inform Steps 6a.2-6a.3.
|
|
40
|
+
|
|
41
|
+
**For Tier 2:** Present the `requirements-elicitation` questions to the user inline and await answers before proceeding to 6a.2.
|
|
42
|
+
|
|
43
|
+
**For Tier 3:** Present a full Pre-Implementation Summary per the `hatch3r-deep-context` rule. Do NOT proceed to 6a.2 until all unresolved questions are answered.
|
|
44
|
+
|
|
45
|
+
### 6a.2. Core Implementation (Implementer Subagent)
|
|
46
|
+
|
|
47
|
+
You MUST spawn a **hatch3r-implementer** sub-agent via the Task tool (`subagent_type: "generalPurpose"`). Do NOT implement inline — always delegate to a dedicated implementer to preserve orchestrator context for coordination, review, and integration.
|
|
48
|
+
|
|
49
|
+
The implementer sub-agent prompt MUST include:
|
|
50
|
+
- The issue number, title, full body, and acceptance criteria.
|
|
51
|
+
- The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
|
|
52
|
+
- The researcher output from Step 6a.1 (if that step was not skipped).
|
|
53
|
+
- **Reference conventions** from `similar-implementation` output (Tier 2/3) — triggers the implementer's Convention Lock step.
|
|
54
|
+
- **Resolved requirements** from `requirements-elicitation` answers (Tier 2/3) — explicit decisions on ambiguities.
|
|
55
|
+
- **Blast radius data** from enhanced `codebase-impact` (Tier 3) — transitive dependency trace and API consumer map.
|
|
56
|
+
- Documentation references relevant to this issue.
|
|
57
|
+
- Instruction to follow the **hatch3r-implementer agent protocol**.
|
|
58
|
+
- All `scope: always` rule directives from `.agents/rules/` — subagents do not inherit rules automatically.
|
|
59
|
+
- Relevant learnings from `.agents/learnings/` (from Step 6.pre).
|
|
60
|
+
- Explicit instruction: do NOT create branches, commits, or PRs.
|
|
61
|
+
|
|
62
|
+
Await the implementer sub-agent. Collect its structured result (files changed, tests written, issues encountered).
|
|
63
|
+
|
|
64
|
+
### 6a.3. Post-Implementation Quality Pipeline
|
|
65
|
+
|
|
66
|
+
After implementation completes, run the two-stage quality pipeline. Use the Task tool with `subagent_type: "generalPurpose"`.
|
|
67
|
+
|
|
68
|
+
**Stage 1 — Review Loop (sequential):**
|
|
69
|
+
|
|
70
|
+
1. Spawn **`hatch3r-reviewer`** — code review of all changes. Include the diff and acceptance criteria in the prompt.
|
|
71
|
+
2. If the reviewer reports Critical or Warning findings, spawn **`hatch3r-fixer`** with the reviewer output to apply fixes. When fixes touch shared or public interfaces, also include:
|
|
72
|
+
- **Blast radius data** from Step 6a.1 (if available) — so the fixer knows which consumers and contracts must be preserved.
|
|
73
|
+
- **Reference conventions** from Step 6a.1 (if available) — so the fixer maintains established patterns when applying fixes.
|
|
74
|
+
3. Re-spawn **`hatch3r-reviewer`** to verify fixes.
|
|
75
|
+
4. Repeat steps 2-3 for a maximum of **3 iterations** until the reviewer reports 0 Critical + 0 Warning findings.
|
|
76
|
+
5. If still not clean after 3 iterations, **ASK** the user how to proceed.
|
|
77
|
+
|
|
78
|
+
**Stage 2 — Final Quality (parallel, after review loop is clean):**
|
|
79
|
+
|
|
80
|
+
Launch as many independent sub-agents in parallel as the platform supports.
|
|
81
|
+
|
|
82
|
+
**Always spawn (mandatory for every code change):**
|
|
83
|
+
- **hatch3r-test-writer** — tests for all code changes. Unit tests for new logic, regression tests for bug fixes, integration tests for cross-module changes.
|
|
84
|
+
- **hatch3r-security-auditor** — security review of all code changes. Audit data flows, access control, input validation, and secret management.
|
|
85
|
+
|
|
86
|
+
**Always evaluate (spawn when applicable):**
|
|
87
|
+
- **hatch3r-docs-writer** — spawn when changes affect public APIs, architectural patterns, or user-facing behavior. Skip silently if no documentation impact.
|
|
88
|
+
|
|
89
|
+
**Conditional specialists (spawn when triggered):**
|
|
90
|
+
- **hatch3r-lint-fixer** — spawn when lint errors are present after implementation.
|
|
91
|
+
- **hatch3r-a11y-auditor** — spawn when issue has `area:ui` or `area:a11y` labels.
|
|
92
|
+
- **hatch3r-perf-profiler** — spawn when issue has `area:performance` label or changes touch hot paths.
|
|
93
|
+
|
|
94
|
+
Each specialist sub-agent prompt MUST include:
|
|
95
|
+
- The agent protocol to follow (e.g., "Follow the hatch3r-reviewer agent protocol").
|
|
96
|
+
- All `scope: always` rule directives from `.agents/rules/` (subagents do not inherit rules automatically).
|
|
97
|
+
- The diff or file changes to review.
|
|
98
|
+
- The issue's acceptance criteria.
|
|
99
|
+
|
|
100
|
+
Await all specialist sub-agents. Apply their feedback (fixes, additional tests, documentation updates) before proceeding to Step 7.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup-github
|
|
3
|
+
type: command
|
|
4
|
+
description: GitHub-specific platform procedures for board-pickup. Covers gh CLI commands for issue listing, status updates, collision detection, PR creation, and label transitions.
|
|
5
|
+
tags: [board, team, github]
|
|
6
|
+
---
|
|
7
|
+
# Board Pickup — GitHub Platform Details
|
|
8
|
+
|
|
9
|
+
Platform-specific procedures for GitHub. Referenced from `hatch3r-board-pickup`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 1a: Fetch and Parse Board State — GitHub
|
|
14
|
+
|
|
15
|
+
**Fetch all open issues:**
|
|
16
|
+
1. `gh issue list -R {owner}/{repo} --state open --limit 500 --json number,title,labels,state,createdAt,updatedAt,body` (fall back to `list_issues` MCP). Paginate to get all.
|
|
17
|
+
|
|
18
|
+
**Check sub-issues per issue:**
|
|
19
|
+
- `issue_read` with `method: get_sub_issues`.
|
|
20
|
+
|
|
21
|
+
**Fetch labels:**
|
|
22
|
+
- `issue_read` with `method: get_labels`.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Step 3: Collision Detection — GitHub
|
|
27
|
+
|
|
28
|
+
**In-progress issues:**
|
|
29
|
+
- `gh issue list -R {owner}/{repo} --label "status:in-progress" --state open` (fall back to `search_issues` MCP).
|
|
30
|
+
|
|
31
|
+
**Open PRs:**
|
|
32
|
+
- `gh pr list -R {owner}/{repo} --state open` (fall back to `search_pull_requests` MCP).
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step 4: Update Issue Status — GitHub
|
|
37
|
+
|
|
38
|
+
**Update status labels:**
|
|
39
|
+
- `gh issue edit N --remove-label "status:ready" --add-label "status:in-progress"` (fall back to `issue_write` MCP).
|
|
40
|
+
|
|
41
|
+
**Sync board status:**
|
|
42
|
+
Follow the **GitHub Projects V2 Sync** from `commands/board/shared-github.md` for each issue marked `status:in-progress` (including parent epic). Set status to "In Progress".
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 8: Create Pull Request — GitHub
|
|
47
|
+
|
|
48
|
+
**PR template:** Check `.github/PULL_REQUEST_TEMPLATE.md`.
|
|
49
|
+
|
|
50
|
+
**Create PR:**
|
|
51
|
+
`gh pr create -R {owner}/{repo} --head {branch} --base {base} --title "..." --body "..."` (fall back to `create_pull_request` MCP).
|
|
52
|
+
|
|
53
|
+
`{base}` = `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
|
|
54
|
+
|
|
55
|
+
**Link PR to epic:**
|
|
56
|
+
`gh issue comment {epic} -R {owner}/{repo} --body "PR: #{pr_number}"` (fall back to `add_issue_comment` MCP).
|
|
57
|
+
|
|
58
|
+
**Verify PR body linkage:**
|
|
59
|
+
Read back the created PR body and verify it contains `Closes #N` for every issue addressed. If any `Closes #N` reference is missing:
|
|
60
|
+
`gh pr edit {pr_number} -R {owner}/{repo} --body "..."`.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Step 8a: Post-PR Label Transition — GitHub
|
|
65
|
+
|
|
66
|
+
**Transition labels to `status:in-review`:**
|
|
67
|
+
`gh issue edit N --remove-label "status:in-progress" --add-label "status:in-review"`.
|
|
68
|
+
|
|
69
|
+
**Sync Board:**
|
|
70
|
+
Follow the full **GitHub Projects V2 Sync** from `commands/board/shared-github.md` for:
|
|
71
|
+
- The PR: Set to "In Review" on the board.
|
|
72
|
+
- Each `Closes #N` issue: Set to "In Review".
|
|
73
|
+
- Parent epic (all sub-issues addressed): Set to "In Review".
|
|
74
|
+
- Parent epic (partial): Verify status is "In Progress"; set it if not.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Error Handling — GitHub
|
|
79
|
+
|
|
80
|
+
- **Issue listing failure** (`list_issues`): retry once, then ask user for issue number.
|
|
81
|
+
- **Issue update failure** (`issue_write`): warn and continue (labels not blocking).
|
|
82
|
+
- **PR creation failure** (`create_pull_request`): present error and manual instructions.
|