ai-flow-dev 1.0.1
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/LICENSE +21 -0
- package/README.md +408 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +791 -0
- package/dist/cli.js.map +1 -0
- package/dist/fs-utils.d.ts +2 -0
- package/dist/fs-utils.d.ts.map +1 -0
- package/dist/fs-utils.js +46 -0
- package/dist/fs-utils.js.map +1 -0
- package/package.json +71 -0
- package/prompts/backend/flow-dev-feature.md +1318 -0
- package/prompts/backend/flow-dev-fix.md +903 -0
- package/prompts/backend/flow-dev-refactor.md +715 -0
- package/prompts/backend/flow-dev-review.md +401 -0
- package/prompts/backend/flow-dev-work.md +1129 -0
- package/prompts/backend/flow-docs-gen-phase-0.md +1840 -0
- package/prompts/backend/flow-docs-gen-phase-1.md +435 -0
- package/prompts/backend/flow-docs-gen-phase-2.md +460 -0
- package/prompts/backend/flow-docs-gen-phase-3.md +684 -0
- package/prompts/backend/flow-docs-gen-phase-4.md +516 -0
- package/prompts/backend/flow-docs-gen-phase-5.md +637 -0
- package/prompts/backend/flow-docs-gen-phase-6.md +465 -0
- package/prompts/backend/flow-docs-gen-phase-7.md +1207 -0
- package/prompts/backend/flow-docs-gen.md +820 -0
- package/prompts/backend/flow-docs-sync.md +526 -0
- package/prompts/backend/flow-project-init.md +248 -0
- package/prompts/backend/flow-project-roadmap.md +1159 -0
- package/prompts/frontend/flow-docs-gen-phase-0.md +494 -0
- package/prompts/frontend/flow-docs-gen-phase-1.md +449 -0
- package/prompts/frontend/flow-docs-gen-phase-2.md +983 -0
- package/prompts/frontend/flow-docs-gen-phase-3.md +685 -0
- package/prompts/frontend/flow-docs-gen-phase-4.md +480 -0
- package/prompts/frontend/flow-docs-gen-phase-5.md +483 -0
- package/prompts/frontend/flow-docs-gen-phase-6.md +570 -0
- package/prompts/frontend/flow-docs-gen-phase-7.md +582 -0
- package/prompts/frontend/flow-docs-gen.md +413 -0
- package/prompts/frontend/flow-docs-sync.md +561 -0
- package/prompts/mobile/flow-docs-gen-phase-0.md +387 -0
- package/prompts/mobile/flow-docs-gen-phase-1.md +530 -0
- package/prompts/mobile/flow-docs-gen-phase-2.md +584 -0
- package/prompts/mobile/flow-docs-gen-phase-3.md +659 -0
- package/prompts/mobile/flow-docs-gen-phase-4.md +363 -0
- package/prompts/mobile/flow-docs-gen-phase-5.md +369 -0
- package/prompts/mobile/flow-docs-gen-phase-6.md +490 -0
- package/prompts/mobile/flow-docs-gen-phase-7.md +407 -0
- package/prompts/mobile/flow-docs-gen.md +430 -0
- package/prompts/mobile/flow-docs-sync.md +634 -0
- package/templates/backend/.clauderules.template +111 -0
- package/templates/backend/.cursorrules.template +102 -0
- package/templates/backend/.env.example.template +122 -0
- package/templates/backend/README.template.md +200 -0
- package/templates/backend/ai-instructions.template.md +354 -0
- package/templates/backend/copilot-instructions.template.md +160 -0
- package/templates/backend/docs/api.template.md +251 -0
- package/templates/backend/docs/architecture.template.md +612 -0
- package/templates/backend/docs/business-flows.template.md +109 -0
- package/templates/backend/docs/code-standards.template.md +828 -0
- package/templates/backend/docs/contributing.template.md +163 -0
- package/templates/backend/docs/data-model.template.md +416 -0
- package/templates/backend/docs/operations.template.md +591 -0
- package/templates/backend/docs/testing.template.md +762 -0
- package/templates/backend/project-brief.template.md +176 -0
- package/templates/backend/specs/configuration.template.md +133 -0
- package/templates/backend/specs/security.template.md +422 -0
- package/templates/frontend/README.template.md +121 -0
- package/templates/frontend/ai-instructions.template.md +368 -0
- package/templates/frontend/docs/api-integration.template.md +390 -0
- package/templates/frontend/docs/components.template.md +567 -0
- package/templates/frontend/docs/error-handling.template.md +385 -0
- package/templates/frontend/docs/operations.template.md +123 -0
- package/templates/frontend/docs/performance.template.md +140 -0
- package/templates/frontend/docs/pwa.template.md +135 -0
- package/templates/frontend/docs/state-management.template.md +394 -0
- package/templates/frontend/docs/styling.template.md +779 -0
- package/templates/frontend/docs/testing.template.md +736 -0
- package/templates/frontend/project-brief.template.md +55 -0
- package/templates/frontend/specs/accessibility.template.md +111 -0
- package/templates/frontend/specs/configuration.template.md +520 -0
- package/templates/frontend/specs/security.template.md +197 -0
- package/templates/fullstack/README.template.md +282 -0
- package/templates/fullstack/ai-instructions.template.md +487 -0
- package/templates/fullstack/project-brief.template.md +197 -0
- package/templates/fullstack/specs/configuration.template.md +380 -0
- package/templates/mobile/AGENT.template.md +251 -0
- package/templates/mobile/README.template.md +195 -0
- package/templates/mobile/ai-instructions.template.md +221 -0
- package/templates/mobile/docs/app-store.template.md +163 -0
- package/templates/mobile/docs/architecture.template.md +100 -0
- package/templates/mobile/docs/native-features.template.md +137 -0
- package/templates/mobile/docs/navigation.template.md +81 -0
- package/templates/mobile/docs/offline-strategy.template.md +90 -0
- package/templates/mobile/docs/permissions.template.md +70 -0
- package/templates/mobile/docs/state-management.template.md +116 -0
- package/templates/mobile/docs/testing.template.md +146 -0
- package/templates/mobile/project-brief.template.md +97 -0
- package/templates/mobile/specs/build-configuration.template.md +116 -0
- package/templates/mobile/specs/deployment.template.md +114 -0
- package/templates/shared/AGENT.template.md +252 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
## PHASE 1: Discovery & Business (15-20 min)
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
> **📌 Note:** If Phase 0 was executed, some questions may already be answered. Skip those and only ask what's missing.
|
|
6
|
+
|
|
7
|
+
**1.1 Project Name & Description**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
[If detected from Phase 0, show:]
|
|
11
|
+
✅ Project Name: [detected name]
|
|
12
|
+
✅ Description: [detected description]
|
|
13
|
+
|
|
14
|
+
Is this correct? (Y/N)
|
|
15
|
+
If no, please provide correct values.
|
|
16
|
+
|
|
17
|
+
[If NOT detected, ask:]
|
|
18
|
+
What is the project name?
|
|
19
|
+
|
|
20
|
+
Provide a short description (1 sentence) for README and package.json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**1.2 Project Overview**
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
What problem does this backend system solve?
|
|
27
|
+
|
|
28
|
+
Describe in 2-3 sentences:
|
|
29
|
+
- Who are the users?
|
|
30
|
+
- What is the core value proposition?
|
|
31
|
+
- What makes this project necessary?
|
|
32
|
+
|
|
33
|
+
Example:
|
|
34
|
+
"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
|
+
```
|
|
36
|
+
|
|
37
|
+
**1.3 Target Users**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Who will use this system? Select all that apply:
|
|
41
|
+
|
|
42
|
+
A) 🌐 External end-users (B2C) - Public-facing application
|
|
43
|
+
B) 🏢 Internal employees (B2B/Enterprise) - Company internal tool
|
|
44
|
+
C) 🔌 Other systems/services (API consumers) - Integration platform
|
|
45
|
+
D) 👥 Partners/Third-parties - Partner ecosystem
|
|
46
|
+
E) 📱 Mobile/Web apps - Backend for frontend
|
|
47
|
+
|
|
48
|
+
(Can select multiple)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**1.4 Business Objectives**
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
What are the top 3 measurable objectives for this project?
|
|
55
|
+
|
|
56
|
+
Examples:
|
|
57
|
+
- Process 10,000 transactions/day
|
|
58
|
+
- Reduce customer onboarding time by 50%
|
|
59
|
+
- Support 1M active users
|
|
60
|
+
- Achieve 99.9% uptime SLA
|
|
61
|
+
|
|
62
|
+
Your objectives:
|
|
63
|
+
1.
|
|
64
|
+
2.
|
|
65
|
+
3.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**1.5 System Type**
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
What type of system are you building? (This helps suggest common features)
|
|
72
|
+
|
|
73
|
+
A) 🛒 E-commerce/Marketplace
|
|
74
|
+
B) 📱 SaaS/B2B Platform
|
|
75
|
+
C) 📊 CRM/ERP/Business Tool
|
|
76
|
+
D) 🎮 Social/Community Platform
|
|
77
|
+
E) 📋 Content Management
|
|
78
|
+
F) 🏦 FinTech/Payment
|
|
79
|
+
G) 🏥 Healthcare/Booking
|
|
80
|
+
H) 📚 Education/Learning
|
|
81
|
+
I) 🔧 DevTools/API Platform
|
|
82
|
+
J) Other: __
|
|
83
|
+
|
|
84
|
+
Your choice: __
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**1.6 Core Features**
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
What are the main functionalities your system needs?
|
|
91
|
+
|
|
92
|
+
Think about what your users will be able to do with your system. You can list them freely, or select from common features suggested below based on your system type.
|
|
93
|
+
|
|
94
|
+
🛒 E-commerce common features:
|
|
95
|
+
□ User authentication (register/login)
|
|
96
|
+
□ Product catalog with search/filters
|
|
97
|
+
□ Shopping cart
|
|
98
|
+
□ Checkout and payment processing
|
|
99
|
+
□ Order management
|
|
100
|
+
□ Inventory tracking
|
|
101
|
+
□ Admin dashboard
|
|
102
|
+
|
|
103
|
+
📱 SaaS common features:
|
|
104
|
+
□ User authentication with SSO
|
|
105
|
+
□ Multi-tenant organization/workspace management
|
|
106
|
+
□ Role-based access control (RBAC)
|
|
107
|
+
□ Subscription and billing
|
|
108
|
+
□ Dashboard and analytics
|
|
109
|
+
□ API access
|
|
110
|
+
□ Admin panel
|
|
111
|
+
|
|
112
|
+
📊 CRM/Business Tool common features:
|
|
113
|
+
□ User/team management
|
|
114
|
+
□ Contact/customer database
|
|
115
|
+
□ Activity tracking and logging
|
|
116
|
+
□ Reporting and analytics
|
|
117
|
+
□ Integrations (email, calendar, etc.)
|
|
118
|
+
□ Search and filters
|
|
119
|
+
□ Export functionality
|
|
120
|
+
|
|
121
|
+
🎮 Social/Community common features:
|
|
122
|
+
□ User profiles
|
|
123
|
+
□ Posts/content creation
|
|
124
|
+
□ Feed/timeline
|
|
125
|
+
□ Comments and reactions
|
|
126
|
+
□ Follow/friend system
|
|
127
|
+
□ Notifications
|
|
128
|
+
□ Moderation tools
|
|
129
|
+
|
|
130
|
+
⭐ Your specific features (add any custom functionalities):
|
|
131
|
+
-
|
|
132
|
+
-
|
|
133
|
+
-
|
|
134
|
+
|
|
135
|
+
List all functionalities your system needs (select from above or add your own):
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**1.7 Scope Definition**
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Now let's prioritize: What will you build in this first version, and what will you leave for future versions?
|
|
142
|
+
|
|
143
|
+
This helps us focus the documentation on what you're building now, while noting what comes later.
|
|
144
|
+
|
|
145
|
+
📋 What will you build in this first version? (Select from the features listed above)
|
|
146
|
+
|
|
147
|
+
[Show features from question 1.6 and allow selection]
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
⏭️ What will you leave for future versions? (What you're NOT building now)
|
|
152
|
+
|
|
153
|
+
Common things to defer:
|
|
154
|
+
□ Mobile native apps (building web/API first)
|
|
155
|
+
□ Advanced analytics/ML features
|
|
156
|
+
□ Third-party integrations (v2)
|
|
157
|
+
□ White-label/multi-branding
|
|
158
|
+
□ Internationalization (i18n)
|
|
159
|
+
□ Advanced automation/workflows
|
|
160
|
+
□ Video/live streaming features
|
|
161
|
+
|
|
162
|
+
⭐ Other features to defer (add your own):
|
|
163
|
+
-
|
|
164
|
+
-
|
|
165
|
+
-
|
|
166
|
+
|
|
167
|
+
💡 Tip: It's okay to start simple! You can always expand later. This helps us create focused documentation for your current needs.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**1.8 Constraints**
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
What constraints does this project have? Select all that apply:
|
|
174
|
+
|
|
175
|
+
A) ⏰ Time - Must launch by specific date
|
|
176
|
+
B) 💰 Budget - Limited development resources
|
|
177
|
+
C) 📜 Compliance - Regulatory requirements (GDPR, HIPAA, SOC2, etc.)
|
|
178
|
+
D) 🔧 Technology - Must use specific tech stack
|
|
179
|
+
E) 📊 Scale - Must handle specific traffic/data volume
|
|
180
|
+
F) 🔐 Security - High security requirements
|
|
181
|
+
G) ⚡ Performance - Strict latency/throughput requirements
|
|
182
|
+
|
|
183
|
+
For each selected, provide details:
|
|
184
|
+
|
|
185
|
+
Example:
|
|
186
|
+
- Time: Must launch MVP by Q3 2024
|
|
187
|
+
- Compliance: Must be GDPR compliant as we serve EU users
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**1.9 Success Metrics**
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
How will you measure success?
|
|
194
|
+
|
|
195
|
+
1. Expected Users:
|
|
196
|
+
- Initial launch: __ users
|
|
197
|
+
- Year 1 goal: __ users
|
|
198
|
+
|
|
199
|
+
2. Performance Targets:
|
|
200
|
+
- Response time: < __ ms
|
|
201
|
+
- Uptime: __ %
|
|
202
|
+
|
|
203
|
+
3. Business Goals:
|
|
204
|
+
- [Goal 1]
|
|
205
|
+
- [Goal 2]
|
|
206
|
+
|
|
207
|
+
⭐ Standard for MVP:
|
|
208
|
+
- Users: 1,000 initial / 10,000 Year 1
|
|
209
|
+
- Response time: < 500ms (API), < 100ms (DB)
|
|
210
|
+
- Uptime: 99.9% (Standard cloud SLA)
|
|
211
|
+
|
|
212
|
+
🏆 Standard for Production/Scale:
|
|
213
|
+
- Users: 100,000+ active
|
|
214
|
+
- Response time: < 200ms (API), < 50ms (DB)
|
|
215
|
+
- Uptime: 99.99% (High Availability)
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**1.10 Main Business Flows**
|
|
219
|
+
|
|
220
|
+
> Note: If you omit any common flow or functionality, the AI will suggest and document typical processes relevant to your system type, based on best practices and common use cases.
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
List the main business flows of the system (e.g., sales, inventory update, invoicing, user registration).
|
|
224
|
+
|
|
225
|
+
For each flow, you can add a brief description (optional).
|
|
226
|
+
|
|
227
|
+
If you wish, you can specify the main steps of any flow (numbered format). If you do not specify them, the AI will deduce typical steps based on the name and description.
|
|
228
|
+
|
|
229
|
+
Example:
|
|
230
|
+
- Sales: Process of purchasing products by the customer.
|
|
231
|
+
1. Customer selects products
|
|
232
|
+
2. Order is created
|
|
233
|
+
3. Inventory is updated
|
|
234
|
+
4. Invoice is generated
|
|
235
|
+
- Inventory: Automatic stock update after each sale.
|
|
236
|
+
- Invoicing: Invoice generation after purchase.
|
|
237
|
+
|
|
238
|
+
The AI will automatically generate flow diagrams (mermaid) for each documented process.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
#### 🎨 MERMAID BUSINESS FLOW DIAGRAM FORMAT - CRITICAL
|
|
243
|
+
|
|
244
|
+
**Use this exact format** for business process flows:
|
|
245
|
+
|
|
246
|
+
````markdown
|
|
247
|
+
```mermaid
|
|
248
|
+
flowchart TD
|
|
249
|
+
Start([User Visits Site]) --> Browse[Browse Product Catalog]
|
|
250
|
+
Browse --> Search{Search or<br/>Browse Categories?}
|
|
251
|
+
|
|
252
|
+
Search -->|Use Search| Filter[Apply Search Filters]
|
|
253
|
+
Search -->|Browse| Category[Select Category]
|
|
254
|
+
|
|
255
|
+
Filter --> Results[View Search Results]
|
|
256
|
+
Category --> Results
|
|
257
|
+
|
|
258
|
+
Results --> Select[Select Product]
|
|
259
|
+
Select --> Details[View Product Details]
|
|
260
|
+
Details --> Decision{Add to Cart?}
|
|
261
|
+
|
|
262
|
+
Decision -->|Yes| AddCart[Add Item to Cart]
|
|
263
|
+
Decision -->|No| Browse
|
|
264
|
+
|
|
265
|
+
AddCart --> MoreShopping{Continue<br/>Shopping?}
|
|
266
|
+
MoreShopping -->|Yes| Browse
|
|
267
|
+
MoreShopping -->|No| Cart[View Shopping Cart]
|
|
268
|
+
|
|
269
|
+
Cart --> ReviewCart{Cart OK?}
|
|
270
|
+
ReviewCart -->|Modify| Browse
|
|
271
|
+
ReviewCart -->|Proceed| Checkout[Start Checkout]
|
|
272
|
+
|
|
273
|
+
Checkout --> Address[Enter/Confirm Address]
|
|
274
|
+
Address --> Payment[Enter Payment Info]
|
|
275
|
+
Payment --> Review[Review Order]
|
|
276
|
+
Review --> ProcessPayment[Process Payment]
|
|
277
|
+
|
|
278
|
+
ProcessPayment --> PaymentResult{Payment<br/>Success?}
|
|
279
|
+
|
|
280
|
+
PaymentResult -->|Success| Confirm[Order Confirmation]
|
|
281
|
+
PaymentResult -->|Declined| Retry{Retry<br/>Payment?}
|
|
282
|
+
|
|
283
|
+
Retry -->|Yes| Payment
|
|
284
|
+
Retry -->|No| SaveCart[Save Cart for Later]
|
|
285
|
+
SaveCart --> End1([Exit: Saved])
|
|
286
|
+
|
|
287
|
+
Confirm --> Email[Send Confirmation Email]
|
|
288
|
+
Email --> Inventory[Update Inventory]
|
|
289
|
+
Inventory --> Invoice[Generate Invoice]
|
|
290
|
+
Invoice --> End2([Order Complete])
|
|
291
|
+
|
|
292
|
+
style Start fill:#e1f5ff
|
|
293
|
+
style End1 fill:#ffe1e1
|
|
294
|
+
style End2 fill:#e1ffe1
|
|
295
|
+
style ProcessPayment fill:#fff4e1
|
|
296
|
+
style Confirm fill:#d4edda
|
|
297
|
+
```
|
|
298
|
+
````
|
|
299
|
+
|
|
300
|
+
**Flowchart Syntax:**
|
|
301
|
+
- `flowchart TD` = Top-Down flow (recommended)
|
|
302
|
+
- `flowchart LR` = Left-Right flow
|
|
303
|
+
- `flowchart BT` = Bottom-Top
|
|
304
|
+
- `flowchart RL` = Right-Left
|
|
305
|
+
|
|
306
|
+
**Node Shapes:**
|
|
307
|
+
- `[Rectangle]` = Process step/action
|
|
308
|
+
- `{Diamond}` = Decision point (Yes/No, multiple options)
|
|
309
|
+
- `([Rounded Rectangle])` = Start/End terminal
|
|
310
|
+
- `[(Cylinder)]` = Database operation
|
|
311
|
+
- `[[Subroutine]]` = Sub-process
|
|
312
|
+
- `[/Parallelogram/]` = Input/Output
|
|
313
|
+
- `((Circle))` = Connection point
|
|
314
|
+
|
|
315
|
+
**Arrow Types:**
|
|
316
|
+
- `-->` = Solid arrow (standard flow)
|
|
317
|
+
- `-.->` = Dotted arrow (optional/conditional)
|
|
318
|
+
- `==>` = Thick arrow (emphasis)
|
|
319
|
+
- `-->|Label|` = Labeled arrow (decision branch)
|
|
320
|
+
|
|
321
|
+
**Best Practices for Business Flows:**
|
|
322
|
+
1. **Always start with a terminal**: `([Start])`
|
|
323
|
+
2. **Always end with a terminal**: `([End])`
|
|
324
|
+
3. **Label decision branches**: Use `-->|Yes|` or `-->|No|`
|
|
325
|
+
4. **Use line breaks in labels**: `{Continue<br/>Shopping?}` for readability
|
|
326
|
+
5. **Apply consistent styling**: Same colors for similar node types
|
|
327
|
+
6. **Keep it readable**: Avoid spaghetti flows, group related steps
|
|
328
|
+
7. **Show all paths**: Every decision should have all branches defined
|
|
329
|
+
8. **Include error paths**: Payment failures, validation errors, etc.
|
|
330
|
+
|
|
331
|
+
**Multiple Flow Example (Advanced):**
|
|
332
|
+
|
|
333
|
+
```mermaid
|
|
334
|
+
flowchart TD
|
|
335
|
+
subgraph "Customer Journey"
|
|
336
|
+
C1[Browse] --> C2[Select]
|
|
337
|
+
C2 --> C3[Purchase]
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
subgraph "Backend Processing"
|
|
341
|
+
B1[Validate Order] --> B2[Process Payment]
|
|
342
|
+
B2 --> B3[Update Inventory]
|
|
343
|
+
B3 --> B4[Send Notifications]
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
C3 --> B1
|
|
347
|
+
B4 --> C4[Confirmation]
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Color Coding Guide:**
|
|
351
|
+
- Blue (`#e1f5ff`): Start/Entry points
|
|
352
|
+
- Green (`#e1ffe1`): Success/Completion
|
|
353
|
+
- Red (`#ffe1e1`): Failure/Error states
|
|
354
|
+
- Yellow (`#fff4e1`): Critical operations (Payment, Auth)
|
|
355
|
+
- Purple (`#f0e1ff`): External integrations
|
|
356
|
+
|
|
357
|
+
**Common Business Flows to Document:**
|
|
358
|
+
- User Registration/Login
|
|
359
|
+
- Purchase/Checkout Process
|
|
360
|
+
- Content Creation/Publishing
|
|
361
|
+
- Approval/Review Workflows
|
|
362
|
+
- Data Import/Export
|
|
363
|
+
- Notification/Alert Flows
|
|
364
|
+
- Customer Support Ticket Lifecycle
|
|
365
|
+
|
|
366
|
+
**Validation:** Test at https://mermaid.live/ before saving
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Phase 1 Output
|
|
372
|
+
|
|
373
|
+
After gathering all information, confirm:
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
📋 PHASE 1 SUMMARY:
|
|
377
|
+
|
|
378
|
+
Project: [name]
|
|
379
|
+
Description: [1 sentence]
|
|
380
|
+
Users: [list]
|
|
381
|
+
Objectives: [3 objectives]
|
|
382
|
+
System Type: [E-commerce/SaaS/etc.]
|
|
383
|
+
Core Features: [list of main functionalities]
|
|
384
|
+
First Version Features: [what will be built now]
|
|
385
|
+
Future Features: [what will be deferred]
|
|
386
|
+
Constraints: [list with details]
|
|
387
|
+
Success Metrics: [KPIs]
|
|
388
|
+
Business Flows: [list of main flows]
|
|
389
|
+
|
|
390
|
+
Is this correct? (Yes/No)
|
|
391
|
+
If corrections needed, specify which section.
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
### 📄 Generate Phase 1 Documents
|
|
397
|
+
|
|
398
|
+
Once confirmed, generate:
|
|
399
|
+
|
|
400
|
+
**1. `project-brief.md`**
|
|
401
|
+
|
|
402
|
+
- Use template: `.ai-flow/templates/project-brief.template.md`
|
|
403
|
+
- Fill with all Phase 1 information
|
|
404
|
+
- Write to project root
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
✅ Generated: project-brief.md
|
|
408
|
+
|
|
409
|
+
📝 Please review this document. Do you need to make any corrections?
|
|
410
|
+
|
|
411
|
+
A) ✅ Looks perfect, continue to Phase 2
|
|
412
|
+
B) 📝 I'll edit it now (I'll wait)
|
|
413
|
+
C) 🔄 Regenerate with changes (tell me what to modify)
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
**If user selects B:**
|
|
417
|
+
|
|
418
|
+
```
|
|
419
|
+
Perfect. Please edit project-brief.md and type "ready" when you're done.
|
|
420
|
+
I'll re-read the file to update my context before continuing.
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Then execute: `read_file('project-brief.md')` to refresh context.
|
|
424
|
+
|
|
425
|
+
**If user selects C:**
|
|
426
|
+
Ask what needs to be changed and regenerate the document.
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
**Proceed to Phase 2 only after document is validated.**
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## PHASE 2: Data Architecture (15-20 min)
|
|
435
|
+
|