hatch3r 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +93 -322
  2. package/agents/hatch3r-a11y-auditor.md +24 -6
  3. package/agents/hatch3r-architect.md +20 -1
  4. package/agents/hatch3r-ci-watcher.md +31 -8
  5. package/agents/hatch3r-context-rules.md +14 -2
  6. package/agents/hatch3r-dependency-auditor.md +21 -5
  7. package/agents/hatch3r-devops.md +37 -6
  8. package/agents/hatch3r-docs-writer.md +19 -3
  9. package/agents/hatch3r-fixer.md +171 -0
  10. package/agents/hatch3r-implementer.md +84 -11
  11. package/agents/hatch3r-learnings-loader.md +69 -13
  12. package/agents/hatch3r-lint-fixer.md +19 -14
  13. package/agents/hatch3r-perf-profiler.md +18 -1
  14. package/agents/hatch3r-researcher.md +440 -5
  15. package/agents/hatch3r-reviewer.md +97 -5
  16. package/agents/hatch3r-security-auditor.md +23 -5
  17. package/agents/hatch3r-test-writer.md +21 -10
  18. package/checks/README.md +49 -0
  19. package/checks/code-quality.md +49 -0
  20. package/checks/performance.md +58 -0
  21. package/checks/security.md +58 -0
  22. package/checks/testing.md +53 -0
  23. package/commands/board/pickup-azure-devops.md +81 -0
  24. package/commands/board/pickup-delegation-multi.md +197 -0
  25. package/commands/board/pickup-delegation.md +100 -0
  26. package/commands/board/pickup-github.md +82 -0
  27. package/commands/board/pickup-gitlab.md +81 -0
  28. package/commands/board/pickup-modes.md +143 -0
  29. package/commands/board/pickup-post-impl.md +120 -0
  30. package/commands/board/shared-azure-devops.md +149 -0
  31. package/commands/board/shared-board-overview.md +215 -0
  32. package/commands/board/shared-github.md +169 -0
  33. package/commands/board/shared-gitlab.md +142 -0
  34. package/commands/hatch3r-agent-customize.md +40 -2
  35. package/commands/hatch3r-api-spec.md +294 -32
  36. package/commands/hatch3r-benchmark.md +386 -32
  37. package/commands/hatch3r-board-fill.md +161 -25
  38. package/commands/hatch3r-board-groom.md +595 -0
  39. package/commands/hatch3r-board-init.md +203 -46
  40. package/commands/hatch3r-board-pickup.md +79 -457
  41. package/commands/hatch3r-board-refresh.md +98 -27
  42. package/commands/hatch3r-board-shared.md +87 -238
  43. package/commands/hatch3r-bug-plan.md +16 -3
  44. package/commands/hatch3r-codebase-map.md +43 -10
  45. package/commands/hatch3r-command-customize.md +6 -0
  46. package/commands/hatch3r-context-health.md +5 -0
  47. package/commands/hatch3r-cost-tracking.md +5 -0
  48. package/commands/hatch3r-debug.md +426 -0
  49. package/commands/hatch3r-dep-audit.md +7 -1
  50. package/commands/hatch3r-feature-plan.md +74 -12
  51. package/commands/hatch3r-healthcheck.md +17 -1
  52. package/commands/hatch3r-hooks.md +16 -10
  53. package/commands/hatch3r-learn.md +15 -9
  54. package/commands/hatch3r-migration-plan.md +333 -33
  55. package/commands/hatch3r-onboard.md +327 -38
  56. package/commands/hatch3r-project-spec.md +46 -10
  57. package/commands/hatch3r-quick-change.md +336 -0
  58. package/commands/hatch3r-recipe.md +6 -0
  59. package/commands/hatch3r-refactor-plan.md +29 -13
  60. package/commands/hatch3r-release.md +13 -3
  61. package/commands/hatch3r-revision.md +395 -0
  62. package/commands/hatch3r-roadmap.md +18 -3
  63. package/commands/hatch3r-rule-customize.md +6 -0
  64. package/commands/hatch3r-security-audit.md +17 -1
  65. package/commands/hatch3r-skill-customize.md +6 -0
  66. package/commands/hatch3r-test-plan.md +532 -0
  67. package/commands/hatch3r-workflow.md +113 -38
  68. package/dist/cli/index.js +5184 -2593
  69. package/dist/cli/index.js.map +1 -0
  70. package/github-agents/hatch3r-docs-agent.md +1 -0
  71. package/github-agents/hatch3r-lint-agent.md +1 -0
  72. package/github-agents/hatch3r-security-agent.md +1 -0
  73. package/github-agents/hatch3r-test-agent.md +1 -0
  74. package/hooks/hatch3r-ci-failure.md +30 -0
  75. package/hooks/hatch3r-file-save.md +22 -0
  76. package/hooks/hatch3r-post-merge.md +23 -0
  77. package/hooks/hatch3r-pre-commit.md +23 -0
  78. package/hooks/hatch3r-pre-push.md +22 -0
  79. package/hooks/hatch3r-session-start.md +22 -0
  80. package/mcp/mcp.json +22 -3
  81. package/package.json +4 -7
  82. package/prompts/hatch3r-bug-triage.md +1 -0
  83. package/prompts/hatch3r-code-review.md +1 -0
  84. package/prompts/hatch3r-pr-description.md +1 -0
  85. package/rules/hatch3r-accessibility-standards.md +1 -0
  86. package/rules/hatch3r-agent-orchestration.md +326 -53
  87. package/rules/hatch3r-agent-orchestration.mdc +225 -0
  88. package/rules/hatch3r-api-design.md +4 -1
  89. package/rules/hatch3r-browser-verification.md +33 -1
  90. package/rules/hatch3r-browser-verification.mdc +29 -0
  91. package/rules/hatch3r-ci-cd.md +5 -1
  92. package/rules/hatch3r-ci-cd.mdc +4 -1
  93. package/rules/hatch3r-code-standards.md +18 -0
  94. package/rules/hatch3r-code-standards.mdc +10 -1
  95. package/rules/hatch3r-component-conventions.md +4 -1
  96. package/rules/hatch3r-data-classification.md +1 -0
  97. package/rules/hatch3r-deep-context.md +94 -0
  98. package/rules/hatch3r-deep-context.mdc +69 -0
  99. package/rules/hatch3r-dependency-management.md +13 -0
  100. package/rules/hatch3r-feature-flags.md +4 -1
  101. package/rules/hatch3r-git-conventions.md +1 -0
  102. package/rules/hatch3r-i18n.md +4 -1
  103. package/rules/hatch3r-learning-consult.md +4 -2
  104. package/rules/hatch3r-learning-consult.mdc +3 -2
  105. package/rules/hatch3r-migrations.md +12 -0
  106. package/rules/hatch3r-observability.md +293 -1
  107. package/rules/hatch3r-performance-budgets.md +5 -2
  108. package/rules/hatch3r-performance-budgets.mdc +1 -1
  109. package/rules/hatch3r-secrets-management.md +11 -3
  110. package/rules/hatch3r-secrets-management.mdc +10 -3
  111. package/rules/hatch3r-security-patterns.md +23 -3
  112. package/rules/hatch3r-security-patterns.mdc +8 -2
  113. package/rules/hatch3r-testing.md +1 -0
  114. package/rules/hatch3r-theming.md +4 -1
  115. package/rules/hatch3r-tooling-hierarchy.md +42 -15
  116. package/rules/hatch3r-tooling-hierarchy.mdc +27 -4
  117. package/skills/hatch3r-a11y-audit/SKILL.md +1 -0
  118. package/skills/hatch3r-agent-customize/SKILL.md +3 -0
  119. package/skills/hatch3r-api-spec/SKILL.md +1 -0
  120. package/skills/hatch3r-architecture-review/SKILL.md +6 -2
  121. package/skills/hatch3r-bug-fix/SKILL.md +4 -1
  122. package/skills/hatch3r-ci-pipeline/SKILL.md +1 -0
  123. package/skills/hatch3r-command-customize/SKILL.md +1 -0
  124. package/skills/hatch3r-context-health/SKILL.md +2 -1
  125. package/skills/hatch3r-cost-tracking/SKILL.md +1 -0
  126. package/skills/hatch3r-dep-audit/SKILL.md +6 -2
  127. package/skills/hatch3r-feature/SKILL.md +9 -2
  128. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +130 -21
  129. package/skills/hatch3r-incident-response/SKILL.md +11 -5
  130. package/skills/hatch3r-issue-workflow/SKILL.md +12 -7
  131. package/skills/hatch3r-logical-refactor/SKILL.md +1 -0
  132. package/skills/hatch3r-migration/SKILL.md +1 -0
  133. package/skills/hatch3r-perf-audit/SKILL.md +2 -1
  134. package/skills/hatch3r-pr-creation/SKILL.md +20 -10
  135. package/skills/hatch3r-qa-validation/SKILL.md +2 -1
  136. package/skills/hatch3r-recipe/SKILL.md +1 -0
  137. package/skills/hatch3r-refactor/SKILL.md +7 -1
  138. package/skills/hatch3r-release/SKILL.md +15 -11
  139. package/skills/hatch3r-rule-customize/SKILL.md +1 -0
  140. package/skills/hatch3r-skill-customize/SKILL.md +1 -0
  141. package/skills/hatch3r-visual-refactor/SKILL.md +1 -0
  142. package/dist/cli/hooks-ZOTFDEA3.js +0 -59
  143. package/rules/hatch3r-error-handling.md +0 -17
  144. package/rules/hatch3r-error-handling.mdc +0 -15
@@ -3,29 +3,49 @@ id: hatch3r-tooling-hierarchy
3
3
  type: rule
4
4
  description: Priority order for tools and knowledge sources
5
5
  scope: always
6
+ tags: [core]
6
7
  ---
7
8
  # Tooling Hierarchy
8
9
 
9
- ## A. GitHub CLI-First
10
+ ## A. Platform MCP-First (when available)
10
11
 
11
- **Prefer `gh` CLI over GitHub MCP tools** for GitHub operations. CLI tools are optimized for agent use lower token cost, faster execution, and deterministic output parsing.
12
+ **Prefer platform MCP tools over the platform CLI** when the MCP server provides typed tools with structured input/output. Use them as the primary interface for issue tracker and repository operations.
12
13
 
13
- **Prerequisites:** `gh auth login` must be completed, or `GITHUB_TOKEN` environment variable set. For Projects v2: `gh auth refresh -s project`.
14
+ Read `platform` from `.agents/hatch.json` to determine which platform tools to use.
14
15
 
15
- **Primary tool for:**
16
- - Issue CRUD: `gh issue create`, `gh issue edit`, `gh issue view`, `gh issue list`
17
- - PR CRUD: `gh pr create`, `gh pr view`, `gh pr list`, `gh pr merge`
18
- - Search: `gh search issues`, `gh search prs`, `gh search code`
19
- - Labels: `gh label create`, `gh label list`
20
- - Releases: `gh release create`
21
- - CI/Actions: `gh run list`, `gh run view`, `gh run watch`
22
- - Projects v2: `gh project item-add`, `gh project item-edit`, `gh project item-list`, `gh project field-list`, `gh project view`
16
+ ### Prerequisites
23
17
 
24
- **Fallback to GitHub MCP only when:**
25
- - The `gh` CLI lacks the specific capability (e.g., sub-issue management via `sub_issue_write`).
26
- - GraphQL queries are needed that `gh api graphql` cannot express concisely.
18
+ | Platform | Auth Setup |
19
+ |----------|-----------|
20
+ | **GitHub** | `gh auth login` or `GITHUB_TOKEN` env var. For Projects v2: `gh auth refresh -s project` |
21
+ | **Azure DevOps** | `az login` and `az devops configure --defaults organization=ORG project=PROJECT` |
22
+ | **GitLab** | `glab auth login` or `GITLAB_TOKEN` env var |
27
23
 
28
- **Never** use GitHub MCP for operations that `gh` CLI handles well (issue CRUD, PR CRUD, search, labels, releases).
24
+ ### Platform CLI Fallback Reference
25
+
26
+ **Fallback to the platform CLI only when:**
27
+ - The MCP tool catalog lacks the specific capability.
28
+ - An MCP call fails repeatedly and the CLI provides a viable alternative.
29
+
30
+ **Never** use the platform CLI for operations that have a direct MCP equivalent (issue CRUD, PR/MR CRUD, search, labels).
31
+
32
+ | Action | GitHub | Azure DevOps | GitLab |
33
+ |--------|--------|--------------|--------|
34
+ | Create issue | `gh issue create` | `az boards work-item create` | `glab issue create` |
35
+ | Edit issue | `gh issue edit` | `az boards work-item update` | `glab issue update` |
36
+ | View issue | `gh issue view` | `az boards work-item show --id N` | `glab issue view` |
37
+ | List issues | `gh issue list` | `az boards work-item list` | `glab issue list` |
38
+ | Create PR/MR | `gh pr create` | `az repos pr create` | `glab mr create` |
39
+ | View PR/MR | `gh pr view` | `az repos pr show` | `glab mr view` |
40
+ | List PRs/MRs | `gh pr list` | `az repos pr list` | `glab mr list` |
41
+ | Merge PR/MR | `gh pr merge` | `az repos pr complete` | `glab mr merge` |
42
+ | Search issues | `gh search issues` | `az boards query` | `glab issue list --search` |
43
+ | Search PRs | `gh search prs` | `az repos pr list --status all` | `glab mr list --search` |
44
+ | Search code | `gh search code` | `az repos show` | `glab search` |
45
+ | Labels | `gh label create/list` | `az boards work-item update --fields` | `glab label create/list` |
46
+ | Releases | `gh release create` | `az repos release` | `glab release create` |
47
+ | CI runs | `gh run list/view/watch` | `az pipelines run list/show` | `glab ci list/view` |
48
+ | Projects | `gh project item-add/edit/list` | `az boards iteration/area` | GitLab Boards API |
29
49
 
30
50
  ## B. Documentation MCP for Library Documentation
31
51
 
@@ -59,6 +79,13 @@ Use web search to retrieve current, real-world information not available in proj
59
79
  - Standard library API questions (use documentation MCP instead).
60
80
  - Internal project decisions (use project ADRs).
61
81
 
82
+ **Fallback when web search is unavailable:**
83
+ If no web search MCP server is configured (e.g., `brave-search` is not in `mcp.servers` in `.agents/hatch.json`), web research cannot be performed. In this case:
84
+ - Note in your output when web research would have been valuable (e.g., "Web research recommended for CVE verification but not available").
85
+ - Rely more heavily on Context7 documentation MCP and codebase exploration.
86
+ - Flag security-sensitive decisions that would benefit from current advisory data.
87
+ - Do NOT silently skip web research — surface the limitation so the user can decide whether to enable it.
88
+
62
89
  ## D. Browser Verification for UI Changes
63
90
 
64
91
  Use browser automation MCP tools to visually verify UI changes after automated tests pass.
@@ -4,15 +4,31 @@ alwaysApply: true
4
4
  ---
5
5
  # Tooling Hierarchy
6
6
 
7
- ## A. GitHub MCP-First (when available)
7
+ ## A. Platform MCP-First (when available)
8
8
 
9
- **Prefer GitHub MCP tools over `gh` CLI** when the MCP server provides typed tools with structured input/output. Use them as the primary interface for GitHub operations.
9
+ **Prefer platform MCP tools over the platform CLI** when the MCP server provides typed tools with structured input/output. Use them as the primary interface for issue tracker and repository operations.
10
10
 
11
- **Fallback to `gh` CLI only when:**
11
+ Read `platform` from `.agents/hatch.json` to determine which platform tools to use.
12
+
13
+ **Fallback to the platform CLI only when:**
12
14
  - The MCP tool catalog lacks the specific capability.
13
15
  - An MCP call fails repeatedly and the CLI provides a viable alternative.
14
16
 
15
- **Never** use `gh` CLI for operations that have a direct MCP equivalent (issue CRUD, PR CRUD, search, labels).
17
+ **Never** use the platform CLI for operations that have a direct MCP equivalent (issue CRUD, PR/MR CRUD, search, labels).
18
+
19
+ ### Platform CLI Fallback Reference
20
+
21
+ | Action | GitHub | Azure DevOps | GitLab |
22
+ |--------|--------|--------------|--------|
23
+ | Create issue | `gh issue create` | `az boards work-item create` | `glab issue create` |
24
+ | View issue | `gh issue view` | `az boards work-item show --id N` | `glab issue view` |
25
+ | List issues | `gh issue list` | `az boards work-item list` | `glab issue list` |
26
+ | Create PR/MR | `gh pr create` | `az repos pr create` | `glab mr create` |
27
+ | View PR/MR | `gh pr view` | `az repos pr show` | `glab mr view` |
28
+ | List PRs/MRs | `gh pr list` | `az repos pr list` | `glab mr list` |
29
+ | Search code | `gh search code` | `az repos show` | `glab search` |
30
+ | CI runs | `gh run list/view` | `az pipelines run list/show` | `glab ci list/view` |
31
+ | Releases | `gh release create` | `az repos release` | `glab release create` |
16
32
 
17
33
  ## B. Documentation MCP for Library Documentation
18
34
 
@@ -46,6 +62,13 @@ Use web search to retrieve current, real-world information not available in proj
46
62
  - Standard library API questions (use documentation MCP instead).
47
63
  - Internal project decisions (use project ADRs).
48
64
 
65
+ **Fallback when web search is unavailable:**
66
+ If no web search MCP server is configured (e.g., `brave-search` is not in `mcp.servers` in `.agents/hatch.json`), web research cannot be performed. In this case:
67
+ - Note in your output when web research would have been valuable (e.g., "Web research recommended for CVE verification but not available").
68
+ - Rely more heavily on Context7 documentation MCP and codebase exploration.
69
+ - Flag security-sensitive decisions that would benefit from current advisory data.
70
+ - Do NOT silently skip web research — surface the limitation so the user can decide whether to enable it.
71
+
49
72
  ## D. Browser Verification for UI Changes
50
73
 
51
74
  Use browser automation MCP tools to visually verify UI changes after automated tests pass.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-a11y-audit
3
3
  description: Comprehensive WCAG AA accessibility audit with findings and fixes. Use when auditing accessibility, verifying WCAG compliance, or improving a11y across the application.
4
+ tags: [review, a11y]
4
5
  ---
5
6
  # Accessibility Audit Workflow
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-agent-customize
3
3
  description: Create and manage per-agent customization files for model overrides, description changes, and project-specific markdown instructions. Use when tailoring agent behavior to project-specific needs.
4
+ tags: [customize]
4
5
  ---
5
6
  # Agent Customization Management
6
7
 
@@ -31,6 +32,8 @@ Decide which customization approach to use:
31
32
  - **Description**: Change how the agent is described in adapter frontmatter
32
33
  - **Enabled**: Set to `false` to disable the agent entirely
33
34
 
35
+ **Protected agents:** Some agents have `protected: true` in their canonical frontmatter. For these security-critical agents (e.g., reviewer, security-auditor, test-writer), customization cannot override `scope`, `description`, or `enabled` — only `model` and markdown instructions can be customized. See the `hatch3r-agent-customize` command for full details.
36
+
34
37
  **Markdown (`.customize.md`)** — for free-form instructions:
35
38
  - Domain-specific review checklists
36
39
  - Architecture context and constraints
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-api-spec
3
3
  type: skill
4
4
  description: Generate and validate OpenAPI specifications from codebase. Covers endpoint design, schema validation, and documentation generation.
5
+ tags: [planning]
5
6
  ---
6
7
 
7
8
  # API Specification Workflow
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-architecture-review
3
3
  description: Evaluate architectural decisions and produce ADRs following the project template. Use when making architectural decisions, evaluating trade-offs, or creating ADRs.
4
+ tags: [review]
4
5
  ---
5
6
  # Architecture Review Workflow
6
7
 
@@ -54,7 +55,10 @@ Reference:
54
55
  ## Step 4: External Research
55
56
 
56
57
  - For external library docs and current best practices, follow the project's tooling hierarchy.
57
- - **GitHub MCP:** Search for related issues, prior discussions, or similar decisions in the repo.
58
+ - **Issue/PR search** (check `platform` in `.agents/hatch.json`): Search for related issues, prior discussions, or similar decisions in the repo:
59
+ - **GitHub:** Use **GitHub MCP** or `gh issue list --search "..."` / `gh pr list --search "..."`
60
+ - **Azure DevOps:** `az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.Title] CONTAINS '...'"` or `az repos pr list`
61
+ - **GitLab:** `glab issue list --search "..."` / `glab mr list --search "..."`
58
62
  - **Context7 MCP:** Look up current API patterns for relevant libraries.
59
63
  - **Web search:** For novel problems, security advisories, or best practices.
60
64
 
@@ -82,7 +86,7 @@ Save as `docs/adr/XXXX_short-title.md` (or project convention). Use next availab
82
86
 
83
87
  - Add references to the new ADR in relevant specs (e.g., data model, event model, quality engineering).
84
88
  - Update ADR index if the project maintains one.
85
- - Link from related GitHub issues or PRs.
89
+ - Link from related issues/work items or PRs/MRs on the platform.
86
90
  - If superseding an ADR, update the old ADR's Status to `SUPERSEDED by ADR-XXXX`.
87
91
 
88
92
  ## Definition of Done
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-bug-fix
3
3
  description: Step-by-step bug fix workflow. Diagnose root cause, implement minimal fix, write regression test. Use when fixing bugs, working on bug report issues, or when the user mentions a bug.
4
+ tags: [core, implementation]
4
5
  ---
5
6
  > **Note:** Commands below use `npm` as an example. Substitute with your project's package manager (`yarn`, `pnpm`, `bun`) or build tool as appropriate.
6
7
 
@@ -106,9 +107,11 @@ Use the project's PR template. Include:
106
107
 
107
108
  ## Required Agent Delegation
108
109
 
110
+ > **Note:** When this skill is invoked via the orchestration pipeline (board-pickup or workflow commands), skip this section — the orchestrator handles agent delegation in Phases 3 and 4.
111
+
109
112
  You MUST spawn these agents via the Task tool (`subagent_type: "generalPurpose"`) at the appropriate points:
110
113
 
111
- - **`hatch3r-researcher`** — MUST spawn before implementation with modes `symptom-trace`, `root-cause`, `codebase-impact`. Skip only for trivially simple bugs (`risk:low` AND `priority:p3`).
114
+ - **`hatch3r-researcher`** — MUST spawn before implementation with modes `symptom-trace`, `root-cause`, `codebase-impact`. For Tier 2+ tasks (per `hatch3r-deep-context`), also include `requirements-elicitation` (bugs often have underspecified reproduction steps and ambiguous expected behavior). Skip only for trivially simple bugs (`risk:low` AND `priority:p3`).
112
115
  - **`hatch3r-test-writer`** — MUST spawn after fix implementation to write regression tests covering the fixed behavior and related edge cases.
113
116
  - **`hatch3r-reviewer`** — MUST spawn after implementation for code review before PR creation.
114
117
 
@@ -2,6 +2,7 @@
2
2
  id: hatch3r-ci-pipeline
3
3
  type: skill
4
4
  description: Design and optimize CI/CD pipelines. Covers stage design, test parallelization, artifact management, and pipeline performance.
5
+ tags: [devops]
5
6
  ---
6
7
 
7
8
  # CI Pipeline Workflow
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-command-customize
3
3
  description: Create and manage per-command customization files for description overrides, enable/disable control, and project-specific markdown instructions. Use when tailoring command behavior to project-specific needs.
4
+ tags: [customize]
4
5
  ---
5
6
  # Command Customization Management
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-context-health
3
3
  description: Monitor and maintain conversation context health during long sessions. Use when context may be degrading, after many turns, or when experiencing repeated errors.
4
+ tags: [maintenance]
4
5
  ---
5
6
  # Context Health Monitoring
6
7
 
@@ -53,7 +54,7 @@ Run through the self-assessment checklist:
53
54
  ### If 5 checks degraded (Red): Checkpoint and Stop
54
55
  1. Save all progress (files changed, tests written)
55
56
  2. Document remaining work and blockers
56
- 3. Post progress on the GitHub issue
57
+ 3. Post progress on the issue/work item (GitHub Issue, ADO Work Item, or GitLab Issue — check `platform` in `.agents/hatch.json`)
57
58
  4. Recommend fresh conversation
58
59
 
59
60
  ## Step 4: Verify Improvement
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-cost-tracking
3
3
  description: Track token usage and estimate costs for agent sessions. Use when monitoring spend, approaching budget limits, or generating cost reports.
4
+ tags: [maintenance]
4
5
  ---
5
6
  # Cost Tracking Workflow
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-dep-audit
3
3
  description: Audit and update npm dependencies for security, freshness, and bundle impact. Use when auditing dependencies, responding to CVEs, or upgrading packages.
4
+ tags: [maintenance, security]
4
5
  ---
5
6
  > **Note:** Commands below use `npm` as an example. Substitute with your project's package manager (`yarn`, `pnpm`, `bun`) or build tool as appropriate.
6
7
 
@@ -30,7 +31,10 @@ Task Progress:
30
31
  For critical and high vulnerabilities:
31
32
 
32
33
  - Use **web search** to look up each CVE: exploitability, affected versions, fix version, workarounds.
33
- - Check npm advisories and GitHub security advisories for official guidance.
34
+ - Check npm advisories and platform-specific security tools for official guidance (check `platform` in `.agents/hatch.json`):
35
+ - **GitHub:** GitHub Security Advisories (`gh api /repos/{owner}/{repo}/security-advisories`)
36
+ - **Azure DevOps:** Azure Artifacts security scanning and Azure Boards advisory tracking
37
+ - **GitLab:** GitLab Dependency Scanning (Security & Compliance → Vulnerability Report)
34
38
  - Prioritize: critical first, then high. Moderate/low can be batched.
35
39
  - Note any packages with no fix available — document mitigation or deferral rationale.
36
40
 
@@ -38,7 +42,7 @@ For critical and high vulnerabilities:
38
42
 
39
43
  Before changing anything:
40
44
 
41
- - **Breaking vs non-breaking:** Check each package's changelog (npm, GitHub releases). For external library docs and current best practices, follow the project's tooling hierarchy.
45
+ - **Breaking vs non-breaking:** Check each package's changelog (npm, release notes on the package's repository). For external library docs and current best practices, follow the project's tooling hierarchy.
42
46
  - **Bundle impact:** Check bundle size budget from project rules. Run `npm run build` and measure before/after for each upgrade.
43
47
  - **Upgrade order:** Security fixes first, then non-breaking minor/patch, then breaking changes (one at a time).
44
48
  - **Risks:** List packages that may require code changes (e.g., major version bumps).
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-feature
3
3
  description: End-to-end feature implementation workflow. Covers data model, domain logic, API, and UI as a vertical slice. Use when implementing new features or working on feature request issues.
4
+ tags: [core, implementation]
4
5
  ---
5
6
  > **Note:** Commands below use `npm` as an example. Substitute with your project's package manager (`yarn`, `pnpm`, `bun`) or build tool as appropriate.
6
7
 
@@ -25,6 +26,8 @@ Task Progress:
25
26
  - Parse the issue body: problem/goal, proposed solution, acceptance criteria, scope (in/out), UX notes, edge cases, security considerations, rollout plan.
26
27
  - Read relevant project documentation (glossary, user flows, behavior, event model, data model, privacy, monetization, as applicable).
27
28
  - Review existing code patterns in the affected area.
29
+ - **Review reference implementations**: If the orchestrator provided `similar-implementation` researcher output, read the reference implementations and their extracted conventions. These define the patterns this feature should follow (file structure, state management, error handling, data fetching, test structure, component composition).
30
+ - **Review resolved requirements**: If the orchestrator provided `requirements-elicitation` answers, read them to understand explicit user decisions on ambiguities (data shape, error behavior, UI states, security model, etc.). Do not guess when explicit answers are available.
28
31
  - For external library docs and current best practices, follow the project's tooling hierarchy.
29
32
 
30
33
  ## Step 2: Implementation Plan
@@ -32,6 +35,7 @@ Task Progress:
32
35
  Before coding, output:
33
36
 
34
37
  - **Approach:** high-level strategy
38
+ - **Convention alignment:** which reference implementation's patterns this follows (from `similar-implementation` output), with divergences noted and justified. If no reference was provided, note "no reference — using best judgment from codebase conventions."
35
39
  - **Files to create/modify:** list with what changes
36
40
  - **Data model changes:** new collections/fields, if any
37
41
  - **Event changes:** new event types, if any
@@ -62,6 +66,7 @@ Use standard flow (implement → test) when:
62
66
  ## Step 3: Implement
63
67
 
64
68
  - Deliver a complete vertical slice (data -> logic -> UI).
69
+ - Follow the convention lock from Step 1 / the implementer's Step 1b — match the reference implementation's patterns for file structure, state management, error handling, data fetching, and testing. Do not invent new patterns when established ones exist in the codebase.
65
70
  - Use stable IDs from the project glossary.
66
71
  - If database/backend data is needed, include security rules updates.
67
72
  - If feature is gated, enforce entitlements client-side AND server-side.
@@ -105,10 +110,12 @@ Use the project's PR template. Include:
105
110
 
106
111
  ## Required Agent Delegation
107
112
 
113
+ > **Note:** When this skill is invoked via the orchestration pipeline (board-pickup or workflow commands), skip this section — the orchestrator handles agent delegation in Phases 3 and 4.
114
+
108
115
  You MUST spawn these agents via the Task tool (`subagent_type: "generalPurpose"`) at the appropriate points:
109
116
 
110
- - **`hatch3r-researcher`** — MUST spawn before implementation with modes `codebase-impact`, `feature-design`, `architecture`. Skip only for trivially simple features (`risk:low` AND `priority:p3`).
111
- - **`hatch3r-implementer`** — MUST spawn one per sub-issue when the feature is decomposed into multiple tasks. Each implementer receives its own sub-issue context.
117
+ - **`hatch3r-researcher`** — MUST spawn before implementation with modes `codebase-impact`, `feature-design`, `architecture`. For Tier 2+ tasks (per `hatch3r-deep-context`), also include `similar-implementation` and `requirements-elicitation`. Skip only for trivially simple features (`risk:low` AND `priority:p3`).
118
+ - **`hatch3r-implementer`** — MUST spawn one per sub-issue when the feature is decomposed into multiple tasks. Each implementer receives its own sub-issue context, plus reference conventions and resolved requirements from the researcher output.
112
119
  - **`hatch3r-reviewer`** — MUST spawn after implementation for code review before PR creation.
113
120
 
114
121
  ## Related Skills
@@ -1,21 +1,36 @@
1
1
  ---
2
2
  id: hatch3r-gh-agentic-workflows
3
- description: Set up GitHub Agentic Workflows for continuous AI-powered repository automation
3
+ description: Set up CI/CD agentic workflows for continuous AI-powered repository automation (GitHub Actions, Azure Pipelines, GitLab CI)
4
+ tags: [devops, team]
4
5
  ---
5
- # GitHub Agentic Workflows Integration
6
+ # CI/CD Agentic Workflows Integration
6
7
 
7
- GitHub Agentic Workflows (technical preview, Feb 2026) bring AI agent orchestration into
8
- GitHub Actions. This skill guides setup for hatch3r-managed projects.
8
+ > **Platform detection:** Check `platform` in `.agents/hatch.json` to determine which CI/CD system to use. Defaults to `"github"`.
9
+
10
+ This skill guides setup for AI-powered CI/CD automation in hatch3r-managed projects across all supported platforms.
9
11
 
10
12
  ## Overview
11
13
 
12
- Agentic Workflows are markdown files in `.github/workflows/` with YAML frontmatter that
14
+ ### GitHub Actions (Agentic Workflows)
15
+
16
+ GitHub Agentic Workflows (technical preview, Feb 2026) bring AI agent orchestration into
17
+ GitHub Actions. Agentic Workflows are markdown files in `.github/workflows/` with YAML frontmatter that
13
18
  compile to GitHub Actions jobs. They support multiple AI engines (GitHub Copilot, Claude,
14
19
  OpenAI Codex) and use MCP for tool access.
15
20
 
21
+ ### Azure DevOps Pipelines
22
+
23
+ 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.
24
+
25
+ ### GitLab CI/CD
26
+
27
+ GitLab CI uses `.gitlab-ci.yml` at the repo root to define pipelines. Use the `glab ci` CLI for management and monitoring.
28
+
16
29
  ## Available Workflow Templates
17
30
 
18
- hatch3r recommends these agentic workflow patterns for projects:
31
+ ### Platform: GitHub Actions
32
+
33
+ hatch3r recommends these agentic workflow patterns for GitHub-hosted projects:
19
34
 
20
35
  ### 1. Continuous Test Improvement
21
36
 
@@ -69,7 +84,7 @@ name: Continuous Documentation
69
84
  on:
70
85
  pull_request:
71
86
  types: [closed]
72
- branches: [main]
87
+ branches: [{defaultBranch}]
73
88
  engine: copilot
74
89
  permissions:
75
90
  contents: write
@@ -77,8 +92,69 @@ permissions:
77
92
  ---
78
93
  ```
79
94
 
95
+ Replace `{defaultBranch}` with `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
96
+
80
97
  After a PR is merged, check if documentation needs updating and open a follow-up PR.
81
98
 
99
+ ### Platform: Azure DevOps Pipelines
100
+
101
+ Equivalent pipeline patterns for Azure DevOps:
102
+
103
+ #### 1. Continuous Test Improvement (ADO)
104
+
105
+ ```yaml
106
+ # azure-pipelines/hatch3r-continuous-testing.yml
107
+ trigger: none
108
+ schedules:
109
+ - cron: '0 6 * * 1'
110
+ displayName: Weekly test improvement
111
+ branches:
112
+ include: [{defaultBranch}]
113
+ always: true
114
+
115
+ pool:
116
+ vmImage: 'ubuntu-latest'
117
+
118
+ steps:
119
+ - script: echo "Analyze test coverage gaps and create PRs with new tests"
120
+ displayName: 'AI-assisted test improvement'
121
+ ```
122
+
123
+ Replace `{defaultBranch}` with `board.defaultBranch` from `.agents/hatch.json` (fallback: `"main"`).
124
+
125
+ #### 2. Continuous Triage (ADO)
126
+
127
+ 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.
128
+
129
+ #### 3. Continuous Documentation (ADO)
130
+
131
+ 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`.
132
+
133
+ ### Platform: GitLab CI/CD
134
+
135
+ Equivalent pipeline patterns for GitLab:
136
+
137
+ #### 1. Continuous Test Improvement (GitLab)
138
+
139
+ ```yaml
140
+ # .gitlab-ci.yml (or included file)
141
+ continuous-test-improvement:
142
+ rules:
143
+ - if: $CI_PIPELINE_SOURCE == "schedule"
144
+ script:
145
+ - echo "Analyze test coverage gaps and create MRs with new tests"
146
+ ```
147
+
148
+ Configure a pipeline schedule in GitLab (Settings → CI/CD → Schedules) for weekly runs.
149
+
150
+ #### 2. Continuous Triage (GitLab)
151
+
152
+ 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`.
153
+
154
+ #### 3. Continuous Documentation (GitLab)
155
+
156
+ Trigger on merge to the default branch. Check if documentation needs updating and open a follow-up MR via `glab mr create`.
157
+
82
158
  ## Security Considerations
83
159
 
84
160
  - Workflows run in sandboxed environments with minimal permissions
@@ -95,27 +171,54 @@ After a PR is merged, check if documentation needs updating and open a follow-up
95
171
 
96
172
  ## Setup
97
173
 
174
+ ### GitHub
98
175
  1. Enable GitHub Agentic Workflows in your repository settings
99
176
  2. Create workflow files in `.github/workflows/` using the templates above
100
177
  3. Configure the AI engine (copilot is default, claude and codex are alternatives)
101
178
  4. Set appropriate permissions for each workflow
102
179
  5. Monitor workflow runs in the Actions tab
103
180
 
181
+ ### Azure DevOps
182
+ 1. Create pipeline YAML files in the repo (e.g., `azure-pipelines/`)
183
+ 2. Register each pipeline in Azure DevOps (Pipelines → New Pipeline → Existing YAML)
184
+ 3. Configure service connections and variable groups for secrets
185
+ 4. Set appropriate pipeline permissions and approvals
186
+ 5. Monitor runs in Azure Pipelines
187
+
188
+ ### GitLab
189
+ 1. Define jobs in `.gitlab-ci.yml` (or use `include:` for modular files)
190
+ 2. Configure pipeline schedules for periodic jobs (Settings → CI/CD → Schedules)
191
+ 3. Set CI/CD variables for secrets (Settings → CI/CD → Variables)
192
+ 4. Configure protected branches and merge request approvals
193
+ 5. Monitor runs in CI/CD → Pipelines
194
+
104
195
  ## Verification Steps
105
196
 
106
- 1. **Syntax check**: Validate the workflow file with `gh workflow view {name}` or the GitHub Actions web UI.
107
- 2. **Dry run**: Trigger manually via `gh workflow run {name}` and monitor with `gh run watch`.
108
- 3. **Output review**: Check the AI-generated output (PR, comment, label) for quality and correctness.
197
+ 1. **Syntax check**: Validate the workflow/pipeline definition:
198
+ - **GitHub:** `gh workflow view {name}` or the Actions web UI
199
+ - **Azure DevOps:** `az pipelines show --name {name}` or the Pipelines web UI
200
+ - **GitLab:** CI Lint (CI/CD → Editor → Validate) or `glab ci lint`
201
+ 2. **Dry run**: Trigger manually and monitor:
202
+ - **GitHub:** `gh workflow run {name}` → `gh run watch`
203
+ - **Azure DevOps:** `az pipelines run --name {name}` → `az pipelines runs show --id {id}`
204
+ - **GitLab:** `glab ci run` → `glab ci view`
205
+ 3. **Output review**: Check the AI-generated output (PR/MR, comment, label) for quality and correctness.
109
206
  4. **Permission audit**: Verify the workflow cannot access resources beyond its declared permissions.
110
207
  5. **Idempotency**: Run the workflow twice on the same input — it should not create duplicate artifacts.
111
208
  6. **Error handling**: Trigger with invalid/edge-case input — workflow should fail gracefully with clear error.
112
209
 
113
210
  ## Monitoring
114
211
 
115
- - **Execution tracking**: Use `gh run list --workflow={name}` to monitor recent runs.
116
- - **Failure alerts**: Configure GitHub Actions notifications (Settings → Notifications → Actions).
212
+ - **Execution tracking**:
213
+ - **GitHub:** `gh run list --workflow={name}`
214
+ - **Azure DevOps:** `az pipelines runs list --pipeline-name {name}`
215
+ - **GitLab:** `glab ci list`
216
+ - **Failure alerts**:
217
+ - **GitHub:** Settings → Notifications → Actions
218
+ - **Azure DevOps:** Pipeline notifications (Project Settings → Notifications)
219
+ - **GitLab:** Pipeline email notifications (Settings → Integrations)
117
220
  - **Cost awareness**: Monitor AI token usage per workflow run. Set spending limits in org settings.
118
- - **Quality metrics**: Track: success rate, output acceptance rate (merged PRs / total PRs), mean time per run.
221
+ - **Quality metrics**: Track: success rate, output acceptance rate (merged PRs/MRs / total), mean time per run.
119
222
 
120
223
  ## Troubleshooting
121
224
 
@@ -132,19 +235,25 @@ After a PR is merged, check if documentation needs updating and open a follow-up
132
235
 
133
236
  If a workflow produces undesirable results:
134
237
 
135
- 1. **Disable immediately**: `gh workflow disable {name}` or toggle in repo Settings → Actions.
136
- 2. **Revert outputs**: Close AI-generated PRs, remove applied labels, revert merged changes if needed.
137
- 3. **Diagnose**: Review recent run logs with `gh run view {run-id} --log`.
138
- 4. **Fix and re-enable**: Update the workflow file, test via manual dispatch, then re-enable.
238
+ 1. **Disable immediately**:
239
+ - **GitHub:** `gh workflow disable {name}` or toggle in repo Settings Actions
240
+ - **Azure DevOps:** `az pipelines update --name {name} --enabled false` or toggle in Pipelines UI
241
+ - **GitLab:** Pause pipeline schedules in Settings → CI/CD → Schedules, or use the GitLab API
242
+ 2. **Revert outputs**: Close AI-generated PRs/MRs, remove applied labels, revert merged changes if needed.
243
+ 3. **Diagnose**: Review recent run logs:
244
+ - **GitHub:** `gh run view {run-id} --log`
245
+ - **Azure DevOps:** `az pipelines runs show --id {run-id}` and download logs from the Pipelines UI
246
+ - **GitLab:** `glab ci view {pipeline-id}` or check CI/CD → Pipelines in the web UI
247
+ 4. **Fix and re-enable**: Update the workflow/pipeline file, test via manual dispatch, then re-enable.
139
248
 
140
249
  ## Definition of Done
141
250
 
142
- - [ ] Workflow file created in `.github/workflows/` with correct YAML frontmatter
143
- - [ ] Engine configured (copilot/claude/codex) with appropriate model selection
251
+ - [ ] Workflow/pipeline file created in the platform-appropriate location (`.github/workflows/`, `azure-pipelines/`, `.gitlab-ci.yml`)
252
+ - [ ] Engine/runner configured with appropriate model or agent selection
144
253
  - [ ] Permissions scoped to minimum required (read-only defaults, write only where needed)
145
254
  - [ ] MCP tool access configured if needed (with allowlisting)
146
255
  - [ ] Trigger events appropriate for the workflow's purpose
147
- - [ ] Manual `workflow_dispatch` trigger included for testing
256
+ - [ ] Manual trigger included for testing (`workflow_dispatch` / manual pipeline run / manual pipeline trigger)
148
257
  - [ ] Workflow tested via manual dispatch with expected outcomes verified
149
- - [ ] Monitoring configured (GitHub Actions notifications or Slack integration)
258
+ - [ ] Monitoring configured (platform notifications or Slack integration)
150
259
  - [ ] Documentation updated (README or CONTRIBUTING) to describe the new workflow
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: hatch3r-incident-response
3
3
  description: Handle production incidents with structured triage, mitigation, and post-mortem. Use when responding to production issues, outages, or security incidents.
4
+ tags: [devops]
4
5
  ---
5
6
  # Incident Response Workflow
6
7
 
@@ -25,7 +26,10 @@ Task Progress:
25
26
  | P2 | Partial degradation, limited impact | Single flow broken, slow performance |
26
27
  | P3 | Minor issue, workaround available | Cosmetic bug, edge case |
27
28
 
28
- - Use **GitHub MCP** (`issue_read`, `search_issues`) to check for related issues or prior incidents.
29
+ - Check for related issues or prior incidents using the platform tools (check `platform` in `.agents/hatch.json`):
30
+ - **GitHub:** Use **GitHub MCP** (`issue_read`, `search_issues`) or `gh issue list --search "..."`
31
+ - **Azure DevOps:** `az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.Title] CONTAINS '...'"` or `az boards work-item show --id N`
32
+ - **GitLab:** `glab issue list --search "..."` or `glab issue view N`
29
33
  - For external library docs and current best practices, follow the project's tooling hierarchy.
30
34
 
31
35
  ## Step 2: Triage
@@ -61,15 +65,17 @@ Write a structured post-mortem document:
61
65
  - **Action items:** Permanent fixes, preventive measures, process improvements.
62
66
  - **Lessons learned:** What we'll do differently.
63
67
 
64
- Store in project incident docs or as a GitHub issue/wiki page. Follow project conventions.
68
+ Store in project incident docs or as an issue/wiki page on the platform. Follow project conventions.
65
69
 
66
70
  ## Step 6: Follow-Up Issues
67
71
 
68
- - Create GitHub issues for each action item from the post-mortem.
72
+ - Create follow-up issues/work items for each action item from the post-mortem (check `platform` in `.agents/hatch.json`):
73
+ - **GitHub:** `gh issue create --title "..." --body "..." --label "incident-follow-up"` (or use **GitHub MCP** `issue_create`)
74
+ - **Azure DevOps:** `az boards work-item create --type "Bug" --title "..." --description "..." --fields "System.Tags=incident-follow-up"`
75
+ - **GitLab:** `glab issue create --title "..." --description "..." --label "incident-follow-up"`
69
76
  - Label appropriately (e.g., `incident-follow-up`, `P0`, `P1`).
70
- - Link issues to the post-mortem and to each other.
77
+ - Link issues/work items to the post-mortem and to each other.
71
78
  - Assign owners and due dates for critical fixes.
72
- - Use **GitHub MCP** (`issue_create` or equivalent) to create issues.
73
79
 
74
80
  ## Definition of Done
75
81