ai-flow-dev 2.1.3 → 2.1.4

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,607 +1,575 @@
1
- # Phase 7: Performance & Deployment
2
-
3
- **Duration:** 10-15 minutes
4
- **Questions:** ~10 questions
5
- **Output:** docs/performance.md, docs/operations.md, specs/configuration.md
6
-
1
+ # Phase 7: Performance & Deployment
2
+
3
+ **Duration:** 10-15 minutes
4
+ **Questions:** ~10 questions
5
+ **Output:** docs/performance.md, docs/operations.md, specs/configuration.md
7
6
  ---
8
-
9
- ## 🎯 Objective
10
-
11
- Define performance targets and deployment strategy:
12
-
13
- 1. What Core Web Vitals targets?
14
- 2. What optimization strategies?
15
- 3. Where will you deploy?
16
- 4. What monitoring/analytics tools?
17
-
7
+ ## 🎯 Objective
8
+
9
+ Define performance targets and deployment strategy:
10
+
11
+ 1. What Core Web Vitals targets?
12
+ 2. What optimization strategies?
13
+ 3. Where will you deploy?
14
+ 4. What monitoring/analytics tools?
18
15
  ---
19
-
20
- ## 📋 Questions
21
-
22
- ### Question 7.1: Core Web Vitals Targets
23
-
24
- **What performance targets will you aim for?**
25
-
26
- Core Web Vitals:
27
-
28
- - **LCP (Largest Contentful Paint):** Largest element render time
29
- - **FID (First Input Delay):** Time to interactive
30
- - **CLS (Cumulative Layout Shift):** Visual stability
31
-
32
- A) ⭐ **"Good" Rating (Recommended)**
33
-
34
- - LCP: < 2.5s
35
- - FID: < 100ms
36
- - CLS: < 0.1
37
- - Best for: Most apps, SEO, user experience
38
-
39
- B) **"Needs Improvement" (Acceptable)**
40
-
41
- - LCP: < 4.0s
42
- - FID: < 300ms
43
- - CLS: < 0.25
44
- - Best for: MVPs, internal tools
45
-
46
- C) **Aggressive Targets**
47
-
48
- - LCP: < 1.5s
49
- - FID: < 50ms
50
- - CLS: < 0.05
51
- - Best for: Performance-critical apps, e-commerce
52
-
53
- D) **No specific targets**
54
-
55
- - Not recommended
56
-
57
- **Your answer:**
58
-
16
+ ## 📋 Questions
17
+
18
+ ### Question 7.1: Core Web Vitals Targets
19
+
20
+ **What performance targets will you aim for?**
21
+
22
+ Core Web Vitals:
23
+
24
+ - **LCP (Largest Contentful Paint):** Largest element render time
25
+ - **FID (First Input Delay):** Time to interactive
26
+ - **CLS (Cumulative Layout Shift):** Visual stability
27
+
28
+ A) ⭐ **"Good" Rating (Recommended)**
29
+
30
+ - LCP: < 2.5s
31
+ - FID: < 100ms
32
+ - CLS: < 0.1
33
+ - Best for: Most apps, SEO, user experience
34
+
35
+ B) **"Needs Improvement" (Acceptable)**
36
+
37
+ - LCP: < 4.0s
38
+ - FID: < 300ms
39
+ - CLS: < 0.25
40
+ - Best for: MVPs, internal tools
41
+
42
+ C) **Aggressive Targets**
43
+
44
+ - LCP: < 1.5s
45
+ - FID: < 50ms
46
+ - CLS: < 0.05
47
+ - Best for: Performance-critical apps, e-commerce
48
+
49
+ D) **No specific targets**
50
+
51
+ - Not recommended
52
+
53
+ **Your answer:**
59
54
  ---
60
-
61
- ### Question 7.2: Bundle Size Target
62
-
63
- **What bundle size will you target?**
64
-
65
- A) ⭐ **< 200KB gzipped (initial load)** (Recommended)
66
-
67
- - Best for: Most apps, good mobile experience
68
-
69
- B) **< 100KB gzipped**
70
-
71
- - Best for: Performance-critical apps
72
-
73
- C) **< 300KB gzipped**
74
-
75
- - Best for: Feature-rich apps
76
-
77
- D) **No target**
78
-
79
- - Best for: Internal tools only
80
-
81
- **Your answer:**
82
-
83
- **Monitor bundle size in CI?**
84
- A) Yes - Fail if bundle exceeds target
85
- B) Yes - Warn if bundle grows
86
- C) No
87
-
88
- **Tool for bundle analysis:**
89
-
90
- - `webpack-bundle-analyzer`
91
- - `rollup-plugin-visualizer`
92
- - `vite-plugin-bundle-analyzer`
93
- - Manual
94
-
55
+ ### Question 7.2: Bundle Size Target
56
+
57
+ **What bundle size will you target?**
58
+
59
+ A) ⭐ **< 200KB gzipped (initial load)** (Recommended)
60
+
61
+ - Best for: Most apps, good mobile experience
62
+
63
+ B) **< 100KB gzipped**
64
+
65
+ - Best for: Performance-critical apps
66
+
67
+ C) **< 300KB gzipped**
68
+
69
+ - Best for: Feature-rich apps
70
+
71
+ D) **No target**
72
+
73
+ - Best for: Internal tools only
74
+
75
+ **Your answer:**
76
+
77
+ **Monitor bundle size in CI?**
78
+ A) Yes - Fail if bundle exceeds target
79
+ B) Yes - Warn if bundle grows
80
+ C) No
81
+
82
+ **Tool for bundle analysis:**
83
+
84
+ - `webpack-bundle-analyzer`
85
+ - `rollup-plugin-visualizer`
86
+ - `vite-plugin-bundle-analyzer`
87
+ - Manual
95
88
  ---
96
-
97
- ### Question 7.3: Code Splitting Strategy
98
-
99
- **How will you split your code?**
100
-
101
- A) ⭐ **Route-based splitting** (Recommended)
102
-
103
- - Split by page/route
104
- - Example: `/dashboard` `Dashboard.chunk.js`
105
- - Best for: Multi-page apps, SPAs
106
-
107
- B) **Component-based splitting**
108
-
109
- - Lazy load heavy components
110
- - Example: Modals, charts, editors
111
- - Best for: Apps with heavy components
112
-
113
- C) **Vendor splitting**
114
-
115
- - Separate vendor code from app code
116
- - Best for: Long-term caching
117
-
118
- D) **Combined approach**
119
-
120
- - Route + Component + Vendor splitting
121
- - Best for: Large apps, optimal caching
122
-
123
- E) **No code splitting**
124
-
125
- - Best for: Very small apps (<100KB)
126
-
127
- **Your answer:**
128
-
129
- **Dynamic imports for:**
130
-
131
- - [ ] Routes
132
- - [ ] Modals/Dialogs
133
- - [ ] Heavy libraries (charts, editors)
134
- - [ ] Third-party widgets
135
- - [ ] Images above the fold (lazy loading)
136
-
89
+ ### Question 7.3: Code Splitting Strategy
90
+
91
+ **How will you split your code?**
92
+
93
+ A) ⭐ **Route-based splitting** (Recommended)
94
+
95
+ - Split by page/route
96
+ - Example: `/dashboard` → `Dashboard.chunk.js`
97
+ - Best for: Multi-page apps, SPAs
98
+
99
+ B) **Component-based splitting**
100
+
101
+ - Lazy load heavy components
102
+ - Example: Modals, charts, editors
103
+ - Best for: Apps with heavy components
104
+
105
+ C) **Vendor splitting**
106
+
107
+ - Separate vendor code from app code
108
+ - Best for: Long-term caching
109
+
110
+ D) **Combined approach**
111
+
112
+ - Route + Component + Vendor splitting
113
+ - Best for: Large apps, optimal caching
114
+
115
+ E) **No code splitting**
116
+
117
+ - Best for: Very small apps (<100KB)
118
+
119
+ **Your answer:**
120
+
121
+ **Dynamic imports for:**
122
+
123
+ - [ ] Routes
124
+ - [ ] Modals/Dialogs
125
+ - [ ] Heavy libraries (charts, editors)
126
+ - [ ] Third-party widgets
127
+ - [ ] Images above the fold (lazy loading)
137
128
  ---
138
-
139
- ### Question 7.4: Image Optimization
140
-
141
- **How will you optimize images?**
142
-
143
- A) ⭐ **Next-gen formats + Lazy loading** (Recommended)
144
-
145
- - WebP/AVIF with PNG/JPG fallback
146
- - Lazy load below-the-fold images
147
- - Responsive images (srcset)
148
- - Best for: Image-heavy apps
149
-
150
- B) **Lazy loading only**
151
-
152
- - Native lazy loading: `<img loading="lazy" />`
153
- - Best for: Simple optimization
154
-
155
- C) **CDN + Image service**
156
-
157
- - Use Cloudinary, Imgix, etc.
158
- - Automatic optimization
159
- - Best for: Large image libraries
160
-
161
- D) **No optimization**
162
-
163
- - Best for: Minimal images
164
-
165
- **Your answer:**
166
-
167
- **Image formats supported:**
168
-
169
- - [ ] WebP
170
- - [ ] AVIF
171
- - [ ] PNG/JPG fallback
172
-
173
- **Image CDN:**
174
-
175
- - Cloudinary
176
- - Imgix
177
- - Vercel Image Optimization
178
- - Self-hosted
179
- - No CDN
180
-
129
+ ### Question 7.4: Image Optimization
130
+
131
+ **How will you optimize images?**
132
+
133
+ A) ⭐ **Next-gen formats + Lazy loading** (Recommended)
134
+
135
+ - WebP/AVIF with PNG/JPG fallback
136
+ - Lazy load below-the-fold images
137
+ - Responsive images (srcset)
138
+ - Best for: Image-heavy apps
139
+
140
+ B) **Lazy loading only**
141
+
142
+ - Native lazy loading: `<img loading="lazy" />`
143
+ - Best for: Simple optimization
144
+
145
+ C) **CDN + Image service**
146
+
147
+ - Use Cloudinary, Imgix, etc.
148
+ - Automatic optimization
149
+ - Best for: Large image libraries
150
+
151
+ D) **No optimization**
152
+
153
+ - Best for: Minimal images
154
+
155
+ **Your answer:**
156
+
157
+ **Image formats supported:**
158
+
159
+ - [ ] WebP
160
+ - [ ] AVIF
161
+ - [ ] PNG/JPG fallback
162
+
163
+ **Image CDN:**
164
+
165
+ - Cloudinary
166
+ - Imgix
167
+ - Vercel Image Optimization
168
+ - Self-hosted
169
+ - No CDN
181
170
  ---
182
-
183
- ### Question 7.5: Caching Strategy
184
-
185
- **What caching strategy will you use?**
186
-
187
- A) ⭐ **Cache-first with revalidation** (Recommended)
188
-
189
- - Service Worker cache assets
190
- - Revalidate in background
191
- - Best for: PWAs, fast repeat visits
192
-
193
- B) **Network-first with cache fallback**
194
-
195
- - Try network, fall back to cache
196
- - Best for: Dynamic content
197
-
198
- C) **Browser caching only**
199
-
200
- - Use HTTP cache headers
201
- - Best for: Static sites, simple apps
202
-
203
- D) **No caching**
204
-
205
- - Best for: Dev environments only
206
-
207
- **Your answer:**
208
-
209
- **Cache duration for assets:**
210
-
211
- - HTML: \_\_\_\_ (e.g., no cache, max-age=3600)
212
- - CSS/JS (versioned): \_\_\_\_ (e.g., max-age=31536000)
213
- - Images: \_\_\_\_ (e.g., max-age=86400)
214
-
171
+ ### Question 7.5: Caching Strategy
172
+
173
+ **What caching strategy will you use?**
174
+
175
+ A) ⭐ **Cache-first with revalidation** (Recommended)
176
+
177
+ - Service Worker cache assets
178
+ - Revalidate in background
179
+ - Best for: PWAs, fast repeat visits
180
+
181
+ B) **Network-first with cache fallback**
182
+
183
+ - Try network, fall back to cache
184
+ - Best for: Dynamic content
185
+
186
+ C) **Browser caching only**
187
+
188
+ - Use HTTP cache headers
189
+ - Best for: Static sites, simple apps
190
+
191
+ D) **No caching**
192
+
193
+ - Best for: Dev environments only
194
+
195
+ **Your answer:**
196
+
197
+ **Cache duration for assets:**
198
+
199
+ - HTML: \_\_\_\_ (e.g., no cache, max-age=3600)
200
+ - CSS/JS (versioned): \_\_\_\_ (e.g., max-age=31536000)
201
+ - Images: \_\_\_\_ (e.g., max-age=86400)
215
202
  ---
216
-
217
- ### Question 7.6: Deployment Platform
218
-
219
- **Where will you deploy?**
220
-
221
- A) ⭐ **Vercel** (Recommended for Next.js/SPA)
222
-
223
- - Features: Zero-config, edge functions, preview deployments
224
- - Best for: Next.js, React, Vue, Svelte
225
- - Pricing: Free tier available
226
-
227
- B) 🔥 **Netlify**
228
-
229
- - Features: Similar to Vercel, great DX
230
- - Best for: Static sites, JAMstack
231
- - Pricing: Free tier available
232
-
233
- C) **AWS (S3 + CloudFront)**
234
-
235
- - Features: Full control, scalable
236
- - Best for: Enterprise, existing AWS infrastructure
237
- - Pricing: Pay per use
238
-
239
- D) **Cloudflare Pages**
240
-
241
- - Features: Edge deployment, fast global CDN
242
- - Best for: Static sites, edge workers
243
- - Pricing: Free tier generous
244
-
245
- E) **Firebase Hosting**
246
-
247
- - Features: Integrated with Firebase services
248
- - Best for: Firebase apps
249
- - Pricing: Free tier available
250
-
251
- F) **Docker + VPS (DigitalOcean, Linode, etc.)**
252
-
253
- - Features: Full control, self-hosted
254
- - Best for: Custom infrastructure
255
- - Pricing: $5-$20/month
256
-
257
- G) **Azure Static Web Apps / Google Cloud Run**
258
-
259
- - Features: Enterprise cloud platforms
260
- - Best for: Enterprise, existing Azure/GCP infrastructure
261
-
262
- **Your answer:**
263
-
203
+ ### Question 7.6: Deployment Platform
204
+
205
+ **Where will you deploy?**
206
+
207
+ A) ⭐ **Vercel** (Recommended for Next.js/SPA)
208
+
209
+ - Features: Zero-config, edge functions, preview deployments
210
+ - Best for: Next.js, React, Vue, Svelte
211
+ - Pricing: Free tier available
212
+
213
+ B) 🔥 **Netlify**
214
+
215
+ - Features: Similar to Vercel, great DX
216
+ - Best for: Static sites, JAMstack
217
+ - Pricing: Free tier available
218
+
219
+ C) **AWS (S3 + CloudFront)**
220
+
221
+ - Features: Full control, scalable
222
+ - Best for: Enterprise, existing AWS infrastructure
223
+ - Pricing: Pay per use
224
+
225
+ D) **Cloudflare Pages**
226
+
227
+ - Features: Edge deployment, fast global CDN
228
+ - Best for: Static sites, edge workers
229
+ - Pricing: Free tier generous
230
+
231
+ E) **Firebase Hosting**
232
+
233
+ - Features: Integrated with Firebase services
234
+ - Best for: Firebase apps
235
+ - Pricing: Free tier available
236
+
237
+ F) **Docker + VPS (DigitalOcean, Linode, etc.)**
238
+
239
+ - Features: Full control, self-hosted
240
+ - Best for: Custom infrastructure
241
+ - Pricing: $5-$20/month
242
+
243
+ G) **Azure Static Web Apps / Google Cloud Run**
244
+
245
+ - Features: Enterprise cloud platforms
246
+ - Best for: Enterprise, existing Azure/GCP infrastructure
247
+
248
+ **Your answer:**
264
249
  ---
265
-
266
- ### Question 7.7: CI/CD Pipeline
267
-
268
- **What CI/CD platform will you use?**
269
-
270
- A) ⭐ **GitHub Actions** (Recommended)
271
-
272
- - Features: Native GitHub integration, free for public repos
273
- - Best for: GitHub-hosted projects
274
-
275
- B) **GitLab CI/CD**
276
-
277
- - Features: Native GitLab integration
278
- - Best for: GitLab-hosted projects
279
-
280
- C) **Vercel/Netlify auto-deploy**
281
-
282
- - Features: Zero-config, automatic on git push
283
- - Best for: Simple deployments
284
-
285
- D) **CircleCI / Travis CI**
286
-
287
- - Features: Mature platforms, good caching
288
- - Best for: Complex pipelines
289
-
290
- E) **No CI/CD**
291
-
292
- - Manual deployments
293
- - Not recommended
294
-
295
- **Your answer:**
296
-
297
- **CI/CD steps:**
298
-
299
- - [ ] Install dependencies
300
- - [ ] Lint code
301
- - [ ] Run unit tests
302
- - [ ] Run E2E tests
303
- - [ ] Build production bundle
304
- - [ ] Deploy to preview (PR)
305
- - [ ] Deploy to production (merge to main)
306
- - [ ] Run Lighthouse audit
307
- - [ ] Notify team (Slack, Discord)
308
-
250
+ ### Question 7.7: CI/CD Pipeline
251
+
252
+ **What CI/CD platform will you use?**
253
+
254
+ A) ⭐ **GitHub Actions** (Recommended)
255
+
256
+ - Features: Native GitHub integration, free for public repos
257
+ - Best for: GitHub-hosted projects
258
+
259
+ B) **GitLab CI/CD**
260
+
261
+ - Features: Native GitLab integration
262
+ - Best for: GitLab-hosted projects
263
+
264
+ C) **Vercel/Netlify auto-deploy**
265
+
266
+ - Features: Zero-config, automatic on git push
267
+ - Best for: Simple deployments
268
+
269
+ D) **CircleCI / Travis CI**
270
+
271
+ - Features: Mature platforms, good caching
272
+ - Best for: Complex pipelines
273
+
274
+ E) **No CI/CD**
275
+
276
+ - Manual deployments
277
+ - Not recommended
278
+
279
+ **Your answer:**
280
+
281
+ **CI/CD steps:**
282
+
283
+ - [ ] Install dependencies
284
+ - [ ] Lint code
285
+ - [ ] Run unit tests
286
+ - [ ] Run E2E tests
287
+ - [ ] Build production bundle
288
+ - [ ] Deploy to preview (PR)
289
+ - [ ] Deploy to production (merge to main)
290
+ - [ ] Run Lighthouse audit
291
+ - [ ] Notify team (Slack, Discord)
309
292
  ---
310
-
311
- ### Question 7.8: Environment Management
312
-
313
- **How many environments will you have?**
314
-
315
- A) ⭐ **3 environments** (Recommended)
316
-
317
- - Development (local)
318
- - Staging (preview.yourapp.com)
319
- - Production (yourapp.com)
320
- - Best for: Most apps
321
-
322
- B) **4+ environments**
323
-
324
- - Development, Staging, QA, Production
325
- - Best for: Enterprise apps
326
-
327
- C) **2 environments**
328
-
329
- - Development, Production
330
- - Best for: Small teams, MVPs
331
-
332
- **Your answer:**
333
-
334
- **Environment variables management:**
335
-
336
- - `.env.local` (gitignored, local overrides)
337
- - `.env.development`
338
- - `.env.staging`
339
- - `.env.production`
340
- - Secrets stored in: Vercel/Netlify dashboard / GitHub Secrets / Vault
341
-
293
+ ### Question 7.8: Environment Management
294
+
295
+ **How many environments will you have?**
296
+
297
+ A) ⭐ **3 environments** (Recommended)
298
+
299
+ - Development (local)
300
+ - Staging (preview.yourapp.com)
301
+ - Production (yourapp.com)
302
+ - Best for: Most apps
303
+
304
+ B) **4+ environments**
305
+
306
+ - Development, Staging, QA, Production
307
+ - Best for: Enterprise apps
308
+
309
+ C) **2 environments**
310
+
311
+ - Development, Production
312
+ - Best for: Small teams, MVPs
313
+
314
+ **Your answer:**
315
+
316
+ **Environment variables management:**
317
+
318
+ - `.env.local` (gitignored, local overrides)
319
+ - `.env.development`
320
+ - `.env.staging`
321
+ - `.env.production`
322
+ - Secrets stored in: Vercel/Netlify dashboard / GitHub Secrets / Vault
342
323
  ---
343
-
344
- ### Question 7.9: Monitoring & Analytics
345
-
346
- **What monitoring will you use?**
347
-
348
- #### Analytics
349
-
350
- A) ⭐ **Google Analytics 4**
351
-
352
- - Features: Free, comprehensive, industry standard
353
- - Best for: Most apps
354
-
355
- B) **Plausible / Fathom**
356
-
357
- - Features: Privacy-focused, simple, no GDPR banner needed
358
- - Best for: Privacy-conscious apps
359
- - Pricing: Paid
360
-
361
- C) **Mixpanel / Amplitude**
362
-
363
- - Features: Product analytics, event tracking
364
- - Best for: SaaS products
365
- - Pricing: Free tier available
366
-
367
- D) **No analytics**
368
-
369
- - Best for: Internal tools only
370
-
371
- **Your answer:**
372
-
373
- #### Error Tracking
374
-
375
- A) ⭐ **Sentry** (Recommended)
376
-
377
- - Features: Error tracking, performance monitoring, releases
378
- - Best for: Most apps
379
- - Pricing: Free tier available
380
-
381
- B) **LogRocket**
382
-
383
- - Features: Session replay, error tracking
384
- - Best for: User behavior analysis
385
- - Pricing: Paid
386
-
387
- C) **Datadog / New Relic**
388
-
389
- - Features: Full observability platform
390
- - Best for: Enterprise
391
- - Pricing: Paid
392
-
393
- D) **Console only**
394
-
395
- - Best for: MVPs, dev environments
396
-
397
- **Your answer:**
398
-
399
- #### Performance Monitoring
400
-
401
- A) ⭐ **Web Vitals + Sentry** (Recommended)
402
-
403
- - Track Core Web Vitals automatically
404
- - Best for: Most apps
405
-
406
- B) **Lighthouse CI**
407
-
408
- - Run Lighthouse in CI/CD
409
- - Best for: Performance budgets
410
-
411
- C) **SpeedCurve / Calibre**
412
-
413
- - Features: Continuous performance monitoring
414
- - Best for: Performance-critical apps
415
- - Pricing: Paid
416
-
417
- D) **No monitoring**
418
-
419
- - Not recommended
420
-
421
- **Your answer:**
422
-
324
+ ### Question 7.9: Monitoring & Analytics
325
+
326
+ **What monitoring will you use?**
327
+
328
+ #### Analytics
329
+
330
+ A) ⭐ **Google Analytics 4**
331
+
332
+ - Features: Free, comprehensive, industry standard
333
+ - Best for: Most apps
334
+
335
+ B) **Plausible / Fathom**
336
+
337
+ - Features: Privacy-focused, simple, no GDPR banner needed
338
+ - Best for: Privacy-conscious apps
339
+ - Pricing: Paid
340
+
341
+ C) **Mixpanel / Amplitude**
342
+
343
+ - Features: Product analytics, event tracking
344
+ - Best for: SaaS products
345
+ - Pricing: Free tier available
346
+
347
+ D) **No analytics**
348
+
349
+ - Best for: Internal tools only
350
+
351
+ **Your answer:**
352
+
353
+ #### Error Tracking
354
+
355
+ A) ⭐ **Sentry** (Recommended)
356
+
357
+ - Features: Error tracking, performance monitoring, releases
358
+ - Best for: Most apps
359
+ - Pricing: Free tier available
360
+
361
+ B) **LogRocket**
362
+
363
+ - Features: Session replay, error tracking
364
+ - Best for: User behavior analysis
365
+ - Pricing: Paid
366
+
367
+ C) **Datadog / New Relic**
368
+
369
+ - Features: Full observability platform
370
+ - Best for: Enterprise
371
+ - Pricing: Paid
372
+
373
+ D) **Console only**
374
+
375
+ - Best for: MVPs, dev environments
376
+
377
+ **Your answer:**
378
+
379
+ #### Performance Monitoring
380
+
381
+ A) ⭐ **Web Vitals + Sentry** (Recommended)
382
+
383
+ - Track Core Web Vitals automatically
384
+ - Best for: Most apps
385
+
386
+ B) **Lighthouse CI**
387
+
388
+ - Run Lighthouse in CI/CD
389
+ - Best for: Performance budgets
390
+
391
+ C) **SpeedCurve / Calibre**
392
+
393
+ - Features: Continuous performance monitoring
394
+ - Best for: Performance-critical apps
395
+ - Pricing: Paid
396
+
397
+ D) **No monitoring**
398
+
399
+ - Not recommended
400
+
401
+ **Your answer:**
423
402
  ---
424
-
425
- ### Question 7.10: SEO & Meta Tags
426
-
427
- **How will you manage SEO?**
428
-
429
- A) ⭐ **React Helmet / vue-meta / Angular Meta service**
430
-
431
- - Dynamic meta tags per page
432
- - Best for: SPAs with SEO needs
433
-
434
- B) **Next.js / Nuxt / Analog built-in SEO**
435
-
436
- - `<Head>` component, automatic sitemap
437
- - Best for: SSR frameworks
438
-
439
- C) **Static meta tags**
440
-
441
- - Hardcoded in index.html
442
- - Best for: Simple apps, no SEO focus
443
-
444
- D) **No SEO**
445
-
446
- - Best for: Internal tools, auth-protected apps
447
-
448
- **Your answer:**
449
-
450
- **SEO requirements:**
451
-
452
- - [ ] Dynamic meta tags (title, description, OG)
453
- - [ ] Sitemap.xml generation
454
- - [ ] Robots.txt
455
- - [ ] Canonical URLs
456
- - [ ] Structured data (JSON-LD)
457
- - [ ] Social media previews (Open Graph, Twitter Cards)
458
-
403
+ ### Question 7.10: SEO & Meta Tags
404
+
405
+ **How will you manage SEO?**
406
+
407
+ A) ⭐ **React Helmet / vue-meta / Angular Meta service**
408
+
409
+ - Dynamic meta tags per page
410
+ - Best for: SPAs with SEO needs
411
+
412
+ B) **Next.js / Nuxt / Analog built-in SEO**
413
+
414
+ - `<Head>` component, automatic sitemap
415
+ - Best for: SSR frameworks
416
+
417
+ C) **Static meta tags**
418
+
419
+ - Hardcoded in index.html
420
+ - Best for: Simple apps, no SEO focus
421
+
422
+ D) **No SEO**
423
+
424
+ - Best for: Internal tools, auth-protected apps
425
+
426
+ **Your answer:**
427
+
428
+ **SEO requirements:**
429
+
430
+ - [ ] Dynamic meta tags (title, description, OG)
431
+ - [ ] Sitemap.xml generation
432
+ - [ ] Robots.txt
433
+ - [ ] Canonical URLs
434
+ - [ ] Structured data (JSON-LD)
435
+ - [ ] Social media previews (Open Graph, Twitter Cards)
459
436
  ---
460
-
461
- ## 📊 Phase 7 Summary
462
-
463
- ```
464
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
465
- 📋 PHASE 7 SUMMARY: PERFORMANCE & DEPLOYMENT
466
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
467
-
468
- Core Web Vitals: [Answer from 7.1]
469
- Bundle Size Target: [Answer from 7.2]
470
- Code Splitting: [Answer from 7.3]
471
- Image Optimization: [Answer from 7.4]
472
- Caching Strategy: [Answer from 7.5]
473
- Deployment Platform: [Answer from 7.6]
474
- CI/CD: [Answer from 7.7]
475
- Environments: [Answer from 7.8]
476
- Monitoring: [Answer from 7.9]
477
- SEO: [Answer from 7.10]
478
- Security: [Answer from 7.11]
479
- PWA Features: [Answer from 7.12]
480
- Performance Monitoring: [Answer from 7.13]
481
- Build Optimization: [Answer from 7.14]
482
- Analytics: [Answer from 7.15]
483
-
484
- Is this correct? (Y/n)
485
- ```
486
-
437
+ ## 📊 Phase 7 Summary
438
+
439
+ ```
487
440
  ---
488
-
489
- ## 📝 Document Generation
490
-
491
- Generate `docs/performance.md` and `docs/operations.md` with these placeholders:
492
-
493
- ### Performance Placeholders
494
-
495
- - `{{WEB_VITALS_TARGETS}}` → LCP/FID/CLS targets
496
- - `{{BUNDLE_SIZE_TARGET}}` → Bundle size limit
497
- - `{{CODE_SPLITTING_STRATEGY}}` → Route/Component/Vendor/Combined
498
- - `{{IMAGE_OPTIMIZATION}}` → Strategy and formats
499
- - `{{CACHING_STRATEGY}}` → Service Worker / Browser / None
500
-
501
- ### Operations Placeholders
502
-
503
- - `{{DEPLOYMENT_PLATFORM}}` → Vercel / Netlify / AWS / etc.
504
- - `{{CI_CD_PLATFORM}}` → GitHub Actions / GitLab CI / etc.
505
- - `{{ENVIRONMENTS}}` → Dev / Staging / Prod
506
- - `{{ERROR_TRACKING}}` → Sentry / LogRocket / etc.
507
- - `{{ANALYTICS}}` → Google Analytics / Plausible / etc.
508
- - `{{PERFORMANCE_MONITORING}}` → Web Vitals / Lighthouse CI / etc.
509
- - `{{SEO_STRATEGY}}` → Dynamic meta tags / Static / None
510
-
511
- Update `ai-instructions.md`:
512
-
513
- ```markdown
514
- ## Performance
515
-
516
- - **Core Web Vitals:** {{WEB_VITALS_TARGETS}}
517
- - **Bundle Size Target:** {{BUNDLE_SIZE_TARGET}}
518
- - **Code Splitting:** {{CODE_SPLITTING_STRATEGY}}
519
-
520
- ### Rules
521
-
522
- - ✅ ALWAYS lazy load routes and heavy components
523
- - ✅ ALWAYS optimize images (WebP/AVIF, lazy loading)
524
- - ✅ ALWAYS code-split by route
525
- - ❌ NEVER import entire libraries (use tree-shaking)
526
- - ❌ NEVER load all data upfront (paginate, infinite scroll)
527
- - ✅ ALWAYS measure Core Web Vitals in production
528
- - ✅ ALWAYS keep bundle size < {{BUNDLE_SIZE_TARGET}}
529
-
530
- ## Deployment
531
-
532
- - **Platform:** {{DEPLOYMENT_PLATFORM}}
533
- - **CI/CD:** {{CI_CD_PLATFORM}}
534
- - **Monitoring:** {{ERROR_TRACKING}} + {{ANALYTICS}}
535
-
536
- ### Rules
537
-
538
- - ✅ ALWAYS test in staging before production
539
- - ✅ ALWAYS use environment variables for config
540
- - ❌ NEVER commit secrets to git
541
- - ✅ ALWAYS monitor errors with {{ERROR_TRACKING}}
542
- - ✅ ALWAYS track Core Web Vitals in production
543
- ```
544
-
441
+ 📋 PHASE 7 SUMMARY: PERFORMANCE & DEPLOYMENT
545
442
  ---
546
-
547
- ## Phase 7 Completion
548
-
549
- After answering all questions, summarize:
550
-
551
- ```
552
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
553
- ✅ Phase 7 Complete: Performance & Deployment
554
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
555
-
556
- Selected Performance & Deployment Strategy:
557
- - Performance: {{CORE_WEB_VITALS_TARGETS}}
558
- - Optimization: {{OPTIMIZATION_STRATEGIES}}
559
- - Deployment Platform: {{DEPLOYMENT_PLATFORM}}
560
- - Monitoring: {{MONITORING_TOOLS}}
561
- - Analytics: {{ANALYTICS_TOOLS}}
562
-
563
- Generated Documents:
564
- ✅ docs/performance.md
565
- ✅ docs/operations.md
566
- ✅ specs/configuration.md
567
- ✅ .env.example
568
-
569
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
570
-
571
- 📊 Progress Summary:
572
-
573
- Phases 1-7 completed:
574
- ✅ project-brief.md (Phase 1)
575
- ✅ docs/ui-structure.md (Phase 2)
576
- ✅ docs/architecture.md (Phase 3)
577
- ✅ ai-instructions.md (Phase 3)
578
- ✅ docs/code-standards.md (Phase 5)
579
- ✅ docs/testing.md (Phase 6)
580
- ✅ docs/performance.md (Phase 7)
581
- ✅ docs/operations.md (Phase 7)
582
- ✅ specs/configuration.md (Phase 7)
583
- ✅ .env.example (Phase 7)
584
-
585
- Remaining:
586
- ⏭️ Phase 8: Project setup & final documentation
587
-
588
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
589
- 🎯 Next: Phase 8 - Project Setup & Final Documentation
590
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
591
-
592
- Phase 8 will:
593
- - 🔍 Detect project state (new vs existing)
594
- - 🚀 Initialize framework (optional, for new projects)
595
- - 📝 Generate final docs (components-guide, state-management, contributing)
596
- - 📖 Generate AGENT.md (master documentation index)
597
- - 📄 Generate README.md (with intelligent merge if needed)
598
- - 🤖 Create tool-specific configs (based on AI selection)
599
-
600
- Continue to Phase 8? (yes/no)
601
- ```
602
-
443
+ Core Web Vitals: [Answer from 7.1]
444
+ Bundle Size Target: [Answer from 7.2]
445
+ Code Splitting: [Answer from 7.3]
446
+ Image Optimization: [Answer from 7.4]
447
+ Caching Strategy: [Answer from 7.5]
448
+ Deployment Platform: [Answer from 7.6]
449
+ CI/CD: [Answer from 7.7]
450
+ Environments: [Answer from 7.8]
451
+ Monitoring: [Answer from 7.9]
452
+ SEO: [Answer from 7.10]
453
+ Security: [Answer from 7.11]
454
+ PWA Features: [Answer from 7.12]
455
+ Performance Monitoring: [Answer from 7.13]
456
+ Build Optimization: [Answer from 7.14]
457
+ Analytics: [Answer from 7.15]
458
+
459
+ Is this correct? (Y/n)
460
+ ```
603
461
  ---
604
-
605
- **Last Updated:** 2025-12-09
606
-
607
- **Version:** 2.0.0 (Unified workflow with Phase 8)
462
+ ## 📝 Document Generation
463
+
464
+ Generate `docs/performance.md` and `docs/operations.md` with these placeholders:
465
+
466
+ ### Performance Placeholders
467
+
468
+ - `{{WEB_VITALS_TARGETS}}` → LCP/FID/CLS targets
469
+ - `{{BUNDLE_SIZE_TARGET}}` → Bundle size limit
470
+ - `{{CODE_SPLITTING_STRATEGY}}` → Route/Component/Vendor/Combined
471
+ - `{{IMAGE_OPTIMIZATION}}` → Strategy and formats
472
+ - `{{CACHING_STRATEGY}}` → Service Worker / Browser / None
473
+
474
+ ### Operations Placeholders
475
+
476
+ - `{{DEPLOYMENT_PLATFORM}}` → Vercel / Netlify / AWS / etc.
477
+ - `{{CI_CD_PLATFORM}}` → GitHub Actions / GitLab CI / etc.
478
+ - `{{ENVIRONMENTS}}` → Dev / Staging / Prod
479
+ - `{{ERROR_TRACKING}}` → Sentry / LogRocket / etc.
480
+ - `{{ANALYTICS}}` → Google Analytics / Plausible / etc.
481
+ - `{{PERFORMANCE_MONITORING}}` → Web Vitals / Lighthouse CI / etc.
482
+ - `{{SEO_STRATEGY}}` → Dynamic meta tags / Static / None
483
+
484
+ Update `ai-instructions.md`:
485
+
486
+ ```markdown
487
+ ## Performance
488
+
489
+ - **Core Web Vitals:** {{WEB_VITALS_TARGETS}}
490
+ - **Bundle Size Target:** {{BUNDLE_SIZE_TARGET}}
491
+ - **Code Splitting:** {{CODE_SPLITTING_STRATEGY}}
492
+
493
+ ### Rules
494
+
495
+ - ✅ ALWAYS lazy load routes and heavy components
496
+ - ✅ ALWAYS optimize images (WebP/AVIF, lazy loading)
497
+ - ✅ ALWAYS code-split by route
498
+ - ❌ NEVER import entire libraries (use tree-shaking)
499
+ - ❌ NEVER load all data upfront (paginate, infinite scroll)
500
+ - ✅ ALWAYS measure Core Web Vitals in production
501
+ - ✅ ALWAYS keep bundle size < {{BUNDLE_SIZE_TARGET}}
502
+
503
+ ## Deployment
504
+
505
+ - **Platform:** {{DEPLOYMENT_PLATFORM}}
506
+ - **CI/CD:** {{CI_CD_PLATFORM}}
507
+ - **Monitoring:** {{ERROR_TRACKING}} + {{ANALYTICS}}
508
+
509
+ ### Rules
510
+
511
+ - ✅ ALWAYS test in staging before production
512
+ - ✅ ALWAYS use environment variables for config
513
+ - ❌ NEVER commit secrets to git
514
+ - ✅ ALWAYS monitor errors with {{ERROR_TRACKING}}
515
+ - ✅ ALWAYS track Core Web Vitals in production
516
+ ```
517
+ ---
518
+ ## ✅ Phase 7 Completion
519
+
520
+ After answering all questions, summarize:
521
+
522
+ ```
523
+ ---
524
+ ✅ Phase 7 Complete: Performance & Deployment
525
+ ---
526
+ Selected Performance & Deployment Strategy:
527
+ - Performance: {{CORE_WEB_VITALS_TARGETS}}
528
+ - Optimization: {{OPTIMIZATION_STRATEGIES}}
529
+ - Deployment Platform: {{DEPLOYMENT_PLATFORM}}
530
+ - Monitoring: {{MONITORING_TOOLS}}
531
+ - Analytics: {{ANALYTICS_TOOLS}}
532
+
533
+ Generated Documents:
534
+ ✅ docs/performance.md
535
+ ✅ docs/operations.md
536
+ ✅ specs/configuration.md
537
+ ✅ .env.example
538
+ ---
539
+ 📊 Progress Summary:
540
+
541
+ Phases 1-7 completed:
542
+ ✅ project-brief.md (Phase 1)
543
+ ✅ docs/ui-structure.md (Phase 2)
544
+ ✅ docs/architecture.md (Phase 3)
545
+ ✅ ai-instructions.md (Phase 3)
546
+ ✅ docs/code-standards.md (Phase 5)
547
+ ✅ docs/testing.md (Phase 6)
548
+ ✅ docs/performance.md (Phase 7)
549
+ ✅ docs/operations.md (Phase 7)
550
+ ✅ specs/configuration.md (Phase 7)
551
+ ✅ .env.example (Phase 7)
552
+
553
+ Remaining:
554
+ ⏭️ Phase 8: Project setup & final documentation
555
+ ---
556
+ 🎯 Next: Phase 8 - Project Setup & Final Documentation
557
+ ---
558
+ Phase 8 will:
559
+ - 🔍 Detect project state (new vs existing)
560
+ - 🚀 Initialize framework (optional, for new projects)
561
+ - 📝 Generate final docs (components-guide, state-management, contributing)
562
+ - 📖 Generate AGENT.md (master documentation index)
563
+ - 📄 Generate README.md (with intelligent merge if needed)
564
+ - 🤖 Create tool-specific configs (based on AI selection)
565
+
566
+ Continue to Phase 8? (yes/no)
567
+ ```
568
+ ---
569
+ **Last Updated:** 2025-12-09
570
+
571
+ **Version:** 2.0.0 (Unified workflow with Phase 8)
572
+
573
+
574
+
575
+