@donotdev/cli 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dependencies-matrix.json +30 -116
  2. package/dist/bin/commands/bump.js +137 -104
  3. package/dist/bin/commands/create-app.js +20 -0
  4. package/dist/bin/commands/create-project.js +63 -7
  5. package/dist/bin/commands/deploy.js +7606 -17
  6. package/dist/bin/commands/firebase-setup.d.ts +6 -0
  7. package/dist/bin/commands/firebase-setup.d.ts.map +1 -0
  8. package/dist/bin/commands/firebase-setup.js +7 -0
  9. package/dist/bin/commands/firebase-setup.js.map +1 -0
  10. package/dist/bin/commands/staging.d.ts +11 -0
  11. package/dist/bin/commands/staging.d.ts.map +1 -0
  12. package/dist/bin/commands/staging.js +12 -0
  13. package/dist/bin/commands/staging.js.map +1 -0
  14. package/dist/bin/dndev.js +28 -3
  15. package/dist/bin/donotdev.js +28 -3
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +7714 -62
  19. package/dist/index.js.map +1 -1
  20. package/package.json +1 -1
  21. package/templates/app-demo/src/pages/DetailPage.tsx.example +1 -1
  22. package/templates/app-demo/src/pages/FullPage.tsx.example +3 -3
  23. package/templates/app-demo/src/pages/HomePage.tsx.example +1 -1
  24. package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +5 -5
  25. package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +3 -3
  26. package/templates/app-next/.env.example +2 -0
  27. package/templates/app-next/src/pages/HomePage.tsx.example +2 -2
  28. package/templates/app-vite/.env.example +2 -0
  29. package/templates/app-vite/src/pages/HomePage.tsx.example +163 -73
  30. package/templates/functions-firebase/build.mjs.example +26 -10
  31. package/templates/functions-firebase/functions-firebase/build.mjs.example +26 -10
  32. package/templates/functions-firebase/functions.config.js.example +11 -15
  33. package/templates/github-consumer/.github/workflows/ci.yml.example +36 -0
  34. package/templates/root-consumer/.claude/agents/architect.md.example +2 -2
  35. package/templates/root-consumer/.claude/agents/builder.md.example +2 -2
  36. package/templates/root-consumer/.claude/agents/coder.md.example +2 -2
  37. package/templates/root-consumer/.claude/agents/extractor.md.example +2 -3
  38. package/templates/root-consumer/.claude/agents/polisher.md.example +67 -291
  39. package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +4 -4
  40. package/templates/root-consumer/.claude/commands/build.md.example +2 -2
  41. package/templates/root-consumer/.claude/commands/polish.md.example +65 -81
  42. package/templates/root-consumer/.env.example +13 -13
  43. package/templates/root-consumer/.gemini/settings.json.example +9 -0
  44. package/templates/root-consumer/.gitignore.example +3 -1
  45. package/templates/root-consumer/AI.md.example +139 -0
  46. package/templates/root-consumer/CLAUDE.md.example +13 -104
  47. package/templates/root-consumer/README.md.example +81 -255
  48. package/templates/root-consumer/entities/Contact.ts.example +126 -0
  49. package/templates/root-consumer/entities/index.ts.example +6 -3
  50. package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +41 -342
  51. package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +2 -1
  52. package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +144 -9
  53. package/templates/root-consumer/guides/dndev/INDEX.md.example +9 -0
  54. package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +13 -16
  55. package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +263 -0
  56. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +1 -1
  57. package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +168 -0
  58. package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +5 -12
  59. package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +184 -0
  60. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +134 -69
  61. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +66 -44
  62. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +18 -1
  63. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +1 -0
  64. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +2 -1
  65. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +2 -1
  66. package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +180 -108
  67. package/templates/root-consumer/guides/wai-way/context_map.json.example +8 -7
  68. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +4 -4
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Fix bugs, add styling, customization, i18n (BMAD FINISHER) - AFTER /build
2
+ description: Generate tests, firestore rules, CI/CD, config, fix bugs, i18n (Phase 4) - AFTER /build
3
3
  ---
4
4
 
5
5
  # Polish Command - Production-Ready App
@@ -12,134 +12,118 @@ description: Fix bugs, add styling, customization, i18n (BMAD FINISHER) - AFTER
12
12
 
13
13
  **If you're in a consumer repo:**
14
14
  - ✅ Use `/polish` after `/build` is complete
15
+ - ✅ Use `/polish` to generate tests, firestore rules, CI/CD
15
16
  - ✅ Use `/polish` to fix bugs, add styling, add i18n
16
17
  - ✅ Use `/polish` to finalize configuration
17
18
 
18
19
  **WORKFLOW ORDER:**
19
- 1. `/brainstorm` → Extract requirements, generate HLD
20
- 2. `/design` → Create technical plan (LLD)
20
+ 1. `/brainstorm` → Extract requirements, generate spec
21
+ 2. `/design` → Create technical plan
21
22
  3. `/build` → Implement code using framework defaults
22
- 4. `/polish` → Add styling, customization, i18n (THIS COMMAND)
23
+ 4. `/polish` → Generate tests, config, CI/CD, fix bugs (THIS COMMAND)
23
24
 
24
25
  ---
25
26
 
26
27
  ## Usage
27
28
 
28
29
  ```
29
- /polish [bugs, styling requirements, or i18n needs]
30
+ /polish [task]
30
31
  ```
31
32
 
32
33
  **Examples:**
33
34
  ```
35
+ /polish Generate all tests and firestore rules
34
36
  /polish Fix bug: Projects list is empty
35
- /polish Add styling to match brand guidelines
36
37
  /polish Add French and Spanish translations
37
- /polish Complete configuration and test everything
38
+ /polish Complete configuration and deploy
38
39
  ```
39
40
 
40
41
  ---
41
42
 
42
43
  ## Process
43
44
 
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
45
+ ### Step 1: Activate Polisher Agent
86
46
 
87
- ---
47
+ **Deploy:** `/agents polisher` (Phase 4 Polisher persona)
88
48
 
89
- ## What FINISHER Does
49
+ **READ first:**
50
+ - `guides/wai-way/spec_template.md` — validated spec (your test plan)
51
+ - `entities/index.ts` — all entity definitions
52
+ - `src/pages/` — all page files
53
+ - `guides/dndev/SETUP_TESTING.md` — testing patterns
90
54
 
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 |
55
+ ### Step 2: Generate Tests
98
56
 
99
- ---
57
+ Call `get_guide("TESTING")` for patterns.
100
58
 
101
- ## Rules
59
+ 1. **Entity tests** — one per entity in `tests/entities/[Entity].test.ts`
60
+ 2. **Page tests** — one per page in `tests/pages/[Page].test.tsx`
61
+ 3. **Access control tests** — `tests/access/access-rules.test.ts`
102
62
 
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
63
+ ### Step 3: Generate Firestore Rules
108
64
 
109
- ---
65
+ Create `firestore.rules` from entity access definitions.
110
66
 
111
- ## Integration with WAI-WAY
67
+ ### Step 4: Generate CI/CD
112
68
 
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
69
+ Create `.github/workflows/ci.yml` — type-check test build deploy.
70
+
71
+ ### Step 5: Configure
72
+
73
+ - `src/config/app.ts` — APP_NAME, preset, footer
74
+ - `src/config/legal.ts` — company, contacts, jurisdiction
75
+ - `.env` — Firebase config, license key
76
+
77
+ ### Step 6: Run Tests
78
+
79
+ ```bash
80
+ bun test
81
+ ```
82
+
83
+ All tests must pass.
84
+
85
+ ### Step 7: Fix Bugs (if any)
86
+
87
+ - Understand → Diagnose → Fix (minimal) → Verify → Check regressions
88
+
89
+ ### Step 8: Mobile Check
90
+
91
+ DevTools → 375px → navigation, forms, text, buttons (44px)
92
+
93
+ ### Step 9: i18n (Optional)
94
+
95
+ Extract strings to `src/locales/`, replace with `useTranslation()`.
116
96
 
117
97
  ---
118
98
 
119
- ## Requirements
99
+ ## What Polisher Does
120
100
 
121
- - Working app from `/build` command
122
- - Bug reports (if any)
123
- - Styling requirements (if any)
124
- - i18n requirements (if any)
101
+ | Task | Description |
102
+ |------|-------------|
103
+ | **Test Generation** | Entity tests, page tests, access tests from spec |
104
+ | **Firestore Rules** | Security rules from entity access definitions |
105
+ | **CI/CD** | GitHub Actions workflow (test → build → deploy) |
106
+ | **Configuration** | app.ts, legal.ts, .env, Firebase setup |
107
+ | **Bug Fixes** | Diagnose and fix bugs with minimal changes |
108
+ | **i18n** | Extract strings, create translation files (optional) |
125
109
 
126
110
  ---
127
111
 
128
112
  ## Ship Readiness
129
113
 
130
114
  App is ready to ship when:
115
+ - ✅ `bun test` passes
116
+ - ✅ `firestore.rules` generated
117
+ - ✅ `.github/workflows/ci.yml` created
131
118
  - ✅ No critical bugs
132
- - ✅ All MVP features work
133
119
  - ✅ Auth is secure
134
- - ✅ Performance acceptable
135
- - ✅ Mobile works (if in spec)
136
- - ✅ Styling matches requirements (if specified)
137
- - ✅ i18n complete (if required)
120
+ - ✅ Mobile works at 375px
138
121
  - ✅ Configuration complete
122
+ - ✅ (Optional) i18n added
139
123
 
140
124
  ---
141
125
 
142
126
  ## Next Step
143
127
 
144
128
  Once app is production-ready:
145
- Deploy and ship! 🚀
129
+ `dndev deploy`
@@ -1,19 +1,19 @@
1
1
  # =============================================================================
2
- # DoNotDev Framework License Key
2
+ # ROOT .env REFERENCE ONLY
3
3
  # =============================================================================
4
- # This root-level .env file should ONLY contain the framework license key.
5
- # App-specific environment variables (Firebase, emulators, etc.) should be
6
- # placed in each app's own .env files (apps/*/.env).
4
+ # ⚠️ Vite does NOT read this file. It loads .env from each app's directory.
7
5
  #
8
- # ⚠️ WARNING: If a root .env file exists, Vite/Next.js will load it and
9
- # it will take priority over app-specific .env files. Only create a root .env
10
- # if you want to share the same license key across all apps.
6
+ # Put your environment variables in: apps/<your-app>/.env
11
7
  #
12
- # Get your license key from: https://donotdev.com/pricing
13
- # Removes watermark and enables all features
8
+ # This file exists only as a reference for what variables are available.
9
+ # See apps/<your-app>/.env.example for the full list.
14
10
  #
15
- # For Vite projects:
16
- VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here
11
+ # For the license key:
12
+ # apps/<your-app>/.env → VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here
17
13
  #
18
- # For Next.js projects:
19
- NEXT_PUBLIC_DONOTDEV_LICENSE_KEY=dndev_your_key_here
14
+ # For Firebase config:
15
+ # apps/<your-app>/.env → VITE_FIREBASE_API_KEY=...
16
+ #
17
+ # For server-side secrets (Stripe, OAuth):
18
+ # functions/.env → STRIPE_SECRET_KEY=sk_...
19
+ # Then run: dndev sync-secrets
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "donotdev": {
4
+ "command": "npx",
5
+ "args": ["-y", "@donotdev/mcp-server@latest"],
6
+ "trust": true
7
+ }
8
+ }
9
+ }
@@ -63,7 +63,9 @@ Desktop.ini
63
63
 
64
64
  # Firebase service account keys (sensitive, project-specific)
65
65
  service-account-key.json
66
- **/functions/service-account-key.json
66
+ service-account-key.staging.json
67
+ **/service-account-key.json
68
+ **/service-account-key.staging.json
67
69
 
68
70
  # Lock files (using Bun)
69
71
  package-lock.json
@@ -0,0 +1,139 @@
1
+ # AI Agent Instructions
2
+
3
+ > **You are building a DoNotDev app.** Read this file completely before doing anything else.
4
+
5
+ ## What To Do Right Now
6
+
7
+ 1. **Check environment setup first.** Ask the user: "Have you completed the setup steps on the homepage? (Run `bun dev` and open the app to see them.) You need Git, Firebase, and .env configured before we start building." If they haven't, coach them through each step on the homepage — Git repo, Firebase project, service account key, environment variables. Don't start coding until Firebase is configured and `dndev emu start` works.
8
+ 2. Read `guides/wai-way/WAI_WAY_CLI.md` — the complete workflow
9
+ 3. Start with **Phase 0: BRAINSTORM** — ask the user what they want to build
10
+ 4. Follow each phase in order. Do not skip phases.
11
+
12
+ ## Environment Variables — Where They Go
13
+
14
+ **Vite loads `.env` from the app directory only. NOT from the repo root.**
15
+
16
+ | File | What Goes Here |
17
+ |------|---------------|
18
+ | `apps/<app>/.env` | Firebase config, license key, Stripe publishable key, all `VITE_*` vars |
19
+ | `apps/<app>/.env.local` | Local overrides (gitignored) |
20
+ | `apps/<app>/.env.staging` | Staging Firebase config (used by `dndev staging`) |
21
+ | `functions/.env` | Server-side secrets: `STRIPE_SECRET_KEY`, OAuth client secrets |
22
+ | Root `.env` | **Not read by Vite.** Reference only. |
23
+
24
+ If the user says their license key or Firebase config "doesn't work", check which `.env` file they put it in. It must be in `apps/<app>/.env`, not the root.
25
+
26
+ ## The 5 Phases
27
+
28
+ | Phase | Name | What Happens |
29
+ |-------|------|-------------|
30
+ | 0 | **BRAINSTORM** | Ask questions, understand requirements deeply, produce validated spec |
31
+ | 1 | **SCAFFOLD** | Create all routes and page stubs from spec |
32
+ | 2 | **ENTITIES** | Define all data models (fields, access, visibility) |
33
+ | 3 | **COMPOSE** | Build pages with framework components (hardcode strings) |
34
+ | 4 | **CONFIGURE** | Config, test, polish, optional i18n |
35
+
36
+ Each phase has a blueprint in `guides/wai-way/blueprints/` — read it before starting the phase.
37
+
38
+ For large projects, you can scope phases to a module (e.g., "user-management", "billing").
39
+
40
+ ## The Workflow Per Phase
41
+
42
+ ```
43
+ start_phase(N) → get blueprint + context + lessons from previous sessions
44
+
45
+ work → follow blueprint, use lookup_symbol for every component
46
+
47
+ complete_phase(files) → validate conventions + symbol usage + submit for review
48
+
49
+ [user reviews] → user confirms or requests changes
50
+
51
+ approve_phase() → phase is done, move to next
52
+ ```
53
+
54
+ ## How To Use Components Without Hallucinating
55
+
56
+ **CRITICAL:** Never guess component props. Always look up the actual TypeScript types first.
57
+
58
+ **With MCP (auto-configured):**
59
+ ```
60
+ lookup_symbol({ symbol: "DataTable" }) → returns real TypeScript interface
61
+ lookup_symbol({ symbol: "Card" }) → returns real TypeScript interface
62
+ ```
63
+
64
+ Every `lookup_symbol` call is tracked. When you call `complete_phase`, it checks that every @donotdev component you used was looked up first. Components used without lookup are flagged.
65
+
66
+ **Without MCP:**
67
+ Read the `.d.ts` file directly:
68
+ ```
69
+ node_modules/@donotdev/crud/dist/index.d.ts → CRUD components
70
+ node_modules/@donotdev/ui/dist/index.d.ts → UI components
71
+ node_modules/@donotdev/core/dist/index.d.ts → Core utilities
72
+ ```
73
+
74
+ ## Supported IDEs
75
+
76
+ DoNotDev + WAI-WAY is designed for **MCP-capable AI IDEs**. MCP is what gives the AI agent real TypeScript types instead of hallucinated props.
77
+
78
+ | IDE | MCP Support | Config File |
79
+ |-----|-------------|-------------|
80
+ | **Cursor** | Full | `.cursor/mcp.json` (auto-configured) |
81
+ | **Claude Code** | Full | `.mcp.json` (auto-configured) |
82
+ | **Windsurf** | Full | `.mcp.json` (auto-configured) |
83
+ | **AntiGravity** | Full | `.mcp.json` (auto-configured) |
84
+ | **Gemini** | Full | `.gemini/settings.json` (auto-configured) |
85
+
86
+ **Without MCP (ChatGPT, Copilot, etc.):** The workflow still works — read blueprints directly from `guides/wai-way/blueprints/` and look up types manually from `.d.ts` files. You lose symbol tracking and convention enforcement, but the phase structure and entity-driven patterns remain.
87
+
88
+ ## MCP Tools (9 — Pre-Configured)
89
+
90
+ MCP is configured in `.mcp.json` / `.cursor/mcp.json` / `.gemini/settings.json`. Your IDE connects automatically.
91
+
92
+ | Tool | What It Does |
93
+ |------|-------------|
94
+ | `start_phase(N)` | Begin a phase — returns blueprint, agent persona, context, and lessons |
95
+ | `complete_phase({ files })` | Validate conventions + symbol usage + submit for review (does NOT auto-advance) |
96
+ | `approve_phase()` | User approved — phase is done, advance to next |
97
+ | `get_phase_status()` | Current phase, symbols tracked, review status |
98
+ | `lookup_symbol("X")` | Get actual TypeScript types — tracked per phase |
99
+ | `get_guide("CRUD")` | Fetch framework setup guides |
100
+ | `get_guideline("styling:colors")` | Fetch architecture guidelines (supports sections) |
101
+ | `search_framework("keyword")` | Search across all guides and type definitions |
102
+ | `record_lesson("text")` | Save to project memory (returned on next start_phase) |
103
+
104
+ ## Convention Enforcement
105
+
106
+ `complete_phase` checks for:
107
+ - Inline styles (`style={{}}`) — use className
108
+ - fontSize/font-size — use Text levels or Card props
109
+ - textAlign left/right — use start/end for RTL
110
+ - require() — use ESM imports
111
+ - Manual date formatting — use formatDate() from @donotdev/core
112
+ - Import order — React > vendors > @donotdev > relative
113
+ - Unverified components — @donotdev components used without lookup_symbol
114
+
115
+ ## Without MCP — Manual Fallback
116
+
117
+ Read the blueprints directly:
118
+
119
+ | Phase | Read This |
120
+ |-------|-----------|
121
+ | 0 | `guides/wai-way/blueprints/0_brainstorm.md` |
122
+ | 1 | `guides/wai-way/blueprints/1_scaffold.md` |
123
+ | 2 | `guides/wai-way/blueprints/2_entities.md` |
124
+ | 3 | `guides/wai-way/blueprints/3_compose.md` |
125
+ | 4 | `guides/wai-way/blueprints/4_configure.md` |
126
+
127
+ Agent personas: `guides/wai-way/agents/` (extractor, architect, builder, polisher)
128
+
129
+ ## Golden Rule
130
+
131
+ > **The scaffolded files ARE your documentation.**
132
+ > Read the existing code. Follow the pattern. Extend it. Never invent from scratch.
133
+
134
+ ## Key References
135
+
136
+ - `guides/wai-way/spec_template.md` — App specification template (Phase 0 output)
137
+ - `guides/wai-way/entity_patterns.md` — Common entity schemas
138
+ - `guides/wai-way/page_patterns.md` — Common page structures
139
+ - `guides/dndev/` — Framework setup guides (CRUD, Auth, Components, etc.)
@@ -102,7 +102,7 @@ At end of each plan, list unresolved questions (if any). Extremely concise.
102
102
 
103
103
  **BEFORE writing ANY @donotdev component:**
104
104
 
105
- 1. Call `lookup_component({ component: "ComponentName" })`
105
+ 1. Call `lookup_symbol({ symbol: "ComponentName" })`
106
106
  2. Read the actual props from the returned TypeScript interface
107
107
  3. Use ONLY those props
108
108
 
@@ -110,110 +110,19 @@ At end of each plan, list unresolved questions (if any). Extremely concise.
110
110
 
111
111
  If MCP tools unavailable → STOP and tell user to enable MCP.
112
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
113
+ **Key MCP tools:**
114
+ - `lookup_symbol` get actual TypeScript types from `.d.ts`
115
+ - `get_guide` fetch framework setup guides (CRUD, Auth, etc.)
116
+ - `get_guideline` fetch architecture guidelines
117
+ - `search_framework` — search across all guides and symbols
117
118
 
118
- ## WAI-WAY Workflow - Four-Phase System (BMAD-Based)
119
+ ## WAI-WAY Workflow
119
120
 
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
121
+ **Read `AI.md` at the project root for the full workflow.**
125
122
 
126
- **Quality Over Speed:** Each phase must be complete before proceeding. Take as long as needed.
123
+ For each phase (0=BRAINSTORM, 1=SCAFFOLD, 2=ENTITIES, 3=COMPOSE, 4=CONFIGURE):
127
124
 
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)
125
+ 1. `mcp:start_phase(N)` — returns blueprint, context, and lessons
126
+ 2. Work — follow blueprint, call `lookup_symbol` before using any component
127
+ 3. `mcp:complete_phase({ files })` validates conventions + symbol usage, submits for review
128
+ 4. `mcp:approve_phase()` — user approves, phase is done