ai-flow-dev 1.0.1

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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +408 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +791 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/fs-utils.d.ts +2 -0
  8. package/dist/fs-utils.d.ts.map +1 -0
  9. package/dist/fs-utils.js +46 -0
  10. package/dist/fs-utils.js.map +1 -0
  11. package/package.json +71 -0
  12. package/prompts/backend/flow-dev-feature.md +1318 -0
  13. package/prompts/backend/flow-dev-fix.md +903 -0
  14. package/prompts/backend/flow-dev-refactor.md +715 -0
  15. package/prompts/backend/flow-dev-review.md +401 -0
  16. package/prompts/backend/flow-dev-work.md +1129 -0
  17. package/prompts/backend/flow-docs-gen-phase-0.md +1840 -0
  18. package/prompts/backend/flow-docs-gen-phase-1.md +435 -0
  19. package/prompts/backend/flow-docs-gen-phase-2.md +460 -0
  20. package/prompts/backend/flow-docs-gen-phase-3.md +684 -0
  21. package/prompts/backend/flow-docs-gen-phase-4.md +516 -0
  22. package/prompts/backend/flow-docs-gen-phase-5.md +637 -0
  23. package/prompts/backend/flow-docs-gen-phase-6.md +465 -0
  24. package/prompts/backend/flow-docs-gen-phase-7.md +1207 -0
  25. package/prompts/backend/flow-docs-gen.md +820 -0
  26. package/prompts/backend/flow-docs-sync.md +526 -0
  27. package/prompts/backend/flow-project-init.md +248 -0
  28. package/prompts/backend/flow-project-roadmap.md +1159 -0
  29. package/prompts/frontend/flow-docs-gen-phase-0.md +494 -0
  30. package/prompts/frontend/flow-docs-gen-phase-1.md +449 -0
  31. package/prompts/frontend/flow-docs-gen-phase-2.md +983 -0
  32. package/prompts/frontend/flow-docs-gen-phase-3.md +685 -0
  33. package/prompts/frontend/flow-docs-gen-phase-4.md +480 -0
  34. package/prompts/frontend/flow-docs-gen-phase-5.md +483 -0
  35. package/prompts/frontend/flow-docs-gen-phase-6.md +570 -0
  36. package/prompts/frontend/flow-docs-gen-phase-7.md +582 -0
  37. package/prompts/frontend/flow-docs-gen.md +413 -0
  38. package/prompts/frontend/flow-docs-sync.md +561 -0
  39. package/prompts/mobile/flow-docs-gen-phase-0.md +387 -0
  40. package/prompts/mobile/flow-docs-gen-phase-1.md +530 -0
  41. package/prompts/mobile/flow-docs-gen-phase-2.md +584 -0
  42. package/prompts/mobile/flow-docs-gen-phase-3.md +659 -0
  43. package/prompts/mobile/flow-docs-gen-phase-4.md +363 -0
  44. package/prompts/mobile/flow-docs-gen-phase-5.md +369 -0
  45. package/prompts/mobile/flow-docs-gen-phase-6.md +490 -0
  46. package/prompts/mobile/flow-docs-gen-phase-7.md +407 -0
  47. package/prompts/mobile/flow-docs-gen.md +430 -0
  48. package/prompts/mobile/flow-docs-sync.md +634 -0
  49. package/templates/backend/.clauderules.template +111 -0
  50. package/templates/backend/.cursorrules.template +102 -0
  51. package/templates/backend/.env.example.template +122 -0
  52. package/templates/backend/README.template.md +200 -0
  53. package/templates/backend/ai-instructions.template.md +354 -0
  54. package/templates/backend/copilot-instructions.template.md +160 -0
  55. package/templates/backend/docs/api.template.md +251 -0
  56. package/templates/backend/docs/architecture.template.md +612 -0
  57. package/templates/backend/docs/business-flows.template.md +109 -0
  58. package/templates/backend/docs/code-standards.template.md +828 -0
  59. package/templates/backend/docs/contributing.template.md +163 -0
  60. package/templates/backend/docs/data-model.template.md +416 -0
  61. package/templates/backend/docs/operations.template.md +591 -0
  62. package/templates/backend/docs/testing.template.md +762 -0
  63. package/templates/backend/project-brief.template.md +176 -0
  64. package/templates/backend/specs/configuration.template.md +133 -0
  65. package/templates/backend/specs/security.template.md +422 -0
  66. package/templates/frontend/README.template.md +121 -0
  67. package/templates/frontend/ai-instructions.template.md +368 -0
  68. package/templates/frontend/docs/api-integration.template.md +390 -0
  69. package/templates/frontend/docs/components.template.md +567 -0
  70. package/templates/frontend/docs/error-handling.template.md +385 -0
  71. package/templates/frontend/docs/operations.template.md +123 -0
  72. package/templates/frontend/docs/performance.template.md +140 -0
  73. package/templates/frontend/docs/pwa.template.md +135 -0
  74. package/templates/frontend/docs/state-management.template.md +394 -0
  75. package/templates/frontend/docs/styling.template.md +779 -0
  76. package/templates/frontend/docs/testing.template.md +736 -0
  77. package/templates/frontend/project-brief.template.md +55 -0
  78. package/templates/frontend/specs/accessibility.template.md +111 -0
  79. package/templates/frontend/specs/configuration.template.md +520 -0
  80. package/templates/frontend/specs/security.template.md +197 -0
  81. package/templates/fullstack/README.template.md +282 -0
  82. package/templates/fullstack/ai-instructions.template.md +487 -0
  83. package/templates/fullstack/project-brief.template.md +197 -0
  84. package/templates/fullstack/specs/configuration.template.md +380 -0
  85. package/templates/mobile/AGENT.template.md +251 -0
  86. package/templates/mobile/README.template.md +195 -0
  87. package/templates/mobile/ai-instructions.template.md +221 -0
  88. package/templates/mobile/docs/app-store.template.md +163 -0
  89. package/templates/mobile/docs/architecture.template.md +100 -0
  90. package/templates/mobile/docs/native-features.template.md +137 -0
  91. package/templates/mobile/docs/navigation.template.md +81 -0
  92. package/templates/mobile/docs/offline-strategy.template.md +90 -0
  93. package/templates/mobile/docs/permissions.template.md +70 -0
  94. package/templates/mobile/docs/state-management.template.md +116 -0
  95. package/templates/mobile/docs/testing.template.md +146 -0
  96. package/templates/mobile/project-brief.template.md +97 -0
  97. package/templates/mobile/specs/build-configuration.template.md +116 -0
  98. package/templates/mobile/specs/deployment.template.md +114 -0
  99. package/templates/shared/AGENT.template.md +252 -0
@@ -0,0 +1,449 @@
1
+ # Phase 1: Discovery & UX Requirements
2
+
3
+ **Duration:** 15-20 minutes
4
+ **Questions:** ~10 questions
5
+ **Output:** project-brief.md, parts of AGENT.md
6
+
7
+ ---
8
+
9
+ ## 🎯 Objective
10
+
11
+ Understand the **user-facing aspects** of the application:
12
+
13
+ 1. What type of application is being built?
14
+ 2. Who are the target users?
15
+ 3. What are the key user journeys?
16
+ 4. What devices and browsers must be supported?
17
+ 5. What are the UX priorities?
18
+
19
+ ---
20
+
21
+ ## 📋 Questions
22
+
23
+ ### Question 1.1: Application Type
24
+
25
+ **What type of frontend application are you building?**
26
+
27
+ A) ⭐ **Single Page Application (SPA)**
28
+ - Example: Gmail, Notion, Figma
29
+ - Characteristics: Client-side routing, dynamic updates, minimal page reloads
30
+ - Best for: Web apps, dashboards, admin panels
31
+
32
+ B) 🔥 **Multi-Page Application (MPA)**
33
+ - Example: E-commerce sites, blogs, marketing sites
34
+ - Characteristics: Server-rendered pages, traditional navigation
35
+ - Best for: Content-heavy sites, SEO-critical apps
36
+
37
+ C) ⚡ **Progressive Web App (PWA)**
38
+ - Example: Twitter Lite, Starbucks PWA
39
+ - Characteristics: Offline support, installable, push notifications
40
+ - Best for: Mobile-first apps, offline-first experiences
41
+
42
+ D) 🏆 **Server-Side Rendered (SSR) App**
43
+ - Example: Next.js apps, Nuxt apps
44
+ - Characteristics: Initial server render, hydration, SEO-friendly
45
+ - Best for: Hybrid apps, dynamic content with SEO needs
46
+
47
+ E) **Static Site (SSG)**
48
+ - Example: Documentation sites, portfolios
49
+ - Characteristics: Pre-rendered at build time, fast, CDN-friendly
50
+ - Best for: Blogs, documentation, landing pages
51
+
52
+ **Your answer:**
53
+
54
+ ---
55
+
56
+ ### Question 1.2: Target Users
57
+
58
+ **Who are your primary target users?**
59
+
60
+ Describe your user personas (3-5 bullet points):
61
+ - Demographics (age, tech-savviness, etc.)
62
+ - Use cases / goals
63
+ - Device preferences
64
+ - Accessibility needs
65
+
66
+ **Example:**
67
+ ```
68
+ - Small business owners (30-50 years old, moderate tech skills)
69
+ - Goal: Manage inventory and track sales
70
+ - Devices: Desktop (70%), Mobile (30%)
71
+ - Accessibility: WCAG 2.1 AA compliance required
72
+ ```
73
+
74
+ **Your answer:**
75
+
76
+ ---
77
+
78
+ ### Question 1.3: Key User Journeys
79
+
80
+ **What are the 3-5 most critical user flows?**
81
+
82
+ List the core journeys users will take through your app.
83
+
84
+ **Example:**
85
+ ```
86
+ 1. Sign up → Email verification → Onboarding wizard → Dashboard
87
+ 2. Create new project → Add team members → Set up integrations
88
+ 3. Browse products → Add to cart → Checkout → Payment confirmation
89
+ 4. Search for content → Filter results → View details → Save favorite
90
+ ```
91
+
92
+ **Your answer:**
93
+
94
+ ---
95
+
96
+ ### Question 1.4: Device & Browser Support
97
+
98
+ **What devices and browsers must you support?**
99
+
100
+ A) ⭐ **Modern Browsers Only** (Last 2 versions)
101
+ - Chrome, Firefox, Safari, Edge
102
+ - Mobile: iOS Safari 14+, Chrome Android
103
+ - Pros: Use latest web features, smaller bundle size
104
+ - Cons: May exclude <5% of users
105
+
106
+ B) 🔥 **Broad Compatibility** (Last 3-4 years)
107
+ - Include IE11, older Safari versions
108
+ - Requires polyfills and transpilation
109
+ - Pros: Wider audience reach
110
+ - Cons: Larger bundle, limited features
111
+
112
+ C) **Mobile-First**
113
+ - Prioritize iOS Safari and Chrome Android
114
+ - Responsive design for desktop
115
+ - Best for: Consumer apps, e-commerce
116
+
117
+ D) **Desktop-First**
118
+ - Optimize for desktop browsers
119
+ - Mobile as secondary experience
120
+ - Best for: Admin panels, dashboards, B2B tools
121
+
122
+ **Your answer:**
123
+
124
+ ---
125
+
126
+ ### Question 1.5: Responsive Strategy
127
+
128
+ **How will you handle different screen sizes?**
129
+
130
+ A) ⭐ **Mobile-First Responsive** (Recommended)
131
+ - Design for mobile first, scale up for desktop
132
+ - Breakpoints: 640px (mobile), 768px (tablet), 1024px (desktop)
133
+ - Best for: Most modern apps
134
+
135
+ B) **Desktop-First Responsive**
136
+ - Design for desktop, scale down for mobile
137
+ - Best for: Complex dashboards with dense data
138
+
139
+ C) **Adaptive (Multiple Designs)**
140
+ - Separate designs for mobile vs desktop
141
+ - Example: Different layouts/features per breakpoint
142
+ - Best for: Apps with very different mobile/desktop experiences
143
+
144
+ D) **Fixed Width (Desktop Only)**
145
+ - No mobile optimization
146
+ - Best for: Internal tools, admin panels (desktop-only users)
147
+
148
+ **Your answer:**
149
+
150
+ ---
151
+
152
+ ### Question 1.6: Internationalization (i18n)
153
+
154
+ **Do you need multi-language support?**
155
+
156
+ A) ⭐ **Single Language Only**
157
+ - No i18n needed
158
+ - Fastest development
159
+
160
+ B) **Multi-Language (Static)**
161
+ - Support 2-5 languages
162
+ - Translations managed in code (JSON files)
163
+ - Example: English, Spanish, French
164
+
165
+ C) 🌍 **Multi-Language (Dynamic)**
166
+ - Support 10+ languages
167
+ - CMS-driven translations or API-based
168
+ - Example: Crowdin, Phrase integration
169
+
170
+ D) **Right-to-Left (RTL) Support**
171
+ - Include Arabic, Hebrew, etc.
172
+ - Requires bidirectional layout support
173
+
174
+ **Your answer:**
175
+
176
+ **If multi-language selected, list target languages:**
177
+
178
+ ---
179
+
180
+ ### Question 1.7: Authentication Requirements
181
+
182
+ **What authentication method will you use?**
183
+
184
+ A) ⭐ **Email/Password (Traditional)**
185
+ - Users sign up with email and password
186
+ - Requires password reset flow
187
+ - Best for: Most apps
188
+
189
+ B) 🔥 **Social Login (OAuth)**
190
+ - Google, GitHub, Facebook, etc.
191
+ - Faster signup, lower friction
192
+ - Best for: Consumer apps
193
+
194
+ C) **Magic Link / Passwordless**
195
+ - Email-based login link
196
+ - No password management
197
+ - Best for: B2B SaaS, low-security apps
198
+
199
+ D) **SSO / SAML (Enterprise)**
200
+ - Okta, Auth0, Azure AD integration
201
+ - Best for: Enterprise B2B apps
202
+
203
+ E) **Multi-Factor Authentication (MFA)**
204
+ - SMS, authenticator app, WebAuthn
205
+ - Best for: High-security apps (finance, healthcare)
206
+
207
+ F) **No Authentication**
208
+ - Public app, no user accounts
209
+ - Best for: Marketing sites, public tools
210
+
211
+ **Your answer:**
212
+
213
+ ---
214
+
215
+ ### Question 1.8: Data Privacy & Compliance
216
+
217
+ **What data privacy requirements do you have?**
218
+
219
+ A) ⭐ **Standard (No Special Requirements)**
220
+ - Basic privacy policy
221
+ - No regulated data
222
+
223
+ B) **GDPR Compliance (EU)**
224
+ - Cookie consent banner
225
+ - Right to be forgotten
226
+ - Data export capabilities
227
+
228
+ C) **CCPA Compliance (California)**
229
+ - "Do Not Sell" option
230
+ - Data deletion requests
231
+
232
+ D) 🏆 **HIPAA Compliance (Healthcare)**
233
+ - Encrypted data transmission
234
+ - Audit logs
235
+ - Strict access controls
236
+
237
+ E) **SOC 2 / ISO 27001 (Enterprise)**
238
+ - Security audit requirements
239
+ - Detailed logging and monitoring
240
+
241
+ F) **Multiple Regulations**
242
+ - Combine GDPR + CCPA + others
243
+ - Most restrictive controls apply
244
+
245
+ **Your answer:**
246
+
247
+ ---
248
+
249
+ ### Question 1.9: Offline Support
250
+
251
+ **Do users need offline access?**
252
+
253
+ A) ⭐ **Online Only**
254
+ - Requires internet connection
255
+ - Simplest implementation
256
+
257
+ B) **Basic Offline (Read-Only)**
258
+ - Cache data for offline viewing
259
+ - No offline editing
260
+ - Example: News apps, documentation
261
+
262
+ C) 🔥 **Full Offline (Sync)**
263
+ - Offline editing with sync when online
264
+ - Requires conflict resolution
265
+ - Example: Note apps, task managers
266
+ - Technologies: Service Workers, IndexedDB
267
+
268
+ D) **Offline-First**
269
+ - Works offline by default
270
+ - Syncs in background
271
+ - Best for: Mobile apps, unreliable networks
272
+
273
+ **Your answer:**
274
+
275
+ ---
276
+
277
+ ### Question 1.10: Performance Priorities
278
+
279
+ **What are your performance priorities?** (Select top 3)
280
+
281
+ A) ⭐ **Fast Initial Load (LCP < 2.5s)**
282
+ - Optimize Core Web Vitals
283
+ - Code splitting, lazy loading
284
+ - Best for: SEO, user retention
285
+
286
+ B) **Smooth Interactions (FID < 100ms)**
287
+ - Debounce inputs, optimize re-renders
288
+ - Best for: Interactive apps, dashboards
289
+
290
+ C) **Visual Stability (CLS < 0.1)**
291
+ - Prevent layout shifts
292
+ - Reserve space for dynamic content
293
+ - Best for: Content-heavy sites
294
+
295
+ D) **Low Bundle Size**
296
+ - Minimize JavaScript payload
297
+ - Tree shaking, compression
298
+ - Best for: Mobile users, slow networks
299
+
300
+ E) **Fast Time to Interactive (TTI)**
301
+ - Hydration optimization
302
+ - Critical CSS inlining
303
+ - Best for: SSR apps
304
+
305
+ F) **Perceived Performance**
306
+ - Skeleton screens, optimistic UI
307
+ - Best for: User experience
308
+
309
+ **Your answer (top 3):**
310
+
311
+ ---
312
+
313
+ ## 📊 Phase 1 Summary
314
+
315
+ Before proceeding to Phase 2, confirm the following:
316
+
317
+ ```
318
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
319
+ 📋 PHASE 1 SUMMARY: DISCOVERY & UX
320
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
321
+
322
+ Application Type: [Answer from 1.1]
323
+ Target Users: [Answer from 1.2]
324
+ Key User Journeys: [Answer from 1.3]
325
+ Device/Browser Support: [Answer from 1.4]
326
+ Responsive Strategy: [Answer from 1.5]
327
+ Internationalization: [Answer from 1.6]
328
+ Authentication: [Answer from 1.7]
329
+ Data Privacy: [Answer from 1.8]
330
+ Offline Support: [Answer from 1.9]
331
+ Performance Priorities: [Answer from 1.10]
332
+
333
+ Is this correct? (Y/n)
334
+ ```
335
+
336
+ If **Yes:** Proceed to Phase 2
337
+
338
+ If **No:** Allow user to correct specific answers
339
+
340
+ ---
341
+
342
+ ## 📝 Document Generation (Partial)
343
+
344
+ At the end of Phase 1, generate or update:
345
+
346
+ ### 1. project-brief.md (Partial)
347
+
348
+ ```markdown
349
+ # {{PROJECT_NAME}} - Project Brief
350
+
351
+ ## Overview
352
+
353
+ {{PROJECT_DESCRIPTION}}
354
+
355
+ ## Application Type
356
+
357
+ {{APPLICATION_TYPE}}
358
+
359
+ ## Target Users
360
+
361
+ {{TARGET_USERS}}
362
+
363
+ ## Key User Journeys
364
+
365
+ 1. {{USER_JOURNEY_1}}
366
+ 2. {{USER_JOURNEY_2}}
367
+ 3. {{USER_JOURNEY_3}}
368
+ 4. {{USER_JOURNEY_4}}
369
+ 5. {{USER_JOURNEY_5}}
370
+
371
+ ## Technical Requirements
372
+
373
+ ### Browser Support
374
+
375
+ {{BROWSER_SUPPORT}}
376
+
377
+ ### Responsive Strategy
378
+
379
+ {{RESPONSIVE_STRATEGY}}
380
+
381
+ ### Internationalization
382
+
383
+ {{I18N_SUPPORT}}
384
+
385
+ ### Authentication
386
+
387
+ {{AUTH_METHOD}}
388
+
389
+ ### Data Privacy
390
+
391
+ {{DATA_PRIVACY_COMPLIANCE}}
392
+
393
+ ### Offline Support
394
+
395
+ {{OFFLINE_SUPPORT}}
396
+
397
+ ### Performance Priorities
398
+
399
+ {{PERFORMANCE_PRIORITIES}}
400
+ ```
401
+
402
+ ### 2. AGENT.md (Partial)
403
+
404
+ ```markdown
405
+ # AGENT.md
406
+
407
+ ## About This Project
408
+
409
+ **Project Name:** {{PROJECT_NAME}}
410
+
411
+ **Type:** {{APPLICATION_TYPE}}
412
+
413
+ **Target Users:** {{TARGET_USERS}}
414
+
415
+ ## Key Features
416
+
417
+ {{KEY_USER_JOURNEYS}}
418
+
419
+ ## Requirements
420
+
421
+ - Browser Support: {{BROWSER_SUPPORT}}
422
+ - Responsive: {{RESPONSIVE_STRATEGY}}
423
+ - i18n: {{I18N_SUPPORT}}
424
+ - Authentication: {{AUTH_METHOD}}
425
+ - Compliance: {{DATA_PRIVACY_COMPLIANCE}}
426
+ ```
427
+
428
+ ---
429
+
430
+ ## 🚀 Next Steps
431
+
432
+ ```
433
+ ✅ Phase 1 Complete!
434
+
435
+ Documents Generated:
436
+ - project-brief.md (partial)
437
+ - AGENT.md (partial)
438
+
439
+ Next: Phase 2 - Components & Framework
440
+
441
+ Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-2-components.md
442
+ ```
443
+
444
+ ---
445
+
446
+ **Last Updated:** 2025-01-XX
447
+
448
+ **Version:** 1.2.0
449
+