ai-flow-dev 2.1.6 → 2.1.8

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.
@@ -1,15 +1,19 @@
1
+ ---
2
+ description: Documentation Sync & Update Flow
3
+ ---
4
+
1
5
  # AI Flow - Documentation Update Command (Frontend)
2
6
 
3
7
  **YOU ARE AN EXPERT FRONTEND ARCHITECT AND DOCUMENTATION SPECIALIST.**
4
8
 
5
9
  Your mission is to detect changes in the frontend codebase and update the project documentation automatically when the user executes `/flow-docs-sync`.
6
- ---
10
+ ---
7
11
  ## Command: `/flow-docs-sync`
8
12
 
9
13
  ### Objective
10
14
 
11
15
  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.
12
- ---
16
+ ---
13
17
  ## Execution Flow
14
18
 
15
19
  ### Step 1: Check for Analysis File
@@ -182,7 +186,7 @@ No updates required.
182
186
  ```
183
187
  Update cancelled. Run `/flow-docs-sync` when you're ready to update the documentation.
184
188
  ```
185
- ---
189
+ ---
186
190
  ## Change Detection Rules
187
191
 
188
192
  ### Components Detection
@@ -274,7 +278,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
274
278
 
275
279
  - Add new variables to configuration spec
276
280
  - Maintain existing variables
277
- ---
281
+ ---
278
282
  ## Important Rules
279
283
 
280
284
  1. **Incremental Updates Only:**
@@ -300,7 +304,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
300
304
  - Regenerate component architecture diagrams when structure changes
301
305
  - Regenerate architecture diagrams when structure changes
302
306
  - Use mermaid format for all diagrams
303
- ---
307
+ ---
304
308
  ## 📊 FRONTEND DIAGRAM REGENERATION GUIDELINES
305
309
 
306
310
  When regenerating frontend diagrams, follow these **critical** formatting rules:
@@ -354,7 +358,7 @@ graph TD
354
358
  style Btn fill:#fce4ec
355
359
  ```
356
360
  ````
357
- ---
361
+ ---
358
362
  ### State Management Diagrams (state-management.md)
359
363
 
360
364
  **Diagram Types:** `graph LR`, `sequenceDiagram`, `graph TD`
@@ -398,7 +402,7 @@ sequenceDiagram
398
402
  Component-->>User: UI Updated
399
403
  ```
400
404
  ````
401
- ---
405
+ ---
402
406
  ### Routing Diagrams (architecture.md or routing.md)
403
407
 
404
408
  **Diagram Type:** `graph TD`
@@ -417,7 +421,7 @@ sequenceDiagram
417
421
  - [ ] Nested routes show parent-child relationships
418
422
  - [ ] Route parameters are documented
419
423
  - [ ] Diagram matches actual router configuration
420
- ---
424
+ ---
421
425
  ### Application Architecture Diagram (architecture.md)
422
426
 
423
427
  **Diagram Type:** `graph TB`
@@ -458,7 +462,7 @@ graph TB
458
462
  ````
459
463
 
460
464
  **Use for:** System architecture overview, integration documentation, onboarding
461
- ---
465
+ ---
462
466
  ### Common Formatting Rules (ALL Frontend Diagrams)
463
467
 
464
468
  **CRITICAL - Code Fence Syntax:**
@@ -492,12 +496,12 @@ graph TB
492
496
  3. Maintain existing styling and layout patterns
493
497
  4. Update relationships based on code changes
494
498
  5. Verify entire diagram still renders after changes
495
- ---
499
+ ---
496
500
  5. **Error Handling:**
497
501
  - If document doesn't exist, create it following template
498
502
  - If docs-analysis.json is corrupted, regenerate it
499
503
  - If comparison fails, show error and suggest full Phase 0 re-run
500
- ---
504
+ ---
501
505
  ## Example Execution
502
506
 
503
507
  ```
@@ -531,7 +535,7 @@ AI:
531
535
 
532
536
  Documentation synchronized successfully.
533
537
  ```
534
- ---
538
+ ---
535
539
  **BEGIN EXECUTION when user runs `/flow-docs-sync`**
536
540
 
537
541
 
@@ -1,21 +1,157 @@
1
1
  # Phase 1: Platform & Framework Selection
2
2
 
3
3
  **Duration:** 20-25 minutes
4
- **Questions:** ~15 questions
4
+ **Questions:** ~17 questions
5
5
  **Output:** project-brief.md, parts of AGENT.md, parts of ai-instructions.md
6
- ---
6
+ ---
7
7
  ## 🎯 Objective
8
8
 
9
- Determine the **technical foundation** for your mobile application:
9
+ Determine the **business goal and technical foundation** for your mobile application:
10
10
 
11
- 1. What platforms will you target?
12
- 2. What framework will you use?
13
- 3. What minimum OS versions will you support?
14
- 4. What development tools and languages?
15
- ---
11
+ 1. What is the core goal and purpose of the project?
12
+ 2. What platforms will you target?
13
+ 3. What framework will you use?
14
+ 4. What minimum OS versions will you support?
15
+ 5. What development tools and languages?
16
+ ---
16
17
  ## 📋 Questions
17
18
 
18
- ### Question 1.1: Target Platforms
19
+ ### Question 1.1: Project Name & Description (with Smart Refinement)
20
+
21
+ > **🧠 Intelligent Refinement System**: This question detects vague descriptions and guides the developer to enrich them. It only asks what's missing and responds in the developer's language.
22
+
23
+ ```
24
+ What is the project name?
25
+
26
+ Provide an initial description of your project.
27
+ (Don't worry about perfection - we'll refine it together if needed!)
28
+
29
+ Example: "A native iOS app for tracking wildlife sightings in the Amazon"
30
+ ```
31
+
32
+ **🔍 AI Internal: Ambiguity Analysis**
33
+
34
+ After receiving the description, silently analyze for these criteria:
35
+
36
+ | Criterion | Check For | Score +1 if present |
37
+ |-----------|-----------|---------------------|
38
+ | **WHO** | Specific user type mentioned (not just "users") | "tourists", "researchers", "drivers" |
39
+ | **WHAT** | Specific action/function (not just "app", "system") | "scan barcodes", "record audio", "track GPS" |
40
+ | **WHY** | Purpose or value mentioned | "to protect species", "to optimize routes" |
41
+ | **DOMAIN** | Industry/vertical indicated | "environmental", "logistics", "social" |
42
+ | **DETAIL** | Description has 10+ meaningful words | Not counting articles |
43
+
44
+ **Scoring Rules:**
45
+ - Score 4-5: ✅ Accept immediately → Proceed to 1.2
46
+ - Score 0-3: ⚠️ Enter refinement loop → Ask ONLY missing criteria
47
+
48
+ ---
49
+
50
+ **🔄 Conditional Refinement Loop (only if score < 4)**
51
+
52
+ > **CRITICAL**: Only ask about criteria that are MISSING. Do NOT repeat questions already answered. Respond in the SAME LANGUAGE the developer used.
53
+
54
+ ```
55
+ [LANGUAGE: Match the developer's language]
56
+
57
+ 🔍 I'd like to understand your project better.
58
+
59
+ Your description: "[original description]"
60
+
61
+ [ONLY show questions for MISSING criteria:]
62
+
63
+ [If WHO is missing:]
64
+ 1️⃣ WHO will use this mobile app?
65
+ A) End consumers (App Store/Play Store)
66
+ B) Internal employees (Enterprise)
67
+ C) Partners/Contractors
68
+ D) Other: __
69
+
70
+ [If WHAT is missing:]
71
+ 2️⃣ WHAT is the core mobile action users will perform?
72
+ A) Transactional (Buy/Sell)
73
+ B) Utility (Tools/Monitoring)
74
+ C) Social (Chat/Share)
75
+ D) Media (Photo/Video)
76
+ E) Informational (News/Content)
77
+ F) Other: __
78
+
79
+ [If WHY is missing:]
80
+ 3️⃣ WHY is this mobile project needed?
81
+ A) New product launch
82
+ B) Companion to web app
83
+ C) Offline-first requirement
84
+ D) Better mobile performance
85
+ E) Other: __
86
+
87
+ [If DOMAIN is missing:]
88
+ 4️⃣ What INDUSTRY/DOMAIN is this for?
89
+ A) E-commerce/Retail
90
+ B) Fitness/Health
91
+ C) Finance/Payments
92
+ D) Education/Learning
93
+ E) Social/Community
94
+ F) Business tools (CRM, ERP)
95
+ G) Other: __
96
+
97
+ Your answers: __
98
+ ```
99
+
100
+ ---
101
+
102
+ **✨ Generate Professional Description Options**
103
+
104
+ After gathering missing info, generate 3 polished versions:
105
+
106
+ ```
107
+ [LANGUAGE: Match the developer's language]
108
+
109
+ ✨ Based on your input, here are 3 professional descriptions:
110
+
111
+ A) Concise (for App Store subtitle):
112
+ "[Generated 1-line description]"
113
+
114
+ B) Descriptive (for README.md):
115
+ "[Generated 2-3 line description with Mobile focus]"
116
+
117
+ C) User-centric (for Marketing):
118
+ "[Generated benefit-driven description]"
119
+
120
+ Which do you prefer? (1-3, or 4 to edit, 5 to start over)
121
+ ```
122
+
123
+ **Your choice:**
124
+
125
+ ---
126
+
127
+ ### Question 1.2: Project Overview (Confirmation + Expansion)
128
+
129
+ > **📌 Smart Skip**: If 1.1 already captured WHO/WHAT/WHY completely, this becomes a quick confirmation.
130
+
131
+ ```
132
+ [If 1.1 refinement was complete (score >= 4), show:]
133
+
134
+ ✅ Based on your description, I understand:
135
+ • Users: [WHO from 1.1]
136
+ • Goal: [WHAT from 1.1]
137
+ • Need: [WHY from 1.1]
138
+
139
+ Is this correct? (Y) Or would you like to add more context? (N)
140
+
141
+ ---
142
+
143
+ [If 1.1 was NOT refined OR missing elements, ask:]
144
+
145
+ Briefly describe the core problem this app solves:
146
+ - Who are the primary users?
147
+ - What is the main benefit?
148
+ - Why build a mobile app instead of a web app?
149
+ ```
150
+
151
+ **Your answer:**
152
+
153
+ ---
154
+ ### Question 1.3: Target Platforms
19
155
 
20
156
  **What platforms will your app support?**
21
157
 
@@ -44,8 +180,8 @@ D) **iOS + Android + Web (Universal)**
44
180
  - Best for: Multi-platform presence
45
181
 
46
182
  **Your answer:**
47
- ---
48
- ### Question 1.2: Mobile Framework
183
+ ---
184
+ ### Question 1.4: Mobile Framework
49
185
 
50
186
  **What framework will you use to build your mobile app?**
51
187
 
@@ -100,8 +236,8 @@ D) **iOS + Android + Web (Universal)**
100
236
 
101
237
  - What Flutter version? (Latest stable recommended)
102
238
  - Will you use Flutter for Web/Desktop too? (Y/n)
103
- ---
104
- ### Question 1.3: Minimum OS Versions
239
+ ---
240
+ ### Question 1.5: Minimum OS Versions
105
241
 
106
242
  **What minimum OS versions will you support?**
107
243
 
@@ -150,8 +286,8 @@ D) **iOS + Android + Web (Universal)**
150
286
  - Best for: Premium apps, latest tech
151
287
 
152
288
  **Your answer:**
153
- ---
154
- ### Question 1.4: Programming Language
289
+ ---
290
+ ### Question 1.6: Programming Language
155
291
 
156
292
  **What programming language will you use?**
157
293
 
@@ -192,8 +328,8 @@ D) **iOS + Android + Web (Universal)**
192
328
  - Best for: Maintaining existing apps
193
329
 
194
330
  **Your answer:**
195
- ---
196
- ### Question 1.5: Development Environment
331
+ ---
332
+ ### Question 1.7: Development Environment
197
333
 
198
334
  **What development tools will you use?**
199
335
 
@@ -222,8 +358,8 @@ D) **iOS + Android + Web (Universal)**
222
358
  - **Dart DevTools** - Debugging (Flutter)
223
359
 
224
360
  **Your answer:**
225
- ---
226
- ### Question 1.6: Package Manager
361
+ ---
362
+ ### Question 1.8: Package Manager
227
363
 
228
364
  **What package manager will you use?**
229
365
 
@@ -246,8 +382,8 @@ D) **iOS + Android + Web (Universal)**
246
382
  - **Gradle** (built-in)
247
383
 
248
384
  **Your answer:**
249
- ---
250
- ### Question 1.7: Build Tools & CI/CD
385
+ ---
386
+ ### Question 1.9: Build Tools & CI/CD
251
387
 
252
388
  **What build and deployment tools will you use?**
253
389
 
@@ -278,8 +414,8 @@ E) **Manual Builds**
278
414
  - Best for: Learning, small projects
279
415
 
280
416
  **Your answer:**
281
- ---
282
- ### Question 1.8: Code Signing Strategy
417
+ ---
418
+ ### Question 1.10: Code Signing Strategy
283
419
 
284
420
  **How will you handle code signing?**
285
421
 
@@ -304,8 +440,8 @@ E) **Manual Builds**
304
440
  - Required for some enterprise scenarios
305
441
 
306
442
  **Your answer:**
307
- ---
308
- ### Question 1.9: App Store Accounts
443
+ ---
444
+ ### Question 1.11: App Store Accounts
309
445
 
310
446
  **Do you have App Store accounts set up?**
311
447
 
@@ -321,8 +457,8 @@ E) **Manual Builds**
321
457
  - B) ❌ **No, will set up later**
322
458
 
323
459
  **Your answer:**
324
- ---
325
- ### Question 1.10: Beta Testing Strategy
460
+ ---
461
+ ### Question 1.12: Beta Testing Strategy
326
462
 
327
463
  **How will you handle beta testing?**
328
464
 
@@ -347,8 +483,8 @@ D) **No Beta Testing**
347
483
  - Best for: MVPs, internal apps
348
484
 
349
485
  **Your answer:**
350
- ---
351
- ### Question 1.11: Analytics & Crash Reporting
486
+ ---
487
+ ### Question 1.13: Analytics & Crash Reporting
352
488
 
353
489
  **What analytics and crash reporting will you use?**
354
490
 
@@ -374,8 +510,8 @@ D) **No Analytics**
374
510
  - Best for: Privacy-critical apps
375
511
 
376
512
  **Your answer:**
377
- ---
378
- ### Question 1.12: UI/UX Framework
513
+ ---
514
+ ### Question 1.14: UI/UX Framework
379
515
 
380
516
  **What UI/UX framework or design system will you use?**
381
517
 
@@ -422,8 +558,8 @@ D) **No Analytics**
422
558
 
423
559
  - Will you use platform-specific UI? (iOS uses Cupertino, Android uses Material)
424
560
  - Or unified design across platforms?
425
- ---
426
- ### Question 1.13: Theme & Dark Mode
561
+ ---
562
+ ### Question 1.15: Theme & Dark Mode
427
563
 
428
564
  **Will your app support dark mode?**
429
565
 
@@ -443,8 +579,8 @@ C) **No Dark Mode**
443
579
  - Best for: Simple apps
444
580
 
445
581
  **Your answer:**
446
- ---
447
- ### Question 1.14: Internationalization (i18n)
582
+ ---
583
+ ### Question 1.16: Internationalization (i18n)
448
584
 
449
585
  **Will your app support multiple languages?**
450
586
 
@@ -471,8 +607,8 @@ C) **No Internationalization**
471
607
  - React Native: react-i18next, react-native-localize
472
608
  - Flutter: intl, easy_localization
473
609
  - Native: NSLocalizedString (iOS), Resources (Android)
474
- ---
475
- ### Question 1.15: Image & Asset Management
610
+ ---
611
+ ### Question 1.17: Image & Asset Management
476
612
 
477
613
  **How will you handle images and assets?**
478
614
 
@@ -500,48 +636,46 @@ C) **All Remote Images**
500
636
  - React Native: react-native-fast-image, react-native-image-caching
501
637
  - Flutter: cached_network_image
502
638
  - Native: SDWebImage (iOS), Glide (Android)
503
- ---
639
+ ---
504
640
  ## ✅ Phase 1 Completion
505
641
 
506
642
  After answering all questions, summarize:
507
643
 
508
644
  ```
509
- ---
645
+ ---
510
646
  ✅ Phase 1 Complete: Platform & Framework Selection
511
- ---
647
+ ---
648
+ Project Name: [Answer from 1.1]
649
+ Project Description: [Answer from 1.1]
512
650
  Selected Stack:
513
- - Platforms: iOS + Android
514
- - Framework: React Native 0.72.0
515
- - Language: TypeScript
516
- - Minimum iOS: 15.0+
517
- - Minimum Android: API 26 (Android 8.0)+
518
- - Package Manager: npm
519
- - Build Tools: Fastlane
520
- - Analytics: Firebase Analytics + Crashlytics
521
- - UI Framework: React Native Paper
522
- - Dark Mode: System Theme
523
- - Internationalization: Multiple Languages (react-i18next)
524
- - Image Management: Local Assets + Remote Images
651
+ - Platforms: [Answer from 1.3]
652
+ - Framework: [Answer from 1.4]
653
+ - Language: [Answer from 1.6]
654
+ - Minimum iOS: [Answer from 1.5]
655
+ - Minimum Android: [Answer from 1.5]
656
+ - Package Manager: [Answer from 1.8]
657
+ - Build Tools: [Answer from 1.9]
658
+ - Analytics: [Answer from 1.13]
659
+ - UI Framework: [Answer from 1.14]
660
+ - Dark Mode: [Answer from 1.15]
661
+ - Internationalization: [Answer from 1.16]
662
+ - Image Management: [Answer from 1.17]
525
663
 
526
664
  Proceed to Phase 2 (Navigation & Architecture)? (Y/n)
527
665
  ```
528
- ---
666
+ ---
529
667
  ## 📝 Generated Documents
530
668
 
531
669
  After Phase 1, generate/update:
532
670
 
533
- - `project-brief.md` - Add platform and framework information
671
+ - `project-brief.md` - Add project goal, platforms, and framework information
534
672
  - `AGENT.md` - Update technical context section
535
673
  - `ai-instructions.md` - Add framework-specific rules and setup
536
- ---
674
+ ---
537
675
  **Next Phase:** Phase 2 - Navigation & Architecture
538
676
 
539
677
  Read: `.ai-flow/prompts/mobile/flow-build-phase-2-navigation.md`
540
- ---
541
- **Last Updated:** 2025-01-XX
542
-
543
- **Version:** 1.4.0
544
-
545
-
546
-
678
+ ---
679
+ **Last Updated:** 2025-12-XX
547
680
 
681
+ **Version:** 1.5.0