hatch3r 1.1.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.
Files changed (125) hide show
  1. package/README.md +79 -370
  2. package/agents/hatch3r-a11y-auditor.md +7 -4
  3. package/agents/hatch3r-architect.md +1 -0
  4. package/agents/hatch3r-ci-watcher.md +1 -0
  5. package/agents/hatch3r-context-rules.md +1 -0
  6. package/agents/hatch3r-dependency-auditor.md +1 -0
  7. package/agents/hatch3r-devops.md +1 -0
  8. package/agents/hatch3r-docs-writer.md +1 -0
  9. package/agents/hatch3r-fixer.md +2 -0
  10. package/agents/hatch3r-implementer.md +32 -0
  11. package/agents/hatch3r-learnings-loader.md +56 -11
  12. package/agents/hatch3r-lint-fixer.md +2 -10
  13. package/agents/hatch3r-perf-profiler.md +1 -0
  14. package/agents/hatch3r-researcher.md +252 -0
  15. package/agents/hatch3r-reviewer.md +75 -3
  16. package/agents/hatch3r-security-auditor.md +3 -3
  17. package/agents/hatch3r-test-writer.md +2 -7
  18. package/commands/board/pickup-azure-devops.md +81 -0
  19. package/commands/board/pickup-delegation-multi.md +197 -0
  20. package/commands/board/pickup-delegation.md +100 -0
  21. package/commands/board/pickup-github.md +82 -0
  22. package/commands/board/pickup-gitlab.md +81 -0
  23. package/commands/board/pickup-modes.md +143 -0
  24. package/commands/board/pickup-post-impl.md +120 -0
  25. package/commands/board/shared-azure-devops.md +149 -0
  26. package/commands/board/shared-board-overview.md +215 -0
  27. package/commands/board/shared-github.md +169 -0
  28. package/commands/board/shared-gitlab.md +142 -0
  29. package/commands/hatch3r-agent-customize.md +3 -2
  30. package/commands/hatch3r-api-spec.md +1 -0
  31. package/commands/hatch3r-benchmark.md +1 -0
  32. package/commands/hatch3r-board-fill.md +15 -16
  33. package/commands/hatch3r-board-groom.md +50 -10
  34. package/commands/hatch3r-board-init.md +1 -0
  35. package/commands/hatch3r-board-pickup.md +44 -572
  36. package/commands/hatch3r-board-refresh.md +31 -10
  37. package/commands/hatch3r-board-shared.md +62 -439
  38. package/commands/hatch3r-bug-plan.md +1 -0
  39. package/commands/hatch3r-codebase-map.md +1 -0
  40. package/commands/hatch3r-command-customize.md +1 -0
  41. package/commands/hatch3r-context-health.md +1 -0
  42. package/commands/hatch3r-cost-tracking.md +1 -0
  43. package/commands/hatch3r-debug.md +1 -0
  44. package/commands/hatch3r-dep-audit.md +2 -1
  45. package/commands/hatch3r-feature-plan.md +1 -0
  46. package/commands/hatch3r-healthcheck.md +2 -1
  47. package/commands/hatch3r-hooks.md +1 -0
  48. package/commands/hatch3r-learn.md +1 -0
  49. package/commands/hatch3r-migration-plan.md +1 -0
  50. package/commands/hatch3r-onboard.md +1 -0
  51. package/commands/hatch3r-project-spec.md +1 -0
  52. package/commands/hatch3r-quick-change.md +1 -0
  53. package/commands/hatch3r-recipe.md +1 -0
  54. package/commands/hatch3r-refactor-plan.md +1 -0
  55. package/commands/hatch3r-release.md +2 -1
  56. package/commands/hatch3r-revision.md +1 -0
  57. package/commands/hatch3r-roadmap.md +8 -1
  58. package/commands/hatch3r-rule-customize.md +1 -0
  59. package/commands/hatch3r-security-audit.md +2 -1
  60. package/commands/hatch3r-skill-customize.md +1 -0
  61. package/commands/hatch3r-test-plan.md +532 -0
  62. package/commands/hatch3r-workflow.md +1 -0
  63. package/dist/cli/index.js +2640 -1057
  64. package/dist/cli/index.js.map +1 -1
  65. package/github-agents/hatch3r-docs-agent.md +1 -0
  66. package/github-agents/hatch3r-lint-agent.md +1 -0
  67. package/github-agents/hatch3r-security-agent.md +1 -0
  68. package/github-agents/hatch3r-test-agent.md +1 -0
  69. package/hooks/hatch3r-ci-failure.md +1 -0
  70. package/hooks/hatch3r-file-save.md +1 -0
  71. package/hooks/hatch3r-post-merge.md +1 -0
  72. package/hooks/hatch3r-pre-commit.md +1 -0
  73. package/hooks/hatch3r-pre-push.md +1 -0
  74. package/hooks/hatch3r-session-start.md +1 -0
  75. package/package.json +2 -2
  76. package/prompts/hatch3r-bug-triage.md +1 -0
  77. package/prompts/hatch3r-code-review.md +1 -0
  78. package/prompts/hatch3r-pr-description.md +1 -0
  79. package/rules/hatch3r-accessibility-standards.md +1 -0
  80. package/rules/hatch3r-agent-orchestration.md +277 -73
  81. package/rules/hatch3r-api-design.md +1 -0
  82. package/rules/hatch3r-browser-verification.md +1 -0
  83. package/rules/hatch3r-ci-cd.md +1 -0
  84. package/rules/hatch3r-code-standards.md +9 -0
  85. package/rules/hatch3r-component-conventions.md +1 -0
  86. package/rules/hatch3r-data-classification.md +1 -0
  87. package/rules/hatch3r-deep-context.md +1 -0
  88. package/rules/hatch3r-dependency-management.md +13 -0
  89. package/rules/hatch3r-feature-flags.md +1 -0
  90. package/rules/hatch3r-git-conventions.md +1 -0
  91. package/rules/hatch3r-i18n.md +1 -0
  92. package/rules/hatch3r-learning-consult.md +1 -0
  93. package/rules/hatch3r-migrations.md +12 -0
  94. package/rules/hatch3r-observability.md +290 -0
  95. package/rules/hatch3r-performance-budgets.md +1 -0
  96. package/rules/hatch3r-secrets-management.md +1 -0
  97. package/rules/hatch3r-security-patterns.md +12 -0
  98. package/rules/hatch3r-testing.md +1 -0
  99. package/rules/hatch3r-theming.md +1 -0
  100. package/rules/hatch3r-tooling-hierarchy.md +1 -0
  101. package/skills/hatch3r-a11y-audit/SKILL.md +1 -0
  102. package/skills/hatch3r-agent-customize/SKILL.md +1 -0
  103. package/skills/hatch3r-api-spec/SKILL.md +1 -0
  104. package/skills/hatch3r-architecture-review/SKILL.md +1 -0
  105. package/skills/hatch3r-bug-fix/SKILL.md +1 -0
  106. package/skills/hatch3r-ci-pipeline/SKILL.md +1 -0
  107. package/skills/hatch3r-command-customize/SKILL.md +1 -0
  108. package/skills/hatch3r-context-health/SKILL.md +1 -0
  109. package/skills/hatch3r-cost-tracking/SKILL.md +1 -0
  110. package/skills/hatch3r-dep-audit/SKILL.md +1 -0
  111. package/skills/hatch3r-feature/SKILL.md +1 -0
  112. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +1 -0
  113. package/skills/hatch3r-incident-response/SKILL.md +1 -0
  114. package/skills/hatch3r-issue-workflow/SKILL.md +1 -0
  115. package/skills/hatch3r-logical-refactor/SKILL.md +1 -0
  116. package/skills/hatch3r-migration/SKILL.md +1 -0
  117. package/skills/hatch3r-perf-audit/SKILL.md +1 -0
  118. package/skills/hatch3r-pr-creation/SKILL.md +1 -0
  119. package/skills/hatch3r-qa-validation/SKILL.md +1 -0
  120. package/skills/hatch3r-recipe/SKILL.md +1 -0
  121. package/skills/hatch3r-refactor/SKILL.md +1 -0
  122. package/skills/hatch3r-release/SKILL.md +1 -0
  123. package/skills/hatch3r-rule-customize/SKILL.md +1 -0
  124. package/skills/hatch3r-skill-customize/SKILL.md +1 -0
  125. package/skills/hatch3r-visual-refactor/SKILL.md +1 -0
@@ -0,0 +1,169 @@
1
+ ---
2
+ id: hatch3r-board-shared-github
3
+ type: shared-context
4
+ description: GitHub-specific platform details for board shared context. Covers GitHub Issues, Projects V2, gh CLI, and MCP tools.
5
+ tags: [board, team, github]
6
+ ---
7
+ # Board Shared Reference — GitHub Platform Details
8
+
9
+ Platform-specific procedures for GitHub. Referenced from `hatch3r-board-shared`.
10
+
11
+ ---
12
+
13
+ ## Platform Detection — GitHub
14
+
15
+ Use `gh` CLI and GitHub MCP tools. Issues = GitHub Issues. PRs = Pull Requests. Board = Projects V2.
16
+
17
+ ### CLI Command Reference
18
+
19
+ | Action | Command |
20
+ |--------|---------|
21
+ | Create issue | `gh issue create -R {owner}/{repo}` |
22
+ | List issues | `gh issue list -R {owner}/{repo}` |
23
+ | View issue | `gh issue view N -R {owner}/{repo}` |
24
+ | Update issue | `gh issue edit N -R {owner}/{repo}` |
25
+ | Close issue | `gh issue close N -R {owner}/{repo}` |
26
+ | Create PR | `gh pr create -R {owner}/{repo}` |
27
+ | Add label | `gh issue edit N --add-label "x"` |
28
+ | Add comment | `gh issue comment N -R {owner}/{repo}` |
29
+ | Board sync | `gh project item-add`, GraphQL |
30
+
31
+ ### MCP Tool Reference
32
+
33
+ | Action | MCP Tool |
34
+ |--------|----------|
35
+ | Create issue | `issue_write` |
36
+ | Read issue | `issue_read` |
37
+ | List issues | `list_issues` |
38
+ | Search issues | `search_issues` |
39
+ | Add sub-issue | `sub_issue_write` |
40
+ | Create PR | `create_pull_request` |
41
+
42
+ ### Terminology
43
+
44
+ | Concept | GitHub Term |
45
+ |---------|------------|
46
+ | Work unit | Issue |
47
+ | Code review | Pull Request (PR) |
48
+ | Board | Projects V2 |
49
+ | Labels | Labels |
50
+ | Project identifier | `projectNumber` |
51
+ | Status tracking | Projects V2 Status field |
52
+
53
+ ---
54
+
55
+ ## GitHub Context
56
+
57
+ Derived from `.agents/hatch.json` board config:
58
+
59
+ - **Owner:** top-level `owner` (fallback: `board.owner`)
60
+ - **Repository:** top-level `repo` (fallback: `board.repo`)
61
+ - **Default branch:** `board.defaultBranch` (fallback: `"main"`)
62
+ - **Type labels:** `board.labels.types`
63
+ - **Executor labels:** `board.labels.executors`
64
+ - **Status labels:** `board.labels.statuses`
65
+ - **Dependency label:** `has-dependencies`
66
+ - **Meta labels:** `board.labels.meta`
67
+ - **Branch convention:** `board.branchConvention`
68
+ - **Issue templates:** Check `.github/ISSUE_TEMPLATE/` if present in the repository.
69
+ - **PR template:** Check `.github/PULL_REQUEST_TEMPLATE.md` if present.
70
+
71
+ ### GitHub Project Reference (cache for the full run)
72
+
73
+ 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.
74
+
75
+ - **Owner:** `board.owner`, **owner type:** infer from context (`org` or `user`)
76
+ - **Project number:** `board.projectNumber`
77
+ - **Status field ID:** `board.statusFieldId`
78
+ - **Status option IDs:** Read from `board.statusOptions` (keys: `backlog`, `ready`, `inProgress`, `inReview`, `done`)
79
+
80
+ ---
81
+
82
+ ## GitHub Projects V2 Sync
83
+
84
+ > **Skip entirely if `board.projectNumber` is null.**
85
+
86
+ **Prerequisites:** `gh auth refresh -s project` (Projects v2 via gh requires the `project` scope). gh CLI 2.40+ recommended.
87
+
88
+ **Status label → Projects v2 option mapping:**
89
+
90
+ Read the mapping from `board.statusOptions` in `.agents/hatch.json`:
91
+
92
+ | Label | Option ID from hatch.json |
93
+ | -------------------- | ---------------------------------- |
94
+ | `status:triage` | `board.statusOptions.backlog` |
95
+ | `status:ready` | `board.statusOptions.ready` |
96
+ | `status:in-progress` | `board.statusOptions.inProgress` |
97
+ | `status:in-review` | `board.statusOptions.inReview` |
98
+ | `status:blocked` | `board.statusOptions.backlog` |
99
+
100
+ **Steps for each issue to sync (gh CLI primary):**
101
+
102
+ 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.
103
+ 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.
104
+ 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.
105
+ 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.
106
+
107
+ **For PRs:** Use `--url https://github.com/{board.owner}/{board.repo}/pull/{N}` in step 2.
108
+
109
+ **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.
110
+
111
+ **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.
112
+
113
+ **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."
114
+
115
+ ---
116
+
117
+ ## Sub-Issue Linking — GitHub
118
+
119
+ ### Three-Tier Fallback Chain
120
+
121
+ 1. **Primary — MCP native link:**
122
+ `sub_issue_write` MCP with `method: add` using the parent `issue_number` and child's internal numeric `id`.
123
+ Record link status as `native`.
124
+
125
+ 2. **Fallback 1 — CLI body-reference:**
126
+ If MCP linking fails, establish an advisory link:
127
+ - Prepend `> Parent: #{epic}` to the child issue body via `gh issue edit {child} --body "..."`.
128
+ - Add `- [ ] #{child} {title}` to the epic's sub-issue checklist via `gh issue edit {epic} --body "..."`.
129
+ - Record link status as `advisory`.
130
+
131
+ 3. **Fallback 2 — Comment trace:**
132
+ If both primary and Fallback 1 fail:
133
+ `gh issue comment {epic} --body "Sub-issue: #{child} — {title} (linking failed)"`.
134
+ Record link status as `comment-only`.
135
+
136
+ ### Verification
137
+
138
+ After linking, verify via `issue_read` with `method: get_sub_issues` on the parent epic.
139
+
140
+ ---
141
+
142
+ ## Board Sync Enforcement — GitHub
143
+
144
+ 1. **Status updates:** Set via Projects V2 GraphQL mutation or `gh project item-edit`.
145
+ 2. **Fallback escalation:** GraphQL mutation → `gh project item-edit` CLI → MCP `projects_write` → surface error to user. Silent skipping is prohibited.
146
+ 3. **Board item tracking:** After adding an item to the board, store the returned item ID in the run cache keyed by issue number.
147
+
148
+ ---
149
+
150
+ ## Cross-Cutting Tooling — GitHub CLI-First
151
+
152
+ **Prerequisites:** `gh auth login` must be completed, or `GITHUB_TOKEN` environment variable set. For Projects v2: `gh auth refresh -s project`.
153
+
154
+ | Operation | Primary (`gh` CLI) | Fallback (MCP) |
155
+ | -------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
156
+ | List issues | `gh issue list` | `list_issues` |
157
+ | Read issue details | `gh issue view` | `issue_read` |
158
+ | Create/update issues | `gh issue create` / `gh issue edit` | `issue_write` |
159
+ | Search issues | `gh search issues` | `search_issues` / `semantic_issues_search` |
160
+ | Manage sub-issues | `sub_issue_write` (MCP only — no CLI equivalent) | `sub_issue_write` |
161
+ | Add comments | `gh issue comment` | `add_issue_comment` |
162
+ | Create PRs | `gh pr create` | `create_pull_request` |
163
+ | Read PR details | `gh pr view` | `pull_request_read` |
164
+ | Manage labels | `gh label create` / `gh label list` | `issue_write` (with labels) |
165
+ | 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` |
166
+ | CI/Actions | `gh run list` / `gh run view` | N/A |
167
+ | Releases | `gh release create` | N/A |
168
+
169
+ Fallback to MCP only for operations the `gh` CLI cannot handle: sub-issue management (`sub_issue_write`).
@@ -0,0 +1,142 @@
1
+ ---
2
+ id: hatch3r-board-shared-gitlab
3
+ type: shared-context
4
+ description: GitLab-specific platform details for board shared context. Covers GitLab Issues, Issue Boards, glab CLI, and label-based sync.
5
+ tags: [board, team, gitlab]
6
+ ---
7
+ # Board Shared Reference — GitLab Platform Details
8
+
9
+ Platform-specific procedures for GitLab. Referenced from `hatch3r-board-shared`.
10
+
11
+ ---
12
+
13
+ ## Platform Detection — GitLab
14
+
15
+ Use `glab` CLI. Issues = GitLab Issues. PRs = Merge Requests (MRs). Board = GitLab Issue Boards. Requires `glab auth login` or `GITLAB_TOKEN`.
16
+
17
+ ### CLI Command Reference
18
+
19
+ | Action | Command |
20
+ |--------|---------|
21
+ | Create issue | `glab issue create -R {namespace}/{project}` |
22
+ | List issues | `glab issue list -R {namespace}/{project}` |
23
+ | View issue | `glab issue view N -R {namespace}/{project}` |
24
+ | Update issue | `glab issue update N -R {namespace}/{project}` |
25
+ | Close issue | `glab issue close N -R {namespace}/{project}` |
26
+ | Create MR | `glab mr create -R {namespace}/{project}` |
27
+ | Add label | `glab issue update N --label "x"` |
28
+ | Add comment | `glab issue note N -R {namespace}/{project}` |
29
+ | Board sync | Board list = label-based |
30
+
31
+ ### MCP Tool Reference
32
+
33
+ GitLab MCP tools are not currently available. All operations use the `glab` CLI.
34
+
35
+ ### Terminology
36
+
37
+ | Concept | GitLab Term |
38
+ |---------|-------------|
39
+ | Work unit | Issue |
40
+ | Code review | Merge Request (MR) |
41
+ | Board | GitLab Issue Boards |
42
+ | Labels | Labels |
43
+ | Project identifier | project ID |
44
+ | Status tracking | Board lists/labels |
45
+
46
+ ---
47
+
48
+ ## GitLab Context
49
+
50
+ Derived from `.agents/hatch.json` board config:
51
+
52
+ - **Namespace:** top-level `owner` (GitLab group or user namespace)
53
+ - **Project:** top-level `repo` (GitLab project name)
54
+ - **Default branch:** `board.defaultBranch` (fallback: `"main"`)
55
+ - **Type labels:** `board.labels.types`
56
+ - **Executor labels:** `board.labels.executors`
57
+ - **Status labels:** `board.labels.statuses`
58
+ - **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.
59
+ - **Issue templates:** Check `.gitlab/issue_templates/` if present.
60
+ - **MR template:** Check `.gitlab/merge_request_templates/` if present.
61
+
62
+ ### GitLab Project Reference (cache for the full run)
63
+
64
+ - **Project path:** `{namespace}/{project}`
65
+ - **Board:** GitLab Issue Boards use label-based lists. Each status maps to a board list label.
66
+ - **Board ID:** `board.projectNumber` (repurposed as GitLab Board ID if configured)
67
+
68
+ ---
69
+
70
+ ## GitLab Board Label-Based Sync
71
+
72
+ > **Skip entirely if board is not configured.**
73
+
74
+ GitLab Boards use labels to organize issues into lists. Board sync is achieved by updating issue labels to match the target status.
75
+
76
+ **Status label → Board list mapping:**
77
+
78
+ GitLab board lists are label-based. Each status corresponds to a scoped label:
79
+
80
+ | Label | GitLab Scoped Label |
81
+ | -------------------- | ------------------- |
82
+ | `status:triage` | `status::triage` |
83
+ | `status:ready` | `status::ready` |
84
+ | `status:in-progress` | `status::in-progress` |
85
+ | `status:in-review` | `status::in-review` |
86
+ | `status:blocked` | `status::blocked` |
87
+
88
+ **Steps for each issue to sync:**
89
+
90
+ 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`.
91
+ 2. **Verify:** `glab issue view {N} -R {namespace}/{project}` and confirm labels match.
92
+
93
+ **For MRs:** `glab mr update {N} -R {namespace}/{project} --label "status::{new-status}"`.
94
+
95
+ **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."
96
+
97
+ ---
98
+
99
+ ## Sub-Issue Linking — GitLab
100
+
101
+ ### Three-Tier Fallback Chain
102
+
103
+ 1. **Primary — API link:**
104
+ `glab api projects/{project_id}/issues/{parent_iid}/links --method POST --field target_project_id={project_id} --field target_issue_iid={child_iid}`.
105
+ Record link status as `native`.
106
+
107
+ 2. **Fallback 1 — Comment trace:**
108
+ If API linking fails:
109
+ `glab issue note {epic} -R {namespace}/{project} --message "Sub-issue: #{child} — {title} (linking failed)"`.
110
+ Record link status as `comment-only`.
111
+
112
+ ### Verification
113
+
114
+ After linking, verify via `glab api projects/{project_id}/issues/{epic_iid}/links` and check linked issues.
115
+
116
+ ---
117
+
118
+ ## Board Sync Enforcement — GitLab
119
+
120
+ 1. **Status updates:** Set via `glab issue update --label`.
121
+ 2. **Fallback escalation:** `glab issue update` CLI → surface error to user. Silent skipping is prohibited.
122
+ 3. **Board item tracking:** After updating an issue, store the issue ID in the run cache keyed by issue number.
123
+
124
+ ---
125
+
126
+ ## Cross-Cutting Tooling — GitLab CLI-First
127
+
128
+ **Prerequisites:** `glab auth login` must be completed, or `GITLAB_TOKEN` environment variable set.
129
+
130
+ | Operation | Primary (`glab` CLI) | Fallback (MCP) |
131
+ | -------------------- | ------------------------------------------------------------- | -------------- |
132
+ | List issues | `glab issue list -R {namespace}/{project}` | N/A |
133
+ | Read issue details | `glab issue view N -R {namespace}/{project}` | N/A |
134
+ | Create/update issues | `glab issue create` / `glab issue update N` | N/A |
135
+ | Search issues | `glab issue list --search "..."` | N/A |
136
+ | Manage relations | `glab issue note N --message "Related to #M"` (advisory only) | N/A |
137
+ | Add comments | `glab issue note N -R {namespace}/{project}` | N/A |
138
+ | Create MRs | `glab mr create -R {namespace}/{project}` | N/A |
139
+ | Read MR details | `glab mr view N -R {namespace}/{project}` | N/A |
140
+ | Manage labels | `glab label create` / `glab label list` | N/A |
141
+ | Board sync | Label updates (automatic board list placement) | N/A |
142
+ | CI/Pipelines | `glab ci list` / `glab ci view` | N/A |
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-agent-customize
3
3
  type: command
4
4
  description: Configure per-agent customization including model overrides, description changes, and project-specific markdown instructions
5
+ tags: [customize]
5
6
  ---
6
7
 
7
8
  ## Agent Pipeline
@@ -179,5 +180,5 @@ The `protected` field is set in the canonical agent definition and cannot be ove
179
180
  - Skill customization: `hatch3r-skill-customize` command
180
181
  - Command customization: `hatch3r-command-customize` command
181
182
  - Rule customization: `hatch3r-rule-customize` command
182
- - Model selection: [docs/model-selection.md](../docs/model-selection.md) — configuration, aliases, resolution order
183
- - Platform support: [docs/adapter-capability-matrix.md](../docs/adapter-capability-matrix.md) — model emission per adapter (native vs guidance)
183
+ - Model selection: [Model Selection](https://docs.hatch3r.com/docs/guides/model-selection) — configuration, aliases, resolution order
184
+ - Platform support: [Adapter Capability Matrix](https://docs.hatch3r.com/docs/reference/adapter-capability-matrix) — model emission per adapter (native vs guidance)
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-api-spec
3
3
  type: command
4
4
  description: Generate or validate an OpenAPI specification from the codebase. Scans route definitions, extracts schemas, and produces a complete API spec.
5
+ tags: [planning]
5
6
  ---
6
7
 
7
8
  ## Agent Pipeline
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-benchmark
3
3
  type: command
4
4
  description: Run and analyze performance benchmarks. Compare results against baselines, identify regressions, and produce performance reports.
5
+ tags: [review, performance]
5
6
  ---
6
7
 
7
8
  ## Agent Pipeline
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-board-fill
3
3
  type: command
4
4
  description: Create epics and issues/work items from todo.md, reorganize the board with dependency analysis, readiness assessment, and implementation ordering. Supports GitHub, Azure DevOps, and GitLab.
5
+ tags: [board, team]
5
6
  ---
6
7
 
7
8
  ## Agent Pipeline
@@ -530,9 +531,9 @@ Execute in dependency order (parents before children). Do not prompt between ope
530
531
  **Platform-specific: Issue creation**
531
532
 
532
533
  **If platform is `github`:**
533
- 1. **Epics first:** `gh issue create -R {owner}/{repo} --title "..." --body "..." --label "..."` (fall back to `issue_write` MCP with `method: create`). Include `## Dependencies` section and `has-dependencies` label. Record the returned `number` and internal numeric `id` field.
534
- 2. **Sub-issues:** Create each. Record the returned `number` and internal numeric `id` field.
535
- 3. **Standalone issues:** Create with `## Dependencies` and `has-dependencies`.
534
+ 1. **Epics first:** `gh issue create -R {owner}/{repo} --title "..." --body "..." --label "..."` (fall back to `issue_write` MCP with `method: create`). Include `## Dependencies` section and `has-dependencies` label (per rule 7 of Board Sync Enforcement). Record the returned `number` and internal numeric `id` field.
535
+ 2. **Sub-issues:** Create each. Include `## Dependencies` section. Add `has-dependencies` label if the sub-issue has any dependency references (per rule 7 of Board Sync Enforcement). Record the returned `number` and internal numeric `id` field.
536
+ 3. **Standalone issues:** Create with `## Dependencies` and `has-dependencies` (when dependencies exist, per rule 7).
536
537
 
537
538
  **If platform is `azure-devops`:**
538
539
  1. **Epics first:** `az boards work-item create --org https://dev.azure.com/{namespace} --project {project} --type "Epic" --title "..." --description "..." --fields "System.Tags=has-dependencies"` (fall back to `create_work_item` MCP). Record the returned work item `id`.
@@ -546,14 +547,7 @@ Execute in dependency order (parents before children). Do not prompt between ope
546
547
 
547
548
  **Phase 2 — Link sub-issues** (after all issues exist):
548
549
 
549
- **If platform is `github`:**
550
- For each sub-issue, link via `sub_issue_write` with `method: add` using the parent `issue_number` and child's internal numeric `id` (NOT the issue number or node_id).
551
-
552
- **If platform is `azure-devops`:**
553
- For each sub-issue, create a parent-child relation: `az boards work-item relation add --org https://dev.azure.com/{namespace} --id {child_id} --relation-type "System.LinkTypes.Hierarchy-Reverse" --target-id {parent_id}`.
554
-
555
- **If platform is `gitlab`:**
556
- For each sub-issue, add a related issue link: `glab api projects/{project_id}/issues/{parent_iid}/links --method POST --field target_project_id={project_id} --field target_issue_iid={child_iid}`. Also reference the parent in the sub-issue body.
550
+ For each sub-issue, follow the **Sub-Issue Linking Procedure** from `hatch3r-board-shared`. Use the three-tier fallback chain (MCP native → CLI body-reference → comment trace) and record link status per child in the run cache under `link_results`.
557
551
 
558
552
  **Phase 3 — Sync to board** (after all issues and links are created):
559
553
 
@@ -568,10 +562,7 @@ For issues needing updates (from Steps 5, 5.5, 5.6):
568
562
  - **Azure DevOps:** `az boards work-item update --id N --description "..."`.
569
563
  - **GitLab:** `glab issue update N --description "..."`.
570
564
  2. **Regenerate `## Implementation Order`** (epics only): Derive from the sub-issues' `## Dependencies` DAG (see Dependency Data Model in `hatch3r-board-shared`). Replace the existing section entirely -- do not manually edit it.
571
- 3. **Apply epic regrouping:** Link standalones to epics.
572
- - **GitHub:** `sub_issue_write` MCP. Update epic body.
573
- - **Azure DevOps:** `az boards work-item relation add` with parent-child relation.
574
- - **GitLab:** `glab api` issue links endpoint. Update epic body.
565
+ 3. **Apply epic regrouping:** Link standalones to epics using the **Sub-Issue Linking Procedure** from `hatch3r-board-shared`. Update epic body with the new sub-issue reference.
575
566
  4. **Mark `status:ready`:** Remove `status:triage`, add `status:ready`. Do not downgrade existing statuses.
576
567
  - **GitHub:** `gh issue edit N --remove-label "status:triage" --add-label "status:ready"`.
577
568
  - **Azure DevOps:** `az boards work-item update --id N --state "Active" --fields "System.Tags=+status:ready;-status:triage"`.
@@ -598,7 +589,7 @@ Board Summary: N created, M updated, X marked ready, Y still triage, Z parallel
598
589
  **This step is mandatory. Do not skip.**
599
590
 
600
591
  1. Search the cached board inventory for an open issue labeled `meta:board-overview`.
601
- 2. Compute Implementation Lanes using the **Lane Computation Algorithm** from `hatch3r-board-shared`. Use the cached dependency DAG from Step 5.5 as input.
592
+ 2. Compute Implementation Lanes using the **Lane Computation Algorithm** (steps 1-12) from `hatch3r-board-shared`. Use the cached dependency DAG from Step 5.5 as input. This includes inter-lane dependency computation, lane phasing, and the Lane Dependency Map.
602
593
  3. Assign models to all open issues using the **Model Selection Heuristic (Quality-First)** from `hatch3r-board-shared`.
603
594
  4. **If found:** Regenerate the dashboard body using the **Board Overview Issue Format** template from `hatch3r-board-shared`, populated with cached board data updated with mutations from Step 7. Update the issue body using platform CLI (fall back to MCP):
604
595
  - **GitHub:** `gh issue edit {N} --body "..."` (fall back to `issue_write` MCP).
@@ -613,6 +604,14 @@ Do NOT re-fetch all issues; use cached data.
613
604
 
614
605
  ---
615
606
 
607
+ ### Step 7.8: End-of-Run Reconciliation
608
+
609
+ **This step is mandatory. Do not skip.**
610
+
611
+ 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 created or updated during this run. Output the reconciliation report before proceeding to Step 8.
612
+
613
+ ---
614
+
616
615
  ### Step 8: Cleanup
617
616
 
618
617
  **ASK:** "All issues created. Should I remove processed items from `todo.md`? (yes / no / only created ones)"
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-board-groom
3
3
  type: command
4
4
  description: Ongoing backlog refinement for existing board items. Re-prioritize, reclassify, re-scope, archive stale items, decompose oversized issues, merge duplicates, refresh dependencies, and remediate board health findings.
5
+ tags: [board, team]
5
6
  ---
6
7
 
7
8
  ## Agent Pipeline
@@ -164,7 +165,15 @@ Compare existing open issues pairwise for semantic overlap:
164
165
  - Overlapping acceptance criteria.
165
166
  - Cross-reference `## Scope` sections for boundary collisions.
166
167
 
167
- #### 3i. Present Refinement Summary
168
+ #### 3j. Unlinked Sub-Issue Detection
169
+
170
+ For each epic, compare the sub-issue references in the epic body (checklist items, `> Parent:` references) against the native sub-issue list from `issue_read` with `method: get_sub_issues` (GitHub) or equivalent platform call. Flag sub-issues that appear in the body but are not natively linked.
171
+
172
+ #### 3k. Board Sync Drift Detection
173
+
174
+ If `board.projectNumber` is configured, compare label-based status (`status:*` labels) against board column status via `gh project item-list {board.projectNumber} --owner {board.owner} --format json` (GitHub) or equivalent platform call. Flag issues where the label status and board column status diverge.
175
+
176
+ #### 3l. Present Refinement Summary
168
177
 
169
178
  Present findings grouped by category:
170
179
 
@@ -178,6 +187,8 @@ Board Health:
178
187
  Stale dependency refs: D issues
179
188
  Priority imbalance: {description or "None"}
180
189
  Epic ordering discrepancies: E epics
190
+ Unlinked sub-issues: U issues (non-native links)
191
+ Board sync drift: V issues (label/board status mismatch)
181
192
 
182
193
  Grooming Opportunities:
183
194
  Re-prioritize candidates: R issues (priority/risk misalignment, priority inflation)
@@ -186,11 +197,12 @@ Grooming Opportunities:
186
197
  Grouping candidates: G standalone issues → potential epics
187
198
  Duplicate/overlap candidates: O issue pairs
188
199
  Dependency cleanup: K issues (stale refs, orphaned labels)
200
+ Link fix candidates: L issues (advisory or comment-only links)
189
201
 
190
- Available actions: [reprioritize | reclassify | re-scope | demote | archive | decompose | merge | dep-refresh | health-fix | all]
202
+ Available actions: [reprioritize | reclassify | re-scope | demote | archive | decompose | merge | dep-refresh | health-fix | link-fix | all]
191
203
  ```
192
204
 
193
- **ASK:** "Here is the board refinement summary. Which grooming actions do you want to perform? Select one or more: reprioritize / reclassify / re-scope / demote / archive / decompose / merge / dep-refresh / health-fix / all. You can also specify issue numbers to target specific items (e.g., 'reprioritize #5, #12')."
205
+ **ASK:** "Here is the board refinement summary. Which grooming actions do you want to perform? Select one or more: reprioritize / reclassify / re-scope / demote / archive / decompose / merge / dep-refresh / health-fix / link-fix / all. You can also specify issue numbers to target specific items (e.g., 'reprioritize #5, #12')."
194
206
 
195
207
  ---
196
208
 
@@ -342,11 +354,9 @@ The original issue becomes the parent epic.
342
354
 
343
355
  4. For confirmed decompositions:
344
356
  - If the original is standalone, convert it to an epic by updating its body with `## Implementation Order` and adding sub-issue links.
345
- - Create sub-issues and link to parent using platform CLI:
346
- - **GitHub:** Create via `gh issue create` or `issue_write` MCP. Link via `sub_issue_write` MCP.
347
- - **Azure DevOps:** Create via `az boards work-item create`. Link via `az boards work-item relation add --relation-type "System.LinkTypes.Hierarchy-Forward"`.
348
- - **GitLab:** Create via `glab issue create`. Link via `glab api` issue links endpoint.
349
- - Inherit labels/tags from the parent. Add `## Dependencies` sections.
357
+ - Create sub-issues using platform CLI (`gh issue create` / `az boards work-item create` / `glab issue create`). Fall back to MCP if CLI fails.
358
+ - Link sub-issues to the parent using the **Sub-Issue Linking Procedure** from `hatch3r-board-shared` (three-tier fallback chain).
359
+ - Inherit labels/tags from the parent. Add `## Dependencies` sections. Add `has-dependencies` label to sub-issues with dependency references (per rule 7 of Board Sync Enforcement).
350
360
  - Sync new sub-issues to the board via the **Board Sync Procedure** from `hatch3r-board-shared`.
351
361
 
352
362
  ---
@@ -377,7 +387,8 @@ Combine overlapping issues discovered after initial dedup.
377
387
  Re-analyze and clean up dependency data based on current board state.
378
388
 
379
389
  1. **Clean stale references:** For issues referencing closed blockers, remove the satisfied `Blocked by #N` lines from `## Dependencies` (the blocker is done, the reference is noise). Replace with `None` if no other dependencies remain.
380
- 2. **Fix orphaned labels:** For issues with `has-dependencies` label but empty or missing `## Dependencies`, either add the section or remove the label.
390
+ 1b. **Normalize dependency format:** Replace `Depends on #N` with `Blocked by #N` in `## Dependencies` sections. This enforces the canonical format per the Dependency Data Model in `hatch3r-board-shared`.
391
+ 2. **Fix orphaned labels:** For issues with `has-dependencies` label but empty or missing `## Dependencies`, either add the section or remove the label. Also add `has-dependencies` to issues that have dependency references but are missing the label (bidirectional enforcement per rule 7 of Board Sync Enforcement).
381
392
  3. **Discover new dependencies:** Analyze the current board for producer/consumer relationships that weren't captured in the original fill. Propose new dependency edges.
382
393
  4. **Recompute epic ordering:** For epics with stale `## Implementation Order` sections (flagged in Step 3d), regenerate the section from sub-issues' `## Dependencies` DAG.
383
394
  5. **Unblock newly available items:** After cleaning stale refs, identify issues that were previously dependency-waiting but are now available (all blockers closed). Note these for the user.
@@ -414,6 +425,27 @@ Newly unblocked:
414
425
 
415
426
  ---
416
427
 
428
+ #### 4h-link. Link Fix (Sub-Issue Re-Linking)
429
+
430
+ Re-run the **Sub-Issue Linking Procedure** from `hatch3r-board-shared` for sub-issues identified in Step 3j as non-natively linked.
431
+
432
+ 1. Present link-fix candidates from Step 3j:
433
+
434
+ ```
435
+ Link Fix Candidates:
436
+
437
+ | # | Title | Parent Epic | Current Link Status |
438
+ |---|-------|-------------|---------------------|
439
+ | #N | {title} | #{epic} | advisory |
440
+ | #M | {title} | #{epic} | comment-only |
441
+ ```
442
+
443
+ **ASK:** "Confirm re-linking for these sub-issues. The procedure will attempt native linking via MCP. Confirm / skip."
444
+
445
+ 2. For each confirmed candidate, run the Sub-Issue Linking Procedure fallback chain starting from the primary tier. Record updated link status in the run cache.
446
+
447
+ ---
448
+
417
449
  #### 4i. Health Fix (Board Health Remediation)
418
450
 
419
451
  Fix structural gaps detected in Step 3b (missing metadata).
@@ -486,7 +518,7 @@ For every issue/work item whose labels or status changed during Steps 4-5:
486
518
  **This step is mandatory. Do not skip.**
487
519
 
488
520
  1. Search the cached board inventory for an open issue labeled `meta:board-overview`.
489
- 2. Compute Implementation Lanes using the **Lane Computation Algorithm** from `hatch3r-board-shared`. Use the dependency graph from Step 3d, updated with mutations from Step 4, as input.
521
+ 2. Compute Implementation Lanes using the **Lane Computation Algorithm** (steps 1-12) from `hatch3r-board-shared`. Use the dependency graph from Step 3d, updated with mutations from Step 4, as input. This includes inter-lane dependency computation, lane phasing, and the Lane Dependency Map.
490
522
  3. Assign models to all open issues using the **Model Selection Heuristic (Quality-First)** from `hatch3r-board-shared`.
491
523
  4. **If found:** Regenerate the dashboard body using the **Board Overview Issue Format** template from `hatch3r-board-shared`, populated with cached board data updated with all mutations from Steps 4-6. Update using platform CLI:
492
524
  - **GitHub:** `gh issue edit {N} --body "..."` (fall back to `issue_write` MCP).
@@ -498,6 +530,14 @@ Do NOT re-fetch all issues; use cached data updated with this run's mutations.
498
530
 
499
531
  ---
500
532
 
533
+ ### Step 7.5: End-of-Run Reconciliation
534
+
535
+ **This step is mandatory. Do not skip.**
536
+
537
+ 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 created or updated during this grooming session. Output the reconciliation report before proceeding to Step 8.
538
+
539
+ ---
540
+
501
541
  ### Step 8: Groom Summary
502
542
 
503
543
  Present a summary of all changes made during this grooming session:
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-board-init
3
3
  type: command
4
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
7
 
7
8
  ## Agent Pipeline