hatch3r 1.0.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.
- package/LICENSE +21 -0
- package/README.md +437 -0
- package/agents/hatch3r-a11y-auditor.md +126 -0
- package/agents/hatch3r-architect.md +160 -0
- package/agents/hatch3r-ci-watcher.md +123 -0
- package/agents/hatch3r-context-rules.md +97 -0
- package/agents/hatch3r-dependency-auditor.md +164 -0
- package/agents/hatch3r-devops.md +138 -0
- package/agents/hatch3r-docs-writer.md +97 -0
- package/agents/hatch3r-implementer.md +162 -0
- package/agents/hatch3r-learnings-loader.md +108 -0
- package/agents/hatch3r-lint-fixer.md +104 -0
- package/agents/hatch3r-perf-profiler.md +123 -0
- package/agents/hatch3r-researcher.md +642 -0
- package/agents/hatch3r-reviewer.md +81 -0
- package/agents/hatch3r-security-auditor.md +119 -0
- package/agents/hatch3r-test-writer.md +134 -0
- package/commands/hatch3r-agent-customize.md +146 -0
- package/commands/hatch3r-api-spec.md +49 -0
- package/commands/hatch3r-benchmark.md +50 -0
- package/commands/hatch3r-board-fill.md +504 -0
- package/commands/hatch3r-board-init.md +315 -0
- package/commands/hatch3r-board-pickup.md +672 -0
- package/commands/hatch3r-board-refresh.md +198 -0
- package/commands/hatch3r-board-shared.md +369 -0
- package/commands/hatch3r-bug-plan.md +410 -0
- package/commands/hatch3r-codebase-map.md +1182 -0
- package/commands/hatch3r-command-customize.md +94 -0
- package/commands/hatch3r-context-health.md +112 -0
- package/commands/hatch3r-cost-tracking.md +139 -0
- package/commands/hatch3r-dep-audit.md +171 -0
- package/commands/hatch3r-feature-plan.md +379 -0
- package/commands/hatch3r-healthcheck.md +307 -0
- package/commands/hatch3r-hooks.md +282 -0
- package/commands/hatch3r-learn.md +217 -0
- package/commands/hatch3r-migration-plan.md +51 -0
- package/commands/hatch3r-onboard.md +56 -0
- package/commands/hatch3r-project-spec.md +1153 -0
- package/commands/hatch3r-recipe.md +179 -0
- package/commands/hatch3r-refactor-plan.md +426 -0
- package/commands/hatch3r-release.md +328 -0
- package/commands/hatch3r-roadmap.md +556 -0
- package/commands/hatch3r-rule-customize.md +114 -0
- package/commands/hatch3r-security-audit.md +370 -0
- package/commands/hatch3r-skill-customize.md +93 -0
- package/commands/hatch3r-workflow.md +377 -0
- package/dist/cli/hooks-ZOTFDEA3.js +59 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +3584 -0
- package/github-agents/hatch3r-docs-agent.md +46 -0
- package/github-agents/hatch3r-lint-agent.md +41 -0
- package/github-agents/hatch3r-security-agent.md +54 -0
- package/github-agents/hatch3r-test-agent.md +66 -0
- package/hooks/hatch3r-ci-failure.md +10 -0
- package/hooks/hatch3r-file-save.md +11 -0
- package/hooks/hatch3r-post-merge.md +10 -0
- package/hooks/hatch3r-pre-commit.md +11 -0
- package/hooks/hatch3r-pre-push.md +10 -0
- package/hooks/hatch3r-session-start.md +10 -0
- package/mcp/mcp.json +62 -0
- package/package.json +84 -0
- package/prompts/hatch3r-bug-triage.md +155 -0
- package/prompts/hatch3r-code-review.md +131 -0
- package/prompts/hatch3r-pr-description.md +173 -0
- package/rules/hatch3r-accessibility-standards.md +77 -0
- package/rules/hatch3r-accessibility-standards.mdc +75 -0
- package/rules/hatch3r-agent-orchestration.md +160 -0
- package/rules/hatch3r-api-design.md +176 -0
- package/rules/hatch3r-api-design.mdc +176 -0
- package/rules/hatch3r-browser-verification.md +73 -0
- package/rules/hatch3r-browser-verification.mdc +73 -0
- package/rules/hatch3r-ci-cd.md +70 -0
- package/rules/hatch3r-ci-cd.mdc +68 -0
- package/rules/hatch3r-code-standards.md +102 -0
- package/rules/hatch3r-code-standards.mdc +100 -0
- package/rules/hatch3r-component-conventions.md +102 -0
- package/rules/hatch3r-component-conventions.mdc +102 -0
- package/rules/hatch3r-data-classification.md +85 -0
- package/rules/hatch3r-data-classification.mdc +83 -0
- package/rules/hatch3r-dependency-management.md +17 -0
- package/rules/hatch3r-dependency-management.mdc +15 -0
- package/rules/hatch3r-error-handling.md +17 -0
- package/rules/hatch3r-error-handling.mdc +15 -0
- package/rules/hatch3r-feature-flags.md +112 -0
- package/rules/hatch3r-feature-flags.mdc +112 -0
- package/rules/hatch3r-git-conventions.md +47 -0
- package/rules/hatch3r-git-conventions.mdc +45 -0
- package/rules/hatch3r-i18n.md +90 -0
- package/rules/hatch3r-i18n.mdc +90 -0
- package/rules/hatch3r-learning-consult.md +29 -0
- package/rules/hatch3r-learning-consult.mdc +27 -0
- package/rules/hatch3r-migrations.md +17 -0
- package/rules/hatch3r-migrations.mdc +15 -0
- package/rules/hatch3r-observability.md +165 -0
- package/rules/hatch3r-observability.mdc +165 -0
- package/rules/hatch3r-performance-budgets.md +109 -0
- package/rules/hatch3r-performance-budgets.mdc +109 -0
- package/rules/hatch3r-secrets-management.md +76 -0
- package/rules/hatch3r-secrets-management.mdc +74 -0
- package/rules/hatch3r-security-patterns.md +211 -0
- package/rules/hatch3r-security-patterns.mdc +211 -0
- package/rules/hatch3r-testing.md +89 -0
- package/rules/hatch3r-testing.mdc +87 -0
- package/rules/hatch3r-theming.md +51 -0
- package/rules/hatch3r-theming.mdc +51 -0
- package/rules/hatch3r-tooling-hierarchy.md +92 -0
- package/rules/hatch3r-tooling-hierarchy.mdc +79 -0
- package/skills/hatch3r-a11y-audit/SKILL.md +131 -0
- package/skills/hatch3r-agent-customize/SKILL.md +75 -0
- package/skills/hatch3r-api-spec/SKILL.md +66 -0
- package/skills/hatch3r-architecture-review/SKILL.md +96 -0
- package/skills/hatch3r-bug-fix/SKILL.md +129 -0
- package/skills/hatch3r-ci-pipeline/SKILL.md +76 -0
- package/skills/hatch3r-command-customize/SKILL.md +67 -0
- package/skills/hatch3r-context-health/SKILL.md +76 -0
- package/skills/hatch3r-cost-tracking/SKILL.md +65 -0
- package/skills/hatch3r-dep-audit/SKILL.md +82 -0
- package/skills/hatch3r-feature/SKILL.md +129 -0
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +150 -0
- package/skills/hatch3r-incident-response/SKILL.md +86 -0
- package/skills/hatch3r-issue-workflow/SKILL.md +139 -0
- package/skills/hatch3r-logical-refactor/SKILL.md +73 -0
- package/skills/hatch3r-migration/SKILL.md +76 -0
- package/skills/hatch3r-perf-audit/SKILL.md +114 -0
- package/skills/hatch3r-pr-creation/SKILL.md +85 -0
- package/skills/hatch3r-qa-validation/SKILL.md +86 -0
- package/skills/hatch3r-recipe/SKILL.md +67 -0
- package/skills/hatch3r-refactor/SKILL.md +86 -0
- package/skills/hatch3r-release/SKILL.md +93 -0
- package/skills/hatch3r-rule-customize/SKILL.md +70 -0
- package/skills/hatch3r-skill-customize/SKILL.md +67 -0
- package/skills/hatch3r-visual-refactor/SKILL.md +89 -0
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-roadmap
|
|
3
|
+
type: command
|
|
4
|
+
description: Generate a dual-lens phased roadmap (business milestones + technical milestones) from specs and vision using parallel researcher sub-agents, output to todo.md in the format that hatch3r-board-fill expects.
|
|
5
|
+
---
|
|
6
|
+
# Roadmap — Generate Phased Roadmap from Specs & Vision
|
|
7
|
+
|
|
8
|
+
Generate a dependency-aware, priority-ordered roadmap with **two parallel dimensions**: business milestones and technical milestones. Spawns parallel researcher sub-agents (business priority, technical readiness) to inform prioritization with market timing, competitive pressure, revenue impact, and production readiness gaps. Outputs to `todo.md` in the exact format that `hatch3r-board-fill` expects, with items tagged as `[BIZ]`, `[TECH]`, or `[BOTH]`. Optionally generates a root-level `AGENTS.md`. Works for both greenfield projects (from `hatch3r-project-spec` output) and brownfield projects (from `hatch3r-codebase-map` output).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Shared Context
|
|
13
|
+
|
|
14
|
+
**Read the `hatch3r-board-shared` command at the start of the run.** It contains Board Configuration, GitHub Context, Project Reference, Projects v2 sync procedure, and tooling directives. Cache all values for the duration of this run.
|
|
15
|
+
|
|
16
|
+
## Token-Saving Directives
|
|
17
|
+
|
|
18
|
+
Follow the **Token-Saving Directives** in `hatch3r-board-shared`.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
### Step 1: Load Project Context & Business Discovery
|
|
27
|
+
|
|
28
|
+
#### 1a. Load Existing Documentation
|
|
29
|
+
|
|
30
|
+
1. Check for existing documentation:
|
|
31
|
+
- `docs/specs/technical/` — technical specifications
|
|
32
|
+
- `docs/specs/business/` — business specifications
|
|
33
|
+
- `docs/specs/` (flat) — legacy spec layout (pre-dual-lens)
|
|
34
|
+
- `docs/adr/` — architectural decision records
|
|
35
|
+
- `docs/codebase-health.md` — health report (from codebase-map)
|
|
36
|
+
- Existing `todo.md` — current backlog
|
|
37
|
+
- `README.md` — project overview
|
|
38
|
+
- Root `AGENTS.md` — existing agent instructions
|
|
39
|
+
2. Read discovered documents selectively — TOC/headers first (first ~30 lines), full content only for sections relevant to roadmap planning.
|
|
40
|
+
3. If no docs exist, ASK user for project vision and goals (text input or reference to a document).
|
|
41
|
+
4. For brownfield projects: scan current GitHub issues via `gh issue list --state open --limit 100` to understand existing tracked work. Paginate if more than 100 issues.
|
|
42
|
+
|
|
43
|
+
#### 1b. Load Session Context
|
|
44
|
+
|
|
45
|
+
Check for `.hatch3r-session.json` (written by `hatch3r-codebase-map` or `hatch3r-project-spec`). If found, pre-fill company stage and business context. Confirm with the user rather than re-asking.
|
|
46
|
+
|
|
47
|
+
#### 1c. Onboarding Scope Selection
|
|
48
|
+
|
|
49
|
+
**ASK:** "Should I generate a roadmap for the **full product**, or only **specific parts**? If specific, list the domains, modules, or feature areas to focus on."
|
|
50
|
+
|
|
51
|
+
#### 1d. Company Stage Assessment
|
|
52
|
+
|
|
53
|
+
If not loaded from `.hatch3r-session.json`:
|
|
54
|
+
|
|
55
|
+
**ASK:** "To calibrate the roadmap to your situation, tell me about your company/project stage:
|
|
56
|
+
|
|
57
|
+
- **Company stage**: pre-revenue / early-revenue / growth / scale / enterprise
|
|
58
|
+
- **Team composition**: solo founder, small team (2-5), medium (5-20), large (20+)
|
|
59
|
+
- **Current user/revenue scale**: no users yet, beta (<1K), early traction (1K-50K), growth (50K-500K), scale (500K+)
|
|
60
|
+
- **Funding/runway**: bootstrapped, pre-seed, seed, Series A+, profitable
|
|
61
|
+
- **Regulatory/compliance needs**: none, basic (GDPR/SOC2), heavy (HIPAA/PCI/FedRAMP)
|
|
62
|
+
- **Deployment maturity**: no deployment yet, manual, CI/CD, full GitOps"
|
|
63
|
+
|
|
64
|
+
Cache the stage assessment. It drives **stage-adaptive prioritization**:
|
|
65
|
+
- **Pre-revenue / early-revenue**: Prioritize speed-to-market. Front-load core value delivery and minimum viable infrastructure. Defer polish and scale.
|
|
66
|
+
- **Growth**: Prioritize scaling bottlenecks and retention features. Balance new features with production hardening.
|
|
67
|
+
- **Scale / enterprise**: Prioritize reliability, compliance, and governance. Front-load SLA readiness and security hardening.
|
|
68
|
+
|
|
69
|
+
#### 1e. Business Context & Roadmap Goals
|
|
70
|
+
|
|
71
|
+
**ASK:** "To build a business-aware roadmap, I need additional context:
|
|
72
|
+
|
|
73
|
+
- **Target launch date or next major milestone**: when is the next business deadline?
|
|
74
|
+
- **Key business KPIs for the next 6-12 months**: what metrics define success?
|
|
75
|
+
- **Team capacity**: how many devs, approximate hours/week available?
|
|
76
|
+
- **Market timing pressures**: competitor launches, regulatory deadlines, seasonal peaks, funding milestones?
|
|
77
|
+
- **Revenue targets**: any specific revenue or user growth targets for the next 6-12 months?
|
|
78
|
+
- **Dependencies on external parties**: partners, vendors, API providers, design agencies?
|
|
79
|
+
|
|
80
|
+
Any other priorities or constraints I should factor into the roadmap?"
|
|
81
|
+
|
|
82
|
+
#### 1f. Present Context Summary
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Context Loaded:
|
|
86
|
+
Technical Specs: {N} files in docs/specs/technical/
|
|
87
|
+
Business Specs: {N} files in docs/specs/business/
|
|
88
|
+
ADRs: {N} files in docs/adr/
|
|
89
|
+
Health report: {found / not found}
|
|
90
|
+
Existing todo.md: {found with N items / not found}
|
|
91
|
+
AGENTS.md: {found / not found}
|
|
92
|
+
Open GitHub issues: {N}
|
|
93
|
+
Session context: {loaded from .hatch3r-session.json / gathered fresh}
|
|
94
|
+
|
|
95
|
+
Company Stage: {stage}
|
|
96
|
+
Team Capacity: {N} devs, {hours}/week
|
|
97
|
+
Next Milestone: {milestone} by {date}
|
|
98
|
+
Key KPIs: {list}
|
|
99
|
+
Market Pressures: {list or none}
|
|
100
|
+
|
|
101
|
+
Gaps: {list any missing context}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**ASK:** "Here is the context I loaded. Provide additional goals, constraints, or priorities? (or confirm to proceed)"
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### Step 2: Analyze & Categorize Work
|
|
109
|
+
|
|
110
|
+
1. From technical specs: extract all requirements, acceptance criteria, and gaps.
|
|
111
|
+
2. From business specs: extract business rules, GTM requirements, competitive gaps, and production readiness gaps.
|
|
112
|
+
3. From ADRs: extract pending decisions and their implementation work.
|
|
113
|
+
4. From health report (if exists): extract debt items and improvement opportunities.
|
|
114
|
+
5. From existing GitHub issues: map already-tracked work to avoid duplication.
|
|
115
|
+
6. Categorize all work items by:
|
|
116
|
+
|
|
117
|
+
| Dimension | Values |
|
|
118
|
+
| -------------- | --------------------------------------------------------------------------------------- |
|
|
119
|
+
| **Scope** | `[BIZ]` business-driven, `[TECH]` technically-driven, `[BOTH]` cross-cutting |
|
|
120
|
+
| **Domain/area** | Which module, subsystem, or business domain does this touch? |
|
|
121
|
+
| **Type** | feature, bug fix, refactor, infrastructure, documentation, QA, GTM, compliance |
|
|
122
|
+
| **Effort** | S (< 1 day), M (1-3 days), L (3-5 days), XL (> 5 days, should be an epic) |
|
|
123
|
+
| **Impact** | critical path, quality of life, nice-to-have, revenue-blocking, scale-blocking |
|
|
124
|
+
| **Dependencies** | What must come first? (both technical and business dependencies) |
|
|
125
|
+
|
|
126
|
+
7. Present a categorized summary table of all extracted work items, clearly separated into business-driven, technically-driven, and cross-cutting.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Step 3: Spawn Parallel Research Sub-Agents
|
|
131
|
+
|
|
132
|
+
Launch one sub-agent per research domain below concurrently using the Task tool with `subagent_type: "generalPurpose"`. Each receives the full context from Steps 1-2.
|
|
133
|
+
|
|
134
|
+
**Both sub-agent prompts must include:**
|
|
135
|
+
- All loaded project context (specs, ADRs, health report, existing backlog)
|
|
136
|
+
- Company stage, business context, and roadmap goals from Step 1
|
|
137
|
+
- The categorized work items from Step 2
|
|
138
|
+
- Instruction to use **web search** for market research, benchmarks, and best practices
|
|
139
|
+
- Explicit instruction: **do NOT create any files — return output as a structured result**
|
|
140
|
+
|
|
141
|
+
#### Sub-Agent 1: Business Priority Researcher
|
|
142
|
+
|
|
143
|
+
**Prompt context:** Full project context, business specs, company stage, market pressures, KPIs.
|
|
144
|
+
|
|
145
|
+
**Task:** Research and recommend business-driven prioritization using **web search** for market intelligence.
|
|
146
|
+
|
|
147
|
+
1. **Market timing windows**:
|
|
148
|
+
- Research the product category for seasonal patterns, industry events, regulatory deadlines
|
|
149
|
+
- Identify windows of opportunity (competitor gaps, market shifts, funding cycles)
|
|
150
|
+
- Flag time-sensitive items that must ship by a specific date
|
|
151
|
+
2. **Competitive pressure analysis**:
|
|
152
|
+
- Research competitor release cadences and recent launches
|
|
153
|
+
- Identify feature gaps that competitors are filling (urgency signals)
|
|
154
|
+
- Find differentiation opportunities that should be prioritized
|
|
155
|
+
3. **Revenue-impact ordering**:
|
|
156
|
+
- Which features drive conversion most? (based on industry benchmarks)
|
|
157
|
+
- Which features drive retention most? (churn reduction)
|
|
158
|
+
- Which features unlock new revenue streams or market segments?
|
|
159
|
+
- Order features by expected revenue impact
|
|
160
|
+
4. **Regulatory deadlines**:
|
|
161
|
+
- Research compliance timelines for the product's industry and geography
|
|
162
|
+
- Identify must-have certifications and their lead times
|
|
163
|
+
- Flag regulatory blockers that constrain launch timing
|
|
164
|
+
5. **User acquisition channel requirements**:
|
|
165
|
+
- What technical capabilities are needed for each GTM channel (PLG requires self-serve, SEO requires content, API-first requires docs)
|
|
166
|
+
- Order channel enablement work by expected ROI
|
|
167
|
+
|
|
168
|
+
**Output structure:**
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
## Business Priority Intelligence
|
|
172
|
+
|
|
173
|
+
### Market Timing
|
|
174
|
+
| Window | Deadline | Items Affected | Priority Impact |
|
|
175
|
+
|--------|----------|---------------|----------------|
|
|
176
|
+
| {window} | {date} | {items} | {how it changes priority} |
|
|
177
|
+
|
|
178
|
+
### Competitive Urgency
|
|
179
|
+
| Feature/Area | Competitor Activity | Urgency | Recommendation |
|
|
180
|
+
|-------------|-------------------|---------|----------------|
|
|
181
|
+
| {area} | {what competitors are doing} | high/med/low | {action} |
|
|
182
|
+
|
|
183
|
+
### Revenue Impact Ordering
|
|
184
|
+
| Rank | Feature/Area | Revenue Mechanism | Impact Estimate | Evidence |
|
|
185
|
+
|------|-------------|-------------------|-----------------|----------|
|
|
186
|
+
| 1 | {feature} | {conversion/retention/expansion/new segment} | {high/med/low} | {benchmark or reasoning} |
|
|
187
|
+
|
|
188
|
+
### Regulatory Timeline
|
|
189
|
+
| Requirement | Deadline | Effort | Blocking |
|
|
190
|
+
|------------|----------|--------|----------|
|
|
191
|
+
| {requirement} | {date} | {S/M/L/XL} | {what it blocks} |
|
|
192
|
+
|
|
193
|
+
### Channel Requirements
|
|
194
|
+
| Channel | Required Capabilities | Priority | Expected ROI |
|
|
195
|
+
|---------|---------------------|----------|-------------|
|
|
196
|
+
| {channel} | {what needs to be built} | {P0-P3} | {high/med/low} |
|
|
197
|
+
|
|
198
|
+
### Recommended Business Milestones
|
|
199
|
+
1. {milestone}: {date target} — {what it unlocks}
|
|
200
|
+
2. ...
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### Sub-Agent 2: Technical Readiness Researcher
|
|
204
|
+
|
|
205
|
+
**Prompt context:** Full project context, technical specs, health report, company stage.
|
|
206
|
+
|
|
207
|
+
**Task:** Evaluate technical readiness and recommend infrastructure prioritization. Use **web search** for industry benchmarks and best practices.
|
|
208
|
+
|
|
209
|
+
1. **Tech debt velocity impact**:
|
|
210
|
+
- Which debt items slow down feature delivery most?
|
|
211
|
+
- Quantify: "fixing X would speed up Y by approximately Z%"
|
|
212
|
+
- Recommend debt paydown ordering by delivery velocity impact
|
|
213
|
+
2. **Infrastructure prerequisites for scaling milestones**:
|
|
214
|
+
- What infrastructure must be in place before hitting 1K, 10K, 100K users?
|
|
215
|
+
- Map infrastructure gaps to business milestones
|
|
216
|
+
- Flag "too late to fix" items that need lead time
|
|
217
|
+
3. **Production readiness gaps blocking launch/growth**:
|
|
218
|
+
- What's missing for a credible production launch?
|
|
219
|
+
- What's missing for scaling beyond initial traction?
|
|
220
|
+
- Grade each gap by business impact
|
|
221
|
+
4. **Technical dependencies constraining business priorities**:
|
|
222
|
+
- Which business features are blocked by technical prerequisites?
|
|
223
|
+
- Build a dependency graph: business priorities → technical enablers
|
|
224
|
+
- Identify the critical path through technical enablers
|
|
225
|
+
5. **Industry benchmarks for performance/reliability**:
|
|
226
|
+
- Research performance benchmarks for the product category (page load times, API latency, uptime)
|
|
227
|
+
- Research reliability expectations for the company stage
|
|
228
|
+
- Identify gaps between current state and benchmarks
|
|
229
|
+
|
|
230
|
+
**Output structure:**
|
|
231
|
+
|
|
232
|
+
```markdown
|
|
233
|
+
## Technical Readiness Intelligence
|
|
234
|
+
|
|
235
|
+
### Debt Velocity Impact
|
|
236
|
+
| Debt Item | Affected Areas | Velocity Impact | Fix Effort | ROI |
|
|
237
|
+
|-----------|---------------|----------------|-----------|-----|
|
|
238
|
+
| {item} | {modules} | {estimated slowdown} | {S/M/L/XL} | {high/med/low} |
|
|
239
|
+
|
|
240
|
+
### Infrastructure Milestones
|
|
241
|
+
| User Milestone | Prerequisites | Current State | Gap | Lead Time |
|
|
242
|
+
|---------------|--------------|--------------|-----|-----------|
|
|
243
|
+
| 1K users | {list} | {status} | {missing} | {days} |
|
|
244
|
+
| 10K users | {list} | {status} | {missing} | {days} |
|
|
245
|
+
| 100K users | {list} | {status} | {missing} | {days} |
|
|
246
|
+
|
|
247
|
+
### Production Readiness Blockers
|
|
248
|
+
| Blocker | Business Impact | Fix Effort | Deadline |
|
|
249
|
+
|---------|----------------|-----------|----------|
|
|
250
|
+
| {blocker} | {what it blocks} | {S/M/L/XL} | {when needed} |
|
|
251
|
+
|
|
252
|
+
### Technical → Business Dependency Map
|
|
253
|
+
| Business Priority | Technical Prerequisites | Status |
|
|
254
|
+
|------------------|----------------------|--------|
|
|
255
|
+
| {business item} | {technical items that must come first} | {ready/blocked} |
|
|
256
|
+
|
|
257
|
+
### Performance Benchmarks
|
|
258
|
+
| Metric | Industry P50 | Industry P90 | Current | Gap |
|
|
259
|
+
|--------|-------------|-------------|---------|-----|
|
|
260
|
+
| {metric} | {value} | {value} | {value or unknown} | {gap} |
|
|
261
|
+
|
|
262
|
+
### Recommended Technical Milestones
|
|
263
|
+
1. {milestone}: {deadline} — {what it enables}
|
|
264
|
+
2. ...
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Wait for all sub-agents to complete before proceeding.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### Step 4: Generate Dual-Lens Phased Roadmap
|
|
272
|
+
|
|
273
|
+
Merge the categorized work items from Step 2 with the research intelligence from Step 3 to build a roadmap with **two parallel dimensions**.
|
|
274
|
+
|
|
275
|
+
#### 4a. Business Milestones Lane
|
|
276
|
+
|
|
277
|
+
Map business-driven milestones across the timeline:
|
|
278
|
+
|
|
279
|
+
| Milestone Type | Examples |
|
|
280
|
+
|---------------|---------|
|
|
281
|
+
| **Revenue milestones** | Launch, first paying customer, MRR targets, break-even |
|
|
282
|
+
| **User acquisition milestones** | Beta launch, public launch, growth targets, market expansion |
|
|
283
|
+
| **Market timing milestones** | Competitive windows, seasonal peaks, conference launches |
|
|
284
|
+
| **Compliance milestones** | Certifications, audits, regulatory deadlines |
|
|
285
|
+
| **Fundraising milestones** | Metrics needed for next round, demo-ready state |
|
|
286
|
+
|
|
287
|
+
#### 4b. Technical Milestones Lane
|
|
288
|
+
|
|
289
|
+
Map technically-driven milestones across the timeline:
|
|
290
|
+
|
|
291
|
+
| Milestone Type | Examples |
|
|
292
|
+
|---------------|---------|
|
|
293
|
+
| **Infrastructure readiness** | MVP infra, scaling infra, multi-region, enterprise-grade |
|
|
294
|
+
| **Production hardening** | Monitoring, alerting, incident response, SLA readiness |
|
|
295
|
+
| **Technical debt paydown** | Prioritized by business impact (velocity improvement) |
|
|
296
|
+
| **Platform capabilities** | APIs, integrations, extensibility, developer experience |
|
|
297
|
+
| **Security & compliance** | Auth hardening, vulnerability scanning, audit trails |
|
|
298
|
+
|
|
299
|
+
#### 4c. Phase Rules (Enhanced)
|
|
300
|
+
|
|
301
|
+
| Phase | Label | Business Criteria | Technical Criteria |
|
|
302
|
+
| ----- | ---- | ----------------- | ------------------ |
|
|
303
|
+
| P0 | Critical / Launch Blockers | Revenue-blocking features, regulatory deadlines, market timing windows | Security fixes, data integrity, core infrastructure dependencies |
|
|
304
|
+
| P1 | Core Features | Primary value-delivering features, conversion-critical flows, first GTM channel enablement | Essential integrations, performance baselines, CI/CD |
|
|
305
|
+
| P2 | Important | Secondary features, retention improvements, additional GTM channels | Quality improvements, significant refactors, testing gaps, monitoring |
|
|
306
|
+
| P3 | Nice to Have | Polish, upsell features, market expansion preparation | Optimizations, non-critical enhancements, developer experience |
|
|
307
|
+
| P4+ | Future Ideas | Long-term market plays, new segments, platform strategy | Long-term architecture evolution, experimental technology |
|
|
308
|
+
|
|
309
|
+
#### 4d. Within Each Priority Tier
|
|
310
|
+
|
|
311
|
+
1. Order by dependency (both technical and business prerequisites first).
|
|
312
|
+
2. Group related items into epics (2+ related items = epic candidate).
|
|
313
|
+
3. Identify parallel work lanes (independent business and technical tracks that can be worked simultaneously).
|
|
314
|
+
4. Estimate effort for each item/epic.
|
|
315
|
+
5. Map business milestones to the technical items that enable them.
|
|
316
|
+
6. Calibrate to team capacity from Step 1e.
|
|
317
|
+
|
|
318
|
+
#### 4e. Present the Roadmap
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
Roadmap Overview:
|
|
322
|
+
P0: N items (N BIZ, N TECH, N BOTH) — estimated effort: X days
|
|
323
|
+
P1: N items (N BIZ, N TECH, N BOTH) — estimated effort: X days
|
|
324
|
+
P2: N items (N BIZ, N TECH, N BOTH) — estimated effort: X days
|
|
325
|
+
P3: N items (N BIZ, N TECH, N BOTH) — estimated effort: X days
|
|
326
|
+
Future: N items
|
|
327
|
+
|
|
328
|
+
Business Milestones:
|
|
329
|
+
{date/phase}: {milestone} — requires: {items}
|
|
330
|
+
{date/phase}: {milestone} — requires: {items}
|
|
331
|
+
|
|
332
|
+
Technical Milestones:
|
|
333
|
+
{date/phase}: {milestone} — enables: {business items}
|
|
334
|
+
{date/phase}: {milestone} — enables: {business items}
|
|
335
|
+
|
|
336
|
+
Parallel Lanes:
|
|
337
|
+
Lane A (Business): {theme} — P0 items 1-3, P1 items 4-5
|
|
338
|
+
Lane B (Technical): {theme} — P0 items 6-7, P1 items 8-10
|
|
339
|
+
Lane C (Cross-cutting): {theme} — P0 items 11-12
|
|
340
|
+
|
|
341
|
+
Critical Path: item 1 → item 3 → item 5 → item 8
|
|
342
|
+
Business-Critical Path: {biz milestone 1} → {biz milestone 2} → {launch}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**ASK:** "Here is the proposed dual-lens roadmap with business and technical milestones. Review:
|
|
346
|
+
- Are the business milestones and their timelines realistic?
|
|
347
|
+
- Are the technical prerequisites correctly mapped?
|
|
348
|
+
- Adjust priorities, add/remove items, change grouping?
|
|
349
|
+
(confirm / adjust)"
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
### Step 5: Generate todo.md
|
|
354
|
+
|
|
355
|
+
Write `todo.md` in the exact format that `hatch3r-board-fill` expects, with `[BIZ]`/`[TECH]`/`[BOTH]` tags.
|
|
356
|
+
|
|
357
|
+
**Format specification:**
|
|
358
|
+
|
|
359
|
+
```markdown
|
|
360
|
+
## P0 — Critical / Launch Blockers
|
|
361
|
+
|
|
362
|
+
- [ ] **[TECH] {Infrastructure item}**: {Description. Scope: {what's in}. Enables: {business milestone}.} Ref: docs/specs/technical/{spec}.md.
|
|
363
|
+
- [ ] **[BIZ] {Market-driven item}**: {Description. Revenue impact: {impact}. Deadline: {if time-sensitive}.} Ref: docs/specs/business/{spec}.md.
|
|
364
|
+
- [ ] **[BOTH] {Cross-cutting item}**: {Description}. Ref: docs/specs/{spec}.md.
|
|
365
|
+
|
|
366
|
+
## P1 — Core Features
|
|
367
|
+
|
|
368
|
+
- [ ] **[TECH] {Feature title}**: {Description}. Ref: docs/specs/technical/{spec}.md.
|
|
369
|
+
- [ ] **[BIZ] {Business feature}**: {Description. Conversion/retention impact: {impact}.} Ref: docs/specs/business/{spec}.md.
|
|
370
|
+
|
|
371
|
+
## P2 — Important
|
|
372
|
+
|
|
373
|
+
- [ ] **[TECH] {Refactor/improvement title}**: {Description. Velocity impact: {improvement}.} Ref: docs/adr/{adr}.md.
|
|
374
|
+
- [ ] **[BIZ] {Business requirement}**: {Description}. Ref: docs/specs/business/{spec}.md.
|
|
375
|
+
|
|
376
|
+
## P3 — Nice to Have
|
|
377
|
+
|
|
378
|
+
- [ ] **[TECH] {Enhancement title}**: {Description}.
|
|
379
|
+
- [ ] **[BIZ] {Business enhancement}**: {Description}.
|
|
380
|
+
|
|
381
|
+
## Future Ideas
|
|
382
|
+
|
|
383
|
+
- [ ] **[TECH] {Long-term technical item}**: {Description}.
|
|
384
|
+
- [ ] **[BIZ] {Long-term business item}**: {Description}.
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
**Format requirements:**
|
|
388
|
+
|
|
389
|
+
- Each item on one line as `- [ ] **[BIZ/TECH/BOTH] {bold title}**: {description}`.
|
|
390
|
+
- Include `Ref:` with source spec/ADR path when the item was derived from a specific document. Use `docs/specs/business/` or `docs/specs/technical/` paths as appropriate.
|
|
391
|
+
- For business items: include revenue/conversion/retention impact where known.
|
|
392
|
+
- For technical items: include what business milestone they enable where applicable.
|
|
393
|
+
- For time-sensitive items: include deadline or market window.
|
|
394
|
+
- Epic-level items should be substantial enough for board-fill to break into sub-issues.
|
|
395
|
+
- Group by priority tier with `## P{N} — {Label}` headers.
|
|
396
|
+
- Standalone items should be self-contained tasks.
|
|
397
|
+
- Items must be actionable — no vague "improve X" without specific scope.
|
|
398
|
+
|
|
399
|
+
**If `todo.md` already exists:**
|
|
400
|
+
|
|
401
|
+
**ASK:** "todo.md already exists with {N} items. (a) Replace entirely, (b) Append new items, (c) Merge (deduplicate and reorganize)"
|
|
402
|
+
|
|
403
|
+
- For **replace**: overwrite the file entirely.
|
|
404
|
+
- For **append**: add new items under appropriate priority headers, preserving existing content.
|
|
405
|
+
- For **merge**: compare existing items with new ones semantically, deduplicate, and reorganize by priority. Preserve existing `[BIZ]`/`[TECH]`/`[BOTH]` tags if present.
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
### Step 6: Write & Summary
|
|
410
|
+
|
|
411
|
+
1. Write `todo.md` to the project root.
|
|
412
|
+
2. Update `.hatch3r-session.json` with roadmap context (if company stage and business context were gathered fresh in this run):
|
|
413
|
+
|
|
414
|
+
```json
|
|
415
|
+
{
|
|
416
|
+
"timestamp": "{ISO timestamp}",
|
|
417
|
+
"command": "hatch3r-roadmap",
|
|
418
|
+
"companyStage": { ... },
|
|
419
|
+
"businessContext": { ... },
|
|
420
|
+
"scope": "{full / specific parts}",
|
|
421
|
+
"roadmapGoals": { ... }
|
|
422
|
+
}
|
|
423
|
+
```
|
|
424
|
+
3. Present a summary:
|
|
425
|
+
|
|
426
|
+
```
|
|
427
|
+
Roadmap Written: todo.md
|
|
428
|
+
|
|
429
|
+
Total items: N (X epics, Y standalone)
|
|
430
|
+
By scope: BIZ: N, TECH: N, BOTH: N
|
|
431
|
+
By priority: P0: N, P1: N, P2: N, P3: N, Future: N
|
|
432
|
+
Estimated total effort: ~X days
|
|
433
|
+
Recommended parallel lanes: N
|
|
434
|
+
Team capacity: {N} devs × {hours}/week = ~{available days}
|
|
435
|
+
Estimated duration: ~{weeks} weeks at current capacity
|
|
436
|
+
|
|
437
|
+
Business Milestones:
|
|
438
|
+
{milestone 1}: {target date/phase}
|
|
439
|
+
{milestone 2}: {target date/phase}
|
|
440
|
+
|
|
441
|
+
Technical Milestones:
|
|
442
|
+
{milestone 1}: {target date/phase}
|
|
443
|
+
{milestone 2}: {target date/phase}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
### Step 7: AGENTS.md Generation
|
|
449
|
+
|
|
450
|
+
**ASK:** "Generate or update the root-level `AGENTS.md` with a project summary derived from the roadmap and specs? This file serves as the 'README for agents' — consumed by OpenCode, Windsurf, and other AI coding tools so they understand your project's business context, architecture, and conventions from the first interaction.
|
|
451
|
+
|
|
452
|
+
(a) Yes — generate it, (b) No — skip, (c) Let me review the content first."
|
|
453
|
+
|
|
454
|
+
If yes or review-first: generate `AGENTS.md` at the project root containing:
|
|
455
|
+
|
|
456
|
+
```markdown
|
|
457
|
+
# {Project Name} — Agent Instructions
|
|
458
|
+
|
|
459
|
+
> Auto-generated by hatch3r-roadmap on {today's date}. Review and adjust as needed.
|
|
460
|
+
|
|
461
|
+
## Project Purpose
|
|
462
|
+
|
|
463
|
+
{One-paragraph vision/purpose from business overview}
|
|
464
|
+
|
|
465
|
+
## Business Context
|
|
466
|
+
|
|
467
|
+
- **Business model**: {type}
|
|
468
|
+
- **Revenue model**: {model}
|
|
469
|
+
- **Company stage**: {stage}
|
|
470
|
+
- **Target market**: {segments}
|
|
471
|
+
- **Key metrics**: {KPIs}
|
|
472
|
+
|
|
473
|
+
## Technology Stack
|
|
474
|
+
|
|
475
|
+
{Concise stack summary — languages, frameworks, databases, infrastructure}
|
|
476
|
+
|
|
477
|
+
## Architecture Overview
|
|
478
|
+
|
|
479
|
+
{Architecture style, key components, deployment topology — 3-5 sentences}
|
|
480
|
+
|
|
481
|
+
## Module Map
|
|
482
|
+
|
|
483
|
+
| Module | Purpose |
|
|
484
|
+
| ------ | ------- |
|
|
485
|
+
| {module} | {one-line description} |
|
|
486
|
+
|
|
487
|
+
## Key Business Rules & Domain Constraints
|
|
488
|
+
|
|
489
|
+
{Top 5-10 business rules that agents must respect when making changes}
|
|
490
|
+
|
|
491
|
+
- {rule}: {constraint}
|
|
492
|
+
|
|
493
|
+
## Conventions
|
|
494
|
+
|
|
495
|
+
{Key coding conventions agents should follow — naming, patterns, testing}
|
|
496
|
+
|
|
497
|
+
## Current Roadmap Focus
|
|
498
|
+
|
|
499
|
+
{What the team is currently working on — P0/P1 items from the roadmap}
|
|
500
|
+
|
|
501
|
+
- **Current phase**: {description}
|
|
502
|
+
- **Key milestones**: {next 2-3 milestones}
|
|
503
|
+
|
|
504
|
+
## Documentation Reference
|
|
505
|
+
|
|
506
|
+
- Business specs: `docs/specs/business/`
|
|
507
|
+
- Technical specs: `docs/specs/technical/`
|
|
508
|
+
- Architecture decisions: `docs/adr/`
|
|
509
|
+
- Roadmap: `todo.md`
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
If the user chose "review first," present the content and **ASK** for confirmation before writing.
|
|
513
|
+
|
|
514
|
+
If `AGENTS.md` already exists, **ASK** before overwriting: "Root `AGENTS.md` already exists. (a) Replace entirely, (b) Append hatch3r section, (c) Skip."
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
### Step 8: Cross-Command Handoff
|
|
519
|
+
|
|
520
|
+
**ASK:** "Roadmap complete. Recommended next steps:
|
|
521
|
+
- Run `hatch3r-board-fill` to create GitHub issues from the todo.md
|
|
522
|
+
- Run `hatch3r-board-pickup` to start working on the highest-priority items
|
|
523
|
+
|
|
524
|
+
Which would you like to run next? (or none)"
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
## Error Handling
|
|
529
|
+
|
|
530
|
+
- **No specs or docs found:** Fall back to user-provided vision. Warn that the roadmap will be less detailed without structured specs. Offer to run `hatch3r-project-spec` or `hatch3r-codebase-map` first.
|
|
531
|
+
- **Existing todo.md conflict:** Always ASK before modifying — never overwrite silently.
|
|
532
|
+
- **Very large scope (>50 items):** Suggest splitting into phases or focus areas. Present only the first phase in detail and summarize the rest.
|
|
533
|
+
- **GitHub issue fetch failure:** Proceed without deduplication check. Warn user that duplicates may exist.
|
|
534
|
+
- **Ambiguous priority:** Default to P2. Flag for user review in Step 4.
|
|
535
|
+
- **Sub-agent failure:** Retry the failed researcher once. If it fails again, proceed with the other researcher's output and note the gap. ASK the user whether to continue with partial research.
|
|
536
|
+
- **Business context gaps:** If the user cannot answer business discovery questions, proceed with "TBD" markers and flag these items as needing business input before implementation.
|
|
537
|
+
- **Stage assessment unclear:** Default to "early-revenue" if the user is unsure. This provides balanced prioritization without over- or under-engineering the roadmap.
|
|
538
|
+
- **No business specs found:** If only technical specs exist (legacy layout), generate a technical-only roadmap and recommend running `hatch3r-project-spec` or `hatch3r-codebase-map` to create business specs.
|
|
539
|
+
|
|
540
|
+
## Guardrails
|
|
541
|
+
|
|
542
|
+
- **Never skip ASK checkpoints.** Every step with an ASK must pause for user confirmation.
|
|
543
|
+
- **When in doubt, ASK.** It is better to ask one question too many than to make one wrong assumption. Discovery questions are never wasted.
|
|
544
|
+
- **Never write files without user review and confirmation.** All generated content is presented first.
|
|
545
|
+
- **Never overwrite todo.md without explicit user confirmation.**
|
|
546
|
+
- **todo.md format must be compatible with board-fill** — markdown checklist with bold titles, priority headers matching `## P{N} — {Label}`, items tagged with `[BIZ]`/`[TECH]`/`[BOTH]`.
|
|
547
|
+
- **Keep items at the right granularity** — epic-level for complex features (XL effort), standalone for simple tasks (S/M effort).
|
|
548
|
+
- **Always reference source documentation** (specs, ADRs) where items were derived from. Use `docs/specs/business/` or `docs/specs/technical/` paths as appropriate.
|
|
549
|
+
- **Do not duplicate work already tracked in GitHub issues.**
|
|
550
|
+
- **Effort estimates are rough and clearly labeled as estimates.**
|
|
551
|
+
- **Respect existing priority conventions in the project.**
|
|
552
|
+
- **Stage-adaptive prioritization.** Never recommend enterprise-grade solutions for pre-revenue startups. Never recommend MVP shortcuts for scale/enterprise companies. Calibrate all prioritization to the company stage from Step 1d.
|
|
553
|
+
- **Business milestones must map to technical enablers.** Every business milestone should have its technical prerequisites identified and scheduled ahead of it.
|
|
554
|
+
- **Technical items must justify business impact.** Every technical item (refactor, debt paydown, infrastructure) should state what business outcome it enables or unblocks.
|
|
555
|
+
- **Never overwrite `AGENTS.md`** without explicit user confirmation.
|
|
556
|
+
- **Sub-agents must not create files.** They return structured text results to the orchestrator. Only the orchestrator writes files.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-rule-customize
|
|
3
|
+
type: command
|
|
4
|
+
description: Configure per-rule customization including scope overrides, description changes, enable/disable control, and project-specific markdown instructions
|
|
5
|
+
---
|
|
6
|
+
# Rule Customization — Per-Rule Configuration
|
|
7
|
+
|
|
8
|
+
Customize individual rule behavior for project-specific needs via `.hatch3r/rules/` configuration files. Supports structured YAML overrides (including scope changes) and free-form markdown instruction injection, all propagated to every adapter output on sync.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Customization File Locations
|
|
13
|
+
|
|
14
|
+
Each rule supports two optional customization files:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
.hatch3r/rules/{rule-id}.customize.yaml # structured overrides
|
|
18
|
+
.hatch3r/rules/{rule-id}.customize.md # free-form markdown instructions
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Both files are optional and can be used independently or together.
|
|
22
|
+
|
|
23
|
+
## YAML Customization Schema
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
rule: hatch3r-testing
|
|
27
|
+
scope: "src/**/*.ts,src/**/*.tsx"
|
|
28
|
+
description: "Testing rules with project-specific coverage requirements"
|
|
29
|
+
enabled: true
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Fields
|
|
33
|
+
|
|
34
|
+
| Field | Type | Default | Description |
|
|
35
|
+
|-------|------|---------|-------------|
|
|
36
|
+
| `scope` | string | (from canonical) | Override when the rule applies. Use `always` for all files, or glob patterns (e.g., `src/**/*.ts`) |
|
|
37
|
+
| `description` | string | (from canonical) | Override the rule's description in adapter frontmatter |
|
|
38
|
+
| `enabled` | boolean | `true` | Set to `false` to exclude this rule from adapter output generation |
|
|
39
|
+
|
|
40
|
+
### Scope Override Examples
|
|
41
|
+
|
|
42
|
+
| Canonical Scope | Override | Effect |
|
|
43
|
+
|----------------|----------|--------|
|
|
44
|
+
| `always` | `src/**/*.ts` | Narrows rule from global to TypeScript files only |
|
|
45
|
+
| `src/**` | `always` | Broadens rule to apply to all files |
|
|
46
|
+
| `*.tsx` | `src/components/**/*.tsx` | Restricts to component files specifically |
|
|
47
|
+
|
|
48
|
+
## Markdown Customization
|
|
49
|
+
|
|
50
|
+
Create `.hatch3r/rules/{rule-id}.customize.md` with free-form markdown to inject project-specific rules into the rule's managed block. This content is appended after the canonical rule content under a `## Project Customizations` header.
|
|
51
|
+
|
|
52
|
+
### Example
|
|
53
|
+
|
|
54
|
+
**File:** `.hatch3r/rules/hatch3r-testing.customize.md`
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## Project-Specific Testing Requirements
|
|
58
|
+
|
|
59
|
+
### Coverage Targets
|
|
60
|
+
|
|
61
|
+
- Overall: 85% line coverage minimum
|
|
62
|
+
- Critical paths (payments, auth): 95% branch coverage
|
|
63
|
+
- New code: must not decrease overall coverage
|
|
64
|
+
|
|
65
|
+
### Test Framework
|
|
66
|
+
|
|
67
|
+
- Use Vitest for unit and integration tests
|
|
68
|
+
- Use Playwright for E2E tests
|
|
69
|
+
- Mock external services using MSW (Mock Service Worker)
|
|
70
|
+
|
|
71
|
+
### Database Tests
|
|
72
|
+
|
|
73
|
+
All tests touching the database must:
|
|
74
|
+
1. Use a dedicated test database (not dev or staging)
|
|
75
|
+
2. Run migrations before the test suite
|
|
76
|
+
3. Clean up test data after each test
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### How It Works
|
|
80
|
+
|
|
81
|
+
1. During `hatch3r sync`, adapters read the `.customize.md` file
|
|
82
|
+
2. The markdown content is appended inside the managed block, after the canonical rule content
|
|
83
|
+
3. All adapter outputs receive the customization automatically
|
|
84
|
+
4. Changes propagate on every sync
|
|
85
|
+
|
|
86
|
+
## Disabling a Rule
|
|
87
|
+
|
|
88
|
+
To exclude a rule from adapter output without deleting its canonical file:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
# .hatch3r/rules/hatch3r-i18n.customize.yaml
|
|
92
|
+
enabled: false
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The rule's canonical definition remains in `.agents/rules/` but no adapter output is generated for it.
|
|
96
|
+
|
|
97
|
+
## Workflow
|
|
98
|
+
|
|
99
|
+
1. Identify which rule to customize
|
|
100
|
+
2. Create `.hatch3r/rules/{rule-id}.customize.yaml` and/or `.customize.md`
|
|
101
|
+
3. Run `npx hatch3r sync` to propagate changes to all adapter outputs
|
|
102
|
+
4. Verify the customization appears in the tool-specific rule files
|
|
103
|
+
|
|
104
|
+
## Guardrails
|
|
105
|
+
|
|
106
|
+
- Scope overrides cannot weaken security-related rules (broadening scope is allowed, removing is not)
|
|
107
|
+
- Invalid YAML produces warnings but does not prevent rule application (graceful degradation)
|
|
108
|
+
- Customization files should be committed to the repository
|
|
109
|
+
|
|
110
|
+
## Related
|
|
111
|
+
|
|
112
|
+
- Agent customization: `hatch3r-agent-customize` command
|
|
113
|
+
- Skill customization: `hatch3r-skill-customize` command
|
|
114
|
+
- Command customization: `hatch3r-command-customize` command
|