@donotdev/cli 0.0.8 → 0.0.11
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/dependencies-matrix.json +177 -76
- package/dist/bin/commands/build.js +2 -2
- package/dist/bin/commands/bump.js +578 -94
- package/dist/bin/commands/cacheout.js +2 -2
- package/dist/bin/commands/create-app.js +46 -9
- package/dist/bin/commands/create-project.js +63 -10
- package/dist/bin/commands/deploy.js +114 -25
- package/dist/bin/commands/dev.js +2 -2
- package/dist/bin/commands/emu.js +2 -2
- package/dist/bin/commands/format.js +2 -2
- package/dist/bin/commands/lint.js +2 -2
- package/dist/bin/commands/preview.js +2 -2
- package/dist/bin/commands/sync-secrets.js +2 -2
- package/dist/bin/dndev.js +7 -4
- package/dist/bin/donotdev.js +7 -4
- package/dist/index.js +177 -33
- package/package.json +5 -4
- package/templates/app-next/src/config/app.ts.example +1 -1
- package/templates/app-vite/index.html.example +24 -2
- package/templates/app-vite/src/config/app.ts.example +1 -1
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +8 -5
- package/templates/app-vite/src/pages/ListPageExample.tsx.example +4 -7
- package/templates/root-consumer/.claude/agents/architect.md.example +313 -0
- package/templates/root-consumer/.claude/agents/builder.md.example +329 -0
- package/templates/root-consumer/.claude/agents/coder.md.example +87 -0
- package/templates/root-consumer/.claude/agents/extractor.md.example +235 -0
- package/templates/root-consumer/.claude/agents/polisher.md.example +359 -0
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +85 -0
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +133 -0
- package/templates/root-consumer/.claude/commands/build.md.example +109 -0
- package/templates/root-consumer/.claude/commands/design.md.example +136 -0
- package/templates/root-consumer/.claude/commands/polish.md.example +145 -0
- package/templates/root-consumer/.cursor/mcp.json.example +8 -0
- package/templates/root-consumer/.firebaserc.example +5 -0
- package/templates/root-consumer/.mcp.json.example +8 -0
- package/templates/root-consumer/CLAUDE.md.example +146 -0
- package/templates/root-consumer/entities/ExampleEntity.ts.example +2 -1
- package/templates/root-consumer/entities/demo.ts.example +1 -1
- package/templates/root-consumer/firestore.indexes.json.example +4 -0
- package/templates/root-consumer/firestore.rules.example +11 -0
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +15 -12
- package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +9 -6
- package/templates/root-consumer/guides/dndev/COMPONENT_API.md.example +195 -0
- package/templates/root-consumer/guides/dndev/INDEX.md.example +3 -1
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +485 -57
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +1 -1
- package/templates/root-consumer/storage.rules.example +8 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Prepare perfect coding prompt with all constraints and patterns
|
|
3
|
+
model: claude-sonnet-4.5
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prompt Engineer Agent
|
|
7
|
+
|
|
8
|
+
**ROLE:** Product Owner + Architect → Perfect Coding Prompt
|
|
9
|
+
|
|
10
|
+
**INPUT:** User requirement (what they want built)
|
|
11
|
+
|
|
12
|
+
**OUTPUT:** Complete, constraint-rich prompt for Coder Agent
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. **Analyze requirement**
|
|
17
|
+
- What needs to be built?
|
|
18
|
+
- Consumer app context
|
|
19
|
+
- What entities/components involved?
|
|
20
|
+
|
|
21
|
+
2. **Gather constraints**
|
|
22
|
+
- Read `CLAUDE.md` for project rules
|
|
23
|
+
- Check MCP for component APIs (`lookup_component`)
|
|
24
|
+
- Search codebase for existing patterns
|
|
25
|
+
- Identify framework utilities to use
|
|
26
|
+
|
|
27
|
+
3. **Build perfect prompt**
|
|
28
|
+
|
|
29
|
+
**Template:**
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
TASK: [Clear task description]
|
|
33
|
+
|
|
34
|
+
CONTEXT:
|
|
35
|
+
- Mode: consumer-app
|
|
36
|
+
- Files: [list affected files]
|
|
37
|
+
- Entities: [list entities involved]
|
|
38
|
+
|
|
39
|
+
CONSTRAINTS:
|
|
40
|
+
- Use native components ONLY (no custom props/styling)
|
|
41
|
+
- Component: [use MCP lookup_component result]
|
|
42
|
+
- Utilities: [formatValue, formatDate, etc. - from @donotdev packages]
|
|
43
|
+
- Patterns: [reference existing similar code]
|
|
44
|
+
- NO inline styles → use className/utilities
|
|
45
|
+
- NO date formatting → use formatDate() from @donotdev/core
|
|
46
|
+
- NO field display → use formatValue() from @donotdev/crud
|
|
47
|
+
- Import order: React → vendors → @donotdev → relative
|
|
48
|
+
|
|
49
|
+
EXISTING PATTERNS:
|
|
50
|
+
[Link to similar code that should be followed]
|
|
51
|
+
|
|
52
|
+
MCP LOOKUPS REQUIRED:
|
|
53
|
+
- lookup_component({ component: "X" })
|
|
54
|
+
- lookup_component({ component: "Y" })
|
|
55
|
+
|
|
56
|
+
VALIDATION CHECKLIST:
|
|
57
|
+
- [ ] No inline styles
|
|
58
|
+
- [ ] Uses framework utilities
|
|
59
|
+
- [ ] Follows existing patterns
|
|
60
|
+
- [ ] Component props from MCP lookup
|
|
61
|
+
- [ ] Import order correct
|
|
62
|
+
|
|
63
|
+
PHASES:
|
|
64
|
+
1. Make it work (native, no styling)
|
|
65
|
+
2. Add translations (i18n)
|
|
66
|
+
3. Pixel-perfect UI (if needed)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
4. **Output format**
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
PROMPT FOR CODER:
|
|
73
|
+
|
|
74
|
+
[Complete prompt above]
|
|
75
|
+
|
|
76
|
+
READY FOR CODING.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- **NEVER write code** - only prepare prompts
|
|
82
|
+
- **ALWAYS check MCP** for component APIs
|
|
83
|
+
- **ALWAYS search codebase** for existing patterns
|
|
84
|
+
- **ALWAYS reference framework utilities** instead of reinventing
|
|
85
|
+
- **ALWAYS include validation checklist**
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Extract requirements and generate complete HLD through conversation (BMAD EXTRACTOR)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Brainstorm Command - Requirements Extraction
|
|
6
|
+
|
|
7
|
+
**⚠️ MODE CHECK:** This command is for **Consumer App Development** only.
|
|
8
|
+
|
|
9
|
+
**If you're in the framework monorepo (`c:\ws\dndev`):**
|
|
10
|
+
- ❌ **DO NOT use `/brainstorm`** - framework dev doesn't need requirements extraction
|
|
11
|
+
- ✅ See [Modes Guide](https://github.com/donotdev/framework/blob/main/docs/development/MODES.md) for framework dev workflow
|
|
12
|
+
|
|
13
|
+
**If you're in a consumer repo:**
|
|
14
|
+
- ✅ Use `/brainstorm` to extract requirements and generate HLD
|
|
15
|
+
- ✅ Use `/design` after HLD is validated
|
|
16
|
+
- ✅ Use `/build` after LLD is validated
|
|
17
|
+
- ✅ Use `/polish` after app is functional
|
|
18
|
+
|
|
19
|
+
**WORKFLOW ORDER:**
|
|
20
|
+
1. `/brainstorm` → Extract requirements, generate HLD (THIS COMMAND)
|
|
21
|
+
2. `/design` → Create technical plan (LLD)
|
|
22
|
+
3. `/build` → Implement code using framework defaults
|
|
23
|
+
4. `/polish` → Add styling, customization, i18n
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
/brainstorm [app idea or requirement]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Examples:**
|
|
34
|
+
```
|
|
35
|
+
/brainstorm I want to build a car dealership management app
|
|
36
|
+
/brainstorm Create a task management app for teams
|
|
37
|
+
/brainstorm Build a portfolio website for a photographer
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Process
|
|
43
|
+
|
|
44
|
+
### Step 1: Activate EXTRACTOR Agent
|
|
45
|
+
|
|
46
|
+
**Deploy:** `/agents extractor` (BMAD EXTRACTOR persona)
|
|
47
|
+
|
|
48
|
+
**Input:** User's app idea (any level of clarity)
|
|
49
|
+
|
|
50
|
+
**Actions:**
|
|
51
|
+
1. EXTRACTOR asks probing questions (one at a time)
|
|
52
|
+
2. EXTRACTOR uses MCP to discover framework capabilities
|
|
53
|
+
3. EXTRACTOR identifies native vs custom components
|
|
54
|
+
4. EXTRACTOR tracks progress and identifies gaps
|
|
55
|
+
5. EXTRACTOR generates complete HLD when all targets extracted
|
|
56
|
+
|
|
57
|
+
**Output:** Complete HLD document (`HLD.md`)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## What EXTRACTOR Extracts
|
|
62
|
+
|
|
63
|
+
| Category | What EXTRACTOR Asks |
|
|
64
|
+
|----------|---------------------|
|
|
65
|
+
| **Vision** | What is this app? Who uses it? |
|
|
66
|
+
| **Users** | What roles exist? What can each role do? |
|
|
67
|
+
| **Entities** | What "things" exist? What fields? How do they relate? |
|
|
68
|
+
| **Features** | What can users DO? MVP vs V2? |
|
|
69
|
+
| **Pages** | What screens exist? Routes? Access levels? |
|
|
70
|
+
| **Constraints** | Platform? Languages? Auth? Integrations? |
|
|
71
|
+
| **Native vs Custom** | What uses framework defaults? What needs custom? |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Output Format
|
|
76
|
+
|
|
77
|
+
EXTRACTOR generates `HLD.md` with:
|
|
78
|
+
|
|
79
|
+
- **Vision** - One sentence description
|
|
80
|
+
- **Users** - Roles and permissions table
|
|
81
|
+
- **Entities** - All entities with fields, types, visibility, validation
|
|
82
|
+
- **Features** - MVP vs V2 categorization
|
|
83
|
+
- **Pages** - Routes, access levels, components
|
|
84
|
+
- **Constraints** - Platform, languages, auth, integrations
|
|
85
|
+
- **Native vs Custom** - Framework-native vs custom components
|
|
86
|
+
- **Open Questions** - Unresolved items
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Validation Gate
|
|
91
|
+
|
|
92
|
+
**Before proceeding to `/design`:**
|
|
93
|
+
- [ ] HLD is complete (no empty sections or TBDs)
|
|
94
|
+
- [ ] All user journeys mapped (numbered steps)
|
|
95
|
+
- [ ] All entities have fields, states, permissions
|
|
96
|
+
- [ ] All business rules documented
|
|
97
|
+
- [ ] Native vs custom analysis complete
|
|
98
|
+
- [ ] User has validated HLD
|
|
99
|
+
|
|
100
|
+
**Quality Over Speed:** Take as long as needed. A complete HLD that takes 4 hours is better than an incomplete one that takes 20 minutes.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Rules
|
|
105
|
+
|
|
106
|
+
- **EXTRACTOR asks one question at a time** - Wait for answer before next question
|
|
107
|
+
- **EXTRACTOR probes vague answers** - "What does 'manage' mean?"
|
|
108
|
+
- **EXTRACTOR challenges scope** - "What's the minimum to launch?"
|
|
109
|
+
- **EXTRACTOR summarizes progress** - Every 3-4 exchanges
|
|
110
|
+
- **EXTRACTOR asks when uncertain** - Never guesses
|
|
111
|
+
- **EXTRACTOR stops when complete** - Generates HLD only when all targets extracted
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Integration with WAI-WAY
|
|
116
|
+
|
|
117
|
+
- Uses **BMAD EXTRACTOR** persona (proven, battle-tested)
|
|
118
|
+
- Follows WAI-WAY Phase 0 (BRAINSTORM → SPEC)
|
|
119
|
+
- Output feeds into `/design` command (BMAD PRINTER/Architect)
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Requirements
|
|
124
|
+
|
|
125
|
+
- MCP server configured (`.mcp.json` or `.cursor/mcp.json`) - for framework discovery
|
|
126
|
+
- User available for conversation (requirements extraction is interactive)
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Next Step
|
|
131
|
+
|
|
132
|
+
Once HLD is validated:
|
|
133
|
+
→ Use `/design` to create technical plan (LLD)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Two-agent workflow: Prompt Engineer → Coder (AFTER /design)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Build Command - Two-Agent Workflow
|
|
6
|
+
|
|
7
|
+
**⚠️ MODE CHECK:** This command is for **Consumer App Development** only.
|
|
8
|
+
|
|
9
|
+
**If you're in the framework monorepo (`c:\ws\dndev`):**
|
|
10
|
+
- ❌ **DO NOT use `/build`** - code directly in `packages/*/src/`
|
|
11
|
+
- ✅ Use direct coding following Architecture Hub patterns
|
|
12
|
+
- ✅ See [Modes Guide](https://github.com/donotdev/framework/blob/main/docs/development/MODES.md) for framework dev workflow
|
|
13
|
+
|
|
14
|
+
**If you're in a consumer repo:**
|
|
15
|
+
- ✅ Use `/build` to implement features
|
|
16
|
+
- ✅ Use `/design` first for architecture decisions
|
|
17
|
+
|
|
18
|
+
**WORKFLOW ORDER:**
|
|
19
|
+
1. `/brainstorm` → Extract requirements, generate HLD
|
|
20
|
+
2. `/design` → Create technical plan (LLD)
|
|
21
|
+
3. `/build` → Implement code using framework defaults (THIS COMMAND)
|
|
22
|
+
4. `/polish` → Add styling, customization, i18n
|
|
23
|
+
|
|
24
|
+
**If no LLD exists, Builder will create on-the-fly, but `/design` first is recommended.**
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/build [requirement]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Example:**
|
|
33
|
+
```
|
|
34
|
+
/build Create customer detail page with inquiry list
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Process
|
|
38
|
+
|
|
39
|
+
### Step 1: Activate FORGER Agent
|
|
40
|
+
|
|
41
|
+
**Deploy:** `/agents builder` (BMAD FORGER persona)
|
|
42
|
+
|
|
43
|
+
**Input:** LLD from `/design` command OR user requirement
|
|
44
|
+
|
|
45
|
+
**Actions:**
|
|
46
|
+
1. Read LLD (or create on-the-fly if no LLD exists)
|
|
47
|
+
2. Use MCP `lookup_component` for ALL components used
|
|
48
|
+
3. Build in phases:
|
|
49
|
+
- Phase 1: Entities (create entity files)
|
|
50
|
+
- Phase 2: Routes (create route config)
|
|
51
|
+
- Phase 3: Auth (if needed)
|
|
52
|
+
- Phase 4: Native Pages (using framework defaults)
|
|
53
|
+
- Phase 5: Custom Components (if any)
|
|
54
|
+
- Phase 6: Integration (wire everything together)
|
|
55
|
+
4. Use framework defaults ONLY (no styling, no customization)
|
|
56
|
+
5. Hardcode all strings (no i18n yet)
|
|
57
|
+
6. Validate each phase before proceeding
|
|
58
|
+
|
|
59
|
+
**Output:** Working app (functional MVP, no styling)
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Alternative: Two-Agent Workflow
|
|
64
|
+
|
|
65
|
+
For complex builds, you can use:
|
|
66
|
+
|
|
67
|
+
**Step 1: Prompt Engineer**
|
|
68
|
+
- Deploy `/agents prompt-engineer`
|
|
69
|
+
- Prepares detailed prompt with all constraints
|
|
70
|
+
|
|
71
|
+
**Step 2: Coder**
|
|
72
|
+
- Deploy `/agents coder`
|
|
73
|
+
- Executes prompt following constraints
|
|
74
|
+
|
|
75
|
+
**Note:** BMAD FORGER (builder) is recommended for most cases as it's proven and battle-tested.
|
|
76
|
+
|
|
77
|
+
## Rules
|
|
78
|
+
|
|
79
|
+
- **Builder (FORGER):** Implements exactly what's in LLD, uses framework defaults only
|
|
80
|
+
- **Framework defaults ONLY:** No styling, no customization (deferred to /polish)
|
|
81
|
+
- **Hardcode strings:** No i18n yet (deferred to /polish)
|
|
82
|
+
- **MCP required:** Use lookup_component for ALL components
|
|
83
|
+
- **Phase by phase:** Complete each phase before proceeding
|
|
84
|
+
- **User:** Reviews output, proceeds to /polish when functional
|
|
85
|
+
|
|
86
|
+
## Mode Detection
|
|
87
|
+
|
|
88
|
+
**CRITICAL:** Check working mode first.
|
|
89
|
+
|
|
90
|
+
**Framework dev indicators:**
|
|
91
|
+
- `packages/` directory exists
|
|
92
|
+
- `CLAUDE.md` says "Framework Development Mode"
|
|
93
|
+
- Using `dn` CLI
|
|
94
|
+
|
|
95
|
+
**Consumer app indicators:**
|
|
96
|
+
- `apps/` or `src/` directory exists
|
|
97
|
+
- `CLAUDE.md` says "Consumer App Development Mode"
|
|
98
|
+
- Using `dndev` CLI
|
|
99
|
+
|
|
100
|
+
**If framework dev detected:**
|
|
101
|
+
- STOP and inform user: "`/build` is for consumer apps. In framework dev, code directly in `packages/*/src/`"
|
|
102
|
+
|
|
103
|
+
**If consumer app detected:**
|
|
104
|
+
- Use ONLY published `@donotdev/*` packages (no internals)
|
|
105
|
+
|
|
106
|
+
## Requirements
|
|
107
|
+
|
|
108
|
+
- MCP server configured (`.mcp.json` or `.cursor/mcp.json`)
|
|
109
|
+
- `@donotdev/mcp-server` available (via `bunx` or installed)
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Design workflow: Architect → Design Document (BEFORE /build)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Design Command - Architecture & Design Workflow
|
|
6
|
+
|
|
7
|
+
**⚠️ MODE CHECK:** This command is for **Consumer App Development** only.
|
|
8
|
+
|
|
9
|
+
**If you're in the framework monorepo (`c:\ws\dndev`):**
|
|
10
|
+
- ❌ **DO NOT use `/design`** - design directly, then code in `packages/*/src/`
|
|
11
|
+
- ✅ Use Architecture Hub + Development Hub for framework design patterns
|
|
12
|
+
- ✅ See [Modes Guide](https://github.com/donotdev/framework/blob/main/docs/development/MODES.md) for framework dev workflow
|
|
13
|
+
|
|
14
|
+
**If you're in a consumer repo:**
|
|
15
|
+
- ✅ Use `/design` for architecture decisions
|
|
16
|
+
- ✅ Use `/build` to implement the design
|
|
17
|
+
|
|
18
|
+
**WORKFLOW ORDER:**
|
|
19
|
+
1. `/design` → Architect designs solution (THIS COMMAND)
|
|
20
|
+
2. `/build` → Prompt Engineer + Coder implement design
|
|
21
|
+
|
|
22
|
+
**Design comes BEFORE build. Design the solution, then build it.**
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/design [requirement or question]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Examples:**
|
|
31
|
+
```
|
|
32
|
+
/design How should we handle documentation updates in dndev bump?
|
|
33
|
+
/design Add documentation update step to bump command
|
|
34
|
+
/design Status translation fallback chain architecture
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Process
|
|
38
|
+
|
|
39
|
+
### Step 1: Architect Phase
|
|
40
|
+
|
|
41
|
+
**Deploy:** `/agents architect` (WAI-WAY architect role)
|
|
42
|
+
|
|
43
|
+
**Input:** User requirement or design question
|
|
44
|
+
|
|
45
|
+
**Actions:**
|
|
46
|
+
1. Analyze requirement/question
|
|
47
|
+
2. Read constraints from:
|
|
48
|
+
- `CLAUDE.md` (project rules)
|
|
49
|
+
- Framework architecture docs (`docs/architecture/`)
|
|
50
|
+
- Existing patterns in codebase
|
|
51
|
+
- WAI-WAY entity patterns (if applicable)
|
|
52
|
+
3. Research similar solutions (codebase search, online if needed)
|
|
53
|
+
4. Design solution with:
|
|
54
|
+
- Architecture overview
|
|
55
|
+
- Trade-offs analysis
|
|
56
|
+
- Implementation approach
|
|
57
|
+
- File locations and changes needed
|
|
58
|
+
- Dependencies and impacts
|
|
59
|
+
- Validation criteria
|
|
60
|
+
|
|
61
|
+
**Output:** Complete design document ready for `/build`
|
|
62
|
+
|
|
63
|
+
## Output Format
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
DESIGN DOCUMENT:
|
|
67
|
+
|
|
68
|
+
REQUIREMENT:
|
|
69
|
+
[Clear statement of what needs to be designed]
|
|
70
|
+
|
|
71
|
+
ANALYSIS:
|
|
72
|
+
- Current state: [what exists]
|
|
73
|
+
- Problem: [what needs solving]
|
|
74
|
+
- Constraints: [framework rules, patterns, etc.]
|
|
75
|
+
|
|
76
|
+
DESIGN:
|
|
77
|
+
[Architecture/solution design]
|
|
78
|
+
|
|
79
|
+
TRADE-OFFS:
|
|
80
|
+
- Option A: [pros/cons]
|
|
81
|
+
- Option B: [pros/cons]
|
|
82
|
+
- Recommendation: [which and why]
|
|
83
|
+
|
|
84
|
+
IMPLEMENTATION PLAN:
|
|
85
|
+
- Files to create/modify: [list]
|
|
86
|
+
- Changes needed: [detailed breakdown]
|
|
87
|
+
- Dependencies: [what depends on this]
|
|
88
|
+
- Testing: [how to validate]
|
|
89
|
+
|
|
90
|
+
READY FOR /build:
|
|
91
|
+
[Summary of what will be built]
|
|
92
|
+
|
|
93
|
+
UNRESOLVED:
|
|
94
|
+
- [Any open questions]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Rules
|
|
98
|
+
|
|
99
|
+
- **NEVER write code** - only design and plan
|
|
100
|
+
- **ALWAYS analyze existing patterns** - don't reinvent
|
|
101
|
+
- **ALWAYS consider trade-offs** - no solution is perfect
|
|
102
|
+
- **ALWAYS reference framework architecture** - stay aligned
|
|
103
|
+
- **ALWAYS identify impacts** - what breaks if we change this?
|
|
104
|
+
- **ALWAYS prepare for /build** - design should be actionable
|
|
105
|
+
|
|
106
|
+
## Integration with WAI-WAY & BMAD
|
|
107
|
+
|
|
108
|
+
- Uses **BMAD PRINTER** persona (proven, battle-tested)
|
|
109
|
+
- Follows WAI-WAY Phase 2 (ENTITIES) + Architecture
|
|
110
|
+
- Output feeds into `/build` command (BMAD FORGER/Builder)
|
|
111
|
+
|
|
112
|
+
## Mode Detection
|
|
113
|
+
|
|
114
|
+
**CRITICAL:** Check working mode first.
|
|
115
|
+
|
|
116
|
+
**Framework dev indicators:**
|
|
117
|
+
- `packages/` directory exists
|
|
118
|
+
- `CLAUDE.md` says "Framework Development Mode"
|
|
119
|
+
- Using `dn` CLI
|
|
120
|
+
|
|
121
|
+
**Consumer app indicators:**
|
|
122
|
+
- `apps/` or `src/` directory exists
|
|
123
|
+
- `CLAUDE.md` says "Consumer App Development Mode"
|
|
124
|
+
- Using `dndev` CLI
|
|
125
|
+
|
|
126
|
+
**If framework dev detected:**
|
|
127
|
+
- STOP and inform user: "`/design` is for consumer apps. In framework dev, design directly using Architecture Hub patterns, then code in `packages/*/src/`"
|
|
128
|
+
|
|
129
|
+
**If consumer app detected:**
|
|
130
|
+
- Use ONLY published `@donotdev/*` packages
|
|
131
|
+
- Cannot reference internal framework patterns
|
|
132
|
+
|
|
133
|
+
## Requirements
|
|
134
|
+
|
|
135
|
+
- MCP server configured (`.mcp.json` or `.cursor/mcp.json`) - for component/package lookups
|
|
136
|
+
- Architecture docs available (for framework context)
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fix bugs, add styling, customization, i18n (BMAD FINISHER) - AFTER /build
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Polish Command - Production-Ready App
|
|
6
|
+
|
|
7
|
+
**⚠️ MODE CHECK:** This command is for **Consumer App Development** only.
|
|
8
|
+
|
|
9
|
+
**If you're in the framework monorepo (`c:\ws\dndev`):**
|
|
10
|
+
- ❌ **DO NOT use `/polish`** - framework dev doesn't use this workflow
|
|
11
|
+
- ✅ See [Modes Guide](https://github.com/donotdev/framework/blob/main/docs/development/MODES.md) for framework dev workflow
|
|
12
|
+
|
|
13
|
+
**If you're in a consumer repo:**
|
|
14
|
+
- ✅ Use `/polish` after `/build` is complete
|
|
15
|
+
- ✅ Use `/polish` to fix bugs, add styling, add i18n
|
|
16
|
+
- ✅ Use `/polish` to finalize configuration
|
|
17
|
+
|
|
18
|
+
**WORKFLOW ORDER:**
|
|
19
|
+
1. `/brainstorm` → Extract requirements, generate HLD
|
|
20
|
+
2. `/design` → Create technical plan (LLD)
|
|
21
|
+
3. `/build` → Implement code using framework defaults
|
|
22
|
+
4. `/polish` → Add styling, customization, i18n (THIS COMMAND)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/polish [bugs, styling requirements, or i18n needs]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Examples:**
|
|
33
|
+
```
|
|
34
|
+
/polish Fix bug: Projects list is empty
|
|
35
|
+
/polish Add styling to match brand guidelines
|
|
36
|
+
/polish Add French and Spanish translations
|
|
37
|
+
/polish Complete configuration and test everything
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Process
|
|
43
|
+
|
|
44
|
+
### Step 1: Activate FINISHER Agent
|
|
45
|
+
|
|
46
|
+
**Deploy:** `/agents polisher` (BMAD FINISHER persona)
|
|
47
|
+
|
|
48
|
+
**Input:**
|
|
49
|
+
- Working app from `/build`
|
|
50
|
+
- Bug reports (if any)
|
|
51
|
+
- Styling/customization requirements
|
|
52
|
+
- i18n requirements
|
|
53
|
+
|
|
54
|
+
**Actions:**
|
|
55
|
+
1. **Fix Bugs** (if any):
|
|
56
|
+
- Understand bug report
|
|
57
|
+
- Diagnose root cause
|
|
58
|
+
- Provide minimal fix
|
|
59
|
+
- Verify fix works
|
|
60
|
+
- Check for regressions
|
|
61
|
+
|
|
62
|
+
2. **Add Styling** (if requested):
|
|
63
|
+
- Identify what needs styling
|
|
64
|
+
- Break framework defaults where needed
|
|
65
|
+
- Ensure mobile responsiveness
|
|
66
|
+
- Verify no regressions
|
|
67
|
+
|
|
68
|
+
3. **Add i18n** (if required):
|
|
69
|
+
- Extract hardcoded strings
|
|
70
|
+
- Create translation files
|
|
71
|
+
- Replace strings with `useTranslation()` hooks
|
|
72
|
+
- Add all required languages
|
|
73
|
+
|
|
74
|
+
4. **Finalize Configuration**:
|
|
75
|
+
- Update `src/config/app.ts`
|
|
76
|
+
- Update `src/config/legal.ts`
|
|
77
|
+
- Fill `.env`
|
|
78
|
+
- Configure Firestore Rules
|
|
79
|
+
|
|
80
|
+
5. **Test and Validate**:
|
|
81
|
+
- Test all features
|
|
82
|
+
- Verify mobile responsiveness
|
|
83
|
+
- Check ship readiness
|
|
84
|
+
|
|
85
|
+
**Output:** Production-ready app
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## What FINISHER Does
|
|
90
|
+
|
|
91
|
+
| Task | Description |
|
|
92
|
+
|------|-------------|
|
|
93
|
+
| **Bug Fixes** | Diagnose and fix bugs with minimal changes |
|
|
94
|
+
| **Styling** | Add custom CSS, break framework defaults where needed |
|
|
95
|
+
| **i18n** | Extract strings, create translation files, replace hardcoded text |
|
|
96
|
+
| **Configuration** | Complete app.ts, legal.ts, .env, Firestore Rules |
|
|
97
|
+
| **Testing** | Verify everything works, check ship readiness |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Rules
|
|
102
|
+
|
|
103
|
+
- **Fix bugs only** - Don't add features
|
|
104
|
+
- **Minimal changes** - Change only what's necessary
|
|
105
|
+
- **Verify fixes** - Test before declaring complete
|
|
106
|
+
- **Check regressions** - Ensure other features still work
|
|
107
|
+
- **Ask when unclear** - Don't guess bug causes
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Integration with WAI-WAY
|
|
112
|
+
|
|
113
|
+
- Uses **BMAD FINISHER** persona (proven, battle-tested)
|
|
114
|
+
- Follows WAI-WAY Phase 4 (CONFIGURE) + Phase 5 (i18n)
|
|
115
|
+
- Takes working app from `/build` and makes it production-ready
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Requirements
|
|
120
|
+
|
|
121
|
+
- Working app from `/build` command
|
|
122
|
+
- Bug reports (if any)
|
|
123
|
+
- Styling requirements (if any)
|
|
124
|
+
- i18n requirements (if any)
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Ship Readiness
|
|
129
|
+
|
|
130
|
+
App is ready to ship when:
|
|
131
|
+
- ✅ No critical bugs
|
|
132
|
+
- ✅ All MVP features work
|
|
133
|
+
- ✅ Auth is secure
|
|
134
|
+
- ✅ Performance acceptable
|
|
135
|
+
- ✅ Mobile works (if in spec)
|
|
136
|
+
- ✅ Styling matches requirements (if specified)
|
|
137
|
+
- ✅ i18n complete (if required)
|
|
138
|
+
- ✅ Configuration complete
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Next Step
|
|
143
|
+
|
|
144
|
+
Once app is production-ready:
|
|
145
|
+
→ Deploy and ship! 🚀
|