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.
Files changed (146) hide show
  1. package/README.md +109 -364
  2. package/agents/hatch3r-a11y-auditor.md +8 -8
  3. package/agents/hatch3r-architect.md +2 -4
  4. package/agents/hatch3r-ci-watcher.md +2 -4
  5. package/agents/hatch3r-context-rules.md +2 -4
  6. package/agents/hatch3r-dependency-auditor.md +5 -7
  7. package/agents/hatch3r-devops.md +2 -4
  8. package/agents/hatch3r-docs-writer.md +2 -4
  9. package/agents/hatch3r-fixer.md +2 -0
  10. package/agents/hatch3r-implementer.md +32 -0
  11. package/agents/hatch3r-learnings-loader.md +189 -13
  12. package/agents/hatch3r-lint-fixer.md +3 -14
  13. package/agents/hatch3r-perf-profiler.md +2 -4
  14. package/agents/hatch3r-researcher.md +247 -0
  15. package/agents/hatch3r-reviewer.md +76 -7
  16. package/agents/hatch3r-security-auditor.md +4 -7
  17. package/agents/hatch3r-test-writer.md +3 -11
  18. package/agents/modes/architecture.md +44 -0
  19. package/agents/modes/boundary-analysis.md +45 -0
  20. package/agents/modes/codebase-impact.md +81 -0
  21. package/agents/modes/complexity-risk.md +40 -0
  22. package/agents/modes/coverage-analysis.md +44 -0
  23. package/agents/modes/current-state.md +52 -0
  24. package/agents/modes/feature-design.md +39 -0
  25. package/agents/modes/impact-analysis.md +45 -0
  26. package/agents/modes/library-docs.md +31 -0
  27. package/agents/modes/migration-path.md +55 -0
  28. package/agents/modes/prior-art.md +31 -0
  29. package/agents/modes/refactoring-strategy.md +55 -0
  30. package/agents/modes/regression.md +45 -0
  31. package/agents/modes/requirements-elicitation.md +68 -0
  32. package/agents/modes/risk-assessment.md +41 -0
  33. package/agents/modes/risk-prioritization.md +43 -0
  34. package/agents/modes/root-cause.md +39 -0
  35. package/agents/modes/similar-implementation.md +70 -0
  36. package/agents/modes/symptom-trace.md +39 -0
  37. package/agents/modes/test-pattern.md +61 -0
  38. package/agents/shared/external-knowledge.md +11 -0
  39. package/commands/board/pickup-azure-devops.md +81 -0
  40. package/commands/board/pickup-delegation-multi.md +197 -0
  41. package/commands/board/pickup-delegation.md +100 -0
  42. package/commands/board/pickup-github.md +82 -0
  43. package/commands/board/pickup-gitlab.md +81 -0
  44. package/commands/board/pickup-modes.md +143 -0
  45. package/commands/board/pickup-post-impl.md +120 -0
  46. package/commands/board/shared-azure-devops.md +149 -0
  47. package/commands/board/shared-board-overview.md +215 -0
  48. package/commands/board/shared-github.md +169 -0
  49. package/commands/board/shared-gitlab.md +142 -0
  50. package/commands/hatch3r-agent-customize.md +3 -2
  51. package/commands/hatch3r-api-spec.md +1 -0
  52. package/commands/hatch3r-benchmark.md +1 -0
  53. package/commands/hatch3r-board-fill.md +15 -16
  54. package/commands/hatch3r-board-groom.md +50 -10
  55. package/commands/hatch3r-board-init.md +1 -0
  56. package/commands/hatch3r-board-pickup.md +44 -572
  57. package/commands/hatch3r-board-refresh.md +31 -10
  58. package/commands/hatch3r-board-shared.md +87 -439
  59. package/commands/hatch3r-bug-plan.md +1 -0
  60. package/commands/hatch3r-codebase-map.md +1 -0
  61. package/commands/hatch3r-command-customize.md +1 -0
  62. package/commands/hatch3r-context-health.md +23 -2
  63. package/commands/hatch3r-cost-tracking.md +15 -0
  64. package/commands/hatch3r-debug.md +1 -0
  65. package/commands/hatch3r-dep-audit.md +2 -1
  66. package/commands/hatch3r-feature-plan.md +1 -0
  67. package/commands/hatch3r-healthcheck.md +2 -1
  68. package/commands/hatch3r-hooks.md +1 -0
  69. package/commands/hatch3r-learn.md +69 -2
  70. package/commands/hatch3r-migration-plan.md +1 -0
  71. package/commands/hatch3r-onboard.md +1 -0
  72. package/commands/hatch3r-project-spec.md +1 -0
  73. package/commands/hatch3r-quick-change.md +1 -0
  74. package/commands/hatch3r-recipe.md +1 -0
  75. package/commands/hatch3r-refactor-plan.md +1 -0
  76. package/commands/hatch3r-release.md +2 -1
  77. package/commands/hatch3r-revision.md +1 -0
  78. package/commands/hatch3r-roadmap.md +8 -1
  79. package/commands/hatch3r-rule-customize.md +1 -0
  80. package/commands/hatch3r-security-audit.md +2 -1
  81. package/commands/hatch3r-skill-customize.md +1 -0
  82. package/commands/hatch3r-test-plan.md +532 -0
  83. package/commands/hatch3r-workflow.md +1 -0
  84. package/dist/cli/index.js +4735 -1426
  85. package/dist/cli/index.js.map +1 -1
  86. package/github-agents/hatch3r-docs-agent.md +1 -0
  87. package/github-agents/hatch3r-lint-agent.md +1 -0
  88. package/github-agents/hatch3r-security-agent.md +1 -0
  89. package/github-agents/hatch3r-test-agent.md +1 -0
  90. package/hooks/hatch3r-ci-failure.md +1 -0
  91. package/hooks/hatch3r-file-save.md +1 -0
  92. package/hooks/hatch3r-post-merge.md +1 -0
  93. package/hooks/hatch3r-pre-commit.md +1 -0
  94. package/hooks/hatch3r-pre-push.md +1 -0
  95. package/hooks/hatch3r-session-start.md +1 -0
  96. package/package.json +2 -2
  97. package/prompts/hatch3r-bug-triage.md +1 -0
  98. package/prompts/hatch3r-code-review.md +1 -0
  99. package/prompts/hatch3r-pr-description.md +1 -0
  100. package/rules/hatch3r-accessibility-standards.md +1 -0
  101. package/rules/hatch3r-agent-orchestration.md +289 -73
  102. package/rules/hatch3r-api-design.md +1 -0
  103. package/rules/hatch3r-browser-verification.md +1 -0
  104. package/rules/hatch3r-ci-cd.md +1 -0
  105. package/rules/hatch3r-code-standards.md +9 -0
  106. package/rules/hatch3r-component-conventions.md +1 -0
  107. package/rules/hatch3r-data-classification.md +1 -0
  108. package/rules/hatch3r-deep-context.md +1 -0
  109. package/rules/hatch3r-dependency-management.md +13 -0
  110. package/rules/hatch3r-feature-flags.md +1 -0
  111. package/rules/hatch3r-git-conventions.md +1 -0
  112. package/rules/hatch3r-i18n.md +1 -0
  113. package/rules/hatch3r-learning-consult.md +1 -0
  114. package/rules/hatch3r-migrations.md +12 -0
  115. package/rules/hatch3r-observability.md +290 -0
  116. package/rules/hatch3r-performance-budgets.md +1 -0
  117. package/rules/hatch3r-secrets-management.md +1 -0
  118. package/rules/hatch3r-security-patterns.md +12 -0
  119. package/rules/hatch3r-testing.md +1 -0
  120. package/rules/hatch3r-theming.md +1 -0
  121. package/rules/hatch3r-tooling-hierarchy.md +1 -0
  122. package/skills/hatch3r-a11y-audit/SKILL.md +1 -0
  123. package/skills/hatch3r-agent-customize/SKILL.md +1 -0
  124. package/skills/hatch3r-api-spec/SKILL.md +1 -0
  125. package/skills/hatch3r-architecture-review/SKILL.md +1 -0
  126. package/skills/hatch3r-bug-fix/SKILL.md +1 -0
  127. package/skills/hatch3r-ci-pipeline/SKILL.md +1 -0
  128. package/skills/hatch3r-command-customize/SKILL.md +1 -0
  129. package/skills/hatch3r-context-health/SKILL.md +1 -0
  130. package/skills/hatch3r-cost-tracking/SKILL.md +1 -0
  131. package/skills/hatch3r-dep-audit/SKILL.md +2 -1
  132. package/skills/hatch3r-feature/SKILL.md +1 -0
  133. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +1 -0
  134. package/skills/hatch3r-incident-response/SKILL.md +1 -0
  135. package/skills/hatch3r-issue-workflow/SKILL.md +1 -0
  136. package/skills/hatch3r-logical-refactor/SKILL.md +1 -0
  137. package/skills/hatch3r-migration/SKILL.md +1 -0
  138. package/skills/hatch3r-perf-audit/SKILL.md +1 -0
  139. package/skills/hatch3r-pr-creation/SKILL.md +1 -0
  140. package/skills/hatch3r-qa-validation/SKILL.md +1 -0
  141. package/skills/hatch3r-recipe/SKILL.md +1 -0
  142. package/skills/hatch3r-refactor/SKILL.md +1 -0
  143. package/skills/hatch3r-release/SKILL.md +1 -0
  144. package/skills/hatch3r-rule-customize/SKILL.md +1 -0
  145. package/skills/hatch3r-skill-customize/SKILL.md +1 -0
  146. package/skills/hatch3r-visual-refactor/SKILL.md +1 -0
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  id: hatch3r-board-pickup
3
3
  type: command
4
- description: Pick up one or more epics/issues from the project board for development. Handles dependency-aware selection, collision detection, branching, parallel sub-agent delegation, and batch execution. Supports GitHub, Azure DevOps, and GitLab.
4
+ description: Pick up one or more epics/issues from the project board for development. Handles dependency-aware selection, collision detection, branching, parallel sub-agent delegation, and batch execution. Supports GitHub, Azure DevOps, and GitLab. Platform-specific details are in commands/board/pickup-{platform}.md.
5
+ tags: [board, team]
5
6
  ---
6
7
  # Board Pickup -- Develop Issues from the Project Board
7
8
 
@@ -35,14 +36,7 @@ If **no**: all browser verification steps are skipped silently throughout the en
35
36
 
36
37
  ## Integration with GitHub Agentic Workflows
37
38
 
38
- 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:
39
-
40
- - **board-init** sets up the project management structure that agentic workflows operate within
41
- - **board-fill** creates the work items that agentic workflows can triage and label
42
- - **board-groom** refines existing work items as priorities, scope, and dependencies evolve over time
43
- - **board-pickup** orchestrates the implementation -> review -> merge pipeline that goes beyond what generic agentic workflows provide
44
-
45
- GitHub Agentic Workflows and hatch3r are complementary: use agentic workflows for continuous background automation, use hatch3r board commands for structured delivery orchestration.
39
+ hatch3r board commands orchestrate the **implementation delivery pipeline** (init → fill → groom → pickup → PR) above GitHub Agentic Workflows, which handle continuous background automation (triage, testing, docs). The two are complementary.
46
40
 
47
41
  ---
48
42
 
@@ -70,29 +64,18 @@ Execute these steps in order. **Do not skip any step.** Ask the user at every ch
70
64
 
71
65
  #### 1a. Fetch and Parse Board State
72
66
 
73
- **Platform-specific: Fetch all open items**
74
-
75
- **If platform is `github`:**
76
- 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.
77
-
78
- **If platform is `azure-devops`:**
79
- 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).
80
-
81
- **If platform is `gitlab`:**
82
- 1. `glab issue list -R {namespace}/{project} --state opened --per-page 100`. Paginate to get all.
67
+ > Platform-specific details: see `commands/board/pickup-github.md` (Step 1a)
68
+ > Platform-specific details: see `commands/board/pickup-azure-devops.md` (Step 1a)
69
+ > Platform-specific details: see `commands/board/pickup-gitlab.md` (Step 1a)
83
70
 
84
71
  **Exclude** `meta:board-overview` issues/work items.
85
72
 
86
- 2. For each issue, check sub-issues:
87
- - **GitHub:** `issue_read` with `method: get_sub_issues`.
88
- - **Azure DevOps:** `az boards work-item relation list --id N`.
89
- - **GitLab:** `glab api projects/{project_id}/issues/{N}/links`.
90
- 3. Fetch labels/tags:
91
- - **GitHub:** `issue_read` with `method: get_labels`.
92
- - **Azure DevOps:** Extract from `System.Tags` field.
93
- - **GitLab:** Extract from issue data.
94
- 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).
95
- 5. For epics, parse `## Implementation Order` sections.
73
+ After fetching open items using the platform CLI:
74
+
75
+ 1. For each issue, check sub-issues using the platform-specific method.
76
+ 2. Fetch labels/tags using the platform-specific method.
77
+ 3. 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).
78
+ 4. For epics, parse `## Implementation Order` sections.
96
79
 
97
80
  **Cache all data retrieved here for reuse in later steps.**
98
81
 
@@ -143,16 +126,9 @@ When the user selects **(f) batch** or references multiple issue numbers (e.g.,
143
126
 
144
127
  #### 1e. Auto-Pick (No Specific Issue Referenced)
145
128
 
146
- If the user invoked without referencing a specific issue, present an auto-pick. Skip if a specific issue was referenced.
129
+ If no specific issue was referenced, auto-pick using: (1) `status:ready` + all blockers satisfied + not `in-progress`, (2) `executor:agent` or `executor:hybrid`, (3) Implementation Order position → priority → most downstream unblocking, (4) tiebreaker: epic sub-issues > standalone.
147
130
 
148
- **Selection criteria (in order):**
149
-
150
- 1. Available: `status:ready`, all blockers satisfied, not already `status:in-progress`.
151
- 2. `executor:agent` or `executor:hybrid` (skip `executor:human`).
152
- 3. Follow the board's Implementation Order (earliest open level, highest-priority entry, most downstream unblocking). Fall back to priority-weighted topological sort.
153
- 4. Tiebreaker: epic sub-issues > standalone; most downstream unblocking; higher priority.
154
-
155
- **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.
131
+ **Batch mode:** Auto-pick selects all independent issues with no mutual dependencies (configurable via `--max-batch`).
156
132
 
157
133
  **ASK:** "Pick up #N? Or batch: #N, #M, #K (independent, parallelizable). Options: (yes single / yes batch / pick alternative / show full board)"
158
134
 
@@ -201,14 +177,12 @@ When multiple issues are selected as a batch:
201
177
 
202
178
  ### Step 3: Collision Detection
203
179
 
204
- 1. **In-progress issues:** Search using platform CLI:
205
- - **GitHub:** `gh issue list -R {owner}/{repo} --label "status:in-progress" --state open` (fall back to `search_issues` MCP).
206
- - **Azure DevOps:** `az boards query --wiql "SELECT ... WHERE [System.State] = 'Active' AND [System.Tags] CONTAINS 'status:in-progress'"`.
207
- - **GitLab:** `glab issue list -R {namespace}/{project} --label "status::in-progress" --state opened`.
208
- 2. **Open PRs/MRs:**
209
- - **GitHub:** `gh pr list -R {owner}/{repo} --state open` (fall back to `search_pull_requests` MCP).
210
- - **Azure DevOps:** `az repos pr list --org https://dev.azure.com/{namespace} --project {project} --status active`.
211
- - **GitLab:** `glab mr list -R {namespace}/{project} --state opened`.
180
+ > Platform-specific details: see `commands/board/pickup-github.md` (Step 3)
181
+ > Platform-specific details: see `commands/board/pickup-azure-devops.md` (Step 3)
182
+ > Platform-specific details: see `commands/board/pickup-gitlab.md` (Step 3)
183
+
184
+ 1. **In-progress issues:** Search using platform CLI (see platform sub-file).
185
+ 2. **Open PRs/MRs:** Search using platform CLI (see platform sub-file).
212
186
  3. **Overlap analysis:** Flag hard collisions (same problem/files), soft collisions (related work), or no collision.
213
187
  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.
214
188
 
@@ -220,60 +194,9 @@ When multiple issues are selected as a batch:
220
194
 
221
195
  ### Step 3b: Specification Generation (Optional)
222
196
 
223
- When the picked issue lacks a detailed specification, generate one before implementation:
224
-
225
- #### When to Generate
226
-
227
- - Issue body has acceptance criteria but no implementation spec
228
- - Issue is type `feature` or `refactor` (bugs typically don't need specs)
229
- - Issue has complexity label `complex` or `epic`
197
+ > Full details: see `commands/board/pickup-modes.md` (Specification Generation)
230
198
 
231
- #### Specification Generation Process
232
-
233
- 1. **Analyze the issue**: Parse title, body, labels, linked issues, and parent epic context.
234
- 2. **Research context**: Read relevant project documentation, existing code in the affected area, and related specs.
235
- 3. **Generate specification** with the following structure:
236
-
237
- ```
238
- ## Specification: #{issue_number} — {title}
239
-
240
- ### Problem Statement
241
- {what needs to change and why}
242
-
243
- ### Proposed Solution
244
- {high-level approach}
245
-
246
- ### Technical Design
247
- - **Data model changes**: {new/modified schemas}
248
- - **API changes**: {new/modified endpoints}
249
- - **UI changes**: {new/modified components}
250
- - **Dependencies**: {new libraries or services}
251
-
252
- ### Implementation Plan
253
- 1. {ordered steps}
254
-
255
- ### Test Strategy
256
- - Unit: {what to unit test}
257
- - Integration: {what to integration test}
258
- - E2E: {what to E2E test}
259
-
260
- ### Risks & Mitigations
261
- - {risk}: {mitigation}
262
-
263
- ### Out of Scope
264
- - {explicitly excluded items}
265
- ```
266
-
267
- 4. **ASK:** Present the generated specification to the user for validation before proceeding to implementation.
268
- 5. **Store**: Save the validated spec as a comment on the GitHub issue for traceability.
269
-
270
- #### Skip Specification
271
-
272
- Skip this step when:
273
- - Issue already has a linked spec document
274
- - Issue is a simple bug fix with clear reproduction steps
275
- - Issue has `skip-spec` label
276
- - Auto-advance mode is active (see below)
199
+ When the picked issue lacks a detailed specification (type `feature` or `refactor`, complexity `complex` or `epic`), generate one before implementation. Skip when: issue already has a linked spec, simple bug fix, `skip-spec` label, or auto-advance mode is active.
277
200
 
278
201
  ---
279
202
 
@@ -283,10 +206,11 @@ Skip this step when:
283
206
 
284
207
  > When picking up any sub-issue, the **parent epic MUST also be marked `status:in-progress`**.
285
208
 
286
- 1. Update status labels/tags to `in-progress` using platform CLI:
287
- - **GitHub:** `gh issue edit N --remove-label "status:ready" --add-label "status:in-progress"` (fall back to `issue_write` MCP).
288
- - **Azure DevOps:** `az boards work-item update --id N --state "Active"` and update tags.
289
- - **GitLab:** `glab issue update N --unlabel "status::ready" --label "status::in-progress"`.
209
+ > Platform-specific details: see `commands/board/pickup-github.md` (Step 4)
210
+ > Platform-specific details: see `commands/board/pickup-azure-devops.md` (Step 4)
211
+ > Platform-specific details: see `commands/board/pickup-gitlab.md` (Step 4)
212
+
213
+ 1. Update status labels/tags to `in-progress` using platform CLI (see platform sub-file).
290
214
  2. Always mark parent epic as `status:in-progress`.
291
215
  3. When picking up an entire epic: mark ALL remaining open sub-issues as `status:in-progress`.
292
216
  4. **Batch mode:** Mark ALL issues in the batch as `status:in-progress`.
@@ -334,489 +258,37 @@ Use the issue type to select the appropriate hatch3r skill: `type:bug` → the h
334
258
 
335
259
  #### 6.pre: Consult Learnings
336
260
 
337
- Before delegating implementation:
338
-
339
- 1. If `.agents/learnings/` exists, scan for learnings with matching `area` or `tags` that overlap with the issue's area labels or tech stack.
340
- 2. Read the `## Applies When` section of matching learnings.
341
- 3. Include any relevant learnings (especially `pitfall` category) in the sub-agent prompt or direct implementation context.
342
- 4. If no learnings directory exists, skip silently.
343
-
344
- > **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.
345
-
346
- **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.
347
-
348
- **After all implementation completes, return here and continue with Step 7.**
349
-
350
- ---
351
-
352
- #### 6a. Single Standalone Issue -- Subagent Delegation
353
-
354
- 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.
355
-
356
- ##### 6a.1. Context Gathering (Researcher Subagent)
357
-
358
- **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.
359
-
360
- **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.
361
-
362
- Spawn a **hatch3r-researcher** sub-agent via the Task tool (`subagent_type: "generalPurpose"`) with:
363
-
364
- - **Research brief:** The issue title, body, acceptance criteria, and area labels.
365
- - **Modes by issue type:**
366
- - `type:bug` → `symptom-trace`, `root-cause`, `codebase-impact`
367
- - `type:feature` → `codebase-impact`, `feature-design`, `architecture`
368
- - `type:refactor` → `current-state`, `refactoring-strategy`, `migration-path`
369
- - `type:qa` → `codebase-impact`
370
- - `type:docs` → `codebase-impact`
371
- - `type:infra` → `codebase-impact`, `risk-assessment`
372
- - **Tier-adjusted modes** (per `hatch3r-deep-context`):
373
- - Tier 2: add `requirements-elicitation` + `similar-implementation` at `quick` depth
374
- - Tier 3: add `requirements-elicitation` + `similar-implementation` at `deep` depth, plus `codebase-impact` at `deep` depth with transitive tracing
375
- - **Depth:** `quick` for `risk:low`, `standard` for `risk:med`, `deep` for `risk:high`. The complexity tier may override depth upward.
376
- - **Project context:** Pre-loaded documentation references from area labels.
377
-
378
- Await the researcher result. Use its structured output to inform Steps 6a.2-6a.3.
379
-
380
- **For Tier 2:** Present the `requirements-elicitation` questions to the user inline and await answers before proceeding to 6a.2.
381
-
382
- **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.
261
+ Before delegating: scan `.agents/learnings/` for matching `area`/`tags`, include relevant learnings (especially `pitfall` category) in sub-agent context. Skip silently if no learnings directory exists.
383
262
 
384
- ##### 6a.2. Core Implementation (Implementer Subagent)
263
+ > **Audit epics:** Audit epics produce findings (issues) rather than code changes — adjust delegation and skip Steps 7-8a if no code changes.
385
264
 
386
- 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.
387
-
388
- The implementer sub-agent prompt MUST include:
389
- - The issue number, title, full body, and acceptance criteria.
390
- - The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
391
- - The researcher output from Step 6a.1 (if that step was not skipped).
392
- - **Reference conventions** from `similar-implementation` output (Tier 2/3) — triggers the implementer's Convention Lock step.
393
- - **Resolved requirements** from `requirements-elicitation` answers (Tier 2/3) — explicit decisions on ambiguities.
394
- - **Blast radius data** from enhanced `codebase-impact` (Tier 3) — transitive dependency trace and API consumer map.
395
- - Documentation references relevant to this issue.
396
- - Instruction to follow the **hatch3r-implementer agent protocol**.
397
- - All `scope: always` rule directives from `.agents/rules/` — subagents do not inherit rules automatically.
398
- - Relevant learnings from `.agents/learnings/` (from Step 6.pre).
399
- - Explicit instruction: do NOT create branches, commits, or PRs.
400
-
401
- Await the implementer sub-agent. Collect its structured result (files changed, tests written, issues encountered).
402
-
403
- ##### 6a.3. Post-Implementation Quality Pipeline
404
-
405
- After implementation completes, run the two-stage quality pipeline. Use the Task tool with `subagent_type: "generalPurpose"`.
406
-
407
- **Stage 1 — Review Loop (sequential):**
408
-
409
- 1. Spawn **`hatch3r-reviewer`** — code review of all changes. Include the diff and acceptance criteria in the prompt.
410
- 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:
411
- - **Blast radius data** from Step 6a.1 (if available) — so the fixer knows which consumers and contracts must be preserved.
412
- - **Reference conventions** from Step 6a.1 (if available) — so the fixer maintains established patterns when applying fixes.
413
- 3. Re-spawn **`hatch3r-reviewer`** to verify fixes.
414
- 4. Repeat steps 2-3 for a maximum of **3 iterations** until the reviewer reports 0 Critical + 0 Warning findings.
415
- 5. If still not clean after 3 iterations, **ASK** the user how to proceed.
416
-
417
- **Stage 2 — Final Quality (parallel, after review loop is clean):**
418
-
419
- Launch as many independent sub-agents in parallel as the platform supports.
420
-
421
- **Always spawn (mandatory for every code change):**
422
- - **hatch3r-test-writer** — tests for all code changes. Unit tests for new logic, regression tests for bug fixes, integration tests for cross-module changes.
423
- - **hatch3r-security-auditor** — security review of all code changes. Audit data flows, access control, input validation, and secret management.
424
-
425
- **Always evaluate (spawn when applicable):**
426
- - **hatch3r-docs-writer** — spawn when changes affect public APIs, architectural patterns, or user-facing behavior. Skip silently if no documentation impact.
427
-
428
- **Conditional specialists (spawn when triggered):**
429
- - **hatch3r-lint-fixer** — spawn when lint errors are present after implementation.
430
- - **hatch3r-a11y-auditor** — spawn when issue has `area:ui` or `area:a11y` labels.
431
- - **hatch3r-perf-profiler** — spawn when issue has `area:performance` label or changes touch hot paths.
432
-
433
- Each specialist sub-agent prompt MUST include:
434
- - The agent protocol to follow (e.g., "Follow the hatch3r-reviewer agent protocol").
435
- - All `scope: always` rule directives from `.agents/rules/` (subagents do not inherit rules automatically).
436
- - The diff or file changes to review.
437
- - The issue's acceptance criteria.
438
-
439
- Await all specialist sub-agents. Apply their feedback (fixes, additional tests, documentation updates) before proceeding to Step 7.
265
+ **Do NOT execute the skill's PR creation steps.** Steps 7-8 handle board-specific requirements (epic linking, label transitions, board sync).
440
266
 
441
267
  ---
442
268
 
443
- #### 6b. Epics -- Sub-Agent Delegation (One Implementer Per Sub-Issue)
444
-
445
- 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.
446
-
447
- ##### 6b.1. Parse Sub-Issues Into Dependency Levels
448
-
449
- 1. Fetch the epic's `## Implementation Order` section.
450
- 2. Group sub-issues by dependency level:
451
- - **Level 1:** Sub-issues with no unsatisfied blockers (can start immediately).
452
- - **Level N:** Sub-issues whose blockers are all in levels < N.
453
- 3. Within each level, identify parallelizable sub-issues (no mutual dependencies).
454
-
455
- ##### 6b.2. Prepare Shared Context
456
-
457
- Before spawning implementer sub-agents, delegate context gathering to the **hatch3r-researcher agent protocol**.
458
-
459
- 1. Read the epic body (goal, scope, constraints).
460
- 2. Spawn a researcher sub-agent following the **hatch3r-researcher agent protocol** with:
461
- - **Research brief:** The epic title, goal, scope, constraints, and area labels.
462
- - **Modes:** `codebase-impact`, `risk-assessment`
463
- - **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.
464
- - **Project context:** Pre-loaded documentation references from area labels.
465
- 3. Await the researcher result. Include the structured output as shared context in all implementer sub-agent prompts in Step 6b.3.
466
-
467
- ##### 6b.2b. Per-Sub-Issue Complexity Scoring and Tier-Adjusted Research
468
-
469
- After the shared epic-level research, score each sub-issue individually and run additional research for sub-issues that warrant it.
470
-
471
- 1. **Score each sub-issue** per the `hatch3r-deep-context` rule to determine the analysis tier (Light / Standard / Deep).
472
-
473
- 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.
474
-
475
- Each per-sub-issue researcher prompt must include:
476
- - The sub-issue title, body, acceptance criteria, and area labels.
477
- - Research modes by issue type (same as Step 6a.1).
478
- - **Tier-adjusted modes** (per `hatch3r-deep-context`):
479
- - Tier 2: add `requirements-elicitation` + `similar-implementation` at `quick` depth
480
- - Tier 3: add `requirements-elicitation` + `similar-implementation` at `deep` depth, plus `codebase-impact` at `deep` depth with transitive tracing
481
- - Depth by risk level, with complexity tier overriding upward.
482
- - The shared epic-level researcher output from Step 6b.2 (to avoid redundant analysis).
483
-
484
- 3. **Await all per-sub-issue researchers.** Collect structured outputs. Each researcher's output feeds exclusively into its corresponding implementer in Step 6b.3.
485
-
486
- 4. **For Tier 2 sub-issues:** Present the `requirements-elicitation` questions to the user inline and await answers before proceeding.
487
-
488
- 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.
489
-
490
- 6. **Tier 1 sub-issues** skip this step — they use only the shared epic-level context from Step 6b.2.
491
-
492
- ##### 6b.3. Execute Level-by-Level With Parallel Sub-Agents
493
-
494
- For each dependency level, starting at Level 1:
495
-
496
- 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.
497
-
498
- 2. **Each sub-agent prompt must include:**
499
- - The sub-issue number, title, full body, and acceptance criteria.
500
- - The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
501
- - Parent epic context (title, goal, related sub-issues at the same level).
502
- - The shared researcher output from Step 6b.2 (codebase impact and risk assessment as shared context).
503
- - The per-sub-issue researcher output from Step 6b.2b (if this sub-issue scored Tier 2+).
504
- - **Reference conventions** from `similar-implementation` output (Tier 2/3) — triggers the implementer's Convention Lock step.
505
- - **Resolved requirements** from `requirements-elicitation` answers (Tier 2/3) — explicit decisions on ambiguities.
506
- - **Blast radius data** from enhanced `codebase-impact` (Tier 3) — transitive dependency trace and API consumer map.
507
- - Documentation references relevant to this sub-issue.
508
- - Instruction to follow the hatch3r-implementer agent protocol.
509
- - All `scope: always` rule directives from `.agents/rules/` — subagents do not inherit rules automatically.
510
- - Relevant learnings from `.agents/learnings/` (from Step 6.pre).
511
- - Instruction to use GitHub MCP for issue reads, and follow the project's tooling hierarchy for external knowledge augmentation.
512
- - Explicit instruction: do NOT create branches, commits, or PRs.
513
-
514
- 3. **Await all sub-agents in the current level.** Collect their structured results (files changed, tests written, issues encountered).
515
-
516
- 4. **Review sub-agent results:**
517
- - If any sub-agent reports BLOCKED or PARTIAL, **ASK** the user how to proceed (skip, fix manually, retry).
518
- - If sub-agents modified overlapping files, review for conflicts and resolve before proceeding.
519
-
520
- 5. **Advance to the next dependency level.** Repeat steps 1-4 until all levels are complete.
521
-
522
- ##### 6b.4. Post-Delegation Verification
523
-
524
- After all sub-agents complete:
525
-
526
- 1. Run a combined quality check across all changes.
527
- 2. Resolve any cross-sub-issue integration issues.
528
- 3. Verify no file conflicts between parallel sub-agent outputs.
529
-
530
- ---
531
-
532
- #### 6c. Multi-Issue Batch -- Parallel Subagent Delegation (One Implementer Per Issue)
533
-
534
- 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.
535
-
536
- ##### 6c.1. Group Issues Into Dependency Levels
269
+ > Delegation protocols: `commands/board/pickup-delegation.md` (6a single issue), `commands/board/pickup-delegation-multi.md` (6b epics, 6c batch)
537
270
 
538
- 1. Use the updated cross-issue dependency graph (from Step 2e, adjusted by Step 3.4).
539
- 2. Group issues by dependency level:
540
- - **Level 1:** Issues with no dependencies on other issues in the batch (can start immediately). Most standalone issues will be Level 1.
541
- - **Level N:** Issues that depend on other issues in levels < N.
542
- 3. Within each level, all issues are parallelizable (no mutual dependencies — conflicts were moved to separate levels in Step 3).
543
-
544
- ##### 6c.2. Context Gathering (Parallel Researchers)
545
-
546
- **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.
547
-
548
- Unlike epics (which share a single researcher), standalone issues in a batch are unrelated and each need individual context gathering.
549
-
550
- 1. **Spawn one hatch3r-researcher sub-agent per issue** via the Task tool (`subagent_type: "generalPurpose"`). Launch as many concurrently as the platform supports.
551
-
552
- 2. **Each researcher prompt must include:**
553
- - The issue title, body, acceptance criteria, and area labels.
554
- - Research modes by issue type (same as Step 6a.1).
555
- - Tier-adjusted modes per `hatch3r-deep-context` (same as Step 6a.1).
556
- - Depth by risk level (`quick` / `standard` / `deep`), with complexity tier overriding upward.
557
- - Project context and documentation references.
558
-
559
- 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.
560
-
561
- ##### 6c.3. Execute Level-by-Level With Parallel Implementers
562
-
563
- For each dependency level, starting at Level 1:
564
-
565
- 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.
566
-
567
- 2. **Each sub-agent prompt must include:**
568
- - The issue number, title, full body, and acceptance criteria.
569
- - The issue type (bug/feature/refactor/QA) and corresponding hatch3r skill name.
570
- - Batch context: sibling issues in the batch at the same level (for awareness, not implementation).
571
- - The researcher output from Step 6c.2 for this specific issue (if that step was not skipped).
572
- - **Reference conventions** from `similar-implementation` output (Tier 2/3) — triggers the implementer's Convention Lock step.
573
- - **Resolved requirements** from `requirements-elicitation` answers (Tier 2/3).
574
- - **Blast radius data** from enhanced `codebase-impact` (Tier 3).
575
- - Documentation references relevant to this issue.
576
- - Instruction to follow the **hatch3r-implementer agent protocol**.
577
- - All `scope: always` rule directives from `.agents/rules/` — subagents do not inherit rules automatically.
578
- - Relevant learnings from `.agents/learnings/` (from Step 6.pre).
579
- - Explicit instruction: do NOT create branches, commits, or PRs.
580
-
581
- 3. **Await all sub-agents in the current level.** Collect their structured results (files changed, tests written, issues encountered).
582
-
583
- 4. **Review sub-agent results:**
584
- - If any sub-agent reports BLOCKED or PARTIAL, **ASK** the user how to proceed (skip, fix manually, retry).
585
- - If sub-agents modified overlapping files, review for conflicts and resolve before proceeding.
586
-
587
- 5. **Advance to the next dependency level.** Repeat steps 1-4 until all levels are complete.
588
-
589
- ##### 6c.4. Post-Batch Verification
590
-
591
- After all implementer sub-agents complete across all levels:
592
-
593
- 1. Run a combined quality check across all changes from all issues.
594
- 2. Resolve any cross-issue file conflicts or integration issues.
595
- 3. Verify no regressions between parallel sub-agent outputs.
596
-
597
- ##### 6c.5. Post-Implementation Quality Pipeline
598
-
599
- After all implementations complete, run the two-stage quality pipeline across the entire batch. Use the Task tool with `subagent_type: "generalPurpose"`.
600
-
601
- **Stage 1 — Review Loop (sequential):**
602
-
603
- 1. Spawn **`hatch3r-reviewer`** — code review of ALL changes across the batch. Include the full diff and acceptance criteria for each issue.
604
- 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:
605
- - **Blast radius data** from Step 6c.2 (if available) — so the fixer knows which consumers and contracts must be preserved.
606
- - **Reference conventions** from Step 6c.2 (if available) — so the fixer maintains established patterns when applying fixes.
607
- 3. Re-spawn **`hatch3r-reviewer`** to verify fixes.
608
- 4. Repeat steps 2-3 for a maximum of **3 iterations** until the reviewer reports 0 Critical + 0 Warning findings.
609
- 5. If still not clean after 3 iterations, **ASK** the user how to proceed.
610
-
611
- **Stage 2 — Final Quality (parallel, after review loop is clean):**
612
-
613
- Launch as many independent sub-agents in parallel as the platform supports.
614
-
615
- **Always spawn (mandatory for every code change):**
616
- - **hatch3r-test-writer** — tests for all code changes across the batch.
617
- - **hatch3r-security-auditor** — security review of all code changes across the batch.
618
-
619
- **Always evaluate (spawn when applicable):**
620
- - **hatch3r-docs-writer** — spawn when any changes affect public APIs, architectural patterns, or user-facing behavior.
621
-
622
- **Conditional specialists (spawn when triggered by any issue in the batch):**
623
- - **hatch3r-lint-fixer** — spawn when lint errors are present after implementation.
624
- - **hatch3r-a11y-auditor** — spawn when any issue has `area:ui` or `area:a11y` labels.
625
- - **hatch3r-perf-profiler** — spawn when any issue has `area:performance` label.
626
-
627
- Await all specialist sub-agents. Apply their feedback before proceeding to Step 7.
628
-
629
- ---
630
-
631
- ### Step 7: Quality Verification
632
-
633
- 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.
634
-
635
- Verify: all AC met, tests passing, no lint errors, dead code removed, project-specific invariants respected.
636
-
637
- ---
638
-
639
- ### Step 7a: Commit & Push
640
-
641
- Stage, commit, and push all changes so the branch exists on the remote before PR creation.
642
-
643
- **Single issue or epic:**
644
-
645
- ```bash
646
- git add -A
647
- git commit -m "{type}: {short description} (#{issue})"
648
- git push -u origin {branch-name}
649
- ```
650
-
651
- - Use the branch type prefix (`feat`, `fix`, `refactor`, `qa`) matching the branch name.
652
- - Reference the issue number in the commit message.
653
- - If `git push` fails (e.g., branch already exists on remote), use `git push` without `-u`.
654
-
655
- **Batch mode:** Create one commit covering all issues in the batch.
656
-
657
- ```bash
658
- git add -A
659
- git commit -m "batch: {short description} (#N, #M, #K)"
660
- git push -u origin {branch-name}
661
- ```
662
-
663
- - List all issue numbers in the commit message.
664
- - If all issues share a type, use that type prefix instead of `batch`.
665
-
666
- ---
667
-
668
- ### Step 8: Create Pull Request / Merge Request
669
-
670
- Follow the project's PR/MR creation skill or conventions:
671
-
672
- 1. **Title:** `{type}: {short description} (#issue)` — for batch mode: `batch: {short description} (#N, #M, #K)`.
673
- 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/MR (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>`.
674
- 3. **Body:** Use the repository's PR/MR template if available. Fill: Summary, Type, Changes, Testing, Rollout plan. Include a **Related Issues** section listing:
675
- - `Closes #N` for each issue addressed by this PR/MR (including all batch issues).
676
- - `Closes #<epic>` (all sub-issues addressed) OR `Relates to #<epic>` (partial) for the parent epic.
677
- - Always list both the epic and all sub-issues in the Related Issues section regardless of partial/full completion.
678
- - **Batch mode:** List `Closes #N` for every issue in the batch. Include a per-issue summary of changes in the body.
679
-
680
- **Platform-specific templates:**
681
- - **GitHub:** Check `.github/PULL_REQUEST_TEMPLATE.md`.
682
- - **Azure DevOps:** Check `.azuredevops/pull_request_template.md`.
683
- - **GitLab:** Check `.gitlab/merge_request_templates/`.
684
-
685
- 4. **Platform-specific: Create PR/MR**
686
-
687
- **If platform is `github`:**
688
- Use `gh pr create -R {owner}/{repo} --head {branch} --base {base} --title "..." --body "..."` (fall back to `create_pull_request` MCP).
689
-
690
- **If platform is `azure-devops`:**
691
- Use `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).
692
-
693
- **If platform is `gitlab`:**
694
- Use `glab mr create -R {namespace}/{project} --source-branch {branch} --target-branch {base} --title "..." --description "..."`. Use `Closes #N` syntax in the description for auto-close on merge.
695
-
696
- `{base}` = `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
697
-
698
- 5. **Link PR/MR to epic:**
699
- - **GitHub:** `gh issue comment {epic} -R {owner}/{repo} --body "PR: #{pr_number}"` (fall back to `add_issue_comment` MCP).
700
- - **Azure DevOps:** `az boards work-item relation add --id {epic_id} --relation-type "ArtifactLink" --target-id {pr_id}` or link via PR description.
701
- - **GitLab:** Reference the epic issue number in the MR description. GitLab auto-links MRs to issues mentioned with `Closes #N`.
702
-
703
- ---
704
-
705
- ### Step 8a: Post-PR/MR Label Transition & Board Sync
706
-
707
- 1. **Transition labels to `status:in-review`:** For each `Closes #N` issue (including all batch issues), update status labels:
708
- - **GitHub:** `gh issue edit N --remove-label "status:in-progress" --add-label "status:in-review"`.
709
- - **Azure DevOps:** `az boards work-item update --id N --state "Resolved"` and update tags.
710
- - **GitLab:** `glab issue update N --unlabel "status::in-progress" --label "status::in-review"`.
711
- If ALL sub-issues addressed, also transition the parent epic.
712
-
713
- 2. **Sync Board:** Run the full **Board Sync Procedure** from `hatch3r-board-shared` for **each** of the following items individually:
714
- - **a. The PR/MR:** Set to "In Review" on the board.
715
- - **b. Each `Closes #N` issue:** Set to "In Review". In batch mode, this includes every issue in the batch.
716
- - **c. Parent epic (all sub-issues addressed):** Set to "In Review". The PR/MR body uses `Closes #<epic>`, so the epic will auto-close on merge and transition to Done.
717
- - **d. Parent epic (partial -- some sub-issues remain):** Verify status is "In Progress"; set it if not. The PR/MR body uses `Relates to #<epic>` (epic stays open after merge).
718
-
719
- ---
720
-
721
- ### Step 9: Post-PR Housekeeping
722
-
723
- 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.
724
- 2. Remind user `Closes #N` auto-closes on merge.
725
- 3. If partial:
726
-
727
- **ASK:** "PR created. N remaining sub-issues on epic #X. Continue with next sub-issue or stop?"
728
-
729
- #### 9a. Refresh Board Dashboard
730
-
731
- **This step is mandatory. Do not skip.**
732
-
733
- 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.
271
+ **After all implementation completes, return here and continue with Step 7.**
734
272
 
735
273
  ---
736
274
 
737
- ### Step 10: Capture Learnings
738
-
739
- After PR creation, capture learnings from this development session.
275
+ ### Steps 7-10: Post-Implementation Pipeline
740
276
 
741
- 1. Reflect on the implementation:
742
- - Were there any unexpected challenges or blockers?
743
- - Did any patterns or approaches work particularly well?
744
- - Were there decisions made that future developers should know about?
745
- - Were any pitfalls discovered that should be avoided next time?
277
+ > Full details: see `commands/board/pickup-post-impl.md`
746
278
 
747
- 2. If learnings are identified:
748
- - Create learning files in `.agents/learnings/` following the learning file format (see `hatch3r-learn` command).
749
- - Include the issue number as `source-issue`.
750
- - Tag with relevant area labels from the issue.
751
- - **ASK:** "Learnings captured: {list}. Anything else to note? (add more / done)"
279
+ Execute Steps 7-10 in order after all implementation completes:
752
280
 
753
- 3. If no significant learnings: skip silently. Not every task produces learnings. Do not prompt in this case.
281
+ - **Step 7:** Quality verification (lint, type check, tests, AC).
282
+ - **Step 7a:** Commit and push all changes to the remote branch.
283
+ - **Step 8:** Create PR/MR with proper `Closes #N` references. See platform sub-files for CLI commands.
284
+ - **Step 8a:** Transition labels to `status:in-review` and sync board. See platform sub-files.
285
+ - **Step 9:** Post-PR housekeeping: epic link verification, board dashboard refresh (9a, mandatory), end-of-run reconciliation (9b, mandatory).
286
+ - **Step 10:** Capture learnings in `.agents/learnings/` if any were identified.
754
287
 
755
288
  ---
756
289
 
757
- ## Auto-Advance Mode
758
-
759
- When invoked with `--auto` or `--unattended`, the board pickup operates with reduced human checkpoints for sustained autonomous operation.
760
-
761
- ### Behavior Changes in Auto Mode
762
-
763
- | Checkpoint | Normal Mode | Auto Mode |
764
- |-----------|-------------|-----------|
765
- | Issue selection | ASK user to confirm | Auto-select highest priority ready issue(s); **auto-batch** independent issues up to `--max-batch` (default 4) |
766
- | Specification generation | ASK user to validate | Auto-generate and attach, skip validation |
767
- | Implementation plan | ASK user to review | Auto-proceed with plan |
768
- | PR creation | ASK user to confirm | Auto-create PR |
769
- | Review feedback | Wait for human review | Proceed to next issue/batch |
290
+ ## Auto-Advance Mode, Error Handling, and Guardrails
770
291
 
771
- 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.
772
-
773
- ### Safety Guardrails (Always Active)
774
-
775
- These checkpoints are NEVER skipped, even in auto mode:
776
- - **Destructive operations**: Database migrations, file deletions, security rule changes always require confirmation
777
- - **Breaking changes**: API contract changes, public interface modifications always require confirmation
778
- - **Cost thresholds**: Stop if estimated token cost exceeds configured limit (default: $10 per issue)
779
- - **Error threshold**: Stop after 3 consecutive implementation failures
780
- - **Scope limits**: Maximum 10 issues per auto session (configurable)
781
-
782
- ### Activation
783
-
784
- ```
785
- /hatch3r board-pickup --auto
786
- /hatch3r board-pickup --auto --max-issues=5 --cost-limit=20
787
- /hatch3r board-pickup --auto --max-batch=4
788
- ```
789
-
790
- ### Session Report
791
-
792
- At the end of an auto session, generate a summary:
793
- - Issues completed: {count}
794
- - Issues batched: {count per batch}
795
- - PRs created: {list}
796
- - Issues blocked: {list with reasons}
797
- - Total estimated cost: {tokens/cost}
798
- - Learnings captured: {count}
799
-
800
- ---
292
+ > Full details: see `commands/board/pickup-modes.md`
801
293
 
802
- ## Error Handling
803
-
804
- - **Issue listing/search failure** (GitHub `list_issues` / Azure DevOps `az boards query` / GitLab `glab issue list`): retry once, then ask user for issue number.
805
- - **Issue update failure** (GitHub `issue_write` / Azure DevOps `az boards work-item update` / GitLab `glab issue update`): warn and continue (labels not blocking).
806
- - **Quality verification failure:** fix before creating PR/MR.
807
- - **PR/MR creation failure** (GitHub `create_pull_request` / Azure DevOps `az repos pr create` / GitLab `glab mr create`): present error and manual instructions.
808
-
809
- ## Guardrails
810
-
811
- - **Never skip collision check** (Step 3).
812
- - **Never skip ASK checkpoints.**
813
- - **Always work on a dedicated branch.** Never commit to the default branch.
814
- - **Stay within scope.** Note related work but do not implement it.
815
- - **One PR per pickup session.** A single issue, epic, or batch produces one PR. Split large epics into multiple PRs.
816
- - **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).
817
- - **Maximize parallelism.** Launch as many independent sub-agents concurrently as the platform supports. Only serialize when dependency order or file conflicts require it.
818
- - **Respect the issue-type skill** as source of truth for implementation.
819
- - **Respect dependency and implementation order.** Warn and suggest blockers.
820
- - **Prefer `status:ready` issues.** Warn if selecting non-ready.
821
- - **Board Overview is auto-maintained.** Exclude from all analysis.
822
- - **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.
294
+ The modes file contains: auto-advance mode (`--auto`/`--unattended`), safety guardrails, error handling, and operational guardrails for board-pickup.