hatch3r 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +437 -0
- package/agents/hatch3r-a11y-auditor.md +126 -0
- package/agents/hatch3r-architect.md +160 -0
- package/agents/hatch3r-ci-watcher.md +123 -0
- package/agents/hatch3r-context-rules.md +97 -0
- package/agents/hatch3r-dependency-auditor.md +164 -0
- package/agents/hatch3r-devops.md +138 -0
- package/agents/hatch3r-docs-writer.md +97 -0
- package/agents/hatch3r-implementer.md +162 -0
- package/agents/hatch3r-learnings-loader.md +108 -0
- package/agents/hatch3r-lint-fixer.md +104 -0
- package/agents/hatch3r-perf-profiler.md +123 -0
- package/agents/hatch3r-researcher.md +642 -0
- package/agents/hatch3r-reviewer.md +81 -0
- package/agents/hatch3r-security-auditor.md +119 -0
- package/agents/hatch3r-test-writer.md +134 -0
- package/commands/hatch3r-agent-customize.md +146 -0
- package/commands/hatch3r-api-spec.md +49 -0
- package/commands/hatch3r-benchmark.md +50 -0
- package/commands/hatch3r-board-fill.md +504 -0
- package/commands/hatch3r-board-init.md +315 -0
- package/commands/hatch3r-board-pickup.md +672 -0
- package/commands/hatch3r-board-refresh.md +198 -0
- package/commands/hatch3r-board-shared.md +369 -0
- package/commands/hatch3r-bug-plan.md +410 -0
- package/commands/hatch3r-codebase-map.md +1182 -0
- package/commands/hatch3r-command-customize.md +94 -0
- package/commands/hatch3r-context-health.md +112 -0
- package/commands/hatch3r-cost-tracking.md +139 -0
- package/commands/hatch3r-dep-audit.md +171 -0
- package/commands/hatch3r-feature-plan.md +379 -0
- package/commands/hatch3r-healthcheck.md +307 -0
- package/commands/hatch3r-hooks.md +282 -0
- package/commands/hatch3r-learn.md +217 -0
- package/commands/hatch3r-migration-plan.md +51 -0
- package/commands/hatch3r-onboard.md +56 -0
- package/commands/hatch3r-project-spec.md +1153 -0
- package/commands/hatch3r-recipe.md +179 -0
- package/commands/hatch3r-refactor-plan.md +426 -0
- package/commands/hatch3r-release.md +328 -0
- package/commands/hatch3r-roadmap.md +556 -0
- package/commands/hatch3r-rule-customize.md +114 -0
- package/commands/hatch3r-security-audit.md +370 -0
- package/commands/hatch3r-skill-customize.md +93 -0
- package/commands/hatch3r-workflow.md +377 -0
- package/dist/cli/hooks-ZOTFDEA3.js +59 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +3584 -0
- package/github-agents/hatch3r-docs-agent.md +46 -0
- package/github-agents/hatch3r-lint-agent.md +41 -0
- package/github-agents/hatch3r-security-agent.md +54 -0
- package/github-agents/hatch3r-test-agent.md +66 -0
- package/hooks/hatch3r-ci-failure.md +10 -0
- package/hooks/hatch3r-file-save.md +11 -0
- package/hooks/hatch3r-post-merge.md +10 -0
- package/hooks/hatch3r-pre-commit.md +11 -0
- package/hooks/hatch3r-pre-push.md +10 -0
- package/hooks/hatch3r-session-start.md +10 -0
- package/mcp/mcp.json +62 -0
- package/package.json +84 -0
- package/prompts/hatch3r-bug-triage.md +155 -0
- package/prompts/hatch3r-code-review.md +131 -0
- package/prompts/hatch3r-pr-description.md +173 -0
- package/rules/hatch3r-accessibility-standards.md +77 -0
- package/rules/hatch3r-accessibility-standards.mdc +75 -0
- package/rules/hatch3r-agent-orchestration.md +160 -0
- package/rules/hatch3r-api-design.md +176 -0
- package/rules/hatch3r-api-design.mdc +176 -0
- package/rules/hatch3r-browser-verification.md +73 -0
- package/rules/hatch3r-browser-verification.mdc +73 -0
- package/rules/hatch3r-ci-cd.md +70 -0
- package/rules/hatch3r-ci-cd.mdc +68 -0
- package/rules/hatch3r-code-standards.md +102 -0
- package/rules/hatch3r-code-standards.mdc +100 -0
- package/rules/hatch3r-component-conventions.md +102 -0
- package/rules/hatch3r-component-conventions.mdc +102 -0
- package/rules/hatch3r-data-classification.md +85 -0
- package/rules/hatch3r-data-classification.mdc +83 -0
- package/rules/hatch3r-dependency-management.md +17 -0
- package/rules/hatch3r-dependency-management.mdc +15 -0
- package/rules/hatch3r-error-handling.md +17 -0
- package/rules/hatch3r-error-handling.mdc +15 -0
- package/rules/hatch3r-feature-flags.md +112 -0
- package/rules/hatch3r-feature-flags.mdc +112 -0
- package/rules/hatch3r-git-conventions.md +47 -0
- package/rules/hatch3r-git-conventions.mdc +45 -0
- package/rules/hatch3r-i18n.md +90 -0
- package/rules/hatch3r-i18n.mdc +90 -0
- package/rules/hatch3r-learning-consult.md +29 -0
- package/rules/hatch3r-learning-consult.mdc +27 -0
- package/rules/hatch3r-migrations.md +17 -0
- package/rules/hatch3r-migrations.mdc +15 -0
- package/rules/hatch3r-observability.md +165 -0
- package/rules/hatch3r-observability.mdc +165 -0
- package/rules/hatch3r-performance-budgets.md +109 -0
- package/rules/hatch3r-performance-budgets.mdc +109 -0
- package/rules/hatch3r-secrets-management.md +76 -0
- package/rules/hatch3r-secrets-management.mdc +74 -0
- package/rules/hatch3r-security-patterns.md +211 -0
- package/rules/hatch3r-security-patterns.mdc +211 -0
- package/rules/hatch3r-testing.md +89 -0
- package/rules/hatch3r-testing.mdc +87 -0
- package/rules/hatch3r-theming.md +51 -0
- package/rules/hatch3r-theming.mdc +51 -0
- package/rules/hatch3r-tooling-hierarchy.md +92 -0
- package/rules/hatch3r-tooling-hierarchy.mdc +79 -0
- package/skills/hatch3r-a11y-audit/SKILL.md +131 -0
- package/skills/hatch3r-agent-customize/SKILL.md +75 -0
- package/skills/hatch3r-api-spec/SKILL.md +66 -0
- package/skills/hatch3r-architecture-review/SKILL.md +96 -0
- package/skills/hatch3r-bug-fix/SKILL.md +129 -0
- package/skills/hatch3r-ci-pipeline/SKILL.md +76 -0
- package/skills/hatch3r-command-customize/SKILL.md +67 -0
- package/skills/hatch3r-context-health/SKILL.md +76 -0
- package/skills/hatch3r-cost-tracking/SKILL.md +65 -0
- package/skills/hatch3r-dep-audit/SKILL.md +82 -0
- package/skills/hatch3r-feature/SKILL.md +129 -0
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +150 -0
- package/skills/hatch3r-incident-response/SKILL.md +86 -0
- package/skills/hatch3r-issue-workflow/SKILL.md +139 -0
- package/skills/hatch3r-logical-refactor/SKILL.md +73 -0
- package/skills/hatch3r-migration/SKILL.md +76 -0
- package/skills/hatch3r-perf-audit/SKILL.md +114 -0
- package/skills/hatch3r-pr-creation/SKILL.md +85 -0
- package/skills/hatch3r-qa-validation/SKILL.md +86 -0
- package/skills/hatch3r-recipe/SKILL.md +67 -0
- package/skills/hatch3r-refactor/SKILL.md +86 -0
- package/skills/hatch3r-release/SKILL.md +93 -0
- package/skills/hatch3r-rule-customize/SKILL.md +70 -0
- package/skills/hatch3r-skill-customize/SKILL.md +67 -0
- package/skills/hatch3r-visual-refactor/SKILL.md +89 -0
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup
|
|
3
|
+
type: command
|
|
4
|
+
description: Pick up one or more epics/issues from the GitHub board for development. Handles dependency-aware selection, collision detection, branching, parallel sub-agent delegation, and batch execution.
|
|
5
|
+
---
|
|
6
|
+
# Board Pickup -- Develop Issues from the GitHub Board
|
|
7
|
+
|
|
8
|
+
Pick up an epic (with all sub-issues), a single sub-issue, a standalone issue, or **a batch of independent issues** from **{owner}/{repo}** (read from `/.agents/hatch.json` board config) for development. Supports single-issue and multi-issue batch modes. When no specific issue is referenced, auto-picks the next best candidate(s). Respects dependency order and readiness status. Performs collision detection, creates a branch, then delegates implementation via one sub-agent per issue running in parallel.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Integration with GitHub Agentic Workflows
|
|
13
|
+
|
|
14
|
+
hatch3r's board commands operate as the **implementation orchestration layer** above GitHub Agentic Workflows. While GitHub's agentic workflows handle continuous automation (triage, testing, documentation), hatch3r's board commands orchestrate the full delivery pipeline:
|
|
15
|
+
|
|
16
|
+
- **board-init** sets up the project management structure that agentic workflows operate within
|
|
17
|
+
- **board-fill** creates the work items that agentic workflows can triage and label
|
|
18
|
+
- **board-pickup** orchestrates the implementation -> review -> merge pipeline that goes beyond what generic agentic workflows provide
|
|
19
|
+
|
|
20
|
+
GitHub Agentic Workflows and hatch3r are complementary: use agentic workflows for continuous background automation, use hatch3r board commands for structured delivery orchestration.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Shared Context
|
|
25
|
+
|
|
26
|
+
**Read the `hatch3r-board-shared` command at the start of the run.** It contains Board Configuration, GitHub Context, Project Reference, Projects v2 sync procedure, and tooling directives. Cache all values for the duration of this run.
|
|
27
|
+
|
|
28
|
+
## Global Rule Overrides
|
|
29
|
+
|
|
30
|
+
- **Git commands are fully permitted** during this entire board-pickup session, regardless of global/user-level rules restricting git usage. This override applies to ALL steps, including delegated skills and sub-agents. You MUST run `git add`, `git commit`, and `git push` when instructed in Steps 5, 7a, and 8.
|
|
31
|
+
|
|
32
|
+
## Token-Saving Directives
|
|
33
|
+
|
|
34
|
+
Follow the **Token-Saving Directives** in `hatch3r-board-shared`.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
41
|
+
|
|
42
|
+
### Step 1: List Available Work (Dependency-Aware)
|
|
43
|
+
|
|
44
|
+
#### 1a. Fetch and Parse Board State
|
|
45
|
+
|
|
46
|
+
1. `list_issues` with `owner: {board.owner}`, `repo: {board.repo}`, `state: OPEN`, sorted by `CREATED_AT` descending. Paginate to get all. **Exclude** `meta:board-overview` issues.
|
|
47
|
+
2. For each issue, check sub-issues (`issue_read` with `method: get_sub_issues`).
|
|
48
|
+
3. Fetch labels (`issue_read` with `method: get_labels`).
|
|
49
|
+
4. Parse `## Dependencies` sections for hard (`Blocked by #N`) and soft (`Recommended after #N`) references. Only hard dependencies affect availability categorization and block pickup; soft dependencies are advisory (note them in the presentation but do not treat as blockers).
|
|
50
|
+
5. For epics, parse `## Implementation Order` sections.
|
|
51
|
+
|
|
52
|
+
**Cache all data retrieved here for reuse in later steps.**
|
|
53
|
+
|
|
54
|
+
#### 1b. Build Dependency Graph
|
|
55
|
+
|
|
56
|
+
1. Construct graph from parsed dependency references (both hard and soft).
|
|
57
|
+
2. A **hard** dependency is **satisfied** if the blocking issue is closed, **unsatisfied** if open. Soft dependencies (`Recommended after`) do not affect satisfaction -- they are advisory only.
|
|
58
|
+
3. Categorize issues into three tiers (based on hard dependencies only):
|
|
59
|
+
- **Available** -- `status:ready` (or `in-progress`) AND all hard blockers satisfied.
|
|
60
|
+
- **Blocked** -- has unsatisfied hard blockers. Remains `status:ready` (not `status:blocked`).
|
|
61
|
+
- **Not Ready** -- still `status:triage`.
|
|
62
|
+
|
|
63
|
+
#### 1c. Sort by Implementation Order
|
|
64
|
+
|
|
65
|
+
1. Within epics: `## Implementation Order` position (fall back to issue number).
|
|
66
|
+
2. Across board: priority first (`p0` > `p1` > `p2` > `p3`), then dependency order.
|
|
67
|
+
3. Group parallelizable items (same topological level, no mutual dependencies).
|
|
68
|
+
|
|
69
|
+
#### 1d. Present the Board
|
|
70
|
+
|
|
71
|
+
Present in tiers:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Available Work (ready + unblocked):
|
|
75
|
+
Epic #N — Title [status:in-progress]
|
|
76
|
+
Next up: #M — Title [executor:agent] [after #K ✓]
|
|
77
|
+
|
|
78
|
+
Independent (parallelizable):
|
|
79
|
+
#N — Title [type:bug] [executor:agent] [priority:p1] [no blockers]
|
|
80
|
+
#M — Title [type:feature] [executor:agent] [priority:p2] [no blockers]
|
|
81
|
+
#K — Title [type:refactor] [executor:agent] [priority:p2] [recommended after #N]
|
|
82
|
+
|
|
83
|
+
Waiting on Dependencies (hard blockers unsatisfied):
|
|
84
|
+
#N — Title [blocked by #M (open)]
|
|
85
|
+
|
|
86
|
+
Not Ready (run board-fill to triage):
|
|
87
|
+
#N — Title [missing: priority, area labels]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**ASK:** "Here are the open issues. Recommended next picks: [list]. What to pick up? (a) entire epic, (b) specific sub-issue, (c) standalone issue, (d) filter by label, (e) auto-pick, **(f) batch -- pick up multiple independent issues in parallel**."
|
|
91
|
+
|
|
92
|
+
When the user selects **(f) batch** or references multiple issue numbers (e.g., "pick up #1, #3, #7"):
|
|
93
|
+
|
|
94
|
+
1. Present all available independent issues (those with no mutual dependencies).
|
|
95
|
+
2. **ASK:** "Which issues to batch? (list numbers, or 'all available' for up to {max} independent issues)"
|
|
96
|
+
3. Validate that selected issues have no mutual dependencies. If dependencies exist, group into levels (see Step 6c.1).
|
|
97
|
+
4. Proceed with all selected issues as a **batch** through Steps 2-9.
|
|
98
|
+
|
|
99
|
+
#### 1e. Auto-Pick (No Specific Issue Referenced)
|
|
100
|
+
|
|
101
|
+
If the user invoked without referencing a specific issue, present an auto-pick. Skip if a specific issue was referenced.
|
|
102
|
+
|
|
103
|
+
**Selection criteria (in order):**
|
|
104
|
+
|
|
105
|
+
1. Available: `status:ready`, all blockers satisfied, not already `status:in-progress`.
|
|
106
|
+
2. `executor:agent` or `executor:hybrid` (skip `executor:human`).
|
|
107
|
+
3. Follow the board's Implementation Order (earliest open level, highest-priority entry, most downstream unblocking). Fall back to priority-weighted topological sort.
|
|
108
|
+
4. Tiebreaker: epic sub-issues > standalone; most downstream unblocking; higher priority.
|
|
109
|
+
|
|
110
|
+
**Auto-pick batch mode:** When multiple independent issues are available, auto-pick selects all independent issues that share no mutual dependencies (configurable via `--max-batch`). Present as a batch recommendation.
|
|
111
|
+
|
|
112
|
+
**ASK:** "Pick up #N? Or batch: #N, #M, #K (independent, parallelizable). Options: (yes single / yes batch / pick alternative / show full board)"
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### Step 2: Scope Selection & Dependency Validation
|
|
117
|
+
|
|
118
|
+
#### 2a. Dependency Pre-Check
|
|
119
|
+
|
|
120
|
+
Parse selected issue's `## Dependencies`. Check each blocker.
|
|
121
|
+
|
|
122
|
+
**If all satisfied or none:** Proceed.
|
|
123
|
+
|
|
124
|
+
**If unsatisfied:** **ASK** with options: (a) pick up highest-priority blocker instead, (b) proceed anyway, (c) pick different issue.
|
|
125
|
+
|
|
126
|
+
#### 2b. Readiness Pre-Check
|
|
127
|
+
|
|
128
|
+
If not `status:ready` or `status:in-progress`:
|
|
129
|
+
|
|
130
|
+
**ASK:** "(a) Proceed anyway, (b) run board-fill first, (c) pick a ready issue."
|
|
131
|
+
|
|
132
|
+
#### 2c. Scope Selection
|
|
133
|
+
|
|
134
|
+
**Epic selected:** Fetch sub-issues, show implementation order breakdown with status and dependencies. **ASK** which sub-issues to pick up.
|
|
135
|
+
|
|
136
|
+
**Sub-issue selected:** Show in context of parent epic.
|
|
137
|
+
|
|
138
|
+
**Standalone selected:** Proceed to collision check.
|
|
139
|
+
|
|
140
|
+
#### 2d. Parallel Work Suggestions
|
|
141
|
+
|
|
142
|
+
Note any parallelizable siblings or independent issues.
|
|
143
|
+
|
|
144
|
+
#### 2e. Batch Validation (Multi-Issue Pickup)
|
|
145
|
+
|
|
146
|
+
When multiple issues are selected as a batch:
|
|
147
|
+
|
|
148
|
+
1. Run dependency pre-check (2a) and readiness pre-check (2b) for **each** issue in the batch.
|
|
149
|
+
2. Build a cross-issue dependency graph among the selected issues:
|
|
150
|
+
- Issues with no mutual dependencies → same dependency level (can run in parallel).
|
|
151
|
+
- Issues where one depends on another → sequential levels (Level 1 before Level 2).
|
|
152
|
+
3. Remove any issues that fail validation (unsatisfied blockers, not ready) and inform the user.
|
|
153
|
+
4. Confirm the final batch composition and dependency levels before proceeding.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### Step 3: Collision Detection
|
|
158
|
+
|
|
159
|
+
1. **In-progress issues:** `search_issues` with `label:status:in-progress state:open`.
|
|
160
|
+
2. **Open PRs:** `search_pull_requests` with `state:open`.
|
|
161
|
+
3. **Overlap analysis:** Flag hard collisions (same problem/files), soft collisions (related work), or no collision.
|
|
162
|
+
4. **Intra-batch overlap (batch mode):** Check whether any issues within the batch are likely to touch the same files. If so, move conflicting issues to sequential dependency levels rather than parallel.
|
|
163
|
+
|
|
164
|
+
**If hard collision:** **ASK** with options: proceed / pick different / wait.
|
|
165
|
+
**If soft collision:** **ASK** to proceed with awareness.
|
|
166
|
+
**If none:** Proceed.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### Step 3b: Specification Generation (Optional)
|
|
171
|
+
|
|
172
|
+
When the picked issue lacks a detailed specification, generate one before implementation:
|
|
173
|
+
|
|
174
|
+
#### When to Generate
|
|
175
|
+
|
|
176
|
+
- Issue body has acceptance criteria but no implementation spec
|
|
177
|
+
- Issue is type `feature` or `refactor` (bugs typically don't need specs)
|
|
178
|
+
- Issue has complexity label `complex` or `epic`
|
|
179
|
+
|
|
180
|
+
#### Specification Generation Process
|
|
181
|
+
|
|
182
|
+
1. **Analyze the issue**: Parse title, body, labels, linked issues, and parent epic context.
|
|
183
|
+
2. **Research context**: Read relevant project documentation, existing code in the affected area, and related specs.
|
|
184
|
+
3. **Generate specification** with the following structure:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
## Specification: #{issue_number} — {title}
|
|
188
|
+
|
|
189
|
+
### Problem Statement
|
|
190
|
+
{what needs to change and why}
|
|
191
|
+
|
|
192
|
+
### Proposed Solution
|
|
193
|
+
{high-level approach}
|
|
194
|
+
|
|
195
|
+
### Technical Design
|
|
196
|
+
- **Data model changes**: {new/modified schemas}
|
|
197
|
+
- **API changes**: {new/modified endpoints}
|
|
198
|
+
- **UI changes**: {new/modified components}
|
|
199
|
+
- **Dependencies**: {new libraries or services}
|
|
200
|
+
|
|
201
|
+
### Implementation Plan
|
|
202
|
+
1. {ordered steps}
|
|
203
|
+
|
|
204
|
+
### Test Strategy
|
|
205
|
+
- Unit: {what to unit test}
|
|
206
|
+
- Integration: {what to integration test}
|
|
207
|
+
- E2E: {what to E2E test}
|
|
208
|
+
|
|
209
|
+
### Risks & Mitigations
|
|
210
|
+
- {risk}: {mitigation}
|
|
211
|
+
|
|
212
|
+
### Out of Scope
|
|
213
|
+
- {explicitly excluded items}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
4. **ASK:** Present the generated specification to the user for validation before proceeding to implementation.
|
|
217
|
+
5. **Store**: Save the validated spec as a comment on the GitHub issue for traceability.
|
|
218
|
+
|
|
219
|
+
#### Skip Specification
|
|
220
|
+
|
|
221
|
+
Skip this step when:
|
|
222
|
+
- Issue already has a linked spec document
|
|
223
|
+
- Issue is a simple bug fix with clear reproduction steps
|
|
224
|
+
- Issue has `skip-spec` label
|
|
225
|
+
- Auto-advance mode is active (see below)
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### Step 4: Update Issue Status
|
|
230
|
+
|
|
231
|
+
> Mark the issue(s) `in-progress` immediately after collision detection passes -- before creating a branch.
|
|
232
|
+
|
|
233
|
+
> When picking up any sub-issue, the **parent epic MUST also be marked `status:in-progress`**.
|
|
234
|
+
|
|
235
|
+
1. `issue_write` with `method: update` to replace `status:triage`/`status:ready` with `status:in-progress`.
|
|
236
|
+
2. Always mark parent epic as `status:in-progress`.
|
|
237
|
+
3. When picking up an entire epic: mark ALL remaining open sub-issues as `status:in-progress`.
|
|
238
|
+
4. **Batch mode:** Mark ALL issues in the batch as `status:in-progress`.
|
|
239
|
+
|
|
240
|
+
#### 4a. Sync Projects v2 Status
|
|
241
|
+
|
|
242
|
+
Follow the **Projects v2 Sync Procedure** from `hatch3r-board-shared` (gh CLI primary) for each issue marked `status:in-progress` (including parent epic). Set status to "In progress" using `board.statusOptions.inProgress`.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### Step 5: Branch Creation
|
|
247
|
+
|
|
248
|
+
1. Branch prefix from type label: `type:bug` → `fix/`, `type:feature` → `feat/`, `type:refactor` → `refactor/`, `type:qa` → `qa/`, default → `feat/`.
|
|
249
|
+
2. Short description from issue title: lowercase, hyphens, 3-5 words max.
|
|
250
|
+
3. Epic pickup: use epic title. Sub-issue pickup: use sub-issue title.
|
|
251
|
+
4. **Batch pickup:** Use `batch/{short-description}` where `{short-description}` summarizes the batch (e.g., `batch/ui-fixes-and-auth`). If all issues share the same type label, use that type prefix instead (e.g., `fix/batch-ui-bugs`). Single shared branch for the entire batch.
|
|
252
|
+
|
|
253
|
+
**ASK:** "Proposed branch name: `{type}/{short-description}`. Confirm or provide alternative."
|
|
254
|
+
|
|
255
|
+
**If branch exists:** **ASK** reuse / delete+recreate / rename with `-v2`.
|
|
256
|
+
|
|
257
|
+
**Normal path:** Use `{base}` = `board.defaultBranch` from `/.agents/hatch.json` (fallback: `"main"`).
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
git checkout {base} && git pull origin {base} && git checkout -b {branch-name}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### Step 6: Executor Check & Delegate Implementation
|
|
266
|
+
|
|
267
|
+
Check `executor:` label (for batch mode, check each issue):
|
|
268
|
+
|
|
269
|
+
- `executor:agent` -- Proceed autonomously.
|
|
270
|
+
- `executor:hybrid` -- **ASK** for human direction first.
|
|
271
|
+
- `executor:human` -- **ASK** if user wants agent assistance and which parts.
|
|
272
|
+
|
|
273
|
+
Use the issue type to select the appropriate hatch3r skill: `type:bug` → the hatch3r-bug-fix skill; `type:feature` → the hatch3r-feature-implementation skill; `type:refactor` → disambiguate by area/behavior (UI → hatch3r-visual-refactor, behavior changes → hatch3r-logical-refactor, otherwise → hatch3r-code-refactor); `type:qa` → the hatch3r-qa-validation skill.
|
|
274
|
+
|
|
275
|
+
**Delegation path selection:**
|
|
276
|
+
|
|
277
|
+
- **Single standalone issue** → Step 6a (one implementer sub-agent).
|
|
278
|
+
- **Epic with sub-issues** → Step 6b (one implementer per sub-issue).
|
|
279
|
+
- **Multiple standalone issues (batch)** → Step 6c (one implementer per issue, parallel).
|
|
280
|
+
|
|
281
|
+
#### 6.pre: Consult Learnings
|
|
282
|
+
|
|
283
|
+
Before delegating implementation:
|
|
284
|
+
|
|
285
|
+
1. If `/.agents/learnings/` exists, scan for learnings with matching `area` or `tags` that overlap with the issue's area labels or tech stack.
|
|
286
|
+
2. Read the `## Applies When` section of matching learnings.
|
|
287
|
+
3. Include any relevant learnings (especially `pitfall` category) in the sub-agent prompt or direct implementation context.
|
|
288
|
+
4. If no learnings directory exists, skip silently.
|
|
289
|
+
|
|
290
|
+
> **For audit epics:** If the selected epic represents an audit (e.g., healthcheck, security audit, dependency audit), customize this step based on the project's audit protocol. Audit epics typically produce GitHub issues as findings rather than code changes -- adjust the delegation flow accordingly and skip Steps 7-8a if no code changes are produced.
|
|
291
|
+
|
|
292
|
+
**Do NOT execute the skill's PR creation steps.** Testing and PR creation are handled by board-pickup Steps 7-8 below, which include board-specific requirements (epic linking, label transitions, Projects v2 sync) that individual skills do not cover.
|
|
293
|
+
|
|
294
|
+
**After all implementation completes, return here and continue with Step 7.**
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
#### 6a. Single Standalone Issue -- Subagent Delegation
|
|
299
|
+
|
|
300
|
+
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.
|
|
301
|
+
|
|
302
|
+
##### 6a.1. Context Gathering (Researcher Subagent)
|
|
303
|
+
|
|
304
|
+
**Skip this step only** for trivially simple issues (`risk:low` AND `priority:p3`).
|
|
305
|
+
|
|
306
|
+
Spawn a **hatch3r-researcher** sub-agent via the Task tool (`subagent_type: "generalPurpose"`) with:
|
|
307
|
+
|
|
308
|
+
- **Research brief:** The issue title, body, acceptance criteria, and area labels.
|
|
309
|
+
- **Modes by issue type:**
|
|
310
|
+
- `type:bug` → `symptom-trace`, `root-cause`, `codebase-impact`
|
|
311
|
+
- `type:feature` → `codebase-impact`, `feature-design`, `architecture`
|
|
312
|
+
- `type:refactor` → `current-state`, `refactoring-strategy`, `migration-path`
|
|
313
|
+
- `type:qa` → `codebase-impact`
|
|
314
|
+
- `type:docs` → `codebase-impact`
|
|
315
|
+
- `type:infra` → `codebase-impact`, `risk-assessment`
|
|
316
|
+
- **Depth:** `quick` for `risk:low`, `standard` for `risk:med`, `deep` for `risk:high`.
|
|
317
|
+
- **Project context:** Pre-loaded documentation references from area labels.
|
|
318
|
+
|
|
319
|
+
Await the researcher result. Use its structured output to inform Steps 6a.2-6a.3.
|
|
320
|
+
|
|
321
|
+
##### 6a.2. Core Implementation (Implementer Subagent)
|
|
322
|
+
|
|
323
|
+
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.
|
|
324
|
+
|
|
325
|
+
The implementer sub-agent prompt MUST include:
|
|
326
|
+
- The issue number, title, full body, and acceptance criteria.
|
|
327
|
+
- The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
|
|
328
|
+
- The researcher output from Step 6a.1 (if that step was not skipped).
|
|
329
|
+
- Documentation references relevant to this issue.
|
|
330
|
+
- Instruction to follow the **hatch3r-implementer agent protocol**.
|
|
331
|
+
- All `scope: always` rule directives from `/.agents/rules/` — subagents do not inherit rules automatically.
|
|
332
|
+
- Relevant learnings from `/.agents/learnings/` (from Step 6.pre).
|
|
333
|
+
- Explicit instruction: do NOT create branches, commits, or PRs.
|
|
334
|
+
|
|
335
|
+
Await the implementer sub-agent. Collect its structured result (files changed, tests written, issues encountered).
|
|
336
|
+
|
|
337
|
+
##### 6a.3. Post-Implementation Specialist Delegation
|
|
338
|
+
|
|
339
|
+
After implementation completes, spawn specialist sub-agents for quality assurance. Use the Task tool with `subagent_type: "generalPurpose"`. Launch as many independent sub-agents in parallel as the platform supports.
|
|
340
|
+
|
|
341
|
+
**Always spawn (mandatory for every code change):**
|
|
342
|
+
- **hatch3r-reviewer** — code review of all changes. Include the diff and acceptance criteria in the prompt.
|
|
343
|
+
- **hatch3r-test-writer** — tests for all code changes. Unit tests for new logic, regression tests for bug fixes, integration tests for cross-module changes.
|
|
344
|
+
- **hatch3r-security-auditor** — security review of all code changes. Audit data flows, access control, input validation, and secret management.
|
|
345
|
+
|
|
346
|
+
**Always evaluate (spawn when applicable):**
|
|
347
|
+
- **hatch3r-docs-writer** — spawn when changes affect public APIs, architectural patterns, or user-facing behavior. Skip silently if no documentation impact.
|
|
348
|
+
|
|
349
|
+
**Conditional specialists (spawn when triggered):**
|
|
350
|
+
- **hatch3r-lint-fixer** — spawn when lint errors are present after implementation.
|
|
351
|
+
- **hatch3r-a11y-auditor** — spawn when issue has `area:ui` or `area:a11y` labels.
|
|
352
|
+
- **hatch3r-perf-profiler** — spawn when issue has `area:performance` label or changes touch hot paths.
|
|
353
|
+
|
|
354
|
+
Each specialist sub-agent prompt MUST include:
|
|
355
|
+
- The agent protocol to follow (e.g., "Follow the hatch3r-reviewer agent protocol").
|
|
356
|
+
- All `scope: always` rule directives from `/.agents/rules/` (subagents do not inherit rules automatically).
|
|
357
|
+
- The diff or file changes to review.
|
|
358
|
+
- The issue's acceptance criteria.
|
|
359
|
+
|
|
360
|
+
Await all specialist sub-agents. Apply their feedback (fixes, additional tests, documentation updates) before proceeding to Step 7.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
#### 6b. Epics -- Sub-Agent Delegation (One Implementer Per Sub-Issue)
|
|
365
|
+
|
|
366
|
+
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.
|
|
367
|
+
|
|
368
|
+
##### 6b.1. Parse Sub-Issues Into Dependency Levels
|
|
369
|
+
|
|
370
|
+
1. Fetch the epic's `## Implementation Order` section.
|
|
371
|
+
2. Group sub-issues by dependency level:
|
|
372
|
+
- **Level 1:** Sub-issues with no unsatisfied blockers (can start immediately).
|
|
373
|
+
- **Level N:** Sub-issues whose blockers are all in levels < N.
|
|
374
|
+
3. Within each level, identify parallelizable sub-issues (no mutual dependencies).
|
|
375
|
+
|
|
376
|
+
##### 6b.2. Prepare Shared Context
|
|
377
|
+
|
|
378
|
+
Before spawning implementer sub-agents, delegate context gathering to the **hatch3r-researcher agent protocol**.
|
|
379
|
+
|
|
380
|
+
1. Read the epic body (goal, scope, constraints).
|
|
381
|
+
2. Spawn a researcher sub-agent following the **hatch3r-researcher agent protocol** with:
|
|
382
|
+
- **Research brief:** The epic title, goal, scope, constraints, and area labels.
|
|
383
|
+
- **Modes:** `codebase-impact`, `risk-assessment`
|
|
384
|
+
- **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.
|
|
385
|
+
- **Project context:** Pre-loaded documentation references from area labels.
|
|
386
|
+
3. Await the researcher result. Include the structured output as shared context in all implementer sub-agent prompts in Step 6b.3.
|
|
387
|
+
|
|
388
|
+
##### 6b.3. Execute Level-by-Level With Parallel Sub-Agents
|
|
389
|
+
|
|
390
|
+
For each dependency level, starting at Level 1:
|
|
391
|
+
|
|
392
|
+
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.
|
|
393
|
+
|
|
394
|
+
2. **Each sub-agent prompt must include:**
|
|
395
|
+
- The sub-issue number, title, full body, and acceptance criteria.
|
|
396
|
+
- The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
|
|
397
|
+
- Parent epic context (title, goal, related sub-issues at the same level).
|
|
398
|
+
- The researcher output from Step 6b.2 (codebase impact and risk assessment as shared context).
|
|
399
|
+
- Documentation references relevant to this sub-issue.
|
|
400
|
+
- Instruction to follow the hatch3r-implementer agent protocol.
|
|
401
|
+
- All `scope: always` rule directives from `/.agents/rules/` — subagents do not inherit rules automatically.
|
|
402
|
+
- Relevant learnings from `/.agents/learnings/` (from Step 6.pre).
|
|
403
|
+
- Instruction to use GitHub MCP for issue reads, and follow the project's tooling hierarchy for external knowledge augmentation.
|
|
404
|
+
- Explicit instruction: do NOT create branches, commits, or PRs.
|
|
405
|
+
|
|
406
|
+
3. **Await all sub-agents in the current level.** Collect their structured results (files changed, tests written, issues encountered).
|
|
407
|
+
|
|
408
|
+
4. **Review sub-agent results:**
|
|
409
|
+
- If any sub-agent reports BLOCKED or PARTIAL, **ASK** the user how to proceed (skip, fix manually, retry).
|
|
410
|
+
- If sub-agents modified overlapping files, review for conflicts and resolve before proceeding.
|
|
411
|
+
|
|
412
|
+
5. **Advance to the next dependency level.** Repeat steps 1-4 until all levels are complete.
|
|
413
|
+
|
|
414
|
+
##### 6b.4. Post-Delegation Verification
|
|
415
|
+
|
|
416
|
+
After all sub-agents complete:
|
|
417
|
+
|
|
418
|
+
1. Run a combined quality check across all changes.
|
|
419
|
+
2. Resolve any cross-sub-issue integration issues.
|
|
420
|
+
3. Verify no file conflicts between parallel sub-agent outputs.
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
#### 6c. Multi-Issue Batch -- Parallel Subagent Delegation (One Implementer Per Issue)
|
|
425
|
+
|
|
426
|
+
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.
|
|
427
|
+
|
|
428
|
+
##### 6c.1. Group Issues Into Dependency Levels
|
|
429
|
+
|
|
430
|
+
1. Use the updated cross-issue dependency graph (from Step 2e, adjusted by Step 3.4).
|
|
431
|
+
2. Group issues by dependency level:
|
|
432
|
+
- **Level 1:** Issues with no dependencies on other issues in the batch (can start immediately). Most standalone issues will be Level 1.
|
|
433
|
+
- **Level N:** Issues that depend on other issues in levels < N.
|
|
434
|
+
3. Within each level, all issues are parallelizable (no mutual dependencies — conflicts were moved to separate levels in Step 3).
|
|
435
|
+
|
|
436
|
+
##### 6c.2. Context Gathering (Parallel Researchers)
|
|
437
|
+
|
|
438
|
+
**Skip this step only** if ALL issues in the batch are trivially simple (`risk:low` AND `priority:p3`).
|
|
439
|
+
|
|
440
|
+
Unlike epics (which share a single researcher), standalone issues in a batch are unrelated and each need individual context gathering.
|
|
441
|
+
|
|
442
|
+
1. **Spawn one hatch3r-researcher sub-agent per issue** via the Task tool (`subagent_type: "generalPurpose"`). Launch as many concurrently as the platform supports.
|
|
443
|
+
|
|
444
|
+
2. **Each researcher prompt must include:**
|
|
445
|
+
- The issue title, body, acceptance criteria, and area labels.
|
|
446
|
+
- Research modes by issue type (same as Step 6a.1).
|
|
447
|
+
- Depth by risk level (`quick` / `standard` / `deep`).
|
|
448
|
+
- Project context and documentation references.
|
|
449
|
+
|
|
450
|
+
3. **Await all researchers.** Collect structured outputs. Each researcher's output feeds exclusively into its corresponding implementer in Step 6c.3.
|
|
451
|
+
|
|
452
|
+
##### 6c.3. Execute Level-by-Level With Parallel Implementers
|
|
453
|
+
|
|
454
|
+
For each dependency level, starting at Level 1:
|
|
455
|
+
|
|
456
|
+
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.
|
|
457
|
+
|
|
458
|
+
2. **Each sub-agent prompt must include:**
|
|
459
|
+
- The issue number, title, full body, and acceptance criteria.
|
|
460
|
+
- The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
|
|
461
|
+
- Batch context: sibling issues in the batch at the same level (for awareness, not implementation).
|
|
462
|
+
- The researcher output from Step 6c.2 for this specific issue (if that step was not skipped).
|
|
463
|
+
- Documentation references relevant to this issue.
|
|
464
|
+
- Instruction to follow the **hatch3r-implementer agent protocol**.
|
|
465
|
+
- All `scope: always` rule directives from `/.agents/rules/` — subagents do not inherit rules automatically.
|
|
466
|
+
- Relevant learnings from `/.agents/learnings/` (from Step 6.pre).
|
|
467
|
+
- Explicit instruction: do NOT create branches, commits, or PRs.
|
|
468
|
+
|
|
469
|
+
3. **Await all sub-agents in the current level.** Collect their structured results (files changed, tests written, issues encountered).
|
|
470
|
+
|
|
471
|
+
4. **Review sub-agent results:**
|
|
472
|
+
- If any sub-agent reports BLOCKED or PARTIAL, **ASK** the user how to proceed (skip, fix manually, retry).
|
|
473
|
+
- If sub-agents modified overlapping files, review for conflicts and resolve before proceeding.
|
|
474
|
+
|
|
475
|
+
5. **Advance to the next dependency level.** Repeat steps 1-4 until all levels are complete.
|
|
476
|
+
|
|
477
|
+
##### 6c.4. Post-Batch Verification
|
|
478
|
+
|
|
479
|
+
After all implementer sub-agents complete across all levels:
|
|
480
|
+
|
|
481
|
+
1. Run a combined quality check across all changes from all issues.
|
|
482
|
+
2. Resolve any cross-issue file conflicts or integration issues.
|
|
483
|
+
3. Verify no regressions between parallel sub-agent outputs.
|
|
484
|
+
|
|
485
|
+
##### 6c.5. Post-Implementation Specialist Delegation
|
|
486
|
+
|
|
487
|
+
After all implementations complete, spawn specialist sub-agents across the entire batch. Use the Task tool with `subagent_type: "generalPurpose"`. Launch as many independent sub-agents in parallel as the platform supports.
|
|
488
|
+
|
|
489
|
+
**Always spawn (mandatory for every code change):**
|
|
490
|
+
- **hatch3r-reviewer** — code review of ALL changes across the batch. Include the full diff and acceptance criteria for each issue.
|
|
491
|
+
- **hatch3r-test-writer** — tests for all code changes across the batch.
|
|
492
|
+
- **hatch3r-security-auditor** — security review of all code changes across the batch.
|
|
493
|
+
|
|
494
|
+
**Always evaluate (spawn when applicable):**
|
|
495
|
+
- **hatch3r-docs-writer** — spawn when any changes affect public APIs, architectural patterns, or user-facing behavior.
|
|
496
|
+
|
|
497
|
+
**Conditional specialists (spawn when triggered by any issue in the batch):**
|
|
498
|
+
- **hatch3r-lint-fixer** — spawn when lint errors are present after implementation.
|
|
499
|
+
- **hatch3r-a11y-auditor** — spawn when any issue has `area:ui` or `area:a11y` labels.
|
|
500
|
+
- **hatch3r-perf-profiler** — spawn when any issue has `area:performance` label.
|
|
501
|
+
|
|
502
|
+
Await all specialist sub-agents. Apply their feedback before proceeding to Step 7.
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
### Step 7: Quality Verification
|
|
507
|
+
|
|
508
|
+
Run the project's quality checks (linting, type checking, tests). Refer to the project's `AGENTS.md`, `README.md`, or `package.json` scripts for the appropriate commands.
|
|
509
|
+
|
|
510
|
+
Verify: all AC met, tests passing, no lint errors, dead code removed, project-specific invariants respected.
|
|
511
|
+
|
|
512
|
+
---
|
|
513
|
+
|
|
514
|
+
### Step 7a: Commit & Push
|
|
515
|
+
|
|
516
|
+
Stage, commit, and push all changes so the branch exists on the remote before PR creation.
|
|
517
|
+
|
|
518
|
+
**Single issue or epic:**
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
git add -A
|
|
522
|
+
git commit -m "{type}: {short description} (#{issue})"
|
|
523
|
+
git push -u origin {branch-name}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
- Use the branch type prefix (`feat`, `fix`, `refactor`, `qa`) matching the branch name.
|
|
527
|
+
- Reference the issue number in the commit message.
|
|
528
|
+
- If `git push` fails (e.g., branch already exists on remote), use `git push` without `-u`.
|
|
529
|
+
|
|
530
|
+
**Batch mode:** Create one commit covering all issues in the batch.
|
|
531
|
+
|
|
532
|
+
```bash
|
|
533
|
+
git add -A
|
|
534
|
+
git commit -m "batch: {short description} (#N, #M, #K)"
|
|
535
|
+
git push -u origin {branch-name}
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
- List all issue numbers in the commit message.
|
|
539
|
+
- If all issues share a type, use that type prefix instead of `batch`.
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
### Step 8: Create Pull Request
|
|
544
|
+
|
|
545
|
+
Follow the project's PR creation skill or conventions:
|
|
546
|
+
|
|
547
|
+
1. **Title:** `{type}: {short description} (#issue)` — for batch mode: `batch: {short description} (#N, #M, #K)`.
|
|
548
|
+
2. **Determine epic link type:** If working on an epic's sub-issues, check whether ALL sub-issues of the parent epic are addressed by this PR (listed as `Closes #N`) or are already closed. If yes → use `Closes #<epic-number>` so the epic auto-closes on merge. If some sub-issues remain open and unaddressed → use `Relates to #<epic-number>`.
|
|
549
|
+
3. **Body:** Use the repository's PR template if available (`.github/PULL_REQUEST_TEMPLATE.md`). Fill: Summary, Type, Changes, Testing, Rollout plan. Include a **Related Issues** section listing:
|
|
550
|
+
- `Closes #N` for each issue addressed by this PR (including all batch issues).
|
|
551
|
+
- `Closes #<epic>` (all sub-issues addressed) OR `Relates to #<epic>` (partial) for the parent epic.
|
|
552
|
+
- Always list both the epic and all sub-issues in the Related Issues section regardless of partial/full completion.
|
|
553
|
+
- **Batch mode:** List `Closes #N` for every issue in the batch. Include a per-issue summary of changes in the body.
|
|
554
|
+
4. **Create:** Use `gh pr create` (primary) with `--head {branch}`, `--base {base}`, `--title`, `--body`; fall back to `create_pull_request` if `gh` CLI unavailable. `{base}` = `board.defaultBranch` from `/.agents/hatch.json` (fallback: `"main"`).
|
|
555
|
+
5. **Link PR to epic:** Use `gh issue comment` (primary) on the epic with PR reference; fall back to `add_issue_comment` if `gh` CLI unavailable.
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
### Step 8a: Post-PR Label Transition & Project Board Sync
|
|
560
|
+
|
|
561
|
+
1. **Transition labels to `status:in-review`:** For each `Closes #N` issue (including all batch issues), remove `status:in-progress`, add `status:in-review`. If ALL sub-issues addressed, also transition the parent epic.
|
|
562
|
+
|
|
563
|
+
2. **Sync Projects v2:** Run the full **Projects v2 Sync Procedure** from `hatch3r-board-shared` (add + capture `item_id` + update status) for **each** of the following items individually:
|
|
564
|
+
- **a. The PR:** `item_type: pull_request`, `pull_request_number: <N>` → set to "In review" using `board.statusOptions.inReview`.
|
|
565
|
+
- **b. Each `Closes #N` issue:** `item_type: issue`, `issue_number: <N>` → set to "In review" using `board.statusOptions.inReview`. In batch mode, this includes every issue in the batch.
|
|
566
|
+
- **c. Parent epic (all sub-issues addressed):** `item_type: issue`, `issue_number: <epic>` → set to "In review" using `board.statusOptions.inReview`. The PR body uses `Closes #<epic>`, so the epic will auto-close on merge and transition to Done.
|
|
567
|
+
- **d. Parent epic (partial -- some sub-issues remain):** `item_type: issue`, `issue_number: <epic>` → verify status is "In progress" using `board.statusOptions.inProgress`; set it if not. The PR body uses `Relates to #<epic>` (epic stays open after merge).
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
### Step 9: Post-PR Housekeeping
|
|
572
|
+
|
|
573
|
+
1. If all sub-issues addressed, confirm the PR body uses `Closes #<epic-number>` so the epic will auto-close on merge and transition to Done.
|
|
574
|
+
2. Remind user `Closes #N` auto-closes on merge.
|
|
575
|
+
3. If partial:
|
|
576
|
+
|
|
577
|
+
**ASK:** "PR created. N remaining sub-issues on epic #X. Continue with next sub-issue or stop?"
|
|
578
|
+
|
|
579
|
+
#### 9a. Refresh Board Dashboard
|
|
580
|
+
|
|
581
|
+
**This step is mandatory. Do not skip.**
|
|
582
|
+
|
|
583
|
+
If a `meta:board-overview` issue exists on the board, refresh it now using cached board data updated with mutations from Steps 4, 8, and 8a. Include the `Recommended Model` column in all issue listings per the Board Overview section in `hatch3r-board-shared`. Do NOT re-fetch all issues; use cached data. Skip silently if no `meta:board-overview` issue exists.
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
### Step 10: Capture Learnings
|
|
588
|
+
|
|
589
|
+
After PR creation, capture learnings from this development session.
|
|
590
|
+
|
|
591
|
+
1. Reflect on the implementation:
|
|
592
|
+
- Were there any unexpected challenges or blockers?
|
|
593
|
+
- Did any patterns or approaches work particularly well?
|
|
594
|
+
- Were there decisions made that future developers should know about?
|
|
595
|
+
- Were any pitfalls discovered that should be avoided next time?
|
|
596
|
+
|
|
597
|
+
2. If learnings are identified:
|
|
598
|
+
- Create learning files in `/.agents/learnings/` following the learning file format (see `hatch3r-learn` command).
|
|
599
|
+
- Include the issue number as `source-issue`.
|
|
600
|
+
- Tag with relevant area labels from the issue.
|
|
601
|
+
- **ASK:** "Learnings captured: {list}. Anything else to note? (add more / done)"
|
|
602
|
+
|
|
603
|
+
3. If no significant learnings: skip silently. Not every task produces learnings. Do not prompt in this case.
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
## Auto-Advance Mode
|
|
608
|
+
|
|
609
|
+
When invoked with `--auto` or `--unattended`, the board pickup operates with reduced human checkpoints for sustained autonomous operation.
|
|
610
|
+
|
|
611
|
+
### Behavior Changes in Auto Mode
|
|
612
|
+
|
|
613
|
+
| Checkpoint | Normal Mode | Auto Mode |
|
|
614
|
+
|-----------|-------------|-----------|
|
|
615
|
+
| Issue selection | ASK user to confirm | Auto-select highest priority ready issue(s); **auto-batch** independent issues up to `--max-batch` (default 4) |
|
|
616
|
+
| Specification generation | ASK user to validate | Auto-generate and attach, skip validation |
|
|
617
|
+
| Implementation plan | ASK user to review | Auto-proceed with plan |
|
|
618
|
+
| PR creation | ASK user to confirm | Auto-create PR |
|
|
619
|
+
| Review feedback | Wait for human review | Proceed to next issue/batch |
|
|
620
|
+
|
|
621
|
+
In auto mode, batch pickup is the default when multiple independent issues are available. The system auto-selects up to `--max-batch` independent issues and processes them in parallel via Step 6c.
|
|
622
|
+
|
|
623
|
+
### Safety Guardrails (Always Active)
|
|
624
|
+
|
|
625
|
+
These checkpoints are NEVER skipped, even in auto mode:
|
|
626
|
+
- **Destructive operations**: Database migrations, file deletions, security rule changes always require confirmation
|
|
627
|
+
- **Breaking changes**: API contract changes, public interface modifications always require confirmation
|
|
628
|
+
- **Cost thresholds**: Stop if estimated token cost exceeds configured limit (default: $10 per issue)
|
|
629
|
+
- **Error threshold**: Stop after 3 consecutive implementation failures
|
|
630
|
+
- **Scope limits**: Maximum 10 issues per auto session (configurable)
|
|
631
|
+
|
|
632
|
+
### Activation
|
|
633
|
+
|
|
634
|
+
```
|
|
635
|
+
/hatch3r board-pickup --auto
|
|
636
|
+
/hatch3r board-pickup --auto --max-issues=5 --cost-limit=20
|
|
637
|
+
/hatch3r board-pickup --auto --max-batch=4
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
### Session Report
|
|
641
|
+
|
|
642
|
+
At the end of an auto session, generate a summary:
|
|
643
|
+
- Issues completed: {count}
|
|
644
|
+
- Issues batched: {count per batch}
|
|
645
|
+
- PRs created: {list}
|
|
646
|
+
- Issues blocked: {list with reasons}
|
|
647
|
+
- Total estimated cost: {tokens/cost}
|
|
648
|
+
- Learnings captured: {count}
|
|
649
|
+
|
|
650
|
+
---
|
|
651
|
+
|
|
652
|
+
## Error Handling
|
|
653
|
+
|
|
654
|
+
- `list_issues`/`search_issues` failure: retry once, then ask user for issue number.
|
|
655
|
+
- `issue_write` failure: warn and continue (labels not blocking).
|
|
656
|
+
- Quality verification failure: fix before creating PR.
|
|
657
|
+
- `create_pull_request` failure: present error and manual instructions.
|
|
658
|
+
|
|
659
|
+
## Guardrails
|
|
660
|
+
|
|
661
|
+
- **Never skip collision check** (Step 3).
|
|
662
|
+
- **Never skip ASK checkpoints.**
|
|
663
|
+
- **Always work on a dedicated branch.** Never commit to the default branch.
|
|
664
|
+
- **Stay within scope.** Note related work but do not implement it.
|
|
665
|
+
- **One PR per pickup session.** A single issue, epic, or batch produces one PR. Split large epics into multiple PRs.
|
|
666
|
+
- **One sub-agent per issue.** Every issue MUST be delegated to its own `hatch3r-implementer` sub-agent -- never implement multiple issues inline. This applies to standalone issues (6a), epic sub-issues (6b), and batch issues (6c).
|
|
667
|
+
- **Maximize parallelism.** Launch as many independent sub-agents concurrently as the platform supports. Only serialize when dependency order or file conflicts require it.
|
|
668
|
+
- **Respect the issue-type skill** as source of truth for implementation.
|
|
669
|
+
- **Respect dependency and implementation order.** Warn and suggest blockers.
|
|
670
|
+
- **Prefer `status:ready` issues.** Warn if selecting non-ready.
|
|
671
|
+
- **Board Overview is auto-maintained.** Exclude from all analysis.
|
|
672
|
+
- **Always create a PR.** Every board-pickup session MUST end with a PR (Steps 7a-8) unless explicitly abandoned by the user or the epic is an audit that produces no code changes. If quality checks fail in Step 7, fix the issues and re-run Step 7 -- do not exit without completing Steps 7a, 8, 8a, and 9.
|