@donotdev/cli 0.0.9 → 0.0.12
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 +24 -7
- package/dist/bin/commands/build.js +2 -2
- package/dist/bin/commands/bump.js +586 -95
- package/dist/bin/commands/cacheout.js +2 -2
- package/dist/bin/commands/create-app.js +23 -3
- package/dist/bin/commands/create-project.js +23 -3
- package/dist/bin/commands/deploy.js +3 -3
- 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/index.js +23 -3
- package/package.json +2 -2
- package/templates/app-next/src/pages/HomePage.tsx.example +1 -1
- 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/.mcp.json.example +8 -0
- package/templates/root-consumer/CLAUDE.md.example +146 -0
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +15 -12
- 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 +157 -1
|
@@ -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! 🚀
|
|
@@ -7,6 +7,32 @@
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## ⚠️ WORKING MODE: Consumer App Development
|
|
11
|
+
|
|
12
|
+
**YOU ARE IN:** Consumer App Development Mode
|
|
13
|
+
|
|
14
|
+
**Location:** Consumer repository (scaffolded by `dndev init`)
|
|
15
|
+
|
|
16
|
+
**Your Role:**
|
|
17
|
+
- **Creating with framework** (Mode 3): Build new app features
|
|
18
|
+
- **Tweaking framework app** (Mode 4): Modify existing app features
|
|
19
|
+
|
|
20
|
+
**CLI:** `dndev` (public CLI, installed globally)
|
|
21
|
+
|
|
22
|
+
**Workflow:**
|
|
23
|
+
1. `/design [requirement]` → Architect designs solution
|
|
24
|
+
2. `/build [requirement]` → Prompt Engineer + Coder implement
|
|
25
|
+
3. Iterate with WAI-WAY agents
|
|
26
|
+
|
|
27
|
+
**Reference:** [Modes Guide](https://github.com/donotdev/framework/blob/main/docs/development/MODES.md) | Framework guides in `guides/dndev/`
|
|
28
|
+
|
|
29
|
+
**⚠️ IMPORTANT:**
|
|
30
|
+
- Use ONLY published `@donotdev/*` packages
|
|
31
|
+
- Cannot modify framework internals
|
|
32
|
+
- If framework needs changes, work in monorepo (`c:\ws\dndev`)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
10
36
|
**PRIME DIRECTIVE: PRECISION OVER SPEED.**
|
|
11
37
|
|
|
12
38
|
## **Correctness is non-negotiable. Concise, even at the cost of grammar. Never guess, every output must be verifiable. Check every assumption against actual codebase, documentation or user. If ambiguity exists, ask. No exceptions.**
|
|
@@ -71,3 +97,123 @@ At end of each plan, list unresolved questions (if any). Extremely concise.
|
|
|
71
97
|
## General Principles
|
|
72
98
|
- **Code reading/writing:** Be critical and concise/precise. Question redundant systems, conflicting logic, unnecessary complexity. You need to **ANALYZE** code.
|
|
73
99
|
- **Conventions:** Always follow project's conventions when updating/adding/fixing files
|
|
100
|
+
|
|
101
|
+
## Component Usage - MCP REQUIRED
|
|
102
|
+
|
|
103
|
+
**BEFORE writing ANY @donotdev component:**
|
|
104
|
+
|
|
105
|
+
1. Call `lookup_component({ component: "ComponentName" })`
|
|
106
|
+
2. Read the actual props from the returned TypeScript interface
|
|
107
|
+
3. Use ONLY those props
|
|
108
|
+
|
|
109
|
+
**NEVER guess props. NEVER use props from memory/training.**
|
|
110
|
+
|
|
111
|
+
If MCP tools unavailable → STOP and tell user to enable MCP.
|
|
112
|
+
|
|
113
|
+
**Available MCP tools:**
|
|
114
|
+
- `lookup_component` - get actual props from .d.ts
|
|
115
|
+
- `list_components` - list exports from a package
|
|
116
|
+
- `list_packages` - list all @donotdev packages
|
|
117
|
+
|
|
118
|
+
## WAI-WAY Workflow - Four-Phase System (BMAD-Based)
|
|
119
|
+
|
|
120
|
+
**Workflow Order:**
|
|
121
|
+
1. `/brainstorm` → BMAD EXTRACTOR extracts requirements, generates HLD
|
|
122
|
+
2. `/design` → BMAD PRINTER (Architect) creates technical plan (LLD)
|
|
123
|
+
3. `/build` → BMAD FORGER (Builder) implements code using framework defaults
|
|
124
|
+
4. `/polish` → BMAD FINISHER (Polisher) adds styling, customization, i18n
|
|
125
|
+
|
|
126
|
+
**Quality Over Speed:** Each phase must be complete before proceeding. Take as long as needed.
|
|
127
|
+
|
|
128
|
+
### Brainstorm Phase
|
|
129
|
+
|
|
130
|
+
**Use `/brainstorm [app idea]` to extract complete requirements.**
|
|
131
|
+
|
|
132
|
+
**Workflow:**
|
|
133
|
+
1. `/brainstorm` → BMAD EXTRACTOR asks probing questions
|
|
134
|
+
2. EXTRACTOR uses MCP to discover framework capabilities
|
|
135
|
+
3. EXTRACTOR identifies native vs custom components
|
|
136
|
+
4. Output → Complete HLD document
|
|
137
|
+
|
|
138
|
+
**Example:**
|
|
139
|
+
```
|
|
140
|
+
/brainstorm I want to build a car dealership management app
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Agent:**
|
|
144
|
+
- `extractor` (BMAD EXTRACTOR) - Extracts requirements through conversation
|
|
145
|
+
|
|
146
|
+
**See:** `.claude/commands/brainstorm.md` for full workflow details.
|
|
147
|
+
|
|
148
|
+
### Design Phase
|
|
149
|
+
|
|
150
|
+
**Use `/design [HLD reference]` to create technical implementation plan.**
|
|
151
|
+
|
|
152
|
+
**Workflow:**
|
|
153
|
+
1. `/design` → BMAD PRINTER (Architect) reads validated HLD
|
|
154
|
+
2. PRINTER creates technical artifacts (LLD):
|
|
155
|
+
- Entity schemas
|
|
156
|
+
- Navigation config
|
|
157
|
+
- Feature mapping
|
|
158
|
+
- Custom component specs
|
|
159
|
+
3. Output → Complete LLD document
|
|
160
|
+
|
|
161
|
+
**Example:**
|
|
162
|
+
```
|
|
163
|
+
/design Create technical plan from HLD.md
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Agent:**
|
|
167
|
+
- `architect` (BMAD PRINTER) - Transforms HLD into technical specifications
|
|
168
|
+
|
|
169
|
+
**See:** `.claude/commands/design.md` for full workflow details.
|
|
170
|
+
|
|
171
|
+
### Build Phase
|
|
172
|
+
|
|
173
|
+
**Use `/build [LLD reference]` to implement working code.**
|
|
174
|
+
|
|
175
|
+
**Workflow:**
|
|
176
|
+
1. `/build` → BMAD FORGER (Builder) reads LLD
|
|
177
|
+
2. FORGER implements in phases:
|
|
178
|
+
- Entities → Routes → Auth → Native Pages → Custom Components → Integration
|
|
179
|
+
3. Uses framework defaults ONLY (no styling, no customization)
|
|
180
|
+
4. Hardcodes all strings (no i18n yet)
|
|
181
|
+
5. Output → Working app (functional MVP)
|
|
182
|
+
|
|
183
|
+
**Example:**
|
|
184
|
+
```
|
|
185
|
+
/build Implement from LLD.md
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Agent:**
|
|
189
|
+
- `builder` (BMAD FORGER) - Implements app from specifications
|
|
190
|
+
|
|
191
|
+
**See:** `.claude/commands/build.md` for full workflow details.
|
|
192
|
+
|
|
193
|
+
### Polish Phase
|
|
194
|
+
|
|
195
|
+
**Use `/polish [requirements]` to make app production-ready.**
|
|
196
|
+
|
|
197
|
+
**Workflow:**
|
|
198
|
+
1. `/polish` → BMAD FINISHER (Polisher) reads working app
|
|
199
|
+
2. FINISHER:
|
|
200
|
+
- Fixes bugs (if any)
|
|
201
|
+
- Adds styling/customization
|
|
202
|
+
- Adds i18n translations
|
|
203
|
+
- Finalizes configuration
|
|
204
|
+
- Tests and validates
|
|
205
|
+
3. Output → Production-ready app
|
|
206
|
+
|
|
207
|
+
**Example:**
|
|
208
|
+
```
|
|
209
|
+
/polish Add styling and French translations
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Agent:**
|
|
213
|
+
- `polisher` (BMAD FINISHER) - Fixes bugs, adds styling, i18n, config
|
|
214
|
+
|
|
215
|
+
**See:** `.claude/commands/polish.md` for full workflow details.
|
|
216
|
+
|
|
217
|
+
**Requirements:**
|
|
218
|
+
- MCP server configured (`.mcp.json` or `.cursor/mcp.json`)
|
|
219
|
+
- `@donotdev/mcp-server` available (via `bunx` or installed)
|
|
@@ -229,25 +229,28 @@ bun run dev
|
|
|
229
229
|
|
|
230
230
|
---
|
|
231
231
|
|
|
232
|
-
## 🤖 WAI-WAY: The "With AI Way" Protocol (
|
|
232
|
+
## 🤖 WAI-WAY: The "With AI Way" Protocol (BMAD-Based)
|
|
233
233
|
|
|
234
|
-
**WAI-WAY**
|
|
234
|
+
**WAI-WAY** is a rigorous, agent-driven protocol based on the **BMAD Method**. It separates concerns into 4 distinct phases.
|
|
235
235
|
|
|
236
|
-
**
|
|
237
|
-
1. Navigate to `guides/wai-way/`.
|
|
238
|
-
2. Open `WAI_WAY_CLI.md` to see the activation instructions.
|
|
239
|
-
3. Paste the **Activation Prompt** into your AI Agent (Cursor, Claude, etc.) to start a phase.
|
|
236
|
+
**Entry Point:** Use commands in `.claude/commands/` (synced via `dndev bump`)
|
|
240
237
|
|
|
241
238
|
**The 4 Phases:**
|
|
242
|
-
1.
|
|
243
|
-
2.
|
|
244
|
-
3.
|
|
245
|
-
4.
|
|
239
|
+
1. **`/brainstorm`** → BMAD EXTRACTOR extracts requirements, generates HLD
|
|
240
|
+
2. **`/design`** → BMAD PRINTER (Architect) creates technical plan (LLD)
|
|
241
|
+
3. **`/build`** → BMAD FORGER (Builder) implements code using framework defaults
|
|
242
|
+
4. **`/polish`** → BMAD FINISHER (Polisher) adds styling, customization, i18n
|
|
243
|
+
|
|
244
|
+
**How It Works:**
|
|
245
|
+
- Commands are in `.claude/commands/` (synced from framework)
|
|
246
|
+
- Agents are in `.claude/agents/` (BMAD personas, synced from framework)
|
|
247
|
+
- Run commands in Cursor: `/brainstorm [app idea]`, `/design [HLD]`, `/build [LLD]`, `/polish [app]`
|
|
248
|
+
- Documentation syncs automatically via `dndev bump`
|
|
246
249
|
|
|
247
250
|
**Why use it?**
|
|
248
|
-
WAI-WAY forces your AI to "Think before it Codes". By separating
|
|
251
|
+
WAI-WAY forces your AI to "Think before it Codes". By separating Architecture from Build, we ensure **only valid DoNotDev primitives are used**, preventing custom CSS bloat and "hallucinated" patterns.
|
|
249
252
|
|
|
250
|
-
**See
|
|
253
|
+
**See:** `.claude/commands/` for command details | `guides/wai-way/WAI_WAY_CLI.md` for methodology
|
|
251
254
|
|
|
252
255
|
---
|
|
253
256
|
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Component API Reference
|
|
2
|
+
|
|
3
|
+
**SOURCE OF TRUTH. If prop not listed here, it does not exist.**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Button
|
|
8
|
+
```tsx
|
|
9
|
+
<Button>Label</Button>
|
|
10
|
+
<Button variant="primary">Label</Button>
|
|
11
|
+
<Button onClick={fn}>Label</Button>
|
|
12
|
+
```
|
|
13
|
+
| Prop | Type | Default |
|
|
14
|
+
|------|------|---------|
|
|
15
|
+
| variant | `'default'` \| `'primary'` \| `'secondary'` \| `'accent'` \| `'destructive'` \| `'ghost'` \| `'outline'` \| `'link'` | `'default'` |
|
|
16
|
+
| icon | `LucideIcon` \| `ReactNode` | - |
|
|
17
|
+
| iconEnd | `boolean` | `false` |
|
|
18
|
+
| display | `'auto'` \| `'compact'` \| `'full'` | `'auto'` |
|
|
19
|
+
| tooltip | `string` | - |
|
|
20
|
+
| floating | `boolean` | `false` |
|
|
21
|
+
| fullWidth | `boolean` | `false` |
|
|
22
|
+
| loading | `boolean` | `false` |
|
|
23
|
+
| loadingText | `string` | - |
|
|
24
|
+
| progress | `number` (0-100) | - |
|
|
25
|
+
| disabled | `boolean` | `false` |
|
|
26
|
+
| render | `(props) => ReactNode` | - |
|
|
27
|
+
|
|
28
|
+
**NO: size, tone, gap**
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Text
|
|
33
|
+
```tsx
|
|
34
|
+
<Text>Content</Text>
|
|
35
|
+
<Text level="h1">Heading</Text>
|
|
36
|
+
<Text as="p">Paragraph</Text>
|
|
37
|
+
```
|
|
38
|
+
| Prop | Type | Default |
|
|
39
|
+
|------|------|---------|
|
|
40
|
+
| as | `'h1'`-`'h6'` \| `'p'` \| `'span'` \| `'div'` \| `'li'` \| `'label'` \| `'code'` | `'div'` |
|
|
41
|
+
| level | `'h1'`-`'h6'` \| `'body'` \| `'small'` \| `'caption'` | auto from `as` |
|
|
42
|
+
| variant | `'default'` \| `'muted'` \| `'primary'` \| `'secondary'` \| `'accent'` \| `'success'` \| `'warning'` \| `'destructive'` \| `'code'` | `'default'` |
|
|
43
|
+
| align | `'start'` \| `'center'` \| `'end'` | `'start'` |
|
|
44
|
+
| weight | `'normal'` \| `'medium'` \| `'semibold'` \| `'bold'` | - |
|
|
45
|
+
|
|
46
|
+
**NO: size, tone, color**
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Stack
|
|
51
|
+
```tsx
|
|
52
|
+
<Stack>children</Stack>
|
|
53
|
+
<Stack direction="row">children</Stack>
|
|
54
|
+
```
|
|
55
|
+
| Prop | Type | Default |
|
|
56
|
+
|------|------|---------|
|
|
57
|
+
| as | `ElementType` | `'div'` |
|
|
58
|
+
| direction | `'row'` \| `'column'` \| `'row-reverse'` \| `'column-reverse'` | `'column'` |
|
|
59
|
+
| align | `'start'` \| `'center'` \| `'end'` \| `'stretch'` \| `'baseline'` | `'stretch'` |
|
|
60
|
+
| justify | `'start'` \| `'center'` \| `'end'` \| `'between'` \| `'around'` \| `'evenly'` | `'start'` |
|
|
61
|
+
| gap | `'none'` \| `'tight'` \| `'medium'` \| `'large'` | `'medium'` |
|
|
62
|
+
| wrap | `'nowrap'` \| `'wrap'` \| `'wrap-reverse'` | `'nowrap'` |
|
|
63
|
+
| width | `'full'` \| `'fit'` \| `'auto'` | `'full'` |
|
|
64
|
+
| centered | `boolean` | `false` |
|
|
65
|
+
|
|
66
|
+
**NO: spacing, size**
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Card
|
|
71
|
+
```tsx
|
|
72
|
+
<Card>children</Card>
|
|
73
|
+
<Card title="Title">children</Card>
|
|
74
|
+
<Card onClick={fn}>children</Card>
|
|
75
|
+
```
|
|
76
|
+
| Prop | Type | Default |
|
|
77
|
+
|------|------|---------|
|
|
78
|
+
| variant | `'default'` \| `'muted'` \| `'primary'` \| `'secondary'` \| `'accent'` | `'default'` |
|
|
79
|
+
| title | `string` \| `ReactNode` | - |
|
|
80
|
+
| subtitle | `string` \| `ReactNode` | - |
|
|
81
|
+
| icon | `LucideIcon` | - |
|
|
82
|
+
| content | `string` \| `string[]` \| `ReactNode` | - |
|
|
83
|
+
| footer | `ReactNode` | - |
|
|
84
|
+
| onClick | `() => void` | - |
|
|
85
|
+
| clickable | `boolean` | auto from onClick |
|
|
86
|
+
| elevated | `boolean` | `false` |
|
|
87
|
+
| asChild | `boolean` | `false` |
|
|
88
|
+
|
|
89
|
+
**NO: size, padding, margin**
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Grid
|
|
94
|
+
```tsx
|
|
95
|
+
<Grid>children</Grid>
|
|
96
|
+
<Grid cols={3}>children</Grid>
|
|
97
|
+
<Grid cols={[1, 1, 2, 3]}>children</Grid>
|
|
98
|
+
```
|
|
99
|
+
| Prop | Type | Default |
|
|
100
|
+
|------|------|---------|
|
|
101
|
+
| as | `ElementType` | `'div'` |
|
|
102
|
+
| cols | `number` \| `[mobile, tablet, laptop, desktop]` | `1` |
|
|
103
|
+
| gap | `'none'` \| `'tight'` \| `'medium'` \| `'large'` | `'medium'` |
|
|
104
|
+
| align | `'start'` \| `'center'` \| `'end'` \| `'stretch'` | `'stretch'` |
|
|
105
|
+
| justify | `'start'` \| `'center'` \| `'end'` \| `'stretch'` | `'stretch'` |
|
|
106
|
+
|
|
107
|
+
**NO: spacing, columns (use cols)**
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Section
|
|
112
|
+
```tsx
|
|
113
|
+
<Section title="Title">children</Section>
|
|
114
|
+
```
|
|
115
|
+
| Prop | Type | Default |
|
|
116
|
+
|------|------|---------|
|
|
117
|
+
| as | `'section'` \| `'article'` \| `'aside'` \| `'div'` \| `'main'` | `'section'` |
|
|
118
|
+
| title | `string` | - |
|
|
119
|
+
| separator | `boolean` | `false` |
|
|
120
|
+
| tone | `'base'` \| `'muted'` \| `'elevated'` \| `'contrast'` \| `'accent'` | `'base'` |
|
|
121
|
+
| align | `'start'` \| `'center'` \| `'end'` | `'center'` |
|
|
122
|
+
| gridCols | `number` \| `[mobile, tablet, laptop, desktop]` | - |
|
|
123
|
+
| gridGap | `'none'` \| `'tight'` \| `'medium'` \| `'large'` | `'medium'` |
|
|
124
|
+
| collapsible | `boolean` | `false` |
|
|
125
|
+
| defaultOpen | `boolean` | `false` |
|
|
126
|
+
|
|
127
|
+
**NO: padding, margin, background**
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Badge
|
|
132
|
+
```tsx
|
|
133
|
+
<Badge>Label</Badge>
|
|
134
|
+
<Badge variant="primary">Label</Badge>
|
|
135
|
+
```
|
|
136
|
+
| Prop | Type | Default |
|
|
137
|
+
|------|------|---------|
|
|
138
|
+
| as | `'div'` \| `'span'` \| `'mark'` | `'div'` |
|
|
139
|
+
| variant | `'default'` \| `'muted'` \| `'primary'` \| `'secondary'` \| `'accent'` \| `'success'` \| `'warning'` \| `'destructive'` \| `'outline'` | `'default'` |
|
|
140
|
+
| tooltip | `string` | - |
|
|
141
|
+
|
|
142
|
+
**NO: size, color**
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Spinner
|
|
147
|
+
```tsx
|
|
148
|
+
<Spinner />
|
|
149
|
+
<Spinner overlay />
|
|
150
|
+
```
|
|
151
|
+
| Prop | Type | Default |
|
|
152
|
+
|------|------|---------|
|
|
153
|
+
| overlay | `boolean` | `false` |
|
|
154
|
+
| variant | `'default'` \| `'primary'` \| `'secondary'` \| `'accent'` \| `'success'` \| `'warning'` \| `'destructive'` | `'primary'` |
|
|
155
|
+
|
|
156
|
+
**NO: size**
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Separator
|
|
161
|
+
```tsx
|
|
162
|
+
<Separator />
|
|
163
|
+
```
|
|
164
|
+
| Prop | Type | Default |
|
|
165
|
+
|------|------|---------|
|
|
166
|
+
| orientation | `'horizontal'` \| `'vertical'` | `'horizontal'` |
|
|
167
|
+
| variant | `'default'` \| `'muted'` \| `'accent'` | `'default'` |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## EntityFormRenderer
|
|
172
|
+
```tsx
|
|
173
|
+
<EntityFormRenderer entity={entity} operation="create" onSubmit={fn} />
|
|
174
|
+
```
|
|
175
|
+
| Prop | Type | Default |
|
|
176
|
+
|------|------|---------|
|
|
177
|
+
| entity | `Entity` | required |
|
|
178
|
+
| operation | `'create'` \| `'edit'` | `'create'` |
|
|
179
|
+
| onSubmit | `(data) => void` | required |
|
|
180
|
+
| defaultValues | `Record<string, unknown>` | - |
|
|
181
|
+
| loading | `boolean` | `false` |
|
|
182
|
+
| submitText | `string` | - |
|
|
183
|
+
| cancelText | `string` | - |
|
|
184
|
+
| onCancel | `() => void` | - |
|
|
185
|
+
| viewerRole | `string` | `'guest'` |
|
|
186
|
+
|
|
187
|
+
**NO: fields (renders all editable fields automatically)**
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## BEFORE WRITING JSX
|
|
192
|
+
|
|
193
|
+
1. Check this file
|
|
194
|
+
2. If prop not listed → don't use it
|
|
195
|
+
3. When in doubt → use defaults only
|