@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.
- package/dependencies-matrix.json +30 -116
- package/dist/bin/commands/bump.js +137 -104
- package/dist/bin/commands/create-app.js +20 -0
- package/dist/bin/commands/create-project.js +63 -7
- package/dist/bin/commands/deploy.js +7606 -17
- package/dist/bin/commands/firebase-setup.d.ts +6 -0
- package/dist/bin/commands/firebase-setup.d.ts.map +1 -0
- package/dist/bin/commands/firebase-setup.js +7 -0
- package/dist/bin/commands/firebase-setup.js.map +1 -0
- package/dist/bin/commands/staging.d.ts +11 -0
- package/dist/bin/commands/staging.d.ts.map +1 -0
- package/dist/bin/commands/staging.js +12 -0
- package/dist/bin/commands/staging.js.map +1 -0
- package/dist/bin/dndev.js +28 -3
- package/dist/bin/donotdev.js +28 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7714 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/app-demo/src/pages/DetailPage.tsx.example +1 -1
- package/templates/app-demo/src/pages/FullPage.tsx.example +3 -3
- package/templates/app-demo/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +5 -5
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +3 -3
- package/templates/app-next/.env.example +2 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +2 -2
- package/templates/app-vite/.env.example +2 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +163 -73
- package/templates/functions-firebase/build.mjs.example +26 -10
- package/templates/functions-firebase/functions-firebase/build.mjs.example +26 -10
- package/templates/functions-firebase/functions.config.js.example +11 -15
- package/templates/github-consumer/.github/workflows/ci.yml.example +36 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +2 -2
- package/templates/root-consumer/.claude/agents/builder.md.example +2 -2
- package/templates/root-consumer/.claude/agents/coder.md.example +2 -2
- package/templates/root-consumer/.claude/agents/extractor.md.example +2 -3
- package/templates/root-consumer/.claude/agents/polisher.md.example +67 -291
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +4 -4
- package/templates/root-consumer/.claude/commands/build.md.example +2 -2
- package/templates/root-consumer/.claude/commands/polish.md.example +65 -81
- package/templates/root-consumer/.env.example +13 -13
- package/templates/root-consumer/.gemini/settings.json.example +9 -0
- package/templates/root-consumer/.gitignore.example +3 -1
- package/templates/root-consumer/AI.md.example +139 -0
- package/templates/root-consumer/CLAUDE.md.example +13 -104
- package/templates/root-consumer/README.md.example +81 -255
- package/templates/root-consumer/entities/Contact.ts.example +126 -0
- package/templates/root-consumer/entities/index.ts.example +6 -3
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +41 -342
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +2 -1
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +144 -9
- package/templates/root-consumer/guides/dndev/INDEX.md.example +9 -0
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +13 -16
- package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +263 -0
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +1 -1
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +168 -0
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +5 -12
- package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +184 -0
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +134 -69
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +66 -44
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +18 -1
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +1 -0
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +2 -1
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +2 -1
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +180 -108
- package/templates/root-consumer/guides/wai-way/context_map.json.example +8 -7
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +4 -4
|
@@ -15,13 +15,98 @@
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
+
## The Intelligence Engine (MCP Server)
|
|
19
|
+
|
|
20
|
+
Your project is pre-configured with a **Knowledge Engine** (MCP Server) in `.mcp.json`.
|
|
21
|
+
|
|
22
|
+
1. **Phase Tracking:** `start_phase(N)` returns the blueprint, agent persona, and files to read for each phase.
|
|
23
|
+
2. **Type Intelligence:** `lookup_symbol("ComponentName")` returns actual TypeScript types — never guess props.
|
|
24
|
+
3. **Knowledge Retrieval:** `get_guide("CRUD")`, `get_guideline("styling")`, `search_framework("keyword")`.
|
|
25
|
+
4. **Implementation Tracking:** `init_implementation()` creates a persistent checklist. `update_progress()` ticks items. `get_progress()` reads status. Survives across sessions.
|
|
26
|
+
5. **Captain's Log:** Session history auto-recorded on `approve_phase()`. `get_project_history()` for metrics and post-mortem.
|
|
27
|
+
6. **Lessons:** `record_lesson("gotcha", { tags: ["stripe", "billing"] })` saves tagged gotchas to `.dndev/LESSONS.md`. Filtered by phase + module on next `start_phase`.
|
|
28
|
+
|
|
29
|
+
The IDE (Cursor, Claude Code, etc.) handles file write approval natively. No MCP-level gating.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Implementation Tracking (Multi-Session Progress)
|
|
34
|
+
|
|
35
|
+
For projects that span multiple AI sessions, `.dndev/implementation.md` tracks what's done and what's pending.
|
|
36
|
+
|
|
37
|
+
### Setup (after Phase 0)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
# Auto-generate from spec
|
|
41
|
+
init_implementation({ from_spec: true })
|
|
42
|
+
|
|
43
|
+
# Or manual sections
|
|
44
|
+
init_implementation({ sections: [
|
|
45
|
+
{ title: "Auth Module", items: ["Login page", "Registration", "Password reset"] },
|
|
46
|
+
{ title: "Dashboard", items: ["Stats cards", "Activity feed", "Charts"] }
|
|
47
|
+
] })
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### During Work
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
# Tick items as you complete them
|
|
54
|
+
update_progress({ item: "Login page", done: true })
|
|
55
|
+
update_progress({ item: "Stats cards", done: true, note: "Used Card component with level h3" })
|
|
56
|
+
|
|
57
|
+
# Check progress
|
|
58
|
+
get_progress() # full overview
|
|
59
|
+
get_progress({ section: "Auth Module" }) # filtered to section
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Cross-Session Continuity
|
|
63
|
+
|
|
64
|
+
When you start a new session:
|
|
65
|
+
1. `start_phase(N)` automatically includes implementation progress
|
|
66
|
+
2. The agent sees what's done and picks up where it left off
|
|
67
|
+
3. No repeated work, no drift
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Captain's Log (Project History)
|
|
72
|
+
|
|
73
|
+
Every `approve_phase()` auto-records a session entry to `.dndev/captain-log.json`. No manual action needed.
|
|
74
|
+
|
|
75
|
+
### What's Recorded Automatically
|
|
76
|
+
|
|
77
|
+
- Date + timestamps (started/completed)
|
|
78
|
+
- Phase number and name
|
|
79
|
+
- Module (if scoped)
|
|
80
|
+
- Files touched + symbols used
|
|
81
|
+
- Outcome summary (from `complete_phase({ summary: "..." })`)
|
|
82
|
+
|
|
83
|
+
### Viewing History
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
get_project_history()
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Returns computed metrics + timeline:
|
|
90
|
+
- Total sessions, phases completed
|
|
91
|
+
- Files and symbols totals
|
|
92
|
+
- Per-session timeline with outcomes
|
|
93
|
+
|
|
94
|
+
### Post-Mortem
|
|
95
|
+
|
|
96
|
+
The raw JSON at `.dndev/captain-log.json` enables:
|
|
97
|
+
- Phase velocity analysis (how many sessions per phase)
|
|
98
|
+
- Issue tracking across the project lifecycle
|
|
99
|
+
- Team-level comparison across projects
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
18
103
|
## The Flow
|
|
19
104
|
|
|
20
105
|
```
|
|
21
|
-
BRAINSTORM →
|
|
106
|
+
BRAINSTORM (→ spec) → SCAFFOLD → ENTITIES → COMPOSE → CONFIGURE
|
|
22
107
|
```
|
|
23
108
|
|
|
24
|
-
**Critical:** The spec is the OUTPUT of
|
|
109
|
+
**Critical:** The spec is the OUTPUT of Phase 0 (BRAINSTORM), not a separate phase. No code until spec is validated.
|
|
25
110
|
|
|
26
111
|
---
|
|
27
112
|
|
|
@@ -267,94 +352,75 @@ Copy from `page_patterns.md`:
|
|
|
267
352
|
|
|
268
353
|
---
|
|
269
354
|
|
|
270
|
-
## Phase 4: CONFIGURE
|
|
355
|
+
## Phase 4: CONFIGURE + TEST
|
|
271
356
|
|
|
272
|
-
**Goal:**
|
|
357
|
+
**Goal:** Generate tests, firestore rules, CI/CD, and finalize config.
|
|
273
358
|
|
|
274
359
|
**READ:**
|
|
360
|
+
- `guides/wai-way/spec_template.md` - The validated spec (your test plan)
|
|
361
|
+
- `entities/index.ts` - All entity definitions
|
|
275
362
|
- `src/config/app.ts` - App configuration
|
|
276
|
-
- `
|
|
277
|
-
- `.env` - Environment variables
|
|
363
|
+
- `guides/dndev/SETUP_TESTING.md` - Testing patterns
|
|
278
364
|
|
|
279
|
-
### Step 4.1:
|
|
365
|
+
### Step 4.1: Generate Tests
|
|
280
366
|
|
|
281
|
-
|
|
282
|
-
- [ ] `APP_NAME` and `APP_SHORT_NAME`
|
|
283
|
-
- [ ] Correct `preset`
|
|
284
|
-
- [ ] Footer legal links
|
|
367
|
+
Call `get_guide("TESTING")` for patterns.
|
|
285
368
|
|
|
286
|
-
**
|
|
287
|
-
- [ ]
|
|
288
|
-
- [ ]
|
|
289
|
-
- [ ]
|
|
290
|
-
- [ ] Jurisdiction
|
|
369
|
+
**Entity tests** — one per entity in `tests/entities/[Entity].test.ts`:
|
|
370
|
+
- [ ] Required fields defined
|
|
371
|
+
- [ ] Field types match spec
|
|
372
|
+
- [ ] Access rules match spec (create/read/update/delete per role)
|
|
291
373
|
|
|
292
|
-
|
|
293
|
-
- [ ]
|
|
294
|
-
- [ ]
|
|
295
|
-
- [ ]
|
|
374
|
+
**Page tests** — one per page in `tests/pages/[Page].test.tsx`:
|
|
375
|
+
- [ ] Renders without error
|
|
376
|
+
- [ ] PageMeta defined (title, auth, admin)
|
|
377
|
+
- [ ] Route protection matches spec
|
|
296
378
|
|
|
297
|
-
|
|
379
|
+
**Access control tests** in `tests/access/access-rules.test.ts`:
|
|
380
|
+
- [ ] Admin entities require admin access
|
|
381
|
+
- [ ] User-owned entities have owner access
|
|
382
|
+
- [ ] No unauthenticated writes
|
|
298
383
|
|
|
299
|
-
|
|
300
|
-
2. Create Firestore database
|
|
301
|
-
3. Deploy rules: `firebase deploy --only firestore:rules`
|
|
384
|
+
### Step 4.2: Generate Firestore Rules
|
|
302
385
|
|
|
303
|
-
|
|
386
|
+
Create `firestore.rules` from entity access definitions:
|
|
387
|
+
- `owner` → `resource.data.userId == request.auth.uid`
|
|
388
|
+
- `admin` → `request.auth.token.admin == true`
|
|
389
|
+
- `authenticated` → `request.auth != null`
|
|
304
390
|
|
|
305
|
-
|
|
306
|
-
dndev emu start
|
|
307
|
-
bun dev
|
|
308
|
-
```
|
|
391
|
+
### Step 4.3: Generate CI/CD
|
|
309
392
|
|
|
310
|
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
313
|
-
- [ ] Protected pages redirect to login
|
|
314
|
-
- [ ] Admin pages require admin role
|
|
315
|
-
- [ ] CRUD operations work
|
|
316
|
-
- [ ] Data persists
|
|
393
|
+
Create `.github/workflows/ci.yml`:
|
|
394
|
+
- Quality job: `bun install` → `bun run type-check` → `bun test`
|
|
395
|
+
- Deploy job: `bun run build` → Firebase deploy (on main push)
|
|
317
396
|
|
|
318
|
-
### Step 4.4:
|
|
397
|
+
### Step 4.4: Update Configuration
|
|
319
398
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
399
|
+
**app.ts:** APP_NAME, APP_SHORT_NAME, preset, footer links
|
|
400
|
+
**legal.ts:** Company, contacts, hosting, jurisdiction
|
|
401
|
+
**.env:** VITE_FIREBASE_*, VITE_DONOTDEV_LICENSE_KEY, optional Stripe/Sentry
|
|
323
402
|
|
|
324
|
-
|
|
403
|
+
### Step 4.5: Run Tests
|
|
325
404
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
405
|
+
```bash
|
|
406
|
+
bun test
|
|
407
|
+
```
|
|
329
408
|
|
|
330
|
-
|
|
409
|
+
All tests must pass before completing.
|
|
331
410
|
|
|
332
|
-
### Step
|
|
411
|
+
### Step 4.6: Mobile Check
|
|
333
412
|
|
|
334
|
-
|
|
335
|
-
```json
|
|
336
|
-
{
|
|
337
|
-
"hero": {
|
|
338
|
-
"title": "Welcome to My App",
|
|
339
|
-
"subtitle": "The best app ever built"
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
```
|
|
413
|
+
DevTools → 375px width → navigation, forms, text, buttons (44px), no horizontal scroll.
|
|
343
414
|
|
|
344
|
-
|
|
415
|
+
**Output:** Test files, firestore.rules, CI/CD pipeline, configured app.
|
|
345
416
|
|
|
346
|
-
|
|
347
|
-
const { t } = useTranslation('home');
|
|
417
|
+
---
|
|
348
418
|
|
|
349
|
-
|
|
350
|
-
title={t('hero.title')}
|
|
351
|
-
subtitle={t('hero.subtitle')}
|
|
352
|
-
/>
|
|
353
|
-
```
|
|
419
|
+
### Step 4.7: i18n (Optional)
|
|
354
420
|
|
|
355
|
-
|
|
421
|
+
**Only after Steps 4.1-4.6 pass.**
|
|
356
422
|
|
|
357
|
-
|
|
423
|
+
Extract hardcoded strings to `src/locales/[namespace]_en.json`, replace with `useTranslation()`.
|
|
358
424
|
|
|
359
425
|
---
|
|
360
426
|
|
|
@@ -381,10 +447,10 @@ Activate agent personas from `guides/wai-way/agents/`:
|
|
|
381
447
|
|
|
382
448
|
| Agent | Phase | Focus |
|
|
383
449
|
|-------|-------|-------|
|
|
384
|
-
| **Extractor** | 1 |
|
|
450
|
+
| **Extractor** | 0-1 | Requirements gathering, routes, sitemap, PageMeta |
|
|
385
451
|
| **Architect** | 2 | Entities, data models |
|
|
386
452
|
| **Builder** | 3 | Page composition, components |
|
|
387
|
-
| **Polisher** | 4 | Config, testing, polish |
|
|
453
|
+
| **Polisher** | 4 | Config, testing, polish, i18n |
|
|
388
454
|
|
|
389
455
|
See individual agent files for activation prompts.
|
|
390
456
|
|
|
@@ -397,8 +463,7 @@ Phase 0: BRAINSTORM → User idea → Agent questions → Agent fills spec → U
|
|
|
397
463
|
Phase 1: SCAFFOLD → Create all *Page.tsx with PageMeta (from spec)
|
|
398
464
|
Phase 2: ENTITIES → Define all entities with fields/access (from spec)
|
|
399
465
|
Phase 3: COMPOSE → Build pages with components (HARDCODE strings)
|
|
400
|
-
Phase 4: CONFIGURE → Config, Firebase, test, mobile
|
|
401
|
-
Phase 5: i18n → (Optional) Extract strings, translate
|
|
466
|
+
Phase 4: CONFIGURE → Config, Firebase, test, mobile, optional i18n
|
|
402
467
|
```
|
|
403
468
|
|
|
404
469
|
**Remember:** Spec is the OUTPUT of brainstorming. Validated spec = mechanical build.
|
|
@@ -10,27 +10,58 @@ agent:
|
|
|
10
10
|
id: polisher
|
|
11
11
|
title: QA & Config Specialist
|
|
12
12
|
icon: 🧪
|
|
13
|
-
phase: "
|
|
14
|
-
done_when: "
|
|
13
|
+
phase: "4_configure_test"
|
|
14
|
+
done_when: "Tests pass, config complete, firestore rules generated"
|
|
15
15
|
|
|
16
16
|
persona:
|
|
17
|
-
role: Quality Gatekeeper &
|
|
18
|
-
style:
|
|
19
|
-
identity: You
|
|
20
|
-
focus:
|
|
17
|
+
role: Quality Gatekeeper & Test Generator
|
|
18
|
+
style: Systematic, thorough, test-driven
|
|
19
|
+
identity: You generate tests from the spec, configure the app, and verify everything works.
|
|
20
|
+
focus: Test generation, configuration, firestore rules, mobile check.
|
|
21
21
|
|
|
22
22
|
golden_rule: |
|
|
23
|
-
THE
|
|
24
|
-
READ
|
|
25
|
-
READ
|
|
26
|
-
|
|
23
|
+
THE SPEC IS YOUR TEST PLAN.
|
|
24
|
+
READ the spec (Phase 0 output) for entities, permissions, journeys.
|
|
25
|
+
READ each entity file for access rules and fields.
|
|
26
|
+
GENERATE tests that verify the spec is implemented correctly.
|
|
27
27
|
|
|
28
28
|
core_principles:
|
|
29
|
-
-
|
|
30
|
-
-
|
|
29
|
+
- Tests first: generate entity tests, page tests, access tests
|
|
30
|
+
- Firestore rules from entities: access definitions → security rules
|
|
31
|
+
- Configuration: app.ts, legal.ts, .env
|
|
31
32
|
- Mobile check: 375px width
|
|
32
33
|
- i18n is OPTIONAL and comes LAST
|
|
33
34
|
|
|
35
|
+
test_generation:
|
|
36
|
+
entity_tests:
|
|
37
|
+
per_entity:
|
|
38
|
+
- Required fields are defined
|
|
39
|
+
- Field types match spec
|
|
40
|
+
- Access rules match spec (create/read/update/delete per role)
|
|
41
|
+
- State transitions valid (if applicable)
|
|
42
|
+
output: "tests/entities/[EntityName].test.ts"
|
|
43
|
+
page_tests:
|
|
44
|
+
per_page:
|
|
45
|
+
- Renders without error
|
|
46
|
+
- PageMeta defined (title, auth, admin)
|
|
47
|
+
- Route protection matches spec
|
|
48
|
+
output: "tests/pages/[PageName].test.tsx"
|
|
49
|
+
access_tests:
|
|
50
|
+
- Admin entities require admin access
|
|
51
|
+
- User-owned entities have owner access
|
|
52
|
+
- Public entities allow guest read
|
|
53
|
+
- No unauthenticated writes
|
|
54
|
+
output: "tests/access/access-rules.test.ts"
|
|
55
|
+
|
|
56
|
+
firestore_rules:
|
|
57
|
+
source: "Entity access definitions"
|
|
58
|
+
mapping:
|
|
59
|
+
owner: "resource.data.userId == request.auth.uid"
|
|
60
|
+
admin: "request.auth.token.admin == true"
|
|
61
|
+
authenticated: "request.auth != null"
|
|
62
|
+
guest: "true"
|
|
63
|
+
output: "firestore.rules"
|
|
64
|
+
|
|
34
65
|
config_checklist:
|
|
35
66
|
app_ts:
|
|
36
67
|
- APP_NAME and APP_SHORT_NAME set
|
|
@@ -45,32 +76,19 @@ config_checklist:
|
|
|
45
76
|
- VITE_FIREBASE_* values set
|
|
46
77
|
- VITE_DONOTDEV_LICENSE_KEY set
|
|
47
78
|
|
|
48
|
-
test_checklist:
|
|
49
|
-
- Can create/login user
|
|
50
|
-
- Public pages work without auth
|
|
51
|
-
- Protected pages redirect to login
|
|
52
|
-
- Admin pages require admin role
|
|
53
|
-
- CRUD operations work
|
|
54
|
-
- Data persists
|
|
55
|
-
|
|
56
|
-
mobile_check:
|
|
57
|
-
- Open DevTools (F12)
|
|
58
|
-
- Toggle device toolbar (Ctrl+Shift+M)
|
|
59
|
-
- Test at 375px width
|
|
60
|
-
- Navigation works
|
|
61
|
-
- Forms are usable
|
|
62
|
-
- Text is readable
|
|
63
|
-
|
|
64
79
|
commands:
|
|
65
80
|
- help: Show available commands
|
|
81
|
+
- generate-tests: Generate all test files from spec + entities
|
|
82
|
+
- generate-rules: Generate firestore.rules from entities
|
|
66
83
|
- audit-config: Check configuration files
|
|
67
84
|
- audit-mobile: Check mobile responsiveness
|
|
68
85
|
- add-i18n: Extract strings to locales (optional)
|
|
69
86
|
- exit: Exit persona
|
|
70
87
|
|
|
71
88
|
output:
|
|
89
|
+
- Test files generated and passing
|
|
90
|
+
- Firestore rules generated
|
|
72
91
|
- Configuration complete
|
|
73
|
-
- All tests pass
|
|
74
92
|
- Mobile responsive
|
|
75
93
|
- (Optional) i18n added
|
|
76
94
|
```
|
|
@@ -81,20 +99,24 @@ output:
|
|
|
81
99
|
Activate AGENT Polisher.
|
|
82
100
|
|
|
83
101
|
READ these files first:
|
|
102
|
+
- guides/wai-way/spec_template.md (the validated spec — your test plan)
|
|
103
|
+
- entities/index.ts (all entity definitions)
|
|
104
|
+
- src/pages/ (all page files)
|
|
84
105
|
- src/config/app.ts (app configuration)
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
106
|
+
- guides/dndev/SETUP_TESTING.md (testing patterns)
|
|
107
|
+
|
|
108
|
+
Your goal: Generate tests, firestore rules, and finalize config.
|
|
109
|
+
|
|
110
|
+
Steps:
|
|
111
|
+
1. Create vitest.config.ts + tests/setup.ts
|
|
112
|
+
2. Generate entity tests (one per entity from entities/)
|
|
113
|
+
3. Generate page tests (one per page from src/pages/)
|
|
114
|
+
4. Generate access control tests (from spec permissions)
|
|
115
|
+
5. Generate firestore.rules (from entity access definitions)
|
|
116
|
+
6. Update app.ts, legal.ts, .env
|
|
117
|
+
7. Run bun test — all must pass
|
|
118
|
+
8. Mobile check at 375px
|
|
119
|
+
9. (Optional) Add i18n
|
|
120
|
+
|
|
121
|
+
Call get_guide("TESTING") for testing patterns.
|
|
100
122
|
```
|
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
**Goal:** Deeply understand the app and document ALL requirements before any code.
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**MCP:** `start_phase(0)` to begin. `complete_phase()` when done.
|
|
6
|
+
**Done when:** `spec_template.md` is COMPLETE and user has validated it.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## First: Call list_features()
|
|
11
|
+
|
|
12
|
+
**Before probing the user or designing anything**, call `list_features()`.
|
|
13
|
+
|
|
14
|
+
It returns a one-line summary from each framework package README (core, ui, templates, auth, billing, etc.). Use it to avoid designing custom solutions when the framework already provides them (e.g. blog, CRUD, billing pages). If you skip this, you may propose work that already exists in `@donotdev/templates` or other packages.
|
|
6
15
|
|
|
7
16
|
---
|
|
8
17
|
|
|
@@ -26,6 +35,8 @@ Before moving to Phase 1, you MUST have:
|
|
|
26
35
|
```
|
|
27
36
|
User provides idea
|
|
28
37
|
↓
|
|
38
|
+
Agent calls list_features() → matches needs to existing framework capabilities
|
|
39
|
+
↓
|
|
29
40
|
Agent asks IDENTITY questions (who, what, why)
|
|
30
41
|
↓
|
|
31
42
|
Agent asks USER JOURNEY questions (what do users DO step by step?)
|
|
@@ -277,5 +288,11 @@ Completed spec_template.md with:
|
|
|
277
288
|
- All permissions defined
|
|
278
289
|
- User validation
|
|
279
290
|
|
|
291
|
+
**After spec validation, generate the implementation tracker:**
|
|
292
|
+
```
|
|
293
|
+
init_implementation({ from_spec: true })
|
|
294
|
+
```
|
|
295
|
+
This creates `.dndev/implementation.md` with checklist items for all phases (pages, entities, composition, config). Agents will read and update this file across sessions.
|
|
296
|
+
|
|
280
297
|
**Spec validated AND complete? Move to Phase 1: SCAFFOLD.**
|
|
281
298
|
**Anything unclear? Keep asking questions.**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# BLUEPRINT: 2_ENTITIES
|
|
2
2
|
|
|
3
|
-
**Goal:** Define all data models from spec.
|
|
3
|
+
**Goal:** Define all data models from spec (Single Source of Truth).
|
|
4
4
|
|
|
5
|
+
**MCP:** `start_phase(2)` to begin. Use `lookup_symbol('defineEntity')` for types. `complete_phase()` when done.
|
|
5
6
|
**Done when:** All entities defined with fields, access rules, visibility. Exported from index.ts.
|
|
6
7
|
|
|
7
8
|
**Prerequisite:** Phase 0 (spec) and Phase 1 (scaffold) complete.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Goal:** Build pages with components. HARDCODE ALL STRINGS.
|
|
4
4
|
|
|
5
|
+
**MCP:** `start_phase(3)` to begin. Use `lookup_symbol(component_name)` for types. `complete_phase()` when done.
|
|
5
6
|
**Done when:** All pages functional with content. CRUD pages use EntityList/EntityFormRenderer. All strings hardcoded.
|
|
6
7
|
|
|
7
8
|
**Prerequisite:** Phase 0-2 complete. Spec validated, entities defined.
|
|
@@ -111,7 +112,7 @@ Copy Landing pattern from `page_patterns.md`:
|
|
|
111
112
|
/>
|
|
112
113
|
```
|
|
113
114
|
|
|
114
|
-
Validate UX in one language. Add i18n in Phase
|
|
115
|
+
Validate UX in one language. Add i18n in Phase 4 (CONFIGURE) after validation.
|
|
115
116
|
|
|
116
117
|
---
|
|
117
118
|
|