ai-flow-dev 2.1.7 → 2.1.9

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.
@@ -2,9 +2,18 @@
2
2
 
3
3
  > **Order for this phase:** 1.1 → 1.2 → 1.3 → 1.4 → 1.5 → 1.6 → 1.7 → 1.8 → 1.9 → 1.10
4
4
 
5
+ > **📌 Scope-based behavior:**
6
+ > - **MVP/Basic Scope:** Focus only on core requirements. Skip advanced business logic questions.
7
+ > - **Production-Ready Scope:** In-depth exploration of compliance, scalability, and long-term business goals.
8
+
9
+ ### Objective
10
+ Define the project's core purpose, business rules, and high-level requirements to ensure the foundation is solid before technical design begins.
11
+
5
12
  > **📌 Note:** If Phase 0 was executed, some questions may already be answered. Skip those and only ask what's missing.
6
13
 
7
- **1.1 Project Name & Description**
14
+ **1.1 Project Name & Description (with Smart Refinement)**
15
+
16
+ > **🧠 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
17
 
9
18
  ```
10
19
  [If detected from Phase 0, show:]
@@ -17,26 +26,178 @@ If no, please provide correct values.
17
26
  [If NOT detected, ask:]
18
27
  What is the project name?
19
28
 
20
- Provide a short description (1 sentence) for README and package.json
29
+ Provide an initial description of your project.
30
+ (Don't worry about perfection - we'll refine it together if needed!)
31
+
32
+ Example: "A backend for managing gym memberships"
33
+ ```
34
+
35
+ **🔍 AI Internal: Ambiguity Analysis**
36
+
37
+ After receiving the description, silently analyze for these criteria:
38
+
39
+ | Criterion | Check For | Score +1 if present |
40
+ |-----------|-----------|---------------------|
41
+ | **WHO** | Specific user type mentioned (not just "users") | "gym members", "restaurant owners" |
42
+ | **WHAT** | Specific action/function (not just "manage") | "track workouts", "process payments" |
43
+ | **WHY** | Purpose or value mentioned | "to replace spreadsheets", "to launch app" |
44
+ | **DOMAIN** | Industry/vertical indicated | "fitness", "fintech", "healthcare" |
45
+ | **DETAIL** | Description has 10+ meaningful words | Not counting articles |
46
+
47
+ **Scoring Rules:**
48
+ - Score 4-5: ✅ Accept immediately → Proceed to 1.2
49
+ - Score 0-3: ⚠️ Enter refinement loop → Ask ONLY missing criteria
50
+
51
+ ---
52
+
53
+ **🔄 Conditional Refinement Loop (only if score < 4)**
54
+
55
+ > **CRITICAL**: Only ask about criteria that are MISSING. Do NOT repeat questions already answered. Respond in the SAME LANGUAGE the developer used.
56
+
57
+ ```
58
+ [LANGUAGE: Match the developer's language]
59
+
60
+ 🔍 I'd like to understand your project better.
61
+
62
+ Your description: "[original description]"
63
+
64
+ [ONLY show questions for MISSING criteria:]
65
+
66
+ [If WHO is missing:]
67
+ 1️⃣ WHO will use this system?
68
+ A) End consumers (B2C)
69
+ B) Business users (B2B)
70
+ C) Internal team
71
+ D) Other systems (APIs)
72
+ E) Other: __
73
+
74
+ [If WHAT is missing:]
75
+ 2️⃣ WHAT is the core action users will perform?
76
+ A) Buy/sell products or services
77
+ B) Manage/organize information
78
+ C) Communicate/collaborate
79
+ D) Monitor/analyze data
80
+ E) Create/publish content
81
+ F) Other: __
82
+
83
+ [If WHY is missing:]
84
+ 3️⃣ WHY is this project needed?
85
+ A) Replace manual/legacy process
86
+ B) Launch new product/business
87
+ C) Improve existing system
88
+ D) Enable new capability
89
+ E) Other: __
90
+
91
+ [If DOMAIN is missing:]
92
+ 4️⃣ What INDUSTRY/DOMAIN is this for?
93
+ A) E-commerce/Retail
94
+ B) Fitness/Health
95
+ C) Finance/Payments
96
+ D) Education
97
+ E) Social/Community
98
+ F) Business tools (CRM, ERP)
99
+ G) Other: __
100
+
101
+ Your answers: __ (e.g., "A, B, A, E" or describe freely)
21
102
  ```
22
103
 
23
- **1.2 Project Overview**
104
+ ---
105
+
106
+ **✨ Generate Professional Description Options**
107
+
108
+ After gathering missing info, generate 3 polished versions:
24
109
 
25
110
  ```
26
- What problem does this backend system solve?
111
+ [LANGUAGE: Match the developer's language]
112
+
113
+ ✨ Based on your input, here are 3 professional descriptions:
114
+
115
+ A) Concise (for package.json):
116
+ "[Generated 1-line description with WHO + WHAT]"
117
+
118
+ B) Descriptive (for README.md):
119
+ "[Generated 2-3 line description with WHO + WHAT + WHY]"
120
+
121
+ C) Technical (for AGENT.md):
122
+ "[Generated technical description with DOMAIN + WHAT]"
123
+
124
+ Which do you prefer? (1-3, or 4 to edit, 5 to start over)
125
+ ```
126
+
127
+ ---
128
+
129
+ **✅ Final Confirmation**
130
+
131
+ ```
132
+ ✅ Your final project description:
133
+
134
+ 📋 Name: [project name]
135
+ 📝 Description: "[final polished description]"
136
+
137
+ Proceed to next question? (Y to continue)
138
+ ```
139
+
140
+ ---
141
+
142
+ **1.2 Project Overview (Confirmation + Expansion)**
143
+
144
+ > **📌 Smart Skip**: If 1.1 already captured WHO/WHAT/WHY completely, this becomes a quick confirmation.
145
+
146
+ ```
147
+ [If 1.1 refinement was complete (score >= 4), show:]
148
+
149
+ ✅ Based on your description, I understand:
150
+ • Users: [WHO from 1.1]
151
+ • Core Action: [WHAT from 1.1]
152
+ • Purpose: [WHY from 1.1]
27
153
 
28
- Describe in 2-3 sentences:
29
- - Who are the users?
30
- - What is the core value proposition?
31
- - What makes this project necessary?
154
+ Is this complete? (Y) Or would you like to add more context? (N)
155
+
156
+ [If user says Y Skip to 1.3]
157
+ [If user says N Ask:]
158
+ What additional context would you like to add?
159
+
160
+ ---
161
+
162
+ [If 1.1 was NOT refined OR any WHO/WHAT/WHY still missing, ask:]
163
+
164
+ [ONLY ask for MISSING elements - check what was NOT captured in 1.1:]
165
+
166
+ [If WHO still unclear:]
167
+ Who are the primary users of this system?
168
+
169
+ [If WHAT still unclear:]
170
+ What is the core value proposition?
171
+
172
+ [If WHY still unclear:]
173
+ What makes this project necessary?
32
174
 
33
175
  Example:
34
176
  "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
177
  ```
36
178
 
37
- **1.3 Target Users**
179
+ **1.3 Target Users (Confirmation + Additional Types)**
180
+
181
+ > **📌 Smart Skip**: If 1.1 already identified user types, this confirms and expands.
38
182
 
39
183
  ```
184
+ [If WHO was captured in 1.1, show:]
185
+
186
+ ✅ Based on your description, your target users are: [WHO from 1.1]
187
+
188
+ Would you like to add any additional user types? Select any that apply:
189
+
190
+ A) 🌐 External end-users (B2C) - Public-facing application
191
+ B) 🏢 Internal employees (B2B/Enterprise) - Company internal tool
192
+ C) 🔌 Other systems/services (API consumers) - Integration platform
193
+ D) 👥 Partners/Third-parties - Partner ecosystem
194
+ E) 📱 Mobile/Web apps - Backend for frontend
195
+ F) ✅ No additional users - [WHO from 1.1] is complete
196
+
197
+ ---
198
+
199
+ [If WHO was NOT captured in 1.1, ask normally:]
200
+
40
201
  Who will use this system? Select all that apply:
41
202
 
42
203
  A) 🌐 External end-users (B2C) - Public-facing application
@@ -65,9 +226,24 @@ Your objectives:
65
226
  3.
66
227
  ```
67
228
 
68
- **1.5 System Type**
229
+ **1.5 System Type (Confirmation + Validation)**
230
+
231
+ > **📌 Smart Skip**: If 1.1 already identified the domain/industry, this confirms it.
69
232
 
70
233
  ```
234
+ [If DOMAIN was captured in 1.1, show:]
235
+
236
+ ✅ Based on your description, this appears to be a: [DOMAIN from 1.1] system
237
+
238
+ Is this correct?
239
+
240
+ A) ✅ Yes, that's correct
241
+ B) 🔄 No, it's actually: [show options below]
242
+
243
+ ---
244
+
245
+ [If DOMAIN was NOT captured in 1.1, OR user selected B above:]
246
+
71
247
  What type of system are you building? (This helps suggest common features)
72
248
 
73
249
  A) 🛒 E-commerce/Marketplace
@@ -141,7 +317,7 @@ This helps us focus the documentation on what you're building now, while noting
141
317
  📋 What will you build in this first version? (Select from the features listed above)
142
318
 
143
319
  [Show features from question 1.6 and allow selection]
144
- ---
320
+ ---
145
321
  ⏭️ What will you leave for future versions? (What you're NOT building now)
146
322
 
147
323
  Common things to defer:
@@ -229,7 +405,7 @@ Example:
229
405
  - Invoicing: Invoice generation after purchase.
230
406
 
231
407
  The AI will automatically generate flow diagrams (mermaid) for each documented process.
232
- ---
408
+ ---
233
409
  #### 🎨 MERMAID BUSINESS FLOW DIAGRAM FORMAT - CRITICAL
234
410
 
235
411
  **Use this exact format** for business process flows:
@@ -356,7 +532,7 @@ flowchart TD
356
532
  - Customer Support Ticket Lifecycle
357
533
 
358
534
  **Validation:** Test at https://mermaid.live/ before saving
359
- ---
535
+ ---
360
536
  ```
361
537
 
362
538
  ### Phase 1 Output
@@ -381,7 +557,7 @@ Business Flows: [list of main flows]
381
557
  Is this correct? (Yes/No)
382
558
  If corrections needed, specify which section.
383
559
  ```
384
- ---
560
+ ---
385
561
  ### 📄 Generate Phase 1 Documents
386
562
 
387
563
  **Generate `project-brief.md` automatically:**
@@ -403,11 +579,26 @@ The document has been created with all the information from Phase 1.
403
579
 
404
580
  **If user edits the file:**
405
581
  Execute `read_file('project-brief.md')` to refresh context before continuing.
406
- ---
407
- **Proceed to Phase 2 after document is generated and optionally reviewed.**
582
+ ---
583
+
584
+ ## 📝 Generated Documents
585
+
586
+ After Phase 1, generate/update:
587
+ - `project-brief.md` - Core project discovery and requirements
588
+
589
+ ---
590
+
591
+ **Next Phase:** Phase 2 - Data Architecture (15-20 min)
592
+
593
+ Read: `.ai-flow/prompts/backend/flow-build-phase-2.md`
594
+
595
+ ---
596
+
597
+ **Last Updated:** 2025-12-20
598
+ **Version:** 2.1.8
599
+
600
+ ---
408
601
 
409
- > ⚠️ **CRITICAL:** DO NOT generate README.md in Phase 1. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
410
- ---
411
602
  ## PHASE 2: Data Architecture (15-20 min)
412
603
 
413
604
  ````
@@ -1,15 +1,12 @@
1
- # AI Flow - Phase 10: User Stories Generation
1
+ ## PHASE 10: Agile Planning - User Stories (5-10 min)
2
2
 
3
- **YOU ARE AN EXPERT PRODUCT OWNER AND AGILE SPECIALIST.**
3
+ > **Order for this phase:** OPTIONAL. Executed after Phase 9 or on demand.
4
4
 
5
- Generate detailed User Stories from the roadmap created in Phase 9.
5
+ > **📌 Scope-based behavior:**
6
+ > - **All Scopes:** Generate detailed User Stories for each milestone in the Roadmap.
6
7
 
7
- ## Prerequisites
8
-
9
- - Phase 9 completed (`docs/roadmap.md` exists with context variables)
10
- - All Phase 1-8 documentation exists
11
-
12
- ## Duration
8
+ ### Objective
9
+ Break down technical roadmap tasks into user-centric Agile requirements (User Stories) to facilitate development, testing, and acceptance criteria definition.
13
10
 
14
11
  - All Epics: 30-60 minutes
15
12
  - One Epic: 5-10 minutes
@@ -321,3 +318,22 @@ Next steps:
321
318
  2. Start implementing: /flow-dev-feature HU-001-001
322
319
  3. Generate more: /flow-build fase 10 EP-XXX
323
320
  ```
321
+
322
+ ---
323
+
324
+ ## 📝 Generated Documents
325
+
326
+ After Phase 10, generate/update:
327
+
328
+ - `docs/user-stories/*.md` - Detailed Agile requirements
329
+ - `docs/roadmap.md` - (updated with story links)
330
+
331
+ ---
332
+
333
+ **CONGRATULATIONS!** Project documentation and planning are complete. 🚀
334
+
335
+ ---
336
+
337
+ **Last Updated:** 2025-12-20
338
+ **Version:** 2.1.8
339
+
@@ -2,7 +2,9 @@
2
2
 
3
3
  > **Order for this phase:** 2.1 → 2.2 → 2.3 → 2.4 → 2.5 → 2.6 → 2.7
4
4
 
5
- > **📌 Note:** If Phase 0 detected database/entities from code, those will be pre-filled. Review and confirm.
5
+ > **📌 Scope-based behavior:**
6
+ > - **MVP/Basic Scope:** Focus only on essential entities and basic relationships.
7
+ > - **Production-Ready Scope:** In-depth modeling including indexes, constraints, and audit fields.
6
8
 
7
9
  ### Objective
8
10
 
@@ -531,6 +533,22 @@ Execute `read_file('docs/data-model.md')` to refresh context before continuing.
531
533
 
532
534
  ---
533
535
 
534
- ## **Proceed to Phase 3 after document is generated and optionally reviewed.**
536
+ ## 📝 Generated Documents
537
+
538
+ After Phase 2, generate/update:
539
+ - `docs/data-model.md` - Database schema and entity relationships
540
+
541
+ ---
542
+
543
+ **Next Phase:** Phase 3 - System Architecture (15-20 min)
544
+
545
+ Read: `.ai-flow/prompts/backend/flow-build-phase-3.md`
546
+
547
+ ---
548
+
549
+ **Last Updated:** 2025-12-20
550
+ **Version:** 2.1.8
551
+
552
+ ---
535
553
 
536
554
  ## PHASE 3: System Architecture (15-20 min)
@@ -741,4 +741,23 @@ Execute `read_file()` for both documents to refresh context before continuing.
741
741
 
742
742
  ---
743
743
 
744
+ ## 📝 Generated Documents
745
+
746
+ After Phase 3, generate/update:
747
+ - `docs/architecture.md` - Technical stack and patterns
748
+ - `ai-instructions.md` - Instructions for AI agents
749
+
750
+ ---
751
+
752
+ **Next Phase:** Phase 4 - Security & Authentication (15-20 min)
753
+
754
+ Read: `.ai-flow/prompts/backend/flow-build-phase-4.md`
755
+
756
+ ---
757
+
758
+ **Last Updated:** 2025-12-20
759
+ **Version:** 2.1.8
760
+
761
+ ---
762
+
744
763
  ## PHASE 4: Security & Authentication (15-20 min)
@@ -461,7 +461,7 @@ Input Validation: [strategy + sanitization rules + size limits + file upload val
461
461
 
462
462
  Is this correct? (Yes/No)
463
463
  ```
464
- ---
464
+ ---
465
465
  ### 📄 Generate Phase 4 Documents
466
466
 
467
467
  **Before starting generation:**
@@ -501,12 +501,35 @@ Documents have been created with all Phase 4 information.
501
501
 
502
502
  **If user edits files:**
503
503
  Re-read files to refresh context before continuing.
504
- ---
504
+ ---
505
505
  **Proceed to Phase 5 only after documents are validated.**
506
506
 
507
507
  > ⚠️ **CRITICAL:** DO NOT generate README.md in this phase. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
508
- ---
508
+ ---
509
+ ---
510
+
511
+ ---
512
+
513
+ ## 📝 Generated Documents
514
+
515
+ After Phase 4, generate/update:
516
+ - `specs/security.md` - Security policies and authentication details
517
+
518
+ ---
519
+
520
+ **Next Phase:** Phase 5 - Development Standards (15-20 min)
521
+
522
+ Read: `.ai-flow/prompts/backend/flow-build-phase-5.md`
523
+
524
+ ---
525
+
526
+ **Last Updated:** 2025-12-20
527
+ **Version:** 2.1.8
528
+
529
+ ---
530
+
509
531
  ## PHASE 5: Development Standards (15-20 min)
510
532
 
511
533
 
512
534
 
535
+
@@ -662,4 +662,23 @@ Re-read files to refresh context before continuing.
662
662
 
663
663
  ---
664
664
 
665
- ## PHASE 6: Testing Strategy (10 min)
665
+ ## 📝 Generated Documents
666
+
667
+ After Phase 5, generate/update:
668
+ - `docs/code-standards.md` - Development practices and quality rules
669
+
670
+ ---
671
+
672
+ **Next Phase:** Phase 6 - Testing Strategy (15-20 min)
673
+
674
+ Read: `.ai-flow/prompts/backend/flow-build-phase-6.md`
675
+
676
+ ---
677
+
678
+ **Last Updated:** 2025-12-20
679
+ **Version:** 2.1.8
680
+
681
+ ---
682
+
683
+ ## PHASE 6: Testing Strategy (15-20 min)
684
+
@@ -1,4 +1,4 @@
1
- ## PHASE 6: Testing Strategy (15-25 min)
1
+ ## PHASE 6: Testing Strategy (15-20 min)
2
2
 
3
3
  > **Order for this phase:**
4
4
  >
@@ -481,5 +481,25 @@ Re-read file to refresh context before continuing.
481
481
 
482
482
  > ⚠️ **CRITICAL:** DO NOT generate README.md in this phase. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
483
483
  ---
484
- ## PHASE 7: Operations & Deployment (10 min)
484
+
485
+ ## 📝 Generated Documents
486
+
487
+ After Phase 6, generate/update:
488
+ - `docs/testing.md` - Testing strategy and quality gates
489
+
490
+ ---
491
+
492
+ **Next Phase:** Phase 7 - Operations & Deployment (10-15 min)
493
+
494
+ Read: `.ai-flow/prompts/backend/flow-build-phase-7.md`
495
+
496
+ ---
497
+
498
+ **Last Updated:** 2025-12-20
499
+ **Version:** 2.1.8
500
+
501
+ ---
502
+
503
+ ## PHASE 7: Operations & Deployment (10-15 min)
504
+
485
505
  ````