hatch3r 1.5.1 → 1.6.2

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 (129) hide show
  1. package/README.md +18 -2
  2. package/agents/hatch3r-a11y-auditor.md +2 -0
  3. package/agents/hatch3r-dependency-auditor.md +18 -0
  4. package/agents/hatch3r-devops.md +20 -0
  5. package/agents/hatch3r-fixer.md +28 -12
  6. package/agents/hatch3r-implementer.md +26 -12
  7. package/agents/hatch3r-learnings-loader.md +23 -1
  8. package/agents/hatch3r-researcher.md +101 -114
  9. package/agents/hatch3r-reviewer.md +27 -1
  10. package/agents/hatch3r-security-auditor.md +2 -0
  11. package/agents/modes/architecture.md +1 -0
  12. package/agents/modes/boundary-analysis.md +1 -0
  13. package/agents/modes/codebase-impact.md +1 -0
  14. package/agents/modes/complexity-risk.md +1 -0
  15. package/agents/modes/coverage-analysis.md +1 -0
  16. package/agents/modes/feature-design.md +1 -0
  17. package/agents/modes/impact-analysis.md +1 -0
  18. package/agents/modes/migration-path.md +1 -0
  19. package/agents/modes/refactoring-strategy.md +1 -0
  20. package/agents/modes/regression.md +1 -0
  21. package/agents/modes/requirements-elicitation.md +1 -0
  22. package/agents/modes/risk-assessment.md +1 -0
  23. package/agents/modes/risk-prioritization.md +1 -0
  24. package/agents/modes/root-cause.md +1 -0
  25. package/agents/modes/symptom-trace.md +1 -0
  26. package/agents/modes/test-pattern.md +1 -0
  27. package/agents/shared/external-knowledge.md +5 -5
  28. package/agents/shared/injection-patterns.md +78 -0
  29. package/agents/shared/prompt-structure.md +44 -0
  30. package/checks/accessibility.md +2 -0
  31. package/checks/code-quality.md +2 -0
  32. package/checks/performance.md +2 -0
  33. package/checks/security.md +2 -0
  34. package/checks/testing.md +2 -0
  35. package/commands/board/pickup-delegation-multi.md +2 -2
  36. package/commands/board/pickup-delegation.md +2 -2
  37. package/commands/board/pickup-post-impl.md +21 -0
  38. package/commands/board/shared-github.md +4 -2
  39. package/commands/hatch3r-agent-customize.md +2 -1
  40. package/commands/hatch3r-api-spec.md +2 -0
  41. package/commands/hatch3r-benchmark.md +2 -0
  42. package/commands/hatch3r-board-fill.md +96 -9
  43. package/commands/hatch3r-board-groom.md +1 -0
  44. package/commands/hatch3r-board-init.md +31 -1
  45. package/commands/hatch3r-board-pickup.md +10 -0
  46. package/commands/hatch3r-board-refresh.md +1 -0
  47. package/commands/hatch3r-board-shared.md +5 -1
  48. package/commands/hatch3r-bug-plan.md +3 -1
  49. package/commands/hatch3r-codebase-map.md +3 -1
  50. package/commands/hatch3r-command-customize.md +2 -1
  51. package/commands/hatch3r-context-health.md +1 -0
  52. package/commands/hatch3r-cost-tracking.md +1 -0
  53. package/commands/hatch3r-debug.md +2 -0
  54. package/commands/hatch3r-dep-audit.md +1 -0
  55. package/commands/hatch3r-feature-plan.md +3 -1
  56. package/commands/hatch3r-healthcheck.md +2 -1
  57. package/commands/hatch3r-hooks.md +1 -0
  58. package/commands/hatch3r-learn.md +8 -5
  59. package/commands/hatch3r-migration-plan.md +2 -0
  60. package/commands/hatch3r-onboard.md +2 -0
  61. package/commands/hatch3r-project-spec.md +3 -1
  62. package/commands/hatch3r-quick-change.md +14 -2
  63. package/commands/hatch3r-recipe.md +1 -0
  64. package/commands/hatch3r-refactor-plan.md +2 -0
  65. package/commands/hatch3r-release.md +1 -0
  66. package/commands/hatch3r-revision.md +10 -0
  67. package/commands/hatch3r-roadmap.md +3 -1
  68. package/commands/hatch3r-rule-customize.md +2 -1
  69. package/commands/hatch3r-security-audit.md +2 -1
  70. package/commands/hatch3r-skill-customize.md +2 -1
  71. package/commands/hatch3r-test-plan.md +2 -0
  72. package/commands/hatch3r-workflow.md +15 -3
  73. package/commands/revision/revision-quality.md +4 -3
  74. package/dist/cli/index.js +6235 -2613
  75. package/dist/cli/index.js.map +1 -1
  76. package/github-agents/hatch3r-docs-agent.md +1 -0
  77. package/github-agents/hatch3r-lint-agent.md +1 -0
  78. package/github-agents/hatch3r-security-agent.md +1 -0
  79. package/github-agents/hatch3r-test-agent.md +1 -0
  80. package/package.json +7 -1
  81. package/rules/hatch3r-accessibility-standards.mdc +1 -0
  82. package/rules/hatch3r-agent-orchestration-detail.mdc +1 -0
  83. package/rules/hatch3r-agent-orchestration.md +38 -5
  84. package/rules/hatch3r-agent-orchestration.mdc +39 -5
  85. package/rules/hatch3r-api-design.md +1 -1
  86. package/rules/hatch3r-api-design.mdc +2 -1
  87. package/rules/hatch3r-browser-verification.md +1 -1
  88. package/rules/hatch3r-browser-verification.mdc +3 -3
  89. package/rules/hatch3r-ci-cd.mdc +1 -0
  90. package/rules/hatch3r-code-standards.md +1 -1
  91. package/rules/hatch3r-code-standards.mdc +2 -2
  92. package/rules/hatch3r-component-conventions.md +3 -3
  93. package/rules/hatch3r-component-conventions.mdc +2 -2
  94. package/rules/hatch3r-data-classification.mdc +1 -0
  95. package/rules/hatch3r-dependency-management.md +1 -1
  96. package/rules/hatch3r-dependency-management.mdc +2 -1
  97. package/rules/hatch3r-feature-flags.md +1 -1
  98. package/rules/hatch3r-feature-flags.mdc +1 -1
  99. package/rules/hatch3r-git-conventions.md +1 -1
  100. package/rules/hatch3r-git-conventions.mdc +2 -2
  101. package/rules/hatch3r-i18n.md +2 -2
  102. package/rules/hatch3r-i18n.mdc +1 -1
  103. package/rules/hatch3r-learning-consult.md +1 -1
  104. package/rules/hatch3r-learning-consult.mdc +2 -2
  105. package/rules/hatch3r-migrations.mdc +1 -0
  106. package/rules/hatch3r-observability-tracing-detail.mdc +99 -6
  107. package/rules/hatch3r-observability-tracing.mdc +20 -15
  108. package/rules/hatch3r-performance-budgets.md +1 -1
  109. package/rules/hatch3r-performance-budgets.mdc +1 -1
  110. package/rules/hatch3r-secrets-management.mdc +1 -0
  111. package/rules/hatch3r-security-patterns.md +1 -1
  112. package/rules/hatch3r-security-patterns.mdc +3 -2
  113. package/rules/hatch3r-testing.md +1 -1
  114. package/rules/hatch3r-testing.mdc +3 -2
  115. package/rules/hatch3r-theming.md +2 -2
  116. package/rules/hatch3r-theming.mdc +2 -2
  117. package/rules/hatch3r-tooling-hierarchy.md +1 -1
  118. package/rules/hatch3r-tooling-hierarchy.mdc +3 -2
  119. package/skills/hatch3r-a11y-audit/SKILL.md +21 -55
  120. package/skills/hatch3r-a11y-audit/references/manual-audit-checklist.md +58 -0
  121. package/skills/hatch3r-agent-customize/SKILL.md +1 -1
  122. package/skills/hatch3r-command-customize/SKILL.md +1 -1
  123. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +42 -136
  124. package/skills/hatch3r-gh-agentic-workflows/references/azure-devops.md +60 -0
  125. package/skills/hatch3r-gh-agentic-workflows/references/gitlab-ci.md +51 -0
  126. package/skills/hatch3r-issue-workflow/SKILL.md +8 -27
  127. package/skills/hatch3r-issue-workflow/references/delegation-patterns.md +51 -0
  128. package/skills/hatch3r-rule-customize/SKILL.md +1 -1
  129. package/skills/hatch3r-skill-customize/SKILL.md +1 -1
@@ -8,30 +8,23 @@ quality_charter: agents/shared/quality-charter.md
8
8
 
9
9
  > **Platform detection:** Check `platform` in `.agents/hatch.json` to determine which CI/CD system to use. Defaults to `"github"`.
10
10
 
11
- This skill guides setup for AI-powered CI/CD automation in hatch3r-managed projects across all supported platforms.
11
+ This skill guides setup for AI-powered CI/CD automation in hatch3r-managed projects. The core SKILL covers GitHub Actions (the default); non-GitHub platforms load on demand from `references/`.
12
12
 
13
- ## Overview
13
+ ## Progressive Disclosure (Anthropic 2026 skills spec)
14
14
 
15
- ### GitHub Actions (Agentic Workflows)
15
+ | Target platform | File to read |
16
+ |-----------------|--------------|
17
+ | GitHub Actions (default) | This file — read sections below |
18
+ | Azure DevOps Pipelines | `references/azure-devops.md` |
19
+ | GitLab CI/CD | `references/gitlab-ci.md` |
16
20
 
17
- GitHub Agentic Workflows (technical preview, Feb 2026) bring AI agent orchestration into
18
- GitHub Actions. Agentic Workflows are markdown files in `.github/workflows/` with YAML frontmatter that
19
- compile to GitHub Actions jobs. They support multiple AI engines (GitHub Copilot, Claude,
20
- OpenAI Codex) and use MCP for tool access.
21
+ Load only the references file that matches `platform` in `.agents/hatch.json`. Do not eagerly load all three.
21
22
 
22
- ### Azure DevOps Pipelines
23
+ ## Overview (GitHub Actions)
23
24
 
24
- Azure Pipelines use YAML files in the repo (typically `azure-pipelines.yml` or files under `.azuredevops/`) to define CI/CD jobs. Use the `az pipelines` CLI for management and monitoring.
25
+ GitHub Agentic Workflows (technical preview, Feb 2026) bring AI agent orchestration into GitHub Actions. Agentic Workflows are markdown files in `.github/workflows/` with YAML frontmatter that compile to GitHub Actions jobs. They support multiple AI engines (GitHub Copilot, Claude, OpenAI Codex) and use MCP for tool access.
25
26
 
26
- ### GitLab CI/CD
27
-
28
- GitLab CI uses `.gitlab-ci.yml` at the repo root to define pipelines. Use the `glab ci` CLI for management and monitoring.
29
-
30
- ## Available Workflow Templates
31
-
32
- ### Platform: GitHub Actions
33
-
34
- hatch3r recommends these agentic workflow patterns for GitHub-hosted projects:
27
+ ## Available Workflow Templates (GitHub)
35
28
 
36
29
  ### 1. Continuous Test Improvement
37
30
 
@@ -71,8 +64,7 @@ permissions:
71
64
  ---
72
65
  ```
73
66
 
74
- When a new issue is opened, analyze it, apply labels from the hatch3r taxonomy
75
- (type:*, priority:*, area:*), and add a triage summary comment.
67
+ When a new issue is opened, analyze it, apply labels from the hatch3r taxonomy (type:*, priority:*, area:*), and add a triage summary comment.
76
68
 
77
69
  ### 3. Continuous Documentation
78
70
 
@@ -97,65 +89,6 @@ Replace `{defaultBranch}` with `board.defaultBranch` from `.agents/hatch.json` (
97
89
 
98
90
  After a PR is merged, check if documentation needs updating and open a follow-up PR.
99
91
 
100
- ### Platform: Azure DevOps Pipelines
101
-
102
- Equivalent pipeline patterns for Azure DevOps:
103
-
104
- #### 1. Continuous Test Improvement (ADO)
105
-
106
- ```yaml
107
- # azure-pipelines/hatch3r-continuous-testing.yml
108
- trigger: none
109
- schedules:
110
- - cron: '0 6 * * 1'
111
- displayName: Weekly test improvement
112
- branches:
113
- include: [{defaultBranch}]
114
- always: true
115
-
116
- pool:
117
- vmImage: 'ubuntu-latest'
118
-
119
- steps:
120
- - script: echo "Analyze test coverage gaps and create PRs with new tests"
121
- displayName: 'AI-assisted test improvement'
122
- ```
123
-
124
- Replace `{defaultBranch}` with `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
125
-
126
- #### 2. Continuous Triage (ADO)
127
-
128
- Use Azure Boards service hooks to trigger a pipeline when a new work item is created. The pipeline applies labels and adds a triage comment.
129
-
130
- #### 3. Continuous Documentation (ADO)
131
-
132
- Trigger a pipeline on PR completion to the default branch. Check if documentation needs updating and open a follow-up PR via `az repos pr create`.
133
-
134
- ### Platform: GitLab CI/CD
135
-
136
- Equivalent pipeline patterns for GitLab:
137
-
138
- #### 1. Continuous Test Improvement (GitLab)
139
-
140
- ```yaml
141
- # .gitlab-ci.yml (or included file)
142
- continuous-test-improvement:
143
- rules:
144
- - if: $CI_PIPELINE_SOURCE == "schedule"
145
- script:
146
- - echo "Analyze test coverage gaps and create MRs with new tests"
147
- ```
148
-
149
- Configure a pipeline schedule in GitLab (Settings → CI/CD → Schedules) for weekly runs.
150
-
151
- #### 2. Continuous Triage (GitLab)
152
-
153
- Use GitLab webhooks on issue creation to trigger a pipeline that applies labels from the hatch3r taxonomy and adds a triage comment via `glab issue update`.
154
-
155
- #### 3. Continuous Documentation (GitLab)
156
-
157
- Trigger on merge to the default branch. Check if documentation needs updating and open a follow-up MR via `glab mr create`.
158
-
159
92
  ## Security Considerations
160
93
 
161
94
  - Workflows run in sandboxed environments with minimal permissions
@@ -170,62 +103,39 @@ Trigger on merge to the default branch. Check if documentation needs updating an
170
103
  - The hatch3r-docs-writer agent's patterns can inform continuous documentation
171
104
  - Board management commands complement continuous triage
172
105
 
173
- ## Setup
106
+ ## Setup (GitHub)
174
107
 
175
- ### GitHub
176
108
  1. Enable GitHub Agentic Workflows in your repository settings
177
109
  2. Create workflow files in `.github/workflows/` using the templates above
178
110
  3. Configure the AI engine (copilot is default, claude and codex are alternatives)
179
111
  4. Set appropriate permissions for each workflow
180
112
  5. Monitor workflow runs in the Actions tab
181
113
 
182
- ### Azure DevOps
183
- 1. Create pipeline YAML files in the repo (e.g., `azure-pipelines/`)
184
- 2. Register each pipeline in Azure DevOps (Pipelines → New Pipeline → Existing YAML)
185
- 3. Configure service connections and variable groups for secrets
186
- 4. Set appropriate pipeline permissions and approvals
187
- 5. Monitor runs in Azure Pipelines
188
-
189
- ### GitLab
190
- 1. Define jobs in `.gitlab-ci.yml` (or use `include:` for modular files)
191
- 2. Configure pipeline schedules for periodic jobs (Settings CI/CD Schedules)
192
- 3. Set CI/CD variables for secrets (Settings → CI/CD → Variables)
193
- 4. Configure protected branches and merge request approvals
194
- 5. Monitor runs in CI/CD → Pipelines
195
-
196
- ## Verification Steps
197
-
198
- 1. **Syntax check**: Validate the workflow/pipeline definition:
199
- - **GitHub:** `gh workflow view {name}` or the Actions web UI
200
- - **Azure DevOps:** `az pipelines show --name {name}` or the Pipelines web UI
201
- - **GitLab:** CI Lint (CI/CD → Editor → Validate) or `glab ci lint`
202
- 2. **Dry run**: Trigger manually and monitor:
203
- - **GitHub:** `gh workflow run {name}` → `gh run watch`
204
- - **Azure DevOps:** `az pipelines run --name {name}` → `az pipelines runs show --id {id}`
205
- - **GitLab:** `glab ci run` → `glab ci view`
206
- 3. **Output review**: Check the AI-generated output (PR/MR, comment, label) for quality and correctness.
207
- 4. **Permission audit**: Verify the workflow cannot access resources beyond its declared permissions.
208
- 5. **Idempotency**: Run the workflow twice on the same input — it should not create duplicate artifacts.
209
- 6. **Error handling**: Trigger with invalid/edge-case input — workflow should fail gracefully with clear error.
210
-
211
- ## Monitoring
212
-
213
- - **Execution tracking**:
214
- - **GitHub:** `gh run list --workflow={name}`
215
- - **Azure DevOps:** `az pipelines runs list --pipeline-name {name}`
216
- - **GitLab:** `glab ci list`
217
- - **Failure alerts**:
218
- - **GitHub:** Settings → Notifications → Actions
219
- - **Azure DevOps:** Pipeline notifications (Project Settings → Notifications)
220
- - **GitLab:** Pipeline email notifications (Settings → Integrations)
221
- - **Cost awareness**: Monitor AI token usage per workflow run. Set spending limits in org settings.
222
- - **Quality metrics**: Track: success rate, output acceptance rate (merged PRs/MRs / total), mean time per run.
114
+ For Azure DevOps setup: see `references/azure-devops.md`. For GitLab setup: see `references/gitlab-ci.md`.
115
+
116
+ ## Verification Steps (GitHub)
117
+
118
+ 1. **Syntax check:** `gh workflow view {name}` or the Actions web UI
119
+ 2. **Dry run:** `gh workflow run {name}` → `gh run watch`
120
+ 3. **Output review:** Check the AI-generated output (PR, comment, label) for quality and correctness.
121
+ 4. **Permission audit:** Verify the workflow cannot access resources beyond its declared permissions.
122
+ 5. **Idempotency:** Run the workflow twice on the same input — it should not create duplicate artifacts.
123
+ 6. **Error handling:** Trigger with invalid/edge-case input workflow should fail gracefully with clear error.
124
+
125
+ Platform-equivalent verification for ADO/GitLab: see the platform reference files.
126
+
127
+ ## Monitoring (GitHub)
128
+
129
+ - **Execution tracking:** `gh run list --workflow={name}`
130
+ - **Failure alerts:** Settings Notifications → Actions
131
+ - **Cost awareness:** Monitor AI token usage per workflow run. Set spending limits in org settings.
132
+ - **Quality metrics:** Track success rate, output acceptance rate (merged PRs / total), mean time per run.
223
133
 
224
134
  ## Error Handling
225
135
 
226
- - **Workflow file has YAML syntax errors**: Validate the workflow file locally before pushing (e.g., `actionlint` for GitHub Actions, Azure Pipelines schema validation, or `glab ci lint` for GitLab). Fix all reported errors before committing.
227
- - **AI engine produces low-quality or empty output**: Add explicit context to the workflow prompt (file references, examples, constraints). If the output is still poor after enrichment, switch to a more capable model.
228
- - **Workflow runs exceed cost or time limits**: Add `timeout-minutes` to the workflow, scope file references to reduce context size, and add concurrency groups to prevent parallel runs.
136
+ - **Workflow file has YAML syntax errors:** Validate the workflow file locally before pushing (e.g., `actionlint` for GitHub Actions). Fix all reported errors before committing.
137
+ - **AI engine produces low-quality or empty output:** Add explicit context to the workflow prompt (file references, examples, constraints). If the output is still poor after enrichment, switch to a more capable model.
138
+ - **Workflow runs exceed cost or time limits:** Add `timeout-minutes` to the workflow, scope file references to reduce context size, and add concurrency groups to prevent parallel runs.
229
139
 
230
140
  ## Troubleshooting
231
141
 
@@ -238,20 +148,16 @@ Trigger on merge to the default branch. Check if documentation needs updating an
238
148
  | Rate limiting | Too many workflow runs | Add concurrency groups, reduce trigger frequency |
239
149
  | Workflow hangs | Large repo context or slow AI response | Set timeout-minutes, scope file references |
240
150
 
241
- ## Rollback
151
+ ## Rollback (GitHub)
242
152
 
243
153
  If a workflow produces undesirable results:
244
154
 
245
- 1. **Disable immediately**:
246
- - **GitHub:** `gh workflow disable {name}` or toggle in repo Settings Actions
247
- - **Azure DevOps:** `az pipelines update --name {name} --enabled false` or toggle in Pipelines UI
248
- - **GitLab:** Pause pipeline schedules in Settings CI/CD → Schedules, or use the GitLab API
249
- 2. **Revert outputs**: Close AI-generated PRs/MRs, remove applied labels, revert merged changes if needed.
250
- 3. **Diagnose**: Review recent run logs:
251
- - **GitHub:** `gh run view {run-id} --log`
252
- - **Azure DevOps:** `az pipelines runs show --id {run-id}` and download logs from the Pipelines UI
253
- - **GitLab:** `glab ci view {pipeline-id}` or check CI/CD → Pipelines in the web UI
254
- 4. **Fix and re-enable**: Update the workflow/pipeline file, test via manual dispatch, then re-enable.
155
+ 1. **Disable immediately:** `gh workflow disable {name}` or toggle in repo Settings → Actions
156
+ 2. **Revert outputs:** Close AI-generated PRs, remove applied labels, revert merged changes if needed.
157
+ 3. **Diagnose:** `gh run view {run-id} --log`
158
+ 4. **Fix and re-enable:** Update the workflow file, test via manual dispatch, then re-enable.
159
+
160
+ Platform-equivalent rollback for ADO/GitLab: see the platform reference files.
255
161
 
256
162
  ## Definition of Done
257
163
 
@@ -0,0 +1,60 @@
1
+ # Azure DevOps Pipelines — Agentic Workflow Patterns
2
+
3
+ Loaded on demand when `platform: azure-devops` in `.agents/hatch.json` or when user is setting up Azure DevOps CI.
4
+
5
+ Azure Pipelines use YAML files in the repo (typically `azure-pipelines.yml` or files under `.azuredevops/`) to define CI/CD jobs. Use the `az pipelines` CLI for management and monitoring.
6
+
7
+ ## 1. Continuous Test Improvement (ADO)
8
+
9
+ ```yaml
10
+ # azure-pipelines/hatch3r-continuous-testing.yml
11
+ trigger: none
12
+ schedules:
13
+ - cron: '0 6 * * 1'
14
+ displayName: Weekly test improvement
15
+ branches:
16
+ include: [{defaultBranch}]
17
+ always: true
18
+
19
+ pool:
20
+ vmImage: 'ubuntu-latest'
21
+
22
+ steps:
23
+ - script: echo "Analyze test coverage gaps and create PRs with new tests"
24
+ displayName: 'AI-assisted test improvement'
25
+ ```
26
+
27
+ Replace `{defaultBranch}` with `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
28
+
29
+ ## 2. Continuous Triage (ADO)
30
+
31
+ Use Azure Boards service hooks to trigger a pipeline when a new work item is created. The pipeline applies labels and adds a triage comment.
32
+
33
+ ## 3. Continuous Documentation (ADO)
34
+
35
+ Trigger a pipeline on PR completion to the default branch. Check if documentation needs updating and open a follow-up PR via `az repos pr create`.
36
+
37
+ ## Setup
38
+
39
+ 1. Create pipeline YAML files in the repo (e.g., `azure-pipelines/`)
40
+ 2. Register each pipeline in Azure DevOps (Pipelines → New Pipeline → Existing YAML)
41
+ 3. Configure service connections and variable groups for secrets
42
+ 4. Set appropriate pipeline permissions and approvals
43
+ 5. Monitor runs in Azure Pipelines
44
+
45
+ ## Verification
46
+
47
+ - **Syntax check:** `az pipelines show --name {name}` or the Pipelines web UI
48
+ - **Dry run:** `az pipelines run --name {name}` → `az pipelines runs show --id {id}`
49
+
50
+ ## Monitoring
51
+
52
+ - **Execution tracking:** `az pipelines runs list --pipeline-name {name}`
53
+ - **Failure alerts:** Pipeline notifications (Project Settings → Notifications)
54
+
55
+ ## Rollback
56
+
57
+ 1. Disable: `az pipelines update --name {name} --enabled false` or toggle in Pipelines UI
58
+ 2. Revert outputs: close AI-generated PRs, remove applied labels, revert merged changes if needed
59
+ 3. Diagnose: `az pipelines runs show --id {run-id}` and download logs from the Pipelines UI
60
+ 4. Fix and re-enable: update the pipeline file, test via manual dispatch, then re-enable
@@ -0,0 +1,51 @@
1
+ # GitLab CI/CD — Agentic Workflow Patterns
2
+
3
+ Loaded on demand when `platform: gitlab` in `.agents/hatch.json` or when user is setting up GitLab CI.
4
+
5
+ GitLab CI uses `.gitlab-ci.yml` at the repo root to define pipelines. Use the `glab ci` CLI for management and monitoring.
6
+
7
+ ## 1. Continuous Test Improvement (GitLab)
8
+
9
+ ```yaml
10
+ # .gitlab-ci.yml (or included file)
11
+ continuous-test-improvement:
12
+ rules:
13
+ - if: $CI_PIPELINE_SOURCE == "schedule"
14
+ script:
15
+ - echo "Analyze test coverage gaps and create MRs with new tests"
16
+ ```
17
+
18
+ Configure a pipeline schedule in GitLab (Settings → CI/CD → Schedules) for weekly runs.
19
+
20
+ ## 2. Continuous Triage (GitLab)
21
+
22
+ Use GitLab webhooks on issue creation to trigger a pipeline that applies labels from the hatch3r taxonomy and adds a triage comment via `glab issue update`.
23
+
24
+ ## 3. Continuous Documentation (GitLab)
25
+
26
+ Trigger on merge to the default branch. Check if documentation needs updating and open a follow-up MR via `glab mr create`.
27
+
28
+ ## Setup
29
+
30
+ 1. Define jobs in `.gitlab-ci.yml` (or use `include:` for modular files)
31
+ 2. Configure pipeline schedules for periodic jobs (Settings → CI/CD → Schedules)
32
+ 3. Set CI/CD variables for secrets (Settings → CI/CD → Variables)
33
+ 4. Configure protected branches and merge request approvals
34
+ 5. Monitor runs in CI/CD → Pipelines
35
+
36
+ ## Verification
37
+
38
+ - **Syntax check:** CI Lint (CI/CD → Editor → Validate) or `glab ci lint`
39
+ - **Dry run:** `glab ci run` → `glab ci view`
40
+
41
+ ## Monitoring
42
+
43
+ - **Execution tracking:** `glab ci list`
44
+ - **Failure alerts:** Pipeline email notifications (Settings → Integrations)
45
+
46
+ ## Rollback
47
+
48
+ 1. Disable: pause pipeline schedules in Settings → CI/CD → Schedules, or use the GitLab API
49
+ 2. Revert outputs: close AI-generated MRs, remove applied labels, revert merged changes if needed
50
+ 3. Diagnose: `glab ci view {pipeline-id}` or check CI/CD → Pipelines in the web UI
51
+ 4. Fix and re-enable: update the pipeline file, test via manual dispatch, then re-enable
@@ -62,35 +62,16 @@ Output a structured plan before writing code:
62
62
 
63
63
  ## Step 4b: Sub-Agent Delegation
64
64
 
65
- Every issue MUST be delegated to a dedicated `hatch3r-implementer` sub-agent — never implement inline. The board-pickup command orchestrates this automatically, but if running issue-workflow standalone, follow the pattern below.
65
+ Every issue MUST be delegated to a dedicated `hatch3r-implementer` sub-agent — never implement inline. The board-pickup command orchestrates this automatically; if running issue-workflow standalone, apply the pattern that matches your scenario:
66
66
 
67
- ### Single Issue
67
+ | Scenario | Pattern |
68
+ |----------|---------|
69
+ | Single issue | Spawn one `hatch3r-implementer` sub-agent via the Task tool with issue number, body, acceptance criteria, issue type, researcher output, and spec references. Await result. |
70
+ | Epic with sub-issues | Load `references/delegation-patterns.md` — Pattern 2 |
71
+ | Batch of standalone issues | Load `references/delegation-patterns.md` — Pattern 3 |
72
+ | Plain chat with multiple tasks | Load `references/delegation-patterns.md` — Pattern 4 |
68
73
 
69
- Spawn one `hatch3r-implementer` sub-agent via the Task tool. Include: issue number, body, acceptance criteria, issue type, researcher output, and spec references. Await the result.
70
-
71
- ### Epic with Sub-Issues
72
-
73
- 1. **Group sub-issues by dependency level** from the epic's Implementation Order.
74
- 2. **Spawn one implementer sub-agent per sub-issue** using the Task tool. Include: issue number, body, acceptance criteria, issue type, parent epic context, and spec references.
75
- 3. **Launch sub-issues at the same dependency level in parallel** — as many concurrently as the platform supports.
76
- 4. **Await all sub-agents at a level** before starting the next level.
77
- 5. **Review results** from each sub-agent. Resolve any file conflicts between parallel outputs.
78
-
79
- ### Multiple Standalone Issues (Batch)
80
-
81
- When working on multiple standalone issues (not part of an epic), apply the same parallel pattern:
82
-
83
- 1. **Group issues by dependency level.** Independent issues (no mutual dependencies) share the same level and run in parallel.
84
- 2. **Spawn one researcher sub-agent per issue** in parallel — as many concurrently as the platform supports. Each issue gets individual context gathering since standalone issues are unrelated.
85
- 3. **Spawn one implementer sub-agent per issue per level** in parallel — as many concurrently as the platform supports. Each receives its own researcher output.
86
- 4. **Await all sub-agents at a level** before starting the next level.
87
- 5. **Review results** from each sub-agent. Resolve any cross-issue file conflicts.
88
-
89
- ### Plain Chat with Multiple Tasks
90
-
91
- When working from plain chat instructions with multiple tasks (numbered lists, multiple issue references, or distinct requests), parse into discrete tasks and apply the batch delegation pattern above. For issue references (GitHub Issues, ADO Work Items, or GitLab Issues), fetch issue details using the appropriate platform CLI. For natural language tasks, derive title, acceptance criteria, and type from the instruction.
92
-
93
- The implementer sub-agent protocol is defined in the hatch3r-implementer agent. Each sub-agent handles its own implementation and testing but does NOT create branches, commits, or PRs.
74
+ The implementer sub-agent protocol is defined in the `hatch3r-implementer` agent. Each sub-agent handles its own implementation and testing but does NOT create branches, commits, or PRs.
94
75
 
95
76
  ## Step 5: Implement
96
77
 
@@ -0,0 +1,51 @@
1
+ # Sub-Agent Delegation Patterns
2
+
3
+ Loaded on demand during Step 4b of the issue workflow when the active task goes beyond a single issue — epic decomposition, batch standalone issues, or multi-task plain chat. For a single issue, the inline summary in SKILL.md Step 4b is sufficient.
4
+
5
+ ## Pattern 1: Single Issue
6
+
7
+ Spawn one `hatch3r-implementer` sub-agent via the Task tool. Include:
8
+
9
+ - Issue number
10
+ - Issue body
11
+ - Acceptance criteria
12
+ - Issue type
13
+ - Researcher output
14
+ - Spec references
15
+
16
+ Await the result.
17
+
18
+ ## Pattern 2: Epic with Sub-Issues
19
+
20
+ 1. **Group sub-issues by dependency level** from the epic's Implementation Order.
21
+ 2. **Spawn one implementer sub-agent per sub-issue** using the Task tool. Include:
22
+ - Issue number
23
+ - Issue body
24
+ - Acceptance criteria
25
+ - Issue type
26
+ - Parent epic context
27
+ - Spec references
28
+ 3. **Launch sub-issues at the same dependency level in parallel** — as many concurrently as the platform supports.
29
+ 4. **Await all sub-agents at a level** before starting the next level.
30
+ 5. **Review results** from each sub-agent. Resolve any file conflicts between parallel outputs.
31
+
32
+ ## Pattern 3: Multiple Standalone Issues (Batch)
33
+
34
+ When working on multiple standalone issues (not part of an epic), apply the same parallel pattern:
35
+
36
+ 1. **Group issues by dependency level.** Independent issues (no mutual dependencies) share the same level and run in parallel.
37
+ 2. **Spawn one researcher sub-agent per issue** in parallel — as many concurrently as the platform supports. Each issue gets individual context gathering since standalone issues are unrelated.
38
+ 3. **Spawn one implementer sub-agent per issue per level** in parallel — as many concurrently as the platform supports. Each receives its own researcher output.
39
+ 4. **Await all sub-agents at a level** before starting the next level.
40
+ 5. **Review results** from each sub-agent. Resolve any cross-issue file conflicts.
41
+
42
+ ## Pattern 4: Plain Chat with Multiple Tasks
43
+
44
+ When working from plain chat instructions with multiple tasks (numbered lists, multiple issue references, or distinct requests), parse into discrete tasks and apply the batch delegation pattern above.
45
+
46
+ - For issue references (GitHub Issues, ADO Work Items, or GitLab Issues): fetch issue details using the appropriate platform CLI.
47
+ - For natural language tasks: derive title, acceptance criteria, and type from the instruction.
48
+
49
+ ## Protocol Notes
50
+
51
+ The implementer sub-agent protocol is defined in the `hatch3r-implementer` agent. Each sub-agent handles its own implementation and testing but does NOT create branches, commits, or PRs.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  id: hatch3r-rule-customize
3
- description: Rule customization redirects to the unified hatch3r-customize skill.
3
+ description: Redirect to adjust glob patterns, always-on triggers, and precedence tiers under .hatch3r/rules/ -- use when narrowing or reprioritizing a canonical lint rule
4
4
  tags: [customize]
5
5
  quality_charter: agents/shared/quality-charter.md
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  id: hatch3r-skill-customize
3
- description: Skill customization redirects to the unified hatch3r-customize skill.
3
+ description: Redirect to rewrite dispatch text that the model uses for auto-selection under .hatch3r/skills/ -- use when a capability is chosen for the wrong task or vice versa
4
4
  tags: [customize]
5
5
  quality_charter: agents/shared/quality-charter.md
6
6
  ---