@donotdev/cli 0.0.14 → 0.0.15

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 (151) hide show
  1. package/dependencies-matrix.json +356 -88
  2. package/dist/bin/commands/agent-setup.js +7 -1
  3. package/dist/bin/commands/build.js +118 -38
  4. package/dist/bin/commands/bump.js +74 -28
  5. package/dist/bin/commands/cacheout.js +37 -9
  6. package/dist/bin/commands/create-app.js +222 -115
  7. package/dist/bin/commands/create-project.js +455 -140
  8. package/dist/bin/commands/deploy.js +1736 -697
  9. package/dist/bin/commands/dev.js +138 -23
  10. package/dist/bin/commands/emu.js +215 -58
  11. package/dist/bin/commands/format.js +37 -9
  12. package/dist/bin/commands/lint.js +37 -9
  13. package/dist/bin/commands/preview.js +142 -23
  14. package/dist/bin/commands/supabase-setup.d.ts +6 -0
  15. package/dist/bin/commands/supabase-setup.d.ts.map +1 -0
  16. package/dist/bin/commands/supabase-setup.js +7 -0
  17. package/dist/bin/commands/supabase-setup.js.map +1 -0
  18. package/dist/bin/commands/sync-secrets.js +211 -34
  19. package/dist/bin/commands/type-check.d.ts +14 -0
  20. package/dist/bin/commands/type-check.d.ts.map +1 -0
  21. package/dist/bin/commands/type-check.js +314 -0
  22. package/dist/bin/commands/type-check.js.map +1 -0
  23. package/dist/bin/commands/wai.js +3 -1
  24. package/dist/bin/dndev.js +27 -2
  25. package/dist/bin/donotdev.js +27 -2
  26. package/dist/index.js +3960 -3015
  27. package/package.json +2 -2
  28. package/templates/app-demo/src/App.tsx.example +1 -0
  29. package/templates/app-demo/src/pages/FullPage.tsx.example +2 -2
  30. package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +2 -2
  31. package/templates/app-demo/src/themes.css.example +5 -12
  32. package/templates/app-expo/.env.example +64 -0
  33. package/templates/app-expo/.expo/README.md.example +5 -0
  34. package/templates/app-expo/.gitignore.example +36 -0
  35. package/templates/app-expo/README.md.example +58 -0
  36. package/templates/app-expo/app/.gitkeep +2 -0
  37. package/templates/app-expo/app/_layout.tsx.example +41 -0
  38. package/templates/app-expo/app/form.tsx.example +52 -0
  39. package/templates/app-expo/app/index.tsx.example +89 -0
  40. package/templates/app-expo/app/list.tsx.example +32 -0
  41. package/templates/app-expo/app/profile.tsx.example +76 -0
  42. package/templates/app-expo/app/signin.tsx.example +53 -0
  43. package/templates/app-expo/app.json.example +39 -0
  44. package/templates/app-expo/babel.config.js.example +10 -0
  45. package/templates/app-expo/eas.json.example +20 -0
  46. package/templates/app-expo/expo-env.d.ts.example +4 -0
  47. package/templates/app-expo/metro.config.js.example +20 -0
  48. package/templates/app-expo/service-account-key.json.example +12 -0
  49. package/templates/app-expo/tsconfig.json.example +19 -0
  50. package/templates/app-next/.env.example +4 -33
  51. package/templates/app-next/src/app/ClientLayout.tsx.example +2 -0
  52. package/templates/app-next/src/app/layout.tsx.example +7 -6
  53. package/templates/app-next/src/globals.css.example +2 -11
  54. package/templates/app-next/src/pages/HomePage.tsx.example +1 -1
  55. package/templates/app-next/src/themes.css.example +10 -13
  56. package/templates/app-vite/.env.example +3 -32
  57. package/templates/app-vite/index.html.example +2 -24
  58. package/templates/app-vite/src/App.tsx.example +2 -0
  59. package/templates/app-vite/src/globals.css.example +2 -12
  60. package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -2
  61. package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
  62. package/templates/app-vite/src/themes.css.example +109 -79
  63. package/templates/app-vite/vercel.json.example +11 -0
  64. package/templates/functions-firebase/build.mjs.example +2 -72
  65. package/templates/functions-firebase/functions-firebase/.env.example.example +23 -25
  66. package/templates/functions-firebase/functions-firebase/build.mjs.example +2 -72
  67. package/templates/functions-firebase/functions-firebase/tsconfig.json.example +1 -1
  68. package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +7 -0
  69. package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +11 -0
  70. package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +11 -0
  71. package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +7 -0
  72. package/templates/functions-supabase/supabase/functions/crud/index.ts.example +16 -0
  73. package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +7 -0
  74. package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +7 -0
  75. package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +7 -0
  76. package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +7 -0
  77. package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +7 -0
  78. package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +7 -0
  79. package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +24 -0
  80. package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +22 -0
  81. package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +28 -0
  82. package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +28 -0
  83. package/templates/functions-vercel/functions-vercel/tsconfig.json.example +1 -1
  84. package/templates/functions-vercel/functions-vercel/vercel.json.example +1 -1
  85. package/templates/functions-vercel/vercel.json.example +1 -1
  86. package/templates/github/github/workflows/firebase-deploy.yml.example +1 -1
  87. package/templates/github/workflows/firebase-deploy.yml.example +1 -1
  88. package/templates/overlay-firebase/env.fragment.example +34 -0
  89. package/templates/overlay-firebase/env.fragment.expo.example +34 -0
  90. package/templates/overlay-firebase/env.fragment.nextjs.example +34 -0
  91. package/templates/overlay-firebase/src/config/providers.expo.ts.example +49 -0
  92. package/templates/overlay-firebase/src/config/providers.ts.example +23 -0
  93. package/templates/overlay-supabase/env.fragment.example +7 -0
  94. package/templates/overlay-supabase/env.fragment.expo.example +7 -0
  95. package/templates/overlay-supabase/env.fragment.nextjs.example +7 -0
  96. package/templates/overlay-supabase/src/config/providers.expo.ts.example +35 -0
  97. package/templates/overlay-supabase/src/config/providers.ts.example +33 -0
  98. package/templates/overlay-supabase/vercel.headers.example +23 -0
  99. package/templates/overlay-supabase/vercel.json.example +22 -0
  100. package/templates/overlay-vercel/env.fragment.example +34 -0
  101. package/templates/overlay-vercel/env.fragment.nextjs.example +34 -0
  102. package/templates/overlay-vercel/src/config/providers.ts.example +24 -0
  103. package/templates/root-consumer/.claude/agents/architect.md.example +2 -310
  104. package/templates/root-consumer/.claude/agents/builder.md.example +2 -326
  105. package/templates/root-consumer/.claude/agents/coder.md.example +2 -83
  106. package/templates/root-consumer/.claude/agents/extractor.md.example +2 -231
  107. package/templates/root-consumer/.claude/agents/polisher.md.example +2 -132
  108. package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +2 -81
  109. package/templates/root-consumer/.claude/commands/grill.md.example +30 -0
  110. package/templates/root-consumer/.claude/commands/techdebt.md.example +28 -0
  111. package/templates/root-consumer/.clinerules.example +1 -0
  112. package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +15 -0
  113. package/templates/root-consumer/.cursorrules.example +1 -0
  114. package/templates/root-consumer/.github/copilot-instructions.md.example +1 -0
  115. package/templates/root-consumer/.windsurfrules.example +1 -0
  116. package/templates/root-consumer/AI.md.example +29 -123
  117. package/templates/root-consumer/CLAUDE.md.example +1 -134
  118. package/templates/root-consumer/CONVENTIONS.md.example +1 -0
  119. package/templates/root-consumer/GEMINI.md.example +1 -0
  120. package/templates/root-consumer/firebase.json.example +1 -1
  121. package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +20 -0
  122. package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -18
  123. package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +1 -1
  124. package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +99 -30
  125. package/templates/root-consumer/guides/dndev/INDEX.md.example +3 -1
  126. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +143 -12
  127. package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +9 -3
  128. package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +234 -0
  129. package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +124 -0
  130. package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +6 -2
  131. package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +176 -0
  132. package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +5 -9
  133. package/templates/root-consumer/guides/dndev/essences_reference.css.example +174 -0
  134. package/templates/root-consumer/guides/wai-way/agents/builder.md.example +10 -0
  135. package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +25 -5
  136. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +13 -2
  137. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +2 -2
  138. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +47 -11
  139. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +15 -4
  140. package/templates/root-consumer/guides/wai-way/spec_template.md.example +7 -6
  141. package/templates/app-payload/.env.example +0 -28
  142. package/templates/app-payload/README.md.example +0 -233
  143. package/templates/app-payload/collections/Company.ts.example +0 -125
  144. package/templates/app-payload/collections/Hero.ts.example +0 -62
  145. package/templates/app-payload/collections/Media.ts.example +0 -41
  146. package/templates/app-payload/collections/Products.ts.example +0 -115
  147. package/templates/app-payload/collections/Services.ts.example +0 -104
  148. package/templates/app-payload/collections/Testimonials.ts.example +0 -92
  149. package/templates/app-payload/collections/Users.ts.example +0 -35
  150. package/templates/app-payload/src/server.ts.example +0 -79
  151. package/templates/app-payload/tsconfig.json.example +0 -24
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Reference: Framework essences (Brutalist, Luxury).
3
+ * Copy the blocks you need into your app's src/themes.css.
4
+ * Default essence = SaaS (Inter); these do not apply until you set the class on <html>.
5
+ *
6
+ * Fonts: Space Grotesk (Brutalist), Playfair Display (Luxury), Inter, Roboto are bundled in @donotdev/ui (no external requests).
7
+ */
8
+
9
+ /** =========================================================================
10
+ * Brutalist — Industrial, monospace body, Space Grotesk headlines, orange/black.
11
+ * Set <html class="brutalist"> to apply.
12
+ * ========================================================================= */
13
+ .brutalist {
14
+ --theme-icon: 'Construction';
15
+ --theme-label: 'Brutalist';
16
+ --theme-is-dark: 1;
17
+
18
+ /* 1. Core Colors - Black + white + industrial orange */
19
+ --background: #000000;
20
+ --foreground: #ffffff;
21
+ --primary: #f97316;
22
+ --secondary: #ffffff;
23
+ --accent: #f97316;
24
+
25
+ /* 2. Semantic */
26
+ --success: #22c55e;
27
+ --warning: #f97316;
28
+ --destructive: #dc2626;
29
+
30
+ /* 3. Surfaces - Dark, industrial */
31
+ --muted: #111111;
32
+ --muted-foreground: #888888;
33
+ --border: #ffffff;
34
+ --input: #111111;
35
+ --ring: #f97316;
36
+ --card: #000000;
37
+ --card-foreground: #f97316;
38
+ --popover: #000000;
39
+ --popover-foreground: #ffffff;
40
+ --surface-1: #0a0a0a;
41
+
42
+ /* 4. Text on Colors */
43
+ --primary-foreground: #ffffff;
44
+ --secondary-foreground: #000000;
45
+ --accent-foreground: #000000;
46
+ --success-foreground: #ffffff;
47
+ --warning-foreground: #000000;
48
+ --destructive-foreground: #ffffff;
49
+
50
+ /* 5. Radius - Hard zero */
51
+ --radius-interactive: 0;
52
+ --radius-surface: 0;
53
+ --radius-floating: 0;
54
+
55
+ /* 6. Typography - Monospace for body, Space Grotesk 700 for headings */
56
+ --font-family: var(--font-mono);
57
+ --font-headline: "Space Grotesk", var(--font-sans);
58
+ --font-weight-semibold: 700;
59
+ --font-weight-bold: 700;
60
+
61
+ /* 7. Borders */
62
+ --border-width: 2px;
63
+ --border-huge: 4px;
64
+
65
+ /* 8. Shadows — flat by default, hard offset on interactive */
66
+ --shadow-color: var(--foreground);
67
+ --shadow-sm: none;
68
+ --shadow-md: none;
69
+ --shadow-xl: 8px 8px 0px 0px var(--shadow-color);
70
+ --shadow-cta: 20px 20px 0px 0px var(--shadow-color);
71
+
72
+ /* 9. Per-variant shadows — only at xl level (elevated/clickable) */
73
+ --shadow-primary: none;
74
+ --shadow-primary-xl: 8px 8px 0px 0px var(--background);
75
+ --shadow-secondary: none;
76
+ --shadow-secondary-xl: 8px 8px 0px 0px var(--primary);
77
+
78
+ /* 10. Header padding for hard-offset shadows */
79
+ --header-shadow-padding: 0.75rem;
80
+ }
81
+
82
+ /* Body - grid background */
83
+ .brutalist body {
84
+ background-color: var(--background);
85
+ background-image:
86
+ linear-gradient(#111 1px, transparent 1px),
87
+ linear-gradient(90deg, #111 1px, transparent 1px);
88
+ background-size: 40px 40px;
89
+ }
90
+
91
+ /* Uppercase headings (both native elements and Text component levels) */
92
+ .brutalist {
93
+ :is(h1, h2, h3, h4, h5, h6),
94
+ [data-level^='h'] {
95
+ text-transform: uppercase;
96
+ }
97
+ }
98
+
99
+ /* Flat surface - no gradient glow */
100
+ .brutalist .dndev-surface { background: var(--card); }
101
+ .brutalist .dndev-surface[data-variant='outline'] { border: var(--border-width) solid var(--border); }
102
+
103
+ .brutalist .dndev-card[data-variant='outline'] {
104
+ background: transparent;
105
+ box-shadow: none;
106
+ }
107
+
108
+
109
+ /** =========================================================================
110
+ * Luxury — Playfair Display headlines, gold/cream, warm shadows.
111
+ * Set <html class="luxury"> to apply.
112
+ * ========================================================================= */
113
+ .luxury {
114
+ --theme-icon: 'Gem';
115
+ --theme-label: 'Luxury';
116
+ --theme-is-dark: 0;
117
+
118
+ /* 1. Core Colors */
119
+ --background: #faf8f5;
120
+ --foreground: #1c1917;
121
+ --primary: #b45309;
122
+ --secondary: #fef3c7;
123
+ --accent: #92400e;
124
+
125
+ /* 2. Semantic */
126
+ --success: #15803d;
127
+ --warning: #b45309;
128
+ --destructive: #b91c1c;
129
+
130
+ /* 3. Surfaces */
131
+ --muted: #fef9c3;
132
+ --muted-foreground: #78716c;
133
+ --border: #e7e5e4;
134
+ --border-hairline: 1px;
135
+ --input: #ffffff;
136
+ --ring: #b45309;
137
+ --card: #ffffff;
138
+ --card-foreground: #1c1917;
139
+ --popover: #ffffff;
140
+ --popover-foreground: #1c1917;
141
+ --surface-1: #faf8f5;
142
+
143
+ /* 4. Text on Colors */
144
+ --primary-foreground: #ffffff;
145
+ --secondary-foreground: #1c1917;
146
+ --accent-foreground: #ffffff;
147
+ --success-foreground: #ffffff;
148
+ --warning-foreground: #1c1917;
149
+ --destructive-foreground: #ffffff;
150
+
151
+ /* 5. Radius */
152
+ --radius-interactive: 0.375rem;
153
+ --radius-surface: 0.5rem;
154
+ --radius-floating: 0.5rem;
155
+
156
+ /* 6. Typography — lighter weights, serif headlines */
157
+ --font-family: var(--font-sans);
158
+ --font-headline: 'Playfair Display', var(--font-serif);
159
+ --font-weight-normal: 300;
160
+ --font-weight-medium: 400;
161
+ --font-weight-semibold: 500;
162
+ --font-weight-bold: 600;
163
+
164
+ /* 7. Spacing — generous, one notch above expressive */
165
+ --gap-sm: 0.75rem;
166
+ --gap-md: 1.5rem;
167
+ --gap-lg: 3rem;
168
+
169
+ /* 8. Shadows — warm gold-tinted, soft diffused */
170
+ --shadow-color: color-mix(in oklab, #b45309 8%, transparent);
171
+ --shadow-sm: 0 1px 3px var(--shadow-color);
172
+ --shadow-md: 0 4px 12px var(--shadow-color);
173
+ --shadow-xl: 0 8px 24px var(--shadow-color);
174
+ }
@@ -31,6 +31,10 @@ core_principles:
31
31
  - HARDCODE strings first - validate UX before i18n
32
32
  - Use framework components only - no custom CSS
33
33
  - Trust component defaults
34
+ - **70/30 Hierarchy:** Use `primary` variant for the North Star action; `outline`/`ghost` for others.
35
+ - **Benefit-First Copy:** For Heros/Cards, translate technical features into outcomes (e.g., 'Optimize Your Fleet' vs 'Manage Cars').
36
+ - **Success Intent:** Trust framework defaults for CRUD (automatic toasts/loaders). Only propose custom redirects or celebratory components for the 'North Star' action or if the user asks for more polish.
37
+ - **Spec Drift:** If you must deviate from the spec (field types, logic), log it in `spec_changes.md`. Do NOT modify `spec_template.md` directly.
34
38
 
35
39
  crud_pattern:
36
40
  list_page: |
@@ -83,5 +87,11 @@ Rules:
83
87
  3. HARDCODE all strings (no i18n yet)
84
88
  4. Use framework components only
85
89
 
90
+ **Apply UX Mandates:**
91
+ - **Visual Anchor:** Every page must have ONE clear primary focus (Hero or Main Card).
92
+ - **Mobile First:** Ensure all touch targets are > 44px.
93
+ - **Kano Filter:** Use 'Benefit' copy for marketing/dashboard pages. Use 'Utility' copy for forms.
94
+ - **Success Intent:** Trust framework defaults. Only propose custom redirects/celebration for the 'North Star' action.
95
+
86
96
  Build each page following the scaffolded patterns.
87
97
  ```
@@ -36,6 +36,10 @@ core_principles:
36
36
  - Define entity states and transitions
37
37
  - Capture business rules and validations explicitly
38
38
  - Never assume - always ask
39
+ - **UX Strategist:** Identify the "North Star" action (max 2 clicks from home).
40
+ - **Kano Prioritization:** Tag features as Must-Have vs Delighter.
41
+ - **Duty to Advise:** Challenge layouts with high friction (> 2 clicks). If the user overrides your advice, log it in **Section 11** of the spec and move on.
42
+ - **Spec Drift:** Any changes to the validated spec must be logged in `spec_changes.md` for human review.
39
43
 
40
44
  phase_0_brainstorm:
41
45
  goal: DEEPLY understand the app and produce COMPLETE validated spec
@@ -47,7 +51,7 @@ phase_0_brainstorm:
47
51
  questions:
48
52
  - "Describe your app in one paragraph. What problem does it solve?"
49
53
  - "Who is the primary user? Who else uses it?"
50
- - "What's the ONE thing a user MUST be able to do?"
54
+ - "What's the ONE thing a user MUST be able to do? (The North Star)"
51
55
  - "What makes this different from similar apps?"
52
56
  done_when: "Can explain the app to someone unfamiliar in 2 minutes"
53
57
 
@@ -111,17 +115,26 @@ phase_0_brainstorm:
111
115
  - "What happens when [entity status] changes unexpectedly?"
112
116
  done_when: "Common failure scenarios have defined handling"
113
117
 
114
- output: Filled spec_template.md with ALL sections complete, validated by user
118
+ 7_ux_intent:
119
+ purpose: "Plan the layout hierarchy and navigation flow"
120
+ questions:
121
+ - "Where should the shortcut for the North Star action live? (Goal: < 2 clicks)"
122
+ - "Which features are 'Delighters' (Marketing/Heroes) vs 'Must-Haves' (CRUD)?"
123
+ done_when: "Navigation hierarchy planned; high-friction paths challenged"
124
+
125
+ output: Filled spec_template.md with ALL sections complete, including Section 11 for overrides.
115
126
 
116
127
  phase_1_scaffold:
117
- goal: Create all pages from validated spec
128
+ goal: Create an Interactive Prototype from the validated spec
118
129
  prerequisite: "spec_template.md is COMPLETE with no empty sections or TBDs"
119
130
  steps:
120
131
  - Verify spec is truly complete
121
132
  - Create *Page.tsx files for each route in spec
122
- - Set PageMeta (namespace, icon, auth) from spec
133
+ - Set PageMeta (namespace, icon). **Set auth: false** temporarily so the user can click through the prototype without login.
134
+ - **Interactive Stubs:** Each page must contain its 'Role' (from spec) and 'Next Step' navigation buttons to related pages.
135
+ - **Friction Check:** If North Star path > 2 clicks, propose a 'Global Shortcut' (Header/Sidebar).
123
136
  - Verify app runs with bun dev
124
- output: All routes exist as stub pages with correct PageMeta
137
+ output: All routes exist as **Interactive Prototype Stubs** with navigation buttons.
125
138
 
126
139
  validation_checklist:
127
140
  before_filling_spec:
@@ -129,14 +142,21 @@ validation_checklist:
129
142
  - [ ] Can trace every page back to a user journey
130
143
  - [ ] Can answer "who can do X to Y?" for any entity/action
131
144
  - [ ] Can answer "what happens when Z fails?" for common scenarios
145
+ - [ ] **North Star identified:** Defined a max 2-click path for the core action.
132
146
 
133
147
  before_moving_to_scaffold:
134
148
  - [ ] Every user journey has numbered steps
135
149
  - [ ] Every entity has fields, states, permissions
136
150
  - [ ] Every business rule is explicit
151
+ - [ ] **Overrides logged:** Any intentional UX friction documented in Section 11.
137
152
  - [ ] No empty fields in spec_template.md
138
153
  - [ ] User has validated the spec
139
154
 
155
+ after_scaffold_validation:
156
+ - [ ] App is running and clickable.
157
+ - [ ] User has clicked through the "North Star" path.
158
+ - [ ] Sitemap and click-depth are validated in the browser.
159
+
140
160
  read_files:
141
161
  - "guides/wai-way/blueprints/0_brainstorm.md"
142
162
  - "guides/wai-way/spec_template.md"
@@ -21,7 +21,7 @@ persona:
21
21
 
22
22
  golden_rule: |
23
23
  THE SPEC IS YOUR TEST PLAN.
24
- READ the spec (Phase 0 output) for entities, permissions, journeys.
24
+ READ the spec (Phase 0 output) and `spec_changes.md` for entities, permissions, journeys.
25
25
  READ each entity file for access rules and fields.
26
26
  GENERATE tests that verify the spec is implemented correctly.
27
27
 
@@ -31,6 +31,8 @@ core_principles:
31
31
  - Configuration: app.ts, legal.ts, .env
32
32
  - Mobile check: 375px width
33
33
  - i18n is OPTIONAL and comes LAST
34
+ - **Contract Check:** Consult **Section 11** of the spec for intentional UX overrides. If a layout deviation is documented there, it is a **PASS**.
35
+ - **Heuristic Audit:** Verify 3-click rule for North Star, system status visibility (loaders), and visual hierarchy.
34
36
 
35
37
  test_generation:
36
38
  entity_tests:
@@ -53,6 +55,14 @@ test_generation:
53
55
  - No unauthenticated writes
54
56
  output: "tests/access/access-rules.test.ts"
55
57
 
58
+ ux_audit_checklist:
59
+ - [ ] **Contract Compliance:** Check Section 11 of spec for approved deviations.
60
+ - [ ] **Spec Drift Review:** Ensure all changes in `spec_changes.md` are documented and explained.
61
+ - [ ] **North Star Check:** Is the primary action reachable in < 3 clicks? (Unless overridden)
62
+ - [ ] **Hierarchy:** Does every page have a clear visual anchor (one primary focus)?
63
+ - [ ] **System Status:** Verify framework default feedback (Toasts/Loaders) is visible. Ask if 'North Star' action needs a custom 'Delighter' redirect.
64
+ - [ ] **Mobile:** Touch targets > 44px, no horizontal scroll.
65
+
56
66
  firestore_rules:
57
67
  source: "Entity access definitions"
58
68
  mapping:
@@ -116,7 +126,8 @@ Steps:
116
126
  6. Update app.ts, legal.ts, .env
117
127
  7. Run bun test — all must pass
118
128
  8. Mobile check at 375px
119
- 9. (Optional) Add i18n
129
+ 9. **UX Audit** (3-click rule, Visual Anchor, Mobile targets, and Spec Drift review)
130
+ 10. (Optional) Add i18n
120
131
 
121
132
  Call get_guide("TESTING") for testing patterns.
122
133
  ```
@@ -37,8 +37,7 @@ User provides idea
37
37
 
38
38
  Agent calls list_features() → matches needs to existing framework capabilities
39
39
 
40
- Agent asks IDENTITY questions (who, what, why)
41
-
40
+ Agent asks IDENTITY questions (who, what, why, and **Aesthetic Essence**)
42
41
  Agent asks USER JOURNEY questions (what do users DO step by step?)
43
42
 
44
43
  Agent asks DATA questions (what entities, relationships, states?)
@@ -66,6 +65,7 @@ Start broad, then narrow down:
66
65
  - "Who is the primary user? Secondary users?"
67
66
  - "What's the one thing a user MUST be able to do?"
68
67
  - "What makes this different from [similar apps]?"
68
+ - **Aesthetic Essence:** "Which visual 'vibe' fits the brand? SaaS (Clean/Modern), Luxury (Gold/Serif), or Brutalist (Orange/High-Contrast)?"
69
69
 
70
70
  **Don't proceed until you can explain the app to someone else.**
71
71
 
@@ -22,7 +22,18 @@ Preset comes from your completed spec (Phase 0).
22
22
 
23
23
  ---
24
24
 
25
- ## Step 2: Review Spec Pages
25
+ ## Step 2: Apply Aesthetic Essence
26
+
27
+ **READ:** `guides/dndev/essences_reference.css`
28
+
29
+ Apply the chosen essence (SaaS, Luxury, Brutalist) to your `src/themes.css`.
30
+ - If **SaaS**: Keep defaults.
31
+ - If **Luxury/Brutalist**: Copy the variables from the reference file into `src/themes.css`.
32
+ - If **Custom**: Adjust primary/secondary colors in `:root`.
33
+
34
+ ---
35
+
36
+ ## Step 3: Review Spec Pages
26
37
 
27
38
  From your spec, you have a list of pages. Now create them.
28
39
 
@@ -43,13 +54,16 @@ touch src/pages/ProductPage.tsx
43
54
 
44
55
  ---
45
56
 
46
- ## Step 4: Add PageMeta
57
+ ## Step 4: Create Interactive Prototype Stubs
47
58
 
48
59
  **READ:** `src/pages/HomePage.tsx` for PageMeta pattern.
49
60
 
61
+ For **each page**, create a functional stub that allows the user to validate the flow.
62
+
50
63
  ```tsx
51
64
  import type { PageMeta } from '@donotdev/core';
52
- import { PageContainer } from '@donotdev/ui';
65
+ import { PageContainer, Link } from '@donotdev/ui';
66
+ import { Section, Stack, Text, Card, Button } from '@donotdev/components';
53
67
  import { Info } from 'lucide-react';
54
68
 
55
69
  export const NAMESPACE = 'about';
@@ -57,22 +71,44 @@ export const NAMESPACE = 'about';
57
71
  export const meta: PageMeta = {
58
72
  namespace: NAMESPACE,
59
73
  icon: <Info />,
60
- // From spec:
61
- // auth: true, // Protected
62
- // auth: { required: true, role: 'admin' }, // Admin
63
- // hideFromMenu: true, // Form pages
74
+ // From spec: Set auth: false for the prototype phase so user can click through
75
+ auth: false,
64
76
  };
65
77
 
66
78
  export default function AboutPage() {
67
- return <PageContainer>About Page</PageContainer>;
79
+ return (
80
+ <PageContainer>
81
+ <Section title="About Page (Prototype Stub)">
82
+ <Stack gap="large">
83
+ <Text><strong>Role:</strong> [Describe the purpose of this page from the spec]</Text>
84
+
85
+ <Text level="h3">Navigate Flow:</Text>
86
+ <Stack direction="row" gap="medium">
87
+ <Link path="/dashboard">
88
+ <Button variant="outline">Go to Dashboard</Button>
89
+ </Link>
90
+ <Link path="/contact">
91
+ <Button variant="outline">Go to Contact</Button>
92
+ </Link>
93
+ </Stack>
94
+
95
+ {/* Placeholder for flow validation */}
96
+ <Card variant="outline" content={[`[Placeholder for ${NAMESPACE} core components]`]} />
97
+ </Stack>
98
+ </Section>
99
+ </PageContainer>
100
+ );
68
101
  }
69
102
  ```
70
103
 
104
+ **Goal:** The user should be able to `bun dev` and click through the entire app flow (the "North Star" path) to validate the architecture before you build any logic.
105
+
71
106
  ---
72
107
 
73
108
  ## Output
74
109
 
75
110
  - [ ] App runs with `bun dev`
76
- - [ ] All route files created (from spec)
77
- - [ ] PageMeta set with correct auth levels (from spec)
78
- - [ ] Navigation auto-generated
111
+ - [ ] All route files created as **Interactive Stubs**
112
+ - [ ] PageMeta set (auth: false for prototype validation)
113
+ - [ ] Navigation links included on each stub to related pages
114
+ - [ ] User has "clicked through" the flow and validated sitemap/friction
@@ -9,7 +9,18 @@
9
9
 
10
10
  ---
11
11
 
12
- ## Step 1: Read Page Patterns
12
+ ## Step 1: Apply UX Intent Rules
13
+
14
+ **Every page must follow the Designer Mandate:**
15
+ 1. **70/30 Hierarchy:** Only ONE `primary` variant button/card per view. Use `outline` or `muted` for everything else to direct the user's eye to the North Star.
16
+ 2. **Benefit-First Copy:** Do not use technical titles for Heros/Cards.
17
+ - ❌ "User Management" → ✅ "Empower Your Team"
18
+ - ❌ "Car List" → ✅ "Explore the Fleet"
19
+ 3. **Success Intent:** Ensure framework default toasts are working. Only add a custom celebratory view or Redirect for the **North Star** goal completion.
20
+
21
+ ---
22
+
23
+ ## Step 2: Read Page Patterns
13
24
 
14
25
  **READ:** `guides/wai-way/page_patterns.md` for all patterns:
15
26
  - Dashboard, List Page, Form Page
@@ -18,7 +29,7 @@
18
29
 
19
30
  ---
20
31
 
21
- ## Step 2: CRUD Pages
32
+ ## Step 3: CRUD Pages
22
33
 
23
34
  For each entity in spec:
24
35
 
@@ -60,7 +71,7 @@ export default function ProductPage() {
60
71
 
61
72
  ---
62
73
 
63
- ## Step 3: Dashboard Page
74
+ ## Step 4: Dashboard Page
64
75
 
65
76
  Copy Dashboard pattern from `page_patterns.md`:
66
77
  - Quick actions (cards with onClick)
@@ -69,7 +80,7 @@ Copy Dashboard pattern from `page_patterns.md`:
69
80
 
70
81
  ---
71
82
 
72
- ## Step 4: Landing Pages
83
+ ## Step 5: Landing Pages
73
84
 
74
85
  Copy Landing pattern from `page_patterns.md`:
75
86
  - HeroSection with CTAs
@@ -14,6 +14,7 @@
14
14
  | **Primary User** | _(Who uses this daily?)_ |
15
15
  | **Secondary Users** | _(Who else interacts?)_ |
16
16
  | **Core Value** | _(What problem does it solve?)_ |
17
+ | **Aesthetic Essence** | SaaS (Default) / Luxury / Brutalist / Custom |
17
18
 
18
19
  ---
19
20
 
@@ -275,13 +276,13 @@ _(Copy entity template for each entity)_
275
276
 
276
277
  ---
277
278
 
278
- ## 11. Open Questions
279
+ ## 11. Design Decisions & Overrides
280
+ > **CRITICAL:** These are intentional deviations from framework UX heuristics (e.g., 3-click rule, 70/30 hierarchy).
281
+ > **FOR AGENTS:** If a layout choice is documented here, do NOT challenge or flag it during the Build or Polish phases.
279
282
 
280
- > Anything unresolved? List here. **No coding until resolved.**
281
-
282
- - [ ]
283
- - [ ]
284
- - [ ]
283
+ | Target (Page/Feature) | Override Description | Rationale |
284
+ |-----------------------|----------------------|-----------|
285
+ | | | |
285
286
 
286
287
  ---
287
288
 
@@ -1,28 +0,0 @@
1
- # Payload CMS Configuration
2
- PAYLOAD_SECRET=your-super-secret-key-here
3
- PAYLOAD_PUBLIC_SERVER_URL=http://localhost:3001
4
-
5
- # Database Configuration (MongoDB)
6
- MONGODB_URI=mongodb://localhost:27017/{{projectName}}
7
-
8
- # For production, use MongoDB Atlas or similar
9
- # MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/{{projectName}}?retryWrites=true&w=majority
10
-
11
- # Optional: Redis for caching (recommended for production)
12
- # REDIS_URL=redis://localhost:6379
13
-
14
- # CORS Origins (comma-separated)
15
- CORS_ORIGINS=http://localhost:3000,https://{{projectName}}.com,https://admin.{{projectName}}.com
16
-
17
- # File Upload Configuration
18
- PAYLOAD_PUBLIC_MAX_FILE_SIZE=5000000
19
-
20
- # Admin Configuration
21
- PAYLOAD_PUBLIC_ADMIN_EMAIL=admin@{{projectName}}.com
22
- PAYLOAD_PUBLIC_ADMIN_PASSWORD=your-admin-password
23
-
24
- # Optional: Email Configuration (for notifications)
25
- # SMTP_HOST=smtp.gmail.com
26
- # SMTP_PORT=587
27
- # SMTP_USER=your-email@gmail.com
28
- # SMTP_PASS=your-app-password