ai-flow-dev 2.1.1 → 2.1.3

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.
@@ -10,7 +10,7 @@ Your mission is to detect changes in the codebase and update the project documen
10
10
 
11
11
  ### Objective
12
12
 
13
- Detect changes in the codebase compared to the last documented state (stored in `.ai-flow/analysis.json`) and update all affected documentation files automatically.
13
+ Detect changes in the codebase compared to the last documented state (stored in `.ai-flow/cache/docs-analysis.json`) and update all affected documentation files automatically.
14
14
 
15
15
  ---
16
16
 
@@ -19,12 +19,12 @@ Detect changes in the codebase compared to the last documented state (stored in
19
19
  ### Step 1: Check for Analysis File
20
20
 
21
21
  ```
22
- First, check if `.ai-flow/analysis.json` exists:
22
+ First, check if `.ai-flow/cache/docs-analysis.json` exists:
23
23
 
24
24
  - ✅ If exists → Proceed to Step 2 (Compare Changes)
25
25
  - ❌ If NOT exists → Execute full Phase 0 analysis first:
26
26
  - Run complete code analysis (as described in Phase 0)
27
- - Create `.ai-flow/analysis.json` with current state
27
+ - Create `.ai-flow/cache/docs-analysis.json` with current state
28
28
  - Then proceed to Step 2
29
29
  ```
30
30
 
@@ -33,7 +33,6 @@ First, check if `.ai-flow/analysis.json` exists:
33
33
  **Reuse Phase 0 Analysis Logic:**
34
34
 
35
35
  1. **Perform Current Code Analysis:**
36
-
37
36
  - Execute the same analysis as Phase 0 (section 0.1):
38
37
  - File structure analysis
39
38
  - AST-based code parsing (endpoints, entities, dependencies)
@@ -42,8 +41,7 @@ First, check if `.ai-flow/analysis.json` exists:
42
41
  - Generate current state snapshot
43
42
 
44
43
  2. **Compare with Previous State:**
45
-
46
- - Load `.ai-flow/analysis.json`
44
+ - Load `.ai-flow/cache/docs-analysis.json`
47
45
  - Compare current state vs previous state
48
46
  - Detect changes in:
49
47
  - **Endpoints:** New, modified, or deleted endpoints
@@ -96,6 +94,7 @@ When regenerating or updating diagrams in documentation files, follow these **cr
96
94
  **Diagram Type:** `erDiagram`
97
95
 
98
96
  **Requirements:**
97
+
99
98
  1. Show ALL entities and their relationships
100
99
  2. Include field types and constraints (PK, FK, UK)
101
100
  3. Add descriptions for complex or business-critical fields
@@ -103,6 +102,7 @@ When regenerating or updating diagrams in documentation files, follow these **cr
103
102
  5. Keep entity order logical (core entities first, then related)
104
103
 
105
104
  **Quality Checklist:**
105
+
106
106
  - [ ] Code fence is exactly ` ```mermaid ` (lowercase, no spaces)
107
107
  - [ ] All entities from database are represented
108
108
  - [ ] All foreign key relationships are shown
@@ -113,6 +113,7 @@ When regenerating or updating diagrams in documentation files, follow these **cr
113
113
  - [ ] Diagram renders without errors
114
114
 
115
115
  **Example:**
116
+
116
117
  ````markdown
117
118
  ```mermaid
118
119
  erDiagram
@@ -156,6 +157,7 @@ erDiagram
156
157
  **Diagram Type:** `graph TD` (or `graph LR`)
157
158
 
158
159
  **Requirements:**
160
+
159
161
  1. Show ALL major system components (services, databases, caches, queues)
160
162
  2. Label connections with protocols/methods (HTTPS, gRPC, REST, etc.)
161
163
  3. Use consistent styling (databases as cylinders, services as boxes)
@@ -164,6 +166,7 @@ erDiagram
164
166
  6. Include deployment context (load balancers, CDN) if relevant
165
167
 
166
168
  **Quality Checklist:**
169
+
167
170
  - [ ] Code fence is exactly ` ```mermaid ` (lowercase, no spaces)
168
171
  - [ ] All services/components from codebase are shown
169
172
  - [ ] Database connections are labeled
@@ -175,6 +178,7 @@ erDiagram
175
178
  - [ ] Diagram renders without errors
176
179
 
177
180
  **Example:**
181
+
178
182
  ````markdown
179
183
  ```mermaid
180
184
  graph TD
@@ -203,6 +207,7 @@ graph TD
203
207
  **Diagram Type:** `flowchart TD` (or `flowchart LR`)
204
208
 
205
209
  **Requirements:**
210
+
206
211
  1. Start with `([Start Terminal])`
207
212
  2. End with `([End Terminal])`
208
213
  3. Use `{Diamond}` for ALL decision points
@@ -212,6 +217,7 @@ graph TD
212
217
  7. Use consistent styling for node types
213
218
 
214
219
  **Quality Checklist:**
220
+
215
221
  - [ ] Code fence is exactly ` ```mermaid ` (lowercase, no spaces)
216
222
  - [ ] Flow starts with a terminal node
217
223
  - [ ] Flow ends with terminal node(s)
@@ -224,6 +230,7 @@ graph TD
224
230
  - [ ] Diagram renders without errors
225
231
 
226
232
  **Example:**
233
+
227
234
  ````markdown
228
235
  ```mermaid
229
236
  flowchart TD
@@ -250,19 +257,22 @@ flowchart TD
250
257
  ### Common Formatting Rules (ALL Diagrams)
251
258
 
252
259
  **CRITICAL - Code Fence Syntax:**
253
- ```
260
+
261
+ ````
254
262
  ✅ CORRECT: ```mermaid
255
263
  ❌ WRONG: ```Mermaid (capital M)
256
264
  ❌ WRONG: ``` mermaid (extra space)
257
265
  ❌ WRONG: ``mermaid (missing backtick)
258
- ```
266
+ ````
259
267
 
260
268
  **Indentation:**
269
+
261
270
  - Start Mermaid syntax at column 0 (no leading spaces/tabs)
262
271
  - Only indent within Mermaid syntax according to Mermaid rules
263
272
  - Do NOT indent the entire code block
264
273
 
265
274
  **Validation Steps:**
275
+
266
276
  1. After generating/updating diagram, verify syntax at https://mermaid.live/
267
277
  2. Check that diagram renders in VS Code markdown preview
268
278
  3. Verify all nodes and relationships are present
@@ -270,6 +280,7 @@ flowchart TD
270
280
  5. Test that styling is applied correctly
271
281
 
272
282
  **When Updating Existing Diagrams:**
283
+
273
284
  1. Read the current diagram first
274
285
  2. Identify what needs to be added/removed/modified
275
286
  3. Maintain existing styling and layout patterns
@@ -286,7 +297,6 @@ flowchart TD
286
297
  1. **For each document that needs updating:**
287
298
 
288
299
  **A) `docs/api.md`** (if endpoints changed):
289
-
290
300
  - Read current `docs/api.md`
291
301
  - Identify new/modified endpoints from analysis
292
302
  - Add new endpoints following existing API conventions
@@ -296,7 +306,6 @@ flowchart TD
296
306
  - Regenerate affected sections only
297
307
 
298
308
  **B) `docs/data-model.md`** (if entities changed):
299
-
300
309
  - Read current `docs/data-model.md`
301
310
  - Update entity definitions with new fields
302
311
  - Update relationships if changed
@@ -304,41 +313,35 @@ flowchart TD
304
313
  - Maintain all existing content that hasn't changed
305
314
 
306
315
  **C) `ai-instructions.md`** (if dependencies changed):
307
-
308
316
  - Read current `ai-instructions.md`
309
317
  - Add new dependencies to appropriate sections
310
318
  - Update version numbers if changed
311
319
  - Maintain all existing rules and patterns
312
320
 
313
321
  **D) `docs/architecture.md`** (if architecture changed):
314
-
315
322
  - Read current `docs/architecture.md`
316
323
  - Update architecture diagram (mermaid) if structure changed
317
324
  - Update module descriptions
318
325
  - Maintain all existing content
319
326
 
320
327
  **E) `specs/configuration.md`** (if env vars changed):
321
-
322
328
  - Read current `specs/configuration.md`
323
329
  - Add new environment variables
324
330
  - Update descriptions if changed
325
331
  - Maintain existing variables
326
332
 
327
333
  **F) `.env.example`** (if env vars changed):
328
-
329
334
  - Read current `.env.example`
330
335
  - Add new environment variables with example values
331
336
  - Maintain existing variables
332
337
 
333
338
  **G) `specs/security.md`** (if security patterns changed):
334
-
335
339
  - Read current `specs/security.md`
336
340
  - Update security policies if authentication/authorization changed
337
341
  - Maintain existing policies
338
342
 
339
- 2. **Update `analysis.json`:**
340
-
341
- - Save current state to `.ai-flow/analysis.json`
343
+ 2. **Update `docs-analysis.json`:**
344
+ - Save current state to `.ai-flow/cache/docs-analysis.json`
342
345
  - Update timestamp
343
346
  - Include all detected changes in metadata
344
347
 
@@ -359,7 +362,7 @@ flowchart TD
359
362
  - Agregada dependencia "@nestjs/swagger"
360
363
  - Actualizada sección de herramientas
361
364
 
362
- ✅ analysis.json actualizado con nuevo estado
365
+ docs-analysis.json actualizado con nuevo estado
363
366
  ```
364
367
 
365
368
  ### Step 5: Handle Cancellation
@@ -456,32 +459,28 @@ Actualización cancelada. Ejecuta `/flow-docs-sync` cuando estés listo para act
456
459
  ## Important Rules
457
460
 
458
461
  1. **Incremental Updates Only:**
459
-
460
462
  - Only modify sections that changed
461
463
  - Preserve all existing content that hasn't changed
462
464
  - Maintain document structure and formatting
463
465
 
464
466
  2. **Follow Existing Patterns:**
465
-
466
467
  - Use same format as existing documentation
467
468
  - Follow conventions established in original build
468
469
  - Maintain consistency with existing docs
469
470
 
470
471
  3. **Update Analysis File:**
471
-
472
- - Always update `.ai-flow/analysis.json` after document updates
472
+ - Always update `.ai-flow/cache/docs-analysis.json` after document updates
473
473
  - Include timestamp and change summary
474
474
  - Save complete current state for next comparison
475
475
 
476
476
  4. **Mermaid Diagrams:**
477
-
478
477
  - Regenerate ER diagrams when entities change
479
478
  - Regenerate architecture diagrams when structure changes
480
479
  - Use mermaid format for all diagrams
481
480
 
482
481
  5. **Error Handling:**
483
482
  - If document doesn't exist, create it following template
484
- - If analysis.json is corrupted, regenerate it
483
+ - If docs-analysis.json is corrupted, regenerate it
485
484
  - If comparison fails, show error and suggest full Phase 0 re-run
486
485
 
487
486
  ---
@@ -515,7 +514,7 @@ AI:
515
514
  - Agregado campo "avatarUrl" (String, nullable) a entidad User
516
515
  - Actualizado diagrama ER (mermaid) con nuevo campo
517
516
 
518
- ✅ analysis.json actualizado con nuevo estado
517
+ docs-analysis.json actualizado con nuevo estado
519
518
 
520
519
  Documentación sincronizada exitosamente.
521
520
  ```
@@ -523,5 +522,3 @@ Documentación sincronizada exitosamente.
523
522
  ---
524
523
 
525
524
  **BEGIN EXECUTION when user runs `/flow-docs-sync`**
526
-
527
-
@@ -10,7 +10,7 @@ Your mission is to detect changes in the frontend codebase and update the projec
10
10
 
11
11
  ### Objective
12
12
 
13
- Detect changes in the frontend codebase compared to the last documented state (stored in `.ai-flow/analysis.json`) and update all affected documentation files automatically.
13
+ 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.
14
14
 
15
15
  ---
16
16
 
@@ -19,12 +19,12 @@ Detect changes in the frontend codebase compared to the last documented state (s
19
19
  ### Step 1: Check for Analysis File
20
20
 
21
21
  ```
22
- First, check if `.ai-flow/analysis.json` exists:
22
+ First, check if `.ai-flow/cache/docs-analysis.json` exists:
23
23
 
24
24
  - ✅ If exists → Proceed to Step 2 (Compare Changes)
25
25
  - ❌ If NOT exists → Execute full Phase 0 analysis first:
26
26
  - Run complete frontend code analysis (as described in Phase 0)
27
- - Create `.ai-flow/analysis.json` with current state
27
+ - Create `.ai-flow/cache/docs-analysis.json` with current state
28
28
  - Then proceed to Step 2
29
29
  ```
30
30
 
@@ -45,7 +45,7 @@ First, check if `.ai-flow/analysis.json` exists:
45
45
 
46
46
  2. **Compare with Previous State:**
47
47
 
48
- - Load `.ai-flow/analysis.json`
48
+ - Load `.ai-flow/cache/docs-analysis.json`
49
49
  - Compare current state vs previous state
50
50
  - Detect changes in:
51
51
  - **Components:** New, modified, or deleted components
@@ -149,9 +149,9 @@ No updates required.
149
149
  - Add new test examples if patterns changed
150
150
  - Maintain existing testing strategy
151
151
 
152
- 2. **Update `analysis.json`:**
152
+ 2. **Update `docs-analysis.json`:**
153
153
 
154
- - Save current state to `.ai-flow/analysis.json`
154
+ - Save current state to `.ai-flow/cache/docs-analysis.json`
155
155
  - Update timestamp
156
156
  - Include all detected changes in metadata
157
157
 
@@ -176,7 +176,7 @@ No updates required.
176
176
  - Added dependency "@tanstack/react-query"
177
177
  - Updated tools section
178
178
 
179
- ✅ analysis.json updated with new state
179
+ docs-analysis.json updated with new state
180
180
  ```
181
181
 
182
182
  ### Step 5: Handle Cancellation
@@ -299,7 +299,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
299
299
 
300
300
  3. **Update Analysis File:**
301
301
 
302
- - Always update `.ai-flow/analysis.json` after document updates
302
+ - Always update `.ai-flow/cache/docs-analysis.json` after document updates
303
303
  - Include timestamp and change summary
304
304
  - Save complete current state for next comparison
305
305
 
@@ -515,7 +515,7 @@ graph TB
515
515
 
516
516
  5. **Error Handling:**
517
517
  - If document doesn't exist, create it following template
518
- - If analysis.json is corrupted, regenerate it
518
+ - If docs-analysis.json is corrupted, regenerate it
519
519
  - If comparison fails, show error and suggest full Phase 0 re-run
520
520
 
521
521
  ---
@@ -549,7 +549,7 @@ AI:
549
549
  - Added new Zustand store (useCartStore)
550
550
  - Updated state management patterns section
551
551
 
552
- ✅ analysis.json updated with new state
552
+ docs-analysis.json updated with new state
553
553
 
554
554
  Documentation synchronized successfully.
555
555
  ```
@@ -10,7 +10,7 @@ Your mission is to detect changes in the mobile codebase and update the project
10
10
 
11
11
  ### Objective
12
12
 
13
- Detect changes in the mobile codebase compared to the last documented state (stored in `.ai-flow/analysis.json`) and update all affected documentation files automatically.
13
+ Detect changes in the mobile codebase compared to the last documented state (stored in `.ai-flow/cache/docs-analysis.json`) and update all affected documentation files automatically.
14
14
 
15
15
  ---
16
16
 
@@ -19,12 +19,12 @@ Detect changes in the mobile codebase compared to the last documented state (sto
19
19
  ### Step 1: Check for Analysis File
20
20
 
21
21
  ```
22
- First, check if `.ai-flow/analysis.json` exists:
22
+ First, check if `.ai-flow/cache/docs-analysis.json` exists:
23
23
 
24
24
  - ✅ If exists → Proceed to Step 2 (Compare Changes)
25
25
  - ❌ If NOT exists → Execute full Phase 0 analysis first:
26
26
  - Run complete mobile code analysis (as described in Phase 0)
27
- - Create `.ai-flow/analysis.json` with current state
27
+ - Create `.ai-flow/cache/docs-analysis.json` with current state
28
28
  - Then proceed to Step 2
29
29
  ```
30
30
 
@@ -47,7 +47,7 @@ First, check if `.ai-flow/analysis.json` exists:
47
47
 
48
48
  2. **Compare with Previous State:**
49
49
 
50
- - Load `.ai-flow/analysis.json`
50
+ - Load `.ai-flow/cache/docs-analysis.json`
51
51
  - Compare current state vs previous state
52
52
  - Detect changes in:
53
53
  - **Screens:** New, modified, or deleted screens
@@ -173,9 +173,9 @@ No updates required.
173
173
  - Update app store configuration if app.json or build config changed
174
174
  - Maintain existing configuration
175
175
 
176
- 2. **Update `analysis.json`:**
176
+ 2. **Update `docs-analysis.json`:**
177
177
 
178
- - Save current state to `.ai-flow/analysis.json`
178
+ - Save current state to `.ai-flow/cache/docs-analysis.json`
179
179
  - Update timestamp
180
180
  - Include all detected changes in metadata
181
181
 
@@ -208,7 +208,7 @@ No updates required.
208
208
  📝 specs/build-configuration.md
209
209
  - Updated build.gradle configuration
210
210
 
211
- ✅ analysis.json updated with new state
211
+ docs-analysis.json updated with new state
212
212
  ```
213
213
 
214
214
  ### Step 5: Handle Cancellation
@@ -360,7 +360,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
360
360
 
361
361
  3. **Update Analysis File:**
362
362
 
363
- - Always update `.ai-flow/analysis.json` after document updates
363
+ - Always update `.ai-flow/cache/docs-analysis.json` after document updates
364
364
  - Include timestamp and change summary
365
365
  - Save complete current state for next comparison
366
366
 
@@ -588,7 +588,7 @@ graph TB
588
588
 
589
589
  5. **Error Handling:**
590
590
  - If document doesn't exist, create it following template
591
- - If analysis.json is corrupted, regenerate it
591
+ - If docs-analysis.json is corrupted, regenerate it
592
592
  - If comparison fails, show error and suggest full Phase 0 re-run
593
593
 
594
594
  ---
@@ -622,7 +622,7 @@ AI:
622
622
  - Added new permission (Location)
623
623
  - Updated permission handling section
624
624
 
625
- ✅ analysis.json updated with new state
625
+ docs-analysis.json updated with new state
626
626
 
627
627
  Documentation synchronized successfully.
628
628
  ```
@@ -233,4 +233,4 @@ See `README.md` for installation and setup instructions.
233
233
 
234
234
  **Last Updated:** {{GENERATION_DATE}}
235
235
 
236
- **Generated by:** AI Flow v2.1.1
236
+ **Generated by:** AI Flow v2.1.2