hatch3r 1.6.0 → 1.7.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 (170) hide show
  1. package/README.md +5 -5
  2. package/agents/hatch3r-a11y-auditor.md +5 -0
  3. package/agents/hatch3r-architect.md +5 -0
  4. package/agents/hatch3r-ci-watcher.md +5 -0
  5. package/agents/hatch3r-context-rules.md +5 -0
  6. package/agents/hatch3r-creator.md +304 -0
  7. package/agents/hatch3r-dependency-auditor.md +5 -0
  8. package/agents/hatch3r-devops.md +5 -0
  9. package/agents/hatch3r-docs-writer.md +5 -0
  10. package/agents/hatch3r-fixer.md +5 -0
  11. package/agents/hatch3r-implementer.md +5 -0
  12. package/agents/hatch3r-learnings-loader.md +5 -0
  13. package/agents/hatch3r-lint-fixer.md +5 -0
  14. package/agents/hatch3r-perf-profiler.md +5 -0
  15. package/agents/hatch3r-researcher.md +5 -0
  16. package/agents/hatch3r-reviewer.md +5 -0
  17. package/agents/hatch3r-security-auditor.md +5 -0
  18. package/agents/hatch3r-test-writer.md +5 -0
  19. package/agents/modes/architecture.md +3 -0
  20. package/agents/modes/boundary-analysis.md +3 -0
  21. package/agents/modes/codebase-impact.md +3 -0
  22. package/agents/modes/complexity-risk.md +3 -0
  23. package/agents/modes/coverage-analysis.md +3 -0
  24. package/agents/modes/current-state.md +3 -0
  25. package/agents/modes/feature-design.md +3 -0
  26. package/agents/modes/impact-analysis.md +3 -0
  27. package/agents/modes/library-docs.md +3 -0
  28. package/agents/modes/migration-path.md +3 -0
  29. package/agents/modes/prior-art.md +3 -0
  30. package/agents/modes/refactoring-strategy.md +3 -0
  31. package/agents/modes/regression.md +3 -0
  32. package/agents/modes/requirements-elicitation.md +3 -0
  33. package/agents/modes/risk-assessment.md +3 -0
  34. package/agents/modes/risk-prioritization.md +3 -0
  35. package/agents/modes/root-cause.md +3 -0
  36. package/agents/modes/similar-implementation.md +3 -0
  37. package/agents/modes/symptom-trace.md +3 -0
  38. package/agents/modes/test-pattern.md +3 -0
  39. package/agents/shared/efficiency-patterns.md +71 -0
  40. package/agents/shared/external-knowledge.md +2 -0
  41. package/agents/shared/injection-patterns.md +2 -0
  42. package/agents/shared/prompt-structure.md +2 -0
  43. package/agents/shared/quality-charter.md +10 -0
  44. package/agents/shared/user-content-templates.md +257 -0
  45. package/checks/accessibility.md +1 -0
  46. package/checks/code-quality.md +1 -0
  47. package/checks/performance.md +1 -0
  48. package/checks/security.md +1 -0
  49. package/checks/testing.md +1 -0
  50. package/commands/board/pickup-azure-devops.md +1 -0
  51. package/commands/board/pickup-delegation-multi.md +1 -0
  52. package/commands/board/pickup-delegation.md +1 -0
  53. package/commands/board/pickup-github.md +1 -0
  54. package/commands/board/pickup-gitlab.md +1 -0
  55. package/commands/board/pickup-modes.md +1 -0
  56. package/commands/board/pickup-post-impl.md +1 -0
  57. package/commands/board/shared-azure-devops.md +1 -0
  58. package/commands/board/shared-board-overview.md +1 -0
  59. package/commands/board/shared-github.md +1 -0
  60. package/commands/board/shared-gitlab.md +1 -0
  61. package/commands/hatch3r-agent-customize.md +9 -2
  62. package/commands/hatch3r-api-spec.md +16 -0
  63. package/commands/hatch3r-benchmark.md +16 -0
  64. package/commands/hatch3r-board-fill.md +16 -0
  65. package/commands/hatch3r-board-groom.md +3 -0
  66. package/commands/hatch3r-board-init.md +3 -0
  67. package/commands/hatch3r-board-pickup.md +16 -0
  68. package/commands/hatch3r-board-refresh.md +3 -0
  69. package/commands/hatch3r-board-shared.md +3 -0
  70. package/commands/hatch3r-bug-plan.md +16 -0
  71. package/commands/hatch3r-codebase-map.md +16 -0
  72. package/commands/hatch3r-command-customize.md +3 -0
  73. package/commands/hatch3r-context-health.md +3 -0
  74. package/commands/hatch3r-cost-tracking.md +3 -0
  75. package/commands/hatch3r-create.md +197 -0
  76. package/commands/hatch3r-debug.md +16 -0
  77. package/commands/hatch3r-dep-audit.md +3 -0
  78. package/commands/hatch3r-feature-plan.md +16 -0
  79. package/commands/hatch3r-healthcheck.md +3 -0
  80. package/commands/hatch3r-hooks.md +3 -0
  81. package/commands/hatch3r-learn.md +3 -0
  82. package/commands/hatch3r-migration-plan.md +16 -0
  83. package/commands/hatch3r-onboard.md +16 -0
  84. package/commands/hatch3r-project-spec.md +16 -0
  85. package/commands/hatch3r-quick-change.md +17 -1
  86. package/commands/hatch3r-recipe.md +3 -0
  87. package/commands/hatch3r-refactor-plan.md +16 -0
  88. package/commands/hatch3r-release.md +3 -0
  89. package/commands/hatch3r-revision.md +16 -0
  90. package/commands/hatch3r-roadmap.md +16 -0
  91. package/commands/hatch3r-rule-customize.md +3 -0
  92. package/commands/hatch3r-security-audit.md +3 -0
  93. package/commands/hatch3r-skill-customize.md +3 -0
  94. package/commands/hatch3r-test-plan.md +16 -0
  95. package/commands/hatch3r-workflow.md +17 -1
  96. package/commands/revision/revision-board-integration.md +1 -0
  97. package/commands/revision/revision-delegation.md +1 -0
  98. package/commands/revision/revision-modes.md +1 -0
  99. package/commands/revision/revision-quality.md +1 -0
  100. package/dist/cli/index.js +2448 -932
  101. package/dist/cli/index.js.map +1 -1
  102. package/github-agents/hatch3r-docs-agent.md +3 -0
  103. package/github-agents/hatch3r-lint-agent.md +3 -0
  104. package/github-agents/hatch3r-security-agent.md +3 -0
  105. package/github-agents/hatch3r-test-agent.md +3 -0
  106. package/hooks/hatch3r-ci-failure.md +1 -0
  107. package/hooks/hatch3r-file-save.md +1 -0
  108. package/hooks/hatch3r-post-merge.md +1 -0
  109. package/hooks/hatch3r-pre-commit.md +1 -0
  110. package/hooks/hatch3r-pre-push.md +1 -0
  111. package/hooks/hatch3r-session-start.md +1 -0
  112. package/package.json +10 -1
  113. package/prompts/hatch3r-bug-triage.md +2 -0
  114. package/prompts/hatch3r-code-review.md +2 -0
  115. package/prompts/hatch3r-pr-description.md +2 -0
  116. package/rules/hatch3r-accessibility-standards.md +1 -0
  117. package/rules/hatch3r-agent-orchestration-detail.md +1 -0
  118. package/rules/hatch3r-agent-orchestration.md +1 -0
  119. package/rules/hatch3r-api-design.md +1 -0
  120. package/rules/hatch3r-browser-verification.md +1 -0
  121. package/rules/hatch3r-ci-cd.md +1 -0
  122. package/rules/hatch3r-code-standards.md +1 -0
  123. package/rules/hatch3r-component-conventions.md +1 -0
  124. package/rules/hatch3r-data-classification.md +1 -0
  125. package/rules/hatch3r-deep-context.md +1 -0
  126. package/rules/hatch3r-dependency-management.md +1 -0
  127. package/rules/hatch3r-feature-flags.md +1 -0
  128. package/rules/hatch3r-git-conventions.md +1 -0
  129. package/rules/hatch3r-i18n.md +1 -0
  130. package/rules/hatch3r-iteration-summary.md +86 -0
  131. package/rules/hatch3r-iteration-summary.mdc +81 -0
  132. package/rules/hatch3r-learning-consult.md +1 -0
  133. package/rules/hatch3r-migrations.md +1 -0
  134. package/rules/hatch3r-observability-logging.md +1 -0
  135. package/rules/hatch3r-observability-metrics.md +1 -0
  136. package/rules/hatch3r-observability-tracing-detail.md +1 -0
  137. package/rules/hatch3r-observability-tracing.md +1 -0
  138. package/rules/hatch3r-observability.md +1 -0
  139. package/rules/hatch3r-performance-budgets.md +1 -0
  140. package/rules/hatch3r-secrets-management.md +1 -0
  141. package/rules/hatch3r-security-patterns.md +1 -0
  142. package/rules/hatch3r-testing.md +1 -0
  143. package/rules/hatch3r-theming.md +1 -0
  144. package/rules/hatch3r-tooling-hierarchy.md +1 -0
  145. package/skills/hatch3r-a11y-audit/SKILL.md +2 -0
  146. package/skills/hatch3r-agent-customize/SKILL.md +2 -0
  147. package/skills/hatch3r-api-spec/SKILL.md +2 -0
  148. package/skills/hatch3r-architecture-review/SKILL.md +2 -0
  149. package/skills/hatch3r-bug-fix/SKILL.md +2 -0
  150. package/skills/hatch3r-ci-pipeline/SKILL.md +2 -0
  151. package/skills/hatch3r-command-customize/SKILL.md +2 -0
  152. package/skills/hatch3r-context-health/SKILL.md +2 -0
  153. package/skills/hatch3r-cost-tracking/SKILL.md +2 -0
  154. package/skills/hatch3r-customize/SKILL.md +2 -0
  155. package/skills/hatch3r-dep-audit/SKILL.md +2 -0
  156. package/skills/hatch3r-feature/SKILL.md +2 -0
  157. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +2 -0
  158. package/skills/hatch3r-incident-response/SKILL.md +2 -0
  159. package/skills/hatch3r-issue-workflow/SKILL.md +2 -0
  160. package/skills/hatch3r-logical-refactor/SKILL.md +2 -0
  161. package/skills/hatch3r-migration/SKILL.md +2 -0
  162. package/skills/hatch3r-perf-audit/SKILL.md +2 -0
  163. package/skills/hatch3r-pr-creation/SKILL.md +2 -0
  164. package/skills/hatch3r-qa-validation/SKILL.md +2 -0
  165. package/skills/hatch3r-recipe/SKILL.md +2 -0
  166. package/skills/hatch3r-refactor/SKILL.md +2 -0
  167. package/skills/hatch3r-release/SKILL.md +2 -0
  168. package/skills/hatch3r-rule-customize/SKILL.md +2 -0
  169. package/skills/hatch3r-skill-customize/SKILL.md +2 -0
  170. package/skills/hatch3r-visual-refactor/SKILL.md +2 -0
@@ -4,6 +4,7 @@ type: command
4
4
  description: Post-implementation steps for board-pickup (Steps 7-10). Covers quality verification, commit/push, PR/MR creation, label transitions, board sync, dashboard refresh, reconciliation, and learnings capture.
5
5
  tags: [board, team]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Pickup — Post-Implementation Steps (7-10)
9
10
 
@@ -4,6 +4,7 @@ type: shared-context
4
4
  description: Azure DevOps-specific platform details for board shared context. Covers Work Items, Azure Boards, az CLI, and MCP tools.
5
5
  tags: [board, team, azure-devops]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Shared Reference — Azure DevOps Platform Details
9
10
 
@@ -4,6 +4,7 @@ type: shared-context
4
4
  description: Board overview dashboard template, model pool, model selection heuristic, and lane computation algorithm. Referenced from hatch3r-board-shared.
5
5
  tags: [board, team]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Overview Reference
9
10
 
@@ -4,6 +4,7 @@ type: shared-context
4
4
  description: GitHub-specific platform details for board shared context. Covers GitHub Issues, Projects V2, gh CLI, and MCP tools.
5
5
  tags: [board, team, github]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Shared Reference — GitHub Platform Details
9
10
 
@@ -4,6 +4,7 @@ type: shared-context
4
4
  description: GitLab-specific platform details for board shared context. Covers GitLab Issues, Issue Boards, glab CLI, and label-based sync.
5
5
  tags: [board, team, gitlab]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Shared Reference — GitLab Platform Details
9
10
 
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Override agent persona, model selection, preset enablement, and repo-file apply-scope via YAML plus markdown injection under .hatch3r/agents/
6
6
  tags: [customize]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -92,8 +95,10 @@ PostgreSQL for persistence, Redis for caching.
92
95
 
93
96
  ### Resulting Adapter Output
94
97
 
98
+ The adapter wraps the result in hatch3r-managed block comments (literal markers omitted here so this file itself stays valid):
99
+
95
100
  ```markdown
96
- <!-- HATCH3R:BEGIN -->
101
+ [managed-block-start]
97
102
  {canonical agent content}
98
103
 
99
104
  ---
@@ -101,9 +106,11 @@ PostgreSQL for persistence, Redis for caching.
101
106
  ## Project Customizations
102
107
 
103
108
  {content from .customize.md}
104
- <!-- HATCH3R:END -->
109
+ [managed-block-end]
105
110
  ```
106
111
 
112
+ Replace `[managed-block-start]` / `[managed-block-end]` with the actual `<!-- HATCH3R\:BEGIN -->` / `<!-- HATCH3R\:END -->` markers in real adapter output.
113
+
107
114
  Content placed **outside** the managed block markers by directly editing adapter output files is always preserved.
108
115
 
109
116
  ## Per-Agent Customization Examples
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer, hatch3r-reviewer]
6
6
  description: Generate or validate an OpenAPI specification from the codebase. Scans route definitions, extracts schemas, and produces a complete API spec.
7
7
  tags: [planning]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
 
11
15
  ## Agent Pipeline
@@ -42,6 +46,18 @@ Take a codebase with HTTP or RPC endpoints and produce a complete OpenAPI 3.1 sp
42
46
 
43
47
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
44
48
 
49
+ ## Step 0: Triage
50
+
51
+ Classify the request before delegating:
52
+
53
+ - **Tier 1 (trivial)**: single-endpoint documentation update or schema tweak; inline execution, no sub-agent fanout.
54
+ - **Tier 2 (standard)**: feature-scoped spec generation or validate mode for an existing API; standard pipeline including review loop.
55
+ - **Tier 3 (deep)**: full codebase scan, multi-framework detection, or breaking-change drift; full pipeline with research and confirm with the user before mutating files.
56
+
57
+ If Tier 1, complete inline and skip the parallel researcher fanout. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline with research and confirm scope with the user before writing the spec.
58
+
59
+ ---
60
+
45
61
  ### Step 1: Gather API Context
46
62
 
47
63
  1. **ASK:** "I'll generate or validate an OpenAPI specification from your codebase. I need:
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-perf-profiler, hatch3r-docs-writer]
6
6
  description: Run and analyze performance benchmarks. Compare results against baselines, identify regressions, and produce performance reports.
7
7
  tags: [review, performance]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
 
11
15
  ## Agent Pipeline
@@ -40,6 +44,18 @@ Run performance benchmarks against a target (file, function, endpoint, or full s
40
44
 
41
45
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
42
46
 
47
+ ## Step 0: Triage
48
+
49
+ Classify the benchmark request before delegating:
50
+
51
+ - **Tier 1 (trivial)**: single benchmark with `none` baseline or quick re-run of an existing suite; inline execution, no `hatch3r-perf-profiler` fanout.
52
+ - **Tier 2 (standard)**: standard suite with `previous-run` or git-ref baseline; standard pipeline including statistical analysis and reporting.
53
+ - **Tier 3 (deep)**: full-suite cross-environment benchmark with regression triage and root-cause tracing; full pipeline with research and confirm scope with the user before saving results.
54
+
55
+ If Tier 1, complete inline and skip the analysis fanout. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline with research and confirm scope with the user before saving results.
56
+
57
+ ---
58
+
43
59
  ### Step 1: Gather Benchmark Context
44
60
 
45
61
  1. **ASK:** "Tell me about the benchmarks you want to run. I need:
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-reviewer, hatch3r-fixer]
6
6
  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.
7
7
  tags: [board, team]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
 
11
15
  ## Agent Pipeline
@@ -53,6 +57,18 @@ Follow the **Token-Saving Directives** in `hatch3r-board-shared`.
53
57
 
54
58
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
55
59
 
60
+ ## Step 0: Triage
61
+
62
+ Classify the board-fill request before delegating:
63
+
64
+ - **Tier 1 (trivial)**: 1–3 todo items, all clear scope, no decomposition needed; inline issue creation with minimal triage questioning.
65
+ - **Tier 2 (standard)**: standard batch (4–15 items) with mixed clarity and grouping decisions; standard pipeline with item-level triage (Step 2.5) and full readiness assessment.
66
+ - **Tier 3 (deep)**: large board reorganization, vision-driven greenfield batching, or 15+ items with decomposition; full pipeline with deep triage and confirm scope with the user before any GitHub mutations.
67
+
68
+ If Tier 1, run only Steps 1–3, 5–6, and 7 (skip the heavy production-readiness review). If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including Steps 5.5, 5.6, and 7.9, and confirm batch composition with the user before executing.
69
+
70
+ ---
71
+
56
72
  ### Step 1: Read and Parse todo.md
57
73
 
58
74
  1. Read `todo.md` at the project root.
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  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.
6
6
  tags: [board, team]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  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.
6
6
  tags: [board, team]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-implementer, hatch3r-reviewer, hatch
6
6
  description: Pick up one or more epics/issues from the project board for development. Handles dependency-aware selection, collision detection, branching, parallel sub-agent delegation, and batch execution. Supports GitHub, Azure DevOps, and GitLab. Platform-specific details are in commands/board/pickup-{platform}.md.
7
7
  tags: [board, team]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
  # Board Pickup -- Develop Issues from the Project Board
11
15
 
@@ -71,6 +75,18 @@ Downstream propagation: every ASK checkpoint that reports verification quality,
71
75
 
72
76
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
73
77
 
78
+ ## Step 0: Triage
79
+
80
+ Classify the pickup request before delegating:
81
+
82
+ - **Tier 1 (trivial)**: single sub-issue, isolated change, clear acceptance criteria; standard pipeline but with `quick` researcher depth and no parallel batch.
83
+ - **Tier 2 (standard)**: single epic with sub-issues, or 2–3 independent issues in a batch; standard pipeline with researcher per issue and parallel implementer fanout.
84
+ - **Tier 3 (deep)**: cross-cutting epic, contract change, multi-module batch, or audit epic; full pipeline with deep research, confirm sub-issue selection with the user, and serialize work that touches overlapping files.
85
+
86
+ If Tier 1, run the standard delegation path (Step 6a) with reduced research depth. If Tier 2, run the standard pipeline below with parallel fanout where dependencies allow. If Tier 3, run the full pipeline with deep research and confirm batch composition with the user before branching.
87
+
88
+ ---
89
+
74
90
  ### Step 1: List Available Work (Dependency-Aware)
75
91
 
76
92
  #### 1a. Fetch and Parse Board State
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Regenerate the living board overview dashboard from current board state. Scans all open issues, computes health metrics, and updates the meta:board-overview issue.
6
6
  tags: [board, team]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Shared context and procedures for all board commands. Provides platform-agnostic board config, label taxonomy, branch conventions, sync enforcement, and tooling directives. Platform-specific details are in commands/board/shared-{platform}.md.
6
6
  tags: [board, team]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
  # Board Shared Reference
10
13
 
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
6
6
  description: Diagnose a complex incident -- reproduce the symptom, rank root-cause hypotheses, design the fix path, and emit regression coverage items as a board-ready investigation
7
7
  tags: [core, planning]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
 
11
15
  ## Agent Pipeline
@@ -43,6 +47,18 @@ Take a complex or ambiguous bug report and produce a structured investigation re
43
47
 
44
48
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
45
49
 
50
+ ## Step 0: Triage
51
+
52
+ Classify the bug investigation before delegating:
53
+
54
+ - **Tier 1 (trivial)**: clear root cause, single module, reproduction known; route to `hatch3r-bug-fix` skill instead of running this full investigation.
55
+ - **Tier 2 (standard)**: ambiguous symptoms across one subsystem with 2–3 plausible hypotheses; standard pipeline with the 5 parallel researcher modes.
56
+ - **Tier 3 (deep)**: multi-module, intermittent, lingering bug requiring ADRs and phased fixes; full pipeline with deep research and confirm scope with the user before generating fix items.
57
+
58
+ If Tier 1, recommend the `hatch3r-bug-fix` skill and exit. If Tier 2, run the standard parallel-researcher pipeline below. If Tier 3, run the full pipeline including ADR generation in Step 6 and confirm fix phases with the user before writing files.
59
+
60
+ ---
61
+
46
62
  ### Step 1: Gather Bug Report
47
63
 
48
64
  1. **ASK:** "Tell me about the bug you want to investigate. I need:
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
6
6
  description: Reverse-engineer a brownfield codebase into current-state module boundaries, integration-point inventory, tech-debt register, and dependency graph via static analysis
7
7
  tags: [planning, brownfield]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
  # Codebase Map — Brownfield Codebase Analysis & Spec Generation
11
15
 
@@ -38,6 +42,18 @@ Analyze an existing codebase to reverse-engineer project documentation across **
38
42
 
39
43
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK. When in doubt, **ASK** — it is better to ask one question too many than to make one wrong assumption. Discovery questions are never wasted.
40
44
 
45
+ ## Step 0: Triage
46
+
47
+ Classify the codebase analysis request before delegating:
48
+
49
+ - **Tier 1 (trivial)**: single-module spec or scoped reverse-engineering of one subsystem; reduced fanout (1–2 analyzers), no AGENTS.md regeneration unless requested.
50
+ - **Tier 2 (standard)**: standard scope (full repo, < 5K files) with both technical and business specs; standard pipeline with all 6 parallel analyzers and AGENTS.md generation.
51
+ - **Tier 3 (deep)**: monorepo, very large codebase (>10K files), or full production-readiness audit; full pipeline with all analyzers and confirm scope with the user before writing files.
52
+
53
+ If Tier 1, run the reduced analyzer set and skip Step 5 (ADRs) unless decisions are obvious. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including the production-readiness scorecard and confirm scope with the user before file writes.
54
+
55
+ ---
56
+
41
57
  ### Step 1: Initial Scan, Scope & Discovery
42
58
 
43
59
  Perform a lightweight scan of the project root to build a project fingerprint, then gather business context.
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Tune slash-command display text, orchestrator sub-agent dispatch pipeline, and invocation arguments via .hatch3r/commands/ YAML and markdown overrides
6
6
  tags: [customize]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Monitor conversation context health, detect degradation, and auto-suggest fresh context or sub-agent delegation
6
6
  tags: [maintenance]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
  ## Agent Pipeline
10
13
 
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Track and report token usage and estimated costs across agent workflows and board operations
6
6
  tags: [maintenance]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
  ## Agent Pipeline
10
13
 
@@ -0,0 +1,197 @@
1
+ ---
2
+ id: hatch3r-create
3
+ type: command
4
+ orchestrator: true
5
+ agentPipeline: [hatch3r-creator]
6
+ description: Author a custom user-tier artifact (agent, skill, rule, command, or hook) for this project. Generates frontmatter and body skeleton, applies strict + gentle quality gates, writes to .agents/user/{type}/, and offers to sync to all enabled adapters.
7
+ tags: [core, customize]
8
+ quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
13
+ ---
14
+
15
+ ## Agent Pipeline
16
+
17
+ This command runs as an orchestrator. After collecting inputs in Phase 1, it delegates artifact composition and the strict + gentle gate funnel to `hatch3r-creator` via the Task tool. Phase 3 runs `hatch3r validate` and surfaces results inline.
18
+
19
+ # `/hatch3r-create` — Author a User-Tier Artifact
20
+
21
+ Use this command when you need a project-specific agent, skill, rule, command, or hook that does not exist in the canonical hatch3r corpus. The command writes one new artifact under `.agents/user/{type}/` per invocation, runs the same frontmatter/security/structural gates the framework uses on canonical content (strict — block on failure), and runs style/lean checks as warnings (gentle — save proceeds, warnings reported).
22
+
23
+ The 5 supported types: **agent** (sub-agent invokable from orchestrators), **skill** (workflow recipe), **rule** (always or glob-scoped guidance), **command** (slash command, inline or orchestrator), **hook** (event-triggered agent invocation).
24
+
25
+ ---
26
+
27
+ ## Workflow
28
+
29
+ The command runs in three phases. Phase 1 collects every input upfront. Phase 2 delegates to `hatch3r-creator`. Phase 3 verifies and reports. No file is written until the user confirms the plan in Step 1.7.
30
+
31
+ ## Step 0: Triage
32
+
33
+ Classify the artifact-authoring request before delegating:
34
+
35
+ - **Tier 1 (trivial)**: small rule, snippet command, or single-event hook with clear scope; inline frontmatter assembly with minimal type-specific prompts.
36
+ - **Tier 2 (standard)**: standard agent, skill, or orchestrator command with frontmatter and body skeleton; standard pipeline with `hatch3r-creator` delegation and full strict-gate funnel.
37
+ - **Tier 3 (deep)**: artifact with cross-cutting tool allowlists, custom adapters, or pipeline integration; full pipeline with `hatch3r-creator` and confirm the plan with the user before writing.
38
+
39
+ If Tier 1, run Phase 1 with reduced prompts (skip optional dimensions). If Tier 2, run the standard pipeline below. If Tier 3, expand Phase 1 dimension probing and confirm the plan summary explicitly with the user before delegating.
40
+
41
+ **Parallel-dispatch directive:** When two or more steps below are independent (no shared files, no data dependency), issue all tool calls or sub-agent spawns in a single turn. Sequential dispatch of independent work is a finding under P7 (efficiency charter §P2).
42
+
43
+ ---
44
+
45
+ ### Phase 1 — Collect & Plan
46
+
47
+ #### 1.1: Choose Artifact Type
48
+
49
+ Present the 5 types with one-sentence descriptions and ask the user to select one.
50
+
51
+ ```
52
+ Which type of artifact?
53
+ 1) agent — A sub-agent invoked by orchestrators via the Task tool
54
+ 2) skill — A reusable workflow recipe followed by an agent
55
+ 3) rule — Coding/process guidance applied always or by glob match
56
+ 4) command — A slash-command entry point (inline or orchestrator)
57
+ 5) hook — An event-triggered agent invocation (pre-commit, file-save, etc.)
58
+ ```
59
+
60
+ **ASK:** "Select artifact type (1-5)."
61
+
62
+ Cache the selection as `type`.
63
+
64
+ #### 1.2: Choose Name
65
+
66
+ **ASK:** "Provide a kebab-case name for the artifact (lowercase, hyphens only, no spaces). Example: `pr-summarizer`."
67
+
68
+ Validate the name against the regex `^[a-z][a-z0-9-]*$`. Reject and re-ask if:
69
+
70
+ - The name fails the regex (uppercase, underscores, leading digit, etc.).
71
+ - The name starts with `hatch3r-` — this prefix is reserved for canonical framework content. Show: "Names starting with `hatch3r-` are reserved for canonical framework artifacts. Choose a different prefix or omit the prefix entirely. The framework will namespace the file path under `.agents/user/{type}/` automatically."
72
+
73
+ Cache the validated name as `name`.
74
+
75
+ #### 1.3: Description
76
+
77
+ **ASK:** "Provide a one-paragraph description (minimum 60 characters). This appears in the AI tool's artifact picker — make it specific enough that the right artifact is selected when the user asks."
78
+
79
+ Reject and re-ask if the description is shorter than 60 characters. Cache as `description`.
80
+
81
+ #### 1.4: Tags
82
+
83
+ Present the known tag set: `core, customization, planning, implementation, review, performance, a11y, security, board`.
84
+
85
+ **ASK:** "Select one or more tags (comma-separated). You may add custom project tags after the known set, e.g., `implementation, my-team`."
86
+
87
+ Cache as `tags` (array).
88
+
89
+ #### 1.5: Adapter Scope (Optional)
90
+
91
+ **ASK:** "Restrict this artifact to specific adapters? Press Enter to default to ALL enabled adapters (full parity), or list adapter names like `claude, cursor`."
92
+
93
+ Cache as `adapters` (array, or `null` for full parity).
94
+
95
+ #### 1.6: Type-Specific Prompts
96
+
97
+ Branch on the cached `type`:
98
+
99
+ - **agent:** Ask for `model` preference (default: `standard`; options: `fast | standard | reasoning`). Ask for an optional tool-allowlist hint (free-text). Cache as `model` and `toolHint`.
100
+ - **skill:** Confirm the subdirectory layout. Show: "Skill files are stored as `.agents/user/skills/{name}/SKILL.md` (a new directory will be created). Continue?" — ASK Y/n.
101
+ - **rule:** Ask for scope: `always` (loaded every session) or `conditional` (loaded by glob match). If `conditional`, ASK for a comma-separated glob list (e.g., `src/**/*.ts, src/**/*.tsx`). Then ASK for `precedence` (one of `critical | high | normal | low`, default `normal`). Cache as `ruleScope`, `ruleGlobs`, `rulePrecedence`.
102
+ - **command:** ASK whether this is an orchestrator command. If yes, ASK for the agent pipeline as a comma-separated list of agent IDs (each ID must reference an existing agent — canonical or under `.agents/user/agents/`). Cache as `isOrchestrator` and `agentPipeline`.
103
+ - **hook:** ASK for the hook event from the enum: `pre-commit | post-merge | ci-failure | file-save | session-start | pre-push`. Reject any value outside this enum and re-ask. Cache as `hookEvent`.
104
+
105
+ #### 1.7: Plan Summary & Confirmation
106
+
107
+ Render the proposed file path, full frontmatter block, and body-skeleton outline. For an agent plan, the summary lists `Path`, `Type`, `Name`, `Description` (first 80 chars), `Tags`, `Adapters` (or "all enabled"), `Model`; then the frontmatter block; then the body-skeleton outline (`<task>`, `<context>`, Implementation Protocol numbered steps, `<rules>`). For other types, swap the type-specific slots from Step 1.6.
108
+
109
+ **ASK:** "Confirm to delegate authoring to `hatch3r-creator`, or specify changes (e.g., 'change model to fast', 'add tag: review')."
110
+
111
+ Loop until the user confirms.
112
+
113
+ ---
114
+
115
+ ### Phase 2 — Delegate to `hatch3r-creator`
116
+
117
+ Use the Task tool to invoke the `hatch3r-creator` sub-agent. If `hatch3r-creator` is not registered in the current session, fall back to `general-purpose` and pass the same input contract — the agent file is part of this release and lives at `agents/hatch3r-creator.md`.
118
+
119
+ Pass the collected slots as a structured input:
120
+
121
+ ```
122
+ {
123
+ type: "{type}",
124
+ name: "{name}",
125
+ description: "{description}",
126
+ tags: [{tags}],
127
+ adapters: [{adapters}] | null,
128
+ model: "{model}", // agent only
129
+ toolHint: "{toolHint}", // agent only (optional)
130
+ ruleScope: "{ruleScope}", // rule only
131
+ ruleGlobs: [{ruleGlobs}], // rule only (when scope=conditional)
132
+ rulePrecedence:"{rulePrecedence}", // rule only
133
+ isOrchestrator: {bool}, // command only
134
+ agentPipeline: [{agentPipeline}],// command only (when isOrchestrator=true)
135
+ hookEvent: "{hookEvent}" // hook only
136
+ }
137
+ ```
138
+
139
+ The sub-agent composes frontmatter + body, calls `saveUserContent` from `src/content/userContent.ts` (the canonical strict + gentle gate funnel), and atomic-writes the file via `src/merge/safeWrite.ts`. For rule artifacts, `saveUserContent` also generates the paired `.mdc` companion using the `.md → .mdc` scope transform documented in `rules/hatch3r-content-authoring.md`. For skill artifacts, it creates the `{name}/` subdirectory and writes `SKILL.md` inside.
140
+
141
+ Wait for the sub-agent's structured return:
142
+
143
+ ```
144
+ {
145
+ status: "WRITTEN" | "STRICT_GATE_FAILED" | "BLOCKED",
146
+ paths: ["{absolute path}"],
147
+ strictErrors: [{message, gate, line?}],
148
+ gentleWarnings: [{message, gate, line?}]
149
+ }
150
+ ```
151
+
152
+ If `status: "STRICT_GATE_FAILED"`, surface every entry in `strictErrors` to the user verbatim and offer to retry Phase 1 with corrections. Do not proceed to Phase 3.
153
+
154
+ If `status: "BLOCKED"`, surface the blocker (e.g., user file collision) and stop.
155
+
156
+ ---
157
+
158
+ ### Phase 3 — Post-Create Housekeeping
159
+
160
+ Only run this phase when Phase 2 returns `status: "WRITTEN"`.
161
+
162
+ #### 3.1: Validate
163
+
164
+ Run `hatch3r validate --verbose` and capture stdout + exit code. Surface every error and warning related to the new artifact verbatim, plus a summary line: "Validate completed with N errors, M warnings (X relate to the new artifact)." If validate reports errors that block the artifact, instruct the user to edit the file directly at the printed absolute path or re-run `/hatch3r-create` after deleting the file.
165
+
166
+ #### 3.2: Print Path & Sync Offer
167
+
168
+ Print the absolute path(s) and the next-step pointer:
169
+
170
+ ```
171
+ Created:
172
+ /abs/path/.agents/user/{type}/{name}.md
173
+ /abs/path/.agents/user/rules/{name}.mdc (rule only — paired companion)
174
+
175
+ Next step:
176
+ Run `hatch3r sync` to propagate this artifact to all enabled adapter outputs
177
+ (.cursor/, .claude/, .github/copilot-instructions.md, etc.).
178
+
179
+ Edit your artifact directly anytime — `.agents/user/` is preserved across
180
+ `hatch3r update` and `hatch3r clean`.
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Constraints / Anti-Patterns
186
+
187
+ - **Never overwrite an existing user file.** Collision with an existing path under `.agents/user/{type}/` is a strict-gate failure raised by `hatch3r-creator` (status `BLOCKED` with the conflicting path).
188
+ - **Never write to canonical content directories.** All output goes under `.agents/user/`. Writes to `agents/`, `skills/`, `rules/`, `commands/`, or `hooks/` are rejected.
189
+ - **Never bypass strict gates.** Strict failures (frontmatter, ID collision, deny patterns, paired-file parity, orchestrator contract, hook event enum, ≤10KB size) block the save.
190
+ - **Pillar coverage required.** Every user artifact must declare at least one of P1–P6 in tags or body. Authors that do not select a pillar-aligned tag are warned by the gentle gate; the artifact still saves but the warning surfaces in Phase 3.
191
+ - **One artifact per invocation.** Re-run `/hatch3r-create` for additional artifacts.
192
+
193
+ ---
194
+
195
+ ## Quality Charter
196
+
197
+ This command and the `hatch3r-creator` sub-agent both inherit the standards in `agents/shared/quality-charter.md` — confidence levels, root-cause orientation, measurable acceptance criteria, and graceful failure with corrective messages.
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-implementer, hatch3r-reviewer, hatch
6
6
  description: Standalone debug-and-fix workflow — add strategic debug logging, collect runtime logs from the user, perform root cause analysis, implement the fix, and clean up all debug artifacts.
7
7
  tags: [core, implementation]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
  # Debug — Instrument, Diagnose, and Fix from Runtime Evidence
11
15
 
@@ -83,6 +87,18 @@ If the user declines, skip all browser steps. Do not ask again during the sessio
83
87
 
84
88
  Execute these stages in order. **Do not skip any stage.** Ask the user at every checkpoint marked with ASK.
85
89
 
90
+ ## Triage
91
+
92
+ Classify the debug request before delegating:
93
+
94
+ - **Tier 1 (trivial)**: single-file bug with one obvious instrumentation point and known reproduction; reduced researcher depth (`quick`) and minimal logging.
95
+ - **Tier 2 (standard)**: bug spanning 2–4 files with multiple instrumentation points; standard pipeline with researcher (`symptom-trace`) and implementer for logging and fix.
96
+ - **Tier 3 (deep)**: cross-module or intermittent bug requiring deep root-cause analysis; full pipeline with `deep` researcher depth and confirm fix approach with the user before mutating files.
97
+
98
+ If Tier 1, run the standard stages with reduced researcher depth. If Tier 2, run the full pipeline below. If Tier 3, expand researcher modes (add `regression` if relevant) and confirm the diagnosis with the user before Stage 5.
99
+
100
+ ---
101
+
86
102
  ### Stage 1: Gather Bug Context
87
103
 
88
104
  **Goal:** Understand the bug, its symptoms, affected area, and reproduction path before instrumenting anything.
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Scan, assess, and upgrade npm dependencies. Categorizes findings by severity (CVEs, major/minor/patch outdated), researches migration paths, upgrades packages one at a time with testing, and creates tracking issues for unaddressed items.
6
6
  tags: [maintenance, security]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
6
6
  description: Design a new capability -- draft user stories, acceptance criteria, data model, API surface, and sub-issue breakdown as an epic-shaped todo.md for greenfield features
7
7
  tags: [core, planning]
8
8
  quality_charter: agents/shared/quality-charter.md
9
+ efficiency_patterns: agents/shared/efficiency-patterns.md
10
+ cache_friendly: true
11
+ parallel_tool_default: true
12
+ triage_tiers: [1, 2, 3]
9
13
  ---
10
14
 
11
15
  ## Agent Pipeline
@@ -38,6 +42,18 @@ Take a single feature idea and produce a complete feature specification (`docs/s
38
42
 
39
43
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
40
44
 
45
+ ## Step 0: Triage
46
+
47
+ Classify the feature-planning request before delegating:
48
+
49
+ - **Tier 1 (trivial)**: small feature scoped to one module with clear AC; reduced fanout (1–2 researchers), produce a single standalone todo entry instead of an epic.
50
+ - **Tier 2 (standard)**: standard feature touching 2–5 modules with sub-tasks; standard pipeline with all 5 parallel researcher modes and ADR generation if architectural decisions arise.
51
+ - **Tier 3 (deep)**: cross-cutting feature with new architecture, multiple integrations, or breaking changes; full pipeline with deep research and confirm spec scope with the user before writing files.
52
+
53
+ If Tier 1, run the reduced researcher set and skip Step 6 (ADRs). If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including ADR generation and confirm spec scope explicitly before writing files.
54
+
55
+ ---
56
+
41
57
  ### Step 1: Gather Feature Description
42
58
 
43
59
  1. **ASK:** "Tell me about the feature you want to plan. I need:
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Open a QA and reliability epic surveying coverage gaps, flaky tests, and regression blind spots with one testing sub-issue per module plus cross-module wiring audit
6
6
  tags: [maintenance]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Define and manage event-driven hooks that activate agents on project events
6
6
  tags: [core, devops]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline
@@ -5,6 +5,9 @@ orchestrator: false
5
5
  description: Capture learnings from development sessions into reusable knowledge files for future consultation.
6
6
  tags: [core, maintenance]
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ cache_friendly: true
10
+ parallel_tool_default: true
8
11
  ---
9
12
 
10
13
  ## Agent Pipeline