@donotdev/cli 0.0.12 → 0.0.14

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 (85) hide show
  1. package/dependencies-matrix.json +32 -118
  2. package/dist/bin/commands/agent-setup.d.ts +6 -0
  3. package/dist/bin/commands/agent-setup.d.ts.map +1 -0
  4. package/dist/bin/commands/agent-setup.js +623 -0
  5. package/dist/bin/commands/agent-setup.js.map +1 -0
  6. package/dist/bin/commands/build.js +13 -12
  7. package/dist/bin/commands/bump.js +103 -35
  8. package/dist/bin/commands/cacheout.js +13 -12
  9. package/dist/bin/commands/create-app.js +53 -151
  10. package/dist/bin/commands/create-project.js +109 -167
  11. package/dist/bin/commands/deploy.js +7620 -30
  12. package/dist/bin/commands/dev.js +13 -12
  13. package/dist/bin/commands/emu.js +13 -12
  14. package/dist/bin/commands/firebase-setup.d.ts +6 -0
  15. package/dist/bin/commands/firebase-setup.d.ts.map +1 -0
  16. package/dist/bin/commands/firebase-setup.js +7 -0
  17. package/dist/bin/commands/firebase-setup.js.map +1 -0
  18. package/dist/bin/commands/format.js +13 -12
  19. package/dist/bin/commands/lint.js +13 -12
  20. package/dist/bin/commands/preview.js +13 -12
  21. package/dist/bin/commands/staging.d.ts +11 -0
  22. package/dist/bin/commands/staging.d.ts.map +1 -0
  23. package/dist/bin/commands/staging.js +12 -0
  24. package/dist/bin/commands/staging.js.map +1 -0
  25. package/dist/bin/commands/sync-secrets.js +13 -12
  26. package/dist/bin/commands/wai.js +7397 -11
  27. package/dist/bin/dndev.js +28 -3
  28. package/dist/bin/donotdev.js +28 -3
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +7760 -109
  32. package/dist/index.js.map +1 -1
  33. package/package.json +1 -1
  34. package/templates/app-demo/src/pages/DetailPage.tsx.example +1 -1
  35. package/templates/app-demo/src/pages/FullPage.tsx.example +3 -3
  36. package/templates/app-demo/src/pages/HomePage.tsx.example +1 -1
  37. package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +5 -5
  38. package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +3 -3
  39. package/templates/app-next/.env.example +2 -0
  40. package/templates/app-next/src/pages/HomePage.tsx.example +1 -1
  41. package/templates/app-vite/.env.example +2 -0
  42. package/templates/app-vite/src/pages/HomePage.tsx.example +163 -73
  43. package/templates/functions-firebase/build.mjs.example +26 -10
  44. package/templates/functions-firebase/functions-firebase/build.mjs.example +26 -10
  45. package/templates/functions-firebase/functions.config.js.example +11 -15
  46. package/templates/github-consumer/.github/workflows/ci.yml.example +36 -0
  47. package/templates/root-consumer/.claude/agents/architect.md.example +2 -2
  48. package/templates/root-consumer/.claude/agents/builder.md.example +2 -2
  49. package/templates/root-consumer/.claude/agents/coder.md.example +2 -2
  50. package/templates/root-consumer/.claude/agents/extractor.md.example +2 -3
  51. package/templates/root-consumer/.claude/agents/polisher.md.example +67 -291
  52. package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +4 -4
  53. package/templates/root-consumer/.claude/commands/brainstorm.md.example +1 -1
  54. package/templates/root-consumer/.claude/commands/build.md.example +3 -3
  55. package/templates/root-consumer/.claude/commands/design.md.example +1 -1
  56. package/templates/root-consumer/.claude/commands/polish.md.example +66 -82
  57. package/templates/root-consumer/.dndev/args.json.example +6 -0
  58. package/templates/root-consumer/.env.example +13 -13
  59. package/templates/root-consumer/.gemini/settings.json.example +9 -0
  60. package/templates/root-consumer/.gitignore.example +3 -1
  61. package/templates/root-consumer/AI.md.example +150 -0
  62. package/templates/root-consumer/CLAUDE.md.example +19 -104
  63. package/templates/root-consumer/README.md.example +81 -255
  64. package/templates/root-consumer/entities/Contact.ts.example +126 -0
  65. package/templates/root-consumer/entities/index.ts.example +6 -3
  66. package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +59 -326
  67. package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +2 -1
  68. package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +144 -9
  69. package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +186 -0
  70. package/templates/root-consumer/guides/dndev/INDEX.md.example +10 -0
  71. package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +13 -16
  72. package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +263 -0
  73. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +1 -1
  74. package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +168 -0
  75. package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +17 -19
  76. package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +184 -0
  77. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +134 -69
  78. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +66 -44
  79. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +18 -1
  80. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +1 -0
  81. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +2 -1
  82. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +2 -1
  83. package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +180 -108
  84. package/templates/root-consumer/guides/wai-way/context_map.json.example +8 -7
  85. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +4 -4
@@ -1,145 +1,129 @@
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
6
6
 
7
7
  **⚠️ MODE CHECK:** This command is for **Consumer App Development** only.
8
8
 
9
- **If you're in the framework monorepo (`c:\ws\dndev`):**
9
+ **If you're in the framework monorepo (this repo):**
10
10
  - ❌ **DO NOT use `/polish`** - framework dev doesn't use this workflow
11
11
  - ✅ See [Modes Guide](https://github.com/donotdev/framework/blob/main/docs/development/MODES.md) for framework dev workflow
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`
@@ -0,0 +1,6 @@
1
+ {
2
+ "platform": "firebase",
3
+ "strictness": "enforced",
4
+ "features": ["crud", "auth", "i18n", "billing", "oauth", "functions"],
5
+ "region": "europe-west1"
6
+ }
@@ -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": "bunx",
5
+ "args": ["@donotdev/mcp-server"],
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,150 @@
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. **Verify MCP is working.** Try calling `list_features()`. If it works, you're good. If not:
8
+ - **Cursor:** Settings → Tools & MCP → toggle "donotdev" ON. MCP only works in Composer mode (`Cmd/Ctrl+I`).
9
+ - **Claude Code / Windsurf:** Auto-connects from `.mcp.json`. If broken, check `bun` is in PATH.
10
+ 2. **Check environment setup.** Ask the user: "Have you run `bun install`? Run `dndev dev` and open the app — the homepage has setup steps for Git, Firebase, and .env."
11
+ 3. Call `start_phase(0)` — begin **Phase 0: BRAINSTORM**
12
+ 4. Follow each phase in order. Do not skip phases.
13
+
14
+ ## Environment Variables — Where They Go
15
+
16
+ **Vite loads `.env` from the app directory only. NOT from the repo root.**
17
+
18
+ | File | What Goes Here |
19
+ |------|---------------|
20
+ | `apps/<app>/.env` | Firebase config, license key, Stripe publishable key, all `VITE_*` vars |
21
+ | `apps/<app>/.env.local` | Local overrides (gitignored) |
22
+ | `apps/<app>/.env.staging` | Staging Firebase config (used by `dndev staging`) |
23
+ | `functions/.env` | Server-side secrets: `STRIPE_SECRET_KEY`, OAuth client secrets |
24
+ | Root `.env` | **Not read by Vite.** Reference only. |
25
+
26
+ 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.
27
+
28
+ ## The 5 Phases
29
+
30
+ | Phase | Name | What Happens |
31
+ |-------|------|-------------|
32
+ | 0 | **BRAINSTORM** | Ask questions, understand requirements deeply, produce validated spec |
33
+ | 1 | **SCAFFOLD** | Create all routes and page stubs from spec |
34
+ | 2 | **ENTITIES** | Define all data models (fields, access, visibility) |
35
+ | 3 | **COMPOSE** | Build pages with framework components (hardcode strings) |
36
+ | 4 | **CONFIGURE** | Config, test, polish, optional i18n |
37
+
38
+ Each phase has a blueprint in `guides/wai-way/blueprints/` — read it before starting the phase.
39
+
40
+ For large projects, you can scope phases to a module (e.g., "user-management", "billing").
41
+
42
+ ## The Workflow Per Phase
43
+
44
+ ```
45
+ start_phase(N) → get blueprint + context + lessons from previous sessions
46
+
47
+ work → follow blueprint, use lookup_symbol for every component
48
+
49
+ complete_phase(files) → validate conventions + symbol usage + submit for review
50
+
51
+ [user reviews] → user confirms or requests changes
52
+
53
+ approve_phase() → phase is done, move to next
54
+ ```
55
+
56
+ ## How To Use Components Without Hallucinating
57
+
58
+ **CRITICAL:** Never guess component props. Always look up the actual TypeScript types first.
59
+
60
+ **With MCP (auto-configured):**
61
+ ```
62
+ lookup_symbol({ symbol: "DataTable" }) → returns real TypeScript interface
63
+ lookup_symbol({ symbol: "Card" }) → returns real TypeScript interface
64
+ ```
65
+
66
+ 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.
67
+
68
+ **Without MCP:**
69
+ Read the `.d.ts` file directly:
70
+ ```
71
+ node_modules/@donotdev/crud/dist/index.d.ts → CRUD components
72
+ node_modules/@donotdev/ui/dist/index.d.ts → UI components
73
+ node_modules/@donotdev/core/dist/index.d.ts → Core utilities
74
+ ```
75
+
76
+ ## Supported IDEs
77
+
78
+ MCP gives the AI agent real TypeScript types instead of hallucinated props. Config files are auto-created by `dndev init`.
79
+
80
+ | IDE | Config | Setup |
81
+ |-----|--------|-------|
82
+ | **Claude Code** | `.mcp.json` | Auto-connects. Nothing to do. |
83
+ | **Windsurf** | `.mcp.json` | Auto-connects. Nothing to do. |
84
+ | **Cursor** | `.cursor/mcp.json` | Settings → Tools & MCP → toggle "donotdev" ON. **MCP only works in Composer mode** (`Cmd/Ctrl+I`). |
85
+ | **Gemini CLI** | `.gemini/settings.json` | Auto-connects. Nothing to do. |
86
+
87
+ **If MCP tools aren't available**, guide the user:
88
+ 1. Check `bun` is in PATH (`which bun`)
89
+ 2. **Cursor:** Must be in Composer mode (`Cmd/Ctrl+I`) and server toggled ON
90
+ 3. Check MCP logs: `Cmd/Ctrl+Shift+U` → Output → "MCP Logs"
91
+
92
+ **Without MCP (ChatGPT, Copilot, etc.):** Read blueprints from `guides/wai-way/blueprints/` and types from `node_modules/@donotdev/*/dist/*.d.ts`. You lose symbol tracking and convention enforcement.
93
+
94
+ ## MCP Tools (13 — Pre-Configured)
95
+
96
+ MCP config files are auto-created in `.mcp.json` / `.cursor/mcp.json` / `.gemini/settings.json`. **You must enable the server in your IDE settings** (see "Supported IDEs" above). Once enabled, your IDE connects automatically.
97
+
98
+ | Tool | What It Does |
99
+ |------|-------------|
100
+ | `start_phase(N)` | Begin a phase — returns blueprint, agent persona, context, and lessons |
101
+ | `complete_phase({ files })` | Validate conventions + symbol usage + submit for review (does NOT auto-advance) |
102
+ | `approve_phase()` | User approved — phase is done, advance to next |
103
+ | `get_phase_status()` | Current phase, symbols tracked, review status |
104
+ | `lookup_symbol("X")` | Get actual TypeScript types — tracked per phase |
105
+ | `get_guide("CRUD")` | Fetch framework setup guides |
106
+ | `get_guideline("styling:colors")` | Fetch architecture guidelines (supports sections) |
107
+ | `search_framework("keyword")` | Search across all guides and type definitions |
108
+ | `list_features()` | List all framework packages with summaries |
109
+ | `record_lesson("text")` | Save to project memory (returned on next start_phase) |
110
+ | `init_implementation({ from_spec: true })` | Create `.dndev/implementation.md` to track progress |
111
+ | `update_progress({ item: "...", done: true })` | Tick/untick items in implementation checklist |
112
+ | `get_progress()` | Read implementation progress stats |
113
+ | `get_project_history()` | Get captain's log with full session history |
114
+
115
+ ## Convention Enforcement
116
+
117
+ `complete_phase` checks for:
118
+ - Inline styles (`style={{}}`) — use className
119
+ - fontSize/font-size — use Text levels or Card props
120
+ - textAlign left/right — use start/end for RTL
121
+ - require() — use ESM imports
122
+ - Manual date formatting — use formatDate() from @donotdev/core
123
+ - Import order — React > vendors > @donotdev > relative
124
+ - Unverified components — @donotdev components used without lookup_symbol
125
+
126
+ ## Without MCP — Manual Fallback
127
+
128
+ Read the blueprints directly:
129
+
130
+ | Phase | Read This |
131
+ |-------|-----------|
132
+ | 0 | `guides/wai-way/blueprints/0_brainstorm.md` |
133
+ | 1 | `guides/wai-way/blueprints/1_scaffold.md` |
134
+ | 2 | `guides/wai-way/blueprints/2_entities.md` |
135
+ | 3 | `guides/wai-way/blueprints/3_compose.md` |
136
+ | 4 | `guides/wai-way/blueprints/4_configure.md` |
137
+
138
+ Agent personas: `guides/wai-way/agents/` (extractor, architect, builder, polisher)
139
+
140
+ ## Golden Rule
141
+
142
+ > **The scaffolded files ARE your documentation.**
143
+ > Read the existing code. Follow the pattern. Extend it. Never invent from scratch.
144
+
145
+ ## Key References
146
+
147
+ - `guides/wai-way/spec_template.md` — App specification template (Phase 0 output)
148
+ - `guides/wai-way/entity_patterns.md` — Common entity schemas
149
+ - `guides/wai-way/page_patterns.md` — Common page structures
150
+ - `guides/dndev/` — Framework setup guides (CRUD, Auth, Components, etc.)
@@ -17,7 +17,7 @@
17
17
  - **Creating with framework** (Mode 3): Build new app features
18
18
  - **Tweaking framework app** (Mode 4): Modify existing app features
19
19
 
20
- **CLI:** `dndev` (public CLI, installed globally)
20
+ **CLI:** `dndev` (public CLI, installed globally via `npm install -g @donotdev/cli`)
21
21
 
22
22
  **Workflow:**
23
23
  1. `/design [requirement]` → Architect designs solution
@@ -29,7 +29,7 @@
29
29
  **⚠️ IMPORTANT:**
30
30
  - Use ONLY published `@donotdev/*` packages
31
31
  - Cannot modify framework internals
32
- - If framework needs changes, work in monorepo (`c:\ws\dndev`)
32
+ - If framework needs changes, work in the framework monorepo (this repo)
33
33
 
34
34
  ---
35
35
 
@@ -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,25 @@ 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
+ ## Project Args & Gotchas
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
+ - **`.dndev/args.json`** — Per-project config (platform, strictness, features, region). All features ON by default. Phase 0 narrows down. Edit `strictness` to control validation: `enforced` (default) | `warnings` | `permissive`.
122
+ - **`guides/dndev/GOTCHAS.md`** Common mistakes, phase-tagged. Read directly or loaded by MCP `start_phase()`.
123
+ - **Without MCP:** Both files are plain JSON/markdown — any agent reads them directly. MCP automates filtering + enforcement but is not required.
125
124
 
126
- **Quality Over Speed:** Each phase must be complete before proceeding. Take as long as needed.
125
+ ## WAI-WAY Workflow
127
126
 
128
- ### Brainstorm Phase
127
+ **Read `AI.md` at the project root for the full workflow.**
129
128
 
130
- **Use `/brainstorm [app idea]` to extract complete requirements.**
129
+ For each phase (0=BRAINSTORM, 1=SCAFFOLD, 2=ENTITIES, 3=COMPOSE, 4=CONFIGURE):
131
130
 
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)
131
+ 1. `mcp:start_phase(N)` — returns blueprint, context, lessons, project args, and phase-relevant gotchas
132
+ 2. Work follow blueprint, call `lookup_symbol` before using any component
133
+ 3. `mcp:complete_phase({ files })` validates conventions + symbol usage (respects `strictness`), submits for review
134
+ 4. `mcp:approve_phase()` user approves, phase is done