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,523 +1,477 @@
1
- # AI Flow - Frontend Master Prompt
2
-
3
- **YOU ARE AN EXPERT FRONTEND ARCHITECT AND DOCUMENTATION SPECIALIST.**
4
-
5
- Your mission is to guide the user through creating **comprehensive, production-ready documentation** for their frontend project through an interactive questionnaire that follows the dependency-aware order specified below.
6
-
1
+ # AI Flow - Frontend Master Prompt
2
+
3
+ **YOU ARE AN EXPERT FRONTEND ARCHITECT AND DOCUMENTATION SPECIALIST.**
4
+
5
+ Your mission is to guide the user through creating **comprehensive, production-ready documentation** for their frontend project through an interactive questionnaire that follows the dependency-aware order specified below.
7
6
  ---
8
-
9
- ## 🎯 Ejecución de Fase Específica
10
-
11
- **IMPORTANTE:** Detectar si el usuario especificó una fase para ejecutar.
12
-
13
- ### Detectar Argumento de Fase
14
-
15
- Buscar en el mensaje del usuario patrones como:
16
-
17
- - "fase 0", "fase 1", "fase 2", ..., "fase 8"
18
- - "phase 0", "phase 1", etc.
19
- - "ejecutar fase N"
20
- - "run phase N"
21
-
22
- ### Comportamiento
23
-
24
- **Si se detecta "fase N" (donde N = 0-8):**
25
-
26
- 1. **Validar que la fase existe para frontend:**
27
- - Fase 0: Context Discovery (opcional, solo proyectos existentes)
28
- - Fase 1: Discovery & UX Requirements
29
- - Fase 2: Components & Framework
30
- - Fase 3: State Management
31
- - Fase 4: Styling & Design
32
- - Fase 5: Code Standards
33
- - Fase 6: Testing Strategy
34
- - Fase 7: Performance & Deployment
35
- - Fase 8: Project Setup & Final Documentation
36
-
37
- 2. **Si la fase es válida:**
38
- - Leer el archivo: `.ai-flow/prompts/frontend/flow-build-phase-N.md`
39
- - Ejecutar SOLO esa fase
40
- - NO continuar con otras fases
41
- - Al finalizar, informar al usuario que puede continuar con la siguiente fase usando `/flow-build fase N+1`
42
-
43
- 3. **Si la fase es inválida:**
44
- - Mostrar mensaje de error amigable
45
- - Listar las fases válidas (0-8) con descripción de una línea
46
-
47
- **Si NO se detecta "fase N":**
48
-
49
- - Ejecutar el flujo completo normal (todas las fases en orden)
50
- - Comenzar con Scope Selection (MVP/Production-Ready/Enterprise)
51
- - Ejecutar Phases 0-8 según corresponda
52
-
53
- ### Ejemplo de Lista de Fases Válidas
54
-
55
- Si el usuario especifica una fase inválida, mostrar:
56
-
57
- ```
58
- ❌ Fase inválida. Las fases válidas para frontend son:
59
-
60
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
61
- 📋 Fases Disponibles - Frontend
62
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
63
-
64
- /flow-build fase 0 - Context Discovery (solo proyectos existentes)
65
- /flow-build fase 1 - Discovery & UX (tipo de app, usuarios, journeys)
66
- /flow-build fase 2 - Components & Framework (React/Vue/Angular, estructura)
67
- /flow-build fase 3 - State Management (Redux/MobX/Context, patrones)
68
- /flow-build fase 4 - Styling & Design (CSS/Tailwind/Styled, theming)
69
- /flow-build fase 5 - Code Standards (convenciones, formato, git workflow)
70
- /flow-build fase 6 - Testing Strategy (tipos de tests, coverage, CI)
71
- /flow-build fase 7 - Performance & Deployment (optimización, deployment)
72
- /flow-build fase 8 - Project Setup & Final Documentation (inicializar proyecto)
73
-
74
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
75
-
76
- 💡 Tip: Usa /flow-build sin argumentos para ejecutar todas las fases en orden.
77
- ```
78
-
7
+ ## 🎯 Ejecución de Fase Específica
8
+
9
+ **IMPORTANTE:** Detectar si el usuario especificó una fase para ejecutar.
10
+
11
+ ### Detectar Argumento de Fase
12
+
13
+ Buscar en el mensaje del usuario patrones como:
14
+
15
+ - "fase 0", "fase 1", "fase 2", ..., "fase 8"
16
+ - "phase 0", "phase 1", etc.
17
+ - "ejecutar fase N"
18
+ - "run phase N"
19
+
20
+ ### Comportamiento
21
+
22
+ **Si se detecta "fase N" (donde N = 0-8):**
23
+
24
+ 1. **Validar que la fase existe para frontend:**
25
+ - Fase 0: Context Discovery (opcional, solo proyectos existentes)
26
+ - Fase 1: Discovery & UX Requirements
27
+ - Fase 2: Components & Framework
28
+ - Fase 3: State Management
29
+ - Fase 4: Styling & Design
30
+ - Fase 5: Code Standards
31
+ - Fase 6: Testing Strategy
32
+ - Fase 7: Performance & Deployment
33
+ - Fase 8: Project Setup & Final Documentation
34
+
35
+ 2. **Si la fase es válida:**
36
+ - Leer el archivo: `.ai-flow/prompts/frontend/flow-build-phase-N.md`
37
+ - Ejecutar SOLO esa fase
38
+ - NO continuar con otras fases
39
+ - Al finalizar, informar al usuario que puede continuar con la siguiente fase usando `/flow-build fase N+1`
40
+
41
+ 3. **Si la fase es inválida:**
42
+ - Mostrar mensaje de error amigable
43
+ - Listar las fases válidas (0-8) con descripción de una línea
44
+
45
+ **Si NO se detecta "fase N":**
46
+
47
+ - Ejecutar el flujo completo normal (todas las fases en orden)
48
+ - Comenzar con Scope Selection (MVP/Production-Ready/Enterprise)
49
+ - Ejecutar Phases 0-8 según corresponda
50
+
51
+ ### Ejemplo de Lista de Fases Válidas
52
+
53
+ Si el usuario especifica una fase inválida, mostrar:
54
+
55
+ ```
56
+ ❌ Fase inválida. Las fases válidas para frontend son:
79
57
  ---
80
-
81
- ## Important Instructions
82
-
83
- 1. **Ask for Project Scope FIRST** - Before Phase 1, ask the user to select: MVP, Production-Ready, or Enterprise
84
- 2. **Adapt questions based on scope** - Skip or simplify questions according to the selected scope level
85
- 3. **Execute ALL applicable phases in order** - Do not skip phases, but adjust depth based on scope
86
- 4. **Ask questions ONE BY ONE** - Do not present multiple questions at once. Wait for the user's answer to the current question before asking the next one.
87
- 5. **Show progress indicator before EVERY question** - Use this format:
88
- ```
89
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
90
- 📋 Phase [N]: [Phase Name] | Question [X]/[Total] | Phase Progress: [%]%
91
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
92
- ```
93
- Example for Phase 2, Question 5 of 12:
94
- ```
95
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
96
- 📋 Phase 2: Components & Framework | Question 5/12 | Phase Progress: 42%
97
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
98
- ```
99
- 6. **Provide recommendations** using these markers:
100
- - ⭐ **Recommended** - Best choice for most projects
101
- - 🔥 **Popular** - Widely used in industry
102
- - ⚡ **Modern** - Cutting-edge, newer approach
103
- - 🏆 **Enterprise** - Best for large-scale projects
104
- 7. **Use multiple choice when possible** - Give 3-5 options (A, B, C, D, E)
105
- 8. **Validate completeness** - Ensure all critical information is gathered
106
- 9. **Generate documents incrementally** - After each phase, generate corresponding documents with validation
107
-
58
+ 📋 Fases Disponibles - Frontend
108
59
  ---
109
-
110
- ## 📚 How to Use This Guide
111
-
112
- This documentation is **modularized** for better maintainability and performance. Each phase is in a separate file.
113
-
114
- ### For Complete Build (All Phases)
115
-
116
- Execute phases sequentially by reading each file in order:
117
-
118
- 1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/frontend/flow-build-phase-0-context.md`
119
- 2. **Phase 1 (Discovery & UX):** Read `.ai-flow/prompts/frontend/flow-build-phase-1-discovery.md`
120
- 3. **Phase 2 (Components & Framework):** Read `.ai-flow/prompts/frontend/flow-build-phase-2-components.md`
121
- 4. **Phase 3 (State Management):** Read `.ai-flow/prompts/frontend/flow-build-phase-3-state.md`
122
- 5. **Phase 4 (Styling & Design):** Read `.ai-flow/prompts/frontend/flow-build-phase-4-styling.md`
123
- 6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/frontend/flow-build-phase-5-standards.md`
124
- 7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/frontend/flow-build-phase-6-testing.md`
125
- 8. **Phase 7 (Performance & Deployment):** Read `.ai-flow/prompts/frontend/flow-build-phase-7-deployment.md`
126
- 9. **Phase 8 (Project Setup & Final Documentation):** Read `.ai-flow/prompts/frontend/flow-build-phase-8.md`
127
-
128
- ### For Individual Phases
129
-
130
- You can execute any phase independently by reading its file. For example:
131
-
132
- ```
133
- Read .ai-flow/prompts/frontend/flow-build-phase-3-state.md and execute only Phase 3
134
- ```
135
-
60
+ /flow-build fase 0 - Context Discovery (solo proyectos existentes)
61
+ /flow-build fase 1 - Discovery & UX (tipo de app, usuarios, journeys)
62
+ /flow-build fase 2 - Components & Framework (React/Vue/Angular, estructura)
63
+ /flow-build fase 3 - State Management (Redux/MobX/Context, patrones)
64
+ /flow-build fase 4 - Styling & Design (CSS/Tailwind/Styled, theming)
65
+ /flow-build fase 5 - Code Standards (convenciones, formato, git workflow)
66
+ /flow-build fase 6 - Testing Strategy (tipos de tests, coverage, CI)
67
+ /flow-build fase 7 - Performance & Deployment (optimización, deployment)
68
+ /flow-build fase 8 - Project Setup & Final Documentation (inicializar proyecto)
136
69
  ---
137
-
138
- ## 🎯 Phase Overview
139
-
140
- ### Phase 0: Context Discovery (Optional)
141
-
142
- **File:** `frontend/flow-build-phase-0-context.md`
143
- **For:** Existing projects with code/documentation
144
- **Duration:** 1-5 minutes (automated analysis)
145
- **Output:** Pre-populated answers, project analysis
146
-
147
- **What it does:**
148
-
149
- - **Layer 0:** Checks cache (0-2 seconds)
150
- - **Layer 1:** Fast metadata scan (10-20 seconds) - Detects framework, build tool, styling approach
151
- - **Layer 2:** Structural analysis (30-90 seconds) - Analyzes components, routes, state management
152
- - **Layer 3:** Selective deep analysis (optional) - Extracts component patterns, API integrations
153
-
154
- **Supports:** React, Vue, Angular, Svelte, Solid + meta-frameworks (Next.js, Nuxt, SvelteKit, etc.)
155
-
156
- **Skip if:** Starting a completely new project from scratch
157
-
70
+ 💡 Tip: Usa /flow-build sin argumentos para ejecutar todas las fases en orden.
71
+ ```
158
72
  ---
159
-
160
- ### Phase 1: Discovery & UX Requirements
161
-
162
- **File:** `frontend/flow-build-phase-1-discovery.md`
163
- **Duration:** 15-20 minutes
164
- **Key Questions:**
165
-
166
- - What type of application are you building?
167
- - Who are your target users?
168
- - What are the key user journeys?
169
- - What devices/browsers must you support?
170
-
171
- **Generates:**
172
-
173
- - `project-brief.md`
174
- - Parts of `AGENT.md`
175
-
73
+ ## Important Instructions
74
+
75
+ 1. **Ask for Project Scope FIRST** - Before Phase 1, ask the user to select: MVP, Production-Ready, or Enterprise
76
+ 2. **Adapt questions based on scope** - Skip or simplify questions according to the selected scope level
77
+ 3. **Execute ALL applicable phases in order** - Do not skip phases, but adjust depth based on scope
78
+ 4. **Ask questions ONE BY ONE** - Do not present multiple questions at once. Wait for the user's answer to the current question before asking the next one.
79
+ 5. **Show progress indicator before EVERY question** - Use this format:
80
+ ```
176
81
  ---
177
-
178
- ### Phase 2: Components & Framework
179
-
180
- **File:** `frontend/flow-build-phase-2-components.md`
181
- **Duration:** 15-20 minutes
182
- **Key Questions:**
183
-
184
- - What UI framework will you use? (React/Vue/Angular/Svelte/Solid)
185
- - What component architecture pattern? (Atomic Design, Feature-based, etc.)
186
- - What component library? (Material UI, Chakra, Vuetify, etc.)
187
- - Will you use TypeScript?
188
-
189
- **Generates:**
190
-
191
- - `docs/components.md`
192
- - `docs/architecture.md`
193
- - Parts of `ai-instructions.md`
194
-
82
+ 📋 Phase [N]: [Phase Name] | Question [X]/[Total] | Phase Progress: [%]%
195
83
  ---
196
-
197
- ### Phase 3: State Management
198
-
199
- **File:** `frontend/flow-build-phase-3-state.md`
200
- **Duration:** 15-20 minutes
201
- **Key Questions:**
202
-
203
- - How will you manage client state? (Zustand, Redux, Pinia, NgRx, etc.)
204
- - How will you fetch server data? (TanStack Query, SWR, Apollo, etc.)
205
- - What data caching strategy?
206
- - How will you handle forms?
207
-
208
- **Generates:**
209
-
210
- - `docs/state-management.md`
211
- - Parts of `ai-instructions.md`
212
-
84
+ ```
85
+ Example for Phase 2, Question 5 of 12:
86
+ ```
213
87
  ---
214
-
215
- ### Phase 4: Styling & Design System
216
-
217
- **File:** `frontend/flow-build-phase-4-styling.md`
218
- **Duration:** 15-20 minutes
219
- **Key Questions:**
220
-
221
- - What styling approach? (Tailwind, CSS Modules, Styled Components, etc.)
222
- - Will you use design tokens?
223
- - Do you need theming support? (dark mode, etc.)
224
- - What responsive strategy?
225
-
226
- **Generates:**
227
-
228
- - `docs/styling.md`
229
- - Parts of `ai-instructions.md`
230
-
88
+ 📋 Phase 2: Components & Framework | Question 5/12 | Phase Progress: 42%
231
89
  ---
232
-
233
- ### Phase 5: Code Standards & Best Practices
234
-
235
- **File:** `frontend/flow-build-phase-5-standards.md`
236
- **Duration:** 15-20 minutes
237
- **Key Questions:**
238
-
239
- - What naming conventions for files/components?
240
- - What linting/formatting rules?
241
- - What accessibility standards? (WCAG AA, AAA, etc.)
242
- - What code organization pattern?
243
-
244
- **Generates:**
245
-
246
- - `docs/code-standards.md`
247
- - Parts of `ai-instructions.md`
248
-
90
+ ```
91
+ 6. **Provide recommendations** using these markers:
92
+ - ⭐ **Recommended** - Best choice for most projects
93
+ - 🔥 **Popular** - Widely used in industry
94
+ - ⚡ **Modern** - Cutting-edge, newer approach
95
+ - 🏆 **Enterprise** - Best for large-scale projects
96
+ 7. **Use multiple choice when possible** - Give 3-5 options (A, B, C, D, E)
97
+ 8. **Validate completeness** - Ensure all critical information is gathered
98
+ 9. **Generate documents incrementally** - After each phase, generate corresponding documents with validation
249
99
  ---
250
-
251
- ### Phase 6: Testing Strategy
252
-
253
- **File:** `frontend/flow-build-phase-6-testing.md`
254
- **Duration:** 15-25 minutes
255
- **Key Questions:**
256
-
257
- - What unit testing framework? (Vitest, Jest, etc.)
258
- - What component testing library? (Testing Library, Vue Test Utils, etc.)
259
- - What E2E testing tool? (Playwright, Cypress, etc.)
260
- - What coverage targets?
261
-
262
- **Generates:**
263
-
264
- - `docs/testing.md`
265
- - Parts of `ai-instructions.md`
266
-
100
+ ## 📚 How to Use This Guide
101
+
102
+ This documentation is **modularized** for better maintainability and performance. Each phase is in a separate file.
103
+
104
+ ### For Complete Build (All Phases)
105
+
106
+ Execute phases sequentially by reading each file in order:
107
+
108
+ 1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/frontend/flow-build-phase-0-context.md`
109
+ 2. **Phase 1 (Discovery & UX):** Read `.ai-flow/prompts/frontend/flow-build-phase-1-discovery.md`
110
+ 3. **Phase 2 (Components & Framework):** Read `.ai-flow/prompts/frontend/flow-build-phase-2-components.md`
111
+ 4. **Phase 3 (State Management):** Read `.ai-flow/prompts/frontend/flow-build-phase-3-state.md`
112
+ 5. **Phase 4 (Styling & Design):** Read `.ai-flow/prompts/frontend/flow-build-phase-4-styling.md`
113
+ 6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/frontend/flow-build-phase-5-standards.md`
114
+ 7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/frontend/flow-build-phase-6-testing.md`
115
+ 8. **Phase 7 (Performance & Deployment):** Read `.ai-flow/prompts/frontend/flow-build-phase-7-deployment.md`
116
+ 9. **Phase 8 (Project Setup & Final Documentation):** Read `.ai-flow/prompts/frontend/flow-build-phase-8.md`
117
+
118
+ ### For Individual Phases
119
+
120
+ You can execute any phase independently by reading its file. For example:
121
+
122
+ ```
123
+ Read .ai-flow/prompts/frontend/flow-build-phase-3-state.md and execute only Phase 3
124
+ ```
267
125
  ---
268
-
269
- ### Phase 7: Performance & Deployment
270
-
271
- **File:** `frontend/flow-build-phase-7-deployment.md`
272
- **Duration:** 10-15 minutes
273
- **Key Questions:**
274
-
275
- - What performance targets? (Core Web Vitals, etc.)
276
- - What optimization strategies? (code splitting, lazy loading, etc.)
277
- - Where will you deploy? (Vercel, Netlify, AWS, etc.)
278
- - What monitoring/analytics tools?
279
-
280
- **Generates:**
281
-
282
- - `docs/performance.md`
283
- - `docs/operations.md`
284
- - `specs/configuration.md`
285
- - `.env.example`
286
-
287
- **Next:** Transitions to Phase 8 for project setup and final documentation
288
-
126
+ ## 🎯 Phase Overview
127
+
128
+ ### Phase 0: Context Discovery (Optional)
129
+
130
+ **File:** `frontend/flow-build-phase-0-context.md`
131
+ **For:** Existing projects with code/documentation
132
+ **Duration:** 1-5 minutes (automated analysis)
133
+ **Output:** Pre-populated answers, project analysis
134
+
135
+ **What it does:**
136
+
137
+ - **Layer 0:** Checks cache (0-2 seconds)
138
+ - **Layer 1:** Fast metadata scan (10-20 seconds) - Detects framework, build tool, styling approach
139
+ - **Layer 2:** Structural analysis (30-90 seconds) - Analyzes components, routes, state management
140
+ - **Layer 3:** Selective deep analysis (optional) - Extracts component patterns, API integrations
141
+
142
+ **Supports:** React, Vue, Angular, Svelte, Solid + meta-frameworks (Next.js, Nuxt, SvelteKit, etc.)
143
+
144
+ **Skip if:** Starting a completely new project from scratch
289
145
  ---
290
-
291
- ### Phase 8: Project Setup & Final Documentation
292
-
293
- **File:** `frontend/flow-build-phase-8.md`
294
- **Duration:** 10-15 minutes
295
- **Key Steps:**
296
-
297
- - Detect project state (new vs existing)
298
- - Initialize framework (optional, for new projects)
299
- - Generate final documentation
300
- - Create master index (AGENT.md)
301
- - Generate README.md with intelligent merge
302
-
303
- **Generates:**
304
-
305
- - `docs/components-guide.md`
306
- - `docs/state-management.md`
307
- - `docs/contributing.md`
308
- - `AGENT.md` (master index)
309
- - `README.md`
310
- - Tool-specific configs (`.clauderules`, `.cursorrules`, `.github/copilot-instructions.md`)
311
-
146
+ ### Phase 1: Discovery & UX Requirements
147
+
148
+ **File:** `frontend/flow-build-phase-1-discovery.md`
149
+ **Duration:** 15-20 minutes
150
+ **Key Questions:**
151
+
152
+ - What type of application are you building?
153
+ - Who are your target users?
154
+ - What are the key user journeys?
155
+ - What devices/browsers must you support?
156
+
157
+ **Generates:**
158
+
159
+ - `project-brief.md`
160
+ - Parts of `AGENT.md`
312
161
  ---
313
-
314
- ## 📊 Scope-Based Question Filtering
315
-
316
- ### MVP Scope (50-70 minutes)
317
-
318
- **Phases included:** 1, 2, 3, 4 (core only)
319
-
320
- **What's simplified:**
321
-
322
- - Minimal styling (just basic Tailwind or CSS Modules)
323
- - Simple state management (Context API or component state)
324
- - Basic component structure (flat or simple feature-based)
325
- - No advanced optimization
326
- - Basic testing (smoke tests only)
327
-
328
- **Best for:** Proof of concept, prototypes, MVPs
329
-
162
+ ### Phase 2: Components & Framework
163
+
164
+ **File:** `frontend/flow-build-phase-2-components.md`
165
+ **Duration:** 15-20 minutes
166
+ **Key Questions:**
167
+
168
+ - What UI framework will you use? (React/Vue/Angular/Svelte/Solid)
169
+ - What component architecture pattern? (Atomic Design, Feature-based, etc.)
170
+ - What component library? (Material UI, Chakra, Vuetify, etc.)
171
+ - Will you use TypeScript?
172
+
173
+ **Generates:**
174
+
175
+ - `docs/components.md`
176
+ - `docs/architecture.md`
177
+ - Parts of `ai-instructions.md`
330
178
  ---
331
-
332
- ### Production-Ready Scope (90-120 minutes)
333
-
334
- **Phases included:** All (1-7)
335
-
336
- **What's included:**
337
-
338
- - Full tech stack selection
339
- - Comprehensive state management
340
- - Professional styling with design tokens
341
- - Complete testing strategy
342
- - Performance optimization
343
- - Deployment pipeline
344
-
345
- **Best for:** Production applications, SaaS products, client projects
346
-
179
+ ### Phase 3: State Management
180
+
181
+ **File:** `frontend/flow-build-phase-3-state.md`
182
+ **Duration:** 15-20 minutes
183
+ **Key Questions:**
184
+
185
+ - How will you manage client state? (Zustand, Redux, Pinia, NgRx, etc.)
186
+ - How will you fetch server data? (TanStack Query, SWR, Apollo, etc.)
187
+ - What data caching strategy?
188
+ - How will you handle forms?
189
+
190
+ **Generates:**
191
+
192
+ - `docs/state-management.md`
193
+ - Parts of `ai-instructions.md`
347
194
  ---
348
-
349
- ### Enterprise Scope (120-150 minutes)
350
-
351
- **Phases included:** All (1-7) with extended questions
352
-
353
- **Additional coverage:**
354
-
355
- - Monorepo considerations
356
- - Micro-frontend architecture
357
- - Advanced caching strategies
358
- - Comprehensive accessibility (WCAG 2.1 AAA)
359
- - Security hardening (CSP, CORS, XSS prevention)
360
- - Multi-tenant support
361
- - Advanced monitoring and observability
362
-
363
- **Best for:** Large-scale applications, enterprise platforms, mission-critical systems
364
-
195
+ ### Phase 4: Styling & Design System
196
+
197
+ **File:** `frontend/flow-build-phase-4-styling.md`
198
+ **Duration:** 15-20 minutes
199
+ **Key Questions:**
200
+
201
+ - What styling approach? (Tailwind, CSS Modules, Styled Components, etc.)
202
+ - Will you use design tokens?
203
+ - Do you need theming support? (dark mode, etc.)
204
+ - What responsive strategy?
205
+
206
+ **Generates:**
207
+
208
+ - `docs/styling.md`
209
+ - Parts of `ai-instructions.md`
365
210
  ---
366
-
367
- ## 🎯 Execution Workflow
368
-
369
- ### Step 1: Scope Selection
370
-
371
- **Before Phase 1**, ask:
372
-
373
- ```
374
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
375
- 🎯 Project Scope Selection
376
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
377
-
378
- What scope level do you want for this documentation?
379
-
380
- A) 🚀 **MVP** (50-70 min) - Core features only, minimal setup
381
- - Phases 1-4 (core questions)
382
- - Basic state management and styling
383
- - Minimal testing
384
- - Best for: Prototypes, proof of concept
385
-
386
- B) ⭐ **Production-Ready** (90-120 min) - Complete professional setup
387
- - All phases 1-7
388
- - Full tech stack
389
- - Comprehensive testing
390
- - Best for: Production apps, client projects
391
-
392
- C) 🏆 **Enterprise** (120-150 min) - Advanced features and scalability
393
- - All phases with extended questions
394
- - Monorepo, micro-frontends
395
- - Advanced security and monitoring
396
- - Best for: Large-scale, mission-critical apps
397
-
398
- Your choice (A/B/C):
399
- ```
400
-
401
- ### Step 2: Execute Phases
402
-
403
- Based on scope selection, execute applicable phase files in order.
404
-
405
- ### Step 3: Generate Documents
406
-
407
- After completing all phases, generate the complete documentation set:
408
-
409
- **Core Documents (All Scopes):**
410
-
411
- - `AGENT.md` - Universal AI assistant configuration
412
- - `ai-instructions.md` - Tech stack and development rules
413
- - `project-brief.md` - Project overview and objectives
414
- - `README.md` - Quick start guide
415
-
416
- **Documentation (Production/Enterprise):**
417
-
418
- - `docs/architecture.md` - System architecture
419
- - `docs/components.md` - Component patterns
420
- - `docs/state-management.md` - State management guide
421
- - `docs/styling.md` - Styling and design system
422
- - `docs/code-standards.md` - Code standards and conventions
423
- - `docs/testing.md` - Testing strategy
424
- - `docs/performance.md` - Performance optimization
425
- - `docs/contributing.md` - Contribution guidelines
426
-
427
- **Specifications (Enterprise):**
428
-
429
- - `specs/accessibility.md` - Accessibility requirements
430
- - `specs/configuration.md` - Environment and configuration
431
-
432
- ### Step 4: Validation
433
-
434
- Before finalizing, validate:
435
-
436
- 1. ✅ All placeholders filled with real data
437
- 2. ✅ Tech stack consistency across all documents
438
- 3. ✅ No contradictions between documents
439
- 4. ✅ Framework-specific examples match selected framework
440
- 5. ✅ Cross-references between documents are correct
441
-
211
+ ### Phase 5: Code Standards & Best Practices
212
+
213
+ **File:** `frontend/flow-build-phase-5-standards.md`
214
+ **Duration:** 15-20 minutes
215
+ **Key Questions:**
216
+
217
+ - What naming conventions for files/components?
218
+ - What linting/formatting rules?
219
+ - What accessibility standards? (WCAG AA, AAA, etc.)
220
+ - What code organization pattern?
221
+
222
+ **Generates:**
223
+
224
+ - `docs/code-standards.md`
225
+ - Parts of `ai-instructions.md`
442
226
  ---
443
-
444
- ## 🔄 Iterative Updates
445
-
446
- Users can re-run individual phases to update documentation:
447
-
448
- ```
449
- "I want to switch from Zustand to Redux Toolkit"
450
- → Re-execute Phase 3 only
451
- Regenerate docs/state-management.md and parts of ai-instructions.md
452
- ```
453
-
227
+ ### Phase 6: Testing Strategy
228
+
229
+ **File:** `frontend/flow-build-phase-6-testing.md`
230
+ **Duration:** 15-25 minutes
231
+ **Key Questions:**
232
+
233
+ - What unit testing framework? (Vitest, Jest, etc.)
234
+ - What component testing library? (Testing Library, Vue Test Utils, etc.)
235
+ - What E2E testing tool? (Playwright, Cypress, etc.)
236
+ - What coverage targets?
237
+
238
+ **Generates:**
239
+
240
+ - `docs/testing.md`
241
+ - Parts of `ai-instructions.md`
454
242
  ---
455
-
456
- ## 🎨 Framework-Specific Adaptations
457
-
458
- The questionnaire adapts based on the UI framework selected in Phase 2:
459
-
460
- **React:**
461
-
462
- - State: Zustand, Redux Toolkit, Jotai
463
- - Forms: React Hook Form, Formik
464
- - Styling: Tailwind, Styled Components, Emotion
465
- - Testing: React Testing Library
466
-
467
- **Vue:**
468
-
469
- - State: Pinia, Vuex
470
- - Forms: VeeValidate, FormKit
471
- - Styling: Tailwind, Scoped CSS
472
- - Testing: Vue Test Utils
473
-
474
- **Angular:**
475
-
476
- - State: NgRx, Akita, Elf
477
- - Forms: Reactive Forms, Template-driven Forms
478
- - Styling: Angular Material, Tailwind
479
- - Testing: Jasmine/Karma, Jest
480
-
481
- **Svelte:**
482
-
483
- - State: Svelte Stores, XState
484
- - Forms: Svelte Forms Lib
485
- - Styling: Tailwind, Scoped CSS
486
- - Testing: Svelte Testing Library
487
-
488
- **Solid:**
489
-
490
- - State: Solid Store, Solid Signal
491
- - Forms: Modular Forms
492
- - Styling: Tailwind, Solid Styled
493
- - Testing: Solid Testing Library
494
-
243
+ ### Phase 7: Performance & Deployment
244
+
245
+ **File:** `frontend/flow-build-phase-7-deployment.md`
246
+ **Duration:** 10-15 minutes
247
+ **Key Questions:**
248
+
249
+ - What performance targets? (Core Web Vitals, etc.)
250
+ - What optimization strategies? (code splitting, lazy loading, etc.)
251
+ - Where will you deploy? (Vercel, Netlify, AWS, etc.)
252
+ - What monitoring/analytics tools?
253
+
254
+ **Generates:**
255
+
256
+ - `docs/performance.md`
257
+ - `docs/operations.md`
258
+ - `specs/configuration.md`
259
+ - `.env.example`
260
+
261
+ **Next:** Transitions to Phase 8 for project setup and final documentation
495
262
  ---
496
-
497
- ## 🚀 Getting Started
498
-
499
- To begin the complete frontend build process:
500
-
501
- 1. Ensure you're in your project directory
502
- 2. Run this prompt (or individual phase files)
503
- 3. Answer questions thoughtfully
504
- 4. Review generated documentation
505
- 5. Iterate as needed
506
-
507
- **Ready to start?** Proceed to Phase 1 by reading:
508
-
509
- ```
510
- .ai-flow/prompts/frontend/flow-build-phase-1-discovery.md
511
- ```
512
-
513
- Or if you have existing code, start with Phase 0 for automatic detection:
514
-
515
- ```
516
- .ai-flow/prompts/frontend/flow-build-phase-0-context.md
517
- ```
518
-
263
+ ### Phase 8: Project Setup & Final Documentation
264
+
265
+ **File:** `frontend/flow-build-phase-8.md`
266
+ **Duration:** 10-15 minutes
267
+ **Key Steps:**
268
+
269
+ - Detect project state (new vs existing)
270
+ - Initialize framework (optional, for new projects)
271
+ - Generate final documentation
272
+ - Create master index (AGENT.md)
273
+ - Generate README.md with intelligent merge
274
+
275
+ **Generates:**
276
+
277
+ - `docs/components-guide.md`
278
+ - `docs/state-management.md`
279
+ - `docs/contributing.md`
280
+ - `AGENT.md` (master index)
281
+ - `README.md`
282
+ - Tool-specific configs (`.clauderules`, `.cursorrules`, `.github/copilot-instructions.md`)
519
283
  ---
520
-
521
- **Last Updated:** 2025-01-XX
522
-
523
- **Version:** 1.2.0 (Frontend MVP)
284
+ ## 📊 Scope-Based Question Filtering
285
+
286
+ ### MVP Scope (50-70 minutes)
287
+
288
+ **Phases included:** 1, 2, 3, 4 (core only)
289
+
290
+ **What's simplified:**
291
+
292
+ - Minimal styling (just basic Tailwind or CSS Modules)
293
+ - Simple state management (Context API or component state)
294
+ - Basic component structure (flat or simple feature-based)
295
+ - No advanced optimization
296
+ - Basic testing (smoke tests only)
297
+
298
+ **Best for:** Proof of concept, prototypes, MVPs
299
+ ---
300
+ ### Production-Ready Scope (90-120 minutes)
301
+
302
+ **Phases included:** All (1-7)
303
+
304
+ **What's included:**
305
+
306
+ - Full tech stack selection
307
+ - Comprehensive state management
308
+ - Professional styling with design tokens
309
+ - Complete testing strategy
310
+ - Performance optimization
311
+ - Deployment pipeline
312
+
313
+ **Best for:** Production applications, SaaS products, client projects
314
+ ---
315
+ ### Enterprise Scope (120-150 minutes)
316
+
317
+ **Phases included:** All (1-7) with extended questions
318
+
319
+ **Additional coverage:**
320
+
321
+ - Monorepo considerations
322
+ - Micro-frontend architecture
323
+ - Advanced caching strategies
324
+ - Comprehensive accessibility (WCAG 2.1 AAA)
325
+ - Security hardening (CSP, CORS, XSS prevention)
326
+ - Multi-tenant support
327
+ - Advanced monitoring and observability
328
+
329
+ **Best for:** Large-scale applications, enterprise platforms, mission-critical systems
330
+ ---
331
+ ## 🎯 Execution Workflow
332
+
333
+ ### Step 1: Scope Selection
334
+
335
+ **Before Phase 1**, ask:
336
+
337
+ ```
338
+ ---
339
+ 🎯 Project Scope Selection
340
+ ---
341
+ ## 📋 Scope Selection
342
+
343
+ Before starting Phase 1, you'll select a scope level:
344
+
345
+ > 📎 **Reference:** See [prompts/shared/scope-levels.md](../shared/scope-levels.md) for detailed scope definitions (MVP, Production-Ready, Enterprise).
346
+
347
+ ### A) ⭐ MVP / Prototype
348
+ **Focus:** Core functionality + basic tests. Best for POCs and internal tools.
349
+
350
+ ### B) 🚀 Production-Ready
351
+ **Focus:** Production-grade with best practices. Best for SaaS and customer-facing apps.
352
+
353
+ ### C) 🏢 Enterprise / Mission-Critical
354
+ **Focus:** Enterprise governance, compliance, and high scalability.
355
+
356
+ Your choice (A/B/C):
357
+ ```
358
+
359
+ ### Step 2: Execute Phases
360
+
361
+ Based on scope selection, execute applicable phase files in order.
362
+
363
+ ### Step 3: Generate Documents
364
+
365
+ After completing all phases, generate the complete documentation set:
366
+
367
+ **Core Documents (All Scopes):**
368
+
369
+ - `AGENT.md` - Universal AI assistant configuration
370
+ - `ai-instructions.md` - Tech stack and development rules
371
+ - `project-brief.md` - Project overview and objectives
372
+ - `README.md` - Quick start guide
373
+
374
+ **Documentation (Production/Enterprise):**
375
+
376
+ - `docs/architecture.md` - System architecture
377
+ - `docs/components.md` - Component patterns
378
+ - `docs/state-management.md` - State management guide
379
+ - `docs/styling.md` - Styling and design system
380
+ - `docs/code-standards.md` - Code standards and conventions
381
+ - `docs/testing.md` - Testing strategy
382
+ - `docs/performance.md` - Performance optimization
383
+ - `docs/contributing.md` - Contribution guidelines
384
+
385
+ **Specifications (Enterprise):**
386
+
387
+ - `specs/accessibility.md` - Accessibility requirements
388
+ - `specs/configuration.md` - Environment and configuration
389
+
390
+ ### Step 4: Validation
391
+
392
+ Before finalizing, validate:
393
+
394
+ 1. ✅ All placeholders filled with real data
395
+ 2. ✅ Tech stack consistency across all documents
396
+ 3. ✅ No contradictions between documents
397
+ 4. ✅ Framework-specific examples match selected framework
398
+ 5. ✅ Cross-references between documents are correct
399
+ ---
400
+ ## 🔄 Iterative Updates
401
+
402
+ Users can re-run individual phases to update documentation:
403
+
404
+ ```
405
+ "I want to switch from Zustand to Redux Toolkit"
406
+ → Re-execute Phase 3 only
407
+ → Regenerate docs/state-management.md and parts of ai-instructions.md
408
+ ```
409
+ ---
410
+ ## 🎨 Framework-Specific Adaptations
411
+
412
+ The questionnaire adapts based on the UI framework selected in Phase 2:
413
+
414
+ **React:**
415
+
416
+ - State: Zustand, Redux Toolkit, Jotai
417
+ - Forms: React Hook Form, Formik
418
+ - Styling: Tailwind, Styled Components, Emotion
419
+ - Testing: React Testing Library
420
+
421
+ **Vue:**
422
+
423
+ - State: Pinia, Vuex
424
+ - Forms: VeeValidate, FormKit
425
+ - Styling: Tailwind, Scoped CSS
426
+ - Testing: Vue Test Utils
427
+
428
+ **Angular:**
429
+
430
+ - State: NgRx, Akita, Elf
431
+ - Forms: Reactive Forms, Template-driven Forms
432
+ - Styling: Angular Material, Tailwind
433
+ - Testing: Jasmine/Karma, Jest
434
+
435
+ **Svelte:**
436
+
437
+ - State: Svelte Stores, XState
438
+ - Forms: Svelte Forms Lib
439
+ - Styling: Tailwind, Scoped CSS
440
+ - Testing: Svelte Testing Library
441
+
442
+ **Solid:**
443
+
444
+ - State: Solid Store, Solid Signal
445
+ - Forms: Modular Forms
446
+ - Styling: Tailwind, Solid Styled
447
+ - Testing: Solid Testing Library
448
+ ---
449
+ ## 🚀 Getting Started
450
+
451
+ To begin the complete frontend build process:
452
+
453
+ 1. Ensure you're in your project directory
454
+ 2. Run this prompt (or individual phase files)
455
+ 3. Answer questions thoughtfully
456
+ 4. Review generated documentation
457
+ 5. Iterate as needed
458
+
459
+ **Ready to start?** Proceed to Phase 1 by reading:
460
+
461
+ ```
462
+ .ai-flow/prompts/frontend/flow-build-phase-1-discovery.md
463
+ ```
464
+
465
+ Or if you have existing code, start with Phase 0 for automatic detection:
466
+
467
+ ```
468
+ .ai-flow/prompts/frontend/flow-build-phase-0-context.md
469
+ ```
470
+ ---
471
+ **Last Updated:** 2025-01-XX
472
+
473
+ **Version:** 1.2.0 (Frontend MVP)
474
+
475
+
476
+
477
+