@donotdev/cli 0.0.20 → 0.0.21
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/README.md +31 -0
- package/dependencies-matrix.json +86 -19
- package/dist/bin/commands/agent-setup.js +2 -2
- package/dist/bin/commands/build.js +6 -6
- package/dist/bin/commands/bump.js +491 -69
- package/dist/bin/commands/cacheout.js +6 -6
- package/dist/bin/commands/coach.js +6 -6
- package/dist/bin/commands/create-app.js +23 -15
- package/dist/bin/commands/create-project.js +101 -16
- package/dist/bin/commands/db.js +142136 -0
- package/dist/bin/commands/deploy.js +336 -126
- package/dist/bin/commands/dev.js +6 -6
- package/dist/bin/commands/doctor.js +140 -33
- package/dist/bin/commands/emu.js +6 -6
- package/dist/bin/commands/format.js +6 -6
- package/dist/bin/commands/get-demo.js +11 -6
- package/dist/bin/commands/make-admin.js +14210 -13770
- package/dist/bin/commands/preview.js +6 -6
- package/dist/bin/commands/seed.js +142426 -0
- package/dist/bin/commands/setup-cicd.js +8904 -0
- package/dist/bin/commands/setup.js +256 -212
- package/dist/bin/commands/staging.js +343 -127
- package/dist/bin/commands/sync-secrets.js +55 -33
- package/dist/bin/commands/type-check.js +6 -6
- package/dist/bin/commands/wai.js +6 -6
- package/dist/bin/dndev.js +76 -11
- package/dist/bin/donotdev.js +21 -12
- package/dist/index.js +437 -142
- package/package.json +1 -1
- package/templates/app-demo/.env.example +1 -0
- package/templates/{root-consumer → app-demo}/entities/ExampleEntity.ts.example +15 -9
- package/templates/app-demo/index.html.example +1 -1
- package/templates/app-dndev/index.html.example +164 -0
- package/templates/app-dndev/public/logo.svg.example +1 -0
- package/templates/app-dndev/public/manifest.json.example +10 -0
- package/templates/app-dndev/src/App.tsx.example +35 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +181 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +209 -0
- package/templates/app-dndev/src/components/Kanban.css.example +385 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +32 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +68 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +228 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +714 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +49 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +107 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +352 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +126 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +147 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +115 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +366 -0
- package/templates/app-dndev/src/config/app.ts.example +103 -0
- package/templates/app-dndev/src/config/commands.ts.example +171 -0
- package/templates/app-dndev/src/config/legal.ts.example +170 -0
- package/templates/app-dndev/src/config/providers.ts.example +7 -0
- package/templates/app-dndev/src/globals.css.example +10 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +144 -0
- package/templates/app-dndev/src/main.tsx.example +21 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +640 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +658 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +347 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +33 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +137 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +64 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +386 -0
- package/templates/app-dndev/src/themes.css.example +161 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +341 -0
- package/templates/app-dndev/tsconfig.json.example +9 -0
- package/templates/app-dndev/vite.config.ts.example +24 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/index.html.example +1 -1
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/functions-supabase/supabase/functions/.env.example +0 -2
- package/templates/root-consumer/.claude/commands/grill.md.example +86 -8
- package/templates/root-consumer/.dndev.secrets.example +32 -0
- package/templates/root-consumer/.gitignore.example +3 -0
- package/templates/root-consumer/AI.md.example +4 -0
- package/templates/root-consumer/entities/index.ts.example +2 -5
- package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +4 -0
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +23 -20
- package/templates/root-consumer/guides/dndev/INDEX.md.example +1 -0
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +3 -7
- package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +115 -0
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +41 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +13 -18
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +17 -12
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
- package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +185 -251
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +26 -8
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +66 -49
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +6 -5
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +9 -9
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +1 -1
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +7 -6
- package/templates/root-consumer/guides/wai-way/context_map.json.example +51 -20
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +138 -0
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +103 -0
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +140 -0
- /package/templates/{root-consumer → app-demo}/entities/Contact.ts.example +0 -0
- /package/templates/{root-consumer → app-demo}/entities/demo.ts.example +0 -0
|
@@ -11,7 +11,7 @@ agent:
|
|
|
11
11
|
title: Requirements Extractor
|
|
12
12
|
icon: 🧠
|
|
13
13
|
phases: ["0_brainstorm_spec", "1_scaffold_sitemap"]
|
|
14
|
-
done_when: "
|
|
14
|
+
done_when: "PRD.md + HLD.md + LLD.md produced from spec_template.md conversation - validated by user"
|
|
15
15
|
|
|
16
16
|
persona:
|
|
17
17
|
role: Product Strategist & Requirements Engineer
|
|
@@ -42,7 +42,7 @@ core_principles:
|
|
|
42
42
|
- **Spec Drift:** Any changes to the validated spec must be logged in `spec_changes.md` for human review.
|
|
43
43
|
|
|
44
44
|
phase_0_brainstorm:
|
|
45
|
-
goal: DEEPLY understand the app and produce
|
|
45
|
+
goal: DEEPLY understand the app and produce PRD.md + HLD.md + LLD.md
|
|
46
46
|
mindset: "If I can't answer any question about this app, I haven't asked enough questions yet."
|
|
47
47
|
|
|
48
48
|
question_flow:
|
|
@@ -122,11 +122,16 @@ phase_0_brainstorm:
|
|
|
122
122
|
- "Which features are 'Delighters' (Marketing/Heroes) vs 'Must-Haves' (CRUD)?"
|
|
123
123
|
done_when: "Navigation hierarchy planned; high-friction paths challenged"
|
|
124
124
|
|
|
125
|
-
output:
|
|
125
|
+
output: |
|
|
126
|
+
Three documents produced in docs/:
|
|
127
|
+
- docs/PRD.md — requirements, journeys, rules, permissions, overrides (Section 11)
|
|
128
|
+
- docs/HLD.md — architecture, preset, auth, pages, features
|
|
129
|
+
- docs/LLD.md — per-entity field specs, state machines, access matrices
|
|
130
|
+
Then: init_implementation({ from_spec: true }) → .dndev/implementation.md
|
|
126
131
|
|
|
127
132
|
phase_1_scaffold:
|
|
128
|
-
goal: Create an Interactive Prototype from the validated
|
|
129
|
-
prerequisite: "
|
|
133
|
+
goal: Create an Interactive Prototype from the validated documents
|
|
134
|
+
prerequisite: "docs/PRD.md, docs/HLD.md, docs/LLD.md are COMPLETE — no TBDs"
|
|
130
135
|
steps:
|
|
131
136
|
- Verify spec is truly complete
|
|
132
137
|
- Create *Page.tsx files for each route in spec
|
|
@@ -160,6 +165,9 @@ validation_checklist:
|
|
|
160
165
|
read_files:
|
|
161
166
|
- "guides/wai-way/blueprints/0_brainstorm.md"
|
|
162
167
|
- "guides/wai-way/spec_template.md"
|
|
168
|
+
- "guides/wai-way/prd_template.md"
|
|
169
|
+
- "guides/wai-way/hld_template.md"
|
|
170
|
+
- "guides/wai-way/lld_template.md"
|
|
163
171
|
- "guides/wai-way/presets_guide.md"
|
|
164
172
|
- "guides/wai-way/entity_patterns.md"
|
|
165
173
|
- "guides/wai-way/page_patterns.md"
|
|
@@ -185,12 +193,15 @@ Activate AGENT Extractor.
|
|
|
185
193
|
|
|
186
194
|
READ these files FIRST:
|
|
187
195
|
- guides/wai-way/blueprints/0_brainstorm.md (DEEP requirements process)
|
|
188
|
-
- guides/wai-way/spec_template.md (
|
|
196
|
+
- guides/wai-way/spec_template.md (conversation FORMAT — the shell you fill through questions)
|
|
197
|
+
- guides/wai-way/prd_template.md (OUTPUT format for Product Requirements)
|
|
198
|
+
- guides/wai-way/hld_template.md (OUTPUT format for High-Level Design)
|
|
199
|
+
- guides/wai-way/lld_template.md (OUTPUT format for Low-Level Design)
|
|
189
200
|
- guides/wai-way/presets_guide.md (preset = config change)
|
|
190
201
|
- guides/wai-way/entity_patterns.md (common entity schemas)
|
|
191
202
|
- guides/wai-way/page_patterns.md (common page structures)
|
|
192
203
|
|
|
193
|
-
Your goal: DEEPLY understand the app
|
|
204
|
+
Your goal: DEEPLY understand the app, then produce docs/PRD.md + docs/HLD.md + docs/LLD.md.
|
|
194
205
|
|
|
195
206
|
DO NOT RUSH. The #1 cause of wasted work is incomplete requirements.
|
|
196
207
|
|
|
@@ -211,7 +222,12 @@ KEEP ASKING until you can:
|
|
|
211
222
|
- Define every entity with states and permissions
|
|
212
223
|
- Answer "what happens when X?" for any scenario
|
|
213
224
|
|
|
214
|
-
Only THEN
|
|
225
|
+
Only THEN present summary for validation, and SPLIT into:
|
|
226
|
+
- docs/PRD.md (requirements, journeys, rules, permissions)
|
|
227
|
+
- docs/HLD.md (architecture, preset, auth, pages, features)
|
|
228
|
+
- docs/LLD.md (per-entity field specs, state machines, access matrices)
|
|
229
|
+
|
|
230
|
+
Then call init_implementation({ from_spec: true }) to create the macro plan.
|
|
215
231
|
```
|
|
216
232
|
|
|
217
233
|
## EXAMPLE CONVERSATION FLOW (THOROUGH)
|
|
@@ -343,3 +359,5 @@ You've done Phase 0 correctly when:
|
|
|
343
359
|
- [ ] Every entity has CRUD permissions for every role
|
|
344
360
|
- [ ] Every business rule is documented
|
|
345
361
|
- [ ] User has said "yes, that's complete"
|
|
362
|
+
- [ ] docs/PRD.md, docs/HLD.md, docs/LLD.md written and validated
|
|
363
|
+
- [ ] .dndev/implementation.md created via init_implementation({ from_spec: true })
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# BLUEPRINT: 0_BRAINSTORM →
|
|
1
|
+
# BLUEPRINT: 0_BRAINSTORM → PRD + HLD + LLD
|
|
2
2
|
|
|
3
|
-
**Goal:** Deeply understand the app and
|
|
3
|
+
**Goal:** Deeply understand the app and produce THREE validated specification documents.
|
|
4
4
|
|
|
5
5
|
**MCP:** `start_phase(0)` to begin. `complete_phase()` when done.
|
|
6
|
-
**Done when:** `docs/HLD.md
|
|
6
|
+
**Done when:** `docs/PRD.md`, `docs/HLD.md`, `docs/LLD.md` are COMPLETE and user has validated them.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ It returns a one-line summary from each framework package README (core, ui, temp
|
|
|
19
19
|
|
|
20
20
|
**The #1 cause of wasted work is incomplete requirements.**
|
|
21
21
|
|
|
22
|
-
Before
|
|
22
|
+
Before producing documents, you MUST have:
|
|
23
23
|
- [ ] Complete understanding of what users DO (not just what data exists)
|
|
24
24
|
- [ ] All user journeys mapped step-by-step
|
|
25
25
|
- [ ] Business rules and validations documented
|
|
@@ -37,7 +37,8 @@ User provides idea
|
|
|
37
37
|
↓
|
|
38
38
|
Agent calls list_features() → matches needs to existing framework capabilities
|
|
39
39
|
↓
|
|
40
|
-
|
|
40
|
+
Agent asks IDENTITY questions (who, what, why, and **Aesthetic Essence**)
|
|
41
|
+
↓
|
|
41
42
|
Agent asks USER JOURNEY questions (what do users DO step by step?)
|
|
42
43
|
↓
|
|
43
44
|
Agent asks DATA questions (what entities, relationships, states?)
|
|
@@ -46,11 +47,13 @@ Agent asks BUSINESS RULES questions (validations, permissions, constraints)
|
|
|
46
47
|
↓
|
|
47
48
|
Agent asks EDGE CASE questions (what if X fails? what about Y?)
|
|
48
49
|
↓
|
|
49
|
-
Agent fills
|
|
50
|
+
Agent fills spec_template.md FORMAT through conversation
|
|
51
|
+
↓
|
|
52
|
+
Agent presents summary for user validation
|
|
50
53
|
↓
|
|
51
|
-
Agent
|
|
54
|
+
User confirms → Agent SPLITS into PRD.md + HLD.md + LLD.md
|
|
52
55
|
↓
|
|
53
|
-
|
|
56
|
+
Agent calls init_implementation({ from_spec: true }) → creates implementation.md
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
---
|
|
@@ -144,7 +147,7 @@ Ask about validations and constraints:
|
|
|
144
147
|
```
|
|
145
148
|
## Business Rules: Orders
|
|
146
149
|
|
|
147
|
-
- Order total = sum(item.price
|
|
150
|
+
- Order total = sum(item.price x item.quantity) + shipping - discount
|
|
148
151
|
- Discount cannot exceed 50% of subtotal
|
|
149
152
|
- Order cannot be cancelled after shipping
|
|
150
153
|
- Stock is reserved when order is confirmed, released if cancelled
|
|
@@ -188,35 +191,50 @@ For EACH entity AND action:
|
|
|
188
191
|
|
|
189
192
|
---
|
|
190
193
|
|
|
191
|
-
### 7.
|
|
194
|
+
### 7. UX INTENT (The "Where + Flow")
|
|
192
195
|
|
|
193
|
-
- "
|
|
194
|
-
- "
|
|
195
|
-
- "Who needs to be notified when [event]?"
|
|
196
|
-
- "What needs to work offline?"
|
|
197
|
-
- "What needs real-time updates?"
|
|
196
|
+
- "Where should the shortcut for the North Star action live? (Goal: < 2 clicks)"
|
|
197
|
+
- "Which features are 'Delighters' (Marketing/Heroes) vs 'Must-Haves' (CRUD)?"
|
|
198
198
|
|
|
199
199
|
---
|
|
200
200
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
Only after ALL questions are answered,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
201
|
+
## Producing the Documents
|
|
202
|
+
|
|
203
|
+
Only after ALL questions are answered, use `spec_template.md` as the FORMAT to organize gathered information, then SPLIT into three documents:
|
|
204
|
+
|
|
205
|
+
### What Goes Where
|
|
206
|
+
|
|
207
|
+
**`docs/PRD.md`** (from `prd_template.md`):
|
|
208
|
+
- Identity (name, users, value prop, North Star)
|
|
209
|
+
- User journeys (numbered steps, success/failure criteria)
|
|
210
|
+
- Business rules (validations, calculations, triggers)
|
|
211
|
+
- Permissions matrix (who can CRUD what)
|
|
212
|
+
- Edge cases and error handling
|
|
213
|
+
- Design decision overrides
|
|
214
|
+
|
|
215
|
+
**`docs/HLD.md`** (from `hld_template.md`):
|
|
216
|
+
- Preset selection and rationale
|
|
217
|
+
- Auth model (providers, roles, self-registration)
|
|
218
|
+
- Billing model (if applicable)
|
|
219
|
+
- Aesthetic essence
|
|
220
|
+
- Page map (routes, purpose, which journey they serve)
|
|
221
|
+
- Entity relationship diagram (text-based overview)
|
|
222
|
+
- Feature flags (i18n, PWA, real-time, uploads, etc.)
|
|
223
|
+
- Architecture decisions and trade-offs
|
|
224
|
+
|
|
225
|
+
**`docs/LLD.md`** (from `lld_template.md`):
|
|
226
|
+
- Per-entity detailed spec:
|
|
227
|
+
- Field definitions (name, type, required, validation, visibility)
|
|
228
|
+
- State machine (from/to/trigger/who/side-effects)
|
|
229
|
+
- Relationships (type, target, via field, cascade rule)
|
|
230
|
+
- Access matrix (CRUD per role per condition)
|
|
231
|
+
- Cross-entity validation rules
|
|
214
232
|
|
|
215
233
|
---
|
|
216
234
|
|
|
217
235
|
## Validation: The Completeness Test
|
|
218
236
|
|
|
219
|
-
Before
|
|
237
|
+
Before producing the three documents, verify:
|
|
220
238
|
|
|
221
239
|
### Can You Answer These?
|
|
222
240
|
|
|
@@ -227,24 +245,24 @@ Before presenting spec to user, verify:
|
|
|
227
245
|
- [ ] "Who can [action] on [entity]?" → Know for every combination
|
|
228
246
|
- [ ] "What if [failure scenario]?" → Have answer for common failures
|
|
229
247
|
|
|
230
|
-
### Is
|
|
231
|
-
|
|
232
|
-
- [ ] Every entity has fields, relationships, states documented
|
|
233
|
-
- [ ] Every user journey has numbered steps
|
|
234
|
-
- [ ] Every business rule is explicit
|
|
235
|
-
- [ ] Every permission is defined
|
|
236
|
-
- [ ] No "TBD" or "TODO" in the spec
|
|
248
|
+
### Is Everything Complete?
|
|
237
249
|
|
|
238
|
-
|
|
250
|
+
- [ ] Every user journey has 5+ numbered steps
|
|
251
|
+
- [ ] Every entity has fields, states, and state transitions
|
|
252
|
+
- [ ] Every entity has CRUD permissions for every role
|
|
253
|
+
- [ ] Every business rule is documented explicitly
|
|
254
|
+
- [ ] Every page traces back to a user journey
|
|
255
|
+
- [ ] No "TBD", "TODO", or empty fields
|
|
256
|
+
- [ ] User has said "yes, that's complete"
|
|
239
257
|
|
|
240
258
|
---
|
|
241
259
|
|
|
242
|
-
## Presenting
|
|
260
|
+
## Presenting for Validation
|
|
243
261
|
|
|
244
|
-
When
|
|
262
|
+
When ready, present a summary:
|
|
245
263
|
|
|
246
264
|
```markdown
|
|
247
|
-
##
|
|
265
|
+
## Specification Summary
|
|
248
266
|
|
|
249
267
|
### Identity
|
|
250
268
|
**Name:** [App Name]
|
|
@@ -281,18 +299,17 @@ What's missing or incorrect?
|
|
|
281
299
|
|
|
282
300
|
## Output
|
|
283
301
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
- User validation
|
|
302
|
+
User validates → produce three documents in `docs/`:
|
|
303
|
+
|
|
304
|
+
1. **`docs/PRD.md`** — requirements, journeys, rules, permissions
|
|
305
|
+
2. **`docs/HLD.md`** — architecture, preset, auth, pages, features
|
|
306
|
+
3. **`docs/LLD.md`** — detailed entity specs, state machines, access matrices
|
|
290
307
|
|
|
291
|
-
|
|
308
|
+
Then generate the implementation tracker:
|
|
292
309
|
```
|
|
293
310
|
init_implementation({ from_spec: true })
|
|
294
311
|
```
|
|
295
|
-
This creates `.dndev/implementation.md` with checklist items for all phases
|
|
312
|
+
This creates `.dndev/implementation.md` with checklist items for all phases.
|
|
296
313
|
|
|
297
|
-
**
|
|
314
|
+
**Documents validated AND complete? Move to Phase 1: SCAFFOLD.**
|
|
298
315
|
**Anything unclear? Keep asking questions.**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**MCP:** `start_phase(1)` to begin. `complete_phase()` when done.
|
|
6
6
|
**Done when:** All routes listed, all *Page.tsx files created with correct PageMeta.
|
|
7
7
|
|
|
8
|
-
**Prerequisite:** Phase 0
|
|
8
|
+
**Prerequisite:** Phase 0 complete — `docs/PRD.md`, `docs/HLD.md`, `docs/LLD.md` validated.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -51,17 +51,18 @@ It shows the canonical pattern:
|
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
-
## Step 3: Review
|
|
54
|
+
## Step 3: Review Pages from HLD
|
|
55
55
|
|
|
56
|
-
From
|
|
56
|
+
From `docs/HLD.md` section 5 (Page Map), you have the list of pages. Now create them.
|
|
57
57
|
|
|
58
|
+
**READ:** `docs/HLD.md` for the page map and `docs/PRD.md` for the user journeys they serve.
|
|
58
59
|
**READ:** `guides/wai-way/page_patterns.md` for page structure patterns.
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
|
62
|
-
## Step
|
|
63
|
+
## Step 4: Create Page Files
|
|
63
64
|
|
|
64
|
-
For each page in
|
|
65
|
+
For each page in HLD page map:
|
|
65
66
|
|
|
66
67
|
```bash
|
|
67
68
|
touch src/pages/AboutPage.tsx
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# BLUEPRINT: 2_ENTITIES
|
|
2
2
|
|
|
3
|
-
**Goal:** Define all data models from
|
|
3
|
+
**Goal:** Define all data models from `docs/LLD.md` (Single Source of Truth).
|
|
4
4
|
|
|
5
5
|
**MCP:** `start_phase(2)` to begin. Use `lookup_symbol('defineEntity')` for types. `complete_phase()` when done.
|
|
6
6
|
**Done when:** All entities defined with fields, access rules, visibility. Exported from index.ts.
|
|
7
7
|
|
|
8
|
-
**Prerequisite:** Phase 0 (
|
|
8
|
+
**Prerequisite:** Phase 0 (PRD + HLD + LLD) and Phase 1 (scaffold) complete.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## Step 1: Review
|
|
12
|
+
## Step 1: Review LLD Entities
|
|
13
13
|
|
|
14
|
-
From
|
|
14
|
+
From `docs/LLD.md`, you have the per-entity specs: fields, state machines, relationships, access matrices.
|
|
15
15
|
|
|
16
16
|
**READ:** `guides/wai-way/entity_patterns.md` for common schemas:
|
|
17
17
|
- UserProfile, Post, Product, Order, Review, Comment
|
|
@@ -21,12 +21,12 @@ From your spec, you have a list of entities with fields and access rules.
|
|
|
21
21
|
|
|
22
22
|
## Step 2: Create Entity Files
|
|
23
23
|
|
|
24
|
-
For each entity in
|
|
24
|
+
For each entity in `docs/LLD.md`:
|
|
25
25
|
|
|
26
26
|
1. Find matching pattern in `entity_patterns.md`
|
|
27
27
|
2. Copy pattern → `entities/[Entity].ts`
|
|
28
|
-
3. Customize fields from
|
|
29
|
-
4. Set access rules from
|
|
28
|
+
3. Customize fields from LLD field definitions
|
|
29
|
+
4. Set access rules from LLD access matrix
|
|
30
30
|
|
|
31
31
|
**READ:** `entities/ExampleEntity.ts` for the base pattern.
|
|
32
32
|
|
|
@@ -106,6 +106,6 @@ export { orderEntity } from './Order';
|
|
|
106
106
|
## Output
|
|
107
107
|
|
|
108
108
|
- [ ] All entities from spec defined in `entities/`
|
|
109
|
-
- [ ] Fields match
|
|
110
|
-
- [ ] Access rules match
|
|
109
|
+
- [ ] Fields match LLD
|
|
110
|
+
- [ ] Access rules match LLD
|
|
111
111
|
- [ ] Exported from `entities/index.ts`
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**MCP:** `start_phase(3)` to begin. Use `lookup_symbol(component_name)` for types. `complete_phase()` when done.
|
|
6
6
|
**Done when:** All pages functional with content. CRUD pages use EntityList/EntityFormRenderer. All strings hardcoded.
|
|
7
7
|
|
|
8
|
-
**Prerequisite:** Phase 0-2 complete.
|
|
8
|
+
**Prerequisite:** Phase 0-2 complete. PRD + HLD + LLD validated, entities defined.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**MCP:** `start_phase(4)` to begin. `complete_phase({ files: [...], lesson: "..." })` when done.
|
|
6
6
|
**Done when:** Tests pass, config complete, firestore rules generated.
|
|
7
7
|
|
|
8
|
-
**Prerequisite:** Phase 0-3 complete.
|
|
8
|
+
**Prerequisite:** Phase 0-3 complete. PRD + HLD + LLD validated, app is functional with hardcoded strings.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -41,7 +41,8 @@ import '@testing-library/jest-dom';
|
|
|
41
41
|
## Step 2: Generate Entity Tests
|
|
42
42
|
|
|
43
43
|
**READ:** `entities/index.ts` — get the list of all entities.
|
|
44
|
-
**READ:** `
|
|
44
|
+
**READ:** `docs/PRD.md` — get the permissions matrix and business rules.
|
|
45
|
+
**READ:** `docs/LLD.md` — get the per-entity access matrices.
|
|
45
46
|
|
|
46
47
|
For **each entity** in `entities/`, create `tests/entities/[EntityName].test.ts`:
|
|
47
48
|
|
|
@@ -61,13 +62,13 @@ For **each page**, create `tests/pages/[PageName].test.tsx`:
|
|
|
61
62
|
|
|
62
63
|
- [ ] Page renders without error
|
|
63
64
|
- [ ] PageMeta is defined (title, auth, admin)
|
|
64
|
-
- [ ] Route protection matches
|
|
65
|
+
- [ ] Route protection matches HLD page map (public pages have `auth: false`, protected have `auth: true`, admin have `admin: true`)
|
|
65
66
|
|
|
66
67
|
---
|
|
67
68
|
|
|
68
69
|
## Step 4: Generate Access Control Tests
|
|
69
70
|
|
|
70
|
-
**READ:**
|
|
71
|
+
**READ:** `docs/PRD.md` permissions matrix and `docs/LLD.md` access matrices.
|
|
71
72
|
|
|
72
73
|
Create `tests/access/access-rules.test.ts`:
|
|
73
74
|
|
|
@@ -99,9 +100,9 @@ Create `firestore.rules` from entity access rules:
|
|
|
99
100
|
|
|
100
101
|
### app.ts
|
|
101
102
|
**READ:** `src/config/app.ts`
|
|
102
|
-
- [ ] `APP_NAME` from
|
|
103
|
+
- [ ] `APP_NAME` from PRD
|
|
103
104
|
- [ ] `APP_SHORT_NAME` abbreviation
|
|
104
|
-
- [ ] `preset` from
|
|
105
|
+
- [ ] `preset` from HLD (landing/admin/moolti/docs/blog/game/plain)
|
|
105
106
|
- [ ] Footer legal links
|
|
106
107
|
|
|
107
108
|
### legal.ts
|
|
@@ -1,36 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "WAI-WAY context map - maps phases to required files. READ the scaffolded files, they contain inline documentation.",
|
|
3
3
|
"golden_rule": "THE SCAFFOLDED FILES ARE YOUR DOCUMENTATION. Read the file. Follow the pattern. Extend.",
|
|
4
|
+
"document_chain": {
|
|
5
|
+
"spec_template.md": "FORMAT — the empty shell the Extractor fills through conversation. NOT kept as-is.",
|
|
6
|
+
"docs/PRD.md": "OUTPUT — Product Requirements (journeys, rules, permissions). The WHAT.",
|
|
7
|
+
"docs/HLD.md": "OUTPUT — High-Level Design (preset, auth, pages, features). The HOW (big picture).",
|
|
8
|
+
"docs/LLD.md": "OUTPUT — Low-Level Design (per-entity specs, state machines, access). The HOW (detailed).",
|
|
9
|
+
".dndev/implementation.md": "MACRO PLAN — checklist per phase. Versioned, archived per project version.",
|
|
10
|
+
".dndev/captain-log.json": "SESSION HISTORY — auto-recorded on approve_phase. Never deleted.",
|
|
11
|
+
".dndev/LESSONS.md": "GOTCHAS — tagged, scored, filtered by phase. Never deleted."
|
|
12
|
+
},
|
|
4
13
|
"phases": {
|
|
5
|
-
"
|
|
14
|
+
"0_brainstorm": {
|
|
6
15
|
"agent": "extractor",
|
|
7
|
-
"goal": "Gather requirements through conversation and produce validated
|
|
8
|
-
"flow": "User idea → Agent questions → Agent
|
|
9
|
-
"done_when": "
|
|
16
|
+
"goal": "Gather requirements through conversation and produce validated specification documents",
|
|
17
|
+
"flow": "User idea → Agent questions (using spec_template.md format) → User validates → Agent splits into PRD + HLD + LLD",
|
|
18
|
+
"done_when": "docs/PRD.md + docs/HLD.md + docs/LLD.md complete and validated by user",
|
|
10
19
|
"read_files": [
|
|
11
20
|
"guides/wai-way/spec_template.md",
|
|
21
|
+
"guides/wai-way/prd_template.md",
|
|
22
|
+
"guides/wai-way/hld_template.md",
|
|
23
|
+
"guides/wai-way/lld_template.md",
|
|
12
24
|
"guides/wai-way/presets_guide.md",
|
|
13
25
|
"guides/wai-way/entity_patterns.md",
|
|
14
26
|
"guides/wai-way/page_patterns.md"
|
|
15
27
|
],
|
|
16
|
-
"output": "
|
|
28
|
+
"output": "docs/PRD.md, docs/HLD.md, docs/LLD.md, .dndev/implementation.md"
|
|
17
29
|
},
|
|
18
|
-
"
|
|
30
|
+
"1_scaffold": {
|
|
19
31
|
"agent": "extractor",
|
|
20
|
-
"goal": "Running app with all routes defined",
|
|
21
|
-
"done_when": "All routes listed, all *Page.tsx files created with correct PageMeta",
|
|
32
|
+
"goal": "Running app with all routes defined as interactive prototype stubs",
|
|
33
|
+
"done_when": "All routes listed, all *Page.tsx files created with correct PageMeta, clickable prototype",
|
|
22
34
|
"read_files": [
|
|
35
|
+
"docs/PRD.md",
|
|
36
|
+
"docs/HLD.md",
|
|
23
37
|
"src/pages/HomePage.tsx",
|
|
24
38
|
"src/config/app.ts",
|
|
25
39
|
"guides/wai-way/page_patterns.md"
|
|
26
40
|
],
|
|
27
|
-
"output": "All *Page.tsx files created with
|
|
41
|
+
"output": "All *Page.tsx files created with PageMeta, clickable prototype"
|
|
28
42
|
},
|
|
29
43
|
"2_entities": {
|
|
30
44
|
"agent": "architect",
|
|
31
|
-
"goal": "Define all data models",
|
|
45
|
+
"goal": "Define all data models from LLD",
|
|
32
46
|
"done_when": "All entities defined with fields, access, visibility. Exported from index.ts",
|
|
33
47
|
"read_files": [
|
|
48
|
+
"docs/LLD.md",
|
|
34
49
|
"entities/ExampleEntity.ts",
|
|
35
50
|
"entities/index.ts",
|
|
36
51
|
"guides/wai-way/entity_patterns.md"
|
|
@@ -42,6 +57,8 @@
|
|
|
42
57
|
"goal": "Build pages with components (hardcoded strings)",
|
|
43
58
|
"done_when": "All pages functional, CRUD uses EntityList/EntityFormRenderer, strings hardcoded",
|
|
44
59
|
"read_files": [
|
|
60
|
+
"docs/PRD.md",
|
|
61
|
+
"docs/HLD.md",
|
|
45
62
|
"src/pages/ListPageExample.tsx",
|
|
46
63
|
"src/pages/FormPageExample.tsx",
|
|
47
64
|
"src/pages/HomePage.tsx",
|
|
@@ -51,24 +68,38 @@
|
|
|
51
68
|
},
|
|
52
69
|
"4_configure_test": {
|
|
53
70
|
"agent": "polisher",
|
|
54
|
-
"goal": "Generate tests
|
|
71
|
+
"goal": "Generate tests, firestore rules, CI/CD, finalize config",
|
|
55
72
|
"done_when": "Tests pass, firestore.rules generated, config complete, mobile responsive",
|
|
56
73
|
"read_files": [
|
|
57
|
-
"
|
|
74
|
+
"docs/PRD.md",
|
|
75
|
+
"docs/LLD.md",
|
|
58
76
|
"entities/index.ts",
|
|
59
77
|
"src/config/app.ts",
|
|
60
78
|
"src/config/legal.ts",
|
|
61
79
|
"guides/dndev/SETUP_TESTING.md"
|
|
62
80
|
],
|
|
63
|
-
"output": "Test files, firestore.rules, configured app"
|
|
81
|
+
"output": "Test files, firestore.rules, CI/CD, configured app"
|
|
64
82
|
}
|
|
65
83
|
},
|
|
66
84
|
"key_files": {
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
|
|
85
|
+
"spec_documents": {
|
|
86
|
+
"docs/PRD.md": "Product Requirements — journeys, rules, permissions (produced by P0)",
|
|
87
|
+
"docs/HLD.md": "High-Level Design — preset, auth, pages, features (produced by P0)",
|
|
88
|
+
"docs/LLD.md": "Low-Level Design — per-entity specs, state machines, access (produced by P0)"
|
|
89
|
+
},
|
|
90
|
+
"spec_formats": {
|
|
91
|
+
"guides/wai-way/spec_template.md": "Conversation FORMAT — empty shell agent fills through questions",
|
|
92
|
+
"guides/wai-way/prd_template.md": "Output FORMAT for PRD.md",
|
|
93
|
+
"guides/wai-way/hld_template.md": "Output FORMAT for HLD.md",
|
|
94
|
+
"guides/wai-way/lld_template.md": "Output FORMAT for LLD.md",
|
|
95
|
+
"guides/wai-way/presets_guide.md": "Preset decision matrix",
|
|
96
|
+
"guides/wai-way/entity_patterns.md": "Common entity schemas",
|
|
97
|
+
"guides/wai-way/page_patterns.md": "Common page structures"
|
|
98
|
+
},
|
|
99
|
+
"operational": {
|
|
100
|
+
".dndev/implementation.md": "Active macro plan — checklist per phase (versioned)",
|
|
101
|
+
".dndev/captain-log.json": "Full session history — auto-recorded (never deleted)",
|
|
102
|
+
".dndev/LESSONS.md": "Decisions, gotchas, anti-patterns (never deleted)"
|
|
72
103
|
},
|
|
73
104
|
"config": {
|
|
74
105
|
"src/config/app.ts": "App name, preset, features, auth routes",
|
|
@@ -90,7 +121,7 @@
|
|
|
90
121
|
}
|
|
91
122
|
},
|
|
92
123
|
"workflow": {
|
|
93
|
-
"summary": "BRAINSTORM (→
|
|
94
|
-
"critical_rule": "
|
|
124
|
+
"summary": "BRAINSTORM (→ PRD + HLD + LLD) → SCAFFOLD → ENTITIES → COMPOSE → CONFIGURE + TEST",
|
|
125
|
+
"critical_rule": "spec_template.md is the FORMAT. P0 produces PRD + HLD + LLD. Validated documents = mechanical build."
|
|
95
126
|
}
|
|
96
127
|
}
|