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.
- package/README.md +25 -38
- package/dist/cli.js +68 -46
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
- package/prompts/backend/flow-build-phase-0.md +31 -63
- package/prompts/backend/flow-build-phase-1.md +9 -17
- package/prompts/backend/flow-build-phase-10.md +199 -585
- package/prompts/backend/flow-build-phase-2.md +152 -86
- package/prompts/backend/flow-build-phase-3.md +108 -68
- package/prompts/backend/flow-build-phase-4.md +5 -8
- package/prompts/backend/flow-build-phase-5.md +39 -12
- package/prompts/backend/flow-build-phase-6.md +29 -8
- package/prompts/backend/flow-build-phase-7.md +120 -40
- package/prompts/backend/flow-build-phase-8.md +28 -65
- package/prompts/backend/flow-build-phase-9.md +267 -1298
- package/prompts/backend/flow-build.md +881 -957
- package/prompts/backend/flow-dev-commit.md +27 -50
- package/prompts/backend/flow-dev-feature.md +1929 -2017
- package/prompts/backend/flow-dev-fix.md +936 -964
- package/prompts/backend/flow-dev-refactor.md +672 -701
- package/prompts/backend/flow-dev-review.md +356 -389
- package/prompts/backend/flow-dev-work.md +1066 -1118
- package/prompts/backend/flow-docs-sync.md +20 -196
- package/prompts/frontend/flow-build-phase-0.md +503 -484
- package/prompts/frontend/flow-build-phase-1.md +445 -433
- package/prompts/frontend/flow-build-phase-2.md +910 -957
- package/prompts/frontend/flow-build-phase-3.md +692 -664
- package/prompts/frontend/flow-build-phase-4.md +478 -463
- package/prompts/frontend/flow-build-phase-5.md +488 -467
- package/prompts/frontend/flow-build-phase-6.md +571 -550
- package/prompts/frontend/flow-build-phase-7.md +560 -592
- package/prompts/frontend/flow-build-phase-8.md +17 -42
- package/prompts/frontend/flow-build.md +457 -503
- package/prompts/frontend/flow-docs-sync.md +14 -35
- package/prompts/mobile/flow-build-phase-0.md +104 -97
- package/prompts/mobile/flow-build-phase-1.md +137 -122
- package/prompts/mobile/flow-build-phase-2.md +123 -130
- package/prompts/mobile/flow-build-phase-3.md +144 -149
- package/prompts/mobile/flow-build-phase-4.md +140 -132
- package/prompts/mobile/flow-build-phase-5.md +70 -70
- package/prompts/mobile/flow-build-phase-6.md +136 -134
- package/prompts/mobile/flow-build-phase-7.md +24 -58
- package/prompts/mobile/flow-build-phase-8.md +17 -42
- package/prompts/mobile/flow-build.md +47 -97
- package/prompts/mobile/flow-docs-sync.md +13 -32
- package/prompts/shared/mermaid-guidelines.md +106 -0
- package/prompts/shared/scope-levels.md +126 -0
- package/prompts/shared/story-points.md +65 -0
- package/prompts/shared/task-format.md +86 -0
- package/templates/AGENT.template.md +194 -15
- package/templates/backend/README.template.md +2 -32
- package/templates/backend/ai-instructions.template.md +2 -32
- package/templates/backend/copilot-instructions.template.md +2 -22
- package/templates/backend/docs/api.template.md +89 -20
- package/templates/backend/docs/architecture.template.md +165 -53
- package/templates/backend/docs/business-flows.template.md +7 -14
- package/templates/backend/docs/code-standards.template.md +2 -38
- package/templates/backend/docs/contributing.template.md +2 -16
- package/templates/backend/docs/data-model.template.md +125 -21
- package/templates/backend/docs/operations.template.md +179 -50
- package/templates/backend/docs/testing.template.md +2 -42
- package/templates/backend/project-brief.template.md +2 -28
- package/templates/backend/specs/configuration.template.md +2 -14
- package/templates/backend/specs/security.template.md +2 -32
- package/templates/frontend/README.template.md +2 -18
- package/templates/frontend/ai-instructions.template.md +2 -20
- package/templates/frontend/docs/api-integration.template.md +12 -30
- package/templates/frontend/docs/components.template.md +2 -28
- package/templates/frontend/docs/error-handling.template.md +11 -27
- package/templates/frontend/docs/operations.template.md +8 -18
- package/templates/frontend/docs/performance.template.md +8 -18
- package/templates/frontend/docs/pwa.template.md +8 -18
- package/templates/frontend/docs/state-management.template.md +2 -28
- package/templates/frontend/docs/styling.template.md +2 -26
- package/templates/frontend/docs/testing.template.md +2 -28
- package/templates/frontend/project-brief.template.md +2 -16
- package/templates/frontend/specs/accessibility.template.md +8 -18
- package/templates/frontend/specs/configuration.template.md +2 -24
- package/templates/frontend/specs/security.template.md +10 -24
- package/templates/fullstack/README.template.md +17 -47
- package/templates/fullstack/ai-instructions.template.md +17 -45
- package/templates/fullstack/project-brief.template.md +16 -42
- package/templates/fullstack/specs/configuration.template.md +16 -42
- package/templates/mobile/README.template.md +11 -29
- package/templates/mobile/ai-instructions.template.md +11 -27
- package/templates/mobile/docs/app-store.template.md +11 -29
- package/templates/mobile/docs/architecture.template.md +14 -38
- package/templates/mobile/docs/native-features.template.md +16 -44
- package/templates/mobile/docs/navigation.template.md +9 -23
- package/templates/mobile/docs/offline-strategy.template.md +10 -26
- package/templates/mobile/docs/permissions.template.md +9 -23
- package/templates/mobile/docs/state-management.template.md +12 -32
- package/templates/mobile/docs/testing.template.md +14 -38
- package/templates/mobile/project-brief.template.md +12 -30
- package/templates/mobile/specs/build-configuration.template.md +10 -26
- 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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
B) 🔥 **CSS Modules**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
B) 🔥 **shadcn/ui** (Unstyled, customizable)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
**
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
B) **Yes, basic tokens only**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
B) **Semantic colors**
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
|
|
216
|
-
**
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
C) **
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
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
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
B) **
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
**
|
|
328
|
-
|
|
329
|
-
**
|
|
330
|
-
|
|
331
|
-
|
|
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
|
-
|
|
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
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
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
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
- `{{
|
|
422
|
-
- `{{
|
|
423
|
-
- `{{
|
|
424
|
-
- `{{
|
|
425
|
-
- `{{
|
|
426
|
-
- `{{
|
|
427
|
-
- `{{
|
|
428
|
-
- `{{
|
|
429
|
-
- `{{
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
- **
|
|
438
|
-
- **
|
|
439
|
-
- **
|
|
440
|
-
- **
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
- ✅ ALWAYS
|
|
446
|
-
- ✅ ALWAYS
|
|
447
|
-
-
|
|
448
|
-
- ❌ NEVER
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
-
|
|
452
|
-
|
|
453
|
-
{{
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
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
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
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
|
-
|
|
478
|
-
|
|
479
|
-
**Version:** 1.2.0
|
|
492
|
+
**Last Updated:** 2025-01-XX
|
|
493
|
+
|
|
494
|
+
**Version:** 1.2.0
|
|
480
495
|
|
|
481
496
|
|
|
482
497
|
|