hatch3r 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -364
- package/agents/hatch3r-a11y-auditor.md +8 -8
- package/agents/hatch3r-architect.md +2 -4
- package/agents/hatch3r-ci-watcher.md +2 -4
- package/agents/hatch3r-context-rules.md +2 -4
- package/agents/hatch3r-dependency-auditor.md +5 -7
- package/agents/hatch3r-devops.md +2 -4
- package/agents/hatch3r-docs-writer.md +2 -4
- package/agents/hatch3r-fixer.md +2 -0
- package/agents/hatch3r-implementer.md +32 -0
- package/agents/hatch3r-learnings-loader.md +189 -13
- package/agents/hatch3r-lint-fixer.md +3 -14
- package/agents/hatch3r-perf-profiler.md +2 -4
- package/agents/hatch3r-researcher.md +247 -0
- package/agents/hatch3r-reviewer.md +76 -7
- package/agents/hatch3r-security-auditor.md +4 -7
- package/agents/hatch3r-test-writer.md +3 -11
- package/agents/modes/architecture.md +44 -0
- package/agents/modes/boundary-analysis.md +45 -0
- package/agents/modes/codebase-impact.md +81 -0
- package/agents/modes/complexity-risk.md +40 -0
- package/agents/modes/coverage-analysis.md +44 -0
- package/agents/modes/current-state.md +52 -0
- package/agents/modes/feature-design.md +39 -0
- package/agents/modes/impact-analysis.md +45 -0
- package/agents/modes/library-docs.md +31 -0
- package/agents/modes/migration-path.md +55 -0
- package/agents/modes/prior-art.md +31 -0
- package/agents/modes/refactoring-strategy.md +55 -0
- package/agents/modes/regression.md +45 -0
- package/agents/modes/requirements-elicitation.md +68 -0
- package/agents/modes/risk-assessment.md +41 -0
- package/agents/modes/risk-prioritization.md +43 -0
- package/agents/modes/root-cause.md +39 -0
- package/agents/modes/similar-implementation.md +70 -0
- package/agents/modes/symptom-trace.md +39 -0
- package/agents/modes/test-pattern.md +61 -0
- package/agents/shared/external-knowledge.md +11 -0
- package/commands/board/pickup-azure-devops.md +81 -0
- package/commands/board/pickup-delegation-multi.md +197 -0
- package/commands/board/pickup-delegation.md +100 -0
- package/commands/board/pickup-github.md +82 -0
- package/commands/board/pickup-gitlab.md +81 -0
- package/commands/board/pickup-modes.md +143 -0
- package/commands/board/pickup-post-impl.md +120 -0
- package/commands/board/shared-azure-devops.md +149 -0
- package/commands/board/shared-board-overview.md +215 -0
- package/commands/board/shared-github.md +169 -0
- package/commands/board/shared-gitlab.md +142 -0
- package/commands/hatch3r-agent-customize.md +3 -2
- package/commands/hatch3r-api-spec.md +1 -0
- package/commands/hatch3r-benchmark.md +1 -0
- package/commands/hatch3r-board-fill.md +15 -16
- package/commands/hatch3r-board-groom.md +50 -10
- package/commands/hatch3r-board-init.md +1 -0
- package/commands/hatch3r-board-pickup.md +44 -572
- package/commands/hatch3r-board-refresh.md +31 -10
- package/commands/hatch3r-board-shared.md +87 -439
- package/commands/hatch3r-bug-plan.md +1 -0
- package/commands/hatch3r-codebase-map.md +1 -0
- package/commands/hatch3r-command-customize.md +1 -0
- package/commands/hatch3r-context-health.md +23 -2
- package/commands/hatch3r-cost-tracking.md +15 -0
- package/commands/hatch3r-debug.md +1 -0
- package/commands/hatch3r-dep-audit.md +2 -1
- package/commands/hatch3r-feature-plan.md +1 -0
- package/commands/hatch3r-healthcheck.md +2 -1
- package/commands/hatch3r-hooks.md +1 -0
- package/commands/hatch3r-learn.md +69 -2
- package/commands/hatch3r-migration-plan.md +1 -0
- package/commands/hatch3r-onboard.md +1 -0
- package/commands/hatch3r-project-spec.md +1 -0
- package/commands/hatch3r-quick-change.md +1 -0
- package/commands/hatch3r-recipe.md +1 -0
- package/commands/hatch3r-refactor-plan.md +1 -0
- package/commands/hatch3r-release.md +2 -1
- package/commands/hatch3r-revision.md +1 -0
- package/commands/hatch3r-roadmap.md +8 -1
- package/commands/hatch3r-rule-customize.md +1 -0
- package/commands/hatch3r-security-audit.md +2 -1
- package/commands/hatch3r-skill-customize.md +1 -0
- package/commands/hatch3r-test-plan.md +532 -0
- package/commands/hatch3r-workflow.md +1 -0
- package/dist/cli/index.js +4735 -1426
- package/dist/cli/index.js.map +1 -1
- package/github-agents/hatch3r-docs-agent.md +1 -0
- package/github-agents/hatch3r-lint-agent.md +1 -0
- package/github-agents/hatch3r-security-agent.md +1 -0
- package/github-agents/hatch3r-test-agent.md +1 -0
- package/hooks/hatch3r-ci-failure.md +1 -0
- package/hooks/hatch3r-file-save.md +1 -0
- package/hooks/hatch3r-post-merge.md +1 -0
- package/hooks/hatch3r-pre-commit.md +1 -0
- package/hooks/hatch3r-pre-push.md +1 -0
- package/hooks/hatch3r-session-start.md +1 -0
- package/package.json +2 -2
- package/prompts/hatch3r-bug-triage.md +1 -0
- package/prompts/hatch3r-code-review.md +1 -0
- package/prompts/hatch3r-pr-description.md +1 -0
- package/rules/hatch3r-accessibility-standards.md +1 -0
- package/rules/hatch3r-agent-orchestration.md +289 -73
- package/rules/hatch3r-api-design.md +1 -0
- package/rules/hatch3r-browser-verification.md +1 -0
- package/rules/hatch3r-ci-cd.md +1 -0
- package/rules/hatch3r-code-standards.md +9 -0
- package/rules/hatch3r-component-conventions.md +1 -0
- package/rules/hatch3r-data-classification.md +1 -0
- package/rules/hatch3r-deep-context.md +1 -0
- package/rules/hatch3r-dependency-management.md +13 -0
- package/rules/hatch3r-feature-flags.md +1 -0
- package/rules/hatch3r-git-conventions.md +1 -0
- package/rules/hatch3r-i18n.md +1 -0
- package/rules/hatch3r-learning-consult.md +1 -0
- package/rules/hatch3r-migrations.md +12 -0
- package/rules/hatch3r-observability.md +290 -0
- package/rules/hatch3r-performance-budgets.md +1 -0
- package/rules/hatch3r-secrets-management.md +1 -0
- package/rules/hatch3r-security-patterns.md +12 -0
- package/rules/hatch3r-testing.md +1 -0
- package/rules/hatch3r-theming.md +1 -0
- package/rules/hatch3r-tooling-hierarchy.md +1 -0
- package/skills/hatch3r-a11y-audit/SKILL.md +1 -0
- package/skills/hatch3r-agent-customize/SKILL.md +1 -0
- package/skills/hatch3r-api-spec/SKILL.md +1 -0
- package/skills/hatch3r-architecture-review/SKILL.md +1 -0
- package/skills/hatch3r-bug-fix/SKILL.md +1 -0
- package/skills/hatch3r-ci-pipeline/SKILL.md +1 -0
- package/skills/hatch3r-command-customize/SKILL.md +1 -0
- package/skills/hatch3r-context-health/SKILL.md +1 -0
- package/skills/hatch3r-cost-tracking/SKILL.md +1 -0
- package/skills/hatch3r-dep-audit/SKILL.md +2 -1
- package/skills/hatch3r-feature/SKILL.md +1 -0
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +1 -0
- package/skills/hatch3r-incident-response/SKILL.md +1 -0
- package/skills/hatch3r-issue-workflow/SKILL.md +1 -0
- package/skills/hatch3r-logical-refactor/SKILL.md +1 -0
- package/skills/hatch3r-migration/SKILL.md +1 -0
- package/skills/hatch3r-perf-audit/SKILL.md +1 -0
- package/skills/hatch3r-pr-creation/SKILL.md +1 -0
- package/skills/hatch3r-qa-validation/SKILL.md +1 -0
- package/skills/hatch3r-recipe/SKILL.md +1 -0
- package/skills/hatch3r-refactor/SKILL.md +1 -0
- package/skills/hatch3r-release/SKILL.md +1 -0
- package/skills/hatch3r-rule-customize/SKILL.md +1 -0
- package/skills/hatch3r-skill-customize/SKILL.md +1 -0
- package/skills/hatch3r-visual-refactor/SKILL.md +1 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup-gitlab
|
|
3
|
+
type: command
|
|
4
|
+
description: GitLab-specific platform procedures for board-pickup. Covers glab CLI commands for issue listing, status updates, collision detection, MR creation, and label transitions.
|
|
5
|
+
tags: [board, team, gitlab]
|
|
6
|
+
---
|
|
7
|
+
# Board Pickup — GitLab Platform Details
|
|
8
|
+
|
|
9
|
+
Platform-specific procedures for GitLab. Referenced from `hatch3r-board-pickup`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 1a: Fetch and Parse Board State — GitLab
|
|
14
|
+
|
|
15
|
+
**Fetch all open issues:**
|
|
16
|
+
1. `glab issue list -R {namespace}/{project} --state opened --per-page 100`. Paginate to get all.
|
|
17
|
+
|
|
18
|
+
**Check sub-issues per issue:**
|
|
19
|
+
- `glab api projects/{project_id}/issues/{N}/links`.
|
|
20
|
+
|
|
21
|
+
**Fetch labels:**
|
|
22
|
+
- Extract from issue data.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Step 3: Collision Detection — GitLab
|
|
27
|
+
|
|
28
|
+
**In-progress issues:**
|
|
29
|
+
- `glab issue list -R {namespace}/{project} --label "status::in-progress" --state opened`.
|
|
30
|
+
|
|
31
|
+
**Open MRs:**
|
|
32
|
+
- `glab mr list -R {namespace}/{project} --state opened`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step 4: Update Issue Status — GitLab
|
|
37
|
+
|
|
38
|
+
**Update status labels:**
|
|
39
|
+
- `glab issue update N --unlabel "status::ready" --label "status::in-progress"`.
|
|
40
|
+
|
|
41
|
+
**Sync board status:**
|
|
42
|
+
Follow the **GitLab Board Label-Based Sync** from `commands/board/shared-gitlab.md` for each issue marked `status:in-progress` (including parent epic). Set label to `status::in-progress`.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 8: Create Merge Request — GitLab
|
|
47
|
+
|
|
48
|
+
**MR template:** Check `.gitlab/merge_request_templates/`.
|
|
49
|
+
|
|
50
|
+
**Create MR:**
|
|
51
|
+
`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.
|
|
52
|
+
|
|
53
|
+
`{base}` = `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
|
|
54
|
+
|
|
55
|
+
**Link MR to epic:**
|
|
56
|
+
Reference the epic issue number in the MR description. GitLab auto-links MRs to issues mentioned with `Closes #N`.
|
|
57
|
+
|
|
58
|
+
**Verify MR body linkage:**
|
|
59
|
+
Read back the created MR description and verify it contains `Closes #N` for every issue addressed. If any reference is missing:
|
|
60
|
+
`glab mr update {mr_number} -R {namespace}/{project} --description "..."`.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Step 8a: Post-MR Label Transition — GitLab
|
|
65
|
+
|
|
66
|
+
**Transition labels to `status:in-review`:**
|
|
67
|
+
`glab issue update N --unlabel "status::in-progress" --label "status::in-review"`.
|
|
68
|
+
|
|
69
|
+
**Sync Board:**
|
|
70
|
+
Follow the full **GitLab Board Label-Based Sync** from `commands/board/shared-gitlab.md` for:
|
|
71
|
+
- Each `Closes #N` issue: Set label to `status::in-review`.
|
|
72
|
+
- Parent epic (all sub-issues addressed): Set label to `status::in-review`.
|
|
73
|
+
- Parent epic (partial): Verify label is `status::in-progress`; set it if not.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Error Handling — GitLab
|
|
78
|
+
|
|
79
|
+
- **Issue listing failure** (`glab issue list`): retry once, then ask user for issue number.
|
|
80
|
+
- **Issue update failure** (`glab issue update`): warn and continue (labels not blocking).
|
|
81
|
+
- **MR creation failure** (`glab mr create`): present error and manual instructions.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup-modes
|
|
3
|
+
type: command
|
|
4
|
+
description: Auto-advance mode, error handling, and guardrails for board-pickup. Covers --auto/--unattended operation, safety guardrails, and specification generation.
|
|
5
|
+
tags: [board, team]
|
|
6
|
+
---
|
|
7
|
+
# Board Pickup — Modes, Guardrails, and Error Handling
|
|
8
|
+
|
|
9
|
+
Supplementary protocols for `hatch3r-board-pickup`. Referenced from the core command file.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Specification Generation (Step 3b — Optional)
|
|
14
|
+
|
|
15
|
+
When the picked issue lacks a detailed specification, generate one before implementation:
|
|
16
|
+
|
|
17
|
+
### When to Generate
|
|
18
|
+
|
|
19
|
+
- Issue body has acceptance criteria but no implementation spec
|
|
20
|
+
- Issue is type `feature` or `refactor` (bugs typically don't need specs)
|
|
21
|
+
- Issue has complexity label `complex` or `epic`
|
|
22
|
+
|
|
23
|
+
### Specification Generation Process
|
|
24
|
+
|
|
25
|
+
1. **Analyze the issue**: Parse title, body, labels, linked issues, and parent epic context.
|
|
26
|
+
2. **Research context**: Read relevant project documentation, existing code in the affected area, and related specs.
|
|
27
|
+
3. **Generate specification** with the following structure:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
## Specification: #{issue_number} — {title}
|
|
31
|
+
|
|
32
|
+
### Problem Statement
|
|
33
|
+
{what needs to change and why}
|
|
34
|
+
|
|
35
|
+
### Proposed Solution
|
|
36
|
+
{high-level approach}
|
|
37
|
+
|
|
38
|
+
### Technical Design
|
|
39
|
+
- **Data model changes**: {new/modified schemas}
|
|
40
|
+
- **API changes**: {new/modified endpoints}
|
|
41
|
+
- **UI changes**: {new/modified components}
|
|
42
|
+
- **Dependencies**: {new libraries or services}
|
|
43
|
+
|
|
44
|
+
### Implementation Plan
|
|
45
|
+
1. {ordered steps}
|
|
46
|
+
|
|
47
|
+
### Test Strategy
|
|
48
|
+
- Unit: {what to unit test}
|
|
49
|
+
- Integration: {what to integration test}
|
|
50
|
+
- E2E: {what to E2E test}
|
|
51
|
+
|
|
52
|
+
### Risks & Mitigations
|
|
53
|
+
- {risk}: {mitigation}
|
|
54
|
+
|
|
55
|
+
### Out of Scope
|
|
56
|
+
- {explicitly excluded items}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
4. **ASK:** Present the generated specification to the user for validation before proceeding to implementation.
|
|
60
|
+
5. **Store**: Save the validated spec as a comment on the issue for traceability.
|
|
61
|
+
|
|
62
|
+
### Skip Specification
|
|
63
|
+
|
|
64
|
+
Skip this step when:
|
|
65
|
+
- Issue already has a linked spec document
|
|
66
|
+
- Issue is a simple bug fix with clear reproduction steps
|
|
67
|
+
- Issue has `skip-spec` label
|
|
68
|
+
- Auto-advance mode is active (see below)
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Auto-Advance Mode
|
|
73
|
+
|
|
74
|
+
When invoked with `--auto` or `--unattended`, the board pickup operates with reduced human checkpoints for sustained autonomous operation.
|
|
75
|
+
|
|
76
|
+
### Behavior Changes in Auto Mode
|
|
77
|
+
|
|
78
|
+
| Checkpoint | Normal Mode | Auto Mode |
|
|
79
|
+
|-----------|-------------|-----------|
|
|
80
|
+
| Issue selection | ASK user to confirm | Auto-select highest priority ready issue(s); **auto-batch** independent issues up to `--max-batch` (default 4) |
|
|
81
|
+
| Specification generation | ASK user to validate | Auto-generate and attach, skip validation |
|
|
82
|
+
| Implementation plan | ASK user to review | Auto-proceed with plan |
|
|
83
|
+
| PR creation | ASK user to confirm | Auto-create PR |
|
|
84
|
+
| Review feedback | Wait for human review | Proceed to next issue/batch |
|
|
85
|
+
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
### Safety Guardrails (Always Active)
|
|
89
|
+
|
|
90
|
+
These checkpoints are NEVER skipped, even in auto mode:
|
|
91
|
+
- **Destructive operations**: Database migrations, file deletions, security rule changes always require confirmation
|
|
92
|
+
- **Breaking changes**: API contract changes, public interface modifications always require confirmation
|
|
93
|
+
- **Cost thresholds**: Stop if estimated token cost exceeds configured limit (default: $10 per issue)
|
|
94
|
+
- **Error threshold**: Stop after 3 consecutive implementation failures
|
|
95
|
+
- **Scope limits**: Maximum 10 issues per auto session (configurable)
|
|
96
|
+
|
|
97
|
+
### Activation
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
/hatch3r board-pickup --auto
|
|
101
|
+
/hatch3r board-pickup --auto --max-issues=5 --cost-limit=20
|
|
102
|
+
/hatch3r board-pickup --auto --max-batch=4
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Session Report
|
|
106
|
+
|
|
107
|
+
At the end of an auto session, generate a summary:
|
|
108
|
+
- Issues completed: {count}
|
|
109
|
+
- Issues batched: {count per batch}
|
|
110
|
+
- PRs created: {list}
|
|
111
|
+
- Issues blocked: {list with reasons}
|
|
112
|
+
- Total estimated cost: {tokens/cost}
|
|
113
|
+
- Learnings captured: {count}
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Error Handling
|
|
118
|
+
|
|
119
|
+
> Platform-specific details: see `commands/board/pickup-github.md` (Error Handling)
|
|
120
|
+
> Platform-specific details: see `commands/board/pickup-azure-devops.md` (Error Handling)
|
|
121
|
+
> Platform-specific details: see `commands/board/pickup-gitlab.md` (Error Handling)
|
|
122
|
+
|
|
123
|
+
- **Issue listing/search failure:** retry once, then ask user for issue number.
|
|
124
|
+
- **Issue update failure:** warn and continue (labels not blocking).
|
|
125
|
+
- **Quality verification failure:** fix before creating PR/MR.
|
|
126
|
+
- **PR/MR creation failure:** present error and manual instructions.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Guardrails
|
|
131
|
+
|
|
132
|
+
- **Never skip collision check** (Step 3).
|
|
133
|
+
- **Never skip ASK checkpoints.**
|
|
134
|
+
- **Always work on a dedicated branch.** Never commit to the default branch.
|
|
135
|
+
- **Stay within scope.** Note related work but do not implement it.
|
|
136
|
+
- **One PR per pickup session.** A single issue, epic, or batch produces one PR. Split large epics into multiple PRs.
|
|
137
|
+
- **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).
|
|
138
|
+
- **Maximize parallelism.** Launch as many independent sub-agents concurrently as the platform supports. Only serialize when dependency order or file conflicts require it.
|
|
139
|
+
- **Respect the issue-type skill** as source of truth for implementation.
|
|
140
|
+
- **Respect dependency and implementation order.** Warn and suggest blockers.
|
|
141
|
+
- **Prefer `status:ready` issues.** Warn if selecting non-ready.
|
|
142
|
+
- **Board Overview is auto-maintained.** Exclude from all analysis.
|
|
143
|
+
- **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.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-pickup-post-impl
|
|
3
|
+
type: command
|
|
4
|
+
description: Post-implementation steps for board-pickup (Steps 7-10). Covers quality verification, commit/push, PR/MR creation, label transitions, board sync, dashboard refresh, reconciliation, and learnings capture.
|
|
5
|
+
tags: [board, team]
|
|
6
|
+
---
|
|
7
|
+
# Board Pickup — Post-Implementation Steps (7-10)
|
|
8
|
+
|
|
9
|
+
Post-implementation workflow for `hatch3r-board-pickup`. Referenced from the core command file.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 7: Quality Verification
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
Verify: all AC met, tests passing, no lint errors, dead code removed, project-specific invariants respected.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 7a: Commit & Push
|
|
22
|
+
|
|
23
|
+
Stage, commit, and push all changes so the branch exists on the remote before PR creation.
|
|
24
|
+
|
|
25
|
+
**Single issue or epic:**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git add -A
|
|
29
|
+
git commit -m "{type}: {short description} (#{issue})"
|
|
30
|
+
git push -u origin {branch-name}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- Use the branch type prefix (`feat`, `fix`, `refactor`, `qa`) matching the branch name.
|
|
34
|
+
- Reference the issue number in the commit message.
|
|
35
|
+
- If `git push` fails (e.g., branch already exists on remote), use `git push` without `-u`.
|
|
36
|
+
|
|
37
|
+
**Batch mode:** Create one commit covering all issues in the batch.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git add -A
|
|
41
|
+
git commit -m "batch: {short description} (#N, #M, #K)"
|
|
42
|
+
git push -u origin {branch-name}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- List all issue numbers in the commit message.
|
|
46
|
+
- If all issues share a type, use that type prefix instead of `batch`.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 8: Create Pull Request / Merge Request
|
|
51
|
+
|
|
52
|
+
> Platform-specific details: see `commands/board/pickup-github.md` (Step 8)
|
|
53
|
+
> Platform-specific details: see `commands/board/pickup-azure-devops.md` (Step 8)
|
|
54
|
+
> Platform-specific details: see `commands/board/pickup-gitlab.md` (Step 8)
|
|
55
|
+
|
|
56
|
+
Follow the project's PR/MR creation skill or conventions:
|
|
57
|
+
|
|
58
|
+
1. **Title:** `{type}: {short description} (#issue)` — for batch mode: `batch: {short description} (#N, #M, #K)`.
|
|
59
|
+
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>`.
|
|
60
|
+
3. **Body:** Use the repository's PR/MR template if available (see platform sub-file for template location). Fill: Summary, Type, Changes, Testing, Rollout plan. Include a **Related Issues** section listing:
|
|
61
|
+
- `Closes #N` for each issue addressed by this PR/MR (including all batch issues).
|
|
62
|
+
- `Closes #<epic>` (all sub-issues addressed) OR `Relates to #<epic>` (partial) for the parent epic.
|
|
63
|
+
- Always list both the epic and all sub-issues in the Related Issues section regardless of partial/full completion.
|
|
64
|
+
- **Batch mode:** List `Closes #N` for every issue in the batch. Include a per-issue summary of changes in the body.
|
|
65
|
+
4. **Create PR/MR** using the platform CLI (see platform sub-file for exact command).
|
|
66
|
+
5. **Link PR/MR to epic** using the platform-specific method (see platform sub-file).
|
|
67
|
+
6. **Verify PR body linkage** and auto-fix missing `Closes #N` references (see platform sub-file).
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step 8a: Post-PR/MR Label Transition & Board Sync
|
|
72
|
+
|
|
73
|
+
> Platform-specific details: see `commands/board/pickup-github.md` (Step 8a)
|
|
74
|
+
> Platform-specific details: see `commands/board/pickup-azure-devops.md` (Step 8a)
|
|
75
|
+
> Platform-specific details: see `commands/board/pickup-gitlab.md` (Step 8a)
|
|
76
|
+
|
|
77
|
+
1. **Transition labels to `status:in-review`:** For each `Closes #N` issue (including all batch issues), update status labels using the platform CLI (see platform sub-file). If ALL sub-issues addressed, also transition the parent epic.
|
|
78
|
+
2. **Sync Board:** Run the full **Board Sync Procedure** from `hatch3r-board-shared` for each item (see platform sub-file for specific targets).
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 9: Post-PR Housekeeping
|
|
83
|
+
|
|
84
|
+
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.
|
|
85
|
+
2. Remind user `Closes #N` auto-closes on merge.
|
|
86
|
+
3. If partial:
|
|
87
|
+
|
|
88
|
+
**ASK:** "PR created. N remaining sub-issues on epic #X. Continue with next sub-issue or stop?"
|
|
89
|
+
|
|
90
|
+
### 9a. Refresh Board Dashboard
|
|
91
|
+
|
|
92
|
+
**This step is mandatory. Do not skip.**
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
### 9b. End-of-Run Reconciliation
|
|
97
|
+
|
|
98
|
+
**This step is mandatory. Do not skip.**
|
|
99
|
+
|
|
100
|
+
Run the **End-of-Run Reconciliation Procedure** from `hatch3r-board-shared`. This verifies board sync, sub-issue links, label consistency, and PR linkage for all issues modified during this pickup run. Output the reconciliation report before proceeding to Step 10.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Step 10: Capture Learnings
|
|
105
|
+
|
|
106
|
+
After PR creation, capture learnings from this development session.
|
|
107
|
+
|
|
108
|
+
1. Reflect on the implementation:
|
|
109
|
+
- Were there any unexpected challenges or blockers?
|
|
110
|
+
- Did any patterns or approaches work particularly well?
|
|
111
|
+
- Were there decisions made that future developers should know about?
|
|
112
|
+
- Were any pitfalls discovered that should be avoided next time?
|
|
113
|
+
|
|
114
|
+
2. If learnings are identified:
|
|
115
|
+
- Create learning files in `.agents/learnings/` following the learning file format (see `hatch3r-learn` command).
|
|
116
|
+
- Include the issue number as `source-issue`.
|
|
117
|
+
- Tag with relevant area labels from the issue.
|
|
118
|
+
- **ASK:** "Learnings captured: {list}. Anything else to note? (add more / done)"
|
|
119
|
+
|
|
120
|
+
3. If no significant learnings: skip silently. Not every task produces learnings. Do not prompt in this case.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-board-shared-azure-devops
|
|
3
|
+
type: shared-context
|
|
4
|
+
description: Azure DevOps-specific platform details for board shared context. Covers Work Items, Azure Boards, az CLI, and MCP tools.
|
|
5
|
+
tags: [board, team, azure-devops]
|
|
6
|
+
---
|
|
7
|
+
# Board Shared Reference — Azure DevOps Platform Details
|
|
8
|
+
|
|
9
|
+
Platform-specific procedures for Azure DevOps. Referenced from `hatch3r-board-shared`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Platform Detection — Azure DevOps
|
|
14
|
+
|
|
15
|
+
Use `az devops` / `az boards` / `az repos` CLI. Issues = Work Items. PRs = Pull Requests. Board = Azure Boards. Requires `az login` or `AZURE_DEVOPS_PAT`.
|
|
16
|
+
|
|
17
|
+
### CLI Command Reference
|
|
18
|
+
|
|
19
|
+
| Action | Command |
|
|
20
|
+
|--------|---------|
|
|
21
|
+
| Create work item | `az boards work-item create --org https://dev.azure.com/{namespace} --project {project} --type "User Story" --title "..."` |
|
|
22
|
+
| List work items | `az boards query --org https://dev.azure.com/{namespace} --project {project} --wiql "SELECT..."` |
|
|
23
|
+
| View work item | `az boards work-item show --org https://dev.azure.com/{namespace} --id N` |
|
|
24
|
+
| Update work item | `az boards work-item update --org https://dev.azure.com/{namespace} --id N` |
|
|
25
|
+
| Close work item | `az boards work-item update --org https://dev.azure.com/{namespace} --id N --state Closed` |
|
|
26
|
+
| Create PR | `az repos pr create --org https://dev.azure.com/{namespace} --project {project}` |
|
|
27
|
+
| Add tag | `az boards work-item update --id N --fields "System.Tags=x"` |
|
|
28
|
+
| Add comment | `az boards work-item update --id N --discussion "..."` |
|
|
29
|
+
| Board sync | Board column = Work Item State |
|
|
30
|
+
|
|
31
|
+
### MCP Tool Reference
|
|
32
|
+
|
|
33
|
+
| Action | MCP Tool |
|
|
34
|
+
|--------|----------|
|
|
35
|
+
| Create work item | `create_work_item` |
|
|
36
|
+
| Read work item | `get_work_item` |
|
|
37
|
+
| List work items | `list_work_items` |
|
|
38
|
+
| Search work items | `search_work_items` |
|
|
39
|
+
| Add relation | Work Item parent-child relation |
|
|
40
|
+
| Create PR | `create_pull_request` |
|
|
41
|
+
|
|
42
|
+
### Terminology
|
|
43
|
+
|
|
44
|
+
| Concept | Azure DevOps Term |
|
|
45
|
+
|---------|-------------------|
|
|
46
|
+
| Work unit | Work Item |
|
|
47
|
+
| Code review | Pull Request (PR) |
|
|
48
|
+
| Board | Azure Boards |
|
|
49
|
+
| Labels | Tags + Area Paths |
|
|
50
|
+
| Project identifier | `project` name |
|
|
51
|
+
| Status tracking | Work Item State |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Azure DevOps Context
|
|
56
|
+
|
|
57
|
+
Derived from `.agents/hatch.json` board config:
|
|
58
|
+
|
|
59
|
+
- **Organization:** top-level `owner` (maps to Azure DevOps organization name)
|
|
60
|
+
- **Project:** top-level `repo` (maps to Azure DevOps project name)
|
|
61
|
+
- **Default branch:** `board.defaultBranch` (fallback: `"main"`)
|
|
62
|
+
- **Type labels → Work Item Tags:** `board.labels.types` (applied as Tags on work items)
|
|
63
|
+
- **Executor labels → Tags:** `board.labels.executors`
|
|
64
|
+
- **Status labels → Work Item State:** `board.labels.statuses` (mapped to Work Item State field)
|
|
65
|
+
- **Area Paths:** `board.areas` (mapped to Azure DevOps Area Paths)
|
|
66
|
+
- **PR template:** Check `.azuredevops/pull_request_template.md` if present.
|
|
67
|
+
|
|
68
|
+
### Azure DevOps Project Reference (cache for the full run)
|
|
69
|
+
|
|
70
|
+
- **Organization URL:** `https://dev.azure.com/{namespace}`
|
|
71
|
+
- **Project name:** `board.projectNumber` (repurposed as Azure DevOps project name)
|
|
72
|
+
- **Work Item States:** `Backlog` → `New`, `Ready` → `Active`, `In Progress` → `Active`, `In Review` → `Resolved`, `Done` → `Closed`
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Azure Boards Work Item State Sync
|
|
77
|
+
|
|
78
|
+
Azure Boards syncs via Work Item State changes. There is no separate "add to board" step -- work items appear on the board automatically based on their State and Area Path.
|
|
79
|
+
|
|
80
|
+
**Status label → Work Item State mapping:**
|
|
81
|
+
|
|
82
|
+
| Label | Work Item State |
|
|
83
|
+
| -------------------- | --------------- |
|
|
84
|
+
| `status:triage` | `New` |
|
|
85
|
+
| `status:ready` | `Active` |
|
|
86
|
+
| `status:in-progress` | `Active` |
|
|
87
|
+
| `status:in-review` | `Resolved` |
|
|
88
|
+
| `status:blocked` | `New` |
|
|
89
|
+
| (done) | `Closed` |
|
|
90
|
+
|
|
91
|
+
**Steps for each work item to sync:**
|
|
92
|
+
|
|
93
|
+
1. **Update Work Item State:** `az boards work-item update --org https://dev.azure.com/{namespace} --id {N} --state "{state}"` using the label→state mapping above.
|
|
94
|
+
2. **Update Area Path (if area labels changed):** `az boards work-item update --org https://dev.azure.com/{namespace} --id {N} --area-path "{project}\\{area}"`.
|
|
95
|
+
3. **Update Tags:** `az boards work-item update --org https://dev.azure.com/{namespace} --id {N} --fields "System.Tags={comma-separated tags}"`.
|
|
96
|
+
|
|
97
|
+
**MCP fallback:** If `az` CLI fails, fall back to Azure DevOps MCP `update_work_item` with the corresponding state and field values.
|
|
98
|
+
|
|
99
|
+
**For PRs:** PRs are managed via `az repos pr update --id {N} --status active|completed`. Board sync for PRs is automatic in Azure DevOps when linked to work items.
|
|
100
|
+
|
|
101
|
+
**Resilience:** If any call fails, retry once. If it still fails, surface a warning and continue. If `az` CLI and MCP are both unavailable, warn: "Azure Boards sync skipped -- run `az login` or set AZURE_DEVOPS_PAT."
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Sub-Issue Linking — Azure DevOps
|
|
106
|
+
|
|
107
|
+
### Three-Tier Fallback Chain
|
|
108
|
+
|
|
109
|
+
1. **Primary — CLI relation:**
|
|
110
|
+
`az boards work-item relation add --id {child_id} --relation-type "System.LinkTypes.Hierarchy-Reverse" --target-id {parent_id}`.
|
|
111
|
+
Record link status as `native`.
|
|
112
|
+
|
|
113
|
+
2. **Fallback 1 — Comment trace:**
|
|
114
|
+
If relation add fails:
|
|
115
|
+
`az boards work-item update --id {epic} --discussion "Sub-issue: #{child} — {title} (linking failed)"`.
|
|
116
|
+
Record link status as `comment-only`.
|
|
117
|
+
|
|
118
|
+
### Verification
|
|
119
|
+
|
|
120
|
+
After linking, verify via `az boards work-item relation list --id {epic}` and check parent-child relations.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Board Sync Enforcement — Azure DevOps
|
|
125
|
+
|
|
126
|
+
1. **Status updates:** Set via `az boards work-item update --state`.
|
|
127
|
+
2. **Fallback escalation:** `az boards work-item update` CLI → Azure DevOps MCP → surface error to user. Silent skipping is prohibited.
|
|
128
|
+
3. **Board item tracking:** After updating a work item, store the work item ID in the run cache keyed by issue number.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Cross-Cutting Tooling — Azure DevOps CLI-First
|
|
133
|
+
|
|
134
|
+
**Prerequisites:** `az login` must be completed, or `AZURE_DEVOPS_PAT` environment variable set. Run `az devops configure --defaults organization=https://dev.azure.com/{namespace} project={project}` to set defaults.
|
|
135
|
+
|
|
136
|
+
| Operation | Primary (`az` CLI) | Fallback (MCP) |
|
|
137
|
+
| -------------------- | ---------------------------------------------------------------------------------------------- | ---------------------- |
|
|
138
|
+
| List work items | `az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.State] <> 'Closed'"` | `list_work_items` |
|
|
139
|
+
| Read work item | `az boards work-item show --id N` | `get_work_item` |
|
|
140
|
+
| Create work items | `az boards work-item create --type "User Story" --title "..." --description "..."` | `create_work_item` |
|
|
141
|
+
| Update work items | `az boards work-item update --id N --fields "field=value"` | `update_work_item` |
|
|
142
|
+
| Search work items | `az boards query --wiql "SELECT ... WHERE [System.Title] CONTAINS '...'"` | `search_work_items` |
|
|
143
|
+
| Manage relations | `az boards work-item relation add --id N --relation-type "System.LinkTypes.Hierarchy-Forward" --target-id M` | Work Item relation API |
|
|
144
|
+
| Add comments | `az boards work-item update --id N --discussion "..."` | N/A |
|
|
145
|
+
| Create PRs | `az repos pr create --title "..." --source-branch "..." --target-branch "..."` | `create_pull_request` |
|
|
146
|
+
| Read PR details | `az repos pr show --id N` | N/A |
|
|
147
|
+
| Manage tags | `az boards work-item update --id N --fields "System.Tags=tag1; tag2"` | N/A |
|
|
148
|
+
| Board sync | Work Item State updates (automatic board placement) | N/A |
|
|
149
|
+
| CI/Pipelines | `az pipelines run list` / `az pipelines run show` | N/A |
|