ai-flow-dev 1.3.0 → 2.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.
Files changed (44) hide show
  1. package/README.md +97 -30
  2. package/dist/cli.js +94 -110
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +6 -2
  5. package/prompts/backend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +5 -3
  6. package/prompts/backend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +36 -41
  7. package/prompts/backend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +80 -68
  8. package/prompts/backend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +82 -61
  9. package/prompts/backend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +10 -9
  10. package/prompts/backend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +8 -7
  11. package/prompts/backend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +5 -3
  12. package/prompts/backend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +410 -543
  13. package/prompts/backend/{flow-bootstrap-phase-9.md → flow-build-phase-9.md} +472 -91
  14. package/prompts/backend/{flow-bootstrap.md → flow-build.md} +212 -140
  15. package/prompts/backend/flow-dev-feature.md +447 -68
  16. package/prompts/backend/flow-dev-fix.md +81 -8
  17. package/prompts/backend/flow-docs-sync.md +2 -1
  18. package/prompts/frontend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
  19. package/prompts/frontend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
  20. package/prompts/frontend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
  21. package/prompts/frontend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
  22. package/prompts/frontend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +4 -2
  23. package/prompts/frontend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
  24. package/prompts/frontend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
  25. package/prompts/frontend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +238 -22
  26. package/prompts/frontend/{flow-bootstrap.md → flow-build.md} +108 -25
  27. package/prompts/frontend/flow-docs-sync.md +3 -2
  28. package/prompts/mobile/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
  29. package/prompts/mobile/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
  30. package/prompts/mobile/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
  31. package/prompts/mobile/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
  32. package/prompts/mobile/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +2 -1
  33. package/prompts/mobile/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
  34. package/prompts/mobile/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
  35. package/prompts/mobile/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +249 -23
  36. package/prompts/mobile/{flow-bootstrap.md → flow-build.md} +107 -26
  37. package/prompts/mobile/flow-docs-sync.md +3 -2
  38. package/templates/{mobile/AGENT.template.md → AGENT.template.md} +2 -17
  39. package/templates/backend/.clauderules.template +1 -1
  40. package/templates/backend/.cursorrules.template +1 -1
  41. package/templates/shared/AGENT.template.md +0 -252
  42. /package/prompts/backend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +0 -0
  43. /package/prompts/frontend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
  44. /package/prompts/mobile/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
@@ -4,6 +4,83 @@
4
4
 
5
5
  Your mission is to guide the user through creating **comprehensive, production-ready documentation** for their backend project through an interactive questionnaire that follows the dependency-aware order specified below.
6
6
 
7
+ ---
8
+
9
+ ## 🎯 Ejecución de Fase Específica
10
+
11
+ **IMPORTANTE:** Detectar si el usuario especificó una fase para ejecutar.
12
+
13
+ ### Detectar Argumento de Fase
14
+
15
+ Buscar en el mensaje del usuario patrones como:
16
+
17
+ - "fase 0", "fase 1", "fase 2", ..., "fase 9"
18
+ - "phase 0", "phase 1", etc.
19
+ - "ejecutar fase N"
20
+ - "run phase N"
21
+
22
+ ### Comportamiento
23
+
24
+ **Si se detecta "fase N" (donde N = 0-9):**
25
+
26
+ 1. **Validar que la fase existe para backend:**
27
+ - Fase 0: Context Discovery (opcional, solo proyectos existentes)
28
+ - Fase 1: Discovery & Business
29
+ - Fase 2: Data Architecture
30
+ - Fase 3: System Architecture
31
+ - Fase 4: Security & Authentication
32
+ - Fase 5: Code Standards
33
+ - Fase 6: Testing Strategy
34
+ - Fase 7: Operations & Deployment
35
+ - Fase 8: Project Setup & Final Documentation
36
+ - Fase 9: Implementation Roadmap (opcional)
37
+
38
+ 2. **Si la fase es válida:**
39
+ - Leer el archivo: `.ai-flow/prompts/backend/flow-build-phase-N.md`
40
+ - Ejecutar SOLO esa fase
41
+ - NO continuar con otras fases
42
+ - Al finalizar, informar al usuario que puede continuar con la siguiente fase usando `/flow-build fase N+1`
43
+
44
+ 3. **Si la fase es inválida:**
45
+ - Mostrar mensaje de error amigable
46
+ - Listar las fases válidas (0-9) con descripción de una línea
47
+
48
+ **Si NO se detecta "fase N":**
49
+
50
+ - Ejecutar el flujo completo normal (todas las fases en orden)
51
+ - Comenzar con Mode Selection (Interactive vs Smart Auto-Suggest)
52
+ - Continuar con Scope Selection (MVP/Production-Ready/Enterprise)
53
+ - Ejecutar Phases 0-9 según corresponda
54
+
55
+ ### Ejemplo de Lista de Fases Válidas
56
+
57
+ Si el usuario especifica una fase inválida, mostrar:
58
+
59
+ ```
60
+ ❌ Fase inválida. Las fases válidas para backend son:
61
+
62
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
63
+ 📋 Fases Disponibles - Backend
64
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65
+
66
+ /flow-build fase 0 - Context Discovery (solo proyectos existentes)
67
+ /flow-build fase 1 - Discovery & Business (problema, usuarios, objetivos)
68
+ /flow-build fase 2 - Data Architecture (entidades, relaciones, database)
69
+ /flow-build fase 3 - System Architecture (tech stack, patrones, APIs)
70
+ /flow-build fase 4 - Security & Authentication (auth, autorización, compliance)
71
+ /flow-build fase 5 - Code Standards (convenciones, formato, git workflow)
72
+ /flow-build fase 6 - Testing Strategy (tipos de tests, coverage, CI)
73
+ /flow-build fase 7 - Operations & Deployment (deployment, monitoreo, logging)
74
+ /flow-build fase 8 - Project Setup & Final Documentation (inicializar proyecto)
75
+ /flow-build fase 9 - Implementation Roadmap (plan con Story Points - opcional)
76
+
77
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
78
+
79
+ 💡 Tip: Usa /flow-build sin argumentos para ejecutar todas las fases en orden.
80
+ ```
81
+
82
+ ---
83
+
7
84
  ## Important Instructions
8
85
 
9
86
  1. **Ask for Questionnaire Mode FIRST** - Before anything else, ask the user to select: Interactive Mode or Smart Auto-Suggest Mode (see "Mode Selection" section below)
@@ -87,104 +164,124 @@ Ask these 6 questions one by one with progress indicator:
87
164
  **Critical Questions:**
88
165
 
89
166
  1. **Project Name & Description** (if new project - skip if Phase 0 detected)
90
-
91
167
  - What is the project name?
92
168
  - Provide a short description (1 sentence)
93
169
 
94
170
  2. **Project Overview**
95
-
96
171
  - What problem does this backend system solve? (2-3 sentences)
97
172
 
98
173
  3. **Business Objectives**
99
-
100
174
  - What are the top 3 measurable objectives for this project?
101
175
 
102
- 4. **System Type**
103
-
104
- - What type of system are you building? (E-commerce/SaaS/CRM/Social/etc.)
176
+ 4. **System Type** (Critical for auto-suggestions)
177
+ - What type of system are you building?
178
+
179
+ **Options:**
180
+ - A) E-commerce (Product catalog, cart, checkout)
181
+ - B) SaaS (Multi-tenant, subscriptions, RBAC)
182
+ - C) CRM (Contacts, leads, sales pipeline)
183
+ - D) Social Network (Users, posts, feeds, messaging)
184
+ - E) Content Management (Articles, media, publishing)
185
+ - F) Project Management (Projects, tasks, boards)
186
+ - G) API Platform (API keys, rate limiting, webhooks)
187
+ - H) Marketplace (Buyers, sellers, listings)
188
+ - I) IoT Platform (Devices, sensors, commands)
189
+ - J) Other (will use generic defaults)
105
190
 
106
191
  5. **Core Data Entities** (if new project - skip if Phase 0 detected)
107
-
108
192
  - List the main entities/models your system needs (e.g., User, Product, Order)
109
193
 
110
194
  6. **Backend Framework** (if new project - skip if Phase 0 detected)
111
195
  - Which backend framework will you use? (NestJS/FastAPI/Spring Boot/etc.)
112
196
 
113
- ### Step 2: Auto-Generate Suggestions
197
+ ### Step 2: Auto-Generate Intelligent Suggestions
114
198
 
115
- Based on the 6 critical answers, automatically suggest values for the remaining 65 questions using this logic:
199
+ Based on the 6 critical answers, automatically generate comprehensive suggestions using AI reasoning.
116
200
 
117
- **Auto-Suggestion Decision Tree:**
201
+ **Suggestion Logic:**
118
202
 
119
- ```
120
- // Phase 1 (Business) - Auto-suggest based on system type
121
- IF system_type == "E-commerce":
122
- target_users = "B2C + Mobile/Web apps"
123
- core_features = ["Authentication", "Product catalog", "Shopping cart", "Checkout", "Order management"]
203
+ For each phase, suggest defaults based on:
124
204
 
125
- IF system_type == "SaaS":
126
- target_users = "B2B + API consumers"
127
- core_features = ["Authentication with SSO", "Multi-tenant workspaces", "RBAC", "Subscription billing"]
205
+ - **System Type** - E-commerce needs cart/checkout, SaaS needs multi-tenancy, etc.
206
+ - **Framework** - NestJS Prisma, FastAPI → SQLAlchemy, Django → Django ORM
207
+ - **Scope** - MVP simple setup, Production → robust setup, Enterprise → full observability
128
208
 
129
- // Phase 2 (Data) - Auto-suggest based on entities and system type
130
- database = "PostgreSQL" (default for most projects)
131
- orm = MATCH framework:
132
- NestJS → "Prisma"
133
- FastAPI → "SQLAlchemy"
134
- Spring Boot → "Hibernate/JPA"
209
+ **What Gets Auto-Generated:**
135
210
 
136
- // Phase 3 (Architecture) - Auto-suggest based on framework
137
- api_style = "REST" (standard)
138
- architecture_pattern = "Clean Architecture" (modular, testable)
211
+ **Phase 1 (Business):**
139
212
 
140
- // Phase 4 (Security) - Best practices
141
- auth_method = "JWT"
142
- authorization = "RBAC"
143
- password_policy = "8+ chars, bcrypt 12 rounds"
213
+ - Target users based on system type
214
+ - Core features typical for the system type
215
+ - Success metrics appropriate for the domain
144
216
 
145
- // Phase 5 (Code Standards) - Based on framework
146
- formatter = MATCH framework:
147
- NestJS/Node.js → "Prettier + ESLint"
148
- Python → "Black + pylint"
149
- Java → "Spotless + Checkstyle"
217
+ **Phase 2 (Data):**
150
218
 
151
- // Phase 6 (Testing) - Based on scope
152
- IF scope == "MVP":
153
- coverage_target = "15-25%"
154
- test_types = ["Integration only"]
155
- ELSE:
156
- coverage_target = "60-80%"
157
- test_types = ["Unit (70%)", "Integration (20%)", "E2E (10%)"]
219
+ - Database: PostgreSQL (most common)
220
+ - ORM: Match framework idiomatically
221
+ - Caching: Redis for Production/Enterprise
222
+ - Search: Elasticsearch only for Enterprise
158
223
 
159
- // Phase 7 (Operations) - Based on scope
160
- IF scope == "MVP":
161
- deployment = "PaaS (Heroku/Railway)"
162
- monitoring = "Basic (Sentry for errors)"
163
- ELSE:
164
- deployment = "Cloud (AWS/GCP)"
165
- monitoring = "Full (Datadog APM + Sentry)"
166
- ```
224
+ **Phase 3 (Architecture):**
225
+
226
+ - Pattern: Monolith (MVP) → Clean Architecture (Production) → Microservices (Enterprise)
227
+ - API: REST only (MVP) REST + GraphQL (Production) → + gRPC (Enterprise)
228
+ - ✅ Scaling strategy based on scope
229
+
230
+ **Phase 4 (Security):**
231
+
232
+ - ✅ Auth: JWT for MVP/Production, OAuth2 + SSO for Enterprise
233
+ - ✅ Authorization: RBAC standard, ABAC for Enterprise
234
+ - ✅ Password policies per scope
235
+ - ✅ Rate limiting and CORS enabled
236
+
237
+ **Phase 5 (Code Standards):**
238
+
239
+ - ✅ Formatter/Linter matching framework (Prettier+ESLint, Black+pylint, etc.)
240
+ - ✅ Git workflow: GitHub Flow (MVP), Git Flow (Production)
241
+ - ✅ Conventional Commits
242
+
243
+ **Phase 6 (Testing):**
244
+
245
+ - ✅ Framework matching tech stack
246
+ - ✅ Coverage: 20% (MVP), 70% (Production), 85% (Enterprise)
247
+ - ✅ Test types distribution
248
+
249
+ **Phase 7 (Operations):**
250
+
251
+ - ✅ Deployment: PaaS (MVP), Cloud (Production), Multi-region (Enterprise)
252
+ - ✅ CI/CD: GitHub Actions
253
+ - ✅ Monitoring: Basic (MVP), APM (Production), Full observability (Enterprise)
167
254
 
168
255
  ### Step 3: Present Summary for Review
169
256
 
170
- After auto-generating all suggestions, present a two-tier summary:
257
+ After auto-generating all suggestions, present a clear summary:
171
258
 
172
- #### **Quick Summary (1 paragraph max)**
259
+ #### **Quick Summary (1 paragraph)**
173
260
 
174
261
  ```
175
262
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
176
263
  ✅ Configuration Complete - Quick Summary
177
264
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
178
265
 
179
- Your [System Type] backend will use [Framework] with [Database], following Clean Architecture with [X] entities ([list main entities]). Security includes JWT auth with RBAC, bcrypt passwords, and rate limiting. Code follows [Language] best practices with [Formatter/Linter], targeting [X]% test coverage. Deployment to [Platform] with [Monitoring] for production readiness.
266
+ Your [System Type] backend will use [Framework] with [Database], following
267
+ [Architecture Pattern] with [X] entities ([entity names]). Security includes
268
+ [Auth Method] with [Authorization], [Password Policy]. Code follows
269
+ [Formatter] + [Linter], targeting [Coverage Target] test coverage. Deployment
270
+ to [Deployment Platform] with [Monitoring] for production readiness.
180
271
 
181
272
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
182
273
  ```
183
274
 
184
- **Example:**
275
+ **Example (E-commerce + NestJS + Production):**
185
276
 
186
277
  ```
187
- Your E-commerce backend will use NestJS (TypeScript) with PostgreSQL and Prisma, following Clean Architecture with 8 entities (User, Product, Category, Cart, Order, Payment, Address, Review). Security includes JWT auth with RBAC (admin, user roles), bcrypt passwords, and rate limiting on all endpoints. Code follows TypeScript strict mode with Prettier + ESLint, targeting 60-80% test coverage with Jest. Deployment to Heroku for MVP with Sentry error tracking for production readiness.
278
+ Your E-commerce backend will use NestJS with PostgreSQL, following Clean
279
+ Architecture with 8 entities (User, Product, Category, Cart, Order, Payment,
280
+ Address, Review). Security includes JWT + Refresh Tokens with RBAC,
281
+ 12+ characters bcrypt 12 rounds. Code follows Prettier + ESLint +
282
+ @typescript-eslint, targeting 70% test coverage. Deployment to Cloud
283
+ (AWS/GCP/Azure) with APM (Datadog/New Relic) + Sentry for production
284
+ readiness.
188
285
  ```
189
286
 
190
287
  #### **Extended Report (Organized by Phase)**
@@ -195,67 +292,43 @@ Your E-commerce backend will use NestJS (TypeScript) with PostgreSQL and Prisma,
195
292
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
196
293
 
197
294
  **Phase 1: Business & Discovery**
198
- • System Type: [E-commerce]
199
- • Target Users: External end-users (B2C) + Mobile/Web apps
200
- • Core Features: Authentication, Product catalog with search/filters, Shopping cart, Checkout and payment, Order management, Inventory tracking, Admin dashboard
201
- Scope: V1 includes auth + catalog + cart + checkout; V2 defers advanced analytics, third-party integrations
202
- • Constraints: Time (MVP by Q2 2025)
203
- • Success Metrics: 1k→10k users, <200ms response, 99% uptime
295
+ • System Type: [From user input]
296
+ • Target Users: [AI-suggested based on system type]
297
+ • Core Features: [AI-suggested based on system type]
298
+ Success Metrics: [AI-suggested based on system type]
204
299
 
205
300
  **Phase 2: Data Architecture**
206
- • Database: PostgreSQL 15 (ACID, relational, JSON support)
207
- • ORM: Prisma 5.x (type-safe, auto-migrations)
208
- Entities: User, Product, Category, Cart, Order, OrderItem, Payment, Address
209
- Relationships: User→Order (1:N), Order→OrderItem (1:N), User→Cart (1:N), Category→Product (1:N)
210
- • Data Volume: Low (<10k records), Moderate growth, Low complexity (text-based)
211
- • Retention: Keep forever (no auto-deletion)
301
+ • Database: [AI-suggested from scope]
302
+ • ORM: [AI-suggested from framework]
303
+ Caching: [AI-suggested from scope]
304
+ Core Entities: [From user input]
212
305
 
213
306
  **Phase 3: System Architecture**
214
- • Framework: NestJS 10.x (TypeScript, enterprise-ready)
215
- Language: TypeScript 5.3 with strict mode
216
- • API Style: REST with OpenAPI/Swagger auto-docs
217
- Architecture: Clean Architecture (feature-based modules)
218
- • External Services: SendGrid (email), Stripe (payments), AWS S3 (file storage)
219
- Caching: None for MVP (defer to V2)
220
- Background Jobs: None for MVP
221
-
222
- **Phase 4: Security & Authentication**
223
- • Auth Method: JWT (stateless, scalable)
224
- • Token Config: 15min access, 7d refresh, RS256 algorithm
225
- • Authorization: RBAC with roles (admin, user, moderator)
226
- • Password Policy: 8+ chars, uppercase + lowercase + number, bcrypt 12 rounds
227
- • Rate Limiting: 5/15min (auth), 100/min (read), 30/min (write)
228
- • CORS: Specific origins (https://myapp.com + localhost:3000 for dev)
229
- • Encryption: TLS 1.2+ in transit, AES-256 for PII fields at rest
230
- • Compliance: GDPR (if EU users) - data export, deletion rights
307
+ • Framework: [From user input]
308
+ Pattern: [AI-suggested from scope]
309
+ • API Style: [AI-suggested from scope]
310
+ Scaling: [AI-suggested from scope]
311
+
312
+ **Phase 4: Security**
313
+ Authentication: [AI-suggested from scope]
314
+ • Authorization: [AI-suggested from scope]
315
+ Password Policy: [AI-suggested from scope]
231
316
 
232
317
  **Phase 5: Code Standards**
233
- • Formatter: Prettier + ESLint (2 spaces, single quotes, semicolons)
234
- Naming: kebab-case files, PascalCase classes, camelCase functions
235
- Structure: Feature-based modules (users/, products/, orders/)
236
- • Documentation: JSDoc for public APIs and complex logic
237
- Error Handling: Centralized exception handler with custom error classes
238
- Logging: Winston with JSON structured logs
239
- Git Workflow: Feature branch + PR with 1 reviewer approval
240
- • Commits: Conventional Commits (feat/fix/docs/chore)
241
-
242
- **Phase 6: Testing Strategy**
243
- • Framework: Jest (unit + integration + e2e)
244
- • Coverage Target: 60-80% overall
245
- • Test Distribution: 70% unit, 20% integration, 10% e2e
246
- • Test Database: In-memory SQLite for fast tests
247
- • Mocking: External APIs, payment gateways, email service
248
- • CI Integration: GitHub Actions with automated test runs on PR
249
-
250
- **Phase 7: Operations & Deployment**
251
- • Platform: Heroku (PaaS for fast MVP deployment)
252
- • Containerization: Docker + Docker Compose for local dev
253
- • Environments: Development (local), Staging (Heroku pipeline), Production (Heroku)
254
- • CI/CD: GitHub Actions (test → build → deploy to staging → manual approval → production)
255
- • Monitoring: Sentry for error tracking, basic console logs
256
- • Health Checks: /health endpoint with database connectivity check
257
- • Backups: Daily automated PostgreSQL backups (Heroku addon)
318
+ • Formatter: [AI-suggested from framework]
319
+ Linter: [AI-suggested from framework]
320
+ Git Workflow: [AI-suggested from scope]
321
+
322
+ **Phase 6: Testing**
323
+ Coverage Target: [AI-suggested from scope]
324
+ Framework: [AI-suggested from framework]
258
325
 
326
+ **Phase 7: Operations**
327
+ • Deployment: [AI-suggested from scope]
328
+ • Monitoring: [AI-suggested from scope]
329
+
330
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
331
+ 💡 These suggestions can be customized during document review.
259
332
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
260
333
  ```
261
334
 
@@ -289,7 +362,7 @@ Your choice (A/B/C): __
289
362
 
290
363
  ### Step 5: Generate Documentation
291
364
 
292
- Generate all 17 documents using the confirmed values (either auto-suggested or user-customized).
365
+ Generate all 17 documents using the confirmed values (either AI-suggested or user-customized).
293
366
 
294
367
  ---
295
368
 
@@ -297,26 +370,26 @@ Generate all 17 documents using the confirmed values (either auto-suggested or u
297
370
 
298
371
  This documentation is **modularized** for better maintainability and performance. Each phase is in a separate file.
299
372
 
300
- ### For Complete Bootstrap (All Phases)
373
+ ### For Complete Build (All Phases)
301
374
 
302
375
  Execute phases sequentially by reading each file in order:
303
376
 
304
- 1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-0-context.md`
305
- 2. **Phase 1 (Discovery & Business):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-1-business.md`
306
- 3. **Phase 2 (Data Architecture):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-2-data.md`
307
- 4. **Phase 3 (System Architecture):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-3-architecture.md`
308
- 5. **Phase 4 (Security & Authentication):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md`
309
- 6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-5-standards.md`
310
- 7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-6-testing.md`
311
- 8. **Phase 7 (Operations & Deployment):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-7-operations.md`
312
- 9. **Phase 8 (Project Setup & Final Documentation):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-8.md`
377
+ 1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/backend/flow-build-phase-0-context.md`
378
+ 2. **Phase 1 (Discovery & Business):** Read `.ai-flow/prompts/backend/flow-build-phase-1-business.md`
379
+ 3. **Phase 2 (Data Architecture):** Read `.ai-flow/prompts/backend/flow-build-phase-2-data.md`
380
+ 4. **Phase 3 (System Architecture):** Read `.ai-flow/prompts/backend/flow-build-phase-3-architecture.md`
381
+ 5. **Phase 4 (Security & Authentication):** Read `.ai-flow/prompts/backend/flow-build-phase-4-security.md`
382
+ 6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/backend/flow-build-phase-5-standards.md`
383
+ 7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/backend/flow-build-phase-6-testing.md`
384
+ 8. **Phase 7 (Operations & Deployment):** Read `.ai-flow/prompts/backend/flow-build-phase-7-operations.md`
385
+ 9. **Phase 8 (Project Setup & Final Documentation):** Read `.ai-flow/prompts/backend/flow-build-phase-8.md`
313
386
 
314
387
  ### For Individual Phases
315
388
 
316
389
  You can execute any phase independently by reading its file. For example:
317
390
 
318
391
  ```
319
- Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute only Phase 4
392
+ Read .ai-flow/prompts/backend/flow-build-phase-4-security.md and execute only Phase 4
320
393
  ```
321
394
 
322
395
  ---
@@ -325,7 +398,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
325
398
 
326
399
  ### Phase 0: Context Discovery (Optional)
327
400
 
328
- **File:** `backend/flow-bootstrap-phase-0-context.md`
401
+ **File:** `backend/flow-build-phase-0-context.md`
329
402
  **For:** Existing projects with code/documentation
330
403
  **Duration:** 1-5 minutes (automated analysis)
331
404
  **Output:** Pre-populated answers, project analysis
@@ -345,7 +418,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
345
418
 
346
419
  ### Phase 1: Discovery & Business
347
420
 
348
- **File:** `backend/flow-bootstrap-phase-1-business.md`
421
+ **File:** `backend/flow-build-phase-1-business.md`
349
422
  **Duration:** 15-20 minutes
350
423
  **Key Questions:**
351
424
 
@@ -363,7 +436,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
363
436
 
364
437
  ### Phase 2: Data Architecture
365
438
 
366
- **File:** `backend/flow-bootstrap-phase-2-data.md`
439
+ **File:** `backend/flow-build-phase-2-data.md`
367
440
  **Duration:** 15-20 minutes
368
441
  **Key Questions:**
369
442
 
@@ -381,7 +454,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
381
454
 
382
455
  ### Phase 3: System Architecture
383
456
 
384
- **File:** `backend/flow-bootstrap-phase-3-architecture.md`
457
+ **File:** `backend/flow-build-phase-3-architecture.md`
385
458
  **Duration:** 15-20 minutes
386
459
  **Key Questions:**
387
460
 
@@ -401,7 +474,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
401
474
 
402
475
  ### Phase 4: Security & Authentication
403
476
 
404
- **File:** `backend/flow-bootstrap-phase-4-security.md`
477
+ **File:** `backend/flow-build-phase-4-security.md`
405
478
  **Duration:** 15-20 minutes
406
479
  **Key Questions:**
407
480
 
@@ -419,7 +492,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
419
492
 
420
493
  ### Phase 5: Code Standards
421
494
 
422
- **File:** `backend/flow-bootstrap-phase-5-standards.md`
495
+ **File:** `backend/flow-build-phase-5-standards.md`
423
496
  **Duration:** 15-20 minutes
424
497
  **Key Questions:**
425
498
 
@@ -437,7 +510,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
437
510
 
438
511
  ### Phase 6: Testing Strategy
439
512
 
440
- **File:** `backend/flow-bootstrap-phase-6-testing.md`
513
+ **File:** `backend/flow-build-phase-6-testing.md`
441
514
  **Duration:** 15-25 minutes
442
515
  **Key Questions:**
443
516
 
@@ -455,7 +528,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
455
528
 
456
529
  ### Phase 7: Operations & Deployment
457
530
 
458
- **File:** `backend/flow-bootstrap-phase-7-operations.md`
531
+ **File:** `backend/flow-build-phase-7-operations.md`
459
532
  **Duration:** 10 minutes
460
533
  **Key Questions:**
461
534
 
@@ -476,7 +549,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
476
549
 
477
550
  ### Phase 8: Project Setup & Final Documentation
478
551
 
479
- **File:** `backend/flow-bootstrap-phase-8.md`
552
+ **File:** `backend/flow-build-phase-8.md`
480
553
  **Duration:** 10-15 minutes
481
554
  **Key Steps:**
482
555
 
@@ -501,7 +574,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
501
574
 
502
575
  ### Phase 9: Implementation Roadmap (Optional)
503
576
 
504
- **File:** `backend/flow-bootstrap-phase-9.md`
577
+ **File:** `backend/flow-build-phase-9.md`
505
578
  **Duration:** 15-30 minutes
506
579
  **Key Steps:**
507
580
 
@@ -543,7 +616,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
543
616
  **Command:**
544
617
 
545
618
  ```
546
- Read .ai-flow/prompts/backend/flow-bootstrap-phase-1-business.md and execute Phase 1
619
+ Read .ai-flow/prompts/backend/flow-build-phase-1-business.md and execute Phase 1
547
620
  ```
548
621
 
549
622
  ---
@@ -565,7 +638,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-1-business.md and execute Pha
565
638
  **Command:**
566
639
 
567
640
  ```
568
- Read .ai-flow/prompts/backend/flow-bootstrap-phase-0-context.md and execute Phase 0
641
+ Read .ai-flow/prompts/backend/flow-build-phase-0-context.md and execute Phase 0
569
642
  ```
570
643
 
571
644
  ---
@@ -636,7 +709,7 @@ Before starting Phase 1, you'll select a scope level:
636
709
  2. Customize as needed for your specific project
637
710
  3. Share `AGENT.md` with your team
638
711
  4. Update documents as your project evolves
639
- 5. Use `/bootstrap-phase[N]` commands to regenerate individual sections
712
+ 5. Use `/flow-build-phase-[N]` commands to regenerate individual sections
640
713
 
641
714
  ---
642
715
 
@@ -701,8 +774,8 @@ As your project evolves, your documentation may become out of sync with your cod
701
774
  2. **Then:**
702
775
  - 🆕 **New Project + Mode A:** Execute all phases sequentially, ask all questions
703
776
  - 🆕 **New Project + Mode B:** Ask 6 critical questions, auto-suggest the rest, show summary
704
- - 📁 **Existing Project + Mode A:** Read `flow-bootstrap-phase-0-context.md` first, then proceed with all phases
705
- - 📁 **Existing Project + Mode B:** Read `flow-bootstrap-phase-0-context.md` first, then ask remaining critical questions
777
+ - 📁 **Existing Project + Mode A:** Read `flow-build-phase-0-context.md` first, then proceed with all phases
778
+ - 📁 **Existing Project + Mode B:** Read `flow-build-phase-0-context.md` first, then ask remaining critical questions
706
779
  - 🔄 **Update Docs:** Use `/flow-docs-sync` command
707
780
 
708
781
  ---
@@ -817,7 +890,7 @@ git add .ai-flow/
817
890
  # Create initial commit with documentation metadata
818
891
  git commit -m "docs: initial project documentation
819
892
 
820
- Generated by AI Flow /flow-bootstrap command:
893
+ Generated by AI Flow /flow-build command:
821
894
  - 17 documentation files (backend)
822
895
  - Architecture: {{ARCHITECTURE_PATTERN}}
823
896
  - Tech stack: {{FRAMEWORK}}, {{DATABASE}}, {{ORM}}
@@ -864,7 +937,7 @@ Your choice (A): __
864
937
 
865
938
  1. Review documentation in .ai-flow/templates/
866
939
  2. When ready, run Phase 8:
867
- → Read .ai-flow/prompts/backend/flow-bootstrap-phase-8.md
940
+ → Read .ai-flow/prompts/backend/flow-build-phase-8.md
868
941
  → Detects project state, initializes framework (optional), generates final docs
869
942
  3. (Optional) Continue to Phase 9: Implementation Roadmap (15-30 min)
870
943
  → Generates complete implementation plan with Story Points
@@ -882,4 +955,3 @@ _Version: 4.0 (Phase 9 integrated - Implementation Roadmap with Story Points)_
882
955
  _Last Updated: 2025-12-09_
883
956
  _Version: 3.0 (Unified workflow: Phase 8 integrates project setup + final docs generation)_
884
957
  _AI Flow - Transform your idea into production-ready code in minutes_
885
-