ai-flow-dev 2.1.3 → 2.1.5

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 (96) hide show
  1. package/README.md +25 -38
  2. package/dist/cli.js +68 -46
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +5 -5
  5. package/prompts/backend/flow-build-phase-0.md +31 -63
  6. package/prompts/backend/flow-build-phase-1.md +9 -17
  7. package/prompts/backend/flow-build-phase-10.md +199 -585
  8. package/prompts/backend/flow-build-phase-2.md +152 -86
  9. package/prompts/backend/flow-build-phase-3.md +108 -68
  10. package/prompts/backend/flow-build-phase-4.md +5 -8
  11. package/prompts/backend/flow-build-phase-5.md +39 -12
  12. package/prompts/backend/flow-build-phase-6.md +29 -8
  13. package/prompts/backend/flow-build-phase-7.md +120 -40
  14. package/prompts/backend/flow-build-phase-8.md +28 -65
  15. package/prompts/backend/flow-build-phase-9.md +267 -1298
  16. package/prompts/backend/flow-build.md +881 -957
  17. package/prompts/backend/flow-dev-commit.md +27 -50
  18. package/prompts/backend/flow-dev-feature.md +1929 -2017
  19. package/prompts/backend/flow-dev-fix.md +936 -964
  20. package/prompts/backend/flow-dev-refactor.md +672 -701
  21. package/prompts/backend/flow-dev-review.md +356 -389
  22. package/prompts/backend/flow-dev-work.md +1066 -1118
  23. package/prompts/backend/flow-docs-sync.md +20 -196
  24. package/prompts/frontend/flow-build-phase-0.md +503 -484
  25. package/prompts/frontend/flow-build-phase-1.md +445 -433
  26. package/prompts/frontend/flow-build-phase-2.md +910 -957
  27. package/prompts/frontend/flow-build-phase-3.md +692 -664
  28. package/prompts/frontend/flow-build-phase-4.md +478 -463
  29. package/prompts/frontend/flow-build-phase-5.md +488 -467
  30. package/prompts/frontend/flow-build-phase-6.md +571 -550
  31. package/prompts/frontend/flow-build-phase-7.md +560 -592
  32. package/prompts/frontend/flow-build-phase-8.md +17 -42
  33. package/prompts/frontend/flow-build.md +457 -503
  34. package/prompts/frontend/flow-docs-sync.md +14 -35
  35. package/prompts/mobile/flow-build-phase-0.md +104 -97
  36. package/prompts/mobile/flow-build-phase-1.md +137 -122
  37. package/prompts/mobile/flow-build-phase-2.md +123 -130
  38. package/prompts/mobile/flow-build-phase-3.md +144 -149
  39. package/prompts/mobile/flow-build-phase-4.md +140 -132
  40. package/prompts/mobile/flow-build-phase-5.md +70 -70
  41. package/prompts/mobile/flow-build-phase-6.md +136 -134
  42. package/prompts/mobile/flow-build-phase-7.md +24 -58
  43. package/prompts/mobile/flow-build-phase-8.md +17 -42
  44. package/prompts/mobile/flow-build.md +47 -97
  45. package/prompts/mobile/flow-docs-sync.md +13 -32
  46. package/prompts/shared/mermaid-guidelines.md +106 -0
  47. package/prompts/shared/scope-levels.md +126 -0
  48. package/prompts/shared/story-points.md +65 -0
  49. package/prompts/shared/task-format.md +86 -0
  50. package/templates/AGENT.template.md +194 -15
  51. package/templates/backend/README.template.md +2 -32
  52. package/templates/backend/ai-instructions.template.md +2 -32
  53. package/templates/backend/copilot-instructions.template.md +2 -22
  54. package/templates/backend/docs/api.template.md +89 -20
  55. package/templates/backend/docs/architecture.template.md +165 -53
  56. package/templates/backend/docs/business-flows.template.md +7 -14
  57. package/templates/backend/docs/code-standards.template.md +2 -38
  58. package/templates/backend/docs/contributing.template.md +2 -16
  59. package/templates/backend/docs/data-model.template.md +125 -21
  60. package/templates/backend/docs/operations.template.md +179 -50
  61. package/templates/backend/docs/testing.template.md +2 -42
  62. package/templates/backend/project-brief.template.md +2 -28
  63. package/templates/backend/specs/configuration.template.md +2 -14
  64. package/templates/backend/specs/security.template.md +2 -32
  65. package/templates/frontend/README.template.md +2 -18
  66. package/templates/frontend/ai-instructions.template.md +2 -20
  67. package/templates/frontend/docs/api-integration.template.md +12 -30
  68. package/templates/frontend/docs/components.template.md +2 -28
  69. package/templates/frontend/docs/error-handling.template.md +11 -27
  70. package/templates/frontend/docs/operations.template.md +8 -18
  71. package/templates/frontend/docs/performance.template.md +8 -18
  72. package/templates/frontend/docs/pwa.template.md +8 -18
  73. package/templates/frontend/docs/state-management.template.md +2 -28
  74. package/templates/frontend/docs/styling.template.md +2 -26
  75. package/templates/frontend/docs/testing.template.md +2 -28
  76. package/templates/frontend/project-brief.template.md +2 -16
  77. package/templates/frontend/specs/accessibility.template.md +8 -18
  78. package/templates/frontend/specs/configuration.template.md +2 -24
  79. package/templates/frontend/specs/security.template.md +10 -24
  80. package/templates/fullstack/README.template.md +17 -47
  81. package/templates/fullstack/ai-instructions.template.md +17 -45
  82. package/templates/fullstack/project-brief.template.md +16 -42
  83. package/templates/fullstack/specs/configuration.template.md +16 -42
  84. package/templates/mobile/README.template.md +11 -29
  85. package/templates/mobile/ai-instructions.template.md +11 -27
  86. package/templates/mobile/docs/app-store.template.md +11 -29
  87. package/templates/mobile/docs/architecture.template.md +14 -38
  88. package/templates/mobile/docs/native-features.template.md +16 -44
  89. package/templates/mobile/docs/navigation.template.md +9 -23
  90. package/templates/mobile/docs/offline-strategy.template.md +10 -26
  91. package/templates/mobile/docs/permissions.template.md +9 -23
  92. package/templates/mobile/docs/state-management.template.md +12 -32
  93. package/templates/mobile/docs/testing.template.md +14 -38
  94. package/templates/mobile/project-brief.template.md +12 -30
  95. package/templates/mobile/specs/build-configuration.template.md +10 -26
  96. package/templates/mobile/specs/deployment.template.md +9 -23
@@ -3,17 +3,13 @@
3
3
  **YOU ARE AN EXPERT MOBILE ARCHITECT AND DOCUMENTATION SPECIALIST.**
4
4
 
5
5
  Your mission is to detect changes in the mobile codebase and update the project documentation automatically when the user executes `/flow-docs-sync`.
6
-
7
- ---
8
-
6
+ ---
9
7
  ## Command: `/flow-docs-sync`
10
8
 
11
9
  ### Objective
12
10
 
13
11
  Detect changes in the mobile codebase compared to the last documented state (stored in `.ai-flow/cache/docs-analysis.json`) and update all affected documentation files automatically.
14
-
15
- ---
16
-
12
+ ---
17
13
  ## Execution Flow
18
14
 
19
15
  ### Step 1: Check for Analysis File
@@ -218,9 +214,7 @@ No updates required.
218
214
  ```
219
215
  Update cancelled. Run `/flow-docs-sync` when you're ready to update the documentation.
220
216
  ```
221
-
222
- ---
223
-
217
+ ---
224
218
  ## Change Detection Rules
225
219
 
226
220
  ### Screens Detection
@@ -341,9 +335,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
341
335
 
342
336
  - Add new variables to configuration spec
343
337
  - Maintain existing variables
344
-
345
- ---
346
-
338
+ ---
347
339
  ## Important Rules
348
340
 
349
341
  1. **Incremental Updates Only:**
@@ -369,9 +361,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
369
361
  - Regenerate navigation diagrams when screens change
370
362
  - Regenerate architecture diagrams when structure changes
371
363
  - Use mermaid format for all diagrams
372
-
373
- ---
374
-
364
+ ---
375
365
  ## 📊 MOBILE DIAGRAM REGENERATION GUIDELINES
376
366
 
377
367
  When regenerating mobile diagrams, follow these **critical** formatting rules:
@@ -437,9 +427,7 @@ graph TD
437
427
  style P1 fill:#fff4e6
438
428
  ```
439
429
  ````
440
-
441
- ---
442
-
430
+ ---
443
431
  ### State Management Diagrams (state-management.md)
444
432
 
445
433
  **Diagram Types:** `graph LR`, `sequenceDiagram`, `graph TD`
@@ -495,9 +483,7 @@ sequenceDiagram
495
483
  Note over Cache: Cache valid for 5min
496
484
  ```
497
485
  ````
498
-
499
- ---
500
-
486
+ ---
501
487
  ### Testing Diagrams (testing.md)
502
488
 
503
489
  **Diagram Type:** `graph TB`
@@ -535,9 +521,7 @@ graph TB
535
521
  style UNIT fill:#e8f5e9,stroke:#388e3c,stroke-width:3px
536
522
  ```
537
523
  ````
538
-
539
- ---
540
-
524
+ ---
541
525
  ### Common Formatting Rules (ALL Mobile Diagrams)
542
526
 
543
527
  **CRITICAL - Code Fence Syntax:**
@@ -583,16 +567,12 @@ graph TB
583
567
  - Show device vs emulator distinction in testing diagrams
584
568
  - Include deep linking routes in navigation diagrams
585
569
  - Highlight authentication flows and protected routes
586
-
587
- ---
588
-
570
+ ---
589
571
  5. **Error Handling:**
590
572
  - If document doesn't exist, create it following template
591
573
  - If docs-analysis.json is corrupted, regenerate it
592
574
  - If comparison fails, show error and suggest full Phase 0 re-run
593
-
594
- ---
595
-
575
+ ---
596
576
  ## Example Execution
597
577
 
598
578
  ```
@@ -626,10 +606,11 @@ AI:
626
606
 
627
607
  Documentation synchronized successfully.
628
608
  ```
609
+ ---
610
+ **BEGIN EXECUTION when user runs `/flow-docs-sync`**
611
+
629
612
 
630
- ---
631
613
 
632
- **BEGIN EXECUTION when user runs `/flow-docs-sync`**
633
614
 
634
615
 
635
616
 
@@ -0,0 +1,106 @@
1
+ # 🎨 Mermaid Diagram Guidelines
2
+
3
+ Follow these critical rules for all Mermaid diagrams to ensure they render correctly in GitHub, VS Code, and other markdown viewers.
4
+
5
+ ## 🛠️ General Rules
6
+
7
+ - **Code Fence:** ALWAYS use exactly ` ```mermaid ` (lowercase, no spaces).
8
+ - **NO Indentation:** Do not indent the diagram code with spaces or tabs.
9
+ - **Closing Fence:** Always close with ` ``` `.
10
+ - **Validation:** Preview at [mermaid.live](https://mermaid.live/) if unsure.
11
+ ---
12
+ ## 📊 Entity Relationship (ER) Diagrams
13
+
14
+ **Type:** `erDiagram`
15
+
16
+ ### Relationship Notation
17
+
18
+ - `||--o{` : One-to-Many (one to zero or more)
19
+ - `||--||` : One-to-One (one to exactly one)
20
+ - `}o--o{` : Many-to-Many (requires junction table)
21
+ - `||--|{` : One-to-Many (one to one or more)
22
+
23
+ ### Field Notation
24
+
25
+ - `PK` : Primary Key
26
+ - `FK` : Foreign Key
27
+ - `UK` : Unique Key
28
+ - Add descriptions in quotes: `string email "User email address"`
29
+
30
+ ### Example
31
+
32
+ ```mermaid
33
+ erDiagram
34
+ USER ||--o{ ORDER : places
35
+ USER {
36
+ string id PK
37
+ string email UK
38
+ string name
39
+ }
40
+ ORDER {
41
+ string id PK
42
+ string userId FK
43
+ decimal total
44
+ }
45
+ ```
46
+ ---
47
+ ## 📐 Architecture & Flow Diagrams
48
+
49
+ **Type:** `graph TD` (Top-Down) or `graph LR` (Left-Right)
50
+
51
+ ### Node Shapes
52
+
53
+ - `[Square]` : Services, components, apps
54
+ - `[(Cylinder)]` : Databases, storage
55
+ - `([Rounded])` : Start/End points
56
+ - `{Diamond}` : Decision points
57
+
58
+ ### Styling
59
+
60
+ - Use `<br/>` for line breaks in labels.
61
+ - Apply colors: `style NodeName fill:#e1f5ff`
62
+ - Label connections: `A -->|HTTPS| B`
63
+
64
+ ### Example
65
+
66
+ ```mermaid
67
+ graph TD
68
+ Client[Web App] -->|API Call| API[Node.js API]
69
+ API -->|Query| DB[(PostgreSQL)]
70
+ style Client fill:#e1f5ff
71
+ style API fill:#fff4e1
72
+ style DB fill:#e1ffe1
73
+ ```
74
+ ---
75
+ ## 🔄 Business Flow Diagrams
76
+
77
+ **Type:** `flowchart TD` (or `flowchart LR`)
78
+
79
+ ### Requirements
80
+
81
+ - Start/End with `([Terminal Node])`.
82
+ - Use `{Diamond}` for decision points.
83
+ - Label branches: `-->|Yes|` or `-->|No|`.
84
+ - Show error/failure paths.
85
+
86
+ ### Example
87
+
88
+ ```mermaid
89
+ flowchart TD
90
+ Start([Start]) --> Action[Action]
91
+ Action --> Decision{Success?}
92
+ Decision -->|Yes| End([Success])
93
+ Decision -->|No| Fail([Failed])
94
+ style Start fill:#e1f5ff
95
+ style End fill:#e1ffe1
96
+ style Fail fill:#ffe1e1
97
+ ```
98
+ ---
99
+ ## ⚠️ Common Mistakes to Avoid
100
+
101
+ - ❌ ` ```Mermaid ` (Capital M)
102
+ - ❌ ` ``` mermaid ` (Extra space)
103
+ - ❌ Using invalid characters in node IDs (use `NodeID[Label]` instead)
104
+ - ❌ Circular dependencies without clear flow
105
+
106
+
@@ -0,0 +1,126 @@
1
+ # Project Scope Levels
2
+
3
+ > **Canonical definition of MVP, Production-Ready, and Enterprise scope levels.**
4
+ >
5
+ > This file defines how scope affects phase execution, question depth, and technology choices across all AI Flow workflows.
6
+ ---
7
+ ## Scope Level Summary
8
+ ---
9
+ | Scope | Symbol | Duration (Backend) | Phases | Best For |
10
+ | -------------------- | ------ | ------------------ | --------- | ---------------------------------- |
11
+ | **MVP** | 🚀 | 60-80 min | Core only | Prototypes, proof of concept |
12
+ | **Production-Ready** | ⭐ | 90-120 min | All | Production apps, client projects |
13
+ | **Enterprise** | 🏆 | 120-160 min | Extended | Large-scale, mission-critical apps |
14
+ ---
15
+ ## MVP Scope 🚀
16
+ ---
17
+ ### Characteristics
18
+
19
+ - **Phases included:** Core phases only (Phase 1-4 in backend)
20
+ - **Question depth:** Simplified, essential questions only
21
+ - **Technology choices:** Simple, proven defaults
22
+
23
+ ### Technology Defaults
24
+
25
+ | Category | MVP Choice |
26
+ | -------------- | ------------------------------ |
27
+ | Database | PostgreSQL (single instance) |
28
+ | ORM | Framework-idiomatic |
29
+ | Caching | None or in-memory |
30
+ | Search | Database LIKE queries |
31
+ | Architecture | Monolith |
32
+ | API Style | REST only |
33
+ | Authentication | JWT (basic) |
34
+ | Authorization | RBAC (simple roles) |
35
+ | Password | bcrypt, 8+ chars |
36
+ | Git Workflow | GitHub Flow |
37
+ | Test Coverage | 15-25% |
38
+ | Test Types | Unit tests only |
39
+ | Deployment | PaaS (Heroku, Railway, Render) |
40
+ | Monitoring | Basic (health checks, logs) |
41
+ ---
42
+ ## Production-Ready Scope ⭐
43
+ ---
44
+ ### Characteristics
45
+
46
+ - **Phases included:** All phases (1-7/8)
47
+ - **Question depth:** Complete professional coverage
48
+ - **Technology choices:** Robust, scalable defaults
49
+
50
+ ### Technology Defaults
51
+
52
+ | Category | Production Choice |
53
+ | -------------- | ----------------------------------- |
54
+ | Database | PostgreSQL (managed) |
55
+ | ORM | Framework-idiomatic |
56
+ | Caching | Redis |
57
+ | Search | PostgreSQL Full-Text or Meilisearch |
58
+ | Architecture | Clean Architecture |
59
+ | API Style | REST + GraphQL (optional) |
60
+ | Authentication | JWT + Refresh Tokens |
61
+ | Authorization | RBAC (granular permissions) |
62
+ | Password | bcrypt 12 rounds, 12+ chars |
63
+ | Git Workflow | Git Flow |
64
+ | Test Coverage | 70% |
65
+ | Test Types | Unit, Integration, E2E |
66
+ | Deployment | Cloud (AWS/GCP/Azure) |
67
+ | Monitoring | APM (Datadog/New Relic) + Sentry |
68
+ ---
69
+ ## Enterprise Scope 🏆
70
+ ---
71
+ ### Characteristics
72
+
73
+ - **Phases included:** All phases with extended questions
74
+ - **Question depth:** Advanced, comprehensive
75
+ - **Technology choices:** Enterprise-grade, highly scalable
76
+
77
+ ### Technology Defaults
78
+
79
+ | Category | Enterprise Choice |
80
+ | -------------- | -------------------------------------- |
81
+ | Database | PostgreSQL (multi-region/sharded) |
82
+ | ORM | Framework-idiomatic |
83
+ | Caching | Redis Cluster |
84
+ | Search | Elasticsearch |
85
+ | Architecture | Microservices / Domain-Driven Design |
86
+ | API Style | REST + GraphQL + gRPC |
87
+ | Authentication | OAuth2 + SSO + MFA |
88
+ | Authorization | ABAC (Attribute-Based) |
89
+ | Password | bcrypt 14 rounds, 16+ chars, policies |
90
+ | Git Workflow | Git Flow + Release branches |
91
+ | Test Coverage | 85%+ |
92
+ | Test Types | Unit, Integration, E2E, Load, Security |
93
+ | Deployment | Multi-region, Kubernetes |
94
+ | Monitoring | Full observability stack |
95
+ ---
96
+ ## Scope Selection Prompt
97
+ ---
98
+ ```
99
+ ---
100
+ 🎯 Project Scope Selection
101
+ ---
102
+ What scope level do you want for this documentation?
103
+
104
+ A) 🚀 **MVP** (60-80 min) - Core features only, minimal setup
105
+ - Core phases only
106
+ - Simple architecture
107
+ - Basic testing
108
+ - Best for: Prototypes, proof of concept
109
+
110
+ B) ⭐ **Production-Ready** (90-120 min) - Complete professional setup
111
+ - All phases
112
+ - Robust architecture
113
+ - Comprehensive testing + CI/CD
114
+ - Best for: Production apps, client projects
115
+
116
+ C) 🏆 **Enterprise** (120-160 min) - Advanced features and scalability
117
+ - All phases with extended questions
118
+ - Enterprise architecture
119
+ - Full observability + compliance
120
+ - Best for: Large-scale, mission-critical apps
121
+
122
+ Your choice (A/B/C):
123
+ ```
124
+
125
+
126
+
@@ -0,0 +1,65 @@
1
+ # Story Points Reference
2
+
3
+ > **Canonical reference for Fibonacci-based Story Point estimation across all AI Flow phases.**
4
+ >
5
+ > This file is the single source of truth for Story Points. All phases that require SP estimation MUST reference this file.
6
+ ---
7
+ ## Story Points Scale (Fibonacci)
8
+ ---
9
+ | Story Points | Complexity | Typical Time | Examples |
10
+ | ------------ | ---------- | ------------ | -------------------------------------- |
11
+ | **1 SP** | Trivial | 1-2 hours | Add simple field, update enum |
12
+ | **2 SP** | Very Small | 2-4 hours | Basic validation, simple test |
13
+ | **3 SP** | Small | 4-8 hours | Simple CRUD endpoint, basic entity |
14
+ | **5 SP** | Medium | 1-2 days | Complex endpoint with business logic |
15
+ | **8 SP** | Complex | 2-3 days | Auth flow, complex validation |
16
+ | **13 SP** | Large | 1 week | Complete module with full tests |
17
+ | **21 SP** | Very Large | 2 weeks | Major feature with integration |
18
+ | **34 SP** | Epic | 3 weeks | Multiple related features (Epic-level) |
19
+ ---
20
+ ## Story Points to Time Conversion (Hybrid Estimation)
21
+ ---
22
+ Use this table to add time estimates to each task:
23
+
24
+ | Story Points | Time Estimate (solo dev) | Time Range | Example Task |
25
+ | ------------ | ------------------------ | ---------- | --------------------------------------- |
26
+ | **1 SP** | 1-2 hours | (~1-2h) | Add enum value, simple config change |
27
+ | **2 SP** | 3-4 hours | (~3-4h) | Write 5-8 unit tests, basic validation |
28
+ | **3 SP** | 4-8 hours | (~4-8h) | Simple CRUD endpoint, basic entity |
29
+ | **5 SP** | 1-2 days | (~1-2d) | Complex endpoint with business logic |
30
+ | **8 SP** | 2-3 days | (~2-3d) | Auth flow, complex validation |
31
+ | **13 SP** | 1 week | (~1w) | Complete module with full test coverage |
32
+ | **21 SP** | 2 weeks | (~2w) | Major feature with integration |
33
+ | **34 SP** | 3 weeks | (~3w) | Multiple related features (Epic-level) |
34
+
35
+ > **Note:** Time assumes AI-assisted development (GitHub Copilot, Claude, etc.). Without AI assistance, multiply time estimates by 2-3x.
36
+ >
37
+ > **Velocity Tracking:** After completing 2-3 features, compare actual time vs estimates to calibrate your team's velocity. Adjust remaining estimates accordingly.
38
+ ---
39
+ ## Epic Estimation Guidelines
40
+ ---
41
+ - **Foundation Epic:** 13-21 SP (depends on framework complexity)
42
+ - **Data Layer Epic:** 3-5 SP per simple entity, 8-13 SP per complex entity
43
+ - **Auth Epic:** 8 SP (basic JWT) to 21 SP (multi-provider + RBAC + 2FA)
44
+ - **Business Epics:** Varies by domain complexity
45
+ - **Integration Epic:** 5-8 SP per external service
46
+ - **Operations Epic:** 13 SP (standard CI/CD + monitoring)
47
+ ---
48
+ ## Feature Size Classification
49
+ ---
50
+ | Size | Task Count | Phases | Characteristics |
51
+ | ----------- | ---------- | ------- | -------------------------------------------------- |
52
+ | **SMALL** | 1-10 tasks | 1 phase | Single file changes, isolated |
53
+ | **MEDIUM** | 11-40 | 2-4 | Multiple files, some cross-layer dependencies |
54
+ | **COMPLEX** | 41-80 | 4-8 | Multiple modules, integration, extensive testing |
55
+ | **LARGE** | 81+ | 8-N | Feature affecting entire system, major refactoring |
56
+ ---
57
+ ## How to Use Hybrid Estimation
58
+ ---
59
+ - Each task shows **both** Story Points and time: `• 2 SP (~3-4h)`
60
+ - Story Points measure **complexity** (stable across teams)
61
+ - Time estimates measure **effort** (varies by team velocity)
62
+ - Track both to improve estimation accuracy over time
63
+
64
+
65
+
@@ -0,0 +1,86 @@
1
+ # Task Format Reference (Spec-Kit Inspired)
2
+
3
+ > **Canonical task format for all AI Flow development workflows.**
4
+ >
5
+ > This file defines the standard task format used in Phase 9 (Roadmap), /feature, /fix, and all development commands.
6
+ ---
7
+ ## Standard Task Format
8
+ ---
9
+ **Every task must follow this format:**
10
+
11
+ ```markdown
12
+ - [ ] [TaskID] [Optional:P] [Optional:StoryTag] Description • SP (~time)
13
+ File: exact/path/to/file.ts
14
+ Dependencies: T001, T002 (or "None")
15
+ ```
16
+ ---
17
+ ## Format Components
18
+ ---
19
+ | Component | Required | Description |
20
+ | --------------- | -------- | ------------------------------------------------------------------------ |
21
+ | `[TaskID]` | ✅ | Sequential ID in execution order (T001, T002, ..., T099, T100) |
22
+ | `[P]` | ❌ | Parallelization marker - ONLY for tasks that can run simultaneously |
23
+ | `[StoryTag]` | ❌ | Links task to user story ([US1], [US2]) - only in story-based phases |
24
+ | `Description` | ✅ | What to implement (specific, LLM-completable without additional context) |
25
+ | `• SP (~time)` | ✅ | Hybrid estimation - Story Points + time (e.g., "2 SP (~3-4h)") |
26
+ | `File:` | ✅ | Exact file path where work happens |
27
+ | `Dependencies:` | ✅ | Which tasks must complete first (even if "None") |
28
+ ---
29
+ ## Task Sequencing Rules
30
+ ---
31
+ 1. **Tests BEFORE implementation** (TDD approach)
32
+ 2. **Models → Services → Controllers → Endpoints** (layer dependency order)
33
+ 3. **Core utilities BEFORE features** that use them
34
+ 4. **Database migrations BEFORE data access code**
35
+ 5. **Interfaces BEFORE implementations**
36
+ ---
37
+ ## Parallelization Rules ([P] Marker)
38
+ ---
39
+ ### ✅ Use [P] When:
40
+
41
+ - Tasks target **different files**
42
+ - No shared dependencies between tasks
43
+ - Can run simultaneously (e.g., independent entities, different modules)
44
+
45
+ ### ❌ Don't Use [P] When:
46
+
47
+ - Task depends on another incomplete task
48
+ - Same file is modified by multiple tasks
49
+ - Shared resource (DB migration, config file, shared service)
50
+ ---
51
+ ## Complete Task Example
52
+ ---
53
+ ```markdown
54
+ - [ ] [T042] [P] Write unit tests for Product entity validation (12 tests) • 2 SP (~3-4h)
55
+ File: tests/unit/entities/Product.entity.spec.ts
56
+ Tests: price validation, stock constraints, name required, category FK
57
+ Dependencies: None (can run parallel with other test tasks)
58
+ ```
59
+ ---
60
+ ## Feature Template
61
+ ---
62
+ ```markdown
63
+ ### Feature {{NUMBER}}: {{FEATURE_NAME}} • {{SP}} SP (~{{TIME}})
64
+
65
+ **Scope:** {{ENTITY}} entity + {{ENDPOINT_COUNT}} endpoints + {{TEST_COUNT}} tests
66
+
67
+ **Tasks:**
68
+
69
+ - [ ] T0XX [P] Write {{ENTITY}} entity tests • 2 SP (~3-4h) → tests/unit/{{ENTITY}}.spec.ts
70
+ - [ ] T0YY Create {{ENTITY}} entity • 2 SP (~3-4h) → src/entities/{{ENTITY}}.ts
71
+ - [ ] T0ZZ Create I{{REPOSITORY}} interface • 1 SP (~1-2h) → src/repositories/I{{REPOSITORY}}.ts
72
+ - [ ] T0AA Implement {{REPOSITORY}} • 2 SP (~3-4h) → src/repositories/{{REPOSITORY}}.ts (after T0YY, T0ZZ)
73
+ - [ ] T0BB Implement {{SERVICE}} business logic • 3 SP (~4-8h) → src/services/{{SERVICE}}.ts (after T0AA)
74
+ - [ ] T0CC Create {{CONTROLLER}} endpoints • 2 SP (~3-4h) → src/controllers/{{CONTROLLER}}.ts (after T0BB)
75
+ - [ ] T0DD [P] Write integration tests • 2 SP (~3-4h) → tests/integration/{{CONTROLLER}}.spec.ts
76
+ - [ ] T0EE [P] Update API docs • 1 SP (~1h) → docs/api.md
77
+
78
+ **Parallel:** T0XX, T0DD, T0EE can run together
79
+
80
+ **Done when:** All endpoints work + tests pass + coverage ≥ {{COVERAGE}}%
81
+
82
+ **Start:** `/feature new "{{FEATURE_NAME}}"`
83
+ ```
84
+
85
+
86
+