ai-flow-dev 1.4.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.
- package/README.md +97 -30
- package/dist/cli.js +79 -104
- package/dist/cli.js.map +1 -1
- package/package.json +6 -2
- package/prompts/backend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +5 -3
- package/prompts/backend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +36 -41
- package/prompts/backend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +80 -68
- package/prompts/backend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +82 -61
- package/prompts/backend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +10 -9
- package/prompts/backend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +8 -7
- package/prompts/backend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +5 -3
- package/prompts/backend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +248 -30
- package/prompts/backend/{flow-bootstrap-phase-9.md → flow-build-phase-9.md} +97 -99
- package/prompts/backend/{flow-bootstrap.md → flow-build.md} +105 -34
- package/prompts/backend/flow-docs-sync.md +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
- package/prompts/frontend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +4 -2
- package/prompts/frontend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +238 -22
- package/prompts/frontend/{flow-bootstrap.md → flow-build.md} +108 -25
- package/prompts/frontend/flow-docs-sync.md +3 -2
- package/prompts/mobile/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
- package/prompts/mobile/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +249 -23
- package/prompts/mobile/{flow-bootstrap.md → flow-build.md} +107 -26
- package/prompts/mobile/flow-docs-sync.md +3 -2
- package/templates/AGENT.template.md +1 -17
- package/templates/backend/.clauderules.template +1 -1
- package/templates/backend/.cursorrules.template +1 -1
- /package/prompts/backend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +0 -0
- /package/prompts/frontend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
- /package/prompts/mobile/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
|
@@ -265,16 +265,16 @@ Story Points | Complexity | Typical Time | Examples
|
|
|
265
265
|
|
|
266
266
|
**Use this table to add time estimates to each task:**
|
|
267
267
|
|
|
268
|
-
| Story Points | Time Estimate (solo dev) | Time Range | Example Task
|
|
269
|
-
| ------------ | ------------------------ | ---------- |
|
|
270
|
-
| **1 SP** | 1-2 hours | (~1-2h) | Add enum value, simple config change
|
|
271
|
-
| **2 SP** | 3-4 hours | (~3-4h) | Write 5-8 unit tests, basic validation
|
|
272
|
-
| **3 SP** | 4-8 hours | (~4-8h) | Simple CRUD endpoint, basic entity
|
|
273
|
-
| **5 SP** | 1-2 days | (~1-2d) | Complex endpoint with business logic
|
|
274
|
-
| **8 SP** | 2-3 days | (~2-3d) | Auth flow, complex validation
|
|
275
|
-
| **13 SP** | 1 week | (~1w) | Complete module with full test coverage
|
|
276
|
-
| **21 SP** | 2 weeks | (~2w) | Major feature with integration
|
|
277
|
-
| **34 SP** | 3 weeks | (~3w) | Multiple related features (Epic-level)
|
|
268
|
+
| Story Points | Time Estimate (solo dev) | Time Range | Example Task |
|
|
269
|
+
| ------------ | ------------------------ | ---------- | --------------------------------------- |
|
|
270
|
+
| **1 SP** | 1-2 hours | (~1-2h) | Add enum value, simple config change |
|
|
271
|
+
| **2 SP** | 3-4 hours | (~3-4h) | Write 5-8 unit tests, basic validation |
|
|
272
|
+
| **3 SP** | 4-8 hours | (~4-8h) | Simple CRUD endpoint, basic entity |
|
|
273
|
+
| **5 SP** | 1-2 days | (~1-2d) | Complex endpoint with business logic |
|
|
274
|
+
| **8 SP** | 2-3 days | (~2-3d) | Auth flow, complex validation |
|
|
275
|
+
| **13 SP** | 1 week | (~1w) | Complete module with full test coverage |
|
|
276
|
+
| **21 SP** | 2 weeks | (~2w) | Major feature with integration |
|
|
277
|
+
| **34 SP** | 3 weeks | (~3w) | Multiple related features (Epic-level) |
|
|
278
278
|
|
|
279
279
|
> **Note:** Time assumes AI-assisted development (GitHub Copilot, Claude, etc.). Without AI assistance, multiply time estimates by 2-3x.
|
|
280
280
|
>
|
|
@@ -320,11 +320,13 @@ Story Points | Complexity | Typical Time | Examples
|
|
|
320
320
|
**Parallelization Rules ([P] marker):**
|
|
321
321
|
|
|
322
322
|
✅ **Use [P] when:**
|
|
323
|
+
|
|
323
324
|
- Tasks target different files
|
|
324
325
|
- No shared dependencies between tasks
|
|
325
326
|
- Can run simultaneously (e.g., independent entities, different modules)
|
|
326
327
|
|
|
327
328
|
❌ **Don't use [P] when:**
|
|
329
|
+
|
|
328
330
|
- Task depends on another incomplete task
|
|
329
331
|
- Same file is modified by multiple tasks
|
|
330
332
|
- Shared resource (DB migration, config file, shared service)
|
|
@@ -356,95 +358,89 @@ For each Epic:
|
|
|
356
358
|
|
|
357
359
|
**Feature Template:**
|
|
358
360
|
|
|
361
|
+
```markdown
|
|
362
|
+
### Feature {{NUMBER}}: {{FEATURE_NAME}} • {{SP}} SP (~{{TIME}})
|
|
363
|
+
|
|
364
|
+
**Scope:** {{ENTITY}} entity + {{ENDPOINT_COUNT}} endpoints + {{TEST_COUNT}} tests
|
|
365
|
+
|
|
366
|
+
**Tasks:**
|
|
367
|
+
|
|
368
|
+
- [ ] T0XX [P] Write {{ENTITY}} entity tests • 2 SP (~3-4h) → tests/unit/{{ENTITY}}.spec.ts
|
|
369
|
+
- [ ] T0YY Create {{ENTITY}} entity • 2 SP (~3-4h) → src/entities/{{ENTITY}}.ts
|
|
370
|
+
- [ ] T0ZZ Create I{{REPOSITORY}} interface • 1 SP (~1-2h) → src/repositories/I{{REPOSITORY}}.ts
|
|
371
|
+
- [ ] T0AA Implement {{REPOSITORY}} • 2 SP (~3-4h) → src/repositories/{{REPOSITORY}}.ts (after T0YY, T0ZZ)
|
|
372
|
+
- [ ] T0BB Implement {{SERVICE}} business logic • 3 SP (~4-8h) → src/services/{{SERVICE}}.ts (after T0AA)
|
|
373
|
+
- [ ] T0CC Create {{CONTROLLER}} endpoints • 2 SP (~3-4h) → src/controllers/{{CONTROLLER}}.ts (after T0BB)
|
|
374
|
+
- [ ] T0DD [P] Write integration tests • 2 SP (~3-4h) → tests/integration/{{CONTROLLER}}.spec.ts
|
|
375
|
+
- [ ] T0EE [P] Update API docs • 1 SP (~1h) → docs/api.md
|
|
376
|
+
|
|
377
|
+
**Parallel:** T0XX, T0DD, T0EE can run together
|
|
378
|
+
|
|
379
|
+
**Done when:** All endpoints work + tests pass + coverage ≥ {{COVERAGE}}%
|
|
380
|
+
|
|
381
|
+
**Start:** `/feature new "{{FEATURE_NAME}}"`
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
`````
|
|
385
|
+
|
|
386
|
+
**Example (Real Project):**
|
|
387
|
+
|
|
359
388
|
````markdown
|
|
360
|
-
### Feature
|
|
389
|
+
### Feature 2.1: User Entity & Repository • 12 SP (~2-3d)
|
|
361
390
|
|
|
362
|
-
|
|
363
|
-
🎯 **Priority:** {{PRIORITY}}
|
|
364
|
-
📋 **Dependencies:** {{DEPENDENCIES}}
|
|
391
|
+
**Scope:** User entity + CRUD endpoints + 12 tests
|
|
365
392
|
|
|
366
|
-
**
|
|
393
|
+
**Tasks:**
|
|
367
394
|
|
|
368
|
-
-
|
|
369
|
-
-
|
|
370
|
-
-
|
|
371
|
-
-
|
|
395
|
+
- [ ] T001 [P] Write User entity validation tests • 2 SP (~3-4h) → tests/unit/User.entity.spec.ts
|
|
396
|
+
- [ ] T002 Create User entity (email, password, role) • 2 SP (~3-4h) → src/entities/User.entity.ts
|
|
397
|
+
- [ ] T003 Create IUserRepository interface • 1 SP (~1-2h) → src/repositories/IUserRepository.ts
|
|
398
|
+
- [ ] T004 Implement UserRepository with Prisma • 2 SP (~3-4h) → src/repositories/UserRepository.ts (after T002, T003)
|
|
399
|
+
- [ ] T005 Implement UserService business logic • 3 SP (~4-8h) → src/services/UserService.ts (after T004)
|
|
400
|
+
- [ ] T006 Create UserController (CRUD endpoints) • 2 SP (~3-4h) → src/controllers/UserController.ts (after T005)
|
|
401
|
+
- [ ] T007 [P] Write integration tests (4 tests) • 2 SP (~3-4h) → tests/integration/UserController.spec.ts
|
|
402
|
+
- [ ] T008 [P] Update API docs • 1 SP (~1h) → docs/api.md
|
|
372
403
|
|
|
373
|
-
**
|
|
404
|
+
**Parallel tasks:** T001, T007, T008 (different files)
|
|
374
405
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
Tests: {{TEST_SCENARIOS}}
|
|
378
|
-
Dependencies: None (can run parallel with other test tasks)
|
|
406
|
+
**Done when:** GET/POST/PUT/DELETE /users working + 12 tests pass + coverage ≥ 80%
|
|
407
|
+
`````
|
|
379
408
|
|
|
380
|
-
|
|
381
|
-
File: src/entities/{{ENTITY}}.entity.ts
|
|
382
|
-
Implements: {{VALIDATION_RULES}}
|
|
383
|
-
Dependencies: None
|
|
409
|
+
---
|
|
384
410
|
|
|
385
|
-
|
|
386
|
-
File: src/repositories/interfaces/I{{REPOSITORY}}.ts
|
|
387
|
-
Methods: {{REPOSITORY_METHODS}}
|
|
388
|
-
Dependencies: T0YY (needs {{ENTITY}} entity type)
|
|
389
|
-
|
|
390
|
-
- [ ] [T0AA] Implement {{REPOSITORY}} with {{ORM}} • {{SP}} SP (~{{TIME}})
|
|
391
|
-
File: src/repositories/{{REPOSITORY}}.ts
|
|
392
|
-
Implements: All CRUD methods from I{{REPOSITORY}} interface
|
|
393
|
-
Dependencies: T0YY (entity), T0ZZ (interface)
|
|
394
|
-
|
|
395
|
-
- [ ] [T0BB] Implement {{SERVICE}} service with business logic • {{SP}} SP (~{{TIME}})
|
|
396
|
-
File: src/services/{{SERVICE}}.service.ts
|
|
397
|
-
Business Logic: {{SERVICE_LOGIC}}
|
|
398
|
-
Dependencies: T0AA (repository)
|
|
399
|
-
|
|
400
|
-
- [ ] [T0CC] Create {{CONTROLLER}} controller • {{SP}} SP (~{{TIME}})
|
|
401
|
-
File: src/controllers/{{CONTROLLER}}.controller.ts
|
|
402
|
-
Endpoints: {{ENDPOINT_1}}, {{ENDPOINT_2}}
|
|
403
|
-
Dependencies: T0BB (service)
|
|
404
|
-
|
|
405
|
-
- [ ] [T0DD] Write unit tests for {{SERVICE}} service ({{COUNT}} tests) • {{SP}} SP (~{{TIME}})
|
|
406
|
-
File: tests/unit/services/{{SERVICE}}.service.spec.ts
|
|
407
|
-
Tests: {{SERVICE_TEST_SCENARIOS}}
|
|
408
|
-
Dependencies: T0BB (service implementation)
|
|
409
|
-
|
|
410
|
-
- [ ] [T0EE] Write integration tests for {{ENDPOINT_1}}, {{ENDPOINT_2}} ({{COUNT}} tests) • {{SP}} SP (~{{TIME}})
|
|
411
|
-
File: tests/integration/controllers/{{CONTROLLER}}.spec.ts
|
|
412
|
-
Tests: {{INTEGRATION_TEST_SCENARIOS}}
|
|
413
|
-
Dependencies: T0CC (controller)
|
|
414
|
-
|
|
415
|
-
- [ ] [T0FF] Update API documentation • {{SP}} SP (~{{TIME}})
|
|
416
|
-
File: docs/api.md
|
|
417
|
-
Add: {{ENDPOINT_1}}, {{ENDPOINT_2}} with request/response schemas
|
|
418
|
-
Dependencies: T0CC (endpoints implemented)
|
|
419
|
-
|
|
420
|
-
- [ ] [T0GG] Update data model documentation • {{SP}} SP (~{{TIME}})
|
|
421
|
-
File: docs/data-model.md
|
|
422
|
-
Add: {{ENTITY}} schema, relationships, validation rules
|
|
423
|
-
Dependencies: T0YY (entity complete)
|
|
411
|
+
**Example (Simplified Format):**
|
|
424
412
|
|
|
425
|
-
|
|
413
|
+
```markdown
|
|
414
|
+
### Feature 2.1: User Entity & Repository • 12 SP (~2-3d)
|
|
426
415
|
|
|
427
|
-
|
|
428
|
-
- [ ] {{VALIDATION_RULES}} are enforced
|
|
429
|
-
- [ ] Test coverage ≥ {{COVERAGE_TARGET}}%
|
|
430
|
-
- [ ] API documentation is updated
|
|
431
|
-
- [ ] Code passes linting and type-check
|
|
416
|
+
**Scope:** User entity + CRUD endpoints + 12 tests
|
|
432
417
|
|
|
433
|
-
**
|
|
418
|
+
**Tasks:**
|
|
434
419
|
|
|
435
|
-
|
|
436
|
-
|
|
420
|
+
- [ ] T001 [P] Write User entity validation tests • 2 SP (~3-4h) → tests/unit/User.entity.spec.ts
|
|
421
|
+
- [ ] T002 Create User entity (email, password, role) • 2 SP (~3-4h) → src/entities/User.entity.ts
|
|
422
|
+
- [ ] T003 Create IUserRepository interface • 1 SP (~1-2h) → src/repositories/IUserRepository.ts
|
|
423
|
+
- [ ] T004 Implement UserRepository with Prisma • 2 SP (~3-4h) → src/repositories/UserRepository.ts (after T002, T003)
|
|
424
|
+
- [ ] T005 Implement UserService business logic • 3 SP (~4-8h) → src/services/UserService.ts (after T004)
|
|
425
|
+
- [ ] T006 Create UserController (CRUD endpoints) • 2 SP (~3-4h) → src/controllers/UserController.ts (after T005)
|
|
426
|
+
- [ ] T007 [P] Write integration tests (4 tests) • 2 SP (~3-4h) → tests/integration/UserController.spec.ts
|
|
427
|
+
- [ ] T008 [P] Update API docs • 1 SP (~1h) → docs/api.md
|
|
428
|
+
|
|
429
|
+
**Parallel tasks:** T001, T007, T008 (different files)
|
|
430
|
+
|
|
431
|
+
**Done when:** GET/POST/PUT/DELETE /users working + 12 tests pass + coverage ≥ 80%
|
|
432
|
+
|
|
433
|
+
**Start:** `/feature new "User Entity & Repository"`
|
|
437
434
|
```
|
|
438
|
-
````
|
|
439
435
|
|
|
440
|
-
|
|
436
|
+
---
|
|
441
437
|
|
|
442
|
-
**
|
|
438
|
+
**Original Feature Breakdown Example:**
|
|
443
439
|
|
|
444
440
|
```markdown
|
|
445
441
|
## 💾 Epic 2: Data Layer • 34 SP
|
|
446
442
|
|
|
447
|
-
### Feature 2.1: User Entity & Repository • 5 SP
|
|
443
|
+
### Feature 2.1: User Entity & Repository (Detailed Version) • 5 SP
|
|
448
444
|
|
|
449
445
|
⏱️ **Est. Time:** 1-2 days (~12-16h total)
|
|
450
446
|
🎯 **Priority:** P0
|
|
@@ -452,6 +448,7 @@ For each Epic:
|
|
|
452
448
|
🏷️ **User Story:** [US1] As a system, I need to store user data securely
|
|
453
449
|
|
|
454
450
|
**Scope:**
|
|
451
|
+
|
|
455
452
|
- Entity: User (id, email, username, passwordHash, role, createdAt, updatedAt)
|
|
456
453
|
- Repository: IUserRepository with CRUD operations
|
|
457
454
|
- Validation: Email format, username constraints, password strength
|
|
@@ -505,15 +502,16 @@ For each Epic:
|
|
|
505
502
|
- [ ] All 12 tests passing (8 unit + 4 integration)
|
|
506
503
|
|
|
507
504
|
**Task Execution Graph:**
|
|
508
|
-
|
|
509
505
|
```
|
|
506
|
+
|
|
510
507
|
T001 [P] ──┐
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
508
|
+
├──> T002 ──┬──> T003 ──> T004 ──┬──> T006
|
|
509
|
+
│ │ │
|
|
510
|
+
│ └──> T005 ────────────┘
|
|
511
|
+
│ │
|
|
512
|
+
└─────────────────────────────────┴──> T007
|
|
513
|
+
|
|
514
|
+
````
|
|
517
515
|
|
|
518
516
|
**Parallelization Notes:**
|
|
519
517
|
- T001 can run parallel to other test tasks (different file)
|
|
@@ -798,14 +796,14 @@ With 3 developers: ~9 weeks (47% time savings)
|
|
|
798
796
|
|
|
799
797
|
### Step 9.5: Generate Roadmap Document (2-5 minutes - automatic)
|
|
800
798
|
|
|
801
|
-
**Generate
|
|
799
|
+
**Generate `roadmap.md` with complete implementation plan:**
|
|
802
800
|
|
|
803
801
|
```
|
|
804
802
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
805
803
|
📝 Step 9.5/6: Generating Roadmap Document
|
|
806
804
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
807
805
|
|
|
808
|
-
Writing to
|
|
806
|
+
Writing to roadmap.md...
|
|
809
807
|
```
|
|
810
808
|
|
|
811
809
|
**Roadmap Document Structure:**
|
|
@@ -1156,7 +1154,7 @@ Update this roadmap as you complete features:
|
|
|
1156
1154
|
|
|
1157
1155
|
**Need to modify the roadmap?**
|
|
1158
1156
|
|
|
1159
|
-
- Update documentation first (`/flow-
|
|
1157
|
+
- Update documentation first (`/flow-build` or `/flow-docs-sync`)
|
|
1160
1158
|
- Re-run Phase 9 to regenerate roadmap
|
|
1161
1159
|
|
|
1162
1160
|
---
|
|
@@ -1169,7 +1167,7 @@ Update this roadmap as you complete features:
|
|
|
1169
1167
|
|
|
1170
1168
|
```
|
|
1171
1169
|
✅ Roadmap document generated
|
|
1172
|
-
✅ Location:
|
|
1170
|
+
✅ Location: roadmap.md
|
|
1173
1171
|
✅ Total: {{TOTAL_EPICS}} Epics, {{TOTAL_FEATURES}} Features, {{TOTAL_TASKS}} Tasks
|
|
1174
1172
|
✅ Estimated: {{TOTAL_SP}} Story Points (~{{TOTAL_WEEKS}} weeks)
|
|
1175
1173
|
```
|
|
@@ -1194,7 +1192,7 @@ Update this roadmap as you complete features:
|
|
|
1194
1192
|
✅ Estimated time: {{SOLO_WEEKS}} weeks (1 dev) | {{TWO_DEV_WEEKS}} weeks (2 devs)
|
|
1195
1193
|
✅ Dependency graph: Generated
|
|
1196
1194
|
✅ Execution order: Optimized for parallelization
|
|
1197
|
-
✅ Roadmap document:
|
|
1195
|
+
✅ Roadmap document: roadmap.md
|
|
1198
1196
|
|
|
1199
1197
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1200
1198
|
🎯 What This Roadmap Guarantees
|
|
@@ -1223,14 +1221,14 @@ Update this roadmap as you complete features:
|
|
|
1223
1221
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1224
1222
|
|
|
1225
1223
|
1. **Open the roadmap**
|
|
1226
|
-
└─ Open
|
|
1224
|
+
└─ Open roadmap.md in your editor
|
|
1227
1225
|
|
|
1228
1226
|
2. **Review and adjust priorities**
|
|
1229
1227
|
└─ Decide which features are MVP vs future phases
|
|
1230
1228
|
└─ Adjust P0/P1/P2/P3 priorities if needed
|
|
1231
1229
|
|
|
1232
1230
|
3. **Commit the roadmap**
|
|
1233
|
-
└─ git add
|
|
1231
|
+
└─ git add roadmap.md
|
|
1234
1232
|
└─ git commit -m "docs: add implementation roadmap with Story Points"
|
|
1235
1233
|
|
|
1236
1234
|
4. **Start implementation**
|
|
@@ -1262,13 +1260,13 @@ Update this roadmap as you complete features:
|
|
|
1262
1260
|
time-to-market.
|
|
1263
1261
|
|
|
1264
1262
|
• **Re-generate:** If documentation changes significantly, run
|
|
1265
|
-
/flow-
|
|
1263
|
+
/flow-build again (Phases 0-9) to update everything.
|
|
1266
1264
|
|
|
1267
1265
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1268
1266
|
|
|
1269
1267
|
Ready to start building? 🚀
|
|
1270
1268
|
|
|
1271
|
-
Open
|
|
1269
|
+
Open roadmap.md and let's ship this! 💪
|
|
1272
1270
|
|
|
1273
1271
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1274
1272
|
```
|
|
@@ -1282,10 +1280,10 @@ A) ✅ Start implementing first feature now (recommended)
|
|
|
1282
1280
|
→ Will execute: /feature new "{{FIRST_FEATURE_NAME}}"
|
|
1283
1281
|
|
|
1284
1282
|
B) 📋 Review roadmap first
|
|
1285
|
-
→ Will open
|
|
1283
|
+
→ Will open roadmap.md
|
|
1286
1284
|
|
|
1287
1285
|
C) ✏️ Customize roadmap
|
|
1288
|
-
→ Will open
|
|
1286
|
+
→ Will open roadmap.md for editing
|
|
1289
1287
|
|
|
1290
1288
|
Your choice (A/B/C): __
|
|
1291
1289
|
```
|
|
@@ -1404,7 +1402,7 @@ Please fix documentation and re-run Phase 9
|
|
|
1404
1402
|
|
|
1405
1403
|
**9.5 Generate Roadmap Document:**
|
|
1406
1404
|
|
|
1407
|
-
- [ ] Create
|
|
1405
|
+
- [ ] Create `roadmap.md`
|
|
1408
1406
|
- [ ] Include project overview
|
|
1409
1407
|
- [ ] Include Story Points reference table
|
|
1410
1408
|
- [ ] Include Epic overview table
|
|
@@ -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,24 +164,19 @@ 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
176
|
4. **System Type** (Critical for auto-suggestions)
|
|
103
|
-
|
|
104
177
|
- What type of system are you building?
|
|
105
178
|
|
|
106
179
|
**Options:**
|
|
107
|
-
|
|
108
180
|
- A) E-commerce (Product catalog, cart, checkout)
|
|
109
181
|
- B) SaaS (Multi-tenant, subscriptions, RBAC)
|
|
110
182
|
- C) CRM (Contacts, leads, sales pipeline)
|
|
@@ -117,7 +189,6 @@ Ask these 6 questions one by one with progress indicator:
|
|
|
117
189
|
- J) Other (will use generic defaults)
|
|
118
190
|
|
|
119
191
|
5. **Core Data Entities** (if new project - skip if Phase 0 detected)
|
|
120
|
-
|
|
121
192
|
- List the main entities/models your system needs (e.g., User, Product, Order)
|
|
122
193
|
|
|
123
194
|
6. **Backend Framework** (if new project - skip if Phase 0 detected)
|
|
@@ -299,26 +370,26 @@ Generate all 17 documents using the confirmed values (either AI-suggested or use
|
|
|
299
370
|
|
|
300
371
|
This documentation is **modularized** for better maintainability and performance. Each phase is in a separate file.
|
|
301
372
|
|
|
302
|
-
### For Complete
|
|
373
|
+
### For Complete Build (All Phases)
|
|
303
374
|
|
|
304
375
|
Execute phases sequentially by reading each file in order:
|
|
305
376
|
|
|
306
|
-
1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/backend/flow-
|
|
307
|
-
2. **Phase 1 (Discovery & Business):** Read `.ai-flow/prompts/backend/flow-
|
|
308
|
-
3. **Phase 2 (Data Architecture):** Read `.ai-flow/prompts/backend/flow-
|
|
309
|
-
4. **Phase 3 (System Architecture):** Read `.ai-flow/prompts/backend/flow-
|
|
310
|
-
5. **Phase 4 (Security & Authentication):** Read `.ai-flow/prompts/backend/flow-
|
|
311
|
-
6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/backend/flow-
|
|
312
|
-
7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/backend/flow-
|
|
313
|
-
8. **Phase 7 (Operations & Deployment):** Read `.ai-flow/prompts/backend/flow-
|
|
314
|
-
9. **Phase 8 (Project Setup & Final Documentation):** Read `.ai-flow/prompts/backend/flow-
|
|
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`
|
|
315
386
|
|
|
316
387
|
### For Individual Phases
|
|
317
388
|
|
|
318
389
|
You can execute any phase independently by reading its file. For example:
|
|
319
390
|
|
|
320
391
|
```
|
|
321
|
-
Read .ai-flow/prompts/backend/flow-
|
|
392
|
+
Read .ai-flow/prompts/backend/flow-build-phase-4-security.md and execute only Phase 4
|
|
322
393
|
```
|
|
323
394
|
|
|
324
395
|
---
|
|
@@ -327,7 +398,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
327
398
|
|
|
328
399
|
### Phase 0: Context Discovery (Optional)
|
|
329
400
|
|
|
330
|
-
**File:** `backend/flow-
|
|
401
|
+
**File:** `backend/flow-build-phase-0-context.md`
|
|
331
402
|
**For:** Existing projects with code/documentation
|
|
332
403
|
**Duration:** 1-5 minutes (automated analysis)
|
|
333
404
|
**Output:** Pre-populated answers, project analysis
|
|
@@ -347,7 +418,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
347
418
|
|
|
348
419
|
### Phase 1: Discovery & Business
|
|
349
420
|
|
|
350
|
-
**File:** `backend/flow-
|
|
421
|
+
**File:** `backend/flow-build-phase-1-business.md`
|
|
351
422
|
**Duration:** 15-20 minutes
|
|
352
423
|
**Key Questions:**
|
|
353
424
|
|
|
@@ -365,7 +436,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
365
436
|
|
|
366
437
|
### Phase 2: Data Architecture
|
|
367
438
|
|
|
368
|
-
**File:** `backend/flow-
|
|
439
|
+
**File:** `backend/flow-build-phase-2-data.md`
|
|
369
440
|
**Duration:** 15-20 minutes
|
|
370
441
|
**Key Questions:**
|
|
371
442
|
|
|
@@ -383,7 +454,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
383
454
|
|
|
384
455
|
### Phase 3: System Architecture
|
|
385
456
|
|
|
386
|
-
**File:** `backend/flow-
|
|
457
|
+
**File:** `backend/flow-build-phase-3-architecture.md`
|
|
387
458
|
**Duration:** 15-20 minutes
|
|
388
459
|
**Key Questions:**
|
|
389
460
|
|
|
@@ -403,7 +474,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
403
474
|
|
|
404
475
|
### Phase 4: Security & Authentication
|
|
405
476
|
|
|
406
|
-
**File:** `backend/flow-
|
|
477
|
+
**File:** `backend/flow-build-phase-4-security.md`
|
|
407
478
|
**Duration:** 15-20 minutes
|
|
408
479
|
**Key Questions:**
|
|
409
480
|
|
|
@@ -421,7 +492,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
421
492
|
|
|
422
493
|
### Phase 5: Code Standards
|
|
423
494
|
|
|
424
|
-
**File:** `backend/flow-
|
|
495
|
+
**File:** `backend/flow-build-phase-5-standards.md`
|
|
425
496
|
**Duration:** 15-20 minutes
|
|
426
497
|
**Key Questions:**
|
|
427
498
|
|
|
@@ -439,7 +510,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
439
510
|
|
|
440
511
|
### Phase 6: Testing Strategy
|
|
441
512
|
|
|
442
|
-
**File:** `backend/flow-
|
|
513
|
+
**File:** `backend/flow-build-phase-6-testing.md`
|
|
443
514
|
**Duration:** 15-25 minutes
|
|
444
515
|
**Key Questions:**
|
|
445
516
|
|
|
@@ -457,7 +528,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
457
528
|
|
|
458
529
|
### Phase 7: Operations & Deployment
|
|
459
530
|
|
|
460
|
-
**File:** `backend/flow-
|
|
531
|
+
**File:** `backend/flow-build-phase-7-operations.md`
|
|
461
532
|
**Duration:** 10 minutes
|
|
462
533
|
**Key Questions:**
|
|
463
534
|
|
|
@@ -478,7 +549,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
478
549
|
|
|
479
550
|
### Phase 8: Project Setup & Final Documentation
|
|
480
551
|
|
|
481
|
-
**File:** `backend/flow-
|
|
552
|
+
**File:** `backend/flow-build-phase-8.md`
|
|
482
553
|
**Duration:** 10-15 minutes
|
|
483
554
|
**Key Steps:**
|
|
484
555
|
|
|
@@ -503,7 +574,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
503
574
|
|
|
504
575
|
### Phase 9: Implementation Roadmap (Optional)
|
|
505
576
|
|
|
506
|
-
**File:** `backend/flow-
|
|
577
|
+
**File:** `backend/flow-build-phase-9.md`
|
|
507
578
|
**Duration:** 15-30 minutes
|
|
508
579
|
**Key Steps:**
|
|
509
580
|
|
|
@@ -545,7 +616,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute onl
|
|
|
545
616
|
**Command:**
|
|
546
617
|
|
|
547
618
|
```
|
|
548
|
-
Read .ai-flow/prompts/backend/flow-
|
|
619
|
+
Read .ai-flow/prompts/backend/flow-build-phase-1-business.md and execute Phase 1
|
|
549
620
|
```
|
|
550
621
|
|
|
551
622
|
---
|
|
@@ -567,7 +638,7 @@ Read .ai-flow/prompts/backend/flow-bootstrap-phase-1-business.md and execute Pha
|
|
|
567
638
|
**Command:**
|
|
568
639
|
|
|
569
640
|
```
|
|
570
|
-
Read .ai-flow/prompts/backend/flow-
|
|
641
|
+
Read .ai-flow/prompts/backend/flow-build-phase-0-context.md and execute Phase 0
|
|
571
642
|
```
|
|
572
643
|
|
|
573
644
|
---
|
|
@@ -638,7 +709,7 @@ Before starting Phase 1, you'll select a scope level:
|
|
|
638
709
|
2. Customize as needed for your specific project
|
|
639
710
|
3. Share `AGENT.md` with your team
|
|
640
711
|
4. Update documents as your project evolves
|
|
641
|
-
5. Use `/
|
|
712
|
+
5. Use `/flow-build-phase-[N]` commands to regenerate individual sections
|
|
642
713
|
|
|
643
714
|
---
|
|
644
715
|
|
|
@@ -703,8 +774,8 @@ As your project evolves, your documentation may become out of sync with your cod
|
|
|
703
774
|
2. **Then:**
|
|
704
775
|
- 🆕 **New Project + Mode A:** Execute all phases sequentially, ask all questions
|
|
705
776
|
- 🆕 **New Project + Mode B:** Ask 6 critical questions, auto-suggest the rest, show summary
|
|
706
|
-
- 📁 **Existing Project + Mode A:** Read `flow-
|
|
707
|
-
- 📁 **Existing Project + Mode B:** Read `flow-
|
|
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
|
|
708
779
|
- 🔄 **Update Docs:** Use `/flow-docs-sync` command
|
|
709
780
|
|
|
710
781
|
---
|
|
@@ -819,7 +890,7 @@ git add .ai-flow/
|
|
|
819
890
|
# Create initial commit with documentation metadata
|
|
820
891
|
git commit -m "docs: initial project documentation
|
|
821
892
|
|
|
822
|
-
Generated by AI Flow /flow-
|
|
893
|
+
Generated by AI Flow /flow-build command:
|
|
823
894
|
- 17 documentation files (backend)
|
|
824
895
|
- Architecture: {{ARCHITECTURE_PATTERN}}
|
|
825
896
|
- Tech stack: {{FRAMEWORK}}, {{DATABASE}}, {{ORM}}
|
|
@@ -866,7 +937,7 @@ Your choice (A): __
|
|
|
866
937
|
|
|
867
938
|
1. Review documentation in .ai-flow/templates/
|
|
868
939
|
2. When ready, run Phase 8:
|
|
869
|
-
→ Read .ai-flow/prompts/backend/flow-
|
|
940
|
+
→ Read .ai-flow/prompts/backend/flow-build-phase-8.md
|
|
870
941
|
→ Detects project state, initializes framework (optional), generates final docs
|
|
871
942
|
3. (Optional) Continue to Phase 9: Implementation Roadmap (15-30 min)
|
|
872
943
|
→ Generates complete implementation plan with Story Points
|
|
@@ -464,7 +464,7 @@ Actualización cancelada. Ejecuta `/flow-docs-sync` cuando estés listo para act
|
|
|
464
464
|
2. **Follow Existing Patterns:**
|
|
465
465
|
|
|
466
466
|
- Use same format as existing documentation
|
|
467
|
-
- Follow conventions established in original
|
|
467
|
+
- Follow conventions established in original build
|
|
468
468
|
- Maintain consistency with existing docs
|
|
469
469
|
|
|
470
470
|
3. **Update Analysis File:**
|
|
@@ -524,3 +524,4 @@ Documentación sincronizada exitosamente.
|
|
|
524
524
|
|
|
525
525
|
**BEGIN EXECUTION when user runs `/flow-docs-sync`**
|
|
526
526
|
|
|
527
|
+
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**⚡ AUTOMATED ANALYSIS - Minimal User Input Required**
|
|
4
4
|
|
|
5
|
-
This phase automatically analyzes your existing frontend codebase to pre-populate answers for the
|
|
5
|
+
This phase automatically analyzes your existing frontend codebase to pre-populate answers for the build questionnaire.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -483,7 +483,7 @@ After Phase 0 completes:
|
|
|
483
483
|
|
|
484
484
|
Next: Proceed to Phase 1 (Discovery & UX)
|
|
485
485
|
|
|
486
|
-
Read: .ai-flow/prompts/frontend/flow-
|
|
486
|
+
Read: .ai-flow/prompts/frontend/flow-build-phase-1-discovery.md
|
|
487
487
|
```
|
|
488
488
|
|
|
489
489
|
---
|
|
@@ -493,3 +493,4 @@ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-1-discovery.md
|
|
|
493
493
|
**Version:** 1.2.0
|
|
494
494
|
|
|
495
495
|
|
|
496
|
+
|
|
@@ -438,7 +438,7 @@ Documents Generated:
|
|
|
438
438
|
|
|
439
439
|
Next: Phase 2 - Components & Framework
|
|
440
440
|
|
|
441
|
-
Read: .ai-flow/prompts/frontend/flow-
|
|
441
|
+
Read: .ai-flow/prompts/frontend/flow-build-phase-2-components.md
|
|
442
442
|
```
|
|
443
443
|
|
|
444
444
|
---
|
|
@@ -448,3 +448,4 @@ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-2-components.md
|
|
|
448
448
|
**Version:** 1.2.0
|
|
449
449
|
|
|
450
450
|
|
|
451
|
+
|