ai-flow-dev 2.7.0 → 2.8.0

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 (171) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +573 -570
  3. package/package.json +74 -74
  4. package/prompts/backend/flow-build-phase-0.md +535 -535
  5. package/prompts/backend/flow-build-phase-1.md +626 -626
  6. package/prompts/backend/flow-build-phase-10.md +340 -340
  7. package/prompts/backend/flow-build-phase-2.md +573 -573
  8. package/prompts/backend/flow-build-phase-3.md +834 -834
  9. package/prompts/backend/flow-build-phase-4.md +554 -554
  10. package/prompts/backend/flow-build-phase-5.md +703 -703
  11. package/prompts/backend/flow-build-phase-6.md +524 -524
  12. package/prompts/backend/flow-build-phase-7.md +1001 -1001
  13. package/prompts/backend/flow-build-phase-8.md +1407 -1407
  14. package/prompts/backend/flow-build-phase-9.md +477 -477
  15. package/prompts/backend/flow-build.md +137 -137
  16. package/prompts/backend/flow-check-review.md +656 -20
  17. package/prompts/backend/flow-check-test.md +526 -14
  18. package/prompts/backend/flow-check.md +725 -67
  19. package/prompts/backend/flow-commit.md +88 -119
  20. package/prompts/backend/flow-docs-sync.md +354 -354
  21. package/prompts/backend/flow-finish.md +919 -0
  22. package/prompts/backend/flow-release.md +949 -0
  23. package/prompts/backend/flow-work-feature.md +61 -61
  24. package/prompts/backend/flow-work-fix.md +46 -46
  25. package/prompts/backend/flow-work-refactor.md +48 -48
  26. package/prompts/backend/flow-work-resume.md +34 -34
  27. package/prompts/backend/flow-work.md +1098 -1286
  28. package/prompts/desktop/flow-build-phase-0.md +359 -359
  29. package/prompts/desktop/flow-build-phase-1.md +295 -295
  30. package/prompts/desktop/flow-build-phase-10.md +357 -357
  31. package/prompts/desktop/flow-build-phase-2.md +282 -282
  32. package/prompts/desktop/flow-build-phase-3.md +291 -291
  33. package/prompts/desktop/flow-build-phase-4.md +308 -308
  34. package/prompts/desktop/flow-build-phase-5.md +269 -269
  35. package/prompts/desktop/flow-build-phase-6.md +350 -350
  36. package/prompts/desktop/flow-build-phase-7.md +297 -297
  37. package/prompts/desktop/flow-build-phase-8.md +541 -541
  38. package/prompts/desktop/flow-build-phase-9.md +439 -439
  39. package/prompts/desktop/flow-build.md +156 -156
  40. package/prompts/desktop/flow-check-review.md +656 -20
  41. package/prompts/desktop/flow-check-test.md +526 -14
  42. package/prompts/desktop/flow-check.md +725 -67
  43. package/prompts/desktop/flow-commit.md +88 -119
  44. package/prompts/desktop/flow-docs-sync.md +354 -354
  45. package/prompts/desktop/flow-finish.md +910 -0
  46. package/prompts/desktop/flow-release.md +662 -0
  47. package/prompts/desktop/flow-work-feature.md +61 -61
  48. package/prompts/desktop/flow-work-fix.md +46 -46
  49. package/prompts/desktop/flow-work-refactor.md +48 -48
  50. package/prompts/desktop/flow-work-resume.md +34 -34
  51. package/prompts/desktop/flow-work.md +1202 -1390
  52. package/prompts/frontend/flow-build-phase-0.md +425 -425
  53. package/prompts/frontend/flow-build-phase-1.md +626 -626
  54. package/prompts/frontend/flow-build-phase-10.md +33 -33
  55. package/prompts/frontend/flow-build-phase-2.md +573 -573
  56. package/prompts/frontend/flow-build-phase-3.md +782 -782
  57. package/prompts/frontend/flow-build-phase-4.md +554 -554
  58. package/prompts/frontend/flow-build-phase-5.md +703 -703
  59. package/prompts/frontend/flow-build-phase-6.md +524 -524
  60. package/prompts/frontend/flow-build-phase-7.md +1001 -1001
  61. package/prompts/frontend/flow-build-phase-8.md +872 -872
  62. package/prompts/frontend/flow-build-phase-9.md +94 -94
  63. package/prompts/frontend/flow-build.md +137 -137
  64. package/prompts/frontend/flow-check-review.md +656 -20
  65. package/prompts/frontend/flow-check-test.md +526 -14
  66. package/prompts/frontend/flow-check.md +725 -67
  67. package/prompts/frontend/flow-commit.md +88 -119
  68. package/prompts/frontend/flow-docs-sync.md +550 -550
  69. package/prompts/frontend/flow-finish.md +910 -0
  70. package/prompts/frontend/flow-release.md +519 -0
  71. package/prompts/frontend/flow-work-api.md +1540 -0
  72. package/prompts/frontend/flow-work-feature.md +61 -61
  73. package/prompts/frontend/flow-work-fix.md +38 -38
  74. package/prompts/frontend/flow-work-refactor.md +48 -48
  75. package/prompts/frontend/flow-work-resume.md +34 -34
  76. package/prompts/frontend/flow-work.md +1583 -1320
  77. package/prompts/mobile/flow-build-phase-0.md +425 -425
  78. package/prompts/mobile/flow-build-phase-1.md +626 -626
  79. package/prompts/mobile/flow-build-phase-10.md +32 -32
  80. package/prompts/mobile/flow-build-phase-2.md +573 -573
  81. package/prompts/mobile/flow-build-phase-3.md +782 -782
  82. package/prompts/mobile/flow-build-phase-4.md +554 -554
  83. package/prompts/mobile/flow-build-phase-5.md +703 -703
  84. package/prompts/mobile/flow-build-phase-6.md +524 -524
  85. package/prompts/mobile/flow-build-phase-7.md +1001 -1001
  86. package/prompts/mobile/flow-build-phase-8.md +888 -888
  87. package/prompts/mobile/flow-build-phase-9.md +90 -90
  88. package/prompts/mobile/flow-build.md +135 -135
  89. package/prompts/mobile/flow-check-review.md +656 -20
  90. package/prompts/mobile/flow-check-test.md +526 -14
  91. package/prompts/mobile/flow-check.md +725 -67
  92. package/prompts/mobile/flow-commit.md +88 -119
  93. package/prompts/mobile/flow-docs-sync.md +620 -620
  94. package/prompts/mobile/flow-finish.md +910 -0
  95. package/prompts/mobile/flow-release.md +751 -0
  96. package/prompts/mobile/flow-work-api.md +1493 -0
  97. package/prompts/mobile/flow-work-feature.md +61 -61
  98. package/prompts/mobile/flow-work-fix.md +46 -46
  99. package/prompts/mobile/flow-work-refactor.md +48 -48
  100. package/prompts/mobile/flow-work-resume.md +34 -34
  101. package/prompts/mobile/flow-work.md +1593 -1329
  102. package/prompts/shared/mermaid-guidelines.md +102 -102
  103. package/prompts/shared/scope-levels.md +114 -114
  104. package/prompts/shared/smart-skip-preflight.md +214 -214
  105. package/prompts/shared/story-points.md +55 -55
  106. package/prompts/shared/task-format.md +74 -74
  107. package/prompts/shared/task-summary-template.md +277 -277
  108. package/templates/AGENT.template.md +443 -443
  109. package/templates/backend/.clauderules.template +112 -112
  110. package/templates/backend/.cursorrules.template +102 -102
  111. package/templates/backend/README.template.md +2 -2
  112. package/templates/backend/ai-instructions.template.md +2 -2
  113. package/templates/backend/copilot-instructions.template.md +2 -2
  114. package/templates/backend/docs/api.template.md +320 -320
  115. package/templates/backend/docs/business-flows.template.md +97 -97
  116. package/templates/backend/docs/code-standards.template.md +2 -2
  117. package/templates/backend/docs/contributing.template.md +3 -3
  118. package/templates/backend/docs/data-model.template.md +520 -520
  119. package/templates/backend/docs/testing.template.md +2 -2
  120. package/templates/backend/project-brief.template.md +2 -2
  121. package/templates/backend/specs/configuration.template.md +2 -2
  122. package/templates/backend/specs/security.template.md +2 -2
  123. package/templates/desktop/.clauderules.template +112 -112
  124. package/templates/desktop/.cursorrules.template +102 -102
  125. package/templates/desktop/README.template.md +170 -170
  126. package/templates/desktop/ai-instructions.template.md +366 -366
  127. package/templates/desktop/copilot-instructions.template.md +140 -140
  128. package/templates/desktop/docs/docs/api.template.md +320 -320
  129. package/templates/desktop/docs/docs/architecture.template.md +724 -724
  130. package/templates/desktop/docs/docs/business-flows.template.md +102 -102
  131. package/templates/desktop/docs/docs/code-standards.template.md +792 -792
  132. package/templates/desktop/docs/docs/contributing.template.md +149 -149
  133. package/templates/desktop/docs/docs/data-model.template.md +520 -520
  134. package/templates/desktop/docs/docs/operations.template.md +720 -720
  135. package/templates/desktop/docs/docs/testing.template.md +722 -722
  136. package/templates/desktop/project-brief.template.md +150 -150
  137. package/templates/desktop/specs/specs/configuration.template.md +121 -121
  138. package/templates/desktop/specs/specs/security.template.md +392 -392
  139. package/templates/frontend/README.template.md +2 -2
  140. package/templates/frontend/ai-instructions.template.md +2 -2
  141. package/templates/frontend/docs/api-integration.template.md +362 -362
  142. package/templates/frontend/docs/components.template.md +2 -2
  143. package/templates/frontend/docs/error-handling.template.md +360 -360
  144. package/templates/frontend/docs/operations.template.md +107 -107
  145. package/templates/frontend/docs/performance.template.md +124 -124
  146. package/templates/frontend/docs/pwa.template.md +119 -119
  147. package/templates/frontend/docs/state-management.template.md +2 -2
  148. package/templates/frontend/docs/styling.template.md +2 -2
  149. package/templates/frontend/docs/testing.template.md +2 -2
  150. package/templates/frontend/project-brief.template.md +2 -2
  151. package/templates/frontend/specs/accessibility.template.md +95 -95
  152. package/templates/frontend/specs/configuration.template.md +2 -2
  153. package/templates/frontend/specs/security.template.md +175 -175
  154. package/templates/fullstack/README.template.md +252 -252
  155. package/templates/fullstack/ai-instructions.template.md +444 -444
  156. package/templates/fullstack/project-brief.template.md +157 -157
  157. package/templates/fullstack/specs/configuration.template.md +340 -340
  158. package/templates/mobile/README.template.md +167 -167
  159. package/templates/mobile/ai-instructions.template.md +196 -196
  160. package/templates/mobile/docs/app-store.template.md +135 -135
  161. package/templates/mobile/docs/architecture.template.md +63 -63
  162. package/templates/mobile/docs/native-features.template.md +94 -94
  163. package/templates/mobile/docs/navigation.template.md +59 -59
  164. package/templates/mobile/docs/offline-strategy.template.md +65 -65
  165. package/templates/mobile/docs/permissions.template.md +56 -56
  166. package/templates/mobile/docs/state-management.template.md +85 -85
  167. package/templates/mobile/docs/testing.template.md +109 -109
  168. package/templates/mobile/project-brief.template.md +69 -69
  169. package/templates/mobile/specs/build-configuration.template.md +91 -91
  170. package/templates/mobile/specs/deployment.template.md +92 -92
  171. package/templates/work.template.md +47 -47
@@ -1,550 +1,550 @@
1
- ---
2
- description: Documentation Sync & Update Flow
3
- ---
4
-
5
- # AI Flow - Documentation Update Command (Frontend)
6
-
7
- **YOU ARE AN EXPERT FRONTEND ARCHITECT AND DOCUMENTATION SPECIALIST.**
8
-
9
- Your mission is to detect changes in the codebase and update the project documentation automatically when the user executes `/flow-docs-sync`.
10
-
11
- **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para ejecutar comandos turbo de análisis (ls, cat, etc.). Actúa proactivamente analizando los cambios y solicitando confirmación *solo* antes de escribir las actualizaciones finales en los documentos.
12
- ---
13
- ## Command: `/flow-docs-sync`
14
-
15
- ### Objective
16
-
17
- Detect changes in the frontend codebase compared to the last documented state (stored in `.ai-flow/cache/docs-analysis.json`) and update all affected documentation files automatically.
18
- ---
19
- ## Execution Flow
20
-
21
- ### Step 1: Check for Analysis File
22
-
23
- // turbo
24
- ```bash
25
- cat .ai-flow/cache/docs-analysis.json
26
- ```
27
-
28
- - ✅ If exists → Proceed to Step 2 (Compare Changes)
29
- - ❌ If NOT exists → Execute full Phase 0 analysis first:
30
- - Run complete frontend code analysis (Project Discovery)
31
- - Create `.ai-flow/cache/docs-analysis.json` with current state
32
- - Then proceed to Step 2
33
-
34
- ### Step 2: Detect Changes
35
-
36
- **Reuse Phase 0 Analysis Logic:**
37
-
38
- 1. **Perform Current Code Analysis:**
39
- - Execute project-wide discovery using cross-platform commands:
40
- // turbo
41
- ```bash
42
- ls -R . --exclude-standard
43
- ```
44
- - Analyze current state for:
45
- - View & UI components architecture
46
- - Interface definitions (Routing patterns, public exports, entry points)
47
- - State management and data flow (Global stores, Contexts, Hooks)
48
- - Style definitions and design tokens
49
- - Core dependencies and configuration
50
- - Generate current state snapshot
51
-
52
- 2. **Compare with Previous State:**
53
-
54
- - Load `.ai-flow/cache/docs-analysis.json`
55
- - Compare current state vs previous state
56
- - Detect changes in:
57
- - **Interfaces:** New, modified, or deleted "entry points" (Routes, Exports)
58
- - **UI Structures:** New, modified, or deleted views/components
59
- - **State Logic:** New, modified, or deleted state containers/logic
60
- - **Style Forms:** New, modified, or deleted styling tokens/approaches
61
- - **Dependencies:** Manifest changes (version bumps, new packages)
62
- - **Configuration:** New environment keys or external integrations
63
-
64
- 3. **Generate Change Report:**
65
- - Categorize changes by type
66
- - Map changes to affected documentation files
67
- - Identify critical vs optional updates
68
-
69
- ### Step 3: Present Report and Confirm
70
-
71
- **If changes detected:**
72
-
73
- ```
74
- 📊 CHANGES DETECTED:
75
-
76
- 🔴 Documents that require updating:
77
- - docs/components.md (3 new components: UserCard, ProductGrid, SearchBar)
78
- - docs/state-management.md (new Zustand store: useAuthStore)
79
- - docs/styling.md (new design tokens added)
80
- - ai-instructions.md (new dependency "@tanstack/react-query")
81
-
82
- ⚠️ Moderate changes detected:
83
- - docs/architecture.md (change in folder structure)
84
-
85
- ✅ No changes: docs/testing.md, specs/configuration.md
86
-
87
- Update all detected documents? (Y/N)
88
- ```
89
-
90
- **If NO changes detected:**
91
-
92
- ```
93
- ✅ No changes detected. Documentation is synchronized with current code.
94
-
95
- No updates required.
96
- ```
97
-
98
- ### Step 4: Update Documents (If User Confirms)
99
-
100
- **If user responds "Y", "Yes", "y", "yes", or similar:**
101
-
102
- 1. **For each document that needs updating:**
103
-
104
- **A) `docs/components.md`** (if components changed):
105
-
106
- - Read current `docs/components.md`
107
- - Identify new/modified components from analysis
108
- - Add new components following existing component conventions
109
- - Update modified components
110
- - Remove deleted components (if any)
111
- - Maintain all existing content that hasn't changed
112
- - Regenerate affected sections only
113
-
114
- **B) `docs/state-management.md`** (if state management changed):
115
-
116
- - Read current `docs/state-management.md`
117
- - Update state management patterns with new stores/hooks
118
- - Update state structure if changed
119
- - Maintain all existing content that hasn't changed
120
-
121
- **C) `docs/styling.md`** (if styling changed):
122
-
123
- - Read current `docs/styling.md`
124
- - Update design tokens if changed
125
- - Add new styling patterns
126
- - Update styling approach if changed
127
- - Maintain all existing content that hasn't changed
128
-
129
- **D) `ai-instructions.md`** (if dependencies changed):
130
-
131
- - Read current `ai-instructions.md`
132
- - Add new dependencies to appropriate sections
133
- - Update version numbers if changed
134
- - Maintain all existing rules and patterns
135
-
136
- **E) `docs/architecture.md`** (if architecture changed):
137
-
138
- - Read current `docs/architecture.md`
139
- - Update architecture diagram (mermaid) if structure changed
140
- - Update module descriptions
141
- - Update routing patterns if changed
142
- - Maintain all existing content
143
-
144
- **F) `specs/configuration.md`** (if env vars changed):
145
-
146
- - Read current `specs/configuration.md`
147
- - Add new environment variables
148
- - Update descriptions if changed
149
- - Maintain existing variables
150
-
151
- **G) `docs/testing.md`** (if testing changed):
152
-
153
- - Read current `docs/testing.md`
154
- - Update testing patterns if changed
155
- - Add new test examples if patterns changed
156
- - Maintain existing testing strategy
157
-
158
- 2. **Update `docs-analysis.json`:**
159
-
160
- - Save current state to `.ai-flow/cache/docs-analysis.json`
161
- - Update timestamp
162
- - Include all detected changes in metadata
163
-
164
- 3. **Present Summary:**
165
-
166
- ```
167
- ✅ DOCUMENTATION UPDATED:
168
-
169
- 📝 docs/components.md
170
- - Added 3 new components (UserCard, ProductGrid, SearchBar)
171
- - Maintained all existing component documentation
172
-
173
- 📝 docs/state-management.md
174
- - Added new Zustand store (useAuthStore)
175
- - Updated state management patterns section
176
-
177
- 📝 docs/styling.md
178
- - Added new design tokens
179
- - Updated styling guidelines
180
-
181
- 📝 ai-instructions.md
182
- - Added dependency "@tanstack/react-query"
183
- - Updated tools section
184
-
185
- ✅ docs-analysis.json updated with new state
186
- ```
187
-
188
- ### Step 5: Handle Cancellation
189
-
190
- **If user responds "N", "No", "n", "no", or similar:**
191
-
192
- ```
193
- Update cancelled. Run `/flow-docs-sync` when you're ready to update the documentation.
194
- ```
195
- ---
196
- ## Change Detection Rules
197
-
198
- ### UI & View Detection (Agnostic)
199
-
200
- **What triggers document update (e.g., `docs/components.md`):**
201
-
202
- - New component definitions or file markers (e.g., standard exports, folder structures)
203
- - Modified component hierarchies or patterns
204
- - Deleted components
205
-
206
- **How to update:**
207
-
208
- - Update component catalogs following established project conventions
209
- - Refresh hierarchy diagrams (Mermaid) to reflect new structures
210
- - Maintain existing documentation for stable components
211
-
212
- ### State Management Detection
213
-
214
- **What triggers `docs/state-management.md` update:**
215
-
216
- - New store files (Zustand, Redux, Pinia, etc.)
217
- - New custom hooks (`use*` files)
218
- - New state management patterns
219
- - Modified state structure
220
- - Deleted stores or hooks
221
-
222
- **How to update:**
223
-
224
- - Add new stores/hooks to state management documentation
225
- - Update state patterns if changed
226
- - Maintain all existing state management documentation
227
-
228
- ### Style & Design Detection (Agnostic)
229
-
230
- **What triggers document update (e.g., `docs/styling.md`):**
231
-
232
- - New style manifest files or token definitions
233
- - Modified design systems or styling approaches
234
- - Structural changes in asset organization
235
-
236
- **How to update:**
237
-
238
- - Document new styling patterns or tokens
239
- - Update architecture guides if styling methodology changed
240
- - Maintain existing documentation for core design principles
241
-
242
- ### Dependencies Detection
243
-
244
- **What triggers `ai-instructions.md` update:**
245
-
246
- - New entries in `package.json`
247
- - Updated version numbers
248
- - New framework or library
249
-
250
- **How to update:**
251
-
252
- - Add to dependencies section
253
- - Update version information
254
- - Add to tools/libraries list if significant
255
- - Maintain all existing dependencies
256
-
257
- ### Architecture Detection
258
-
259
- **What triggers `docs/architecture.md` update:**
260
-
261
- - New modules or directories
262
- - Changed directory structure
263
- - New architectural patterns detected
264
- - Routing changes (new routes, route structure changes)
265
-
266
- **How to update:**
267
-
268
- - Update architecture diagram (mermaid)
269
- - Add new modules to description
270
- - Update routing patterns if changed
271
- - Maintain existing architecture description
272
-
273
- ### Configuration Detection
274
-
275
- **What triggers `specs/configuration.md` update:**
276
-
277
- - New environment variables in code
278
- - New external service integrations
279
- - Changed configuration patterns
280
-
281
- **How to update:**
282
-
283
- - Add new variables to configuration spec
284
- - Maintain existing variables
285
- ---
286
- ## Important Rules
287
-
288
- 1. **Incremental Updates Only:**
289
-
290
- - Only modify sections that changed
291
- - Preserve all existing content that hasn't changed
292
- - Maintain document structure and formatting
293
-
294
- 2. **Follow Existing Patterns:**
295
-
296
- - Use same format as existing documentation
297
- - Follow conventions established in original build
298
- - Maintain consistency with existing docs
299
-
300
- 3. **Update Analysis File:**
301
-
302
- - Always update `.ai-flow/cache/docs-analysis.json` after document updates
303
- - Include timestamp and change summary
304
- - Save complete current state for next comparison
305
-
306
- 4. **Mermaid Diagrams:**
307
-
308
- - Regenerate component architecture diagrams when structure changes
309
- - Regenerate architecture diagrams when structure changes
310
- - Use mermaid format for all diagrams
311
- ---
312
- ## 📊 FRONTEND DIAGRAM REGENERATION GUIDELINES
313
-
314
- When regenerating frontend diagrams, follow these **critical** formatting rules:
315
-
316
- ### Component Hierarchy Diagrams (components.md)
317
-
318
- **Diagram Type:** `graph TD` or `graph LR`
319
-
320
- **Requirements:**
321
- 1. Show component organization by abstraction level (Pages → Organisms → Molecules → Atoms)
322
- 2. Use subgraphs to group components by level
323
- 3. Color code by level (consistent colors)
324
- 4. Show composition relationships with solid arrows
325
- 5. Include actual component names from the codebase
326
-
327
- **Quality Checklist:**
328
- - [ ] Code fence is exactly ` ```mermaid ` (lowercase, no spaces)
329
- - [ ] All major components from src/components/ are represented
330
- - [ ] Atomic Design levels are clearly separated
331
- - [ ] Colors are consistent (pages=blue, organisms=orange, molecules=green, atoms=pink)
332
- - [ ] Diagram renders without errors
333
- - [ ] Component names match actual file names
334
-
335
- **Example:**
336
- ````markdown
337
- ```mermaid
338
- graph TD
339
- subgraph "Pages"
340
- Home[HomePage]
341
- end
342
-
343
- subgraph "Organisms"
344
- Header[Header]
345
- end
346
-
347
- subgraph "Molecules"
348
- Nav[NavBar]
349
- end
350
-
351
- subgraph "Atoms"
352
- Btn[Button]
353
- end
354
-
355
- Home --> Header
356
- Header --> Nav
357
- Nav --> Btn
358
-
359
- style Home fill:#e1f5ff
360
- style Header fill:#fff4e6
361
- style Nav fill:#e8f5e9
362
- style Btn fill:#fce4ec
363
- ```
364
- ````
365
- ---
366
- ### State Management Diagrams (state-management.md)
367
-
368
- **Diagram Types:** `graph LR`, `sequenceDiagram`, `graph TD`
369
-
370
- **Requirements:**
371
- 1. Show all state types used (Server, Client, URL, Form, Local)
372
- 2. Label with actual tools used (TanStack Query, Zustand, etc.)
373
- 3. For sequence diagrams: show complete request/response cycle
374
- 4. For decision trees: show clear Yes/No branches
375
- 5. Include cache behavior if using TanStack Query
376
-
377
- **Quality Checklist:**
378
- - [ ] Code fence is exactly ` ```mermaid `
379
- - [ ] All state management tools are documented
380
- - [ ] Data flow direction is clear (arrows labeled)
381
- - [ ] State types are color coded consistently
382
- - [ ] Sequence diagrams show timing and async operations
383
- - [ ] Decision trees have all paths covered
384
-
385
- **Example (State Categories):**
386
- ````markdown
387
- ```mermaid
388
- graph LR
389
- SS[Server State<br/>TanStack Query] -.-> C1[Component A]
390
- CS[Client State<br/>Zustand] -.-> C2[Component B]
391
-
392
- style SS fill:#e1f5ff
393
- style CS fill:#fff4e6
394
- ```
395
- ````
396
-
397
- **Example (Data Flow):**
398
- ````markdown
399
- ```mermaid
400
- sequenceDiagram
401
- User->>Component: Click Button
402
- Component->>Store: Update State
403
- Store->>API: Fetch Data
404
- API-->>Store: Return Data
405
- Store-->>Component: State Changed
406
- Component-->>User: UI Updated
407
- ```
408
- ````
409
- ---
410
- ### Routing Diagrams (architecture.md or routing.md)
411
-
412
- **Diagram Type:** `graph TD`
413
-
414
- **Requirements:**
415
- 1. Show complete route tree starting from root
416
- 2. Separate public and protected routes
417
- 3. Show nested routes with proper indentation
418
- 4. Include route parameters (`:id`, `:slug`)
419
- 5. Group related routes in subgraphs
420
-
421
- **Quality Checklist:**
422
- - [ ] Code fence is exactly ` ```mermaid `
423
- - [ ] All routes from router config are included
424
- - [ ] Protected routes are clearly distinguished
425
- - [ ] Nested routes show parent-child relationships
426
- - [ ] Route parameters are documented
427
- - [ ] Diagram matches actual router configuration
428
- ---
429
- ### Application Architecture Diagram (architecture.md)
430
-
431
- **Diagram Type:** `graph TB`
432
-
433
- **Requirements:**
434
- 1. Show frontend layers (UI, State, API)
435
- 2. Include external services (Backend, Auth, CDN)
436
- 3. Show data flow between layers
437
- 4. Document integration points
438
-
439
- **Example:**
440
- ````markdown
441
- ```mermaid
442
- graph TB
443
- subgraph "Frontend Application"
444
- UI[UI Layer<br/>React Components]
445
- STATE[State Layer<br/>TanStack Query + Zustand]
446
- API[API Layer<br/>Axios/Fetch Services]
447
- end
448
-
449
- subgraph "External Services"
450
- BACKEND[Backend API<br/>REST/GraphQL]
451
- AUTH[Auth Service<br/>Auth0/Clerk]
452
- CDN[CDN<br/>Images/Assets]
453
- end
454
-
455
- UI --> STATE
456
- STATE --> API
457
- API --> BACKEND
458
- API --> AUTH
459
- UI --> CDN
460
-
461
- style UI fill:#e1f5ff
462
- style STATE fill:#fff4e6
463
- style API fill:#e8f5e9
464
- style BACKEND fill:#fce4ec
465
- ```
466
- ````
467
-
468
- **Use for:** System architecture overview, integration documentation, onboarding
469
- ---
470
- ### Common Formatting Rules (ALL Frontend Diagrams)
471
-
472
- **CRITICAL - Code Fence Syntax:**
473
- ```
474
- ✅ CORRECT: ```mermaid
475
- ❌ WRONG: ```Mermaid (capital M)
476
- ❌ WRONG: ``` mermaid (extra space)
477
- ```
478
-
479
- **Color Coding Standards (Frontend):**
480
- - Pages/Routes: `#e1f5ff` (light blue)
481
- - Organisms: `#fff4e6` (light orange)
482
- - Molecules: `#e8f5e9` (light green)
483
- - Atoms: `#fce4ec` (light pink)
484
- - Server State: `#e1f5ff` (light blue)
485
- - Client State: `#fff4e6` (light orange)
486
- - URL State: `#e8f5e9` (light green)
487
- - Form State: `#fce4ec` (light pink)
488
- - Local State: `#f3e5f5` (light purple)
489
-
490
- **Validation Steps:**
491
- 1. Test diagram at https://mermaid.live/ before saving
492
- 2. Verify all component/file names match actual codebase
493
- 3. Check that arrows flow in logical direction (top-down, left-right)
494
- 4. Confirm colors are applied consistently
495
- 5. Ensure diagram is readable (not too crowded)
496
-
497
- **When Updating Existing Diagrams:**
498
- 1. Read current diagram first
499
- 2. Identify added/removed/modified components or routes
500
- 3. Maintain existing styling and layout patterns
501
- 4. Update relationships based on code changes
502
- 5. Verify entire diagram still renders after changes
503
- ---
504
- 5. **Error Handling:**
505
- - If document doesn't exist, create it following template
506
- - If docs-analysis.json is corrupted, regenerate it
507
- - If comparison fails, show error and suggest full Phase 0 re-run
508
- ---
509
- ## Example Execution
510
-
511
- ```
512
- User: /flow-docs-sync
513
-
514
- AI:
515
- 📊 CHANGES DETECTED:
516
-
517
- 🔴 Documents that require updating:
518
- - docs/components.md (2 new components: Button, Modal)
519
- - docs/state-management.md (new Zustand store: useCartStore)
520
-
521
- ✅ No changes: docs/styling.md, docs/testing.md, ai-instructions.md
522
-
523
- Update all detected documents? (Y/N)
524
-
525
- User: Y
526
-
527
- AI:
528
- ✅ DOCUMENTATION UPDATED:
529
-
530
- 📝 docs/components.md
531
- - Added 2 new components (Button, Modal)
532
- - Maintained all existing component documentation
533
-
534
- 📝 docs/state-management.md
535
- - Added new Zustand store (useCartStore)
536
- - Updated state management patterns section
537
-
538
- ✅ docs-analysis.json updated with new state
539
-
540
- Documentation synchronized successfully.
541
- ```
542
- ---
543
- **BEGIN EXECUTION when user runs `/flow-docs-sync`**
544
-
545
-
546
-
547
-
548
-
549
-
550
-
1
+ ---
2
+ description: Documentation Sync & Update Flow
3
+ ---
4
+
5
+ # AI Flow - Documentation Update Command (Frontend)
6
+
7
+ **YOU ARE AN EXPERT FRONTEND ARCHITECT AND DOCUMENTATION SPECIALIST.**
8
+
9
+ Your mission is to detect changes in the codebase and update the project documentation automatically when the user executes `/flow-docs-sync`.
10
+
11
+ **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para ejecutar comandos turbo de análisis (ls, cat, etc.). Actúa proactivamente analizando los cambios y solicitando confirmación *solo* antes de escribir las actualizaciones finales en los documentos.
12
+ ---
13
+ ## Command: `/flow-docs-sync`
14
+
15
+ ### Objective
16
+
17
+ Detect changes in the frontend codebase compared to the last documented state (stored in `.ai-flow/cache/docs-analysis.json`) and update all affected documentation files automatically.
18
+ ---
19
+ ## Execution Flow
20
+
21
+ ### Step 1: Check for Analysis File
22
+
23
+ // turbo
24
+ ```bash
25
+ cat .ai-flow/cache/docs-analysis.json
26
+ ```
27
+
28
+ - ✅ If exists → Proceed to Step 2 (Compare Changes)
29
+ - ❌ If NOT exists → Execute full Phase 0 analysis first:
30
+ - Run complete frontend code analysis (Project Discovery)
31
+ - Create `.ai-flow/cache/docs-analysis.json` with current state
32
+ - Then proceed to Step 2
33
+
34
+ ### Step 2: Detect Changes
35
+
36
+ **Reuse Phase 0 Analysis Logic:**
37
+
38
+ 1. **Perform Current Code Analysis:**
39
+ - Execute project-wide discovery using cross-platform commands:
40
+ // turbo
41
+ ```bash
42
+ ls -R . --exclude-standard
43
+ ```
44
+ - Analyze current state for:
45
+ - View & UI components architecture
46
+ - Interface definitions (Routing patterns, public exports, entry points)
47
+ - State management and data flow (Global stores, Contexts, Hooks)
48
+ - Style definitions and design tokens
49
+ - Core dependencies and configuration
50
+ - Generate current state snapshot
51
+
52
+ 2. **Compare with Previous State:**
53
+
54
+ - Load `.ai-flow/cache/docs-analysis.json`
55
+ - Compare current state vs previous state
56
+ - Detect changes in:
57
+ - **Interfaces:** New, modified, or deleted "entry points" (Routes, Exports)
58
+ - **UI Structures:** New, modified, or deleted views/components
59
+ - **State Logic:** New, modified, or deleted state containers/logic
60
+ - **Style Forms:** New, modified, or deleted styling tokens/approaches
61
+ - **Dependencies:** Manifest changes (version bumps, new packages)
62
+ - **Configuration:** New environment keys or external integrations
63
+
64
+ 3. **Generate Change Report:**
65
+ - Categorize changes by type
66
+ - Map changes to affected documentation files
67
+ - Identify critical vs optional updates
68
+
69
+ ### Step 3: Present Report and Confirm
70
+
71
+ **If changes detected:**
72
+
73
+ ```
74
+ 📊 CHANGES DETECTED:
75
+
76
+ 🔴 Documents that require updating:
77
+ - docs/components.md (3 new components: UserCard, ProductGrid, SearchBar)
78
+ - docs/state-management.md (new Zustand store: useAuthStore)
79
+ - docs/styling.md (new design tokens added)
80
+ - ai-instructions.md (new dependency "@tanstack/react-query")
81
+
82
+ ⚠️ Moderate changes detected:
83
+ - docs/architecture.md (change in folder structure)
84
+
85
+ ✅ No changes: docs/testing.md, specs/configuration.md
86
+
87
+ Update all detected documents? (Y/N)
88
+ ```
89
+
90
+ **If NO changes detected:**
91
+
92
+ ```
93
+ ✅ No changes detected. Documentation is synchronized with current code.
94
+
95
+ No updates required.
96
+ ```
97
+
98
+ ### Step 4: Update Documents (If User Confirms)
99
+
100
+ **If user responds "Y", "Yes", "y", "yes", or similar:**
101
+
102
+ 1. **For each document that needs updating:**
103
+
104
+ **A) `docs/components.md`** (if components changed):
105
+
106
+ - Read current `docs/components.md`
107
+ - Identify new/modified components from analysis
108
+ - Add new components following existing component conventions
109
+ - Update modified components
110
+ - Remove deleted components (if any)
111
+ - Maintain all existing content that hasn't changed
112
+ - Regenerate affected sections only
113
+
114
+ **B) `docs/state-management.md`** (if state management changed):
115
+
116
+ - Read current `docs/state-management.md`
117
+ - Update state management patterns with new stores/hooks
118
+ - Update state structure if changed
119
+ - Maintain all existing content that hasn't changed
120
+
121
+ **C) `docs/styling.md`** (if styling changed):
122
+
123
+ - Read current `docs/styling.md`
124
+ - Update design tokens if changed
125
+ - Add new styling patterns
126
+ - Update styling approach if changed
127
+ - Maintain all existing content that hasn't changed
128
+
129
+ **D) `ai-instructions.md`** (if dependencies changed):
130
+
131
+ - Read current `ai-instructions.md`
132
+ - Add new dependencies to appropriate sections
133
+ - Update version numbers if changed
134
+ - Maintain all existing rules and patterns
135
+
136
+ **E) `docs/architecture.md`** (if architecture changed):
137
+
138
+ - Read current `docs/architecture.md`
139
+ - Update architecture diagram (mermaid) if structure changed
140
+ - Update module descriptions
141
+ - Update routing patterns if changed
142
+ - Maintain all existing content
143
+
144
+ **F) `specs/configuration.md`** (if env vars changed):
145
+
146
+ - Read current `specs/configuration.md`
147
+ - Add new environment variables
148
+ - Update descriptions if changed
149
+ - Maintain existing variables
150
+
151
+ **G) `docs/testing.md`** (if testing changed):
152
+
153
+ - Read current `docs/testing.md`
154
+ - Update testing patterns if changed
155
+ - Add new test examples if patterns changed
156
+ - Maintain existing testing strategy
157
+
158
+ 2. **Update `docs-analysis.json`:**
159
+
160
+ - Save current state to `.ai-flow/cache/docs-analysis.json`
161
+ - Update timestamp
162
+ - Include all detected changes in metadata
163
+
164
+ 3. **Present Summary:**
165
+
166
+ ```
167
+ ✅ DOCUMENTATION UPDATED:
168
+
169
+ 📝 docs/components.md
170
+ - Added 3 new components (UserCard, ProductGrid, SearchBar)
171
+ - Maintained all existing component documentation
172
+
173
+ 📝 docs/state-management.md
174
+ - Added new Zustand store (useAuthStore)
175
+ - Updated state management patterns section
176
+
177
+ 📝 docs/styling.md
178
+ - Added new design tokens
179
+ - Updated styling guidelines
180
+
181
+ 📝 ai-instructions.md
182
+ - Added dependency "@tanstack/react-query"
183
+ - Updated tools section
184
+
185
+ ✅ docs-analysis.json updated with new state
186
+ ```
187
+
188
+ ### Step 5: Handle Cancellation
189
+
190
+ **If user responds "N", "No", "n", "no", or similar:**
191
+
192
+ ```
193
+ Update cancelled. Run `/flow-docs-sync` when you're ready to update the documentation.
194
+ ```
195
+ ---
196
+ ## Change Detection Rules
197
+
198
+ ### UI & View Detection (Agnostic)
199
+
200
+ **What triggers document update (e.g., `docs/components.md`):**
201
+
202
+ - New component definitions or file markers (e.g., standard exports, folder structures)
203
+ - Modified component hierarchies or patterns
204
+ - Deleted components
205
+
206
+ **How to update:**
207
+
208
+ - Update component catalogs following established project conventions
209
+ - Refresh hierarchy diagrams (Mermaid) to reflect new structures
210
+ - Maintain existing documentation for stable components
211
+
212
+ ### State Management Detection
213
+
214
+ **What triggers `docs/state-management.md` update:**
215
+
216
+ - New store files (Zustand, Redux, Pinia, etc.)
217
+ - New custom hooks (`use*` files)
218
+ - New state management patterns
219
+ - Modified state structure
220
+ - Deleted stores or hooks
221
+
222
+ **How to update:**
223
+
224
+ - Add new stores/hooks to state management documentation
225
+ - Update state patterns if changed
226
+ - Maintain all existing state management documentation
227
+
228
+ ### Style & Design Detection (Agnostic)
229
+
230
+ **What triggers document update (e.g., `docs/styling.md`):**
231
+
232
+ - New style manifest files or token definitions
233
+ - Modified design systems or styling approaches
234
+ - Structural changes in asset organization
235
+
236
+ **How to update:**
237
+
238
+ - Document new styling patterns or tokens
239
+ - Update architecture guides if styling methodology changed
240
+ - Maintain existing documentation for core design principles
241
+
242
+ ### Dependencies Detection
243
+
244
+ **What triggers `ai-instructions.md` update:**
245
+
246
+ - New entries in `package.json`
247
+ - Updated version numbers
248
+ - New framework or library
249
+
250
+ **How to update:**
251
+
252
+ - Add to dependencies section
253
+ - Update version information
254
+ - Add to tools/libraries list if significant
255
+ - Maintain all existing dependencies
256
+
257
+ ### Architecture Detection
258
+
259
+ **What triggers `docs/architecture.md` update:**
260
+
261
+ - New modules or directories
262
+ - Changed directory structure
263
+ - New architectural patterns detected
264
+ - Routing changes (new routes, route structure changes)
265
+
266
+ **How to update:**
267
+
268
+ - Update architecture diagram (mermaid)
269
+ - Add new modules to description
270
+ - Update routing patterns if changed
271
+ - Maintain existing architecture description
272
+
273
+ ### Configuration Detection
274
+
275
+ **What triggers `specs/configuration.md` update:**
276
+
277
+ - New environment variables in code
278
+ - New external service integrations
279
+ - Changed configuration patterns
280
+
281
+ **How to update:**
282
+
283
+ - Add new variables to configuration spec
284
+ - Maintain existing variables
285
+ ---
286
+ ## Important Rules
287
+
288
+ 1. **Incremental Updates Only:**
289
+
290
+ - Only modify sections that changed
291
+ - Preserve all existing content that hasn't changed
292
+ - Maintain document structure and formatting
293
+
294
+ 2. **Follow Existing Patterns:**
295
+
296
+ - Use same format as existing documentation
297
+ - Follow conventions established in original build
298
+ - Maintain consistency with existing docs
299
+
300
+ 3. **Update Analysis File:**
301
+
302
+ - Always update `.ai-flow/cache/docs-analysis.json` after document updates
303
+ - Include timestamp and change summary
304
+ - Save complete current state for next comparison
305
+
306
+ 4. **Mermaid Diagrams:**
307
+
308
+ - Regenerate component architecture diagrams when structure changes
309
+ - Regenerate architecture diagrams when structure changes
310
+ - Use mermaid format for all diagrams
311
+ ---
312
+ ## 📊 FRONTEND DIAGRAM REGENERATION GUIDELINES
313
+
314
+ When regenerating frontend diagrams, follow these **critical** formatting rules:
315
+
316
+ ### Component Hierarchy Diagrams (components.md)
317
+
318
+ **Diagram Type:** `graph TD` or `graph LR`
319
+
320
+ **Requirements:**
321
+ 1. Show component organization by abstraction level (Pages → Organisms → Molecules → Atoms)
322
+ 2. Use subgraphs to group components by level
323
+ 3. Color code by level (consistent colors)
324
+ 4. Show composition relationships with solid arrows
325
+ 5. Include actual component names from the codebase
326
+
327
+ **Quality Checklist:**
328
+ - [ ] Code fence is exactly ` ```mermaid ` (lowercase, no spaces)
329
+ - [ ] All major components from src/components/ are represented
330
+ - [ ] Atomic Design levels are clearly separated
331
+ - [ ] Colors are consistent (pages=blue, organisms=orange, molecules=green, atoms=pink)
332
+ - [ ] Diagram renders without errors
333
+ - [ ] Component names match actual file names
334
+
335
+ **Example:**
336
+ ````markdown
337
+ ```mermaid
338
+ graph TD
339
+ subgraph "Pages"
340
+ Home[HomePage]
341
+ end
342
+
343
+ subgraph "Organisms"
344
+ Header[Header]
345
+ end
346
+
347
+ subgraph "Molecules"
348
+ Nav[NavBar]
349
+ end
350
+
351
+ subgraph "Atoms"
352
+ Btn[Button]
353
+ end
354
+
355
+ Home --> Header
356
+ Header --> Nav
357
+ Nav --> Btn
358
+
359
+ style Home fill:#e1f5ff
360
+ style Header fill:#fff4e6
361
+ style Nav fill:#e8f5e9
362
+ style Btn fill:#fce4ec
363
+ ```
364
+ ````
365
+ ---
366
+ ### State Management Diagrams (state-management.md)
367
+
368
+ **Diagram Types:** `graph LR`, `sequenceDiagram`, `graph TD`
369
+
370
+ **Requirements:**
371
+ 1. Show all state types used (Server, Client, URL, Form, Local)
372
+ 2. Label with actual tools used (TanStack Query, Zustand, etc.)
373
+ 3. For sequence diagrams: show complete request/response cycle
374
+ 4. For decision trees: show clear Yes/No branches
375
+ 5. Include cache behavior if using TanStack Query
376
+
377
+ **Quality Checklist:**
378
+ - [ ] Code fence is exactly ` ```mermaid `
379
+ - [ ] All state management tools are documented
380
+ - [ ] Data flow direction is clear (arrows labeled)
381
+ - [ ] State types are color coded consistently
382
+ - [ ] Sequence diagrams show timing and async operations
383
+ - [ ] Decision trees have all paths covered
384
+
385
+ **Example (State Categories):**
386
+ ````markdown
387
+ ```mermaid
388
+ graph LR
389
+ SS[Server State<br/>TanStack Query] -.-> C1[Component A]
390
+ CS[Client State<br/>Zustand] -.-> C2[Component B]
391
+
392
+ style SS fill:#e1f5ff
393
+ style CS fill:#fff4e6
394
+ ```
395
+ ````
396
+
397
+ **Example (Data Flow):**
398
+ ````markdown
399
+ ```mermaid
400
+ sequenceDiagram
401
+ User->>Component: Click Button
402
+ Component->>Store: Update State
403
+ Store->>API: Fetch Data
404
+ API-->>Store: Return Data
405
+ Store-->>Component: State Changed
406
+ Component-->>User: UI Updated
407
+ ```
408
+ ````
409
+ ---
410
+ ### Routing Diagrams (architecture.md or routing.md)
411
+
412
+ **Diagram Type:** `graph TD`
413
+
414
+ **Requirements:**
415
+ 1. Show complete route tree starting from root
416
+ 2. Separate public and protected routes
417
+ 3. Show nested routes with proper indentation
418
+ 4. Include route parameters (`:id`, `:slug`)
419
+ 5. Group related routes in subgraphs
420
+
421
+ **Quality Checklist:**
422
+ - [ ] Code fence is exactly ` ```mermaid `
423
+ - [ ] All routes from router config are included
424
+ - [ ] Protected routes are clearly distinguished
425
+ - [ ] Nested routes show parent-child relationships
426
+ - [ ] Route parameters are documented
427
+ - [ ] Diagram matches actual router configuration
428
+ ---
429
+ ### Application Architecture Diagram (architecture.md)
430
+
431
+ **Diagram Type:** `graph TB`
432
+
433
+ **Requirements:**
434
+ 1. Show frontend layers (UI, State, API)
435
+ 2. Include external services (Backend, Auth, CDN)
436
+ 3. Show data flow between layers
437
+ 4. Document integration points
438
+
439
+ **Example:**
440
+ ````markdown
441
+ ```mermaid
442
+ graph TB
443
+ subgraph "Frontend Application"
444
+ UI[UI Layer<br/>React Components]
445
+ STATE[State Layer<br/>TanStack Query + Zustand]
446
+ API[API Layer<br/>Axios/Fetch Services]
447
+ end
448
+
449
+ subgraph "External Services"
450
+ BACKEND[Backend API<br/>REST/GraphQL]
451
+ AUTH[Auth Service<br/>Auth0/Clerk]
452
+ CDN[CDN<br/>Images/Assets]
453
+ end
454
+
455
+ UI --> STATE
456
+ STATE --> API
457
+ API --> BACKEND
458
+ API --> AUTH
459
+ UI --> CDN
460
+
461
+ style UI fill:#e1f5ff
462
+ style STATE fill:#fff4e6
463
+ style API fill:#e8f5e9
464
+ style BACKEND fill:#fce4ec
465
+ ```
466
+ ````
467
+
468
+ **Use for:** System architecture overview, integration documentation, onboarding
469
+ ---
470
+ ### Common Formatting Rules (ALL Frontend Diagrams)
471
+
472
+ **CRITICAL - Code Fence Syntax:**
473
+ ```
474
+ ✅ CORRECT: ```mermaid
475
+ ❌ WRONG: ```Mermaid (capital M)
476
+ ❌ WRONG: ``` mermaid (extra space)
477
+ ```
478
+
479
+ **Color Coding Standards (Frontend):**
480
+ - Pages/Routes: `#e1f5ff` (light blue)
481
+ - Organisms: `#fff4e6` (light orange)
482
+ - Molecules: `#e8f5e9` (light green)
483
+ - Atoms: `#fce4ec` (light pink)
484
+ - Server State: `#e1f5ff` (light blue)
485
+ - Client State: `#fff4e6` (light orange)
486
+ - URL State: `#e8f5e9` (light green)
487
+ - Form State: `#fce4ec` (light pink)
488
+ - Local State: `#f3e5f5` (light purple)
489
+
490
+ **Validation Steps:**
491
+ 1. Test diagram at https://mermaid.live/ before saving
492
+ 2. Verify all component/file names match actual codebase
493
+ 3. Check that arrows flow in logical direction (top-down, left-right)
494
+ 4. Confirm colors are applied consistently
495
+ 5. Ensure diagram is readable (not too crowded)
496
+
497
+ **When Updating Existing Diagrams:**
498
+ 1. Read current diagram first
499
+ 2. Identify added/removed/modified components or routes
500
+ 3. Maintain existing styling and layout patterns
501
+ 4. Update relationships based on code changes
502
+ 5. Verify entire diagram still renders after changes
503
+ ---
504
+ 5. **Error Handling:**
505
+ - If document doesn't exist, create it following template
506
+ - If docs-analysis.json is corrupted, regenerate it
507
+ - If comparison fails, show error and suggest full Phase 0 re-run
508
+ ---
509
+ ## Example Execution
510
+
511
+ ```
512
+ User: /flow-docs-sync
513
+
514
+ AI:
515
+ 📊 CHANGES DETECTED:
516
+
517
+ 🔴 Documents that require updating:
518
+ - docs/components.md (2 new components: Button, Modal)
519
+ - docs/state-management.md (new Zustand store: useCartStore)
520
+
521
+ ✅ No changes: docs/styling.md, docs/testing.md, ai-instructions.md
522
+
523
+ Update all detected documents? (Y/N)
524
+
525
+ User: Y
526
+
527
+ AI:
528
+ ✅ DOCUMENTATION UPDATED:
529
+
530
+ 📝 docs/components.md
531
+ - Added 2 new components (Button, Modal)
532
+ - Maintained all existing component documentation
533
+
534
+ 📝 docs/state-management.md
535
+ - Added new Zustand store (useCartStore)
536
+ - Updated state management patterns section
537
+
538
+ ✅ docs-analysis.json updated with new state
539
+
540
+ Documentation synchronized successfully.
541
+ ```
542
+ ---
543
+ **BEGIN EXECUTION when user runs `/flow-docs-sync`**
544
+
545
+
546
+
547
+
548
+
549
+
550
+