ai-flow-dev 1.2.0 → 1.4.0
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 +14 -8
- package/dist/cli.js +16 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-bootstrap-phase-8.md +290 -34
- package/prompts/backend/flow-bootstrap-phase-9.md +441 -58
- package/prompts/backend/flow-bootstrap.md +108 -107
- package/prompts/backend/flow-dev-feature.md +447 -68
- package/prompts/backend/flow-dev-fix.md +81 -8
- package/templates/{shared/AGENT.template.md → AGENT.template.md} +1 -1
- package/templates/mobile/AGENT.template.md +0 -251
|
@@ -259,6 +259,87 @@ Story Points | Complexity | Typical Time | Examples
|
|
|
259
259
|
34 SP | Epic | 3 weeks | Multiple related features
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### Story Points to Time Conversion (Hybrid Estimation)
|
|
265
|
+
|
|
266
|
+
**Use this table to add time estimates to each task:**
|
|
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) |
|
|
278
|
+
|
|
279
|
+
> **Note:** Time assumes AI-assisted development (GitHub Copilot, Claude, etc.). Without AI assistance, multiply time estimates by 2-3x.
|
|
280
|
+
>
|
|
281
|
+
> **Velocity Tracking:** After completing 2-3 features, compare actual time vs estimates to calibrate your team's velocity. Adjust remaining estimates accordingly.
|
|
282
|
+
|
|
283
|
+
**How to use hybrid estimation:**
|
|
284
|
+
|
|
285
|
+
- Each task shows **both** Story Points and time: `• 2 SP (~3-4h)`
|
|
286
|
+
- Story Points measure **complexity** (stable across teams)
|
|
287
|
+
- Time estimates measure **effort** (varies by team velocity)
|
|
288
|
+
- Track both to improve estimation accuracy over time
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### Task Format Reference (Spec-Kit Inspired)
|
|
293
|
+
|
|
294
|
+
**Every task must follow this format:**
|
|
295
|
+
|
|
296
|
+
```markdown
|
|
297
|
+
- [ ] [TaskID] [Optional:P] [Optional:StoryTag] Description • SP (~time)
|
|
298
|
+
File: exact/path/to/file.ts
|
|
299
|
+
Dependencies: T001, T002 (or "None")
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Components explained:**
|
|
303
|
+
|
|
304
|
+
- **[TaskID]**: Sequential ID in execution order (T001, T002, ..., T099, T100)
|
|
305
|
+
- **[P] marker**: ONLY for parallelizable tasks (different files, no blocking deps)
|
|
306
|
+
- **[StoryTag]**: Links task to user story ([US1], [US2]) - only in story phases
|
|
307
|
+
- **Description**: What to implement (specific, LLM-completable without additional context)
|
|
308
|
+
- **• SP (~time)**: Hybrid estimation - Story Points + time (e.g., "2 SP (~3-4h)", "5 SP (~1-2d)")
|
|
309
|
+
- **File path**: Exact file where work happens (REQUIRED)
|
|
310
|
+
- **Dependencies**: Which tasks must complete first (REQUIRED, even if "None")
|
|
311
|
+
|
|
312
|
+
**Task Sequencing Rules:**
|
|
313
|
+
|
|
314
|
+
1. **Tests BEFORE implementation** (TDD approach)
|
|
315
|
+
2. **Models → Services → Controllers → Endpoints** (layer dependency order)
|
|
316
|
+
3. **Core utilities BEFORE features** that use them
|
|
317
|
+
4. **Database migrations BEFORE data access code**
|
|
318
|
+
5. **Interfaces BEFORE implementations**
|
|
319
|
+
|
|
320
|
+
**Parallelization Rules ([P] marker):**
|
|
321
|
+
|
|
322
|
+
✅ **Use [P] when:**
|
|
323
|
+
- Tasks target different files
|
|
324
|
+
- No shared dependencies between tasks
|
|
325
|
+
- Can run simultaneously (e.g., independent entities, different modules)
|
|
326
|
+
|
|
327
|
+
❌ **Don't use [P] when:**
|
|
328
|
+
- Task depends on another incomplete task
|
|
329
|
+
- Same file is modified by multiple tasks
|
|
330
|
+
- Shared resource (DB migration, config file, shared service)
|
|
331
|
+
|
|
332
|
+
**Example task with all components:**
|
|
333
|
+
|
|
334
|
+
```markdown
|
|
335
|
+
- [ ] [T042] [P] Write unit tests for Product entity validation (12 tests) • 2 SP (~3-4h)
|
|
336
|
+
File: tests/unit/entities/Product.entity.spec.ts
|
|
337
|
+
Tests: price validation, stock constraints, name required, category FK
|
|
338
|
+
Dependencies: None (can run parallel with other test tasks)
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
262
343
|
**Feature Breakdown Logic:**
|
|
263
344
|
|
|
264
345
|
For each Epic:
|
|
@@ -289,18 +370,57 @@ For each Epic:
|
|
|
289
370
|
- Entity: {{ENTITY_NAME}}
|
|
290
371
|
- Tests: {{TEST_COUNT}} ({{TEST_TYPES}})
|
|
291
372
|
|
|
292
|
-
**Tasks:**
|
|
293
|
-
|
|
294
|
-
- [ ]
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
- [ ]
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
373
|
+
**Tasks:** (Test-First ordering, execution sequence, hybrid estimation)
|
|
374
|
+
|
|
375
|
+
- [ ] [T0XX] [P] Write unit tests for {{ENTITY}} entity validation ({{COUNT}} tests) • {{SP}} SP (~{{TIME}})
|
|
376
|
+
File: tests/unit/entities/{{ENTITY}}.entity.spec.ts
|
|
377
|
+
Tests: {{TEST_SCENARIOS}}
|
|
378
|
+
Dependencies: None (can run parallel with other test tasks)
|
|
379
|
+
|
|
380
|
+
- [ ] [T0YY] Create {{ENTITY}} entity with validation • {{SP}} SP (~{{TIME}})
|
|
381
|
+
File: src/entities/{{ENTITY}}.entity.ts
|
|
382
|
+
Implements: {{VALIDATION_RULES}}
|
|
383
|
+
Dependencies: None
|
|
384
|
+
|
|
385
|
+
- [ ] [T0ZZ] Create I{{REPOSITORY}} interface • {{SP}} SP (~{{TIME}})
|
|
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)
|
|
304
424
|
|
|
305
425
|
**Acceptance Criteria:**
|
|
306
426
|
|
|
@@ -326,9 +446,10 @@ For each Epic:
|
|
|
326
446
|
|
|
327
447
|
### Feature 2.1: User Entity & Repository • 5 SP
|
|
328
448
|
|
|
329
|
-
⏱️ **Est. Time:** 1-2 days
|
|
449
|
+
⏱️ **Est. Time:** 1-2 days (~12-16h total)
|
|
330
450
|
🎯 **Priority:** P0
|
|
331
|
-
📋 **Dependencies:** None
|
|
451
|
+
📋 **Dependencies:** None (foundational entity)
|
|
452
|
+
🏷️ **User Story:** [US1] As a system, I need to store user data securely
|
|
332
453
|
|
|
333
454
|
**Scope:**
|
|
334
455
|
- Entity: User (id, email, username, passwordHash, role, createdAt, updatedAt)
|
|
@@ -336,23 +457,68 @@ For each Epic:
|
|
|
336
457
|
- Validation: Email format, username constraints, password strength
|
|
337
458
|
- Tests: 8 unit tests, 4 integration tests
|
|
338
459
|
|
|
339
|
-
**Tasks:**
|
|
340
|
-
|
|
341
|
-
- [ ]
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
- [ ]
|
|
347
|
-
|
|
460
|
+
**Tasks:** (Test-First, execution order, hybrid estimation)
|
|
461
|
+
|
|
462
|
+
- [ ] [T001] [P] Write unit tests for User entity validation (8 tests) • 2 SP (~3-4h)
|
|
463
|
+
File: tests/unit/entities/User.entity.spec.ts
|
|
464
|
+
Tests: email format, username constraints, password hashing, role enum, timestamps
|
|
465
|
+
Dependencies: None (can run parallel with other test tasks)
|
|
466
|
+
|
|
467
|
+
- [ ] [T002] Create User entity with field validation • 2 SP (~3-4h)
|
|
468
|
+
File: src/entities/User.entity.ts
|
|
469
|
+
Implements: Email validation regex, username 3-20 chars, password bcrypt hashing
|
|
470
|
+
Dependencies: None
|
|
471
|
+
|
|
472
|
+
- [ ] [T003] [P] Create IUserRepository interface • 1 SP (~1-2h)
|
|
473
|
+
File: src/repositories/interfaces/IUserRepository.ts
|
|
474
|
+
Methods: create, findById, findByEmail, findAll, update, delete
|
|
475
|
+
Dependencies: T002 (needs User entity type)
|
|
476
|
+
|
|
477
|
+
- [ ] [T004] Implement UserRepository with Prisma/TypeORM • 1 SP (~1-2h)
|
|
478
|
+
File: src/repositories/UserRepository.ts
|
|
479
|
+
Implements: All CRUD methods from IUserRepository interface
|
|
480
|
+
Dependencies: T002 (User entity), T003 (interface)
|
|
481
|
+
|
|
482
|
+
- [ ] [T005] Add database migration for users table • 1 SP (~1-2h)
|
|
483
|
+
File: migrations/001_create_users_table.ts (Prisma) or similar
|
|
484
|
+
Schema: All User fields + indexes (email unique, username unique)
|
|
485
|
+
Dependencies: T002 (User entity schema)
|
|
486
|
+
|
|
487
|
+
- [ ] [T006] Write integration tests for UserRepository (4 tests) • 2 SP (~3-4h)
|
|
488
|
+
File: tests/integration/repositories/UserRepository.spec.ts
|
|
489
|
+
Tests: CRUD operations, unique constraints, transactions, error handling
|
|
490
|
+
Dependencies: T004 (UserRepository), T005 (migration)
|
|
491
|
+
|
|
492
|
+
- [ ] [T007] Update data model documentation • 1 SP (~1h)
|
|
493
|
+
File: docs/data-model.md
|
|
494
|
+
Add: User entity schema, relationships, validation rules
|
|
495
|
+
Dependencies: T002 (User entity complete)
|
|
348
496
|
|
|
349
497
|
**Acceptance Criteria:**
|
|
350
|
-
|
|
351
|
-
- [ ]
|
|
352
|
-
- [ ]
|
|
353
|
-
- [ ]
|
|
354
|
-
- [ ]
|
|
355
|
-
- [ ]
|
|
498
|
+
|
|
499
|
+
- [ ] User entity validates email format (regex: RFC 5322)
|
|
500
|
+
- [ ] Password is hashed with bcrypt (cost factor 10) before storage
|
|
501
|
+
- [ ] Repository handles all CRUD operations correctly
|
|
502
|
+
- [ ] Migration creates table with correct schema + indexes
|
|
503
|
+
- [ ] Test coverage ≥ 80% (measured by Jest/Vitest)
|
|
504
|
+
- [ ] No TypeScript errors (strict mode)
|
|
505
|
+
- [ ] All 12 tests passing (8 unit + 4 integration)
|
|
506
|
+
|
|
507
|
+
**Task Execution Graph:**
|
|
508
|
+
|
|
509
|
+
```
|
|
510
|
+
T001 [P] ──┐
|
|
511
|
+
├──> T002 ──┬──> T003 ──> T004 ──┬──> T006
|
|
512
|
+
│ │ │
|
|
513
|
+
│ └──> T005 ────────────┘
|
|
514
|
+
│ │
|
|
515
|
+
└─────────────────────────────────┴──> T007
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**Parallelization Notes:**
|
|
519
|
+
- T001 can run parallel to other test tasks (different file)
|
|
520
|
+
- T005 can start as soon as T002 completes (don't need to wait for T004)
|
|
521
|
+
- T007 (docs) can run while T006 (tests) runs
|
|
356
522
|
|
|
357
523
|
**Ready-to-execute command:**
|
|
358
524
|
```bash
|
|
@@ -363,40 +529,96 @@ For each Epic:
|
|
|
363
529
|
|
|
364
530
|
### Feature 2.2: Product Entity & Repository • 8 SP
|
|
365
531
|
|
|
366
|
-
⏱️ **Est. Time:** 2-3 days
|
|
532
|
+
⏱️ **Est. Time:** 2-3 days (~16-24h total)
|
|
367
533
|
🎯 **Priority:** P0
|
|
368
|
-
📋 **Dependencies:** Feature 2.4 (Category entity)
|
|
534
|
+
📋 **Dependencies:** Feature 2.4 (Category entity - needs Category FK)
|
|
535
|
+
🏷️ **User Story:** [US2] As a store owner, I need to manage product catalog with search
|
|
369
536
|
|
|
370
537
|
**Scope:**
|
|
371
538
|
|
|
372
539
|
- Entity: Product (id, name, description, price, stock, categoryId, images, createdAt, updatedAt)
|
|
373
|
-
- Repository: IProductRepository with CRUD + search
|
|
540
|
+
- Repository: IProductRepository with CRUD + search/filter
|
|
374
541
|
- Validation: Price > 0, stock ≥ 0, name required
|
|
375
542
|
- Relationships: belongsTo Category
|
|
376
543
|
- Tests: 12 unit tests, 6 integration tests
|
|
377
544
|
|
|
378
|
-
**Tasks:**
|
|
379
|
-
|
|
380
|
-
- [ ]
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
- [ ]
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
- [ ]
|
|
545
|
+
**Tasks:** (Test-First, execution order, hybrid estimation)
|
|
546
|
+
|
|
547
|
+
- [ ] [T008] [P] Write unit tests for Product entity validation (12 tests) • 3 SP (~4-8h)
|
|
548
|
+
File: tests/unit/entities/Product.entity.spec.ts
|
|
549
|
+
Tests: price validation, stock constraints, name required, category FK, images array
|
|
550
|
+
Dependencies: T007 (Category entity exists for FK testing)
|
|
551
|
+
|
|
552
|
+
- [ ] [T009] Create Product entity with validation + Category FK • 3 SP (~4-8h)
|
|
553
|
+
File: src/entities/Product.entity.ts
|
|
554
|
+
Implements: Price > 0, stock ≥ 0, name required, belongs to Category relationship
|
|
555
|
+
Dependencies: T007 (Category entity), T008 (tests)
|
|
556
|
+
|
|
557
|
+
- [ ] [T010] Create IProductRepository interface • 1 SP (~1-2h)
|
|
558
|
+
File: src/repositories/interfaces/IProductRepository.ts
|
|
559
|
+
Methods: CRUD + search(query), filterByCategory(categoryId), updateStock(id, quantity)
|
|
560
|
+
Dependencies: T009 (Product entity)
|
|
561
|
+
|
|
562
|
+
- [ ] [T011] Implement ProductRepository with search/filter methods • 2 SP (~3-4h)
|
|
563
|
+
File: src/repositories/ProductRepository.ts
|
|
564
|
+
Implements: All CRUD + search (case-insensitive name), filter by category
|
|
565
|
+
Dependencies: T009 (entity), T010 (interface)
|
|
566
|
+
|
|
567
|
+
- [ ] [T012] Add database migration for products table • 1 SP (~1-2h)
|
|
568
|
+
File: migrations/002_create_products_table.ts
|
|
569
|
+
Schema: All Product fields + FK to categories + indexes (categoryId, name)
|
|
570
|
+
Dependencies: T009 (Product entity schema)
|
|
571
|
+
|
|
572
|
+
- [ ] [T013] Implement inventory tracking logic • 2 SP (~3-4h)
|
|
573
|
+
File: src/repositories/ProductRepository.ts (extend)
|
|
574
|
+
Logic: Atomic stock decrements, prevent negative stock, transaction support
|
|
575
|
+
Dependencies: T011 (ProductRepository base)
|
|
576
|
+
|
|
577
|
+
- [ ] [T014] Write integration tests for ProductRepository (6 tests) • 2 SP (~3-4h)
|
|
578
|
+
File: tests/integration/repositories/ProductRepository.spec.ts
|
|
579
|
+
Tests: CRUD, search, filter by category, stock updates, FK constraints
|
|
580
|
+
Dependencies: T011, T012, T013
|
|
581
|
+
|
|
582
|
+
- [ ] [T015] Write tests for search/filter functionality (4 tests) • 2 SP (~3-4h)
|
|
583
|
+
File: tests/integration/repositories/ProductRepository.search.spec.ts
|
|
584
|
+
Tests: Case-insensitive search, partial match, filter by category, pagination
|
|
585
|
+
Dependencies: T011 (search implementation)
|
|
586
|
+
|
|
587
|
+
- [ ] [T016] Update data model documentation • 1 SP (~1h)
|
|
588
|
+
File: docs/data-model.md
|
|
589
|
+
Add: Product entity schema, Category relationship, search indexes
|
|
590
|
+
Dependencies: T009 (Product entity complete)
|
|
391
591
|
|
|
392
592
|
**Acceptance Criteria:**
|
|
393
593
|
|
|
394
|
-
- [ ] Product validates price and stock
|
|
395
|
-
- [ ] Search by name works (case-insensitive)
|
|
396
|
-
- [ ] Filter by category
|
|
397
|
-
- [ ] Inventory decrements correctly
|
|
398
|
-
- [ ]
|
|
594
|
+
- [ ] Product validates price > 0 and stock ≥ 0
|
|
595
|
+
- [ ] Search by name works (case-insensitive, partial match)
|
|
596
|
+
- [ ] Filter by category returns only products in that category
|
|
597
|
+
- [ ] Inventory decrements correctly with atomic operations
|
|
598
|
+
- [ ] Stock cannot go negative (validation error)
|
|
599
|
+
- [ ] Migration includes FK constraint to categories + indexes
|
|
399
600
|
- [ ] Test coverage ≥ 80%
|
|
601
|
+
- [ ] All 22 tests passing (12 unit + 6 integration + 4 search)
|
|
602
|
+
|
|
603
|
+
**Task Execution Graph:**
|
|
604
|
+
|
|
605
|
+
```
|
|
606
|
+
T007 (Category) ──> T008 [P] (tests) ──> T009 (entity) ──┬──> T010 (interface) ──> T011 (repo) ──> T013 (inventory)
|
|
607
|
+
│ │
|
|
608
|
+
└──> T012 (migration) ─────────────────────┬─┤
|
|
609
|
+
│ │
|
|
610
|
+
T014 <──────────────────────────────────────────────┤ │
|
|
611
|
+
T015 <────────────────────────────────────────────────┘
|
|
612
|
+
T016 <── T009
|
|
613
|
+
|
|
614
|
+
[P] = Can run parallel with other test tasks
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
**Parallelization Notes:**
|
|
618
|
+
|
|
619
|
+
- T008 (tests) can run parallel to other entity test tasks
|
|
620
|
+
- T014 (integration tests) and T015 (search tests) can run in parallel (different test files)
|
|
621
|
+
- T016 (docs) can run while tests are executing
|
|
400
622
|
|
|
401
623
|
**Ready-to-execute command:**
|
|
402
624
|
|
|
@@ -437,6 +659,58 @@ For each Epic:
|
|
|
437
659
|
- Independent entities can be built in parallel
|
|
438
660
|
- Independent epics (after foundation) can be worked simultaneously
|
|
439
661
|
|
|
662
|
+
4. **Task-Level Dependencies** (Spec-Kit Inspired):
|
|
663
|
+
- For each Feature, analyze task dependencies at granular level
|
|
664
|
+
- Identify parallelization opportunities **within** Features (not just between)
|
|
665
|
+
- Generate task execution graph per Epic showing exact task order
|
|
666
|
+
|
|
667
|
+
**Task Dependency Matrix Example:**
|
|
668
|
+
|
|
669
|
+
```
|
|
670
|
+
Epic 2: Data Layer
|
|
671
|
+
|
|
672
|
+
Feature 2.1: User Entity (5 SP)
|
|
673
|
+
├─ T001 [P] Write User entity tests → No deps (can run parallel)
|
|
674
|
+
├─ T002 Create User entity → Depends on: None
|
|
675
|
+
├─ T003 [P] Create IUserRepository interface → Depends on: T002
|
|
676
|
+
├─ T004 Implement UserRepository → Depends on: T002, T003
|
|
677
|
+
├─ T005 Add users table migration → Depends on: T002
|
|
678
|
+
├─ T006 Write UserRepository integration tests → Depends on: T004, T005
|
|
679
|
+
└─ T007 Update data model docs → Depends on: T002
|
|
680
|
+
|
|
681
|
+
Feature 2.2: Category Entity (3 SP) [Can run PARALLEL to Feature 2.1]
|
|
682
|
+
├─ T008 [P] Write Category entity tests → No deps
|
|
683
|
+
├─ T009 Create Category entity → Depends on: None
|
|
684
|
+
├─ T010 Create CategoryRepository → Depends on: T009
|
|
685
|
+
└─ T011 Update data model docs → Depends on: T009
|
|
686
|
+
|
|
687
|
+
Feature 2.3: Product Entity (8 SP) [BLOCKS on Feature 2.2 - needs Category FK]
|
|
688
|
+
├─ T012 Write Product entity tests → Depends on: T009 (Category entity)
|
|
689
|
+
├─ T013 Create Product entity with Category FK → Depends on: T009, T012
|
|
690
|
+
├─ T014 Create IProductRepository → Depends on: T013
|
|
691
|
+
├─ T015 Implement ProductRepository with search → Depends on: T013, T014
|
|
692
|
+
├─ T016 Write ProductRepository tests → Depends on: T015
|
|
693
|
+
└─ T017 Update data model docs → Depends on: T013
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
**Parallelization Analysis:**
|
|
697
|
+
|
|
698
|
+
✅ **Feature-Level Parallelization:**
|
|
699
|
+
- Feature 2.1 (User) and Feature 2.2 (Category) can run in PARALLEL → 40% time save
|
|
700
|
+
- Feature 2.3 (Product) BLOCKS on Feature 2.2 → must wait for Category entity
|
|
701
|
+
|
|
702
|
+
✅ **Task-Level Parallelization (within Feature 2.1):**
|
|
703
|
+
- T001 (tests) can run parallel to T002 (entity) if desired (TDD: run tests first recommended)
|
|
704
|
+
- T003 (interface) and T005 (migration) can run in parallel (both depend only on T002)
|
|
705
|
+
- T006 (integration tests) and T007 (docs) can run in parallel
|
|
706
|
+
|
|
707
|
+
⚡ **Team Scaling:**
|
|
708
|
+
- With 1 dev: Features run sequentially → ~16 hours (Feature 2.1) + ~8 hours (Feature 2.2) + ~16 hours (Feature 2.3) = 40 hours total
|
|
709
|
+
- With 2 devs: Feature 2.1 + 2.2 parallel → ~16 hours + ~16 hours (Product) = 32 hours total (20% save)
|
|
710
|
+
- With 3 devs: Task-level parallelization within features → ~28 hours total (30% save)
|
|
711
|
+
|
|
712
|
+
---
|
|
713
|
+
|
|
440
714
|
**Generate Mermaid Dependency Graph:**
|
|
441
715
|
|
|
442
716
|
```mermaid
|
|
@@ -595,6 +869,91 @@ Use this table to translate Story Points to time estimates:
|
|
|
595
869
|
|
|
596
870
|
---
|
|
597
871
|
|
|
872
|
+
## 🔄 5-Phase Execution Model (Spec-Kit Inspired)
|
|
873
|
+
|
|
874
|
+
Our roadmap follows a battle-tested 5-phase approach for predictable, incremental delivery:
|
|
875
|
+
|
|
876
|
+
### Phase 0: Setup (Pre-Foundation)
|
|
877
|
+
|
|
878
|
+
**Goal:** Project initialization
|
|
879
|
+
**Duration:** 1-2 days (already done by `/project-scaffold`)
|
|
880
|
+
|
|
881
|
+
- Repository setup, CI/CD baseline, Docker configuration
|
|
882
|
+
- Development environment setup
|
|
883
|
+
- Base dependencies installed
|
|
884
|
+
|
|
885
|
+
### Phase 1: Foundational (Blocking Prerequisites)
|
|
886
|
+
|
|
887
|
+
**Goal:** Core infrastructure that everything depends on
|
|
888
|
+
**Duration:** 2-3 weeks
|
|
889
|
+
**Epics:** Foundation, Data Layer (base models only)
|
|
890
|
+
|
|
891
|
+
**Characteristics:**
|
|
892
|
+
|
|
893
|
+
- ❌ NO parallelization (everything blocks on these)
|
|
894
|
+
- ✅ Must complete BEFORE user story implementation
|
|
895
|
+
- 🎯 Establish patterns for entire project
|
|
896
|
+
|
|
897
|
+
**Example Tasks:**
|
|
898
|
+
|
|
899
|
+
- [T001-T020] Database connection, ORM setup, migrations
|
|
900
|
+
- [T021-T040] Logging, error handling, config management
|
|
901
|
+
- [T041-T060] Base entity models (User, Session)
|
|
902
|
+
|
|
903
|
+
### Phase 2-N: User Stories (Priority-Ordered)
|
|
904
|
+
|
|
905
|
+
**Goal:** Deliver business value incrementally
|
|
906
|
+
**Duration:** Varies per story (1-3 weeks each)
|
|
907
|
+
**Epics:** All business features
|
|
908
|
+
|
|
909
|
+
**Characteristics:**
|
|
910
|
+
|
|
911
|
+
- ✅ Each story is INDEPENDENTLY deployable
|
|
912
|
+
- ✅ High parallelization potential (2-3 devs)
|
|
913
|
+
- 🎯 Delivers working software each iteration
|
|
914
|
+
|
|
915
|
+
**Story Execution Order:**
|
|
916
|
+
|
|
917
|
+
1. P0 stories (MVP-critical) → [US1], [US2], [US3]
|
|
918
|
+
2. P1 stories (high value) → [US4], [US5]
|
|
919
|
+
3. P2 stories (nice-to-have) → [US6], [US7]
|
|
920
|
+
|
|
921
|
+
**Example Story Tasks:**
|
|
922
|
+
|
|
923
|
+
- [T061] [US1] Write authentication tests
|
|
924
|
+
- [T062] [US1] Implement JWT service
|
|
925
|
+
- [T063] [US1] Create login endpoint
|
|
926
|
+
- [T064] [P] [US2] Write product catalog tests (parallel to US1)
|
|
927
|
+
|
|
928
|
+
### Phase N: Polish & Cross-Cutting
|
|
929
|
+
|
|
930
|
+
**Goal:** Production readiness
|
|
931
|
+
**Duration:** 1-2 weeks
|
|
932
|
+
**Epics:** Operations, Testing, Performance
|
|
933
|
+
|
|
934
|
+
**Characteristics:**
|
|
935
|
+
|
|
936
|
+
- ✅ Can run after all critical stories complete
|
|
937
|
+
- ✅ Some parallelization (different concerns)
|
|
938
|
+
- 🎯 Ensures quality and operability
|
|
939
|
+
|
|
940
|
+
**Example Tasks:**
|
|
941
|
+
|
|
942
|
+
- [T200-T210] Performance optimization, caching
|
|
943
|
+
- [T211-T220] Security hardening, penetration testing
|
|
944
|
+
- [T221-T230] Monitoring, alerting, logging
|
|
945
|
+
- [T231-T240] Documentation finalization
|
|
946
|
+
|
|
947
|
+
### Phase Benefits:
|
|
948
|
+
|
|
949
|
+
1. **Incremental Delivery**: Ship user stories as they complete
|
|
950
|
+
2. **Risk Mitigation**: Foundation issues caught early
|
|
951
|
+
3. **Team Scaling**: Multiple stories run in parallel
|
|
952
|
+
4. **Predictable Velocity**: Story points per sprint stabilize
|
|
953
|
+
5. **Quality Gates**: Each phase has clear exit criteria
|
|
954
|
+
|
|
955
|
+
---
|
|
956
|
+
|
|
598
957
|
## 🔗 Dependency Graph
|
|
599
958
|
|
|
600
959
|
```mermaid
|
|
@@ -625,16 +984,40 @@ Use this table to translate Story Points to time estimates:
|
|
|
625
984
|
|
|
626
985
|
##### Feature 1.1: Base Application Configuration • 5 SP
|
|
627
986
|
|
|
628
|
-
⏱️ **Est. Time:** 1-2 days • 🎯 **Priority:** P0 • 📋 **Dependencies:** None
|
|
987
|
+
⏱️ **Est. Time:** 1-2 days (~8-12h total) • 🎯 **Priority:** P0 • 📋 **Dependencies:** None
|
|
988
|
+
🏷️ **User Story:** [US0] As a developer, I need a robust configuration system
|
|
989
|
+
|
|
990
|
+
**Tasks:** (Test-First, execution order, hybrid estimation)
|
|
991
|
+
|
|
992
|
+
- [ ] [T001] [P] Write unit tests for configuration service (5 tests) • 2 SP (~3-4h)
|
|
993
|
+
File: tests/unit/config/ConfigService.spec.ts
|
|
994
|
+
Tests: env var loading, validation, defaults, type conversion, missing var errors
|
|
995
|
+
Dependencies: None (can run parallel with other foundational tests)
|
|
996
|
+
|
|
997
|
+
- [ ] [T002] Setup configuration service/module • 2 SP (~3-4h)
|
|
998
|
+
File: src/config/ConfigService.ts
|
|
999
|
+
Implements: Load env vars, validate required fields, type-safe access
|
|
1000
|
+
Dependencies: None
|
|
1001
|
+
|
|
1002
|
+
- [ ] [T003] Configure environment variables (`.env` structure) • 1 SP (~1-2h)
|
|
1003
|
+
File: .env.example
|
|
1004
|
+
Structure: All required env vars with descriptions and example values
|
|
1005
|
+
Dependencies: T002 (know which vars are needed)
|
|
1006
|
+
|
|
1007
|
+
- [ ] [T004] Add validation for required env vars • 1 SP (~1-2h)
|
|
1008
|
+
File: src/config/ConfigService.ts (extend)
|
|
1009
|
+
Logic: Fail-fast on missing vars, clear error messages
|
|
1010
|
+
Dependencies: T002 (base service exists)
|
|
629
1011
|
|
|
630
|
-
|
|
1012
|
+
- [ ] [T005] [P] Create constants file for app-wide values • 1 SP (~1h)
|
|
1013
|
+
File: src/constants/index.ts
|
|
1014
|
+
Constants: App name, version, default values, enums
|
|
1015
|
+
Dependencies: None (can run parallel with other tasks)
|
|
631
1016
|
|
|
632
|
-
- [ ]
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
- [ ] Write unit tests for configuration service (5 tests) • 2 SP
|
|
637
|
-
- [ ] Document configuration in `specs/configuration.md` • 1 SP
|
|
1017
|
+
- [ ] [T006] Document configuration in specs/configuration.md • 1 SP (~1h)
|
|
1018
|
+
File: specs/configuration.md
|
|
1019
|
+
Add: All env vars, types, defaults, validation rules
|
|
1020
|
+
Dependencies: T002, T003, T004 (config system complete)
|
|
638
1021
|
|
|
639
1022
|
**Acceptance Criteria:**
|
|
640
1023
|
|