ai-flow-dev 2.1.7 → 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.
package/README.md CHANGED
@@ -10,7 +10,8 @@ AI Flow is an interactive CLI that creates comprehensive professional documentat
10
10
 
11
11
  **Key Features:**
12
12
 
13
- - 🚀 Complete professional documentation (Backend: 17 docs, Frontend: 15 docs, Mobile: 13 docs, Fullstack: 4 docs)
13
+ - 🚀 Complete professional documentation (Backend: 15 docs, Frontend: 16 docs, Mobile: 14 docs, Fullstack: 4 docs)
14
+ - 🧠 **Smart Description Refinement:** Detects ambiguity and iteratively guides you to a professional project definition.
14
15
  - ⚡ **Two modes:** Interactive (90-120 min, full control) or Smart Auto-Suggest (15-25 min, 6 questions)
15
16
  - 🌍 Universal support - 12 languages, 60+ frameworks, 35+ ORMs (98% coverage)
16
17
  - 🤖 Multi-AI support with slash commands
@@ -37,7 +38,8 @@ Transforma tu idea en un proyecto listo para producción y documentado para IA e
37
38
 
38
39
  **Características:**
39
40
 
40
- - 🚀 Documentación profesional completa (Backend: 17 docs, Frontend: 15 docs, Mobile: 13 docs, Fullstack: 4 docs)
41
+ - 🚀 Documentación profesional completa (Backend: 15 docs, Frontend: 16 docs, Mobile: 14 docs, Fullstack: 4 docs)
42
+ - 🧠 **Refinamiento Inteligente:** Detecta ambigüedad y te guía iterativamente hacia una descripción profesional.
41
43
  - ⚡ **Dos modos:** Interactivo (90-120 min, control total) o Auto-Sugerido (15-25 min, 6 preguntas)
42
44
  - 🌍 Soporte universal - 12 lenguajes, 60+ frameworks, 35+ ORMs
43
45
  - 🤖 Compatible with Claude, Copilot, Cursor, Gemini, Antigravity
@@ -63,7 +65,8 @@ ai-flow init .
63
65
  Transforme sua ideia em um projeto pronto para produção e documentado para IA em minutos.
64
66
  **Características:**
65
67
 
66
- - 🚀 Documentação profissional completa (Backend: 17, Frontend: 15, Mobile: 13, Fullstack: 4 docs)
68
+ - 🚀 Documentação profissional completa (Backend: 15, Frontend: 16, Mobile: 14, Fullstack: 4 docs)
69
+ - 🧠 **Refinamento Inteligente:** Detecta ambiguidade e guia você para uma descrição profissional.
67
70
  - ⚡ **Dois modos:** Interactivo (90-120 min, controle total) ou Auto-Sugestão (15-25 min, 6 perguntas)
68
71
  - 🌍 Suporte universal - 12 linguagens, 60+ frameworks, 35+ ORMs
69
72
  - 🤖 Compatível com Claude, Copilot, Cursor, Gemini, Antigravity
@@ -102,9 +105,10 @@ The result is interconnected documentation that guides AI assistants and human d
102
105
 
103
106
  - 🌍 **Universal Support** - 12 languages, 60+ frameworks, 35+ ORMs (98% coverage)
104
107
  - 🤖 **AI-Agnostic** - Claude, Copilot, Cursor, Gemini, Antigravity, any AI tool
105
- - 📚 **Professional Documentation** - Backend: 17, Frontend: 15, Mobile: 13, Fullstack: 4 docs
108
+ - 📚 **Professional Documentation** - Backend: 15, Frontend: 16, Mobile: 14, Fullstack: 4 docs
109
+ - 🧠 **Smart Description Refinement** - AI detects vague inputs and helps you rich the context (WHO, WHAT, WHY).
106
110
  - ⚡ **Two Questionnaire Modes:**
107
- - **Interactive Mode:** Full control, 71 questions (90-120 min)
111
+ - **Interactive Mode:** Full control, all phases (90-120 min)
108
112
  - **Smart Auto-Suggest:** Only 6 critical questions, AI suggests best practices (15-25 min)
109
113
  - 🔍 **Smart 3-Layer Detection** - Analyzes existing projects in 15s-5min
110
114
  - 💾 **Intelligent Caching** - 0 seconds on re-runs with no changes
@@ -258,9 +262,9 @@ After initialization, use these slash commands in your AI tool:
258
262
 
259
263
  > **Note:** Command prefix may vary by AI tool. Examples use `/flow-` (GitHub Copilot), but Claude may use `/` alone, Cursor may use `@`, etc. Check your tool's documentation.
260
264
 
261
- **Backend Projects:** 8 commands
262
- **Frontend Projects:** 2 commands
263
- **Mobile Projects:** 2 commands
265
+ **Backend Projects:** 19 commands
266
+ **Frontend Projects:** 11 commands
267
+ **Mobile Projects:** 11 commands
264
268
  **Fullstack Projects:** Combined backend + frontend commands
265
269
 
266
270
  **Documentation & Build:**
@@ -334,11 +338,11 @@ After initialization, use these slash commands in your AI tool:
334
338
 
335
339
  ## 🎯 Generated Documentation
336
340
 
337
- **Backend** (17 docs): AGENT.md, ai-instructions.md, copilot-instructions.md, project-brief.md, README.md, plus 8 technical docs and 2 specs
341
+ **Backend** (15 docs): AGENT.md, ai-instructions.md, project-brief.md, plus 12 technical docs/specs.
338
342
 
339
- **Frontend** (15 docs): AGENT.md, ai-instructions.md, project-brief.md, plus 9 technical docs and 3 specs
343
+ **Frontend** (16 docs): AGENT.md, ai-instructions.md, project-brief.md, plus 13 technical docs/specs.
340
344
 
341
- **Mobile** (13 docs): AGENT.md, ai-instructions.md, project-brief.md, plus 8 technical docs and 2 specs
345
+ **Mobile** (14 docs): AGENT.md, ai-instructions.md, project-brief.md, plus 11 technical docs/specs.
342
346
 
343
347
  **Fullstack** (4 docs): AGENT.md, ai-instructions.md, project-brief.md, plus 1 spec
344
348
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-flow-dev",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance throughout your project lifecycle.",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -4,7 +4,9 @@
4
4
 
5
5
  > **📌 Note:** If Phase 0 was executed, some questions may already be answered. Skip those and only ask what's missing.
6
6
 
7
- **1.1 Project Name & Description**
7
+ **1.1 Project Name & Description (with Smart Refinement)**
8
+
9
+ > **🧠 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.
8
10
 
9
11
  ```
10
12
  [If detected from Phase 0, show:]
@@ -17,26 +19,178 @@ If no, please provide correct values.
17
19
  [If NOT detected, ask:]
18
20
  What is the project name?
19
21
 
20
- Provide a short description (1 sentence) for README and package.json
22
+ Provide an initial description of your project.
23
+ (Don't worry about perfection - we'll refine it together if needed!)
24
+
25
+ Example: "A backend for managing gym memberships"
26
+ ```
27
+
28
+ **🔍 AI Internal: Ambiguity Analysis**
29
+
30
+ After receiving the description, silently analyze for these criteria:
31
+
32
+ | Criterion | Check For | Score +1 if present |
33
+ |-----------|-----------|---------------------|
34
+ | **WHO** | Specific user type mentioned (not just "users") | "gym members", "restaurant owners" |
35
+ | **WHAT** | Specific action/function (not just "manage") | "track workouts", "process payments" |
36
+ | **WHY** | Purpose or value mentioned | "to replace spreadsheets", "to launch app" |
37
+ | **DOMAIN** | Industry/vertical indicated | "fitness", "fintech", "healthcare" |
38
+ | **DETAIL** | Description has 10+ meaningful words | Not counting articles |
39
+
40
+ **Scoring Rules:**
41
+ - Score 4-5: ✅ Accept immediately → Proceed to 1.2
42
+ - Score 0-3: ⚠️ Enter refinement loop → Ask ONLY missing criteria
43
+
44
+ ---
45
+
46
+ **🔄 Conditional Refinement Loop (only if score < 4)**
47
+
48
+ > **CRITICAL**: Only ask about criteria that are MISSING. Do NOT repeat questions already answered. Respond in the SAME LANGUAGE the developer used.
49
+
50
+ ```
51
+ [LANGUAGE: Match the developer's language]
52
+
53
+ 🔍 I'd like to understand your project better.
54
+
55
+ Your description: "[original description]"
56
+
57
+ [ONLY show questions for MISSING criteria:]
58
+
59
+ [If WHO is missing:]
60
+ 1️⃣ WHO will use this system?
61
+ A) End consumers (B2C)
62
+ B) Business users (B2B)
63
+ C) Internal team
64
+ D) Other systems (APIs)
65
+ E) Other: __
66
+
67
+ [If WHAT is missing:]
68
+ 2️⃣ WHAT is the core action users will perform?
69
+ A) Buy/sell products or services
70
+ B) Manage/organize information
71
+ C) Communicate/collaborate
72
+ D) Monitor/analyze data
73
+ E) Create/publish content
74
+ F) Other: __
75
+
76
+ [If WHY is missing:]
77
+ 3️⃣ WHY is this project needed?
78
+ A) Replace manual/legacy process
79
+ B) Launch new product/business
80
+ C) Improve existing system
81
+ D) Enable new capability
82
+ E) Other: __
83
+
84
+ [If DOMAIN is missing:]
85
+ 4️⃣ What INDUSTRY/DOMAIN is this for?
86
+ A) E-commerce/Retail
87
+ B) Fitness/Health
88
+ C) Finance/Payments
89
+ D) Education
90
+ E) Social/Community
91
+ F) Business tools (CRM, ERP)
92
+ G) Other: __
93
+
94
+ Your answers: __ (e.g., "A, B, A, E" or describe freely)
95
+ ```
96
+
97
+ ---
98
+
99
+ **✨ Generate Professional Description Options**
100
+
101
+ After gathering missing info, generate 3 polished versions:
102
+
21
103
  ```
104
+ [LANGUAGE: Match the developer's language]
105
+
106
+ ✨ Based on your input, here are 3 professional descriptions:
107
+
108
+ A) Concise (for package.json):
109
+ "[Generated 1-line description with WHO + WHAT]"
22
110
 
23
- **1.2 Project Overview**
111
+ B) Descriptive (for README.md):
112
+ "[Generated 2-3 line description with WHO + WHAT + WHY]"
24
113
 
114
+ C) Technical (for AGENT.md):
115
+ "[Generated technical description with DOMAIN + WHAT]"
116
+
117
+ Which do you prefer? (1-3, or 4 to edit, 5 to start over)
25
118
  ```
26
- What problem does this backend system solve?
27
119
 
28
- Describe in 2-3 sentences:
29
- - Who are the users?
30
- - What is the core value proposition?
31
- - What makes this project necessary?
120
+ ---
121
+
122
+ **✅ Final Confirmation**
123
+
124
+ ```
125
+ ✅ Your final project description:
126
+
127
+ 📋 Name: [project name]
128
+ 📝 Description: "[final polished description]"
129
+
130
+ Proceed to next question? (Y to continue)
131
+ ```
132
+
133
+ ---
134
+
135
+ **1.2 Project Overview (Confirmation + Expansion)**
136
+
137
+ > **📌 Smart Skip**: If 1.1 already captured WHO/WHAT/WHY completely, this becomes a quick confirmation.
138
+
139
+ ```
140
+ [If 1.1 refinement was complete (score >= 4), show:]
141
+
142
+ ✅ Based on your description, I understand:
143
+ • Users: [WHO from 1.1]
144
+ • Core Action: [WHAT from 1.1]
145
+ • Purpose: [WHY from 1.1]
146
+
147
+ Is this complete? (Y) Or would you like to add more context? (N)
148
+
149
+ [If user says Y → Skip to 1.3]
150
+ [If user says N → Ask:]
151
+ What additional context would you like to add?
152
+
153
+ ---
154
+
155
+ [If 1.1 was NOT refined OR any WHO/WHAT/WHY still missing, ask:]
156
+
157
+ [ONLY ask for MISSING elements - check what was NOT captured in 1.1:]
158
+
159
+ [If WHO still unclear:]
160
+ Who are the primary users of this system?
161
+
162
+ [If WHAT still unclear:]
163
+ What is the core value proposition?
164
+
165
+ [If WHY still unclear:]
166
+ What makes this project necessary?
32
167
 
33
168
  Example:
34
169
  "A backend for a fitness tracking mobile app used by gym-goers (users). It allows users to log workouts, track progress over time, and share achievements with friends (value). This project is necessary to replace our legacy spreadsheet-based system and support our new iOS app launch."
35
170
  ```
36
171
 
37
- **1.3 Target Users**
172
+ **1.3 Target Users (Confirmation + Additional Types)**
173
+
174
+ > **📌 Smart Skip**: If 1.1 already identified user types, this confirms and expands.
38
175
 
39
176
  ```
177
+ [If WHO was captured in 1.1, show:]
178
+
179
+ ✅ Based on your description, your target users are: [WHO from 1.1]
180
+
181
+ Would you like to add any additional user types? Select any that apply:
182
+
183
+ A) 🌐 External end-users (B2C) - Public-facing application
184
+ B) 🏢 Internal employees (B2B/Enterprise) - Company internal tool
185
+ C) 🔌 Other systems/services (API consumers) - Integration platform
186
+ D) 👥 Partners/Third-parties - Partner ecosystem
187
+ E) 📱 Mobile/Web apps - Backend for frontend
188
+ F) ✅ No additional users - [WHO from 1.1] is complete
189
+
190
+ ---
191
+
192
+ [If WHO was NOT captured in 1.1, ask normally:]
193
+
40
194
  Who will use this system? Select all that apply:
41
195
 
42
196
  A) 🌐 External end-users (B2C) - Public-facing application
@@ -65,9 +219,24 @@ Your objectives:
65
219
  3.
66
220
  ```
67
221
 
68
- **1.5 System Type**
222
+ **1.5 System Type (Confirmation + Validation)**
223
+
224
+ > **📌 Smart Skip**: If 1.1 already identified the domain/industry, this confirms it.
69
225
 
70
226
  ```
227
+ [If DOMAIN was captured in 1.1, show:]
228
+
229
+ ✅ Based on your description, this appears to be a: [DOMAIN from 1.1] system
230
+
231
+ Is this correct?
232
+
233
+ A) ✅ Yes, that's correct
234
+ B) 🔄 No, it's actually: [show options below]
235
+
236
+ ---
237
+
238
+ [If DOMAIN was NOT captured in 1.1, OR user selected B above:]
239
+
71
240
  What type of system are you building? (This helps suggest common features)
72
241
 
73
242
  A) 🛒 E-commerce/Marketplace
@@ -141,7 +310,7 @@ This helps us focus the documentation on what you're building now, while noting
141
310
  📋 What will you build in this first version? (Select from the features listed above)
142
311
 
143
312
  [Show features from question 1.6 and allow selection]
144
- ---
313
+ ---
145
314
  ⏭️ What will you leave for future versions? (What you're NOT building now)
146
315
 
147
316
  Common things to defer:
@@ -229,7 +398,7 @@ Example:
229
398
  - Invoicing: Invoice generation after purchase.
230
399
 
231
400
  The AI will automatically generate flow diagrams (mermaid) for each documented process.
232
- ---
401
+ ---
233
402
  #### 🎨 MERMAID BUSINESS FLOW DIAGRAM FORMAT - CRITICAL
234
403
 
235
404
  **Use this exact format** for business process flows:
@@ -356,7 +525,7 @@ flowchart TD
356
525
  - Customer Support Ticket Lifecycle
357
526
 
358
527
  **Validation:** Test at https://mermaid.live/ before saving
359
- ---
528
+ ---
360
529
  ```
361
530
 
362
531
  ### Phase 1 Output
@@ -381,7 +550,7 @@ Business Flows: [list of main flows]
381
550
  Is this correct? (Yes/No)
382
551
  If corrections needed, specify which section.
383
552
  ```
384
- ---
553
+ ---
385
554
  ### 📄 Generate Phase 1 Documents
386
555
 
387
556
  **Generate `project-brief.md` automatically:**
@@ -403,11 +572,11 @@ The document has been created with all the information from Phase 1.
403
572
 
404
573
  **If user edits the file:**
405
574
  Execute `read_file('project-brief.md')` to refresh context before continuing.
406
- ---
575
+ ---
407
576
  **Proceed to Phase 2 after document is generated and optionally reviewed.**
408
577
 
409
578
  > ⚠️ **CRITICAL:** DO NOT generate README.md in Phase 1. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
410
- ---
579
+ ---
411
580
  ## PHASE 2: Data Architecture (15-20 min)
412
581
 
413
582
  ````
@@ -1,22 +1,131 @@
1
1
  # Phase 1: Discovery & UX Requirements
2
2
 
3
3
  **Duration:** 15-20 minutes
4
- **Questions:** ~10 questions
4
+ **Questions:** ~11 questions
5
5
  **Output:** project-brief.md, parts of AGENT.md
6
- ---
6
+ ---
7
7
  ## 🎯 Objective
8
8
 
9
- Understand the **user-facing aspects** of the application:
9
+ Understand the **user-facing aspects** and core goal of the application:
10
10
 
11
- 1. What type of application is being built?
12
- 2. Who are the target users?
13
- 3. What are the key user journeys?
14
- 4. What devices and browsers must be supported?
15
- 5. What are the UX priorities?
16
- ---
11
+ 1. What is the core goal and purpose of the project?
12
+ 2. What type of application is being built?
13
+ 3. Who are the target users?
14
+ 4. What are the key user journeys?
15
+ 5. What devices and browsers must be supported?
16
+ 6. What are the UX priorities?
17
+ ---
17
18
  ## 📋 Questions
18
19
 
19
- ### Question 1.1: Application Type
20
+ ### Question 1.1: Project Name & Description (with Smart Refinement)
21
+
22
+ > **🧠 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.
23
+
24
+ ```
25
+ What is the project name?
26
+
27
+ Provide an initial description of your project.
28
+ (Don't worry about perfection - we'll refine it together if needed!)
29
+
30
+ Example: "A frontend dashboard for managing inventory in real-time"
31
+ ```
32
+
33
+ **🔍 AI Internal: Ambiguity Analysis**
34
+
35
+ After receiving the description, silently analyze for these criteria:
36
+
37
+ | Criterion | Check For | Score +1 if present |
38
+ |-----------|-----------|---------------------|
39
+ | **WHO** | Specific user type mentioned (not just "users") | "store managers", "traders", "students" |
40
+ | **WHAT** | Specific action/function (not just "view", "show") | "compare prices", "edit profiles", "visualize data" |
41
+ | **WHY** | Purpose or value mentioned | "to increase conversion", "to save time", "to improve UX" |
42
+ | **DOMAIN** | Industry/vertical indicated | "fintech", "e-commerce", "social media" |
43
+ | **DETAIL** | Description has 10+ meaningful words | Not counting articles |
44
+
45
+ **Scoring Rules:**
46
+ - Score 4-5: ✅ Accept immediately → Proceed to 1.2
47
+ - Score 0-3: ⚠️ Enter refinement loop → Ask ONLY missing criteria
48
+
49
+ ---
50
+
51
+ **🔄 Conditional Refinement Loop (only if score < 4)**
52
+
53
+ > **CRITICAL**: Only ask about criteria that are MISSING. Do NOT repeat questions already answered. Respond in the SAME LANGUAGE the developer used.
54
+
55
+ ```
56
+ [LANGUAGE: Match the developer's language]
57
+
58
+ 🔍 I'd like to understand your project better.
59
+
60
+ Your description: "[original description]"
61
+
62
+ [ONLY show questions for MISSING criteria:]
63
+
64
+ [If WHO is missing:]
65
+ 1️⃣ WHO will use this application?
66
+ A) End consumers (B2C)
67
+ B) Business users (B2B)
68
+ C) Internal team / Admin
69
+ D) Other: __
70
+
71
+ [If WHAT is missing:]
72
+ 2️⃣ WHAT is the core UX action users will perform?
73
+ A) Browse & Shop
74
+ B) Manage & Configure
75
+ C) Read & Consume
76
+ D) Create & Publish
77
+ E) Analyze & Visualize
78
+ F) Other: __
79
+
80
+ [If WHY is missing:]
81
+ 3️⃣ WHY is this project needed?
82
+ A) Launch new product
83
+ B) Replace legacy UI
84
+ C) Better mobile experience
85
+ D) Specific new feature
86
+ E) Other: __
87
+
88
+ [If DOMAIN is missing:]
89
+ 4️⃣ What INDUSTRY/DOMAIN is this for?
90
+ A) E-commerce/Retail
91
+ B) Fitness/Health
92
+ C) Finance/Payments
93
+ D) Education
94
+ E) Social/Community
95
+ F) Business tools (CRM, ERP)
96
+ G) Other: __
97
+
98
+ Your answers: __
99
+ ```
100
+
101
+ ---
102
+
103
+ **✨ Generate Professional Description Options**
104
+
105
+ After gathering missing info, generate 3 polished versions:
106
+
107
+ ```
108
+ [LANGUAGE: Match the developer's language]
109
+
110
+ ✨ Based on your input, here are 3 professional descriptions:
111
+
112
+ A) Concise (for package.json):
113
+ "[Generated 1-line description]"
114
+
115
+ B) Descriptive (for README.md):
116
+ "[Generated 2-3 line description with UX focus]"
117
+
118
+ C) Creative (for Marketing/Landing):
119
+ "[Generated catchy description]"
120
+
121
+ Which do you prefer? (1-3, or 4 to edit, 5 to start over)
122
+ ```
123
+
124
+ **Your choice:**
125
+
126
+ ---
127
+
128
+ ### Question 1.2: Application Type
20
129
 
21
130
  **What type of frontend application are you building?**
22
131
 
@@ -51,10 +160,26 @@ E) **Static Site (SSG)**
51
160
  - Best for: Blogs, documentation, landing pages
52
161
 
53
162
  **Your answer:**
54
- ---
55
- ### Question 1.2: Target Users
163
+ ---
164
+ ### Question 1.3: Target Users (Confirmation + Expansion)
165
+
166
+ ```
167
+ [If WHO was captured in 1.1, show:]
168
+
169
+ ✅ Based on your description, your target users are: [WHO from 1.1]
170
+
171
+ Describe your user personas more deeply (3-5 bullet points):
172
+
173
+ - Demographics (age, tech-savviness, etc.)
174
+ - Use cases / goals
175
+ - Device preferences
176
+ - Accessibility needs
56
177
 
57
- **Who are your primary target users?**
178
+ ---
179
+
180
+ [If WHO was NOT captured in 1.1, ask normally:]
181
+
182
+ Who are your primary target users?
58
183
 
59
184
  Describe your user personas (3-5 bullet points):
60
185
 
@@ -62,6 +187,7 @@ Describe your user personas (3-5 bullet points):
62
187
  - Use cases / goals
63
188
  - Device preferences
64
189
  - Accessibility needs
190
+ ```
65
191
 
66
192
  **Example:**
67
193
 
@@ -73,12 +199,22 @@ Describe your user personas (3-5 bullet points):
73
199
  ```
74
200
 
75
201
  **Your answer:**
76
- ---
77
- ### Question 1.3: Key User Journeys
202
+ ---
203
+ ### Question 1.4: Key User Journeys (Confirmation + Expansion)
204
+
205
+ ```
206
+ [If WHAT was captured in 1.1, show:]
207
+
208
+ ✅ Based on your description, a core journey is: [WHAT from 1.1]
209
+
210
+ What are the 3-5 most critical user flows?
78
211
 
79
- **What are the 3-5 most critical user flows?**
212
+ ---
80
213
 
81
- List the core journeys users will take through your app.
214
+ [If WHAT was NOT captured in 1.1, ask normally:]
215
+
216
+ What are the 3-5 most critical user flows?
217
+ ```
82
218
 
83
219
  **Example:**
84
220
 
@@ -90,8 +226,8 @@ List the core journeys users will take through your app.
90
226
  ```
91
227
 
92
228
  **Your answer:**
93
- ---
94
- ### Question 1.4: Device & Browser Support
229
+ ---
230
+ ### Question 1.5: Device & Browser Support
95
231
 
96
232
  **What devices and browsers must you support?**
97
233
 
@@ -122,8 +258,8 @@ D) **Desktop-First**
122
258
  - Best for: Admin panels, dashboards, B2B tools
123
259
 
124
260
  **Your answer:**
125
- ---
126
- ### Question 1.5: Responsive Strategy
261
+ ---
262
+ ### Question 1.6: Responsive Strategy
127
263
 
128
264
  **How will you handle different screen sizes?**
129
265
 
@@ -150,8 +286,8 @@ D) **Fixed Width (Desktop Only)**
150
286
  - Best for: Internal tools, admin panels (desktop-only users)
151
287
 
152
288
  **Your answer:**
153
- ---
154
- ### Question 1.6: Internationalization (i18n)
289
+ ---
290
+ ### Question 1.7: Internationalization (i18n)
155
291
 
156
292
  **Do you need multi-language support?**
157
293
 
@@ -180,8 +316,8 @@ D) **Right-to-Left (RTL) Support**
180
316
  **Your answer:**
181
317
 
182
318
  **If multi-language selected, list target languages:**
183
- ---
184
- ### Question 1.7: Authentication Requirements
319
+ ---
320
+ ### Question 1.8: Authentication Requirements
185
321
 
186
322
  **What authentication method will you use?**
187
323
 
@@ -219,8 +355,8 @@ F) **No Authentication**
219
355
  - Best for: Marketing sites, public tools
220
356
 
221
357
  **Your answer:**
222
- ---
223
- ### Question 1.8: Data Privacy & Compliance
358
+ ---
359
+ ### Question 1.9: Data Privacy & Compliance
224
360
 
225
361
  **What data privacy requirements do you have?**
226
362
 
@@ -257,8 +393,8 @@ F) **Multiple Regulations**
257
393
  - Most restrictive controls apply
258
394
 
259
395
  **Your answer:**
260
- ---
261
- ### Question 1.9: Offline Support
396
+ ---
397
+ ### Question 1.10: Offline Support
262
398
 
263
399
  **Do users need offline access?**
264
400
 
@@ -287,8 +423,8 @@ D) **Offline-First**
287
423
  - Best for: Mobile apps, unreliable networks
288
424
 
289
425
  **Your answer:**
290
- ---
291
- ### Question 1.10: Performance Priorities
426
+ ---
427
+ ### Question 1.11: Performance Priorities
292
428
 
293
429
  **What are your performance priorities?** (Select top 3)
294
430
 
@@ -327,25 +463,27 @@ F) **Perceived Performance**
327
463
  - Best for: User experience
328
464
 
329
465
  **Your answer (top 3):**
330
- ---
466
+ ---
331
467
  ## 📊 Phase 1 Summary
332
468
 
333
469
  Before proceeding to Phase 2, confirm the following:
334
470
 
335
471
  ```
336
- ---
472
+ ---
337
473
  📋 PHASE 1 SUMMARY: DISCOVERY & UX
338
- ---
339
- Application Type: [Answer from 1.1]
340
- Target Users: [Answer from 1.2]
341
- Key User Journeys: [Answer from 1.3]
342
- Device/Browser Support: [Answer from 1.4]
343
- Responsive Strategy: [Answer from 1.5]
344
- Internationalization: [Answer from 1.6]
345
- Authentication: [Answer from 1.7]
346
- Data Privacy: [Answer from 1.8]
347
- Offline Support: [Answer from 1.9]
348
- Performance Priorities: [Answer from 1.10]
474
+ ---
475
+ Project Name: [Answer from 1.1]
476
+ Project Description: [Answer from 1.1]
477
+ Application Type: [Answer from 1.2]
478
+ Target Users: [Answer from 1.3]
479
+ Key User Journeys: [Answer from 1.4]
480
+ Device/Browser Support: [Answer from 1.5]
481
+ Responsive Strategy: [Answer from 1.6]
482
+ Internationalization: [Answer from 1.7]
483
+ Authentication: [Answer from 1.8]
484
+ Data Privacy: [Answer from 1.9]
485
+ Offline Support: [Answer from 1.10]
486
+ Performance Priorities: [Answer from 1.11]
349
487
 
350
488
  Is this correct? (Y/n)
351
489
  ```
@@ -353,7 +491,7 @@ Is this correct? (Y/n)
353
491
  If **Yes:** Proceed to Phase 2
354
492
 
355
493
  If **No:** Allow user to correct specific answers
356
- ---
494
+ ---
357
495
  ## 📝 Document Generation (Partial)
358
496
 
359
497
  At the end of Phase 1, generate or update:
@@ -439,7 +577,7 @@ At the end of Phase 1, generate or update:
439
577
  - Authentication: {{AUTH_METHOD}}
440
578
  - Compliance: {{DATA_PRIVACY_COMPLIANCE}}
441
579
  ```
442
- ---
580
+ ---
443
581
  ## 🚀 Next Steps
444
582
 
445
583
  ```
@@ -453,11 +591,7 @@ Next: Phase 2 - Components & Framework
453
591
 
454
592
  Read: .ai-flow/prompts/frontend/flow-build-phase-2-components.md
455
593
  ```
456
- ---
457
- **Last Updated:** 2025-01-XX
458
-
459
- **Version:** 1.2.0
460
-
461
-
462
-
594
+ ---
595
+ **Last Updated:** 2025-12-XX
463
596
 
597
+ **Version:** 1.3.0
@@ -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
@@ -412,4 +412,4 @@ See `README.md` for installation and setup instructions.
412
412
 
413
413
  **Last Updated:** {{GENERATION_DATE}}
414
414
 
415
- **Generated by:** AI Flow v2.1.6
415
+ **Generated by:** AI Flow v2.1.8