ai-flow-dev 2.1.3 → 2.1.5

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 (96) hide show
  1. package/README.md +25 -38
  2. package/dist/cli.js +68 -46
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +5 -5
  5. package/prompts/backend/flow-build-phase-0.md +31 -63
  6. package/prompts/backend/flow-build-phase-1.md +9 -17
  7. package/prompts/backend/flow-build-phase-10.md +199 -585
  8. package/prompts/backend/flow-build-phase-2.md +152 -86
  9. package/prompts/backend/flow-build-phase-3.md +108 -68
  10. package/prompts/backend/flow-build-phase-4.md +5 -8
  11. package/prompts/backend/flow-build-phase-5.md +39 -12
  12. package/prompts/backend/flow-build-phase-6.md +29 -8
  13. package/prompts/backend/flow-build-phase-7.md +120 -40
  14. package/prompts/backend/flow-build-phase-8.md +28 -65
  15. package/prompts/backend/flow-build-phase-9.md +267 -1298
  16. package/prompts/backend/flow-build.md +881 -957
  17. package/prompts/backend/flow-dev-commit.md +27 -50
  18. package/prompts/backend/flow-dev-feature.md +1929 -2017
  19. package/prompts/backend/flow-dev-fix.md +936 -964
  20. package/prompts/backend/flow-dev-refactor.md +672 -701
  21. package/prompts/backend/flow-dev-review.md +356 -389
  22. package/prompts/backend/flow-dev-work.md +1066 -1118
  23. package/prompts/backend/flow-docs-sync.md +20 -196
  24. package/prompts/frontend/flow-build-phase-0.md +503 -484
  25. package/prompts/frontend/flow-build-phase-1.md +445 -433
  26. package/prompts/frontend/flow-build-phase-2.md +910 -957
  27. package/prompts/frontend/flow-build-phase-3.md +692 -664
  28. package/prompts/frontend/flow-build-phase-4.md +478 -463
  29. package/prompts/frontend/flow-build-phase-5.md +488 -467
  30. package/prompts/frontend/flow-build-phase-6.md +571 -550
  31. package/prompts/frontend/flow-build-phase-7.md +560 -592
  32. package/prompts/frontend/flow-build-phase-8.md +17 -42
  33. package/prompts/frontend/flow-build.md +457 -503
  34. package/prompts/frontend/flow-docs-sync.md +14 -35
  35. package/prompts/mobile/flow-build-phase-0.md +104 -97
  36. package/prompts/mobile/flow-build-phase-1.md +137 -122
  37. package/prompts/mobile/flow-build-phase-2.md +123 -130
  38. package/prompts/mobile/flow-build-phase-3.md +144 -149
  39. package/prompts/mobile/flow-build-phase-4.md +140 -132
  40. package/prompts/mobile/flow-build-phase-5.md +70 -70
  41. package/prompts/mobile/flow-build-phase-6.md +136 -134
  42. package/prompts/mobile/flow-build-phase-7.md +24 -58
  43. package/prompts/mobile/flow-build-phase-8.md +17 -42
  44. package/prompts/mobile/flow-build.md +47 -97
  45. package/prompts/mobile/flow-docs-sync.md +13 -32
  46. package/prompts/shared/mermaid-guidelines.md +106 -0
  47. package/prompts/shared/scope-levels.md +126 -0
  48. package/prompts/shared/story-points.md +65 -0
  49. package/prompts/shared/task-format.md +86 -0
  50. package/templates/AGENT.template.md +194 -15
  51. package/templates/backend/README.template.md +2 -32
  52. package/templates/backend/ai-instructions.template.md +2 -32
  53. package/templates/backend/copilot-instructions.template.md +2 -22
  54. package/templates/backend/docs/api.template.md +89 -20
  55. package/templates/backend/docs/architecture.template.md +165 -53
  56. package/templates/backend/docs/business-flows.template.md +7 -14
  57. package/templates/backend/docs/code-standards.template.md +2 -38
  58. package/templates/backend/docs/contributing.template.md +2 -16
  59. package/templates/backend/docs/data-model.template.md +125 -21
  60. package/templates/backend/docs/operations.template.md +179 -50
  61. package/templates/backend/docs/testing.template.md +2 -42
  62. package/templates/backend/project-brief.template.md +2 -28
  63. package/templates/backend/specs/configuration.template.md +2 -14
  64. package/templates/backend/specs/security.template.md +2 -32
  65. package/templates/frontend/README.template.md +2 -18
  66. package/templates/frontend/ai-instructions.template.md +2 -20
  67. package/templates/frontend/docs/api-integration.template.md +12 -30
  68. package/templates/frontend/docs/components.template.md +2 -28
  69. package/templates/frontend/docs/error-handling.template.md +11 -27
  70. package/templates/frontend/docs/operations.template.md +8 -18
  71. package/templates/frontend/docs/performance.template.md +8 -18
  72. package/templates/frontend/docs/pwa.template.md +8 -18
  73. package/templates/frontend/docs/state-management.template.md +2 -28
  74. package/templates/frontend/docs/styling.template.md +2 -26
  75. package/templates/frontend/docs/testing.template.md +2 -28
  76. package/templates/frontend/project-brief.template.md +2 -16
  77. package/templates/frontend/specs/accessibility.template.md +8 -18
  78. package/templates/frontend/specs/configuration.template.md +2 -24
  79. package/templates/frontend/specs/security.template.md +10 -24
  80. package/templates/fullstack/README.template.md +17 -47
  81. package/templates/fullstack/ai-instructions.template.md +17 -45
  82. package/templates/fullstack/project-brief.template.md +16 -42
  83. package/templates/fullstack/specs/configuration.template.md +16 -42
  84. package/templates/mobile/README.template.md +11 -29
  85. package/templates/mobile/ai-instructions.template.md +11 -27
  86. package/templates/mobile/docs/app-store.template.md +11 -29
  87. package/templates/mobile/docs/architecture.template.md +14 -38
  88. package/templates/mobile/docs/native-features.template.md +16 -44
  89. package/templates/mobile/docs/navigation.template.md +9 -23
  90. package/templates/mobile/docs/offline-strategy.template.md +10 -26
  91. package/templates/mobile/docs/permissions.template.md +9 -23
  92. package/templates/mobile/docs/state-management.template.md +12 -32
  93. package/templates/mobile/docs/testing.template.md +14 -38
  94. package/templates/mobile/project-brief.template.md +12 -30
  95. package/templates/mobile/specs/build-configuration.template.md +10 -26
  96. package/templates/mobile/specs/deployment.template.md +9 -23
@@ -1,482 +1,497 @@
1
- # Phase 4: Styling & Design System
2
-
3
- **Duration:** 15-20 minutes
4
- **Questions:** ~11 questions
5
- **Output:** docs/styling.md, parts of ai-instructions.md
6
-
1
+ # Phase 4: Styling & Design System
2
+
3
+ **Duration:** 15-20 minutes
4
+ **Questions:** ~11 questions
5
+ **Output:** docs/styling.md, parts of ai-instructions.md
7
6
  ---
8
-
9
- ## 🎯 Objective
10
-
11
- Define your styling architecture and design system:
12
-
13
- 1. What CSS approach will you use?
14
- 2. Do you need design tokens?
15
- 3. Will you support theming?
16
- 4. What's your responsive strategy?
17
- 5. How will you organize styles?
18
-
7
+ ## 🎯 Objective
8
+
9
+ Define your styling architecture and design system:
10
+
11
+ 1. What CSS approach will you use?
12
+ 2. Do you need design tokens?
13
+ 3. Will you support theming?
14
+ 4. What's your responsive strategy?
15
+ 5. How will you organize styles?
19
16
  ---
20
-
21
- ## 📋 Questions
22
-
23
- ### Question 4.1: Styling Approach
24
-
25
- **What CSS architecture will you use?**
26
-
27
- A) ⭐ **Tailwind CSS** (Recommended for most)
28
- - Features: Utility-first, rapid development, small production bundle
29
- - Pros: Fast prototyping, consistent design, great DX
30
- - Cons: Verbose HTML, learning curve
31
- - Best for: Most modern apps
32
- - Bundle: ~10KB (purged)
33
-
34
- B) 🔥 **CSS Modules**
35
- - Features: Scoped CSS, traditional CSS syntax
36
- - Pros: Familiar, type-safe (TypeScript), no runtime
37
- - Cons: More manual work, no design system out of box
38
- - Best for: Teams preferring traditional CSS
39
- - Bundle: Variable (your CSS only)
40
-
41
- C) **Styled Components**
42
- - Features: CSS-in-JS, component-scoped styles
43
- - Pros: Dynamic styling, props-based theming, scoped by default
44
- - Cons: Runtime cost, larger bundle
45
- - Best for: Component libraries, dynamic themes
46
- - Bundle: ~16KB
47
-
48
- D) **Emotion**
49
- - Features: CSS-in-JS, faster than Styled Components
50
- - Pros: Better performance than SC, both runtime and compile-time
51
- - Cons: Still has runtime overhead
52
- - Best for: Performance-critical CSS-in-JS
53
- - Bundle: ~11KB
54
-
55
- E) **Sass/SCSS**
56
- - Features: CSS preprocessor, variables, mixins
57
- - Pros: Mature, powerful, compile-time
58
- - Cons: Global scope (without modules), manual optimization
59
- - Best for: Legacy projects, traditional workflows
60
- - Bundle: Variable
61
-
62
- F) **Vanilla Extract**
63
- - Features: Zero-runtime CSS-in-TS
64
- - Pros: Type-safe, no runtime, great DX
65
- - Cons: Newer, smaller ecosystem
66
- - Best for: Type safety + performance
67
- - Bundle: 0KB runtime
68
-
69
- G) **UnoCSS**
70
- - Features: Atomic CSS engine, faster than Tailwind
71
- - Pros: Extremely fast, flexible, smaller bundle
72
- - Cons: Newer, smaller community
73
- - Best for: Performance-critical apps
74
- - Bundle: ~5KB
75
-
76
- **Your answer:**
77
-
17
+ ## 📋 Questions
18
+
19
+ ### Question 4.1: Styling Approach
20
+
21
+ **What CSS architecture will you use?**
22
+
23
+ A) ⭐ **Tailwind CSS** (Recommended for most)
24
+
25
+ - Features: Utility-first, rapid development, small production bundle
26
+ - Pros: Fast prototyping, consistent design, great DX
27
+ - Cons: Verbose HTML, learning curve
28
+ - Best for: Most modern apps
29
+ - Bundle: ~10KB (purged)
30
+
31
+ B) 🔥 **CSS Modules**
32
+
33
+ - Features: Scoped CSS, traditional CSS syntax
34
+ - Pros: Familiar, type-safe (TypeScript), no runtime
35
+ - Cons: More manual work, no design system out of box
36
+ - Best for: Teams preferring traditional CSS
37
+ - Bundle: Variable (your CSS only)
38
+
39
+ C) **Styled Components**
40
+
41
+ - Features: CSS-in-JS, component-scoped styles
42
+ - Pros: Dynamic styling, props-based theming, scoped by default
43
+ - Cons: Runtime cost, larger bundle
44
+ - Best for: Component libraries, dynamic themes
45
+ - Bundle: ~16KB
46
+
47
+ D) **Emotion**
48
+
49
+ - Features: CSS-in-JS, faster than Styled Components
50
+ - Pros: Better performance than SC, both runtime and compile-time
51
+ - Cons: Still has runtime overhead
52
+ - Best for: Performance-critical CSS-in-JS
53
+ - Bundle: ~11KB
54
+
55
+ E) **Sass/SCSS**
56
+
57
+ - Features: CSS preprocessor, variables, mixins
58
+ - Pros: Mature, powerful, compile-time
59
+ - Cons: Global scope (without modules), manual optimization
60
+ - Best for: Legacy projects, traditional workflows
61
+ - Bundle: Variable
62
+
63
+ F) **Vanilla Extract**
64
+
65
+ - Features: Zero-runtime CSS-in-TS
66
+ - Pros: Type-safe, no runtime, great DX
67
+ - Cons: Newer, smaller ecosystem
68
+ - Best for: Type safety + performance
69
+ - Bundle: 0KB runtime
70
+
71
+ G) **UnoCSS**
72
+
73
+ - Features: Atomic CSS engine, faster than Tailwind
74
+ - Pros: Extremely fast, flexible, smaller bundle
75
+ - Cons: Newer, smaller community
76
+ - Best for: Performance-critical apps
77
+ - Bundle: ~5KB
78
+
79
+ **Your answer:**
78
80
  ---
79
-
80
- ### Question 4.2: Component Library / UI Kit
81
-
82
- **Will you use a pre-built component library?**
83
-
84
- #### React Options
85
-
86
- A) ⭐ **None (Custom Components)**
87
- - Build everything from scratch
88
- - Best for: Full design control, unique designs
89
-
90
- B) 🔥 **shadcn/ui** (Unstyled, customizable)
91
- - Features: Copy-paste components, Radix UI primitives
92
- - Best for: Tailwind users, full customization
93
-
94
- C) **Material UI (MUI)**
95
- - Features: Material Design, comprehensive, mature
96
- - Best for: Google Material Design aesthetic
97
- - Bundle: ~90KB
98
-
99
- D) **Chakra UI**
100
- - Features: Accessible, composable, themeable
101
- - Best for: Rapid development, accessibility
102
- - Bundle: ~50KB
103
-
104
- E) **Ant Design**
105
- - Features: Enterprise-focused, comprehensive
106
- - Best for: Admin panels, dashboards, Chinese market
107
- - Bundle: ~120KB
108
-
109
- F) **Mantine**
110
- - Features: Modern, hooks-based, feature-rich
111
- - Best for: Developer experience, rapid prototyping
112
- - Bundle: ~40KB
113
-
114
- #### Vue Options
115
-
116
- A) **None (Custom Components)**
117
- B) 🔥 **Vuetify** - Material Design for Vue
118
- C) **Quasar** - Full framework with components
119
- D) **PrimeVue** - Rich component library
120
- E) **Element Plus** - Enterprise UI library
121
-
122
- #### Angular Options
123
-
124
- A) **None (Custom Components)**
125
- B) **Angular Material** - Official Material Design
126
- C) **PrimeNG** - Rich component library
127
- D) **NG-ZORRO** - Ant Design for Angular
128
-
129
- **Your answer:**
130
-
81
+ ### Question 4.2: Component Library / UI Kit
82
+
83
+ **Will you use a pre-built component library?**
84
+
85
+ #### React Options
86
+
87
+ A) ⭐ **None (Custom Components)**
88
+
89
+ - Build everything from scratch
90
+ - Best for: Full design control, unique designs
91
+
92
+ B) 🔥 **shadcn/ui** (Unstyled, customizable)
93
+
94
+ - Features: Copy-paste components, Radix UI primitives
95
+ - Best for: Tailwind users, full customization
96
+
97
+ C) **Material UI (MUI)**
98
+
99
+ - Features: Material Design, comprehensive, mature
100
+ - Best for: Google Material Design aesthetic
101
+ - Bundle: ~90KB
102
+
103
+ D) **Chakra UI**
104
+
105
+ - Features: Accessible, composable, themeable
106
+ - Best for: Rapid development, accessibility
107
+ - Bundle: ~50KB
108
+
109
+ E) **Ant Design**
110
+
111
+ - Features: Enterprise-focused, comprehensive
112
+ - Best for: Admin panels, dashboards, Chinese market
113
+ - Bundle: ~120KB
114
+
115
+ F) **Mantine**
116
+
117
+ - Features: Modern, hooks-based, feature-rich
118
+ - Best for: Developer experience, rapid prototyping
119
+ - Bundle: ~40KB
120
+
121
+ #### Vue Options
122
+
123
+ A) **None (Custom Components)**
124
+ B) 🔥 **Vuetify** - Material Design for Vue
125
+ C) **Quasar** - Full framework with components
126
+ D) **PrimeVue** - Rich component library
127
+ E) **Element Plus** - Enterprise UI library
128
+
129
+ #### Angular Options
130
+
131
+ A) **None (Custom Components)**
132
+ B) ⭐ **Angular Material** - Official Material Design
133
+ C) **PrimeNG** - Rich component library
134
+ D) **NG-ZORRO** - Ant Design for Angular
135
+
136
+ **Your answer:**
131
137
  ---
132
-
133
- ### Question 4.3: Design Tokens
134
-
135
- **Will you use design tokens?**
136
-
137
- Design tokens = Single source of truth for colors, spacing, typography, etc.
138
-
139
- A) ⭐ **Yes, comprehensive design tokens** (Recommended)
140
- - Define colors, spacing, typography, shadows, etc.
141
- - Best for: Design consistency, theming support
142
- - Example: Tailwind config, CSS variables, TypeScript constants
143
-
144
- B) **Yes, basic tokens only**
145
- - Just colors and spacing
146
- - Best for: Simple apps
147
-
148
- C) **No tokens**
149
- - Hardcoded values
150
- - Best for: Prototypes, MVPs
151
-
152
- **Your answer:**
153
-
154
- **If yes, what will be tokenized?** (Select all that apply)
155
- - Colors
156
- - Spacing (padding, margin, gaps)
157
- - Typography (fonts, sizes, weights)
158
- - Shadows
159
- - Border radius
160
- - Transitions/animations
161
- - Breakpoints
162
-
138
+ ### Question 4.3: Design Tokens
139
+
140
+ **Will you use design tokens?**
141
+
142
+ Design tokens = Single source of truth for colors, spacing, typography, etc.
143
+
144
+ A) ⭐ **Yes, comprehensive design tokens** (Recommended)
145
+
146
+ - Define colors, spacing, typography, shadows, etc.
147
+ - Best for: Design consistency, theming support
148
+ - Example: Tailwind config, CSS variables, TypeScript constants
149
+
150
+ B) **Yes, basic tokens only**
151
+
152
+ - Just colors and spacing
153
+ - Best for: Simple apps
154
+
155
+ C) **No tokens**
156
+
157
+ - Hardcoded values
158
+ - Best for: Prototypes, MVPs
159
+
160
+ **Your answer:**
161
+
162
+ **If yes, what will be tokenized?** (Select all that apply)
163
+
164
+ - Colors
165
+ - Spacing (padding, margin, gaps)
166
+ - Typography (fonts, sizes, weights)
167
+ - Shadows
168
+ - Border radius
169
+ - Transitions/animations
170
+ - Breakpoints
163
171
  ---
164
-
165
- ### Question 4.4: Color System
166
-
167
- **How will you define your color palette?**
168
-
169
- A) ⭐ **Tailwind-style scales** (50-900)
170
- - Example: `gray-50`, `gray-100`, ..., `gray-900`
171
- - Example: `blue-500`, `blue-600`, etc.
172
- - Best for: Tailwind CSS, comprehensive palettes
173
- - Generates: 10 shades per color
174
-
175
- B) **Semantic colors**
176
- - Example: `primary`, `secondary`, `success`, `error`, `warning`
177
- - Best for: Simple apps, component libraries
178
- - Generates: 5-7 colors
179
-
180
- C) **Custom color system**
181
- - Your own naming and structure
182
- - Best for: Unique design systems
183
-
184
- **Your answer:**
185
-
186
- **Primary brand colors (hex codes):**
187
- - Primary: #______
188
- - Secondary (optional): #______
189
- - Accent (optional): #______
190
-
172
+ ### Question 4.4: Color System
173
+
174
+ **How will you define your color palette?**
175
+
176
+ A) ⭐ **Tailwind-style scales** (50-900)
177
+
178
+ - Example: `gray-50`, `gray-100`, ..., `gray-900`
179
+ - Example: `blue-500`, `blue-600`, etc.
180
+ - Best for: Tailwind CSS, comprehensive palettes
181
+ - Generates: 10 shades per color
182
+
183
+ B) **Semantic colors**
184
+
185
+ - Example: `primary`, `secondary`, `success`, `error`, `warning`
186
+ - Best for: Simple apps, component libraries
187
+ - Generates: 5-7 colors
188
+
189
+ C) **Custom color system**
190
+
191
+ - Your own naming and structure
192
+ - Best for: Unique design systems
193
+
194
+ **Your answer:**
195
+
196
+ **Primary brand colors (hex codes):**
197
+
198
+ - Primary: #**\_\_**
199
+ - Secondary (optional): #**\_\_**
200
+ - Accent (optional): #**\_\_**
201
+ ---
202
+ ### Question 4.5: Typography System
203
+
204
+ **How will you handle typography?**
205
+
206
+ A) ⭐ **Type scale (Tailwind-style)**
207
+
208
+ - Sizes: xs, sm, base, lg, xl, 2xl, 3xl, 4xl, 5xl, 6xl, 7xl, 8xl, 9xl
209
+ - Best for: Responsive, scalable typography
210
+ - Example: `text-sm`, `text-lg`
211
+
212
+ B) **Semantic headings**
213
+
214
+ - Sizes: h1, h2, h3, h4, h5, h6, body, caption
215
+ - Best for: Content-heavy sites, traditional hierarchy
216
+
217
+ C) **Custom scale**
218
+
219
+ - Your own naming and sizes
220
+
221
+ **Your answer:**
222
+
223
+ **Font families:**
224
+
225
+ - Heading font: ******\_\_\_****** (e.g., Inter, Poppins)
226
+ - Body font: ********\_******** (e.g., Inter, Roboto)
227
+ - Mono font (optional): **\_\_\_** (e.g., Fira Code)
228
+
229
+ **Font loading strategy:**
230
+ A) Google Fonts CDN
231
+ B) Self-hosted fonts (better performance)
232
+ C) System fonts only (fastest)
233
+ ---
234
+ ### Question 4.6: Theming Support
235
+
236
+ **Do you need theme support (dark mode, multiple themes)?**
237
+
238
+ A) ⭐ **Dark mode only**
239
+
240
+ - Light + Dark themes
241
+ - Best for: Modern apps, user preference
242
+ - Implementation: CSS variables, class toggle
243
+
244
+ B) **Multiple themes**
245
+
246
+ - Example: Default, Dark, High Contrast, Brand A, Brand B
247
+ - Best for: White-label apps, multi-tenant
248
+
249
+ C) **No theming**
250
+
251
+ - Single theme only
252
+ - Best for: MVPs, simpler implementation
253
+
254
+ **Your answer:**
255
+
256
+ **If theming selected:**
257
+
258
+ **Theme switching method:**
259
+ A) User preference (toggle button)
260
+ B) System preference only (prefers-color-scheme)
261
+ C) Both (respect system, allow override)
262
+
263
+ **Theme persistence:**
264
+ A) localStorage
265
+ B) User account setting (backend)
266
+ C) No persistence (reset on reload)
191
267
  ---
192
-
193
- ### Question 4.5: Typography System
194
-
195
- **How will you handle typography?**
196
-
197
- A) ⭐ **Type scale (Tailwind-style)**
198
- - Sizes: xs, sm, base, lg, xl, 2xl, 3xl, 4xl, 5xl, 6xl, 7xl, 8xl, 9xl
199
- - Best for: Responsive, scalable typography
200
- - Example: `text-sm`, `text-lg`
201
-
202
- B) **Semantic headings**
203
- - Sizes: h1, h2, h3, h4, h5, h6, body, caption
204
- - Best for: Content-heavy sites, traditional hierarchy
205
-
206
- C) **Custom scale**
207
- - Your own naming and sizes
208
-
209
- **Your answer:**
210
-
211
- **Font families:**
212
- - Heading font: _______________ (e.g., Inter, Poppins)
213
- - Body font: _________________ (e.g., Inter, Roboto)
214
- - Mono font (optional): _______ (e.g., Fira Code)
215
-
216
- **Font loading strategy:**
217
- A) Google Fonts CDN
218
- B) Self-hosted fonts (better performance)
219
- C) System fonts only (fastest)
220
-
268
+ ### Question 4.7: Responsive Breakpoints
269
+
270
+ **What breakpoint strategy will you use?**
271
+
272
+ A) ⭐ **Tailwind defaults** (Recommended)
273
+
274
+ - sm: 640px
275
+ - md: 768px
276
+ - lg: 1024px
277
+ - xl: 1280px
278
+ - 2xl: 1536px
279
+
280
+ B) **build-style**
281
+
282
+ - xs: 0px
283
+ - sm: 576px
284
+ - md: 768px
285
+ - lg: 992px
286
+ - xl: 1200px
287
+
288
+ C) **Custom breakpoints**
289
+
290
+ - Define your own
291
+
292
+ D) **No breakpoints (fluid)**
293
+
294
+ - Use relative units only (%, vw, etc.)
295
+
296
+ **Your answer:**
221
297
  ---
222
-
223
- ### Question 4.6: Theming Support
224
-
225
- **Do you need theme support (dark mode, multiple themes)?**
226
-
227
- A) ⭐ **Dark mode only**
228
- - Light + Dark themes
229
- - Best for: Modern apps, user preference
230
- - Implementation: CSS variables, class toggle
231
-
232
- B) **Multiple themes**
233
- - Example: Default, Dark, High Contrast, Brand A, Brand B
234
- - Best for: White-label apps, multi-tenant
235
-
236
- C) **No theming**
237
- - Single theme only
238
- - Best for: MVPs, simpler implementation
239
-
240
- **Your answer:**
241
-
242
- **If theming selected:**
243
-
244
- **Theme switching method:**
245
- A) User preference (toggle button)
246
- B) System preference only (prefers-color-scheme)
247
- C) Both (respect system, allow override)
248
-
249
- **Theme persistence:**
250
- A) localStorage
251
- B) User account setting (backend)
252
- C) No persistence (reset on reload)
253
-
298
+ ### Question 4.8: Spacing System
299
+
300
+ **What spacing scale will you use?**
301
+
302
+ A) ⭐ **4px grid (Tailwind-style)**
303
+
304
+ - 0, 1 (4px), 2 (8px), 3 (12px), 4 (16px), 5 (20px), 6 (24px), 8 (32px), etc.
305
+ - Best for: Most apps, consistent spacing
306
+
307
+ B) **8px grid**
308
+
309
+ - 0, 8, 16, 24, 32, 40, 48, 56, 64...
310
+ - Best for: Simpler scale, larger spacing
311
+
312
+ C) **Custom scale**
313
+
314
+ - Your own spacing values
315
+
316
+ **Your answer:**
254
317
  ---
255
-
256
- ### Question 4.7: Responsive Breakpoints
257
-
258
- **What breakpoint strategy will you use?**
259
-
260
- A) ⭐ **Tailwind defaults** (Recommended)
261
- - sm: 640px
262
- - md: 768px
263
- - lg: 1024px
264
- - xl: 1280px
265
- - 2xl: 1536px
266
-
267
- B) **build-style**
268
- - xs: 0px
269
- - sm: 576px
270
- - md: 768px
271
- - lg: 992px
272
- - xl: 1200px
273
-
274
- C) **Custom breakpoints**
275
- - Define your own
276
-
277
- D) **No breakpoints (fluid)**
278
- - Use relative units only (%, vw, etc.)
279
-
280
- **Your answer:**
281
-
318
+ ### Question 4.9: Animation & Transitions
319
+
320
+ **How will you handle animations?**
321
+
322
+ A) ⭐ **CSS transitions only**
323
+
324
+ - Simple hover effects, state changes
325
+ - Best for: Most apps, good performance
326
+ - Example: `transition-colors`, `transition-all`
327
+
328
+ B) **CSS transitions + keyframe animations**
329
+
330
+ - Add loading spinners, fade-ins, etc.
331
+ - Best for: Modern UX
332
+
333
+ C) **Animation library** (Framer Motion, GSAP, etc.)
334
+
335
+ - Complex animations, gestures, page transitions
336
+ - Best for: Animation-heavy apps, marketing sites
337
+ - Example: Framer Motion for React
338
+
339
+ D) **Minimal animations**
340
+
341
+ - Accessibility-first, respect prefers-reduced-motion
342
+ - Best for: Accessibility-critical apps
343
+
344
+ **Your answer:**
345
+
346
+ **If animations used:**
347
+
348
+ **Respect prefers-reduced-motion?**
349
+ A) Yes (disable/reduce animations for users who prefer it)
350
+ B) No
282
351
  ---
283
-
284
- ### Question 4.8: Spacing System
285
-
286
- **What spacing scale will you use?**
287
-
288
- A) ⭐ **4px grid (Tailwind-style)**
289
- - 0, 1 (4px), 2 (8px), 3 (12px), 4 (16px), 5 (20px), 6 (24px), 8 (32px), etc.
290
- - Best for: Most apps, consistent spacing
291
-
292
- B) **8px grid**
293
- - 0, 8, 16, 24, 32, 40, 48, 56, 64...
294
- - Best for: Simpler scale, larger spacing
295
-
296
- C) **Custom scale**
297
- - Your own spacing values
298
-
299
- **Your answer:**
300
-
352
+ ### Question 4.10: CSS Organization
353
+
354
+ **How will you organize your stylesheets?**
355
+
356
+ A) ⭐ **Component-scoped styles**
357
+
358
+ - Each component has its own style file
359
+ - Example: `Button.tsx` + `Button.module.css`
360
+ - Best for: Component libraries, modularity
361
+
362
+ B) **Utility-first (Tailwind)**
363
+
364
+ - No separate stylesheets, classes in JSX
365
+ - Best for: Tailwind CSS users
366
+
367
+ C) **Global + Component**
368
+
369
+ - Global base styles + component styles
370
+ - Best for: Hybrid approach
371
+
372
+ D) **Feature-based**
373
+
374
+ - Styles organized by feature/page
375
+ - Example: `features/auth/styles.css`
376
+ - Best for: Larger apps
377
+
378
+ **Your answer:**
301
379
  ---
302
-
303
- ### Question 4.9: Animation & Transitions
304
-
305
- **How will you handle animations?**
306
-
307
- A) ⭐ **CSS transitions only**
308
- - Simple hover effects, state changes
309
- - Best for: Most apps, good performance
310
- - Example: `transition-colors`, `transition-all`
311
-
312
- B) **CSS transitions + keyframe animations**
313
- - Add loading spinners, fade-ins, etc.
314
- - Best for: Modern UX
315
-
316
- C) **Animation library** (Framer Motion, GSAP, etc.)
317
- - Complex animations, gestures, page transitions
318
- - Best for: Animation-heavy apps, marketing sites
319
- - Example: Framer Motion for React
320
-
321
- D) **Minimal animations**
322
- - Accessibility-first, respect prefers-reduced-motion
323
- - Best for: Accessibility-critical apps
324
-
325
- **Your answer:**
326
-
327
- **If animations used:**
328
-
329
- **Respect prefers-reduced-motion?**
330
- A) Yes (disable/reduce animations for users who prefer it)
331
- B) No
332
-
380
+ ### Question 4.11: Accessibility (A11y) Styling
381
+
382
+ **What accessibility level will you target?**
383
+
384
+ A) ⭐ **WCAG 2.1 Level AA** (Recommended)
385
+
386
+ - Color contrast ratio: 4.5:1 (normal text), 3:1 (large text)
387
+ - Focus indicators visible
388
+ - Best for: Most apps, legal compliance
389
+
390
+ B) **WCAG 2.1 Level AAA**
391
+
392
+ - Color contrast ratio: 7:1 (normal text), 4.5:1 (large text)
393
+ - More stringent requirements
394
+ - Best for: Government, healthcare, education
395
+
396
+ C) **Basic accessibility**
397
+
398
+ - Semantic HTML, keyboard navigation
399
+ - Best for: MVPs, internal tools
400
+
401
+ D) **No specific target**
402
+
403
+ - Best effort only
404
+
405
+ **Your answer:**
406
+
407
+ **A11y features to include:**
408
+
409
+ - [ ] Focus indicators (outline on keyboard focus)
410
+ - [ ] High contrast mode support
411
+ - [ ] Text resizing support (up to 200%)
412
+ - [ ] Screen reader optimizations
413
+ - [ ] Reduced motion support
333
414
  ---
334
-
335
- ### Question 4.10: CSS Organization
336
-
337
- **How will you organize your stylesheets?**
338
-
339
- A) ⭐ **Component-scoped styles**
340
- - Each component has its own style file
341
- - Example: `Button.tsx` + `Button.module.css`
342
- - Best for: Component libraries, modularity
343
-
344
- B) **Utility-first (Tailwind)**
345
- - No separate stylesheets, classes in JSX
346
- - Best for: Tailwind CSS users
347
-
348
- C) **Global + Component**
349
- - Global base styles + component styles
350
- - Best for: Hybrid approach
351
-
352
- D) **Feature-based**
353
- - Styles organized by feature/page
354
- - Example: `features/auth/styles.css`
355
- - Best for: Larger apps
356
-
357
- **Your answer:**
358
-
415
+ ## 📊 Phase 4 Summary
416
+
417
+ ```
359
418
  ---
360
-
361
- ### Question 4.11: Accessibility (A11y) Styling
362
-
363
- **What accessibility level will you target?**
364
-
365
- A) ⭐ **WCAG 2.1 Level AA** (Recommended)
366
- - Color contrast ratio: 4.5:1 (normal text), 3:1 (large text)
367
- - Focus indicators visible
368
- - Best for: Most apps, legal compliance
369
-
370
- B) **WCAG 2.1 Level AAA**
371
- - Color contrast ratio: 7:1 (normal text), 4.5:1 (large text)
372
- - More stringent requirements
373
- - Best for: Government, healthcare, education
374
-
375
- C) **Basic accessibility**
376
- - Semantic HTML, keyboard navigation
377
- - Best for: MVPs, internal tools
378
-
379
- D) **No specific target**
380
- - Best effort only
381
-
382
- **Your answer:**
383
-
384
- **A11y features to include:**
385
- - [ ] Focus indicators (outline on keyboard focus)
386
- - [ ] High contrast mode support
387
- - [ ] Text resizing support (up to 200%)
388
- - [ ] Screen reader optimizations
389
- - [ ] Reduced motion support
390
-
419
+ 📋 PHASE 4 SUMMARY: STYLING & DESIGN
391
420
  ---
392
-
393
- ## 📊 Phase 4 Summary
394
-
395
- ```
396
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
397
- 📋 PHASE 4 SUMMARY: STYLING & DESIGN
398
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
399
-
400
- Styling Approach: [Answer from 4.1]
401
- Component Library: [Answer from 4.2]
402
- Design Tokens: [Answer from 4.3]
403
- Color System: [Answer from 4.4]
404
- Typography: [Answer from 4.5]
405
- Theming: [Answer from 4.6]
406
- Breakpoints: [Answer from 4.7]
407
- Spacing System: [Answer from 4.8]
408
- Animations: [Answer from 4.9]
409
- CSS Organization: [Answer from 4.10]
410
- Accessibility: [Answer from 4.11]
411
-
412
- Is this correct? (Y/n)
413
- ```
414
-
421
+ Styling Approach: [Answer from 4.1]
422
+ Component Library: [Answer from 4.2]
423
+ Design Tokens: [Answer from 4.3]
424
+ Color System: [Answer from 4.4]
425
+ Typography: [Answer from 4.5]
426
+ Theming: [Answer from 4.6]
427
+ Breakpoints: [Answer from 4.7]
428
+ Spacing System: [Answer from 4.8]
429
+ Animations: [Answer from 4.9]
430
+ CSS Organization: [Answer from 4.10]
431
+ Accessibility: [Answer from 4.11]
432
+
433
+ Is this correct? (Y/n)
434
+ ```
415
435
  ---
416
-
417
- ## 📝 Document Generation
418
-
419
- Generate `docs/styling.md` using the template with these placeholders:
420
-
421
- - `{{STYLING_APPROACH}}` → Styling solution (e.g., "Tailwind CSS")
422
- - `{{COMPONENT_LIBRARY}}` → UI kit (e.g., "shadcn/ui" or "None")
423
- - `{{DESIGN_TOKENS}}` → Yes/No
424
- - `{{THEME_SUPPORT}}` → Dark mode / Multiple themes / None
425
- - `{{COLOR_SYSTEM}}` → Color palette approach
426
- - `{{TYPOGRAPHY_SYSTEM}}` → Type scale approach
427
- - `{{BREAKPOINTS}}` → Responsive breakpoints
428
- - `{{SPACING_SCALE}}` → Spacing system
429
- - `{{ANIMATION_STRATEGY}}` → Animation approach
430
- - `{{A11Y_COMPLIANCE}}` → WCAG level
431
-
432
- Update `ai-instructions.md`:
433
-
434
- ```markdown
435
- ## Styling
436
-
437
- - **Approach:** {{STYLING_APPROACH}}
438
- - **Component Library:** {{COMPONENT_LIBRARY}}
439
- - **Design Tokens:** {{DESIGN_TOKENS}}
440
- - **Theming:** {{THEME_SUPPORT}}
441
- - **Accessibility:** {{A11Y_COMPLIANCE}}
442
-
443
- ### Rules
444
-
445
- - ✅ ALWAYS use design tokens for colors and spacing
446
- - ✅ ALWAYS ensure WCAG {{A11Y_COMPLIANCE}} color contrast
447
- - ALWAYS include focus indicators for keyboard navigation
448
- - ❌ NEVER hardcode colors or spacing values
449
- - ❌ NEVER ignore prefers-reduced-motion
450
- {{#IF_TAILWIND}}
451
- - ALWAYS use Tailwind utility classes, avoid custom CSS
452
- - ❌ NEVER use arbitrary values excessively (e.g., `w-[127px]`)
453
- {{/IF_TAILWIND}}
454
- {{#IF_DARK_MODE}}
455
- - ✅ ALWAYS test components in both light and dark modes
456
- {{/IF_DARK_MODE}}
457
- ```
458
-
436
+ ## 📝 Document Generation
437
+
438
+ Generate `docs/styling.md` using the template with these placeholders:
439
+
440
+ - `{{STYLING_APPROACH}}` → Styling solution (e.g., "Tailwind CSS")
441
+ - `{{COMPONENT_LIBRARY}}` → UI kit (e.g., "shadcn/ui" or "None")
442
+ - `{{DESIGN_TOKENS}}` → Yes/No
443
+ - `{{THEME_SUPPORT}}` → Dark mode / Multiple themes / None
444
+ - `{{COLOR_SYSTEM}}` → Color palette approach
445
+ - `{{TYPOGRAPHY_SYSTEM}}` → Type scale approach
446
+ - `{{BREAKPOINTS}}` → Responsive breakpoints
447
+ - `{{SPACING_SCALE}}` → Spacing system
448
+ - `{{ANIMATION_STRATEGY}}` → Animation approach
449
+ - `{{A11Y_COMPLIANCE}}` → WCAG level
450
+
451
+ Update `ai-instructions.md`:
452
+
453
+ ```markdown
454
+ ## Styling
455
+
456
+ - **Approach:** {{STYLING_APPROACH}}
457
+ - **Component Library:** {{COMPONENT_LIBRARY}}
458
+ - **Design Tokens:** {{DESIGN_TOKENS}}
459
+ - **Theming:** {{THEME_SUPPORT}}
460
+ - **Accessibility:** {{A11Y_COMPLIANCE}}
461
+
462
+ ### Rules
463
+
464
+ - ✅ ALWAYS use design tokens for colors and spacing
465
+ - ✅ ALWAYS ensure WCAG {{A11Y_COMPLIANCE}} color contrast
466
+ - ✅ ALWAYS include focus indicators for keyboard navigation
467
+ - NEVER hardcode colors or spacing values
468
+ - ❌ NEVER ignore prefers-reduced-motion
469
+ {{#IF_TAILWIND}}
470
+ - ✅ ALWAYS use Tailwind utility classes, avoid custom CSS
471
+ - NEVER use arbitrary values excessively (e.g., `w-[127px]`)
472
+ {{/IF_TAILWIND}}
473
+ {{#IF_DARK_MODE}}
474
+ - ✅ ALWAYS test components in both light and dark modes
475
+ {{/IF_DARK_MODE}}
476
+ ```
459
477
  ---
460
-
461
- ## 🚀 Next Steps
462
-
463
- ```
464
- ✅ Phase 4 Complete!
465
-
466
- Documents Generated:
467
- - docs/styling.md
468
- - ai-instructions.md (updated)
469
-
470
- Next: Phase 5 - Code Standards
471
-
472
- Read: .ai-flow/prompts/frontend/flow-build-phase-5-standards.md
473
- ```
474
-
478
+ ## 🚀 Next Steps
479
+
480
+ ```
481
+ ✅ Phase 4 Complete!
482
+
483
+ Documents Generated:
484
+ - docs/styling.md
485
+ - ai-instructions.md (updated)
486
+
487
+ Next: Phase 5 - Code Standards
488
+
489
+ Read: .ai-flow/prompts/frontend/flow-build-phase-5-standards.md
490
+ ```
475
491
  ---
476
-
477
- **Last Updated:** 2025-01-XX
478
-
479
- **Version:** 1.2.0
492
+ **Last Updated:** 2025-01-XX
493
+
494
+ **Version:** 1.2.0
480
495
 
481
496
 
482
497