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-shared
3
3
  type: shared-context
4
- description: Shared context and procedures for all board commands. Provides GitHub context from hatch.json, Projects v2 sync, and tooling directives.
4
+ description: Shared context and procedures for all board commands. Provides platform-agnostic board config, label taxonomy, branch conventions, sync enforcement, and tooling directives. Platform-specific details are in commands/board/shared-{platform}.md.
5
+ tags: [board, team]
5
6
  ---
6
7
  # Board Shared Reference
7
8
 
@@ -13,6 +14,31 @@ This command provides shared context and procedures for board commands. It does
13
14
 
14
15
  ---
15
16
 
17
+ ## Prerequisite Check (run at the start of every board command)
18
+
19
+ Before reading configuration, validate that prerequisites are met. If any check fails, stop immediately with an actionable error message.
20
+
21
+ 1. **hatch.json exists:** If `.agents/hatch.json` is missing or unreadable, stop with:
22
+ > "Board commands require a hatch3r project. Run `npx hatch3r init` to set up your project first."
23
+
24
+ 2. **owner/repo configured:** If both top-level `owner`/`repo` and `board.owner`/`board.repo` are empty, stop with:
25
+ > "Board commands require owner and repo. Run `npx hatch3r config` to set your repository identity, or provide them in `.agents/hatch.json` under the top-level `owner` and `repo` fields."
26
+
27
+ 3. **Platform authentication:** Verify CLI authentication for the configured platform:
28
+ - **GitHub:** Run `gh auth status`. If it fails, stop with: "GitHub CLI not authenticated. Run `gh auth login` and ensure your PAT has the `project` scope for Projects V2 access. See: https://docs.github.com/en/issues/planning-and-tracking-with-projects"
29
+ - **Azure DevOps:** Run `az account show`. If it fails, stop with: "Azure CLI not authenticated. Run `az login` or set AZURE_DEVOPS_PAT. Ensure access to organization `{namespace}`."
30
+ - **GitLab:** Run `glab auth status`. If it fails, stop with: "GitLab CLI not authenticated. Run `glab auth login` or set GITLAB_TOKEN. Ensure access to project `{namespace}/{project}`."
31
+
32
+ 4. **projectNumber set (for commands other than board-init):** For `board-fill`, `board-groom`, `board-pickup`, and `board-refresh`, if `board.projectNumber` is null, stop with:
33
+ > "No project board configured. Run the `board-init` command first to create or connect a project board. This sets up the board.projectNumber in `.agents/hatch.json`."
34
+
35
+ 5. **GitHub PAT project scope (GitHub only, for board-init/fill/groom/pickup):** If GitHub mutations fail with permission errors, surface:
36
+ > "GitHub Projects V2 requires the `project` scope on your PAT. Run `gh auth refresh -s project` to add it. Classic PATs need `admin:org` for org-owned projects."
37
+
38
+ Report each failed prerequisite with the specific fix command. Do not proceed past the first failure.
39
+
40
+ ---
41
+
16
42
  ## Board Configuration
17
43
 
18
44
  All board commands read project-specific configuration from `.agents/hatch.json`. The GitHub owner and repo are defined at the top level (`owner`, `repo`). Board-specific configuration (Projects v2 IDs, label taxonomy, branch conventions, area labels) lives under the `board` key. **Read `.agents/hatch.json` at the start of every run and cache both top-level and `board` config for the duration.**
@@ -58,7 +84,7 @@ All board commands read project-specific configuration from `.agents/hatch.json`
58
84
 
59
85
  If any field is `null` or missing, the corresponding feature is disabled (e.g., null `projectNumber` → skip Projects v2 sync).
60
86
 
61
- **`models`** — Optional. Preferred AI models for agents. `models.default` applies to all agents; `models.agents` overrides per agent. Use aliases (`opus`, `sonnet`, `codex`, `gemini-pro`) or full model IDs. Resolution order: `.hatch3r/agents/{id}.customize.yaml` > manifest per-agent > agent frontmatter > manifest default. See [docs/model-selection.md](../docs/model-selection.md) and [docs/adapter-capability-matrix.md](../docs/adapter-capability-matrix.md#agent-model-customization).
87
+ **`models`** — Optional. Preferred AI models for agents. `models.default` applies to all agents; `models.agents` overrides per agent. Use aliases (`opus`, `sonnet`, `codex`, `gemini-pro`) or full model IDs. Resolution order: `.hatch3r/agents/{id}.customize.yaml` > manifest per-agent > agent frontmatter > manifest default. See [Model Selection](https://docs.hatch3r.com/docs/guides/model-selection) and [Adapter Capability Matrix](https://docs.hatch3r.com/docs/reference/adapter-capability-matrix#agent-model-customization).
62
88
 
63
89
  ---
64
90
 
@@ -66,119 +92,11 @@ If any field is `null` or missing, the corresponding feature is disabled (e.g.,
66
92
 
67
93
  Read `platform` from `.agents/hatch.json`. This determines all CLI commands, API patterns, and terminology for this run. If `platform` is missing or empty, default to `github`.
68
94
 
69
- - **If platform is `github`:** Use `gh` CLI and GitHub MCP tools. Issues = GitHub Issues. PRs = Pull Requests. Board = Projects V2.
70
- - **If platform is `azure-devops`:** Use `az devops` / `az boards` / `az repos` CLI. Issues = Work Items. PRs = Pull Requests. Board = Azure Boards. Requires `az login` or `AZURE_DEVOPS_PAT`.
71
- - **If platform is `gitlab`:** Use `glab` CLI. Issues = GitLab Issues. PRs = Merge Requests (MRs). Board = GitLab Issue Boards. Requires `glab auth login` or `GITLAB_TOKEN`.
72
-
73
- ### Platform CLI Command Reference
74
-
75
- | Action | GitHub (`gh`) | Azure DevOps (`az`) | GitLab (`glab`) |
76
- |--------|---------------|---------------------|-----------------|
77
- | Create work item | `gh issue create -R {owner}/{repo}` | `az boards work-item create --org https://dev.azure.com/{namespace} --project {project} --type "User Story" --title "..."` | `glab issue create -R {namespace}/{project}` |
78
- | List work items | `gh issue list -R {owner}/{repo}` | `az boards query --org https://dev.azure.com/{namespace} --project {project} --wiql "SELECT..."` | `glab issue list -R {namespace}/{project}` |
79
- | View work item | `gh issue view N -R {owner}/{repo}` | `az boards work-item show --org https://dev.azure.com/{namespace} --id N` | `glab issue view N -R {namespace}/{project}` |
80
- | Update work item | `gh issue edit N -R {owner}/{repo}` | `az boards work-item update --org https://dev.azure.com/{namespace} --id N` | `glab issue update N -R {namespace}/{project}` |
81
- | Close work item | `gh issue close N -R {owner}/{repo}` | `az boards work-item update --org https://dev.azure.com/{namespace} --id N --state Closed` | `glab issue close N -R {namespace}/{project}` |
82
- | Create PR/MR | `gh pr create -R {owner}/{repo}` | `az repos pr create --org https://dev.azure.com/{namespace} --project {project}` | `glab mr create -R {namespace}/{project}` |
83
- | Add label/tag | `gh issue edit N --add-label "x"` | `az boards work-item update --id N --fields "System.Tags=x"` | `glab issue update N --label "x"` |
84
- | Add comment | `gh issue comment N -R {owner}/{repo}` | `az boards work-item update --id N --discussion "..."` | `glab issue note N -R {namespace}/{project}` |
85
- | Board sync | `gh project item-add`, GraphQL | Board column = Work Item State | Board list = label-based |
86
-
87
- ### Platform MCP Tool Reference
88
-
89
- | Action | GitHub MCP | Azure DevOps MCP | GitLab MCP |
90
- |--------|-----------|-----------------|------------|
91
- | Create issue/work item | `issue_write` | `create_work_item` | (use `glab` CLI) |
92
- | Read issue/work item | `issue_read` | `get_work_item` | (use `glab` CLI) |
93
- | List issues/work items | `list_issues` | `list_work_items` | (use `glab` CLI) |
94
- | Search issues/work items | `search_issues` | `search_work_items` | (use `glab` CLI) |
95
- | Add sub-issue/relation | `sub_issue_write` | Work Item parent-child relation | (use `glab` CLI) |
96
- | Create PR/MR | `create_pull_request` | `create_pull_request` | (use `glab` CLI) |
97
-
98
- ### Platform Terminology
99
-
100
- Throughout this document and all board commands, the following terms are platform-dependent:
101
-
102
- | Concept | GitHub | Azure DevOps | GitLab |
103
- |---------|--------|--------------|--------|
104
- | Work unit | Issue | Work Item | Issue |
105
- | Code review | Pull Request (PR) | Pull Request (PR) | Merge Request (MR) |
106
- | Board | Projects V2 | Azure Boards | GitLab Issue Boards |
107
- | Labels | Labels | Tags + Area Paths | Labels |
108
- | Project identifier | `projectNumber` | `project` name | project ID |
109
- | Status tracking | Projects V2 Status field | Work Item State | Board lists/labels |
110
-
111
- ---
112
-
113
- ## Platform Context
114
-
115
- Derived from `.agents/hatch.json` board config. Field names refer to the GitHub terminology by default; platform detection maps them to the appropriate platform equivalents.
116
-
117
- **If platform is `github`:**
118
-
119
- ### GitHub Context
95
+ > Platform-specific details: see `commands/board/shared-github.md`
96
+ > Platform-specific details: see `commands/board/shared-azure-devops.md`
97
+ > Platform-specific details: see `commands/board/shared-gitlab.md`
120
98
 
121
- Derived from `.agents/hatch.json` board config:
122
-
123
- - **Owner:** top-level `owner` (fallback: `board.owner`)
124
- - **Repository:** top-level `repo` (fallback: `board.repo`)
125
- - **Default branch:** `board.defaultBranch` (fallback: `"main"`)
126
- - **Type labels:** `board.labels.types`
127
- - **Executor labels:** `board.labels.executors`
128
- - **Status labels:** `board.labels.statuses`
129
- - **Dependency label:** `has-dependencies`
130
- - **Meta labels:** `board.labels.meta`
131
- - **Branch convention:** `board.branchConvention`
132
- - **Issue templates:** Check `.github/ISSUE_TEMPLATE/` if present in the repository.
133
- - **PR template:** Check `.github/PULL_REQUEST_TEMPLATE.md` if present.
134
-
135
- #### GitHub Project Reference (cache for the full run)
136
-
137
- If `board.projectNumber` is not null, verify via `gh project view {board.projectNumber} --owner {board.owner}` or `gh project field-list {board.projectNumber} --owner {board.owner}` on first use.
138
-
139
- - **Owner:** `board.owner`, **owner type:** infer from context (`org` or `user`)
140
- - **Project number:** `board.projectNumber`
141
- - **Status field ID:** `board.statusFieldId`
142
- - **Status option IDs:** Read from `board.statusOptions` (keys: `backlog`, `ready`, `inProgress`, `inReview`, `done`)
143
-
144
- **If platform is `azure-devops`:**
145
-
146
- ### Azure DevOps Context
147
-
148
- - **Organization:** top-level `owner` (maps to Azure DevOps organization name)
149
- - **Project:** top-level `repo` (maps to Azure DevOps project name)
150
- - **Default branch:** `board.defaultBranch` (fallback: `"main"`)
151
- - **Type labels → Work Item Tags:** `board.labels.types` (applied as Tags on work items)
152
- - **Executor labels → Tags:** `board.labels.executors`
153
- - **Status labels → Work Item State:** `board.labels.statuses` (mapped to Work Item State field)
154
- - **Area Paths:** `board.areas` (mapped to Azure DevOps Area Paths)
155
- - **PR template:** Check `.azuredevops/pull_request_template.md` if present.
156
-
157
- #### Azure DevOps Project Reference (cache for the full run)
158
-
159
- - **Organization URL:** `https://dev.azure.com/{namespace}`
160
- - **Project name:** `board.projectNumber` (repurposed as Azure DevOps project name)
161
- - **Work Item States:** `Backlog` → `New`, `Ready` → `Active`, `In Progress` → `Active`, `In Review` → `Resolved`, `Done` → `Closed`
162
-
163
- **If platform is `gitlab`:**
164
-
165
- ### GitLab Context
166
-
167
- - **Namespace:** top-level `owner` (GitLab group or user namespace)
168
- - **Project:** top-level `repo` (GitLab project name)
169
- - **Default branch:** `board.defaultBranch` (fallback: `"main"`)
170
- - **Type labels:** `board.labels.types`
171
- - **Executor labels:** `board.labels.executors`
172
- - **Status labels:** `board.labels.statuses`
173
- - **Scoped labels:** GitLab supports scoped labels (`status::ready`, `type::bug`). Map hatch3r label format (`status:ready`) to GitLab scoped format (`status::ready`) when creating labels.
174
- - **Issue templates:** Check `.gitlab/issue_templates/` if present.
175
- - **MR template:** Check `.gitlab/merge_request_templates/` if present.
176
-
177
- #### GitLab Project Reference (cache for the full run)
178
-
179
- - **Project path:** `{namespace}/{project}`
180
- - **Board:** GitLab Issue Boards use label-based lists. Each status maps to a board list label.
181
- - **Board ID:** `board.projectNumber` (repurposed as GitLab Board ID if configured)
99
+ Each platform sub-file contains: CLI command reference, MCP tool reference, terminology mapping, platform context, board sync procedure, sub-issue linking, board sync enforcement details, and CLI-first tooling directives.
182
100
 
183
101
  ---
184
102
 
@@ -188,94 +106,21 @@ If `board.projectNumber` is not null, verify via `gh project view {board.project
188
106
 
189
107
  Use this procedure whenever a status label is set or changes and the board needs to reflect it. Labels are the source of truth; board sync keeps the board view consistent. This includes newly created issues -- sync their initial status immediately after adding them to the board.
190
108
 
191
- **If platform is `github`:**
192
-
193
- ### GitHub Projects V2 Sync
194
-
195
- **Prerequisites:** `gh auth refresh -s project` (Projects v2 via gh requires the `project` scope). gh CLI 2.40+ recommended.
109
+ > Platform-specific details: see `commands/board/shared-github.md` (GitHub Projects V2 Sync)
110
+ > Platform-specific details: see `commands/board/shared-azure-devops.md` (Azure Boards Work Item State Sync)
111
+ > Platform-specific details: see `commands/board/shared-gitlab.md` (GitLab Board Label-Based Sync)
196
112
 
197
- **Status label → Projects v2 option mapping:**
198
-
199
- Read the mapping from `board.statusOptions` in `.agents/hatch.json`:
200
-
201
- | Label | Option ID from hatch.json |
202
- | -------------------- | ---------------------------------- |
203
- | `status:triage` | `board.statusOptions.backlog` |
204
- | `status:ready` | `board.statusOptions.ready` |
205
- | `status:in-progress` | `board.statusOptions.inProgress` |
206
- | `status:in-review` | `board.statusOptions.inReview` |
207
- | `status:blocked` | `board.statusOptions.backlog` |
208
-
209
- **Steps for each issue to sync (gh CLI primary):**
210
-
211
- 1. **Resolve project node ID** (once per run, cache for the run): `gh project view {board.projectNumber} --owner {board.owner} --format json -q '.id'`. Required for step 3.
212
- 2. **Add to board + capture item ID:** `gh project item-add {board.projectNumber} --owner {board.owner} --url https://github.com/{board.owner}/{board.repo}/issues/{N} --format json -q '.id'`. **Capture the item ID from the output.** This call is idempotent -- if the item already exists on the board it returns the existing item with its ID.
213
- 3. **Update status:** `gh project item-edit --id {item_id} --project-id {project_node_id} --field-id {board.statusFieldId} --single-select-option-id {option_id}` using the label→option mapping from the table above.
214
- 4. **Verify (first sync per run only):** After step 3, optionally confirm via `gh project item-list {board.projectNumber} --owner {board.owner} --format json` that the item's status matches. If it does not, retry step 3 once.
215
-
216
- **For PRs:** Use `--url https://github.com/{board.owner}/{board.repo}/pull/{N}` in step 2.
217
-
218
- **Fallback (rare):** If item-add does not return an item ID, use `gh project item-list {board.projectNumber} --owner {board.owner} --format json` and match by issue/PR content to obtain the item ID. Then proceed with step 3.
219
-
220
- **MCP fallback:** If gh CLI fails, `project` scope is unavailable, or gh version is too old, fall back to `projects_write` / `projects_get` / `projects_list` with `method: add_project_item`, `method: update_project_item`, `method: get_project_item`, `method: list_project_items` as in the legacy procedure.
221
-
222
- **Resilience:** If any call fails, retry once. If it still fails, surface a warning to the user and continue with the next item. If gh CLI and MCP are both unavailable, skip sync silently and warn: "Projects v2 sync skipped -- run `gh auth refresh -s project` or enable the `projects` toolset in your MCP configuration."
223
-
224
- **If platform is `azure-devops`:**
225
-
226
- ### Azure Boards Work Item State Sync
227
-
228
- 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.
229
-
230
- **Status label → Work Item State mapping:**
231
-
232
- | Label | Work Item State |
233
- | -------------------- | --------------- |
234
- | `status:triage` | `New` |
235
- | `status:ready` | `Active` |
236
- | `status:in-progress` | `Active` |
237
- | `status:in-review` | `Resolved` |
238
- | `status:blocked` | `New` |
239
- | (done) | `Closed` |
240
-
241
- **Steps for each work item to sync:**
242
-
243
- 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.
244
- 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}"`.
245
- 3. **Update Tags:** `az boards work-item update --org https://dev.azure.com/{namespace} --id {N} --fields "System.Tags={comma-separated tags}"`.
246
-
247
- **MCP fallback:** If `az` CLI fails, fall back to Azure DevOps MCP `update_work_item` with the corresponding state and field values.
248
-
249
- **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.
250
-
251
- **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."
252
-
253
- **If platform is `gitlab`:**
254
-
255
- ### GitLab Board Label-Based Sync
256
-
257
- GitLab Boards use labels to organize issues into lists. Board sync is achieved by updating issue labels to match the target status.
258
-
259
- **Status label → Board list mapping:**
260
-
261
- GitLab board lists are label-based. Each status corresponds to a scoped label:
262
-
263
- | Label | GitLab Scoped Label |
264
- | -------------------- | ------------------- |
265
- | `status:triage` | `status::triage` |
266
- | `status:ready` | `status::ready` |
267
- | `status:in-progress` | `status::in-progress` |
268
- | `status:in-review` | `status::in-review` |
269
- | `status:blocked` | `status::blocked` |
113
+ ---
270
114
 
271
- **Steps for each issue to sync:**
115
+ ## Sub-Issue Linking Procedure
272
116
 
273
- 1. **Update labels:** `glab issue update {N} -R {namespace}/{project} --unlabel "status::*" --label "status::{new-status}"`. GitLab scoped labels auto-replace within the same scope, so setting `status::ready` automatically removes `status::triage`.
274
- 2. **Verify:** `glab issue view {N} -R {namespace}/{project}` and confirm labels match.
117
+ Use this procedure whenever a child issue must be linked to a parent epic. Board commands that create sub-issues MUST follow the platform-specific fallback chain and record the link status.
275
118
 
276
- **For MRs:** `glab mr update {N} -R {namespace}/{project} --label "status::{new-status}"`.
119
+ > Platform-specific details: see `commands/board/shared-github.md` (Sub-Issue Linking GitHub)
120
+ > Platform-specific details: see `commands/board/shared-azure-devops.md` (Sub-Issue Linking — Azure DevOps)
121
+ > Platform-specific details: see `commands/board/shared-gitlab.md` (Sub-Issue Linking — GitLab)
277
122
 
278
- **Resilience:** If any call fails, retry once. If it still fails, surface a warning and continue. If `glab` CLI is unavailable, warn: "GitLab Board sync skipped -- run `glab auth login` or set GITLAB_TOKEN."
123
+ Cache link status per child (`native` / `advisory` / `comment-only`) in the run cache under `link_results`.
279
124
 
280
125
  ---
281
126
 
@@ -284,206 +129,44 @@ GitLab board lists are label-based. Each status corresponds to a scoped label:
284
129
  Board sync is **MANDATORY**, not optional. The following rules override any "skip if null" or "skip silently" language elsewhere when the board is configured (GitHub: `board.projectNumber` set; Azure DevOps: project configured; GitLab: board configured).
285
130
 
286
131
  1. **Every issue/work item created or updated by a board command MUST be synced to the board — no exceptions.** This includes newly created issues, status changes, label updates, and any mutation that affects board state. Skipping sync for any item is a violation of this policy.
287
- 2. **Status MUST be updated after every status-changing operation.** The four canonical statuses — Ready, In Progress, In Review, Done — must be reflected on the board immediately after the corresponding label change. Do not batch status updates to "later" or defer them.
288
- - **GitHub:** Set via Projects V2 GraphQL mutation or `gh project item-edit`.
289
- - **Azure DevOps:** Set via `az boards work-item update --state`.
290
- - **GitLab:** Set via `glab issue update --label`.
132
+ 2. **Status MUST be updated after every status-changing operation.** The four canonical statuses — Ready, In Progress, In Review, Done — must be reflected on the board immediately after the corresponding label change. Do not batch status updates to "later" or defer them. See the platform sub-files for platform-specific status update commands.
291
133
  3. **All available board fields (priority, sprint, area, iteration) MUST be populated when the data is available.** Never leave a board field empty if the information exists in the issue's labels, body, or metadata.
292
134
  4. **Board overview dashboard MUST be regenerated after any batch of issue operations.** This is in addition to the per-run regeneration rule — if a board command performs multiple batches of mutations, the dashboard must reflect the final state.
293
- 5. **Fallback: never silently skip sync.** The escalation path by platform:
294
- - **GitHub:** GraphQL mutation `gh project item-edit` CLI MCP `projects_write` surface error to user.
295
- - **Azure DevOps:** `az boards work-item update` CLI Azure DevOps MCP surface error to user.
296
- - **GitLab:** `glab issue update` CLI → surface error to user.
297
- Silent skipping is prohibited.
298
- 6. **Cross-reference: every epic/work item and sub-issue must have its board item ID tracked for subsequent updates.** After adding an item to the board, store the returned item ID (GitHub) or work item ID (Azure DevOps) or issue ID (GitLab) in the run cache keyed by issue number.
299
-
300
- ---
301
-
302
- ## Board Overview
303
-
304
- If `meta:board-overview` is included in `board.labels.meta`, board commands will look for an open issue with that label to use as a live dashboard. This dashboard is auto-maintained and MUST be regenerated at the end of every board command run that mutates issues. For on-demand regeneration without running a full board command, use `hatch3r-board-refresh`.
305
-
306
- Teams can extend the dashboard with project-specific sections, but the following structure and model recommendations are required.
307
-
308
- ### Frontier Model Pool
309
-
310
- When populating the board overview, assign a recommended model to each issue. The pool uses aliases that map to the project's configured model versions in `hatch.json`. Specific model IDs are intentionally omitted here to avoid staleness as model versions change — configure actual model IDs in `hatch.json` under `models`.
311
-
312
- | Alias | Strength | Use When |
313
- | ----- | -------- | -------- |
314
- | `opus` | Code quality, multi-file refactoring, security, deep reasoning | Complex refactors, security-critical, architectural changes, `risk:high` |
315
- | `codex` | Agentic coding, long-running tasks, tool orchestration | Multi-step implementations, polyglot codebases, complex tool integrations |
316
- | `gemini-pro` | Large context windows, multimodal, web development | Massive context needs (large epics), web/frontend work |
317
- | `sonnet` | Balance of quality and speed | Standard features, bugs, docs, QA — when the top-tier model is overkill |
318
-
319
- ### Model Selection Heuristic (Quality-First)
320
-
321
- 1. **Default:** `opus` — highest code quality baseline.
322
- 2. **Override to `codex`** if the issue involves heavy agentic coding, long-running multi-step tasks, or multi-language requirements.
323
- 3. **Override to `gemini-pro`** if the issue requires processing very large context (large epic with many sub-issues spanning many files) or is primarily web/frontend work.
324
- 4. **Downgrade to `sonnet`** ONLY for straightforward issues: simple bugs (`risk:low`), documentation (`type:docs`), QA validation (`type:qa`), or issues with clear bounded scope and no architectural impact.
325
-
326
- ### Board Overview Issue Format
327
-
328
- Issue listings in the board overview MUST include a `Model` column. All board commands that regenerate the dashboard MUST use this canonical template. Omit any status section that has zero issues (except Status Summary, which always appears). Omit Board Health sub-sections that have no findings. Sort issues within each status group by priority (`P0` first), then by issue number.
329
-
330
- ```markdown
331
- ## Board Overview
332
-
333
- **Project:** {owner}/{repo}
334
- **Last refreshed:** {ISO date}
335
-
336
- ---
337
-
338
- ## Status Summary
339
-
340
- | Status | Count |
341
- |--------|-------|
342
- | Backlog / Triage | {count} |
343
- | Ready | {count} |
344
- | In Progress | {count} |
345
- | In Review | {count} |
346
- | Externally Blocked | {count} |
347
- | **Total Open** | **{count}** |
135
+ 5. **Fallback: never silently skip sync.** See platform sub-files for escalation paths. Silent skipping is prohibited.
136
+ 6. **Cross-reference: every epic/work item and sub-issue must have its board item ID tracked for subsequent updates.** After adding an item to the board, store the returned item ID in the run cache keyed by issue number.
137
+ 7. **`has-dependencies` label consistency:** Every issue with a non-empty `## Dependencies` section (containing at least one `Blocked by` or `Recommended after` reference) MUST have the `has-dependencies` label. Issues whose `## Dependencies` section contains only `None` MUST NOT have the label. Board commands enforce this during creation and update.
348
138
 
349
139
  ---
350
140
 
351
- ## In Progress
352
-
353
- | # | Title | Type | Pri | Executor | Model |
354
- |---|-------|------|-----|----------|-------|
355
- | #{N} | {title} | {type} | {pri} | {executor} | {model} |
141
+ ## End-of-Run Reconciliation Procedure
356
142
 
357
- ## In Review
143
+ Every mutating board command (`board-fill`, `board-groom`, `board-pickup`) runs this procedure as its final step before the summary output. It catches silent failures and drift accumulated during the run.
358
144
 
359
- | # | Title | Type | Pri | Executor | Model |
360
- |---|-------|------|-----|----------|-------|
361
- | #{N} | {title} | {type} | {pri} | {executor} | {model} |
145
+ 1. **Board sync verification:** Re-attempt sync for any issue where `sync_results` in the run cache shows a failure. Use the full **Board Sync Procedure** fallback chain. Record final status.
146
+ 2. **Sub-issue link verification:** Review `link_results` in the run cache. For links recorded as `advisory`, retry the platform-specific primary link method once to upgrade to `native`. Report all non-native links (`advisory` / `comment-only`) in the reconciliation output.
147
+ 3. **Label consistency:** Verify all created/updated issues have required labels (`type:*`, `priority:*`, `executor:*`) and correct `has-dependencies` state per rule 7 of Board Sync Enforcement. Fix any gaps.
148
+ 4. **PR linkage:** For issues transitioned to `status:in-progress` or `status:in-review`, verify any associated open PR body contains `Closes #N` for the addressed issues. Auto-fix if missing by updating the PR body.
362
149
 
363
- ## Implementation Lanes
150
+ ### Reconciliation Report
364
151
 
365
- Issues grouped into independent parallel work streams.
366
- Different lanes can be worked concurrently; within a lane, follow the listed order.
152
+ Output the reconciliation report immediately before the command summary:
367
153
 
368
- ### Lane 1: {area/theme}
369
-
370
- | Order | # | Title | Type | Pri | Executor | Model |
371
- |-------|---|-------|------|-----|----------|-------|
372
- | 1 | #{N} | {title} | {type} | {pri} | {executor} | {model} |
373
- | 2 | #{M} | {title} | {type} | {pri} | {executor} | {model} |
374
-
375
- ### Lane 2: {area/theme}
376
-
377
- | Order | # | Title | Type | Pri | Executor | Model |
378
- |-------|---|-------|------|-----|----------|-------|
379
- | 1 | #{N} | {title} | {type} | {pri} | {executor} | {model} |
380
-
381
- ## Cross-Epic Dependencies
382
-
383
- Dependency relationships between epics. Omit if no cross-epic dependencies exist.
384
-
385
- | Upstream Epic | Downstream Epic | Via |
386
- |---------------|-----------------|-----|
387
- | #{epicA} {title} | #{epicB} {title} | #{subX} blocks #{subY} |
388
-
389
- ## Waiting on Dependencies
390
-
391
- `status:ready` issues with one or more unsatisfied blockers. Not yet available for pickup.
392
-
393
- | # | Title | Type | Waiting On | Model |
394
- |---|-------|------|------------|-------|
395
- | #{N} | {title} | {type} | #{blocker} ({blocker status}) | {model} |
396
-
397
- ## Externally Blocked
398
-
399
- Issues with `status:blocked` -- waiting on external factors (approvals, environments, third-party services).
400
-
401
- | # | Title | Type | Reason | Model |
402
- |---|-------|------|--------|-------|
403
- | #{N} | {title} | {type} | {blocker reason} | {model} |
404
-
405
- ## Backlog / Triage
406
-
407
- | # | Title | Type | Pri | Executor | Model |
408
- |---|-------|------|-----|----------|-------|
409
- | #{N} | {title} | {type} | {pri} | {executor} | {model} |
410
-
411
- ---
412
-
413
- ## Board Health
414
-
415
- **Missing metadata:**
416
- - {list or "None -- all issues have required labels."}
417
-
418
- **Stale issues:**
419
- - {list or "None -- all issues are active."}
420
-
421
- **Blocked chains:**
422
- - {list or "None -- no blocked dependencies."}
423
-
424
- **Epic ordering discrepancies:**
425
- - {list or "None -- all epic Implementation Order sections match sub-issue Dependencies."}
426
-
427
- ---
428
-
429
- *This issue is auto-maintained by hatch3r board commands. Do not close.*
430
154
  ```
431
-
432
- ### Dependency Data Model
433
-
434
- `## Dependencies` sections in individual issue bodies are the **single authoritative source** of dependency data. Every issue (epic, sub-issue, standalone) tracks its own blockers in its `## Dependencies` section using two reference types:
435
-
436
- - **Hard:** `Blocked by #N` -- this issue cannot start until #N is closed. Used for true producer/consumer relationships (A creates what B consumes) and explicit sequencing requirements.
437
- - **Soft:** `Recommended after #N` -- this issue can proceed in parallel with #N, but sequential execution is recommended (e.g., shared area overlap, reduced merge conflict risk). Soft dependencies are advisory; they do not block pickup or exclude issues from Implementation Lanes.
438
-
439
- When no dependencies exist, the section contains `None`.
440
-
441
- `## Implementation Order` sections in epic bodies are a **derived convenience view** -- they visualize the dependency DAG among an epic's sub-issues as numbered levels. Board commands that create or update epics MUST regenerate `## Implementation Order` from the sub-issues' `## Dependencies` sections, not the other way around. When the two diverge, `## Dependencies` wins.
442
-
443
- ### Lane Computation Algorithm
444
-
445
- Used by `board-fill`, `board-groom`, and `board-refresh` when generating the Implementation Lanes and Waiting on Dependencies sections. Input: all `status:ready` issues and their dependency data (from `## Dependencies` sections).
446
-
447
- 1. **Collect** all `status:ready` issues.
448
- 2. **Partition by hard-blocker satisfaction** -- for each collected issue, check all **hard** dependency references (`Blocked by #N`) in its `## Dependencies` section against the full board. An issue is **dependency-waiting** if any hard blocker is still open (regardless of the blocker's status). Soft dependencies (`Recommended after #N`) do not affect this partition. Separate into two sets:
449
- - **Available** -- all hard blockers satisfied (closed) or no hard blockers. These proceed to lane computation (step 3+).
450
- - **Dependency-waiting** -- one or more hard blockers still open. These are excluded from Implementation Lanes and listed in the **Waiting on Dependencies** section of the overview instead.
451
- 3. **Build the available sub-graph** -- extract only the inter-dependencies among available issues (from parsed `## Dependencies` sections).
452
- 4. **Group by dependency chains** -- issues with sequential dependencies go in the same lane, ordered topologically within the chain.
453
- 5. **Group by area overlap** -- independent issues (no inter-dependencies) that share `area:*` labels go in the same lane. This avoids merge conflicts on the same files when multiple agents work in parallel.
454
- 6. **General lane** -- issues with no dependencies and no area overlap form their own single-issue lanes. If three or more such issues exist, group them into a single "General" lane.
455
- 7. **Name lanes** by the dominant `area:*` label or shared theme of the issues in the lane. Use "General" for the catch-all lane.
456
- 8. **Sort lanes** by the highest-priority issue in each lane (`P0`-lane first, then `P1`, etc.). Break ties by lowest issue number.
457
- 9. **Sort within lanes** by dependency order (blockers before dependents), then by priority, then by issue number.
458
-
459
- Example output:
460
-
155
+ Reconciliation:
156
+ Board sync: {N} synced, {M} failed (list failures)
157
+ Sub-issue links: {N} native, {M} advisory, {K} comment-only
158
+ Label gaps: {N} fixed, {M} remaining (list)
159
+ PR linkage: {N} verified, {M} missing `Closes` (list)
160
+ Errors: {list or "None"}
461
161
  ```
462
- ## Implementation Lanes
463
-
464
- Issues grouped into independent parallel work streams.
465
- Different lanes can be worked concurrently; within a lane, follow the listed order.
466
-
467
- ### Lane 1: API
468
162
 
469
- | Order | # | Title | Type | Pri | Executor | Model |
470
- |-------|---|-------|------|-----|----------|-------|
471
- | 1 | #15 | Fix rate limiter | bug | P0 | agent | opus |
472
-
473
- ### Lane 2: Auth
163
+ ---
474
164
 
475
- | Order | # | Title | Type | Pri | Executor | Model |
476
- |-------|---|-------|------|-----|----------|-------|
477
- | 1 | #12 | OAuth2 PKCE flow | feature | P1 | agent | opus |
478
- | 2 | #14 | Token refresh edge cases | bug | P2 | agent | sonnet |
165
+ ## Board Overview
479
166
 
480
- ### Lane 3: General
167
+ > Full details: see `commands/board/shared-board-overview.md` (model pool, model selection heuristic, dashboard template, dependency data model, lane computation algorithm)
481
168
 
482
- | Order | # | Title | Type | Pri | Executor | Model |
483
- |-------|---|-------|------|-----|----------|-------|
484
- | 1 | #18 | Migrate to ESM | refactor | P2 | agent | opus |
485
- | 2 | #21 | Update CI matrix | infra | P3 | agent | sonnet |
486
- ```
169
+ If `meta:board-overview` is included in `board.labels.meta`, board commands will look for an open issue with that label to use as a live dashboard. This dashboard is auto-maintained and MUST be regenerated at the end of every board command run that mutates issues. For on-demand regeneration without running a full board command, use `hatch3r-board-refresh`.
487
170
 
488
171
  ---
489
172
 
@@ -495,67 +178,13 @@ These directives apply to ALL board commands. They supplement the project's tool
495
178
 
496
179
  All board commands MUST use the platform CLI as the primary interface for operations. CLI tools have lower token cost and faster execution than MCP equivalents.
497
180
 
498
- **If platform is `github`:**
499
-
500
- **Prerequisites:** `gh auth login` must be completed, or `GITHUB_TOKEN` environment variable set. For Projects v2: `gh auth refresh -s project`.
501
-
502
- | Operation | Primary (`gh` CLI) | Fallback (MCP) |
503
- | -------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
504
- | List issues | `gh issue list` | `list_issues` |
505
- | Read issue details | `gh issue view` | `issue_read` |
506
- | Create/update issues | `gh issue create` / `gh issue edit` | `issue_write` |
507
- | Search issues | `gh search issues` | `search_issues` / `semantic_issues_search` |
508
- | Manage sub-issues | `sub_issue_write` (MCP only — no CLI equivalent) | `sub_issue_write` |
509
- | Add comments | `gh issue comment` | `add_issue_comment` |
510
- | Create PRs | `gh pr create` | `create_pull_request` |
511
- | Read PR details | `gh pr view` | `pull_request_read` |
512
- | Manage labels | `gh label create` / `gh label list` | `issue_write` (with labels) |
513
- | Projects v2 | `gh project item-add`, `gh project item-edit`, `gh project item-list`, `gh project field-list`, `gh project view` | `projects_write` / `projects_get` / `projects_list` |
514
- | CI/Actions | `gh run list` / `gh run view` | N/A |
515
- | Releases | `gh release create` | N/A |
516
-
517
- Fallback to MCP only for operations the `gh` CLI cannot handle: sub-issue management (`sub_issue_write`).
518
-
519
- **If platform is `azure-devops`:**
520
-
521
- **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.
522
-
523
- | Operation | Primary (`az` CLI) | Fallback (MCP) |
524
- | -------------------- | ---------------------------------------------------------------------------------------------- | ---------------------- |
525
- | List work items | `az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.State] <> 'Closed'"` | `list_work_items` |
526
- | Read work item | `az boards work-item show --id N` | `get_work_item` |
527
- | Create work items | `az boards work-item create --type "User Story" --title "..." --description "..."` | `create_work_item` |
528
- | Update work items | `az boards work-item update --id N --fields "field=value"` | `update_work_item` |
529
- | Search work items | `az boards query --wiql "SELECT ... WHERE [System.Title] CONTAINS '...'"` | `search_work_items` |
530
- | Manage relations | `az boards work-item relation add --id N --relation-type "System.LinkTypes.Hierarchy-Forward" --target-id M` | Work Item relation API |
531
- | Add comments | `az boards work-item update --id N --discussion "..."` | N/A |
532
- | Create PRs | `az repos pr create --title "..." --source-branch "..." --target-branch "..."` | `create_pull_request` |
533
- | Read PR details | `az repos pr show --id N` | N/A |
534
- | Manage tags | `az boards work-item update --id N --fields "System.Tags=tag1; tag2"` | N/A |
535
- | Board sync | Work Item State updates (automatic board placement) | N/A |
536
- | CI/Pipelines | `az pipelines run list` / `az pipelines run show` | N/A |
537
-
538
- **If platform is `gitlab`:**
539
-
540
- **Prerequisites:** `glab auth login` must be completed, or `GITLAB_TOKEN` environment variable set.
541
-
542
- | Operation | Primary (`glab` CLI) | Fallback (MCP) |
543
- | -------------------- | ------------------------------------------------------------- | -------------- |
544
- | List issues | `glab issue list -R {namespace}/{project}` | N/A |
545
- | Read issue details | `glab issue view N -R {namespace}/{project}` | N/A |
546
- | Create/update issues | `glab issue create` / `glab issue update N` | N/A |
547
- | Search issues | `glab issue list --search "..."` | N/A |
548
- | Manage relations | `glab issue note N --message "Related to #M"` (advisory only) | N/A |
549
- | Add comments | `glab issue note N -R {namespace}/{project}` | N/A |
550
- | Create MRs | `glab mr create -R {namespace}/{project}` | N/A |
551
- | Read MR details | `glab mr view N -R {namespace}/{project}` | N/A |
552
- | Manage labels | `glab label create` / `glab label list` | N/A |
553
- | Board sync | Label updates (automatic board list placement) | N/A |
554
- | CI/Pipelines | `glab ci list` / `glab ci view` | N/A |
181
+ > Platform-specific details: see `commands/board/shared-github.md` (Cross-Cutting Tooling — GitHub CLI-First)
182
+ > Platform-specific details: see `commands/board/shared-azure-devops.md` (Cross-Cutting Tooling — Azure DevOps CLI-First)
183
+ > Platform-specific details: see `commands/board/shared-gitlab.md` (Cross-Cutting Tooling GitLab CLI-First)
555
184
 
556
185
  ### Batch Operations
557
186
 
558
- All board commands MUST minimize user approval prompts by batching related GitHub operations:
187
+ All board commands MUST minimize user approval prompts by batching related operations:
559
188
 
560
189
  1. **Collect before executing.** Gather all planned mutations (issue creation, label changes, sub-issue linking, board sync) into a complete batch before making any API calls.
561
190
  2. **Present batch summaries.** Before executing a batch, present the user with a summary table of all operations in the batch (e.g., issues to create, labels to apply, links to establish).
@@ -593,3 +222,22 @@ These apply to all board commands. Follow them to minimize token consumption.
593
222
  4. **Limit documentation reads.** Read project documentation selectively -- TOC/headers first, full content only for relevant sections.
594
223
  5. **Do NOT read issue templates.** Required structure is provided inline in the command.
595
224
  6. **Follow the project's tooling hierarchy** for knowledge augmentation (Context7 MCP, web research).
225
+
226
+ ---
227
+
228
+ ## Run Cache Requirements
229
+
230
+ All mutating board commands MUST maintain a run cache with the following entries. The cache persists for the duration of the run and feeds into the End-of-Run Reconciliation Procedure.
231
+
232
+ | Key | Type | Description |
233
+ |-----|------|-------------|
234
+ | `created_issues` | `Map<number, {title, type, labels}>` | All issues created during this run |
235
+ | `updated_issues` | `Map<number, {title, changes[]}>` | All issues updated during this run |
236
+ | `sync_results` | `Map<number, {status: success\|failure, method: cli\|mcp\|skipped}>` | Board sync outcome per issue |
237
+ | `link_results` | `Map<number, {parent: number, status: native\|advisory\|comment-only}>` | Sub-issue link outcome per child |
238
+ | `pr_created` | `{number, branch, issues_closed[]}` or `null` | PR created during this run (if any) |
239
+ | `pr_association_map` | `Map<number, number[]>` | PR number → issue numbers it references |
240
+ | `board_item_ids` | `Map<number, string>` | Issue number → board item ID for subsequent updates |
241
+ | `errors` | `{step, issue?, message, recoverable}[]` | All errors encountered during the run |
242
+
243
+ Initialize all entries at the start of the run. Populate incrementally as operations execute. The reconciliation procedure reads these entries to detect and fix drift.
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-bug-plan
3
3
  type: command
4
4
  description: Plan a complex bug investigation -- spawn parallel researchers, produce diagnosis report with ranked hypotheses and structured todo.md entries for board-fill.
5
+ tags: [core, planning]
5
6
  ---
6
7
 
7
8
  ## Agent Pipeline
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-codebase-map
3
3
  type: command
4
4
  description: Reverse-engineer business and technical project specs from an existing codebase using parallel analyzer sub-agents with dual business/technical scoping
5
+ tags: [planning, brownfield]
5
6
  ---
6
7
  # Codebase Map — Brownfield Codebase Analysis & Spec Generation
7
8
 
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-command-customize
3
3
  type: command
4
4
  description: Configure per-command customization including description overrides, enable/disable control, and project-specific markdown instructions
5
+ tags: [customize]
5
6
  ---
6
7
 
7
8
  ## Agent Pipeline