@donotdev/cli 0.0.6 → 0.0.8

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 (87) hide show
  1. package/README.md +3 -18
  2. package/dependencies-matrix.json +64 -121
  3. package/dist/bin/commands/build.js +173 -161
  4. package/dist/bin/commands/bump.js +181 -156
  5. package/dist/bin/commands/cacheout.js +188 -171
  6. package/dist/bin/commands/create-app.js +213 -156
  7. package/dist/bin/commands/create-project.js +183 -154
  8. package/dist/bin/commands/deploy.js +491 -477
  9. package/dist/bin/commands/dev.js +176 -160
  10. package/dist/bin/commands/emu.js +181 -165
  11. package/dist/bin/commands/format.js +191 -174
  12. package/dist/bin/commands/lint.js +191 -171
  13. package/dist/bin/commands/preview.js +177 -161
  14. package/dist/bin/commands/sync-secrets.js +172 -158
  15. package/dist/bin/commands/wai.d.ts +11 -0
  16. package/dist/bin/commands/wai.d.ts.map +1 -0
  17. package/dist/bin/commands/wai.js +12 -0
  18. package/dist/bin/commands/wai.js.map +1 -0
  19. package/dist/bin/dndev.js +24 -24
  20. package/dist/bin/donotdev.js +24 -24
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +661 -669
  24. package/dist/index.js.map +1 -1
  25. package/package.json +1 -1
  26. package/templates/app-demo/src/config/app.ts.example +12 -0
  27. package/templates/app-next/src/config/app.ts.example +75 -48
  28. package/templates/app-vite/index.html.example +71 -37
  29. package/templates/app-vite/src/config/app.ts.example +75 -47
  30. package/templates/app-vite/src/pages/FormPageExample.tsx.example +152 -0
  31. package/templates/app-vite/src/pages/HomePage.tsx.example +81 -134
  32. package/templates/app-vite/src/pages/ListPageExample.tsx.example +88 -0
  33. package/templates/functions-firebase/build.mjs.example +8 -1
  34. package/templates/functions-firebase/functions-firebase/build.mjs.example +8 -1
  35. package/templates/functions-firebase/functions-firebase/src/index.ts.example +19 -25
  36. package/templates/functions-firebase/functions.config.js.example +35 -0
  37. package/templates/root-consumer/entities/ExampleEntity.ts.example +223 -0
  38. package/templates/root-consumer/entities/demo.ts.example +576 -0
  39. package/templates/root-consumer/entities/index.ts.example +15 -0
  40. package/templates/root-consumer/eslint.config.js.example +2 -80
  41. package/templates/root-consumer/guides/{AGENT_START_HERE.md.example → dndev/AGENT_START_HERE.md.example} +22 -0
  42. package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +231 -0
  43. package/templates/root-consumer/guides/{SETUP_AUTH.md.example → dndev/SETUP_AUTH.md.example} +30 -0
  44. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +539 -0
  45. package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +116 -0
  46. package/templates/root-consumer/guides/{SETUP_I18N.md.example → dndev/SETUP_I18N.md.example} +46 -0
  47. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +404 -0
  48. package/templates/root-consumer/guides/wai-way/agents/architect.md.example +78 -0
  49. package/templates/root-consumer/guides/wai-way/agents/builder.md.example +87 -0
  50. package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +325 -0
  51. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +100 -0
  52. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +281 -0
  53. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +77 -0
  54. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +104 -0
  55. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +124 -0
  56. package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +165 -0
  57. package/templates/root-consumer/guides/wai-way/context_map.json.example +95 -0
  58. package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +840 -0
  59. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +686 -0
  60. package/templates/root-consumer/guides/wai-way/presets_guide.md.example +217 -0
  61. package/templates/root-consumer/guides/wai-way/spec_template.md.example +312 -0
  62. package/templates/functions-firebase/functions-firebase/src/crud/createEntity.ts.example +0 -19
  63. package/templates/functions-firebase/functions-firebase/src/crud/deleteEntity.ts.example +0 -14
  64. package/templates/functions-firebase/functions-firebase/src/crud/getEntity.ts.example +0 -14
  65. package/templates/functions-firebase/functions-firebase/src/crud/index.ts.example +0 -12
  66. package/templates/functions-firebase/functions-firebase/src/crud/listEntities.ts.example +0 -14
  67. package/templates/functions-firebase/functions-firebase/src/crud/updateEntity.ts.example +0 -14
  68. package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +0 -70
  69. package/templates/root-consumer/guides/SETUP_CRUD.md.example +0 -1244
  70. package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +0 -114
  71. /package/templates/root-consumer/guides/{COMPONENTS_ADV.md.example → dndev/COMPONENTS_ADV.md.example} +0 -0
  72. /package/templates/root-consumer/guides/{COMPONENTS_ATOMIC.md.example → dndev/COMPONENTS_ATOMIC.md.example} +0 -0
  73. /package/templates/root-consumer/guides/{COMPONENTS_UI.md.example → dndev/COMPONENTS_UI.md.example} +0 -0
  74. /package/templates/root-consumer/guides/{ENV_SETUP.md.example → dndev/ENV_SETUP.md.example} +0 -0
  75. /package/templates/root-consumer/guides/{INDEX.md.example → dndev/INDEX.md.example} +0 -0
  76. /package/templates/root-consumer/guides/{SETUP_APP_CONFIG.md.example → dndev/SETUP_APP_CONFIG.md.example} +0 -0
  77. /package/templates/root-consumer/guides/{SETUP_BILLING.md.example → dndev/SETUP_BILLING.md.example} +0 -0
  78. /package/templates/root-consumer/guides/{SETUP_LAYOUTS.md.example → dndev/SETUP_LAYOUTS.md.example} +0 -0
  79. /package/templates/root-consumer/guides/{SETUP_OAUTH.md.example → dndev/SETUP_OAUTH.md.example} +0 -0
  80. /package/templates/root-consumer/guides/{SETUP_PAGES.md.example → dndev/SETUP_PAGES.md.example} +0 -0
  81. /package/templates/root-consumer/guides/{SETUP_PWA.md.example → dndev/SETUP_PWA.md.example} +0 -0
  82. /package/templates/root-consumer/guides/{SETUP_THEMES.md.example → dndev/SETUP_THEMES.md.example} +0 -0
  83. /package/templates/root-consumer/guides/{USE_ROUTING.md.example → dndev/USE_ROUTING.md.example} +0 -0
  84. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/APP_CHECK.md.example +0 -0
  85. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/COOKIE_REFERENCE.md.example +0 -0
  86. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/EMULATORS.md.example +0 -0
  87. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/VERSION_CONTROL.md.example +0 -0
@@ -0,0 +1,404 @@
1
+ # WAI-WAY: The "With AI Way" Protocol
2
+
3
+ > **CREDIT:** WAI-WAY is adapted from the **BMAD Method**, optimized for DoNotDev.
4
+
5
+ ---
6
+
7
+ ## The Golden Rule
8
+
9
+ > **THE SCAFFOLDED FILES ARE YOUR DOCUMENTATION.**
10
+ >
11
+ > Every scaffolded file contains working examples and inline comments.
12
+ > **READ the file. FOLLOW the pattern. EXTEND.**
13
+ >
14
+ > Do NOT guess. Do NOT invent. Copy patterns from scaffolded files.
15
+
16
+ ---
17
+
18
+ ## The Flow
19
+
20
+ ```
21
+ BRAINSTORM → SPEC → SCAFFOLD → ENTITIES → COMPOSE → CONFIGURE
22
+ ```
23
+
24
+ **Critical:** The spec is the OUTPUT of brainstorming, not the input. No code until spec is validated.
25
+
26
+ ---
27
+
28
+ ## Phase 0: BRAINSTORM → SPEC
29
+
30
+ **Goal:** Through conversation, gather requirements and produce a complete spec.
31
+
32
+ **The flow:**
33
+ ```
34
+ User provides idea → Agent asks questions → Agent fills spec → User validates
35
+ ```
36
+
37
+ ### Step 1: User Provides Initial Idea
38
+
39
+ User describes the app informally:
40
+ - "I want a car dealership management app"
41
+ - "We need a SaaS for team project management"
42
+ - "Build me a portfolio website"
43
+
44
+ ### Step 2: Agent Asks Clarifying Questions
45
+
46
+ **Identity:** What's it called? Who's it for? Value proposition?
47
+
48
+ **Scope:** What can users DO? What data exists? Main flows?
49
+
50
+ **Auth:** Login required? Roles? Providers?
51
+
52
+ **Access:** Who can create/read/update/delete each entity?
53
+
54
+ **Features:** Billing? i18n? PWA? OAuth?
55
+
56
+ ### Step 3: Agent Fills Spec Template
57
+
58
+ Using answers, agent fills `guides/wai-way/spec_template.md`:
59
+
60
+ **READ these to make decisions:**
61
+ - `guides/wai-way/presets_guide.md` - Choose preset
62
+ - `guides/wai-way/entity_patterns.md` - Common entity schemas
63
+ - `guides/wai-way/page_patterns.md` - Common page structures
64
+
65
+ ### Step 4: User Validates Spec
66
+
67
+ Present completed spec summary:
68
+ - App identity + preset
69
+ - Entities with access rules
70
+ - Pages with auth requirements
71
+ - Features
72
+
73
+ **User confirms → Move to Phase 1.**
74
+
75
+ **User has changes → Iterate until validated.**
76
+
77
+ ---
78
+
79
+ ## Phase 1: SCAFFOLD
80
+
81
+ **Goal:** Running app skeleton with all routes.
82
+
83
+ **READ:**
84
+ - `guides/wai-way/page_patterns.md` - Page structure patterns
85
+
86
+ ```bash
87
+ # Create new app
88
+ dndev create-app my-app --preset [from spec]
89
+
90
+ # Install dependencies
91
+ cd my-app && bun install
92
+
93
+ # Start emulators
94
+ dndev emu start
95
+
96
+ # Verify it runs
97
+ bun dev
98
+ ```
99
+
100
+ ### Step 1.1: Create Page Files
101
+
102
+ For each page from spec, create `src/pages/[Name]Page.tsx`:
103
+
104
+ ```bash
105
+ touch src/pages/AboutPage.tsx
106
+ touch src/pages/DashboardPage.tsx
107
+ touch src/pages/ProductsListPage.tsx
108
+ touch src/pages/ProductPage.tsx
109
+ # etc.
110
+ ```
111
+
112
+ ### Step 1.2: Add PageMeta
113
+
114
+ **READ:** `src/pages/HomePage.tsx` - Copy the PageMeta pattern.
115
+
116
+ ```tsx
117
+ import type { PageMeta } from '@donotdev/core';
118
+ import { PageContainer } from '@donotdev/ui';
119
+ import { Info } from 'lucide-react';
120
+
121
+ export const NAMESPACE = 'about';
122
+
123
+ export const meta: PageMeta = {
124
+ namespace: NAMESPACE,
125
+ icon: <Info />,
126
+ // auth: true, // Protected page
127
+ // auth: { required: true, role: 'admin' }, // Admin page
128
+ // hideFromMenu: true, // Don't show in nav
129
+ // route: '/custom-path', // Override auto route
130
+ };
131
+
132
+ export default function AboutPage() {
133
+ return <PageContainer>About Page</PageContainer>;
134
+ }
135
+ ```
136
+
137
+ **Output:** All routes exist as stub pages with correct PageMeta.
138
+
139
+ ---
140
+
141
+ ## Phase 2: ENTITIES
142
+
143
+ **Goal:** Define all data models from spec.
144
+
145
+ **READ:**
146
+ - `entities/ExampleEntity.ts` - Entity definition pattern
147
+ - `guides/wai-way/entity_patterns.md` - Common entity schemas
148
+
149
+ ### Step 2.1: Create Entity Files
150
+
151
+ For each entity from spec:
152
+
153
+ 1. Copy matching pattern from `entity_patterns.md`
154
+ 2. Create `entities/[Entity].ts`
155
+ 3. Customize fields, access rules, visibility
156
+
157
+ ```typescript
158
+ // entities/Product.ts
159
+ import { defineEntity } from '@donotdev/core';
160
+
161
+ export const productEntity = defineEntity({
162
+ name: 'Product',
163
+ collection: 'products',
164
+ fields: {
165
+ name: {
166
+ name: 'name',
167
+ label: 'name',
168
+ type: 'text',
169
+ visibility: 'guest',
170
+ validation: { required: true },
171
+ },
172
+ price: {
173
+ name: 'price',
174
+ label: 'price',
175
+ type: 'number',
176
+ visibility: 'guest',
177
+ validation: { required: true, min: 0 },
178
+ },
179
+ // ... more fields from spec
180
+ },
181
+ access: {
182
+ create: 'admin',
183
+ read: 'guest',
184
+ update: 'admin',
185
+ delete: 'admin',
186
+ },
187
+ });
188
+ ```
189
+
190
+ ### Step 2.2: Export Entities
191
+
192
+ ```typescript
193
+ // entities/index.ts
194
+ export { productEntity } from './Product';
195
+ export { customerEntity } from './Customer';
196
+ export { orderEntity } from './Order';
197
+ ```
198
+
199
+ **Output:** All entities defined and exported.
200
+
201
+ ---
202
+
203
+ ## Phase 3: COMPOSE
204
+
205
+ **Goal:** Build pages with components. HARDCODE ALL STRINGS.
206
+
207
+ **READ:**
208
+ - `src/pages/ListPageExample.tsx` - CRUD list pattern
209
+ - `src/pages/FormPageExample.tsx` - CRUD form pattern
210
+ - `guides/wai-way/page_patterns.md` - All page patterns
211
+
212
+ ### Step 3.1: CRUD Pages
213
+
214
+ **List Page:**
215
+ ```tsx
216
+ import { EntityList } from '@donotdev/crud';
217
+ import { useAuth } from '@donotdev/auth';
218
+ import { PageContainer } from '@donotdev/ui';
219
+ import { productEntity } from 'entities';
220
+
221
+ export default function ProductsListPage() {
222
+ const user = useAuth('user');
223
+ return (
224
+ <PageContainer>
225
+ <EntityList entity={productEntity} userRole={user?.role} />
226
+ </PageContainer>
227
+ );
228
+ }
229
+ ```
230
+
231
+ **Form Page:**
232
+ ```tsx
233
+ import { EntityFormRenderer, useCrud } from '@donotdev/crud';
234
+ import { productEntity } from 'entities';
235
+
236
+ export default function ProductPage() {
237
+ const { id } = useParams();
238
+ const { get, add, update } = useCrud(productEntity);
239
+ const isNew = id === 'new';
240
+ // ... see page_patterns.md for full pattern
241
+ }
242
+ ```
243
+
244
+ ### Step 3.2: Landing/Dashboard Pages
245
+
246
+ Copy from `page_patterns.md`:
247
+ - Dashboard pattern for logged-in home
248
+ - Landing pattern for marketing pages
249
+ - Settings pattern for preferences
250
+
251
+ **HARDCODE all strings:**
252
+ ```tsx
253
+ // ✅ GOOD - Start with hardcoded strings
254
+ <HeroSection
255
+ title="Welcome to My App"
256
+ subtitle="The best app ever built"
257
+ />
258
+
259
+ // ❌ BAD - Don't start with i18n
260
+ <HeroSection
261
+ title={t('hero.title')}
262
+ subtitle={t('hero.subtitle')}
263
+ />
264
+ ```
265
+
266
+ **Output:** All pages functional with hardcoded content.
267
+
268
+ ---
269
+
270
+ ## Phase 4: CONFIGURE
271
+
272
+ **Goal:** Finalize configuration and test.
273
+
274
+ **READ:**
275
+ - `src/config/app.ts` - App configuration
276
+ - `src/config/legal.ts` - Legal info
277
+ - `.env` - Environment variables
278
+
279
+ ### Step 4.1: Update Configuration
280
+
281
+ **app.ts:**
282
+ - [ ] `APP_NAME` and `APP_SHORT_NAME`
283
+ - [ ] Correct `preset`
284
+ - [ ] Footer legal links
285
+
286
+ **legal.ts:**
287
+ - [ ] Company name and registration
288
+ - [ ] Contact emails
289
+ - [ ] Hosting provider
290
+ - [ ] Jurisdiction
291
+
292
+ **.env:**
293
+ - [ ] `VITE_FIREBASE_*` values
294
+ - [ ] `VITE_DONOTDEV_LICENSE_KEY`
295
+ - [ ] Optional: `VITE_STRIPE_*`, `VITE_SENTRY_DSN`
296
+
297
+ ### Step 4.2: Firebase Setup
298
+
299
+ 1. Enable auth providers in Firebase Console
300
+ 2. Create Firestore database
301
+ 3. Deploy rules: `firebase deploy --only firestore:rules`
302
+
303
+ ### Step 4.3: Test
304
+
305
+ ```bash
306
+ dndev emu start
307
+ bun dev
308
+ ```
309
+
310
+ **Test checklist:**
311
+ - [ ] Can create/login user
312
+ - [ ] Public pages work without auth
313
+ - [ ] Protected pages redirect to login
314
+ - [ ] Admin pages require admin role
315
+ - [ ] CRUD operations work
316
+ - [ ] Data persists
317
+
318
+ ### Step 4.4: Mobile Check
319
+
320
+ 1. Open DevTools (F12)
321
+ 2. Toggle device toolbar (Ctrl+Shift+M)
322
+ 3. Test at 375px width
323
+
324
+ **Output:** Working app with auth, CRUD, config complete.
325
+
326
+ ---
327
+
328
+ ## Phase 5: i18n (Optional, After Validation)
329
+
330
+ **Only after Phase 4 is validated.**
331
+
332
+ ### Step 5.1: Extract Strings
333
+
334
+ Create `src/locales/[namespace]_en.json`:
335
+ ```json
336
+ {
337
+ "hero": {
338
+ "title": "Welcome to My App",
339
+ "subtitle": "The best app ever built"
340
+ }
341
+ }
342
+ ```
343
+
344
+ ### Step 5.2: Replace Hardcoded Strings
345
+
346
+ ```tsx
347
+ const { t } = useTranslation('home');
348
+
349
+ <HeroSection
350
+ title={t('hero.title')}
351
+ subtitle={t('hero.subtitle')}
352
+ />
353
+ ```
354
+
355
+ ### Step 5.3: Add Translations
356
+
357
+ Copy `home_en.json` → `home_fr.json`, translate values.
358
+
359
+ ---
360
+
361
+ ## Quick Reference
362
+
363
+ ### Key Files to Read
364
+
365
+ | File | Purpose | When |
366
+ |------|---------|------|
367
+ | `guides/wai-way/spec_template.md` | App specification | Phase 0 |
368
+ | `guides/wai-way/presets_guide.md` | Preset decision | Phase 0 |
369
+ | `guides/wai-way/entity_patterns.md` | Entity schemas | Phase 2 |
370
+ | `guides/wai-way/page_patterns.md` | Page structures | Phase 1, 3 |
371
+ | `src/pages/HomePage.tsx` | PageMeta pattern | Phase 1 |
372
+ | `entities/ExampleEntity.ts` | Entity pattern | Phase 2 |
373
+ | `src/pages/ListPageExample.tsx` | CRUD list | Phase 3 |
374
+ | `src/pages/FormPageExample.tsx` | CRUD form | Phase 3 |
375
+ | `src/config/app.ts` | App config | Phase 4 |
376
+ | `src/config/legal.ts` | Legal info | Phase 4 |
377
+
378
+ ### Agents (Optional)
379
+
380
+ Activate agent personas from `guides/wai-way/agents/`:
381
+
382
+ | Agent | Phase | Focus |
383
+ |-------|-------|-------|
384
+ | **Extractor** | 1 | Routes, sitemap, PageMeta |
385
+ | **Architect** | 2 | Entities, data models |
386
+ | **Builder** | 3 | Page composition, components |
387
+ | **Polisher** | 4 | Config, testing, polish |
388
+
389
+ See individual agent files for activation prompts.
390
+
391
+ ---
392
+
393
+ ## Summary
394
+
395
+ ```
396
+ Phase 0: BRAINSTORM → User idea → Agent questions → Agent fills spec → User validates
397
+ Phase 1: SCAFFOLD → Create all *Page.tsx with PageMeta (from spec)
398
+ Phase 2: ENTITIES → Define all entities with fields/access (from spec)
399
+ 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
402
+ ```
403
+
404
+ **Remember:** Spec is the OUTPUT of brainstorming. Validated spec = mechanical build.
@@ -0,0 +1,78 @@
1
+ # architect
2
+
3
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines.
4
+
5
+ ## AGENT DEFINITION
6
+
7
+ ```yaml
8
+ agent:
9
+ name: Architect
10
+ id: architect
11
+ title: Data Architect
12
+ icon: 🏗️
13
+ phase: "2_entities"
14
+ done_when: "All entities defined with fields, access, visibility. Exported from index.ts"
15
+
16
+ persona:
17
+ role: Data Modeler & Entity Designer
18
+ style: Precise, systematic, convention-focused
19
+ identity: You define the data structures using DoNotDev entities.
20
+ focus: Creating entity definitions with fields, access rules, visibility.
21
+
22
+ golden_rule: |
23
+ THE SCAFFOLDED FILES ARE YOUR DOCUMENTATION.
24
+ READ entities/ExampleEntity.ts for the pattern.
25
+ COPY the pattern. EXTEND with your fields.
26
+ Do NOT invent field types - use what's documented.
27
+
28
+ core_principles:
29
+ - Ask "What data does your app manage?" first
30
+ - One entity = one Firestore collection
31
+ - Define access rules (who can CRUD)
32
+ - Define field visibility (who can see what)
33
+ - Use framework field types only
34
+
35
+ field_types:
36
+ - text: Single-line text
37
+ - textarea: Multi-line text
38
+ - number: Numeric values
39
+ - email: Email with validation
40
+ - tel: Phone with country picker
41
+ - select: Dropdown options
42
+ - combobox: Searchable dropdown
43
+ - switch: Toggle on/off
44
+ - date: Date picker
45
+ - timestamp: Date + time
46
+ - images: Image uploads
47
+ - reference: Link to another entity
48
+
49
+ commands:
50
+ - help: Show available commands
51
+ - list-entities: Output entity list with fields
52
+ - create-entity: Generate entity file from spec
53
+ - exit: Exit persona
54
+
55
+ output:
56
+ - All entities defined in entities/
57
+ - Each entity has fields, access, visibility
58
+ - Exported from entities/index.ts
59
+ ```
60
+
61
+ ## ACTIVATION PROMPT
62
+
63
+ ```
64
+ Activate AGENT Architect.
65
+
66
+ READ these files first:
67
+ - entities/ExampleEntity.ts (entity pattern, field types)
68
+
69
+ Your goal: Define all data models.
70
+
71
+ Ask me:
72
+ 1. What data does your app manage?
73
+ 2. For each entity: What fields does it have?
74
+ 3. Who can create/read/update/delete each entity?
75
+ 4. Which fields are public vs admin-only?
76
+
77
+ Then create the entity files following the ExampleEntity pattern.
78
+ ```
@@ -0,0 +1,87 @@
1
+ # builder
2
+
3
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines.
4
+
5
+ ## AGENT DEFINITION
6
+
7
+ ```yaml
8
+ agent:
9
+ name: Builder
10
+ id: builder
11
+ title: Page Builder
12
+ icon: 💻
13
+ phase: "3_compose"
14
+ done_when: "All pages functional, CRUD uses EntityList/EntityFormRenderer, strings hardcoded"
15
+
16
+ persona:
17
+ role: Implementation Specialist
18
+ style: Concise, precise, pattern-following
19
+ identity: You build pages using framework components. You do NOT design.
20
+ focus: Creating functional pages with EntityList, EntityFormRenderer, and UI components.
21
+
22
+ golden_rule: |
23
+ THE SCAFFOLDED FILES ARE YOUR DOCUMENTATION.
24
+ READ src/pages/ExampleListPage.tsx for CRUD list pattern.
25
+ READ src/pages/ExampleFormPage.tsx for CRUD form pattern.
26
+ HARDCODE ALL STRINGS FIRST. i18n comes later.
27
+
28
+ core_principles:
29
+ - CRUD pages: Use EntityList and EntityFormRenderer
30
+ - Landing pages: Use HeroSection, Section, Card, Grid, Stack
31
+ - HARDCODE strings first - validate UX before i18n
32
+ - Use framework components only - no custom CSS
33
+ - Trust component defaults
34
+
35
+ crud_pattern:
36
+ list_page: |
37
+ <EntityList entity={myEntity} userRole={user?.role} />
38
+ form_page: |
39
+ <EntityFormRenderer
40
+ entity={myEntity}
41
+ operation="create" // or "edit"
42
+ onSubmit={handleSubmit}
43
+ defaultValues={data}
44
+ />
45
+
46
+ ui_components:
47
+ - PageContainer: Required page wrapper
48
+ - HeroSection: Full-width hero banner
49
+ - Section: Content block with title
50
+ - Card: Content card
51
+ - Grid: Responsive grid
52
+ - Stack: Flex container
53
+ - Button: Buttons
54
+ - Text: Typography
55
+
56
+ commands:
57
+ - help: Show available commands
58
+ - build-page: Create a page from specification
59
+ - list-components: Show available UI components
60
+ - exit: Exit persona
61
+
62
+ output:
63
+ - All pages functional
64
+ - CRUD pages use EntityList/EntityFormRenderer
65
+ - All strings hardcoded (no i18n yet)
66
+ ```
67
+
68
+ ## ACTIVATION PROMPT
69
+
70
+ ```
71
+ Activate AGENT Builder.
72
+
73
+ READ these files first:
74
+ - src/pages/ExampleListPage.tsx (EntityList pattern)
75
+ - src/pages/ExampleFormPage.tsx (EntityFormRenderer pattern)
76
+ - src/pages/HomePage.tsx (UI components pattern)
77
+
78
+ Your goal: Build all pages with components.
79
+
80
+ Rules:
81
+ 1. CRUD pages → Use EntityList and EntityFormRenderer
82
+ 2. Landing pages → Use HeroSection, Section, Card, Grid, Stack
83
+ 3. HARDCODE all strings (no i18n yet)
84
+ 4. Use framework components only
85
+
86
+ Build each page following the scaffolded patterns.
87
+ ```