hatch3r 1.6.2 → 1.7.1

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 (175) hide show
  1. package/README.md +5 -5
  2. package/agents/hatch3r-a11y-auditor.md +5 -0
  3. package/agents/hatch3r-architect.md +6 -1
  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 +6 -1
  11. package/agents/hatch3r-implementer.md +6 -1
  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 +6 -1
  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 +4 -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 +11 -0
  44. package/agents/shared/user-content-templates.md +257 -0
  45. package/agents/shared/user-question-protocol.md +95 -0
  46. package/checks/accessibility.md +1 -0
  47. package/checks/code-quality.md +1 -0
  48. package/checks/performance.md +1 -0
  49. package/checks/security.md +1 -0
  50. package/checks/testing.md +1 -0
  51. package/commands/board/pickup-azure-devops.md +1 -0
  52. package/commands/board/pickup-delegation-multi.md +1 -0
  53. package/commands/board/pickup-delegation.md +1 -0
  54. package/commands/board/pickup-github.md +1 -0
  55. package/commands/board/pickup-gitlab.md +1 -0
  56. package/commands/board/pickup-modes.md +1 -0
  57. package/commands/board/pickup-post-impl.md +1 -0
  58. package/commands/board/shared-azure-devops.md +3 -0
  59. package/commands/board/shared-board-overview.md +1 -0
  60. package/commands/board/shared-github.md +18 -0
  61. package/commands/board/shared-gitlab.md +5 -0
  62. package/commands/hatch3r-agent-customize.md +9 -2
  63. package/commands/hatch3r-api-spec.md +16 -0
  64. package/commands/hatch3r-benchmark.md +16 -0
  65. package/commands/hatch3r-board-fill.md +17 -1
  66. package/commands/hatch3r-board-groom.md +3 -0
  67. package/commands/hatch3r-board-init.md +3 -0
  68. package/commands/hatch3r-board-pickup.md +17 -1
  69. package/commands/hatch3r-board-refresh.md +3 -0
  70. package/commands/hatch3r-board-shared.md +24 -0
  71. package/commands/hatch3r-bug-plan.md +16 -0
  72. package/commands/hatch3r-codebase-map.md +16 -0
  73. package/commands/hatch3r-command-customize.md +3 -0
  74. package/commands/hatch3r-context-health.md +3 -0
  75. package/commands/hatch3r-cost-tracking.md +3 -0
  76. package/commands/hatch3r-create.md +197 -0
  77. package/commands/hatch3r-debug.md +16 -0
  78. package/commands/hatch3r-dep-audit.md +3 -0
  79. package/commands/hatch3r-feature-plan.md +16 -0
  80. package/commands/hatch3r-healthcheck.md +3 -0
  81. package/commands/hatch3r-hooks.md +3 -0
  82. package/commands/hatch3r-learn.md +3 -0
  83. package/commands/hatch3r-migration-plan.md +16 -0
  84. package/commands/hatch3r-onboard.md +16 -0
  85. package/commands/hatch3r-pr-resolve.md +668 -0
  86. package/commands/hatch3r-project-spec.md +16 -0
  87. package/commands/hatch3r-quick-change.md +18 -2
  88. package/commands/hatch3r-recipe.md +3 -0
  89. package/commands/hatch3r-refactor-plan.md +16 -0
  90. package/commands/hatch3r-release.md +3 -0
  91. package/commands/hatch3r-report.md +167 -0
  92. package/commands/hatch3r-revision.md +17 -1
  93. package/commands/hatch3r-roadmap.md +16 -0
  94. package/commands/hatch3r-rule-customize.md +3 -0
  95. package/commands/hatch3r-security-audit.md +3 -0
  96. package/commands/hatch3r-skill-customize.md +3 -0
  97. package/commands/hatch3r-test-plan.md +16 -0
  98. package/commands/hatch3r-workflow.md +18 -2
  99. package/commands/revision/revision-board-integration.md +1 -0
  100. package/commands/revision/revision-delegation.md +1 -0
  101. package/commands/revision/revision-modes.md +1 -0
  102. package/commands/revision/revision-quality.md +1 -0
  103. package/dist/cli/index.js +2962 -1217
  104. package/dist/cli/index.js.map +1 -1
  105. package/github-agents/hatch3r-docs-agent.md +3 -0
  106. package/github-agents/hatch3r-lint-agent.md +3 -0
  107. package/github-agents/hatch3r-security-agent.md +3 -0
  108. package/github-agents/hatch3r-test-agent.md +3 -0
  109. package/hooks/hatch3r-ci-failure.md +1 -0
  110. package/hooks/hatch3r-file-save.md +1 -0
  111. package/hooks/hatch3r-post-merge.md +1 -0
  112. package/hooks/hatch3r-pre-commit.md +1 -0
  113. package/hooks/hatch3r-pre-push.md +1 -0
  114. package/hooks/hatch3r-session-start.md +1 -0
  115. package/package.json +10 -1
  116. package/prompts/hatch3r-bug-triage.md +2 -0
  117. package/prompts/hatch3r-code-review.md +2 -0
  118. package/prompts/hatch3r-pr-description.md +2 -0
  119. package/rules/hatch3r-accessibility-standards.md +1 -0
  120. package/rules/hatch3r-agent-orchestration-detail.md +1 -0
  121. package/rules/hatch3r-agent-orchestration.md +24 -0
  122. package/rules/hatch3r-agent-orchestration.mdc +23 -0
  123. package/rules/hatch3r-api-design.md +1 -0
  124. package/rules/hatch3r-browser-verification.md +1 -0
  125. package/rules/hatch3r-ci-cd.md +1 -0
  126. package/rules/hatch3r-code-standards.md +1 -0
  127. package/rules/hatch3r-component-conventions.md +1 -0
  128. package/rules/hatch3r-data-classification.md +1 -0
  129. package/rules/hatch3r-deep-context.md +2 -1
  130. package/rules/hatch3r-deep-context.mdc +1 -1
  131. package/rules/hatch3r-dependency-management.md +1 -0
  132. package/rules/hatch3r-feature-flags.md +1 -0
  133. package/rules/hatch3r-git-conventions.md +1 -0
  134. package/rules/hatch3r-i18n.md +1 -0
  135. package/rules/hatch3r-iteration-summary.md +88 -0
  136. package/rules/hatch3r-iteration-summary.mdc +83 -0
  137. package/rules/hatch3r-learning-consult.md +1 -0
  138. package/rules/hatch3r-migrations.md +1 -0
  139. package/rules/hatch3r-observability-logging.md +1 -0
  140. package/rules/hatch3r-observability-metrics.md +1 -0
  141. package/rules/hatch3r-observability-tracing-detail.md +1 -0
  142. package/rules/hatch3r-observability-tracing.md +1 -0
  143. package/rules/hatch3r-observability.md +1 -0
  144. package/rules/hatch3r-performance-budgets.md +1 -0
  145. package/rules/hatch3r-secrets-management.md +1 -0
  146. package/rules/hatch3r-security-patterns.md +1 -0
  147. package/rules/hatch3r-testing.md +1 -0
  148. package/rules/hatch3r-theming.md +1 -0
  149. package/rules/hatch3r-tooling-hierarchy.md +1 -0
  150. package/skills/hatch3r-a11y-audit/SKILL.md +2 -0
  151. package/skills/hatch3r-agent-customize/SKILL.md +2 -0
  152. package/skills/hatch3r-api-spec/SKILL.md +2 -0
  153. package/skills/hatch3r-architecture-review/SKILL.md +2 -0
  154. package/skills/hatch3r-bug-fix/SKILL.md +2 -0
  155. package/skills/hatch3r-ci-pipeline/SKILL.md +2 -0
  156. package/skills/hatch3r-command-customize/SKILL.md +2 -0
  157. package/skills/hatch3r-context-health/SKILL.md +2 -0
  158. package/skills/hatch3r-cost-tracking/SKILL.md +2 -0
  159. package/skills/hatch3r-customize/SKILL.md +2 -0
  160. package/skills/hatch3r-dep-audit/SKILL.md +2 -0
  161. package/skills/hatch3r-feature/SKILL.md +2 -0
  162. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +2 -0
  163. package/skills/hatch3r-incident-response/SKILL.md +2 -0
  164. package/skills/hatch3r-issue-workflow/SKILL.md +2 -0
  165. package/skills/hatch3r-logical-refactor/SKILL.md +2 -0
  166. package/skills/hatch3r-migration/SKILL.md +2 -0
  167. package/skills/hatch3r-perf-audit/SKILL.md +2 -0
  168. package/skills/hatch3r-pr-creation/SKILL.md +2 -0
  169. package/skills/hatch3r-qa-validation/SKILL.md +2 -0
  170. package/skills/hatch3r-recipe/SKILL.md +2 -0
  171. package/skills/hatch3r-refactor/SKILL.md +2 -0
  172. package/skills/hatch3r-release/SKILL.md +2 -0
  173. package/skills/hatch3r-rule-customize/SKILL.md +2 -0
  174. package/skills/hatch3r-skill-customize/SKILL.md +2 -0
  175. package/skills/hatch3r-visual-refactor/SKILL.md +2 -0
@@ -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
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-architect, hatch3r-docs-writer]
6
6
  description: Create a phased migration plan for a major dependency or framework upgrade. Analyzes breaking changes and produces an actionable plan with rollback procedures.
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
 
11
15
  ## Agent Pipeline
@@ -39,6 +43,18 @@ Take a dependency or framework upgrade target and produce a complete migration p
39
43
 
40
44
  Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
41
45
 
46
+ ## Step 0: Triage
47
+
48
+ Classify the migration request before delegating:
49
+
50
+ - **Tier 1 (trivial)**: minor version bump with no breaking changes; produce a single-phase todo entry without ADRs or architect involvement.
51
+ - **Tier 2 (standard)**: single major version jump with bounded breaking changes; standard pipeline with both parallel researchers and the architect for impact mapping.
52
+ - **Tier 3 (deep)**: multi-major-version jump or framework migration (e.g., CRA -> Vite); full pipeline with research and confirm phased plan with the user before writing files.
53
+
54
+ If Tier 1, run a condensed pipeline that skips the architect when no breaking changes exist. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including incremental-vs-direct trade-off analysis and confirm phasing with the user before writing files.
55
+
56
+ ---
57
+
42
58
  ### Step 1: Gather Migration Target
43
59
 
44
60
  1. **ASK:** "Tell me about the migration you're planning. I need:
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
6
6
  description: Generate a comprehensive onboarding guide for a new developer joining the project -- spawn parallel researchers to analyze codebase structure, architecture, and conventions, then produce a tailored onboarding document with setup instructions, architecture walkthrough, coding conventions, key workflows, tribal knowledge, and a quick-reference cheat sheet.
7
7
  tags: [brownfield, 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
@@ -38,6 +42,18 @@ Take a new developer's role, experience level, and focus areas and produce a com
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 onboarding-guide request before delegating:
48
+
49
+ - **Tier 1 (trivial)**: small project (<500 files) or condensed guide for a single role; reduced fanout (1 researcher: codebase-overview), abbreviated guide.
50
+ - **Tier 2 (standard)**: standard project with both technical and team context; standard pipeline with all 3 parallel researchers (codebase-overview, architecture, conventions).
51
+ - **Tier 3 (deep)**: large monorepo or staff-level guide covering system architecture, integration boundaries, and scaling considerations; full pipeline with deep researcher depth and confirm sections with the user.
52
+
53
+ If Tier 1, run the reduced researcher set and skip experience-level depth tailoring. If Tier 2, run the standard pipeline below. If Tier 3, expand researcher depth and confirm guide sections with the user before generating the document.
54
+
55
+ ---
56
+
41
57
  ### Step 1: Gather Context
42
58
 
43
59
  1. **ASK:** "Tell me about the developer who will use this onboarding guide. I need: