ai-flow-dev 1.0.3 → 1.1.2

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 (41) hide show
  1. package/README.md +60 -35
  2. package/dist/cli.js +204 -236
  3. package/dist/cli.js.map +1 -1
  4. package/dist/fs-utils.js +3 -39
  5. package/dist/fs-utils.js.map +1 -1
  6. package/package.json +11 -12
  7. package/prompts/backend/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +41 -108
  8. package/prompts/backend/flow-bootstrap-phase-8.md +911 -0
  9. package/prompts/backend/{flow-project-roadmap.md → flow-bootstrap-phase-9.md} +255 -344
  10. package/prompts/backend/{flow-docs-gen.md → flow-bootstrap.md} +102 -37
  11. package/prompts/frontend/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +2 -1
  12. package/prompts/frontend/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +2 -1
  13. package/prompts/frontend/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +2 -1
  14. package/prompts/frontend/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +2 -1
  15. package/prompts/frontend/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +2 -1
  16. package/prompts/frontend/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +2 -1
  17. package/prompts/frontend/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +225 -200
  18. package/prompts/frontend/flow-bootstrap-phase-8.md +670 -0
  19. package/prompts/frontend/{flow-docs-gen.md → flow-bootstrap.md} +47 -20
  20. package/prompts/frontend/flow-docs-sync.md +2 -1
  21. package/prompts/mobile/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +2 -1
  22. package/prompts/mobile/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +2 -1
  23. package/prompts/mobile/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +2 -1
  24. package/prompts/mobile/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +2 -1
  25. package/prompts/mobile/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +2 -1
  26. package/prompts/mobile/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +2 -1
  27. package/prompts/mobile/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +2 -1
  28. package/prompts/mobile/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +174 -132
  29. package/prompts/mobile/flow-bootstrap-phase-8.md +676 -0
  30. package/prompts/mobile/{flow-docs-gen.md → flow-bootstrap.md} +47 -20
  31. package/prompts/mobile/flow-docs-sync.md +2 -1
  32. package/templates/shared/AGENT.template.md +1 -1
  33. package/prompts/backend/flow-project-init.md +0 -332
  34. /package/prompts/backend/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +0 -0
  35. /package/prompts/backend/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +0 -0
  36. /package/prompts/backend/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +0 -0
  37. /package/prompts/backend/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +0 -0
  38. /package/prompts/backend/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +0 -0
  39. /package/prompts/backend/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +0 -0
  40. /package/prompts/backend/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +0 -0
  41. /package/prompts/frontend/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +0 -0
@@ -1,43 +1,45 @@
1
- # AI Flow - Project Roadmap Generator
1
+ # AI Flow - Phase 9: Implementation Roadmap 🗺️
2
2
 
3
3
  **YOU ARE AN EXPERT PROJECT MANAGER AND TECHNICAL ARCHITECT.**
4
4
 
5
- Your mission is to analyze the complete project documentation and generate a detailed implementation roadmap with Story Point estimations when the user executes `/flow-project-roadmap`.
5
+ Your mission in Phase 9 is to analyze all project documentation and generate a detailed implementation roadmap with Story Point estimations.
6
6
 
7
7
  ---
8
8
 
9
- ## Command: `/flow-project-roadmap`
10
-
11
- ### Objective
9
+ ## 🎯 Phase 9 Objective
12
10
 
13
11
  Generate a complete, prioritized implementation roadmap with Fibonacci-based Story Point estimations, organized into Epics, Features, and Tasks following GitHub Projects format.
14
12
 
15
- ### Prerequisites
13
+ ---
14
+
15
+ ## Prerequisites
16
16
 
17
- Before executing this command, ensure:
17
+ Before executing Phase 9, verify:
18
18
 
19
- - ✅ `/flow-docs-gen` completed (documentation generated)
20
- - ✅ `/flow-project-init` completed (project initialized with framework)
21
- - ✅ All documentation files exist in `.ai-flow/templates/`
19
+ - ✅ Phase 8 completed (all documentation generated)
20
+ - ✅ Project initialized with framework (done in Phase 8)
21
+ - ✅ All documentation files exist in `.ai-flow/` directory
22
+
23
+ ---
22
24
 
23
- ### Duration
25
+ ## Duration
24
26
 
25
27
  ⏱️ **Estimated Time:** 15-30 minutes
26
28
 
27
29
  ---
28
30
 
29
- ## Workflow: 5 Phases
31
+ ## Workflow: 6 Steps
30
32
 
31
- ### Phase 1: Documentation Analysis (5-8 minutes - automatic)
33
+ ### Step 9.1: Documentation Analysis (5-8 minutes - automatic)
32
34
 
33
35
  **Read and analyze all generated documentation:**
34
36
 
35
37
  ```
36
38
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
37
- 📊 Analyzing Project Documentation
39
+ 📊 Phase 9/9: Implementation Roadmap Generation
38
40
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
39
41
 
40
- Phase 1/5: Reading documentation files...
42
+ Step 9.1/6: Analyzing Project Documentation...
41
43
 
42
44
  ✅ project-brief.md (business objectives, scope, constraints)
43
45
  ✅ ai-instructions.md (tech stack, framework, ORM)
@@ -51,10 +53,10 @@ Phase 1/5: Reading documentation files...
51
53
  ✅ specs/security.md (authentication, authorization, compliance)
52
54
  ✅ specs/configuration.md (environment variables, integrations)
53
55
 
54
- Extracting key information...
56
+ Extracting structured information...
55
57
  ```
56
58
 
57
- **Extract structured data:**
59
+ **Extract and analyze:**
58
60
 
59
61
  1. **Business Context** (from `project-brief.md`):
60
62
 
@@ -118,11 +120,11 @@ Extracting key information...
118
120
  - Logging strategy
119
121
  - Backup strategy
120
122
 
121
- **Progress indicator:**
123
+ **Show analysis summary:**
122
124
 
123
125
  ```
124
126
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
125
- 📈 Analysis Results
127
+ 📈 Analysis Complete
126
128
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
127
129
 
128
130
  🎯 Business Scope:
@@ -146,22 +148,22 @@ Extracting key information...
146
148
  • Test types: Unit, Integration, E2E
147
149
  • {{ESTIMATED_TEST_COUNT}} tests estimated
148
150
 
149
- Proceeding to roadmap generation...
151
+ Proceeding to Epic definition...
150
152
  ```
151
153
 
152
154
  ---
153
155
 
154
- ### Phase 2: Epic Definition (3-5 minutes - automatic)
156
+ ### Step 9.2: Epic Definition (3-5 minutes - automatic)
155
157
 
156
- **Organize functionality into high-level Epics following industry standard patterns:**
158
+ **Organize functionality into high-level Epics:**
157
159
 
158
160
  ```
159
161
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
160
- 🎯 Phase 2/5: Defining Epics
162
+ 🎯 Step 9.2/6: Defining Epics
161
163
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
162
164
  ```
163
165
 
164
- **Standard Epic Structure (adaptable based on project type):**
166
+ **Standard Epic Structure:**
165
167
 
166
168
  1. **Foundation Epic** (Infrastructure, core setup)
167
169
  2. **Data Layer Epic** (Entities, repositories, migrations)
@@ -171,42 +173,14 @@ Proceeding to roadmap generation...
171
173
  6. **Testing & Quality Epic** (Comprehensive test coverage)
172
174
  7. **Operations & Deployment Epic** (CI/CD, monitoring, docs)
173
175
 
174
- **Epic Definition Logic:**
175
-
176
- **Epic 1: Foundation • {{FOUNDATION_SP}} SP**
177
-
178
- - Always first priority
179
- - Includes: Base configuration, error handling, logging, validation utils
180
- - Estimated based on framework complexity
181
-
182
- **Epic 2: Data Layer • {{DATA_LAYER_SP}} SP**
183
-
184
- - Priority: P0 (blocking all other features)
185
- - Includes: All entities from `docs/data-model.md`, repositories, migrations
186
- - Estimated: 3-5 SP per entity (simple) to 8-13 SP (complex with relationships)
187
-
188
- **Epic 3: Authentication & Authorization • {{AUTH_SP}} SP**
176
+ **Epic Estimation Guidelines:**
189
177
 
190
- - Priority: P0 (required for protected endpoints)
191
- - Includes: Auth implementation from `specs/security.md`
192
- - Estimated: 8 SP (basic JWT) to 21 SP (multi-provider + RBAC + 2FA)
193
-
194
- **Epic 4-N: Business Features**
195
-
196
- - Grouped by domain/module from `docs/api.md` and `docs/business-flows.md`
197
- - Priority: P0 (MVP), P1 (High), P2 (Medium), P3 (Nice-to-have)
198
- - Each business epic includes: endpoints + business logic + tests
199
-
200
- **Epic N-1: Integration • {{INTEGRATION_SP}} SP**
201
-
202
- - Priority: P1-P2 (depends on external dependencies)
203
- - Includes: All external services from `specs/configuration.md`
204
- - Estimated: 5-8 SP per integration
205
-
206
- **Epic N: Operations & Deployment • {{OPS_SP}} SP**
207
-
208
- - Priority: P1 (production readiness)
209
- - Includes: Final CI/CD polish, monitoring, documentation finalization
178
+ - **Foundation Epic:** 13-21 SP (depends on framework complexity)
179
+ - **Data Layer Epic:** 3-5 SP per simple entity, 8-13 SP per complex entity
180
+ - **Auth Epic:** 8 SP (basic JWT) to 21 SP (multi-provider + RBAC + 2FA)
181
+ - **Business Epics:** Varies by domain complexity
182
+ - **Integration Epic:** 5-8 SP per external service
183
+ - **Operations Epic:** 13 SP (standard CI/CD + monitoring)
210
184
 
211
185
  **Example output:**
212
186
 
@@ -215,71 +189,62 @@ Epics identified:
215
189
 
216
190
  ## 🏗️ Epic 1: Foundation & Infrastructure • 21 SP
217
191
  Priority: P0 | Est. Time: ~2 weeks
218
- - Base application setup, core utilities, error handling, logging
192
+ Base application setup, core utilities, error handling, logging
219
193
 
220
194
  ## 💾 Epic 2: Data Layer • 34 SP
221
195
  Priority: P0 | Est. Time: ~3 weeks
222
- - 7 entities, repositories, migrations, seeding
196
+ 7 entities, repositories, migrations, seeding
223
197
 
224
198
  ## 🔐 Epic 3: Authentication & Authorization • 21 SP
225
199
  Priority: P0 | Est. Time: ~2 weeks
226
- - JWT authentication, RBAC, password reset, 2FA
200
+ JWT authentication, RBAC, password reset, 2FA
227
201
 
228
202
  ## 👤 Epic 4: User Management • 13 SP
229
203
  Priority: P0 | Est. Time: ~1 week
230
- - User CRUD, profile management, preferences
204
+ User CRUD, profile management, preferences
231
205
 
232
206
  ## 🛒 Epic 5: Product Catalog • 21 SP
233
207
  Priority: P0 | Est. Time: ~2 weeks
234
- - Products, categories, search, filters, inventory
208
+ Products, categories, search, filters, inventory
235
209
 
236
210
  ## 🛍️ Epic 6: Order Management • 34 SP
237
211
  Priority: P1 | Est. Time: ~3 weeks
238
- - Shopping cart, checkout, orders, order tracking
212
+ Shopping cart, checkout, orders, order tracking
239
213
 
240
214
  ## 💳 Epic 7: Payment Processing • 21 SP
241
215
  Priority: P1 | Est. Time: ~2 weeks
242
- - Stripe integration, webhooks, refunds
216
+ Stripe integration, webhooks, refunds
243
217
 
244
218
  ## 📧 Epic 8: Notifications • 13 SP
245
219
  Priority: P2 | Est. Time: ~1 week
246
- - Email notifications, push notifications, preferences
220
+ Email notifications, push notifications, preferences
247
221
 
248
222
  ## 📊 Epic 9: Analytics & Reporting • 13 SP
249
223
  Priority: P2 | Est. Time: ~1 week
250
- - Admin dashboard, sales reports, user analytics
224
+ Admin dashboard, sales reports, user analytics
251
225
 
252
226
  ## 🔧 Epic 10: Operations & Deployment • 13 SP
253
227
  Priority: P1 | Est. Time: ~1 week
254
- - CI/CD finalization, monitoring, logging, backups
228
+ CI/CD finalization, monitoring, logging, backups
255
229
 
256
230
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
257
- 📊 Total: 204 SP (~20 weeks with 1 developer, ~10 weeks with 2)
231
+ 📊 Total: 204 SP (~20 weeks with 1 developer)
258
232
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
259
233
  ```
260
234
 
261
235
  ---
262
236
 
263
- ### Phase 3: Feature Breakdown (5-10 minutes - automatic)
237
+ ### Step 9.3: Feature Breakdown (5-10 minutes - automatic)
264
238
 
265
- **Break down each Epic into Features (GitHub-style):**
239
+ **Break down each Epic into Features with Story Points:**
266
240
 
267
241
  ```
268
242
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
269
- 🔨 Phase 3/5: Breaking Down Features
243
+ 🔨 Step 9.3/6: Breaking Down Features with Story Points
270
244
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
271
245
  ```
272
246
 
273
- **Feature Definition Logic:**
274
-
275
- For each Epic, analyze:
276
-
277
- - What endpoints belong to this Epic? (from `docs/api.md`)
278
- - What entities are involved? (from `docs/data-model.md`)
279
- - What business flows? (from `docs/business-flows.md`)
280
- - What tests are needed? (from `docs/testing.md`)
281
-
282
- **Feature Estimation (Fibonacci Scale):**
247
+ **Story Points Reference (Fibonacci Scale):**
283
248
 
284
249
  ```
285
250
  Story Points | Complexity | Typical Time | Examples
@@ -291,12 +256,27 @@ Story Points | Complexity | Typical Time | Examples
291
256
  8 SP | Complex | 2-3 days | Auth flow, complex business rule
292
257
  13 SP | Large | 1 week | Complete module with tests
293
258
  21 SP | Very Large | 2 weeks | Major feature, integration
259
+ 34 SP | Epic | 3 weeks | Multiple related features
294
260
  ```
295
261
 
262
+ **Feature Breakdown Logic:**
263
+
264
+ For each Epic:
265
+
266
+ 1. Identify all related endpoints (from `docs/api.md`)
267
+ 2. Identify involved entities (from `docs/data-model.md`)
268
+ 3. Identify business flows (from `docs/business-flows.md`)
269
+ 4. Estimate complexity based on:
270
+ - Number of fields and validations
271
+ - Relationships complexity
272
+ - Business logic complexity
273
+ - Testing requirements
274
+ - External integrations
275
+
296
276
  **Feature Template:**
297
277
 
298
- ```markdown
299
- ### Feature: {{FEATURE_NAME}} • {{SP}} SP
278
+ ````markdown
279
+ ### Feature {{NUMBER}}: {{FEATURE_NAME}} • {{SP}} SP
300
280
 
301
281
  ⏱️ **Est. Time:** {{TIME_RANGE}}
302
282
  🎯 **Priority:** {{PRIORITY}}
@@ -311,16 +291,16 @@ Story Points | Complexity | Typical Time | Examples
311
291
 
312
292
  **Tasks:**
313
293
 
314
- - [ ] Create {{ENTITY}} entity with validation
315
- - [ ] Create {{REPOSITORY}} repository
316
- - [ ] Implement {{SERVICE}} service
317
- - [ ] Create {{CONTROLLER}} controller
318
- - [ ] Add {{ENDPOINT_1}} endpoint
319
- - [ ] Add {{ENDPOINT_2}} endpoint
320
- - [ ] Write unit tests for service ({{COUNT}} tests)
321
- - [ ] Write integration tests for endpoints ({{COUNT}} tests)
322
- - [ ] Update API documentation
323
- - [ ] Update data model documentation
294
+ - [ ] Create {{ENTITY}} entity with validation • {{SP}} SP
295
+ - [ ] Create {{REPOSITORY}} repository • {{SP}} SP
296
+ - [ ] Implement {{SERVICE}} service • {{SP}} SP
297
+ - [ ] Create {{CONTROLLER}} controller • {{SP}} SP
298
+ - [ ] Add {{ENDPOINT_1}} endpoint • {{SP}} SP
299
+ - [ ] Add {{ENDPOINT_2}} endpoint • {{SP}} SP
300
+ - [ ] Write unit tests for service ({{COUNT}} tests) • {{SP}} SP
301
+ - [ ] Write integration tests for endpoints ({{COUNT}} tests) • {{SP}} SP
302
+ - [ ] Update API documentation • {{SP}} SP
303
+ - [ ] Update data model documentation • {{SP}} SP
324
304
 
325
305
  **Acceptance Criteria:**
326
306
 
@@ -329,16 +309,21 @@ Story Points | Complexity | Typical Time | Examples
329
309
  - [ ] Test coverage ≥ {{COVERAGE_TARGET}}%
330
310
  - [ ] API documentation is updated
331
311
  - [ ] Code passes linting and type-check
312
+
313
+ **Ready-to-execute command:**
314
+
315
+ ```bash
316
+ /feature new "{{FEATURE_NAME}}"
332
317
  ```
318
+ ````
319
+
320
+ ````
333
321
 
334
- **Example breakdown for Epic 2 (Data Layer):**
322
+ **Example Feature Breakdown:**
335
323
 
336
324
  ```markdown
337
325
  ## 💾 Epic 2: Data Layer • 34 SP
338
326
 
339
- ⏱️ **Est. Time:** ~3 weeks
340
- 🎯 **Priority:** P0 (Blocks all features)
341
-
342
327
  ### Feature 2.1: User Entity & Repository • 5 SP
343
328
 
344
329
  ⏱️ **Est. Time:** 1-2 days
@@ -346,25 +331,22 @@ Story Points | Complexity | Typical Time | Examples
346
331
  📋 **Dependencies:** None
347
332
 
348
333
  **Scope:**
349
-
350
334
  - Entity: User (id, email, username, passwordHash, role, createdAt, updatedAt)
351
335
  - Repository: IUserRepository with CRUD operations
352
336
  - Validation: Email format, username constraints, password strength
353
337
  - Tests: 8 unit tests, 4 integration tests
354
338
 
355
339
  **Tasks:**
356
-
357
- - [ ] Create User entity with field validation
358
- - [ ] Create IUserRepository interface
359
- - [ ] Implement UserRepository (Prisma/TypeORM/etc.)
360
- - [ ] Add database migration for users table
361
- - [ ] Add indexes (email unique, username unique)
362
- - [ ] Write unit tests for User entity validation (8 tests)
363
- - [ ] Write integration tests for UserRepository (4 tests)
364
- - [ ] Update docs/data-model.md
340
+ - [ ] Create User entity with field validation • 2 SP
341
+ - [ ] Create IUserRepository interface 1 SP
342
+ - [ ] Implement UserRepository (Prisma/TypeORM) • 1 SP
343
+ - [ ] Add database migration for users table • 1 SP
344
+ - [ ] Add indexes (email unique, username unique) • 1 SP
345
+ - [ ] Write unit tests for User entity validation (8 tests) 2 SP
346
+ - [ ] Write integration tests for UserRepository (4 tests) • 2 SP
347
+ - [ ] Update docs/data-model.md 1 SP
365
348
 
366
349
  **Acceptance Criteria:**
367
-
368
350
  - [ ] User entity validates email format
369
351
  - [ ] Password is hashed before storage
370
352
  - [ ] Repository handles all CRUD operations
@@ -372,6 +354,11 @@ Story Points | Complexity | Typical Time | Examples
372
354
  - [ ] Test coverage ≥ 80%
373
355
  - [ ] No TypeScript errors
374
356
 
357
+ **Ready-to-execute command:**
358
+ ```bash
359
+ /feature new "User Entity & Repository"
360
+ ````
361
+
375
362
  ---
376
363
 
377
364
  ### Feature 2.2: Product Entity & Repository • 8 SP
@@ -390,17 +377,17 @@ Story Points | Complexity | Typical Time | Examples
390
377
 
391
378
  **Tasks:**
392
379
 
393
- - [ ] Create Product entity with validation
394
- - [ ] Add relationship to Category (FK constraint)
395
- - [ ] Create IProductRepository interface
396
- - [ ] Implement ProductRepository with search/filter methods
397
- - [ ] Add database migration for products table
398
- - [ ] Add indexes (categoryId, name for search)
399
- - [ ] Implement inventory tracking logic
400
- - [ ] Write unit tests for Product entity (12 tests)
401
- - [ ] Write integration tests for ProductRepository (6 tests)
402
- - [ ] Write tests for search/filter functionality (4 tests)
403
- - [ ] Update docs/data-model.md
380
+ - [ ] Create Product entity with validation • 3 SP
381
+ - [ ] Add relationship to Category (FK constraint) • 1 SP
382
+ - [ ] Create IProductRepository interface • 1 SP
383
+ - [ ] Implement ProductRepository with search/filter methods • 2 SP
384
+ - [ ] Add database migration for products table • 1 SP
385
+ - [ ] Add indexes (categoryId, name for search) • 1 SP
386
+ - [ ] Implement inventory tracking logic • 2 SP
387
+ - [ ] Write unit tests for Product entity (12 tests) • 3 SP
388
+ - [ ] Write integration tests for ProductRepository (6 tests) • 2 SP
389
+ - [ ] Write tests for search/filter functionality (4 tests) • 2 SP
390
+ - [ ] Update docs/data-model.md • 1 SP
404
391
 
405
392
  **Acceptance Criteria:**
406
393
 
@@ -411,77 +398,37 @@ Story Points | Complexity | Typical Time | Examples
411
398
  - [ ] Migration includes FK constraint to categories
412
399
  - [ ] Test coverage ≥ 80%
413
400
 
414
- ---
415
-
416
- ### Feature 2.3: Order Entity & Repository • 8 SP
417
-
418
- ⏱️ **Est. Time:** 2-3 days
419
- 🎯 **Priority:** P0
420
- 📋 **Dependencies:** Feature 2.1 (User), Feature 2.2 (Product)
421
-
422
- **Scope:**
423
-
424
- - Entity: Order (id, userId, status, totalAmount, items, createdAt, updatedAt)
425
- - Entity: OrderItem (id, orderId, productId, quantity, price)
426
- - Repository: IOrderRepository with complex queries
427
- - Validation: Status transitions, amount calculation
428
- - Relationships: belongsTo User, hasMany OrderItems
429
- - Tests: 15 unit tests, 8 integration tests
430
-
431
- **Tasks:**
432
-
433
- - [ ] Create Order entity with status enum
434
- - [ ] Create OrderItem entity
435
- - [ ] Implement order total calculation logic
436
- - [ ] Implement status transition validation (pending → paid → shipped → delivered)
437
- - [ ] Create IOrderRepository interface
438
- - [ ] Implement OrderRepository with aggregations
439
- - [ ] Add database migrations (orders + order_items tables)
440
- - [ ] Add indexes (userId, status, createdAt)
441
- - [ ] Add FK constraints (userId → users, productId → products)
442
- - [ ] Write unit tests for Order entity (10 tests)
443
- - [ ] Write unit tests for OrderItem entity (5 tests)
444
- - [ ] Write integration tests for OrderRepository (8 tests)
445
- - [ ] Update docs/data-model.md
446
-
447
- **Acceptance Criteria:**
448
-
449
- - [ ] Order calculates total correctly
450
- - [ ] Invalid status transitions are rejected
451
- - [ ] Repository can query orders by user, status, date range
452
- - [ ] OrderItems correctly reference products
453
- - [ ] Test coverage ≥ 80%
401
+ **Ready-to-execute command:**
454
402
 
455
- ---
403
+ ```bash
404
+ /feature new "Product Entity & Repository with search and inventory"
405
+ ```
456
406
 
457
- [Continue for all 7 entities...]
407
+ [Continue for all features in Epic 2...]
458
408
 
459
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
460
- 📊 Epic 2 Summary: 7 features, 34 SP total
461
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
462
409
  ```
463
410
 
464
411
  ---
465
412
 
466
- ### Phase 4: Dependency Graph & Execution Order (2-3 minutes - automatic)
413
+ ### Step 9.4: Dependency Graph & Execution Order (2-3 minutes - automatic)
467
414
 
468
415
  **Generate dependency graph and determine optimal execution order:**
469
416
 
470
417
  ```
418
+
471
419
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
472
- 🔗 Phase 4/5: Analyzing Dependencies
420
+ 🔗 Step 9.4/6: Analyzing Dependencies
473
421
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
474
- ```
422
+
423
+ ````
475
424
 
476
425
  **Dependency Analysis:**
477
426
 
478
427
  1. **Entity Dependencies** (from `docs/data-model.md`):
479
-
480
428
  - Entities with no foreign keys can be built first
481
429
  - Entities with FKs depend on referenced entities
482
430
 
483
431
  2. **Feature Dependencies** (logical):
484
-
485
432
  - Authentication must complete before protected endpoints
486
433
  - Data layer must complete before business logic
487
434
  - Business logic must complete before integrations
@@ -530,7 +477,7 @@ graph TD
530
477
  style E8 fill:#c7ceea
531
478
  style E9 fill:#c7ceea
532
479
  style E10 fill:#95e1d3
533
- ```
480
+ ````
534
481
 
535
482
  **Execution Order Recommendation:**
536
483
 
@@ -568,20 +515,20 @@ graph TD
568
515
  • Week 6-8: User Mgmt + Product Catalog (2 devs)
569
516
  • Week 13-15: Notifications + Analytics (2 devs)
570
517
 
571
- With 2 developers: ~12 weeks (60% time savings)
572
- With 3 developers: ~9 weeks (50% time savings)
518
+ With 2 developers: ~12 weeks (40% time savings)
519
+ With 3 developers: ~9 weeks (47% time savings)
573
520
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
574
521
  ```
575
522
 
576
523
  ---
577
524
 
578
- ### Phase 5: Generate Roadmap Document (2-5 minutes - automatic)
525
+ ### Step 9.5: Generate Roadmap Document (2-5 minutes - automatic)
579
526
 
580
527
  **Generate `.ai-flow/roadmap.md` with complete implementation plan:**
581
528
 
582
529
  ```
583
530
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
584
- 📝 Phase 5/5: Generating Roadmap Document
531
+ 📝 Step 9.5/6: Generating Roadmap Document
585
532
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
586
533
 
587
534
  Writing to .ai-flow/roadmap.md...
@@ -592,7 +539,7 @@ Writing to .ai-flow/roadmap.md...
592
539
  ````markdown
593
540
  # 🗺️ Implementation Roadmap: {{PROJECT_NAME}}
594
541
 
595
- > **Generated:** {{DATE}} > **Based on:** Documentation v1.0 (Bootstrap + Scaffold)
542
+ > **Generated:** {{DATE}} > **Based on:** Documentation v1.0 (Phases 0-8 complete)
596
543
  > **Total Estimated:** {{TOTAL_WEEKS}} weeks • {{TOTAL_SP}} SP
597
544
 
598
545
  ---
@@ -682,12 +629,12 @@ Use this table to translate Story Points to time estimates:
682
629
 
683
630
  **Tasks:**
684
631
 
685
- - [ ] Configure environment variables (`.env` structure)
686
- - [ ] Setup configuration service/module
687
- - [ ] Add validation for required env vars
688
- - [ ] Create constants file for app-wide values
689
- - [ ] Write unit tests for configuration service (5 tests)
690
- - [ ] Document configuration in `specs/configuration.md`
632
+ - [ ] Configure environment variables (`.env` structure) • 1 SP
633
+ - [ ] Setup configuration service/module • 2 SP
634
+ - [ ] Add validation for required env vars • 1 SP
635
+ - [ ] Create constants file for app-wide values • 1 SP
636
+ - [ ] Write unit tests for configuration service (5 tests) • 2 SP
637
+ - [ ] Document configuration in `specs/configuration.md` • 1 SP
691
638
 
692
639
  **Acceptance Criteria:**
693
640
 
@@ -703,61 +650,7 @@ Use this table to translate Story Points to time estimates:
703
650
 
704
651
  ---
705
652
 
706
- ##### Feature 1.2: Logging & Monitoring Setup • 5 SP
707
-
708
- ⏱️ **Est. Time:** 1-2 days • 🎯 **Priority:** P0 • 📋 **Dependencies:** Feature 1.1
709
-
710
- **Tasks:**
711
-
712
- - [ ] Integrate logging library (Winston/Pino/similar)
713
- - [ ] Configure log levels (debug, info, warn, error)
714
- - [ ] Add structured logging (JSON format)
715
- - [ ] Add request/response logging middleware
716
- - [ ] Configure log rotation and retention
717
- - [ ] Add correlation IDs for request tracking
718
- - [ ] Write tests for logger utility (6 tests)
719
-
720
- **Acceptance Criteria:**
721
-
722
- - [ ] All logs include timestamp, level, correlation ID
723
- - [ ] Sensitive data (passwords, tokens) is redacted
724
- - [ ] Logs are written to files with rotation
725
-
726
- **Ready-to-execute command:**
727
-
728
- ```bash
729
- /feature new "Logging and monitoring infrastructure with correlation tracking"
730
- ```
731
-
732
- ---
733
-
734
- [Continue for all features in Epic 1...]
735
-
736
- ---
737
-
738
- ### Phase 2: Core Layer (Weeks 3-5) • 55 SP
739
-
740
- **Goal:** Build data layer and authentication
741
-
742
- #### 💾 Epic 2: Data Layer • 34 SP
743
-
744
- ⏱️ **Est. Time:** 3 weeks • 🎯 **Priority:** P0 (Blocking)
745
-
746
- [Continue with all features from Epic 2...]
747
-
748
- ---
749
-
750
- #### 🔐 Epic 3: Authentication & Authorization • 21 SP
751
-
752
- ⏱️ **Est. Time:** 2 weeks • 🎯 **Priority:** P0 (Blocking)
753
-
754
- **Can run in PARALLEL with Epic 2 (Data Layer)**
755
-
756
- [Continue with all features from Epic 3...]
757
-
758
- ---
759
-
760
- [Continue for all Epics and Phases...]
653
+ [Continue with all features for all epics...]
761
654
 
762
655
  ---
763
656
 
@@ -835,12 +728,9 @@ Before deploying to production, ensure all items are completed:
835
728
  - Identify which features are MVP vs nice-to-have
836
729
  - Adjust priorities based on business needs
837
730
 
838
- ### Step 2: Setup Your Workflow
731
+ ### Step 2: Start Implementation
839
732
 
840
733
  ```bash
841
- # Ensure you've run init
842
- /flow-project-init
843
-
844
734
  # Start with Phase 1, Epic 1, Feature 1.1
845
735
  /feature new "Base application configuration with environment validation"
846
736
  ```
@@ -883,8 +773,8 @@ Update this roadmap as you complete features:
883
773
 
884
774
  **Need to modify the roadmap?**
885
775
 
886
- - Update documentation first (`/flow-docs-gen` or `/flow-docs-sync`)
887
- - Re-run `/flow-project-roadmap` to regenerate
776
+ - Update documentation first (`/flow-bootstrap` or `/flow-docs-sync`)
777
+ - Re-run Phase 9 to regenerate roadmap
888
778
 
889
779
  ---
890
780
 
@@ -903,11 +793,11 @@ Update this roadmap as you complete features:
903
793
 
904
794
  ---
905
795
 
906
- ## Phase 6: Summary & Next Steps (1 minute)
796
+ ### Step 9.6: Summary & Next Steps (1 minute)
907
797
 
908
798
  ```
909
799
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
910
- ROADMAP GENERATION COMPLETE
800
+ PHASE 9 COMPLETE: ROADMAP GENERATED
911
801
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
912
802
 
913
803
  📊 Summary
@@ -956,17 +846,21 @@ Update this roadmap as you complete features:
956
846
  └─ Decide which features are MVP vs future phases
957
847
  └─ Adjust P0/P1/P2/P3 priorities if needed
958
848
 
959
- 3. **Start implementation**
849
+ 3. **Commit the roadmap**
850
+ └─ git add .ai-flow/roadmap.md
851
+ └─ git commit -m "docs: add implementation roadmap with Story Points"
852
+
853
+ 4. **Start implementation**
960
854
  └─ Begin with Phase 1, Epic 1, Feature 1.1
961
855
  └─ Copy the `/feature` command from roadmap
962
856
  └─ Execute: /feature new "Base application configuration..."
963
857
 
964
- 4. **Track your progress**
858
+ 5. **Track your progress**
965
859
  └─ Mark tasks as complete: - [ ] → - [x]
966
860
  └─ Use /work show to see active features
967
861
  └─ Update estimates based on actual time
968
862
 
969
- 5. **Validate continuously**
863
+ 6. **Validate continuously**
970
864
  └─ Run tests after each feature
971
865
  └─ Use /review for code quality checks
972
866
  └─ Update docs with /flow-docs-sync when needed
@@ -984,14 +878,33 @@ Update this roadmap as you complete features:
984
878
  • **MVP Strategy:** Filter roadmap for P0 features only for fastest
985
879
  time-to-market.
986
880
 
987
- • **Re-generate:** If documentation changes significantly, re-run
988
- /flow-project-roadmap to update the plan.
881
+ • **Re-generate:** If documentation changes significantly, run
882
+ /flow-bootstrap again (Phases 0-9) to update everything.
989
883
 
990
884
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
991
885
 
992
886
  Ready to start building? 🚀
993
887
 
994
888
  Open .ai-flow/roadmap.md and let's ship this! 💪
889
+
890
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
891
+ ```
892
+
893
+ **ASK USER:**
894
+
895
+ ```
896
+ Would you like to:
897
+
898
+ A) ✅ Start implementing first feature now (recommended)
899
+ → Will execute: /feature new "{{FIRST_FEATURE_NAME}}"
900
+
901
+ B) 📋 Review roadmap first
902
+ → Will open .ai-flow/roadmap.md
903
+
904
+ C) ✏️ Customize roadmap
905
+ → Will open .ai-flow/roadmap.md for editing
906
+
907
+ Your choice (A/B/C): __
995
908
  ```
996
909
 
997
910
  ---
@@ -1040,7 +953,7 @@ The roadmap generation process ensures:
1040
953
  4. **All security requirements** from `specs/security.md` are included
1041
954
  5. **All integrations** from `specs/configuration.md` are planned
1042
955
  6. **Testing strategy** from `docs/testing.md` is embedded in every Feature
1043
- 7. **Operations requirements** from `docs/operations.md` are in Epic N
956
+ 7. **Operations requirements** from `docs/operations.md` are in final Epic
1044
957
 
1045
958
  ### Validation Logic
1046
959
 
@@ -1057,103 +970,101 @@ Incomplete documentation:
1057
970
  - [ ] No entities defined in docs/data-model.md
1058
971
  - [ ] No endpoints defined in docs/api.md
1059
972
 
1060
- Please fix documentation and re-run /flow-project-roadmap
973
+ Please fix documentation and re-run Phase 9
1061
974
  ```
1062
975
 
1063
976
  ---
1064
977
 
1065
- ## Final Step: Commit Roadmap & Start Implementation
1066
-
1067
- ```
1068
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1069
- ROADMAP GENERATION COMPLETE
1070
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1071
-
1072
- 📊 Summary:
1073
- Total Epics: {{TOTAL_EPICS}}
1074
- Total Features: {{TOTAL_FEATURES}}
1075
- Total Tasks: {{TOTAL_TASKS}}
1076
- Total Story Points: {{TOTAL_SP}}
1077
- Estimated Duration: {{WEEKS}} weeks
1078
-
1079
- 📄 Roadmap saved to: .ai-flow/roadmap.md
1080
-
1081
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1082
-
1083
- Ready to commit the roadmap?
1084
-
1085
- A) Yes, create commit now
1086
- B) No, I'll review first
1087
-
1088
- Your choice (A): __
1089
- ```
1090
-
1091
- **If choice A (recommended):**
1092
-
1093
- ```bash
1094
- # Stage roadmap file
1095
- git add .ai-flow/roadmap.md
1096
-
1097
- # Create commit
1098
- git commit -m "docs: add implementation roadmap with Story Points
1099
-
1100
- Generated by AI Flow /flow-project-roadmap command:
1101
- - {{TOTAL_EPICS}} epics, {{TOTAL_FEATURES}} features, {{TOTAL_TASKS}} tasks
1102
- - Total estimation: {{TOTAL_SP}} Story Points (~{{WEEKS}} weeks)
1103
- - Prioritized by business value
1104
- - Ready for execution with /feature command"
1105
- ```
1106
-
1107
- ```
1108
- ✅ Roadmap committed
1109
-
1110
- Commit hash: {{COMMIT_HASH}}
1111
-
1112
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1113
- 🎯 Next Step: Start Implementation
1114
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1115
-
1116
- Your roadmap is ready! Let's start building.
1117
-
1118
- **First Priority Feature:**
1119
- 📌 {{FIRST_FEATURE_NAME}} ({{FIRST_FEATURE_SP}} SP)
1120
- Epic: {{FIRST_EPIC_NAME}}
1121
- • Tasks: {{FIRST_FEATURE_TASKS}}
1122
- Description: {{FIRST_FEATURE_DESC}}
1123
-
1124
- Ready to implement this feature?
1125
-
1126
- A) Yes, run /feature "{{FIRST_FEATURE_NAME}}" now (recommended)
1127
- B) No, I'll choose a different feature
1128
-
1129
- Your choice (A): __
1130
- ```
1131
-
1132
- **If choice A:** Execute `/feature "{{FIRST_FEATURE_NAME}}"` automatically
1133
-
1134
- **If choice B:** Show feature selection:
1135
-
1136
- ```
1137
- **Available Features (Priority Order):**
1138
-
1139
- 1. {{FEATURE_1_NAME}} ({{SP_1}} SP) - {{EPIC_1}}
1140
- 2. {{FEATURE_2_NAME}} ({{SP_2}} SP) - {{EPIC_2}}
1141
- 3. {{FEATURE_3_NAME}} ({{SP_3}} SP) - {{EPIC_3}}
1142
- 4. {{FEATURE_4_NAME}} ({{SP_4}} SP) - {{EPIC_4}}
1143
- 5. {{FEATURE_5_NAME}} ({{SP_5}} SP) - {{EPIC_5}}
1144
-
1145
- **To start any feature, run:**
1146
- /feature "[Feature Name]"
1147
-
1148
- Example: /feature "{{FEATURE_1_NAME}}"
1149
-
1150
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1151
- ```
978
+ ## Checklist for Phase 9
979
+
980
+ **9.1 Documentation Analysis:**
981
+
982
+ - [ ] Read all 11+ documentation files
983
+ - [ ] Extract business context
984
+ - [ ] Extract technical stack
985
+ - [ ] Extract data model (all entities)
986
+ - [ ] Extract API endpoints (all routes)
987
+ - [ ] Extract business flows
988
+ - [ ] Extract security requirements
989
+ - [ ] Extract testing strategy
990
+ - [ ] Extract operations requirements
991
+ - [ ] Show analysis summary
992
+
993
+ **9.2 Epic Definition:**
994
+
995
+ - [ ] Define Foundation Epic
996
+ - [ ] Define Data Layer Epic
997
+ - [ ] Define Authentication & Authorization Epic
998
+ - [ ] Define all Business Feature Epics
999
+ - [ ] Define Integration Epic (if external services exist)
1000
+ - [ ] Define Operations & Deployment Epic
1001
+ - [ ] Estimate Story Points for each Epic
1002
+ - [ ] Show Epic summary
1003
+
1004
+ **9.3 Feature Breakdown:**
1005
+
1006
+ - [ ] For each Epic, break down into Features
1007
+ - [ ] Assign Story Points to each Feature (Fibonacci scale)
1008
+ - [ ] Define Tasks for each Feature with individual SP
1009
+ - [ ] Define Acceptance Criteria for each Feature
1010
+ - [ ] Add ready-to-execute `/feature` command
1011
+ - [ ] Show Feature summary
1012
+
1013
+ **9.4 Dependency Analysis:**
1014
+
1015
+ - [ ] Analyze entity dependencies (FK relationships)
1016
+ - [ ] Analyze logical dependencies (auth → protected endpoints)
1017
+ - [ ] Identify parallelization opportunities
1018
+ - [ ] Generate Mermaid dependency graph
1019
+ - [ ] Generate execution order recommendation
1020
+ - [ ] Show parallelization opportunities
1021
+
1022
+ **9.5 Generate Roadmap Document:**
1023
+
1024
+ - [ ] Create `.ai-flow/roadmap.md`
1025
+ - [ ] Include project overview
1026
+ - [ ] Include Story Points reference table
1027
+ - [ ] Include Epic overview table
1028
+ - [ ] Include dependency graph (Mermaid)
1029
+ - [ ] Include implementation phases
1030
+ - [ ] Include all Epics with all Features
1031
+ - [ ] Include production readiness checklist
1032
+ - [ ] Include getting started guide
1033
+ - [ ] Show roadmap location
1034
+
1035
+ **9.6 Summary & Next Steps:**
1036
+
1037
+ - [ ] Show complete summary
1038
+ - [ ] Show roadmap guarantees
1039
+ - [ ] Show next steps
1040
+ - [ ] Show pro tips
1041
+ - [ ] Ask user: Start first feature, Review, or Customize
1042
+
1043
+ **DO NOT:**
1044
+
1045
+ - Skip documentation analysis
1046
+ - ❌ Generate generic Epics not based on actual docs
1047
+ - Assign Story Points arbitrarily
1048
+ - ❌ Miss any entities, endpoints, or flows
1049
+ - ❌ Forget dependency analysis
1050
+ - Skip parallelization opportunities
1051
+ - ❌ Generate incomplete roadmap
1052
+ - Leave placeholder text in roadmap
1053
+ - Forget production readiness checklist
1054
+
1055
+ **ESTIMATED TIME:**
1056
+
1057
+ - 9.1: Documentation analysis - 5-8 min
1058
+ - 9.2: Epic definition - 3-5 min
1059
+ - 9.3: Feature breakdown - 5-10 min
1060
+ - 9.4: Dependency analysis - 2-3 min
1061
+ - 9.5: Generate roadmap - 2-5 min
1062
+ - 9.6: Summary & next steps - 1 min
1063
+ - **Total: 15-30 minutes**
1152
1064
 
1153
1065
  ---
1154
1066
 
1155
- **End of /flow-project-roadmap workflow**
1067
+ **CONTINUE TO:** End (Phase 9 is the final phase)
1068
+
1069
+ **SUCCESS:** Complete implementation roadmap with Story Points generated! Ready to start building! 🚀
1156
1070
 
1157
- **Time:** 15-30 minutes total
1158
- **Output:** Complete implementation roadmap with Story Points
1159
- **Next:** Start executing features with `/feature` command