hatch3r 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -322
- package/agents/hatch3r-a11y-auditor.md +24 -6
- package/agents/hatch3r-architect.md +20 -1
- package/agents/hatch3r-ci-watcher.md +31 -8
- package/agents/hatch3r-context-rules.md +14 -2
- package/agents/hatch3r-dependency-auditor.md +21 -5
- package/agents/hatch3r-devops.md +37 -6
- package/agents/hatch3r-docs-writer.md +19 -3
- package/agents/hatch3r-fixer.md +171 -0
- package/agents/hatch3r-implementer.md +84 -11
- package/agents/hatch3r-learnings-loader.md +69 -13
- package/agents/hatch3r-lint-fixer.md +19 -14
- package/agents/hatch3r-perf-profiler.md +18 -1
- package/agents/hatch3r-researcher.md +440 -5
- package/agents/hatch3r-reviewer.md +97 -5
- package/agents/hatch3r-security-auditor.md +23 -5
- package/agents/hatch3r-test-writer.md +21 -10
- package/checks/README.md +49 -0
- package/checks/code-quality.md +49 -0
- package/checks/performance.md +58 -0
- package/checks/security.md +58 -0
- package/checks/testing.md +53 -0
- package/commands/board/pickup-azure-devops.md +81 -0
- package/commands/board/pickup-delegation-multi.md +197 -0
- package/commands/board/pickup-delegation.md +100 -0
- package/commands/board/pickup-github.md +82 -0
- package/commands/board/pickup-gitlab.md +81 -0
- package/commands/board/pickup-modes.md +143 -0
- package/commands/board/pickup-post-impl.md +120 -0
- package/commands/board/shared-azure-devops.md +149 -0
- package/commands/board/shared-board-overview.md +215 -0
- package/commands/board/shared-github.md +169 -0
- package/commands/board/shared-gitlab.md +142 -0
- package/commands/hatch3r-agent-customize.md +40 -2
- package/commands/hatch3r-api-spec.md +294 -32
- package/commands/hatch3r-benchmark.md +386 -32
- package/commands/hatch3r-board-fill.md +161 -25
- package/commands/hatch3r-board-groom.md +595 -0
- package/commands/hatch3r-board-init.md +203 -46
- package/commands/hatch3r-board-pickup.md +79 -457
- package/commands/hatch3r-board-refresh.md +98 -27
- package/commands/hatch3r-board-shared.md +87 -238
- package/commands/hatch3r-bug-plan.md +16 -3
- package/commands/hatch3r-codebase-map.md +43 -10
- package/commands/hatch3r-command-customize.md +6 -0
- package/commands/hatch3r-context-health.md +5 -0
- package/commands/hatch3r-cost-tracking.md +5 -0
- package/commands/hatch3r-debug.md +426 -0
- package/commands/hatch3r-dep-audit.md +7 -1
- package/commands/hatch3r-feature-plan.md +74 -12
- package/commands/hatch3r-healthcheck.md +17 -1
- package/commands/hatch3r-hooks.md +16 -10
- package/commands/hatch3r-learn.md +15 -9
- package/commands/hatch3r-migration-plan.md +333 -33
- package/commands/hatch3r-onboard.md +327 -38
- package/commands/hatch3r-project-spec.md +46 -10
- package/commands/hatch3r-quick-change.md +336 -0
- package/commands/hatch3r-recipe.md +6 -0
- package/commands/hatch3r-refactor-plan.md +29 -13
- package/commands/hatch3r-release.md +13 -3
- package/commands/hatch3r-revision.md +395 -0
- package/commands/hatch3r-roadmap.md +18 -3
- package/commands/hatch3r-rule-customize.md +6 -0
- package/commands/hatch3r-security-audit.md +17 -1
- package/commands/hatch3r-skill-customize.md +6 -0
- package/commands/hatch3r-test-plan.md +532 -0
- package/commands/hatch3r-workflow.md +113 -38
- package/dist/cli/index.js +5184 -2593
- package/dist/cli/index.js.map +1 -0
- package/github-agents/hatch3r-docs-agent.md +1 -0
- package/github-agents/hatch3r-lint-agent.md +1 -0
- package/github-agents/hatch3r-security-agent.md +1 -0
- package/github-agents/hatch3r-test-agent.md +1 -0
- package/hooks/hatch3r-ci-failure.md +30 -0
- package/hooks/hatch3r-file-save.md +22 -0
- package/hooks/hatch3r-post-merge.md +23 -0
- package/hooks/hatch3r-pre-commit.md +23 -0
- package/hooks/hatch3r-pre-push.md +22 -0
- package/hooks/hatch3r-session-start.md +22 -0
- package/mcp/mcp.json +22 -3
- package/package.json +4 -7
- package/prompts/hatch3r-bug-triage.md +1 -0
- package/prompts/hatch3r-code-review.md +1 -0
- package/prompts/hatch3r-pr-description.md +1 -0
- package/rules/hatch3r-accessibility-standards.md +1 -0
- package/rules/hatch3r-agent-orchestration.md +326 -53
- package/rules/hatch3r-agent-orchestration.mdc +225 -0
- package/rules/hatch3r-api-design.md +4 -1
- package/rules/hatch3r-browser-verification.md +33 -1
- package/rules/hatch3r-browser-verification.mdc +29 -0
- package/rules/hatch3r-ci-cd.md +5 -1
- package/rules/hatch3r-ci-cd.mdc +4 -1
- package/rules/hatch3r-code-standards.md +18 -0
- package/rules/hatch3r-code-standards.mdc +10 -1
- package/rules/hatch3r-component-conventions.md +4 -1
- package/rules/hatch3r-data-classification.md +1 -0
- package/rules/hatch3r-deep-context.md +94 -0
- package/rules/hatch3r-deep-context.mdc +69 -0
- package/rules/hatch3r-dependency-management.md +13 -0
- package/rules/hatch3r-feature-flags.md +4 -1
- package/rules/hatch3r-git-conventions.md +1 -0
- package/rules/hatch3r-i18n.md +4 -1
- package/rules/hatch3r-learning-consult.md +4 -2
- package/rules/hatch3r-learning-consult.mdc +3 -2
- package/rules/hatch3r-migrations.md +12 -0
- package/rules/hatch3r-observability.md +293 -1
- package/rules/hatch3r-performance-budgets.md +5 -2
- package/rules/hatch3r-performance-budgets.mdc +1 -1
- package/rules/hatch3r-secrets-management.md +11 -3
- package/rules/hatch3r-secrets-management.mdc +10 -3
- package/rules/hatch3r-security-patterns.md +23 -3
- package/rules/hatch3r-security-patterns.mdc +8 -2
- package/rules/hatch3r-testing.md +1 -0
- package/rules/hatch3r-theming.md +4 -1
- package/rules/hatch3r-tooling-hierarchy.md +42 -15
- package/rules/hatch3r-tooling-hierarchy.mdc +27 -4
- package/skills/hatch3r-a11y-audit/SKILL.md +1 -0
- package/skills/hatch3r-agent-customize/SKILL.md +3 -0
- package/skills/hatch3r-api-spec/SKILL.md +1 -0
- package/skills/hatch3r-architecture-review/SKILL.md +6 -2
- package/skills/hatch3r-bug-fix/SKILL.md +4 -1
- package/skills/hatch3r-ci-pipeline/SKILL.md +1 -0
- package/skills/hatch3r-command-customize/SKILL.md +1 -0
- package/skills/hatch3r-context-health/SKILL.md +2 -1
- package/skills/hatch3r-cost-tracking/SKILL.md +1 -0
- package/skills/hatch3r-dep-audit/SKILL.md +6 -2
- package/skills/hatch3r-feature/SKILL.md +9 -2
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +130 -21
- package/skills/hatch3r-incident-response/SKILL.md +11 -5
- package/skills/hatch3r-issue-workflow/SKILL.md +12 -7
- package/skills/hatch3r-logical-refactor/SKILL.md +1 -0
- package/skills/hatch3r-migration/SKILL.md +1 -0
- package/skills/hatch3r-perf-audit/SKILL.md +2 -1
- package/skills/hatch3r-pr-creation/SKILL.md +20 -10
- package/skills/hatch3r-qa-validation/SKILL.md +2 -1
- package/skills/hatch3r-recipe/SKILL.md +1 -0
- package/skills/hatch3r-refactor/SKILL.md +7 -1
- package/skills/hatch3r-release/SKILL.md +15 -11
- package/skills/hatch3r-rule-customize/SKILL.md +1 -0
- package/skills/hatch3r-skill-customize/SKILL.md +1 -0
- package/skills/hatch3r-visual-refactor/SKILL.md +1 -0
- package/dist/cli/hooks-ZOTFDEA3.js +0 -59
- package/rules/hatch3r-error-handling.md +0 -17
- package/rules/hatch3r-error-handling.mdc +0 -15
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: hatch3r-board-init
|
|
3
3
|
type: command
|
|
4
|
-
description: Initialize a GitHub Projects V2
|
|
4
|
+
description: Initialize a project board (GitHub Projects V2, Azure Boards, or GitLab Issue Boards) with hatch3r's label taxonomy, status fields, and board structure. Platform detected from hatch.json.
|
|
5
|
+
tags: [board, team]
|
|
5
6
|
---
|
|
6
|
-
# Board Init -- Bootstrap a GitHub Projects V2 Board
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Agent Pipeline
|
|
9
|
+
|
|
10
|
+
This command runs as a single orchestrator without sub-agent delegation.
|
|
11
|
+
|
|
12
|
+
All board operations MUST follow the Board Sync Enforcement rules defined in `hatch3r-board-shared`.
|
|
13
|
+
|
|
14
|
+
# Board Init -- Bootstrap a Project Board
|
|
15
|
+
|
|
16
|
+
Initialize a new or existing project board for **{owner}/{repo}** (read from `.agents/hatch.json` board config). The `platform` field in `hatch.json` determines whether to set up GitHub Projects V2, Azure Boards, or GitLab Issue Boards. Sets up status fields/states, creates the full hatch3r label/tag taxonomy, optionally migrates issues from another project, and writes all IDs back to `.agents/hatch.json` so subsequent board commands work out of the box. AI proposes configuration; user confirms before any mutation.
|
|
9
17
|
|
|
10
18
|
---
|
|
11
19
|
|
|
12
|
-
## Integration with
|
|
20
|
+
## Integration with Platform Agentic Workflows
|
|
13
21
|
|
|
14
|
-
hatch3r's board commands operate as the **implementation orchestration layer** above
|
|
22
|
+
hatch3r's board commands operate as the **implementation orchestration layer** above platform agentic workflows. While platform-native agentic workflows (GitHub Agentic Workflows, Azure DevOps automations, GitLab Auto DevOps) handle continuous automation (triage, testing, documentation), hatch3r's board commands orchestrate the full delivery pipeline:
|
|
15
23
|
|
|
16
24
|
- **board-init** sets up the project management structure that agentic workflows operate within
|
|
17
25
|
- **board-fill** creates the work items that agentic workflows can triage and label
|
|
26
|
+
- **board-groom** refines existing work items as priorities, scope, and dependencies evolve over time
|
|
18
27
|
- **board-pickup** orchestrates the implementation -> review -> merge pipeline that goes beyond what generic agentic workflows provide
|
|
19
28
|
|
|
20
|
-
|
|
29
|
+
Platform agentic workflows and hatch3r are complementary: use platform workflows for continuous background automation, use hatch3r board commands for structured delivery orchestration.
|
|
21
30
|
|
|
22
31
|
---
|
|
23
32
|
|
|
24
33
|
## Shared Context
|
|
25
34
|
|
|
26
|
-
**Read the `hatch3r-board-shared` command at the start of the run.** It contains Board Configuration,
|
|
35
|
+
**Read the `hatch3r-board-shared` command at the start of the run.** It contains Board Configuration, Platform Detection, Platform Context, Board Sync Procedure, and tooling directives. Cache all values for the duration of this run.
|
|
27
36
|
|
|
28
37
|
## Token-Saving Directives
|
|
29
38
|
|
|
@@ -31,6 +40,20 @@ Follow the **Token-Saving Directives** in `hatch3r-board-shared`.
|
|
|
31
40
|
|
|
32
41
|
---
|
|
33
42
|
|
|
43
|
+
## Quick / Defaults Mode
|
|
44
|
+
|
|
45
|
+
If the user requests quick mode, defaults mode, or passes a `--quick` or `--defaults` flag: use all auto-detected values without prompting and proceed directly to execution with a single confirmation. Specifically:
|
|
46
|
+
|
|
47
|
+
1. Auto-detect owner/repo from `.agents/hatch.json` (skip ASK in 1.1).
|
|
48
|
+
2. Default to "Create new project" if `board.projectNumber` is null (skip ASK in 1.2).
|
|
49
|
+
3. Use `{repo} Board` as the project name (skip ASK in 1.2a).
|
|
50
|
+
4. Auto-detect default branch via `git rev-parse --abbrev-ref origin/HEAD` (skip ASK in 1.2b).
|
|
51
|
+
5. Auto-suggest area labels from top-level source directories (skip ASK in 1.3).
|
|
52
|
+
6. Skip migration (skip ASK in 1.4).
|
|
53
|
+
7. Jump directly to Step 1.6 (Confirm Plan) with all auto-detected values. The user confirms or customizes in a single prompt.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
34
57
|
## Workflow
|
|
35
58
|
|
|
36
59
|
This command runs in two phases: **Planning** (collect all answers) then **Execution** (perform all mutations). No mutations occur until the user confirms the full plan.
|
|
@@ -43,67 +66,86 @@ Collect all configuration choices upfront. No GitHub API calls or file writes in
|
|
|
43
66
|
|
|
44
67
|
#### 1.1: Read Configuration
|
|
45
68
|
|
|
46
|
-
1. Read
|
|
47
|
-
2.
|
|
48
|
-
3.
|
|
49
|
-
4. If either
|
|
69
|
+
1. Read `.agents/hatch.json` and cache the `board` config.
|
|
70
|
+
2. Read `platform` from `.agents/hatch.json`. Default to `github` if missing. Cache for the run.
|
|
71
|
+
3. Resolve owner/repo per `hatch3r-board-shared`: **Use top-level `owner`/`repo` first.** Fall back to `board.owner`/`board.repo` if top-level values are empty.
|
|
72
|
+
4. If both are set (from either source), note: "Using owner=`{owner}`, repo=`{repo}`, platform=`{platform}`."
|
|
73
|
+
5. If either is missing:
|
|
50
74
|
|
|
51
|
-
**ASK:** "I need the
|
|
75
|
+
**ASK:** "I need the owner/namespace and repository/project for this board. Please provide: (1) owner (org/namespace/username), (2) repo/project name."
|
|
52
76
|
|
|
53
77
|
Update the in-memory config with the provided values.
|
|
54
78
|
|
|
55
79
|
#### 1.2: Choose Mode
|
|
56
80
|
|
|
57
|
-
**
|
|
58
|
-
|
|
59
|
-
|
|
81
|
+
**If platform is `github`:**
|
|
82
|
+
1. If `board.projectNumber` is already set in `.agents/hatch.json`, default to **B** (Connect to existing project #{board.projectNumber}).
|
|
83
|
+
2. If `board.projectNumber` is null or missing, default to **A** (Create new).
|
|
84
|
+
|
|
85
|
+
**If platform is `azure-devops`:**
|
|
86
|
+
1. If `board.projectNumber` (repurposed as Azure DevOps project name) is set, default to **B** (Connect to existing Azure Boards project).
|
|
87
|
+
2. If null or missing, default to **A** (Configure new Azure Boards project).
|
|
60
88
|
|
|
61
|
-
|
|
89
|
+
**If platform is `gitlab`:**
|
|
90
|
+
1. If `board.projectNumber` (repurposed as GitLab Board ID) is set, default to **B** (Connect to existing board).
|
|
91
|
+
2. If null or missing, default to **A** (Create new GitLab Issue Board).
|
|
92
|
+
|
|
93
|
+
No separate prompt — the mode is included in the consolidated plan confirmation (Step 1.6) where the user can override it.
|
|
62
94
|
|
|
63
95
|
#### 1.2a: Project Name (when Mode A — Create new)
|
|
64
96
|
|
|
65
|
-
If
|
|
97
|
+
If mode is **A** (Create new), default the project name to `{repo} Board`.
|
|
66
98
|
|
|
67
|
-
**
|
|
99
|
+
**If platform is `azure-devops`:** Use the Azure DevOps project name. If the project already exists in the organization, skip creation and configure the board within the existing project.
|
|
68
100
|
|
|
69
|
-
|
|
101
|
+
No separate prompt — the project name is included in the consolidated plan confirmation (Step 1.6) where the user can override it.
|
|
70
102
|
|
|
71
103
|
#### 1.2b: Default Branch
|
|
72
104
|
|
|
73
|
-
|
|
105
|
+
1. Auto-detect the default branch: run `git rev-parse --abbrev-ref origin/HEAD` and strip the `origin/` prefix. If the command fails (e.g., no remote configured), fall back to `board.defaultBranch` from `.agents/hatch.json`, then to `"main"`.
|
|
106
|
+
2. Record the detected branch name. This value is written to `board.defaultBranch` and used by board-pickup (checkout, PR base) and other agents.
|
|
74
107
|
|
|
75
|
-
|
|
108
|
+
No separate prompt — the detected branch is included in the consolidated plan confirmation (Step 1.6).
|
|
76
109
|
|
|
77
110
|
#### 1.3: Area Labels
|
|
78
111
|
|
|
79
|
-
|
|
112
|
+
1. Auto-suggest area labels from the top-level source directories in the codebase. Scan the repository root and common source roots (`src/`, `packages/`, `apps/`) for top-level directories that represent distinct areas (e.g., `frontend`, `backend`, `api`, `infra`, `cli`, `docs`). Exclude non-area directories (`node_modules`, `.git`, `dist`, `build`, `.github`, `.agents`, `coverage`, `__tests__`).
|
|
113
|
+
2. If `board.areas` already has entries in `.agents/hatch.json`, use those as the default and note the source.
|
|
114
|
+
3. Present the auto-detected areas in the consolidated plan confirmation (Step 1.6) where the user can confirm, add, remove, or skip area labels.
|
|
115
|
+
|
|
116
|
+
No separate prompt — area labels are included in the consolidated plan confirmation (Step 1.6).
|
|
80
117
|
|
|
81
118
|
#### 1.4: Migration
|
|
82
119
|
|
|
83
|
-
|
|
120
|
+
Default to "no migration." If the user needs to migrate issues from an existing project, they can specify it when customizing the plan in Step 1.6.
|
|
121
|
+
|
|
122
|
+
No separate prompt — migration is included in the consolidated plan confirmation (Step 1.6).
|
|
84
123
|
|
|
85
124
|
#### 1.5: Board Overview
|
|
86
125
|
|
|
87
126
|
A board overview issue (labeled `meta:board-overview`) will be created by default. No user prompt needed.
|
|
88
127
|
|
|
89
|
-
#### 1.6: Confirm Plan
|
|
128
|
+
#### 1.6: Confirm Plan (Consolidated)
|
|
129
|
+
|
|
130
|
+
This is the **single user-facing confirmation** for the entire Planning phase. All auto-detected and defaulted values are presented here for the user to confirm or customize in one prompt.
|
|
90
131
|
|
|
91
132
|
Present the full plan summary:
|
|
92
133
|
|
|
93
134
|
```
|
|
94
135
|
Board Init Plan:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
136
|
+
Platform: {platform} (github / azure-devops / gitlab)
|
|
137
|
+
Owner/Namespace:{owner}/{repo}
|
|
138
|
+
Default branch: {defaultBranch} (auto-detected via git / from hatch.json / default)
|
|
139
|
+
Mode: {A: Create new / B: Connect to #{N}} (auto-detected: {reason})
|
|
98
140
|
Project name: {project name, or "N/A" when Mode B}
|
|
99
141
|
Status options: Backlog, Ready, In Progress, In Review, Done
|
|
100
|
-
Label taxonomy: {count} labels (types, executors, statuses, priorities, risks, meta)
|
|
101
|
-
Area labels: {list or "none"}
|
|
102
|
-
Migration: {from Project #X / "none"}
|
|
142
|
+
Label taxonomy: {count} labels/tags (types, executors, statuses, priorities, risks, meta)
|
|
143
|
+
Area labels: {auto-detected list or "none"} (source: {codebase scan / hatch.json / none})
|
|
144
|
+
Migration: {from Project #X / "none" (default)}
|
|
103
145
|
Board overview: yes (default)
|
|
104
146
|
```
|
|
105
147
|
|
|
106
|
-
**ASK:** "Here is the full board init plan. Confirm to begin execution, or
|
|
148
|
+
**ASK:** "Here is the full board init plan with auto-detected values. Confirm to begin execution, or specify any settings to customize (e.g., 'change branch to master', 'add area: mobile', 'use existing project #5', 'migrate from project #3')."
|
|
107
149
|
|
|
108
150
|
---
|
|
109
151
|
|
|
@@ -113,7 +155,11 @@ Execute all planned mutations in sequence. No further questions unless a mutatio
|
|
|
113
155
|
|
|
114
156
|
#### 2.1: Create or Connect Project
|
|
115
157
|
|
|
116
|
-
|
|
158
|
+
**Platform-specific: Project creation/connection**
|
|
159
|
+
|
|
160
|
+
**If platform is `github`:**
|
|
161
|
+
|
|
162
|
+
##### Option A — Create New GitHub Projects V2 Board
|
|
117
163
|
|
|
118
164
|
1. Fetch the repository node ID:
|
|
119
165
|
```graphql
|
|
@@ -130,7 +176,7 @@ Execute all planned mutations in sequence. No further questions unless a mutatio
|
|
|
130
176
|
```
|
|
131
177
|
3. Capture the project `id` (node ID) and `number` from the response.
|
|
132
178
|
|
|
133
|
-
##### Option B — Connect to Existing Project
|
|
179
|
+
##### Option B — Connect to Existing GitHub Project
|
|
134
180
|
|
|
135
181
|
1. Query the existing project:
|
|
136
182
|
```graphql
|
|
@@ -139,7 +185,51 @@ Execute all planned mutations in sequence. No further questions unless a mutatio
|
|
|
139
185
|
Use `organization` instead of `user` if the owner is an org. Try `user` first; if it fails, retry with `organization`.
|
|
140
186
|
2. Capture the project `id` and `number`.
|
|
141
187
|
|
|
142
|
-
|
|
188
|
+
**If platform is `azure-devops`:**
|
|
189
|
+
|
|
190
|
+
##### Option A — Configure Azure Boards Project
|
|
191
|
+
|
|
192
|
+
1. Verify the Azure DevOps organization and project exist:
|
|
193
|
+
```bash
|
|
194
|
+
az devops project show --org https://dev.azure.com/{namespace} --project {project}
|
|
195
|
+
```
|
|
196
|
+
2. If the project does not exist, create it:
|
|
197
|
+
```bash
|
|
198
|
+
az devops project create --org https://dev.azure.com/{namespace} --name "{project_name}" --source-control git --process Agile
|
|
199
|
+
```
|
|
200
|
+
3. Configure defaults: `az devops configure --defaults organization=https://dev.azure.com/{namespace} project={project}`.
|
|
201
|
+
4. Capture the project name for `board.projectNumber`.
|
|
202
|
+
|
|
203
|
+
##### Option B — Connect to Existing Azure DevOps Project
|
|
204
|
+
|
|
205
|
+
1. Verify the project exists: `az devops project show --org https://dev.azure.com/{namespace} --project {project}`.
|
|
206
|
+
2. Capture the project name.
|
|
207
|
+
|
|
208
|
+
**If platform is `gitlab`:**
|
|
209
|
+
|
|
210
|
+
##### Option A — Create New GitLab Issue Board
|
|
211
|
+
|
|
212
|
+
1. Verify the GitLab project exists:
|
|
213
|
+
```bash
|
|
214
|
+
glab repo view {namespace}/{project}
|
|
215
|
+
```
|
|
216
|
+
2. Create a new issue board:
|
|
217
|
+
```bash
|
|
218
|
+
glab api projects/{project_id}/boards --method POST --field name="{project_name}"
|
|
219
|
+
```
|
|
220
|
+
Where `{project_id}` is the numeric GitLab project ID (obtain via `glab api projects/{namespace}%2F{project} --jq '.id'`).
|
|
221
|
+
3. Capture the board ID for `board.projectNumber`.
|
|
222
|
+
|
|
223
|
+
##### Option B — Connect to Existing GitLab Board
|
|
224
|
+
|
|
225
|
+
1. List existing boards: `glab api projects/{project_id}/boards --jq '.[].id'`.
|
|
226
|
+
2. Capture the board ID.
|
|
227
|
+
|
|
228
|
+
#### 2.2: Configure Status Field / States
|
|
229
|
+
|
|
230
|
+
**Platform-specific: Status configuration**
|
|
231
|
+
|
|
232
|
+
**If platform is `github`:**
|
|
143
233
|
|
|
144
234
|
1. Query the project's fields to find the "Status" single-select field:
|
|
145
235
|
```graphql
|
|
@@ -163,9 +253,29 @@ Execute all planned mutations in sequence. No further questions unless a mutatio
|
|
|
163
253
|
- For missing options, use the `updateProjectV2Field` mutation (or the appropriate mutation for adding options to a single-select field) to add them.
|
|
164
254
|
5. Capture the field ID and each option's ID.
|
|
165
255
|
|
|
256
|
+
**If platform is `azure-devops`:**
|
|
257
|
+
|
|
258
|
+
1. Azure Boards uses Work Item States (not a custom field). Verify the process template supports the required states by querying:
|
|
259
|
+
```bash
|
|
260
|
+
az boards work-item type list --org https://dev.azure.com/{namespace} --project {project}
|
|
261
|
+
```
|
|
262
|
+
2. Map hatch3r statuses to Work Item States: **Backlog** → `New`, **Ready** → `Active`, **In Progress** → `Active`, **In Review** → `Resolved`, **Done** → `Closed`.
|
|
263
|
+
3. If using a custom process, verify these states exist. Azure DevOps built-in processes (Agile, Scrum, CMMI) include these states by default.
|
|
264
|
+
4. Store the state mapping in `board.statusOptions` for use by other board commands.
|
|
265
|
+
|
|
266
|
+
**If platform is `gitlab`:**
|
|
267
|
+
|
|
268
|
+
1. GitLab Boards use label-based lists. Create board lists for each status:
|
|
269
|
+
```bash
|
|
270
|
+
glab api projects/{project_id}/boards/{board_id}/lists --method POST --field label_id={label_id}
|
|
271
|
+
```
|
|
272
|
+
2. Create scoped labels for each status first (see Step 2.3), then create board lists referencing those labels.
|
|
273
|
+
3. Required board lists: **Backlog** (`status::triage`), **Ready** (`status::ready`), **In Progress** (`status::in-progress`), **In Review** (`status::in-review`).
|
|
274
|
+
4. Store the board list IDs in `board.statusOptions`.
|
|
275
|
+
|
|
166
276
|
#### 2.3: Create Label Taxonomy
|
|
167
277
|
|
|
168
|
-
1. Read the label taxonomy from `board.labels` in
|
|
278
|
+
1. Read the label taxonomy from `board.labels` in `.agents/hatch.json`.
|
|
169
279
|
2. If labels are not defined or empty, use these defaults:
|
|
170
280
|
|
|
171
281
|
| Category | Labels |
|
|
@@ -177,7 +287,18 @@ Execute all planned mutations in sequence. No further questions unless a mutatio
|
|
|
177
287
|
| Risk | `risk:low`, `risk:med`, `risk:high` |
|
|
178
288
|
| Meta | `meta:board-overview`, `has-dependencies` |
|
|
179
289
|
|
|
180
|
-
3.
|
|
290
|
+
3. **Platform-specific: Label/tag creation**
|
|
291
|
+
|
|
292
|
+
**If platform is `github`:**
|
|
293
|
+
- For each label, check if it already exists using `gh label list -R {owner}/{repo}` (or `get_label` / `list_labels` MCP). Create only missing labels via `gh label create -R {owner}/{repo} --name "{label}" --color "{hex}"` (or `create_label` MCP).
|
|
294
|
+
|
|
295
|
+
**If platform is `azure-devops`:**
|
|
296
|
+
- Azure DevOps uses Tags on work items (no separate label creation step). Tags are created automatically when first applied to a work item. Note the intended tag taxonomy for use in subsequent commands.
|
|
297
|
+
- For Area Paths, create them via: `az boards area project create --org https://dev.azure.com/{namespace} --project {project} --name "{area}"`.
|
|
298
|
+
|
|
299
|
+
**If platform is `gitlab`:**
|
|
300
|
+
- For each label, check if it already exists using `glab label list -R {namespace}/{project}`. Create only missing labels via `glab label create -R {namespace}/{project} --name "{label}" --color "{hex}"`.
|
|
301
|
+
- Use GitLab scoped label format: `status::ready` instead of `status:ready`, `type::bug` instead of `type:bug`.
|
|
181
302
|
4. Use consistent colors per category:
|
|
182
303
|
|
|
183
304
|
| Category | Color scheme | Hex examples |
|
|
@@ -190,11 +311,16 @@ Execute all planned mutations in sequence. No further questions unless a mutatio
|
|
|
190
311
|
| `meta:*` / `has-dependencies` | Gray | `#BFD4F2`, `#C5DEF5` |
|
|
191
312
|
|
|
192
313
|
5. If the user requested area labels (from Phase 1, step 1.3), create `area:{name}` labels for each (teal/cyan color, e.g., `#006B75`). Add area names to `board.areas` in the in-memory config.
|
|
314
|
+
- **Azure DevOps:** Also create Area Paths via `az boards area project create`.
|
|
193
315
|
|
|
194
316
|
#### 2.4: Migrate from Existing Project
|
|
195
317
|
|
|
196
318
|
Skip if the user chose "no" in Phase 1, step 1.4.
|
|
197
319
|
|
|
320
|
+
**Platform-specific: Migration procedure**
|
|
321
|
+
|
|
322
|
+
**If platform is `github`:**
|
|
323
|
+
|
|
198
324
|
1. Query the source project to get all items:
|
|
199
325
|
```graphql
|
|
200
326
|
query {
|
|
@@ -224,6 +350,20 @@ Skip if the user chose "no" in Phase 1, step 1.4.
|
|
|
224
350
|
3. Map the source project's status to the new project's status options (best-effort string matching: exact match first, then case-insensitive, then substring). Update each migrated item's status on the new board using the `updateProjectV2ItemFieldValue` mutation.
|
|
225
351
|
4. Report migration results in the execution log.
|
|
226
352
|
|
|
353
|
+
**If platform is `azure-devops`:**
|
|
354
|
+
|
|
355
|
+
1. Query work items from the source project: `az boards query --org https://dev.azure.com/{namespace} --project {source_project} --wiql "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems"`.
|
|
356
|
+
2. For each work item, create a copy in the target project: `az boards work-item create --org https://dev.azure.com/{namespace} --project {project} --type "User Story" --title "{title}" --description "{description}"`.
|
|
357
|
+
3. Map states from the source to the target project. Update each migrated item's state.
|
|
358
|
+
4. Report migration results.
|
|
359
|
+
|
|
360
|
+
**If platform is `gitlab`:**
|
|
361
|
+
|
|
362
|
+
1. List issues from the source project: `glab issue list -R {source_namespace}/{source_project} --all`.
|
|
363
|
+
2. For each issue, create a copy in the target project: `glab issue create -R {namespace}/{project} --title "{title}" --description "{description}" --label "{labels}"`.
|
|
364
|
+
3. Transfer labels and assignees. Update board labels to match the target board's lists.
|
|
365
|
+
4. Report migration results.
|
|
366
|
+
|
|
227
367
|
#### 2.5: Write Configuration Back
|
|
228
368
|
|
|
229
369
|
1. Prepare the updated config with all captured IDs:
|
|
@@ -242,9 +382,23 @@ Skip if the user chose "no" in Phase 1, step 1.4.
|
|
|
242
382
|
|
|
243
383
|
#### 2.6: Create Board Overview Issue
|
|
244
384
|
|
|
245
|
-
|
|
385
|
+
**Platform-specific: Search for existing overview issue**
|
|
386
|
+
|
|
387
|
+
**If platform is `github`:**
|
|
388
|
+
1. Search for an existing open issue labeled `meta:board-overview` via `gh search issues -R {owner}/{repo} "label:meta:board-overview state:open"` (fall back to `search_issues` MCP).
|
|
389
|
+
|
|
390
|
+
**If platform is `azure-devops`:**
|
|
391
|
+
1. Search for an existing work item tagged `meta:board-overview`: `az boards query --org https://dev.azure.com/{namespace} --project {project} --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.Tags] CONTAINS 'meta:board-overview' AND [System.State] <> 'Closed'"`.
|
|
392
|
+
|
|
393
|
+
**If platform is `gitlab`:**
|
|
394
|
+
1. Search for an existing open issue labeled `meta:board-overview`: `glab issue list -R {namespace}/{project} --label "meta:board-overview" --state opened`.
|
|
395
|
+
|
|
246
396
|
2. **If found:** Skip creation. One board overview issue at a time. Proceed to Step 2.7.
|
|
247
|
-
3. **If not found:** Create
|
|
397
|
+
3. **If not found:** Create a board overview issue:
|
|
398
|
+
|
|
399
|
+
**If platform is `github`:** Use `gh issue create -R {owner}/{repo}` or `issue_write` MCP with `method: create`.
|
|
400
|
+
**If platform is `azure-devops`:** Use `az boards work-item create --org https://dev.azure.com/{namespace} --project {project} --type "User Story" --title "..." --fields "System.Tags=meta:board-overview"`.
|
|
401
|
+
**If platform is `gitlab`:** Use `glab issue create -R {namespace}/{project} --label "meta:board-overview"`.
|
|
248
402
|
- **Title:** `[Board Overview] {repo} Project Board`
|
|
249
403
|
- **Labels:** `meta:board-overview`
|
|
250
404
|
- **Body:**
|
|
@@ -279,7 +433,7 @@ No ready issues yet. Run `board-fill` to populate the board.
|
|
|
279
433
|
*This issue is auto-maintained by hatch3r board commands. Do not close.*
|
|
280
434
|
```
|
|
281
435
|
|
|
282
|
-
4. If an issue was created in step 3,
|
|
436
|
+
4. If an issue was created in step 3, sync it to the board using the **Board Sync Procedure** from `hatch3r-board-shared` and set its status to **Backlog**.
|
|
283
437
|
|
|
284
438
|
#### 2.7: Summary
|
|
285
439
|
|
|
@@ -293,23 +447,26 @@ Board Init Complete:
|
|
|
293
447
|
Areas: [list or "none"]
|
|
294
448
|
Migration: N issues migrated from Project #X (or "skipped")
|
|
295
449
|
Board overview: #{issueNumber}
|
|
296
|
-
Config:
|
|
450
|
+
Config: .agents/hatch.json updated
|
|
297
451
|
```
|
|
298
452
|
|
|
299
453
|
---
|
|
300
454
|
|
|
301
455
|
## Error Handling
|
|
302
456
|
|
|
303
|
-
- **
|
|
304
|
-
- **
|
|
457
|
+
- **API/CLI failure:** Report the error and suggest checking authentication:
|
|
458
|
+
- **GitHub:** Check GitHub PAT permissions (must include `project` scope for Projects V2). For gh CLI: run `gh auth refresh -s project`.
|
|
459
|
+
- **Azure DevOps:** Check `az login` status or `AZURE_DEVOPS_PAT`. Verify organization/project access.
|
|
460
|
+
- **GitLab:** Check `glab auth login` status or `GITLAB_TOKEN`. Verify project access.
|
|
461
|
+
- **Label/tag creation failure:** Report the failing label, continue with remaining labels. Summarize failures at end.
|
|
305
462
|
- **Migration failure:** Report per-item, continue with remaining items. Summarize at end.
|
|
306
463
|
- **Never create or mutate without user confirmation.**
|
|
307
464
|
|
|
308
465
|
## Guardrails
|
|
309
466
|
|
|
310
|
-
- **Never modify or delete existing labels.** Only create missing ones.
|
|
311
|
-
- **Never remove issues from existing projects.** Migration is additive only.
|
|
467
|
+
- **Never modify or delete existing labels/tags.** Only create missing ones.
|
|
468
|
+
- **Never remove issues/work items from existing projects.** Migration is additive only.
|
|
312
469
|
- **Collect all choices in Phase 1 before any mutations in Phase 2.**
|
|
313
470
|
- **Never skip Planning questions or the plan confirmation step.**
|
|
314
|
-
- **Require
|
|
315
|
-
- **Preserve existing
|
|
471
|
+
- **Require proper authentication** for the configured platform. If mutations fail with permission errors, surface platform-specific auth requirements.
|
|
472
|
+
- **Preserve existing `.agents/hatch.json` content** outside the `board` key when writing config back.
|