ai-flow-dev 2.1.3 → 2.1.4
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 +25 -38
- package/dist/cli.js +68 -46
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
- package/prompts/backend/flow-build-phase-0.md +31 -63
- package/prompts/backend/flow-build-phase-1.md +9 -17
- package/prompts/backend/flow-build-phase-10.md +199 -585
- package/prompts/backend/flow-build-phase-2.md +152 -86
- package/prompts/backend/flow-build-phase-3.md +108 -68
- package/prompts/backend/flow-build-phase-4.md +5 -8
- package/prompts/backend/flow-build-phase-5.md +39 -12
- package/prompts/backend/flow-build-phase-6.md +29 -8
- package/prompts/backend/flow-build-phase-7.md +120 -40
- package/prompts/backend/flow-build-phase-8.md +28 -65
- package/prompts/backend/flow-build-phase-9.md +267 -1298
- package/prompts/backend/flow-build.md +881 -957
- package/prompts/backend/flow-dev-commit.md +27 -50
- package/prompts/backend/flow-dev-feature.md +1929 -2017
- package/prompts/backend/flow-dev-fix.md +936 -964
- package/prompts/backend/flow-dev-refactor.md +672 -701
- package/prompts/backend/flow-dev-review.md +356 -389
- package/prompts/backend/flow-dev-work.md +1066 -1118
- package/prompts/backend/flow-docs-sync.md +20 -196
- package/prompts/frontend/flow-build-phase-0.md +503 -484
- package/prompts/frontend/flow-build-phase-1.md +445 -433
- package/prompts/frontend/flow-build-phase-2.md +910 -957
- package/prompts/frontend/flow-build-phase-3.md +692 -664
- package/prompts/frontend/flow-build-phase-4.md +478 -463
- package/prompts/frontend/flow-build-phase-5.md +488 -467
- package/prompts/frontend/flow-build-phase-6.md +571 -550
- package/prompts/frontend/flow-build-phase-7.md +560 -592
- package/prompts/frontend/flow-build-phase-8.md +17 -42
- package/prompts/frontend/flow-build.md +457 -503
- package/prompts/frontend/flow-docs-sync.md +14 -35
- package/prompts/mobile/flow-build-phase-0.md +104 -97
- package/prompts/mobile/flow-build-phase-1.md +137 -122
- package/prompts/mobile/flow-build-phase-2.md +123 -130
- package/prompts/mobile/flow-build-phase-3.md +144 -149
- package/prompts/mobile/flow-build-phase-4.md +140 -132
- package/prompts/mobile/flow-build-phase-5.md +70 -70
- package/prompts/mobile/flow-build-phase-6.md +136 -134
- package/prompts/mobile/flow-build-phase-7.md +24 -58
- package/prompts/mobile/flow-build-phase-8.md +17 -42
- package/prompts/mobile/flow-build.md +47 -97
- package/prompts/mobile/flow-docs-sync.md +13 -32
- package/prompts/shared/mermaid-guidelines.md +106 -0
- package/prompts/shared/scope-levels.md +126 -0
- package/prompts/shared/story-points.md +65 -0
- package/prompts/shared/task-format.md +86 -0
- package/templates/AGENT.template.md +194 -15
- package/templates/backend/README.template.md +2 -32
- package/templates/backend/ai-instructions.template.md +2 -32
- package/templates/backend/copilot-instructions.template.md +2 -22
- package/templates/backend/docs/api.template.md +89 -20
- package/templates/backend/docs/architecture.template.md +165 -53
- package/templates/backend/docs/business-flows.template.md +7 -14
- package/templates/backend/docs/code-standards.template.md +2 -38
- package/templates/backend/docs/contributing.template.md +2 -16
- package/templates/backend/docs/data-model.template.md +125 -21
- package/templates/backend/docs/operations.template.md +179 -50
- package/templates/backend/docs/testing.template.md +2 -42
- package/templates/backend/project-brief.template.md +2 -28
- package/templates/backend/specs/configuration.template.md +2 -14
- package/templates/backend/specs/security.template.md +2 -32
- package/templates/frontend/README.template.md +2 -18
- package/templates/frontend/ai-instructions.template.md +2 -20
- package/templates/frontend/docs/api-integration.template.md +12 -30
- package/templates/frontend/docs/components.template.md +2 -28
- package/templates/frontend/docs/error-handling.template.md +11 -27
- package/templates/frontend/docs/operations.template.md +8 -18
- package/templates/frontend/docs/performance.template.md +8 -18
- package/templates/frontend/docs/pwa.template.md +8 -18
- package/templates/frontend/docs/state-management.template.md +2 -28
- package/templates/frontend/docs/styling.template.md +2 -26
- package/templates/frontend/docs/testing.template.md +2 -28
- package/templates/frontend/project-brief.template.md +2 -16
- package/templates/frontend/specs/accessibility.template.md +8 -18
- package/templates/frontend/specs/configuration.template.md +2 -24
- package/templates/frontend/specs/security.template.md +10 -24
- package/templates/fullstack/README.template.md +17 -47
- package/templates/fullstack/ai-instructions.template.md +17 -45
- package/templates/fullstack/project-brief.template.md +16 -42
- package/templates/fullstack/specs/configuration.template.md +16 -42
- package/templates/mobile/README.template.md +11 -29
- package/templates/mobile/ai-instructions.template.md +11 -27
- package/templates/mobile/docs/app-store.template.md +11 -29
- package/templates/mobile/docs/architecture.template.md +14 -38
- package/templates/mobile/docs/native-features.template.md +16 -44
- package/templates/mobile/docs/navigation.template.md +9 -23
- package/templates/mobile/docs/offline-strategy.template.md +10 -26
- package/templates/mobile/docs/permissions.template.md +9 -23
- package/templates/mobile/docs/state-management.template.md +12 -32
- package/templates/mobile/docs/testing.template.md +14 -38
- package/templates/mobile/project-brief.template.md +12 -30
- package/templates/mobile/specs/build-configuration.template.md +10 -26
- package/templates/mobile/specs/deployment.template.md +9 -23
|
@@ -1,1444 +1,413 @@
|
|
|
1
|
-
# AI Flow - Phase 9: Implementation Roadmap
|
|
1
|
+
# AI Flow - Phase 9: Implementation Roadmap
|
|
2
2
|
|
|
3
3
|
**YOU ARE AN EXPERT PROJECT MANAGER AND TECHNICAL ARCHITECT.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 🎯 Phase 9 Objective
|
|
10
|
-
|
|
11
|
-
Generate a complete, prioritized implementation roadmap with Fibonacci-based Story Point estimations, organized into Epics, Features, and Tasks following GitHub Projects format.
|
|
12
|
-
|
|
13
|
-
---
|
|
5
|
+
Generate a complete `docs/roadmap.md` with atomic, executable tasks derived from project documentation.
|
|
14
6
|
|
|
15
7
|
## Prerequisites
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
---
|
|
24
|
-
|
|
25
|
-
## Duration
|
|
9
|
+
- Phase 8 completed (all documentation generated)
|
|
10
|
+
- Files exist: `docs/data-model.md`, `docs/api.md`, `docs/architecture.md`, `specs/security.md`
|
|
26
11
|
|
|
27
|
-
|
|
12
|
+
## Duration: 60-90 minutes
|
|
28
13
|
|
|
29
14
|
---
|
|
30
15
|
|
|
31
|
-
##
|
|
32
|
-
|
|
33
|
-
### Step 9.1: Documentation Analysis (5-8 minutes - automatic)
|
|
16
|
+
## Context Variables (Extract from docs)
|
|
34
17
|
|
|
35
|
-
**
|
|
18
|
+
**Before generating tasks, extract these from project documentation:**
|
|
36
19
|
|
|
37
20
|
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
✅ project-brief.md (business objectives, scope, constraints)
|
|
45
|
-
✅ ai-instructions.md (tech stack, framework, ORM)
|
|
46
|
-
✅ docs/architecture.md (system design, patterns, components)
|
|
47
|
-
✅ docs/data-model.md (entities, relationships, migrations)
|
|
48
|
-
✅ docs/api.md (endpoints, request/response formats)
|
|
49
|
-
✅ docs/business-flows.md (user journeys, workflows)
|
|
50
|
-
✅ docs/code-standards.md (naming, organization, patterns)
|
|
51
|
-
✅ docs/testing.md (test strategy, coverage targets)
|
|
52
|
-
✅ docs/operations.md (deployment, monitoring, CI/CD)
|
|
53
|
-
✅ specs/security.md (authentication, authorization, compliance)
|
|
54
|
-
✅ specs/configuration.md (environment variables, integrations)
|
|
55
|
-
|
|
56
|
-
Extracting structured information...
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**Extract and analyze:**
|
|
60
|
-
|
|
61
|
-
1. **Business Context** (from `project-brief.md`):
|
|
62
|
-
- Primary objectives
|
|
63
|
-
- Target users
|
|
64
|
-
- Success metrics
|
|
65
|
-
- Constraints
|
|
66
|
-
- Timeline (if specified)
|
|
67
|
-
|
|
68
|
-
2. **Technical Stack** (from `ai-instructions.md`):
|
|
69
|
-
- Language and version
|
|
70
|
-
- Framework and version
|
|
71
|
-
- Database and ORM
|
|
72
|
-
- Key libraries
|
|
73
|
-
|
|
74
|
-
3. **System Architecture** (from `docs/architecture.md`):
|
|
75
|
-
- Architecture pattern (Clean, Hexagonal, Layered, MVC)
|
|
76
|
-
- Layers/modules structure
|
|
77
|
-
- Integration points
|
|
78
|
-
- External services
|
|
79
|
-
|
|
80
|
-
4. **Data Model** (from `docs/data-model.md`):
|
|
81
|
-
- All entities/models
|
|
82
|
-
- Relationships (1:1, 1:N, N:M)
|
|
83
|
-
- Key fields per entity
|
|
84
|
-
- Validation rules
|
|
85
|
-
|
|
86
|
-
5. **API Endpoints** (from `docs/api.md`):
|
|
87
|
-
- All routes
|
|
88
|
-
- HTTP methods
|
|
89
|
-
- Authentication requirements
|
|
90
|
-
- Request/response schemas
|
|
91
|
-
|
|
92
|
-
6. **Business Flows** (from `docs/business-flows.md`):
|
|
93
|
-
- User journeys
|
|
94
|
-
- Critical workflows
|
|
95
|
-
- State transitions
|
|
96
|
-
|
|
97
|
-
7. **Security Requirements** (from `specs/security.md`):
|
|
98
|
-
- Authentication method
|
|
99
|
-
- Authorization strategy (RBAC, ABAC, etc.)
|
|
100
|
-
- Compliance requirements
|
|
101
|
-
- Security features
|
|
102
|
-
|
|
103
|
-
8. **Testing Strategy** (from `docs/testing.md`):
|
|
104
|
-
- Unit test coverage target
|
|
105
|
-
- Integration test scope
|
|
106
|
-
- E2E test scenarios
|
|
107
|
-
- Performance tests
|
|
108
|
-
|
|
109
|
-
9. **Operations** (from `docs/operations.md`):
|
|
110
|
-
- Deployment platform
|
|
111
|
-
- Monitoring tools
|
|
112
|
-
- Logging strategy
|
|
113
|
-
- Backup strategy
|
|
114
|
-
|
|
115
|
-
**Show analysis summary:**
|
|
21
|
+
From ai-instructions.md:
|
|
22
|
+
├── LANG: {{LANGUAGE}} # e.g., TypeScript, Python, Go, Java, PHP, Ruby
|
|
23
|
+
├── EXT: {{FILE_EXTENSION}} # e.g., .ts, .py, .go, .java, .php, .rb
|
|
24
|
+
├── SRC: {{SOURCE_DIR}} # e.g., src/, app/, lib/, internal/
|
|
25
|
+
├── TESTS: {{TESTS_DIR}} # e.g., tests/, __tests__/, test/, spec/
|
|
26
|
+
└── ARCH: {{ARCHITECTURE}} # e.g., Clean, Hexagonal, MVC, Layered
|
|
116
27
|
|
|
28
|
+
From docs/architecture.md:
|
|
29
|
+
├── ENTITY_DIR: {{ENTITY_PATH}} # e.g., entities/, models/, domain/
|
|
30
|
+
├── REPO_DIR: {{REPO_PATH}} # e.g., repositories/, data/, infrastructure/
|
|
31
|
+
├── SERVICE_DIR: {{SERVICE_PATH}}# e.g., services/, usecases/, application/
|
|
32
|
+
├── CTRL_DIR: {{CONTROLLER_PATH}}# e.g., controllers/, handlers/, api/
|
|
33
|
+
└── DTO_DIR: {{DTO_PATH}} # e.g., dtos/, schemas/, types/
|
|
117
34
|
```
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
121
|
-
|
|
122
|
-
🎯 Business Scope:
|
|
123
|
-
• {{BUSINESS_OBJECTIVES_COUNT}} primary objectives
|
|
124
|
-
• {{USER_TYPES_COUNT}} user types
|
|
125
|
-
• {{CONSTRAINTS_COUNT}} constraints
|
|
126
|
-
|
|
127
|
-
🏗️ Technical Scope:
|
|
128
|
-
• {{ENTITIES_COUNT}} database entities
|
|
129
|
-
• {{ENDPOINTS_COUNT}} API endpoints
|
|
130
|
-
• {{BUSINESS_FLOWS_COUNT}} business flows
|
|
131
|
-
• {{INTEGRATIONS_COUNT}} external integrations
|
|
132
|
-
|
|
133
|
-
🔐 Security Scope:
|
|
134
|
-
• Authentication: {{AUTH_METHOD}}
|
|
135
|
-
• Authorization: {{AUTHZ_METHOD}}
|
|
136
|
-
• Compliance: {{COMPLIANCE_REQUIREMENTS}}
|
|
137
|
-
|
|
138
|
-
🧪 Testing Scope:
|
|
139
|
-
• Coverage target: {{COVERAGE_TARGET}}%
|
|
140
|
-
• Test types: Unit, Integration, E2E
|
|
141
|
-
• {{ESTIMATED_TEST_COUNT}} tests estimated
|
|
142
|
-
|
|
143
|
-
Proceeding to Epic definition...
|
|
144
|
-
```
|
|
35
|
+
|
|
36
|
+
**Use these variables in ALL file paths. Never hardcode language-specific paths.**
|
|
145
37
|
|
|
146
38
|
---
|
|
147
39
|
|
|
148
|
-
|
|
40
|
+
## Task Format (MANDATORY)
|
|
149
41
|
|
|
150
|
-
**
|
|
42
|
+
**Every task MUST use this exact format:**
|
|
151
43
|
|
|
152
44
|
```
|
|
153
|
-
|
|
154
|
-
🎯 Step 9.2/6: Defining Epics
|
|
155
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
- [ ] TXXX [CAT] Description • 1 SP → {{path}} | deps: TXXX
|
|
156
46
|
```
|
|
157
47
|
|
|
158
|
-
**
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
6. **Testing & Quality Epic** (Comprehensive test coverage)
|
|
166
|
-
7. **Operations & Deployment Epic** (CI/CD, monitoring, docs)
|
|
167
|
-
|
|
168
|
-
**Epic Estimation Guidelines:**
|
|
169
|
-
|
|
170
|
-
- **Foundation Epic:** 13-21 SP (depends on framework complexity)
|
|
171
|
-
- **Data Layer Epic:** 3-5 SP per simple entity, 8-13 SP per complex entity
|
|
172
|
-
- **Auth Epic:** 8 SP (basic JWT) to 21 SP (multi-provider + RBAC + 2FA)
|
|
173
|
-
- **Business Epics:** Varies by domain complexity
|
|
174
|
-
- **Integration Epic:** 5-8 SP per external service
|
|
175
|
-
- **Operations Epic:** 13 SP (standard CI/CD + monitoring)
|
|
176
|
-
|
|
177
|
-
**Example output:**
|
|
178
|
-
|
|
179
|
-
```
|
|
180
|
-
Epics identified:
|
|
181
|
-
|
|
182
|
-
## 🏗️ Epic 1: Foundation & Infrastructure • 21 SP
|
|
183
|
-
Priority: P0 | Est. Time: ~2 weeks
|
|
184
|
-
Base application setup, core utilities, error handling, logging
|
|
48
|
+
**Components:**
|
|
49
|
+
- `TXXX` - Sequential ID (T001, T002...)
|
|
50
|
+
- `[CAT]` - Category (see below)
|
|
51
|
+
- `Description` - Specific action (verb + what + where)
|
|
52
|
+
- `1 SP` - Story Points (1 or 2 only)
|
|
53
|
+
- `→ {{path}}` - Target file path using context variables
|
|
54
|
+
- `deps: TXXX` - Dependencies (or `deps: none`)
|
|
185
55
|
|
|
186
|
-
|
|
187
|
-
Priority: P0 | Est. Time: ~3 weeks
|
|
188
|
-
7 entities, repositories, migrations, seeding
|
|
189
|
-
|
|
190
|
-
## 🔐 Epic 3: Authentication & Authorization • 21 SP
|
|
191
|
-
Priority: P0 | Est. Time: ~2 weeks
|
|
192
|
-
JWT authentication, RBAC, password reset, 2FA
|
|
193
|
-
|
|
194
|
-
## 👤 Epic 4: User Management • 13 SP
|
|
195
|
-
Priority: P0 | Est. Time: ~1 week
|
|
196
|
-
User CRUD, profile management, preferences
|
|
197
|
-
|
|
198
|
-
## 🛒 Epic 5: Product Catalog • 21 SP
|
|
199
|
-
Priority: P0 | Est. Time: ~2 weeks
|
|
200
|
-
Products, categories, search, filters, inventory
|
|
201
|
-
|
|
202
|
-
## 🛍️ Epic 6: Order Management • 34 SP
|
|
203
|
-
Priority: P1 | Est. Time: ~3 weeks
|
|
204
|
-
Shopping cart, checkout, orders, order tracking
|
|
205
|
-
|
|
206
|
-
## 💳 Epic 7: Payment Processing • 21 SP
|
|
207
|
-
Priority: P1 | Est. Time: ~2 weeks
|
|
208
|
-
Stripe integration, webhooks, refunds
|
|
209
|
-
|
|
210
|
-
## 📧 Epic 8: Notifications • 13 SP
|
|
211
|
-
Priority: P2 | Est. Time: ~1 week
|
|
212
|
-
Email notifications, push notifications, preferences
|
|
213
|
-
|
|
214
|
-
## 📊 Epic 9: Analytics & Reporting • 13 SP
|
|
215
|
-
Priority: P2 | Est. Time: ~1 week
|
|
216
|
-
Admin dashboard, sales reports, user analytics
|
|
56
|
+
---
|
|
217
57
|
|
|
218
|
-
##
|
|
219
|
-
Priority: P1 | Est. Time: ~1 week
|
|
220
|
-
CI/CD finalization, monitoring, logging, backups
|
|
58
|
+
## Categories [CAT]
|
|
221
59
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
60
|
+
| Cat | Name | Description | SP Range |
|
|
61
|
+
|-----|------------|------------------------------------|----------|
|
|
62
|
+
| [E] | Entity | Schema, model, migration | 1 SP |
|
|
63
|
+
| [R] | Repository | Data access layer | 1 SP |
|
|
64
|
+
| [S] | Service | Business logic, use cases | 1-2 SP |
|
|
65
|
+
| [C] | Controller | Endpoints, routes, handlers | 1 SP |
|
|
66
|
+
| [T] | Test | Unit, integration, e2e tests | 1-2 SP |
|
|
67
|
+
| [D] | Docs | Documentation updates | 1 SP |
|
|
68
|
+
| [I] | Infra | Config, setup, DevOps | 1-2 SP |
|
|
226
69
|
|
|
227
70
|
---
|
|
228
71
|
|
|
229
|
-
|
|
72
|
+
## Atomic Task Rules
|
|
230
73
|
|
|
231
|
-
**
|
|
74
|
+
**Maximum 1-2 SP per task. Break down larger tasks:**
|
|
232
75
|
|
|
76
|
+
**BAD (too large):**
|
|
233
77
|
```
|
|
234
|
-
|
|
235
|
-
🔨 Step 9.3/6: Breaking Down Features with Story Points
|
|
236
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
78
|
+
- [ ] T001 [E] Create User entity with CRUD • 5 SP
|
|
237
79
|
```
|
|
238
80
|
|
|
239
|
-
**
|
|
240
|
-
|
|
81
|
+
**GOOD (atomic, language-agnostic):**
|
|
241
82
|
```
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
21 SP | Very Large | 2 weeks | Major feature, integration
|
|
251
|
-
34 SP | Epic | 3 weeks | Multiple related features
|
|
83
|
+
- [ ] T001 [E] Create User entity schema (id, email, password, role) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/User{{EXT}} | deps: none
|
|
84
|
+
- [ ] T002 [E] Add User validation rules (email format, password min length) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/User{{EXT}} | deps: T001
|
|
85
|
+
- [ ] T003 [R] Create UserRepository interface/contract • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T001
|
|
86
|
+
- [ ] T004 [R] Implement UserRepository.create() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
87
|
+
- [ ] T005 [R] Implement UserRepository.findById() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
88
|
+
- [ ] T006 [R] Implement UserRepository.findByEmail() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
89
|
+
- [ ] T007 [R] Implement UserRepository.update() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
90
|
+
- [ ] T008 [R] Implement UserRepository.delete() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
252
91
|
```
|
|
253
92
|
|
|
254
93
|
---
|
|
255
94
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
**Use this table to add time estimates to each task:**
|
|
259
|
-
|
|
260
|
-
| Story Points | Time Estimate (solo dev) | Time Range | Example Task |
|
|
261
|
-
| ------------ | ------------------------ | ---------- | --------------------------------------- |
|
|
262
|
-
| **1 SP** | 1-2 hours | (~1-2h) | Add enum value, simple config change |
|
|
263
|
-
| **2 SP** | 3-4 hours | (~3-4h) | Write 5-8 unit tests, basic validation |
|
|
264
|
-
| **3 SP** | 4-8 hours | (~4-8h) | Simple CRUD endpoint, basic entity |
|
|
265
|
-
| **5 SP** | 1-2 days | (~1-2d) | Complex endpoint with business logic |
|
|
266
|
-
| **8 SP** | 2-3 days | (~2-3d) | Auth flow, complex validation |
|
|
267
|
-
| **13 SP** | 1 week | (~1w) | Complete module with full test coverage |
|
|
268
|
-
| **21 SP** | 2 weeks | (~2w) | Major feature with integration |
|
|
269
|
-
| **34 SP** | 3 weeks | (~3w) | Multiple related features (Epic-level) |
|
|
270
|
-
|
|
271
|
-
> **Note:** Time assumes AI-assisted development (GitHub Copilot, Claude, etc.). Without AI assistance, multiply time estimates by 2-3x.
|
|
272
|
-
>
|
|
273
|
-
> **Velocity Tracking:** After completing 2-3 features, compare actual time vs estimates to calibrate your team's velocity. Adjust remaining estimates accordingly.
|
|
274
|
-
|
|
275
|
-
**How to use hybrid estimation:**
|
|
276
|
-
|
|
277
|
-
- Each task shows **both** Story Points and time: `• 2 SP (~3-4h)`
|
|
278
|
-
- Story Points measure **complexity** (stable across teams)
|
|
279
|
-
- Time estimates measure **effort** (varies by team velocity)
|
|
280
|
-
- Track both to improve estimation accuracy over time
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
### Task Format Reference (Spec-Kit Inspired)
|
|
285
|
-
|
|
286
|
-
**Every task must follow this format:**
|
|
287
|
-
|
|
288
|
-
```markdown
|
|
289
|
-
- [ ] [TaskID] [Optional:P] [Optional:StoryTag] Description • SP (~time)
|
|
290
|
-
File: exact/path/to/file.ts
|
|
291
|
-
Dependencies: T001, T002 (or "None")
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
**Components explained:**
|
|
295
|
-
|
|
296
|
-
- **[TaskID]**: Sequential ID in execution order (T001, T002, ..., T099, T100)
|
|
297
|
-
- **[P] marker**: ONLY for parallelizable tasks (different files, no blocking deps)
|
|
298
|
-
- **[StoryTag]**: Links task to user story ([US1], [US2]) - only in story phases
|
|
299
|
-
- **Description**: What to implement (specific, LLM-completable without additional context)
|
|
300
|
-
- **• SP (~time)**: Hybrid estimation - Story Points + time (e.g., "2 SP (~3-4h)", "5 SP (~1-2d)")
|
|
301
|
-
- **File path**: Exact file where work happens (REQUIRED)
|
|
302
|
-
- **Dependencies**: Which tasks must complete first (REQUIRED, even if "None")
|
|
303
|
-
|
|
304
|
-
**Task Sequencing Rules:**
|
|
305
|
-
|
|
306
|
-
1. **Tests BEFORE implementation** (TDD approach)
|
|
307
|
-
2. **Models → Services → Controllers → Endpoints** (layer dependency order)
|
|
308
|
-
3. **Core utilities BEFORE features** that use them
|
|
309
|
-
4. **Database migrations BEFORE data access code**
|
|
310
|
-
5. **Interfaces BEFORE implementations**
|
|
311
|
-
|
|
312
|
-
**Parallelization Rules ([P] marker):**
|
|
313
|
-
|
|
314
|
-
✅ **Use [P] when:**
|
|
315
|
-
|
|
316
|
-
- Tasks target different files
|
|
317
|
-
- No shared dependencies between tasks
|
|
318
|
-
- Can run simultaneously (e.g., independent entities, different modules)
|
|
319
|
-
|
|
320
|
-
❌ **Don't use [P] when:**
|
|
95
|
+
## Workflow: 6 Steps
|
|
321
96
|
|
|
322
|
-
|
|
323
|
-
- Same file is modified by multiple tasks
|
|
324
|
-
- Shared resource (DB migration, config file, shared service)
|
|
97
|
+
### Step 9.1: Extract Context & Inventory (10-15 min)
|
|
325
98
|
|
|
326
|
-
**
|
|
99
|
+
**1. Extract context variables from `ai-instructions.md`:**
|
|
327
100
|
|
|
328
|
-
```markdown
|
|
329
|
-
- [ ] [T042] [P] Write unit tests for Product entity validation (12 tests) • 2 SP (~3-4h)
|
|
330
|
-
File: tests/unit/entities/Product.entity.spec.ts
|
|
331
|
-
Tests: price validation, stock constraints, name required, category FK
|
|
332
|
-
Dependencies: None (can run parallel with other test tasks)
|
|
333
101
|
```
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
- Number of fields and validations
|
|
346
|
-
- Relationships complexity
|
|
347
|
-
- Business logic complexity
|
|
348
|
-
- Testing requirements
|
|
349
|
-
- External integrations
|
|
350
|
-
|
|
351
|
-
**Feature Template:**
|
|
352
|
-
|
|
353
|
-
```markdown
|
|
354
|
-
### Feature {{NUMBER}}: {{FEATURE_NAME}} • {{SP}} SP (~{{TIME}})
|
|
355
|
-
|
|
356
|
-
**Scope:** {{ENTITY}} entity + {{ENDPOINT_COUNT}} endpoints + {{TEST_COUNT}} tests
|
|
357
|
-
|
|
358
|
-
**Tasks:**
|
|
359
|
-
|
|
360
|
-
- [ ] T0XX [P] Write {{ENTITY}} entity tests • 2 SP (~3-4h) → tests/unit/{{ENTITY}}.spec.ts
|
|
361
|
-
- [ ] T0YY Create {{ENTITY}} entity • 2 SP (~3-4h) → src/entities/{{ENTITY}}.ts
|
|
362
|
-
- [ ] T0ZZ Create I{{REPOSITORY}} interface • 1 SP (~1-2h) → src/repositories/I{{REPOSITORY}}.ts
|
|
363
|
-
- [ ] T0AA Implement {{REPOSITORY}} • 2 SP (~3-4h) → src/repositories/{{REPOSITORY}}.ts (after T0YY, T0ZZ)
|
|
364
|
-
- [ ] T0BB Implement {{SERVICE}} business logic • 3 SP (~4-8h) → src/services/{{SERVICE}}.ts (after T0AA)
|
|
365
|
-
- [ ] T0CC Create {{CONTROLLER}} endpoints • 2 SP (~3-4h) → src/controllers/{{CONTROLLER}}.ts (after T0BB)
|
|
366
|
-
- [ ] T0DD [P] Write integration tests • 2 SP (~3-4h) → tests/integration/{{CONTROLLER}}.spec.ts
|
|
367
|
-
- [ ] T0EE [P] Update API docs • 1 SP (~1h) → docs/api.md
|
|
368
|
-
|
|
369
|
-
**Parallel:** T0XX, T0DD, T0EE can run together
|
|
370
|
-
|
|
371
|
-
**Done when:** All endpoints work + tests pass + coverage ≥ {{COVERAGE}}%
|
|
372
|
-
|
|
373
|
-
**Start:** `/feature new "{{FEATURE_NAME}}"`
|
|
102
|
+
CONTEXT EXTRACTED
|
|
103
|
+
├── Language: Python
|
|
104
|
+
├── Extension: .py
|
|
105
|
+
├── Source dir: src/
|
|
106
|
+
├── Tests dir: tests/
|
|
107
|
+
├── Architecture: Clean Architecture
|
|
108
|
+
├── Entity path: domain/entities/
|
|
109
|
+
├── Repository path: infrastructure/repositories/
|
|
110
|
+
├── Service path: application/services/
|
|
111
|
+
├── Controller path: interfaces/api/
|
|
112
|
+
└── DTO path: interfaces/dtos/
|
|
374
113
|
```
|
|
375
114
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
**Example (Real Project):**
|
|
379
|
-
|
|
380
|
-
````markdown
|
|
381
|
-
### Feature 2.1: User Entity & Repository • 12 SP (~2-3d)
|
|
382
|
-
|
|
383
|
-
**Scope:** User entity + CRUD endpoints + 12 tests
|
|
384
|
-
|
|
385
|
-
**Tasks:**
|
|
386
|
-
|
|
387
|
-
- [ ] T001 [P] Write User entity validation tests • 2 SP (~3-4h) → tests/unit/User.entity.spec.ts
|
|
388
|
-
- [ ] T002 Create User entity (email, password, role) • 2 SP (~3-4h) → src/entities/User.entity.ts
|
|
389
|
-
- [ ] T003 Create IUserRepository interface • 1 SP (~1-2h) → src/repositories/IUserRepository.ts
|
|
390
|
-
- [ ] T004 Implement UserRepository with Prisma • 2 SP (~3-4h) → src/repositories/UserRepository.ts (after T002, T003)
|
|
391
|
-
- [ ] T005 Implement UserService business logic • 3 SP (~4-8h) → src/services/UserService.ts (after T004)
|
|
392
|
-
- [ ] T006 Create UserController (CRUD endpoints) • 2 SP (~3-4h) → src/controllers/UserController.ts (after T005)
|
|
393
|
-
- [ ] T007 [P] Write integration tests (4 tests) • 2 SP (~3-4h) → tests/integration/UserController.spec.ts
|
|
394
|
-
- [ ] T008 [P] Update API docs • 1 SP (~1h) → docs/api.md
|
|
395
|
-
|
|
396
|
-
**Parallel tasks:** T001, T007, T008 (different files)
|
|
397
|
-
|
|
398
|
-
**Done when:** GET/POST/PUT/DELETE /users working + 12 tests pass + coverage ≥ 80%
|
|
399
|
-
`````
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
|
-
**Example (Simplified Format):**
|
|
115
|
+
**2. Extract inventory from documentation:**
|
|
404
116
|
|
|
405
|
-
|
|
406
|
-
### Feature 2.1: User Entity & Repository • 12 SP (~2-3d)
|
|
407
|
-
|
|
408
|
-
**Scope:** User entity + CRUD endpoints + 12 tests
|
|
409
|
-
|
|
410
|
-
**Tasks:**
|
|
411
|
-
|
|
412
|
-
- [ ] T001 [P] Write User entity validation tests • 2 SP (~3-4h) → tests/unit/User.entity.spec.ts
|
|
413
|
-
- [ ] T002 Create User entity (email, password, role) • 2 SP (~3-4h) → src/entities/User.entity.ts
|
|
414
|
-
- [ ] T003 Create IUserRepository interface • 1 SP (~1-2h) → src/repositories/IUserRepository.ts
|
|
415
|
-
- [ ] T004 Implement UserRepository with Prisma • 2 SP (~3-4h) → src/repositories/UserRepository.ts (after T002, T003)
|
|
416
|
-
- [ ] T005 Implement UserService business logic • 3 SP (~4-8h) → src/services/UserService.ts (after T004)
|
|
417
|
-
- [ ] T006 Create UserController (CRUD endpoints) • 2 SP (~3-4h) → src/controllers/UserController.ts (after T005)
|
|
418
|
-
- [ ] T007 [P] Write integration tests (4 tests) • 2 SP (~3-4h) → tests/integration/UserController.spec.ts
|
|
419
|
-
- [ ] T008 [P] Update API docs • 1 SP (~1h) → docs/api.md
|
|
420
|
-
|
|
421
|
-
**Parallel tasks:** T001, T007, T008 (different files)
|
|
422
|
-
|
|
423
|
-
**Done when:** GET/POST/PUT/DELETE /users working + 12 tests pass + coverage ≥ 80%
|
|
424
|
-
|
|
425
|
-
**Start:** `/feature new "User Entity & Repository"`
|
|
117
|
+
**From `docs/data-model.md`:**
|
|
426
118
|
```
|
|
119
|
+
ENTITIES:
|
|
120
|
+
| Entity | Fields | Relations | Complexity |
|
|
121
|
+
|----------|--------|-----------|------------|
|
|
122
|
+
| User | 8 | 3 (1:N) | Medium |
|
|
123
|
+
| Product | 12 | 2 (N:1) | Medium |
|
|
427
124
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
**Original Feature Breakdown Example:**
|
|
431
|
-
|
|
432
|
-
```markdown
|
|
433
|
-
## 💾 Epic 2: Data Layer • 34 SP
|
|
434
|
-
|
|
435
|
-
### Feature 2.1: User Entity & Repository (Detailed Version) • 5 SP
|
|
436
|
-
|
|
437
|
-
⏱️ **Est. Time:** 1-2 days (~12-16h total)
|
|
438
|
-
🎯 **Priority:** P0
|
|
439
|
-
📋 **Dependencies:** None (foundational entity)
|
|
440
|
-
🏷️ **User Story:** [US1] As a system, I need to store user data securely
|
|
441
|
-
|
|
442
|
-
**Scope:**
|
|
443
|
-
|
|
444
|
-
- Entity: User (id, email, username, passwordHash, role, createdAt, updatedAt)
|
|
445
|
-
- Repository: IUserRepository with CRUD operations
|
|
446
|
-
- Validation: Email format, username constraints, password strength
|
|
447
|
-
- Tests: 8 unit tests, 4 integration tests
|
|
448
|
-
|
|
449
|
-
**Tasks:** (Test-First, execution order, hybrid estimation)
|
|
450
|
-
|
|
451
|
-
- [ ] [T001] [P] Write unit tests for User entity validation (8 tests) • 2 SP (~3-4h)
|
|
452
|
-
File: tests/unit/entities/User.entity.spec.ts
|
|
453
|
-
Tests: email format, username constraints, password hashing, role enum, timestamps
|
|
454
|
-
Dependencies: None (can run parallel with other test tasks)
|
|
455
|
-
|
|
456
|
-
- [ ] [T002] Create User entity with field validation • 2 SP (~3-4h)
|
|
457
|
-
File: src/entities/User.entity.ts
|
|
458
|
-
Implements: Email validation regex, username 3-20 chars, password bcrypt hashing
|
|
459
|
-
Dependencies: None
|
|
460
|
-
|
|
461
|
-
- [ ] [T003] [P] Create IUserRepository interface • 1 SP (~1-2h)
|
|
462
|
-
File: src/repositories/interfaces/IUserRepository.ts
|
|
463
|
-
Methods: create, findById, findByEmail, findAll, update, delete
|
|
464
|
-
Dependencies: T002 (needs User entity type)
|
|
465
|
-
|
|
466
|
-
- [ ] [T004] Implement UserRepository with Prisma/TypeORM • 1 SP (~1-2h)
|
|
467
|
-
File: src/repositories/UserRepository.ts
|
|
468
|
-
Implements: All CRUD methods from IUserRepository interface
|
|
469
|
-
Dependencies: T002 (User entity), T003 (interface)
|
|
470
|
-
|
|
471
|
-
- [ ] [T005] Add database migration for users table • 1 SP (~1-2h)
|
|
472
|
-
File: migrations/001_create_users_table.ts (Prisma) or similar
|
|
473
|
-
Schema: All User fields + indexes (email unique, username unique)
|
|
474
|
-
Dependencies: T002 (User entity schema)
|
|
475
|
-
|
|
476
|
-
- [ ] [T006] Write integration tests for UserRepository (4 tests) • 2 SP (~3-4h)
|
|
477
|
-
File: tests/integration/repositories/UserRepository.spec.ts
|
|
478
|
-
Tests: CRUD operations, unique constraints, transactions, error handling
|
|
479
|
-
Dependencies: T004 (UserRepository), T005 (migration)
|
|
480
|
-
|
|
481
|
-
- [ ] [T007] Update data model documentation • 1 SP (~1h)
|
|
482
|
-
File: docs/data-model.md
|
|
483
|
-
Add: User entity schema, relationships, validation rules
|
|
484
|
-
Dependencies: T002 (User entity complete)
|
|
485
|
-
|
|
486
|
-
**Acceptance Criteria:**
|
|
487
|
-
|
|
488
|
-
- [ ] User entity validates email format (regex: RFC 5322)
|
|
489
|
-
- [ ] Password is hashed with bcrypt (cost factor 10) before storage
|
|
490
|
-
- [ ] Repository handles all CRUD operations correctly
|
|
491
|
-
- [ ] Migration creates table with correct schema + indexes
|
|
492
|
-
- [ ] Test coverage ≥ 80% (measured by Jest/Vitest)
|
|
493
|
-
- [ ] No TypeScript errors (strict mode)
|
|
494
|
-
- [ ] All 12 tests passing (8 unit + 4 integration)
|
|
495
|
-
|
|
496
|
-
**Task Execution Graph:**
|
|
125
|
+
Complexity: Simple (1-5 fields) | Medium (6-10) | Complex (11+)
|
|
497
126
|
```
|
|
498
127
|
|
|
499
|
-
|
|
500
|
-
├──> T002 ──┬──> T003 ──> T004 ──┬──> T006
|
|
501
|
-
│ │ │
|
|
502
|
-
│ └──> T005 ────────────┘
|
|
503
|
-
│ │
|
|
504
|
-
└─────────────────────────────────┴──> T007
|
|
505
|
-
|
|
506
|
-
````
|
|
507
|
-
|
|
508
|
-
**Parallelization Notes:**
|
|
509
|
-
- T001 can run parallel to other test tasks (different file)
|
|
510
|
-
- T005 can start as soon as T002 completes (don't need to wait for T004)
|
|
511
|
-
- T007 (docs) can run while T006 (tests) runs
|
|
512
|
-
|
|
513
|
-
**Ready-to-execute command:**
|
|
514
|
-
```bash
|
|
515
|
-
/feature new "User Entity & Repository"
|
|
516
|
-
````
|
|
517
|
-
|
|
518
|
-
---
|
|
519
|
-
|
|
520
|
-
### Feature 2.2: Product Entity & Repository • 8 SP
|
|
521
|
-
|
|
522
|
-
⏱️ **Est. Time:** 2-3 days (~16-24h total)
|
|
523
|
-
🎯 **Priority:** P0
|
|
524
|
-
📋 **Dependencies:** Feature 2.4 (Category entity - needs Category FK)
|
|
525
|
-
🏷️ **User Story:** [US2] As a store owner, I need to manage product catalog with search
|
|
526
|
-
|
|
527
|
-
**Scope:**
|
|
528
|
-
|
|
529
|
-
- Entity: Product (id, name, description, price, stock, categoryId, images, createdAt, updatedAt)
|
|
530
|
-
- Repository: IProductRepository with CRUD + search/filter
|
|
531
|
-
- Validation: Price > 0, stock ≥ 0, name required
|
|
532
|
-
- Relationships: belongsTo Category
|
|
533
|
-
- Tests: 12 unit tests, 6 integration tests
|
|
534
|
-
|
|
535
|
-
**Tasks:** (Test-First, execution order, hybrid estimation)
|
|
536
|
-
|
|
537
|
-
- [ ] [T008] [P] Write unit tests for Product entity validation (12 tests) • 3 SP (~4-8h)
|
|
538
|
-
File: tests/unit/entities/Product.entity.spec.ts
|
|
539
|
-
Tests: price validation, stock constraints, name required, category FK, images array
|
|
540
|
-
Dependencies: T007 (Category entity exists for FK testing)
|
|
541
|
-
|
|
542
|
-
- [ ] [T009] Create Product entity with validation + Category FK • 3 SP (~4-8h)
|
|
543
|
-
File: src/entities/Product.entity.ts
|
|
544
|
-
Implements: Price > 0, stock ≥ 0, name required, belongs to Category relationship
|
|
545
|
-
Dependencies: T007 (Category entity), T008 (tests)
|
|
546
|
-
|
|
547
|
-
- [ ] [T010] Create IProductRepository interface • 1 SP (~1-2h)
|
|
548
|
-
File: src/repositories/interfaces/IProductRepository.ts
|
|
549
|
-
Methods: CRUD + search(query), filterByCategory(categoryId), updateStock(id, quantity)
|
|
550
|
-
Dependencies: T009 (Product entity)
|
|
551
|
-
|
|
552
|
-
- [ ] [T011] Implement ProductRepository with search/filter methods • 2 SP (~3-4h)
|
|
553
|
-
File: src/repositories/ProductRepository.ts
|
|
554
|
-
Implements: All CRUD + search (case-insensitive name), filter by category
|
|
555
|
-
Dependencies: T009 (entity), T010 (interface)
|
|
556
|
-
|
|
557
|
-
- [ ] [T012] Add database migration for products table • 1 SP (~1-2h)
|
|
558
|
-
File: migrations/002_create_products_table.ts
|
|
559
|
-
Schema: All Product fields + FK to categories + indexes (categoryId, name)
|
|
560
|
-
Dependencies: T009 (Product entity schema)
|
|
561
|
-
|
|
562
|
-
- [ ] [T013] Implement inventory tracking logic • 2 SP (~3-4h)
|
|
563
|
-
File: src/repositories/ProductRepository.ts (extend)
|
|
564
|
-
Logic: Atomic stock decrements, prevent negative stock, transaction support
|
|
565
|
-
Dependencies: T011 (ProductRepository base)
|
|
566
|
-
|
|
567
|
-
- [ ] [T014] Write integration tests for ProductRepository (6 tests) • 2 SP (~3-4h)
|
|
568
|
-
File: tests/integration/repositories/ProductRepository.spec.ts
|
|
569
|
-
Tests: CRUD, search, filter by category, stock updates, FK constraints
|
|
570
|
-
Dependencies: T011, T012, T013
|
|
571
|
-
|
|
572
|
-
- [ ] [T015] Write tests for search/filter functionality (4 tests) • 2 SP (~3-4h)
|
|
573
|
-
File: tests/integration/repositories/ProductRepository.search.spec.ts
|
|
574
|
-
Tests: Case-insensitive search, partial match, filter by category, pagination
|
|
575
|
-
Dependencies: T011 (search implementation)
|
|
576
|
-
|
|
577
|
-
- [ ] [T016] Update data model documentation • 1 SP (~1h)
|
|
578
|
-
File: docs/data-model.md
|
|
579
|
-
Add: Product entity schema, Category relationship, search indexes
|
|
580
|
-
Dependencies: T009 (Product entity complete)
|
|
581
|
-
|
|
582
|
-
**Acceptance Criteria:**
|
|
583
|
-
|
|
584
|
-
- [ ] Product validates price > 0 and stock ≥ 0
|
|
585
|
-
- [ ] Search by name works (case-insensitive, partial match)
|
|
586
|
-
- [ ] Filter by category returns only products in that category
|
|
587
|
-
- [ ] Inventory decrements correctly with atomic operations
|
|
588
|
-
- [ ] Stock cannot go negative (validation error)
|
|
589
|
-
- [ ] Migration includes FK constraint to categories + indexes
|
|
590
|
-
- [ ] Test coverage ≥ 80%
|
|
591
|
-
- [ ] All 22 tests passing (12 unit + 6 integration + 4 search)
|
|
592
|
-
|
|
593
|
-
**Task Execution Graph:**
|
|
594
|
-
|
|
128
|
+
**From `docs/api.md`:**
|
|
595
129
|
```
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
T015 <────────────────────────────────────────────────┘
|
|
602
|
-
T016 <── T009
|
|
603
|
-
|
|
604
|
-
[P] = Can run parallel with other test tasks
|
|
605
|
-
```
|
|
606
|
-
|
|
607
|
-
**Parallelization Notes:**
|
|
130
|
+
ENDPOINTS:
|
|
131
|
+
| Method | Path | Auth | Body | Complexity |
|
|
132
|
+
|--------|----------------|------|------|------------|
|
|
133
|
+
| POST | /auth/login | No | Yes | Medium |
|
|
134
|
+
| GET | /users/:id | Yes | No | Simple |
|
|
608
135
|
|
|
609
|
-
|
|
610
|
-
- T014 (integration tests) and T015 (search tests) can run in parallel (different test files)
|
|
611
|
-
- T016 (docs) can run while tests are executing
|
|
612
|
-
|
|
613
|
-
**Ready-to-execute command:**
|
|
614
|
-
|
|
615
|
-
```bash
|
|
616
|
-
/feature new "Product Entity & Repository with search and inventory"
|
|
136
|
+
Complexity: Simple (no body) | Medium (body+validation) | Complex (transactions)
|
|
617
137
|
```
|
|
618
138
|
|
|
619
|
-
|
|
620
|
-
|
|
139
|
+
**From `docs/architecture.md`:**
|
|
621
140
|
```
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
**Generate dependency graph and determine optimal execution order:**
|
|
628
|
-
|
|
141
|
+
INTEGRATIONS:
|
|
142
|
+
| Service | Type | Priority |
|
|
143
|
+
|----------|---------|----------|
|
|
144
|
+
| Stripe | Payment | P0 |
|
|
145
|
+
| SendGrid | Email | P1 |
|
|
629
146
|
```
|
|
630
147
|
|
|
631
|
-
|
|
632
|
-
🔗 Step 9.4/6: Analyzing Dependencies
|
|
633
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
634
|
-
|
|
635
|
-
````
|
|
636
|
-
|
|
637
|
-
**Dependency Analysis:**
|
|
638
|
-
|
|
639
|
-
1. **Entity Dependencies** (from `docs/data-model.md`):
|
|
640
|
-
- Entities with no foreign keys can be built first
|
|
641
|
-
- Entities with FKs depend on referenced entities
|
|
642
|
-
|
|
643
|
-
2. **Feature Dependencies** (logical):
|
|
644
|
-
- Authentication must complete before protected endpoints
|
|
645
|
-
- Data layer must complete before business logic
|
|
646
|
-
- Business logic must complete before integrations
|
|
647
|
-
|
|
648
|
-
3. **Parallelization Opportunities:**
|
|
649
|
-
- Independent entities can be built in parallel
|
|
650
|
-
- Independent epics (after foundation) can be worked simultaneously
|
|
651
|
-
|
|
652
|
-
4. **Task-Level Dependencies** (Spec-Kit Inspired):
|
|
653
|
-
- For each Feature, analyze task dependencies at granular level
|
|
654
|
-
- Identify parallelization opportunities **within** Features (not just between)
|
|
655
|
-
- Generate task execution graph per Epic showing exact task order
|
|
656
|
-
|
|
657
|
-
**Task Dependency Matrix Example:**
|
|
658
|
-
|
|
148
|
+
**From `specs/security.md`:**
|
|
659
149
|
```
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
├─ T004 Implement UserRepository → Depends on: T002, T003
|
|
667
|
-
├─ T005 Add users table migration → Depends on: T002
|
|
668
|
-
├─ T006 Write UserRepository integration tests → Depends on: T004, T005
|
|
669
|
-
└─ T007 Update data model docs → Depends on: T002
|
|
670
|
-
|
|
671
|
-
Feature 2.2: Category Entity (3 SP) [Can run PARALLEL to Feature 2.1]
|
|
672
|
-
├─ T008 [P] Write Category entity tests → No deps
|
|
673
|
-
├─ T009 Create Category entity → Depends on: None
|
|
674
|
-
├─ T010 Create CategoryRepository → Depends on: T009
|
|
675
|
-
└─ T011 Update data model docs → Depends on: T009
|
|
676
|
-
|
|
677
|
-
Feature 2.3: Product Entity (8 SP) [BLOCKS on Feature 2.2 - needs Category FK]
|
|
678
|
-
├─ T012 Write Product entity tests → Depends on: T009 (Category entity)
|
|
679
|
-
├─ T013 Create Product entity with Category FK → Depends on: T009, T012
|
|
680
|
-
├─ T014 Create IProductRepository → Depends on: T013
|
|
681
|
-
├─ T015 Implement ProductRepository with search → Depends on: T013, T014
|
|
682
|
-
├─ T016 Write ProductRepository tests → Depends on: T015
|
|
683
|
-
└─ T017 Update data model docs → Depends on: T013
|
|
150
|
+
SECURITY:
|
|
151
|
+
| Requirement | Category | Priority |
|
|
152
|
+
|-------------------|----------|----------|
|
|
153
|
+
| JWT Auth | Auth | P0 |
|
|
154
|
+
| Password Hashing | Auth | P0 |
|
|
155
|
+
| Rate Limiting | Security | P1 |
|
|
684
156
|
```
|
|
685
157
|
|
|
686
|
-
**
|
|
687
|
-
|
|
688
|
-
✅ **Feature-Level Parallelization:**
|
|
689
|
-
- Feature 2.1 (User) and Feature 2.2 (Category) can run in PARALLEL → 40% time save
|
|
690
|
-
- Feature 2.3 (Product) BLOCKS on Feature 2.2 → must wait for Category entity
|
|
691
|
-
|
|
692
|
-
✅ **Task-Level Parallelization (within Feature 2.1):**
|
|
693
|
-
- T001 (tests) can run parallel to T002 (entity) if desired (TDD: run tests first recommended)
|
|
694
|
-
- T003 (interface) and T005 (migration) can run in parallel (both depend only on T002)
|
|
695
|
-
- T006 (integration tests) and T007 (docs) can run in parallel
|
|
696
|
-
|
|
697
|
-
⚡ **Team Scaling:**
|
|
698
|
-
- With 1 dev: Features run sequentially → ~16 hours (Feature 2.1) + ~8 hours (Feature 2.2) + ~16 hours (Feature 2.3) = 40 hours total
|
|
699
|
-
- With 2 devs: Feature 2.1 + 2.2 parallel → ~16 hours + ~16 hours (Product) = 32 hours total (20% save)
|
|
700
|
-
- With 3 devs: Task-level parallelization within features → ~28 hours total (30% save)
|
|
701
|
-
|
|
702
|
-
---
|
|
703
|
-
|
|
704
|
-
**Generate Mermaid Dependency Graph:**
|
|
705
|
-
|
|
706
|
-
```mermaid
|
|
707
|
-
graph TD
|
|
708
|
-
E1[Epic 1: Foundation] --> E2[Epic 2: Data Layer]
|
|
709
|
-
E1 --> E3[Epic 3: Auth & Authorization]
|
|
710
|
-
|
|
711
|
-
E2 --> E4[Epic 4: User Management]
|
|
712
|
-
E3 --> E4
|
|
713
|
-
|
|
714
|
-
E2 --> E5[Epic 5: Product Catalog]
|
|
715
|
-
E2 --> E6[Epic 6: Order Management]
|
|
716
|
-
|
|
717
|
-
E4 --> E6
|
|
718
|
-
E5 --> E6
|
|
719
|
-
|
|
720
|
-
E6 --> E7[Epic 7: Payment Processing]
|
|
721
|
-
E3 --> E7
|
|
722
|
-
|
|
723
|
-
E4 --> E8[Epic 8: Notifications]
|
|
724
|
-
E6 --> E8
|
|
725
|
-
|
|
726
|
-
E7 --> E9[Epic 9: Analytics]
|
|
727
|
-
E6 --> E9
|
|
728
|
-
|
|
729
|
-
E1 --> E10[Epic 10: Operations]
|
|
730
|
-
E7 --> E10
|
|
731
|
-
E8 --> E10
|
|
732
|
-
E9 --> E10
|
|
733
|
-
|
|
734
|
-
style E1 fill:#ff6b6b
|
|
735
|
-
style E2 fill:#4ecdc4
|
|
736
|
-
style E3 fill:#ffe66d
|
|
737
|
-
style E4 fill:#a8e6cf
|
|
738
|
-
style E5 fill:#a8e6cf
|
|
739
|
-
style E6 fill:#ffd93d
|
|
740
|
-
style E7 fill:#ffd93d
|
|
741
|
-
style E8 fill:#c7ceea
|
|
742
|
-
style E9 fill:#c7ceea
|
|
743
|
-
style E10 fill:#95e1d3
|
|
744
|
-
````
|
|
745
|
-
|
|
746
|
-
**Execution Order Recommendation:**
|
|
747
|
-
|
|
158
|
+
**Show summary:**
|
|
748
159
|
```
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
**Phase 2: Core Layer (Weeks 3-5) • 55 SP**
|
|
758
|
-
├─ Epic 2: Data Layer (blocking) • 34 SP
|
|
759
|
-
└─ Epic 3: Authentication & Authorization (parallel) • 21 SP
|
|
760
|
-
|
|
761
|
-
**Phase 3: Core Features (Weeks 6-8) • 34 SP**
|
|
762
|
-
├─ Epic 4: User Management • 13 SP
|
|
763
|
-
└─ Epic 5: Product Catalog (parallel) • 21 SP
|
|
764
|
-
|
|
765
|
-
**Phase 4: Advanced Features (Weeks 9-12) • 55 SP**
|
|
766
|
-
├─ Epic 6: Order Management • 34 SP
|
|
767
|
-
└─ Epic 7: Payment Processing • 21 SP
|
|
768
|
-
|
|
769
|
-
**Phase 5: Secondary Features (Weeks 13-15) • 26 SP**
|
|
770
|
-
├─ Epic 8: Notifications (parallel) • 13 SP
|
|
771
|
-
└─ Epic 9: Analytics (parallel) • 13 SP
|
|
772
|
-
|
|
773
|
-
**Phase 6: Production Readiness (Weeks 16-17) • 13 SP**
|
|
774
|
-
└─ Epic 10: Operations & Deployment
|
|
775
|
-
|
|
776
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
777
|
-
⚡ Parallelization Opportunities:
|
|
778
|
-
• Week 3-5: Data Layer + Auth (2 devs)
|
|
779
|
-
• Week 6-8: User Mgmt + Product Catalog (2 devs)
|
|
780
|
-
• Week 13-15: Notifications + Analytics (2 devs)
|
|
781
|
-
|
|
782
|
-
With 2 developers: ~12 weeks (40% time savings)
|
|
783
|
-
With 3 developers: ~9 weeks (47% time savings)
|
|
784
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
160
|
+
INVENTORY COMPLETE
|
|
161
|
+
├── Context: {{LANGUAGE}} / {{ARCHITECTURE}}
|
|
162
|
+
├── Entities: X (simple: X, medium: X, complex: X)
|
|
163
|
+
├── Endpoints: X (simple: X, medium: X, complex: X)
|
|
164
|
+
├── Integrations: X
|
|
165
|
+
├── Security: X requirements
|
|
166
|
+
└── Estimated tasks: XXX-XXX
|
|
785
167
|
```
|
|
786
168
|
|
|
787
169
|
---
|
|
788
170
|
|
|
789
|
-
### Step 9.
|
|
171
|
+
### Step 9.2: Coverage Matrix (5-10 min)
|
|
790
172
|
|
|
791
|
-
**
|
|
173
|
+
**BUILD MANDATORY COVERAGE MATRIX before generating tasks:**
|
|
792
174
|
|
|
793
175
|
```
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
176
|
+
COVERAGE MATRIX
|
|
177
|
+
┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
|
178
|
+
│ Component │ [E] │ [R] │ [S] │ [C] │ [T] │ [D] │
|
|
179
|
+
├────────────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
180
|
+
│ User │ ? │ ? │ ? │ ? │ ? │ ? │
|
|
181
|
+
│ Product │ ? │ ? │ ? │ ? │ ? │ ? │
|
|
182
|
+
│ POST /auth │ - │ - │ ? │ ? │ ? │ ? │
|
|
183
|
+
│ GET /users │ - │ - │ ? │ ? │ ? │ ? │
|
|
184
|
+
└────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
|
797
185
|
|
|
798
|
-
|
|
186
|
+
Legend: ? = needs task | ✓ = has task | - = not applicable
|
|
799
187
|
```
|
|
800
188
|
|
|
801
|
-
**
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
> **Generated:** {{DATE}} > **Based on:** Documentation v1.0 (Phases 0-8 complete)
|
|
807
|
-
> **Total Estimated:** {{TOTAL_WEEKS}} weeks • {{TOTAL_SP}} SP
|
|
808
|
-
|
|
809
|
-
---
|
|
810
|
-
|
|
811
|
-
## 📊 Project Overview
|
|
812
|
-
|
|
813
|
-
**Problem:** {{PROBLEM_STATEMENT}}
|
|
814
|
-
|
|
815
|
-
**Objectives:**
|
|
816
|
-
{{#EACH BUSINESS_OBJECTIVE}}
|
|
817
|
-
|
|
818
|
-
- {{OBJECTIVE_TITLE}}: {{SUCCESS_METRIC}}
|
|
819
|
-
{{/EACH}}
|
|
820
|
-
|
|
821
|
-
**Tech Stack:**
|
|
822
|
-
|
|
823
|
-
- **Framework:** {{FRAMEWORK}} {{VERSION}}
|
|
824
|
-
- **Database:** {{DATABASE}} + {{ORM}}
|
|
825
|
-
- **Architecture:** {{ARCHITECTURE_PATTERN}}
|
|
826
|
-
- **Deployment:** {{DEPLOYMENT_PLATFORM}}
|
|
827
|
-
|
|
828
|
-
---
|
|
829
|
-
|
|
830
|
-
## 📈 Story Points Reference
|
|
831
|
-
|
|
832
|
-
Use this table to translate Story Points to time estimates:
|
|
833
|
-
|
|
834
|
-
| Story Points | Complexity | Typical Time | Description |
|
|
835
|
-
| ------------ | ---------- | ------------ | --------------------------------------------- |
|
|
836
|
-
| **1 SP** | Trivial | 1-2 hours | Simple config change, add enum value |
|
|
837
|
-
| **2 SP** | Very Small | 2-4 hours | Basic validation, simple test |
|
|
838
|
-
| **3 SP** | Small | 4-8 hours | Simple CRUD endpoint, basic entity |
|
|
839
|
-
| **5 SP** | Medium | 1-2 days | Complex endpoint with business logic |
|
|
840
|
-
| **8 SP** | Complex | 2-3 days | Auth flow, complex validation, multiple tests |
|
|
841
|
-
| **13 SP** | Large | 1 week | Complete module with full test coverage |
|
|
842
|
-
| **21 SP** | Very Large | 2 weeks | Major feature with integration |
|
|
843
|
-
| **34 SP** | Epic | 3 weeks | Multiple related features |
|
|
844
|
-
|
|
845
|
-
> **Note:** Times assume experienced developer with AI assistance (GitHub Copilot, Claude, etc.)
|
|
846
|
-
> Without AI assistance, multiply time estimates by 2-3x.
|
|
847
|
-
|
|
848
|
-
---
|
|
849
|
-
|
|
850
|
-
## 🎯 Epic Overview
|
|
851
|
-
|
|
852
|
-
{{EPIC_TABLE}}
|
|
853
|
-
|
|
854
|
-
**Total Estimated Development Time:**
|
|
855
|
-
|
|
856
|
-
- **1 Developer:** {{SOLO_WEEKS}} weeks ({{SOLO_MONTHS}} months)
|
|
857
|
-
- **2 Developers:** {{TWO_DEV_WEEKS}} weeks ({{TWO_DEV_MONTHS}} months)
|
|
858
|
-
- **3 Developers:** {{THREE_DEV_WEEKS}} weeks ({{THREE_DEV_MONTHS}} months)
|
|
189
|
+
**Rules:**
|
|
190
|
+
- Every Entity MUST have: [E], [R], [S], [T], [D]
|
|
191
|
+
- Every Endpoint MUST have: [S] or [C], [T], [D]
|
|
192
|
+
- Every Integration MUST have: [S], [T], [D]
|
|
859
193
|
|
|
860
194
|
---
|
|
861
195
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
Our roadmap follows a battle-tested 5-phase approach for predictable, incremental delivery:
|
|
865
|
-
|
|
866
|
-
### Phase 0: Setup (Pre-Foundation)
|
|
867
|
-
|
|
868
|
-
**Goal:** Project initialization
|
|
869
|
-
**Duration:** 1-2 days (already done by `/project-scaffold`)
|
|
196
|
+
### Step 9.3: Epic Definition (5-10 min)
|
|
870
197
|
|
|
871
|
-
|
|
872
|
-
- Development environment setup
|
|
873
|
-
- Base dependencies installed
|
|
874
|
-
|
|
875
|
-
### Phase 1: Foundational (Blocking Prerequisites)
|
|
876
|
-
|
|
877
|
-
**Goal:** Core infrastructure that everything depends on
|
|
878
|
-
**Duration:** 2-3 weeks
|
|
879
|
-
**Epics:** Foundation, Data Layer (base models only)
|
|
880
|
-
|
|
881
|
-
**Characteristics:**
|
|
882
|
-
|
|
883
|
-
- ❌ NO parallelization (everything blocks on these)
|
|
884
|
-
- ✅ Must complete BEFORE user story implementation
|
|
885
|
-
- 🎯 Establish patterns for entire project
|
|
886
|
-
|
|
887
|
-
**Example Tasks:**
|
|
888
|
-
|
|
889
|
-
- [T001-T020] Database connection, ORM setup, migrations
|
|
890
|
-
- [T021-T040] Logging, error handling, config management
|
|
891
|
-
- [T041-T060] Base entity models (User, Session)
|
|
892
|
-
|
|
893
|
-
### Phase 2-N: User Stories (Priority-Ordered)
|
|
894
|
-
|
|
895
|
-
**Goal:** Deliver business value incrementally
|
|
896
|
-
**Duration:** Varies per story (1-3 weeks each)
|
|
897
|
-
**Epics:** All business features
|
|
898
|
-
|
|
899
|
-
**Characteristics:**
|
|
900
|
-
|
|
901
|
-
- ✅ Each story is INDEPENDENTLY deployable
|
|
902
|
-
- ✅ High parallelization potential (2-3 devs)
|
|
903
|
-
- 🎯 Delivers working software each iteration
|
|
904
|
-
|
|
905
|
-
**Story Execution Order:**
|
|
906
|
-
|
|
907
|
-
1. P0 stories (MVP-critical) → [US1], [US2], [US3]
|
|
908
|
-
2. P1 stories (high value) → [US4], [US5]
|
|
909
|
-
3. P2 stories (nice-to-have) → [US6], [US7]
|
|
910
|
-
|
|
911
|
-
**Example Story Tasks:**
|
|
912
|
-
|
|
913
|
-
- [T061] [US1] Write authentication tests
|
|
914
|
-
- [T062] [US1] Implement JWT service
|
|
915
|
-
- [T063] [US1] Create login endpoint
|
|
916
|
-
- [T064] [P] [US2] Write product catalog tests (parallel to US1)
|
|
917
|
-
|
|
918
|
-
### Phase N: Polish & Cross-Cutting
|
|
919
|
-
|
|
920
|
-
**Goal:** Production readiness
|
|
921
|
-
**Duration:** 1-2 weeks
|
|
922
|
-
**Epics:** Operations, Testing, Performance
|
|
923
|
-
|
|
924
|
-
**Characteristics:**
|
|
925
|
-
|
|
926
|
-
- ✅ Can run after all critical stories complete
|
|
927
|
-
- ✅ Some parallelization (different concerns)
|
|
928
|
-
- 🎯 Ensures quality and operability
|
|
929
|
-
|
|
930
|
-
**Example Tasks:**
|
|
931
|
-
|
|
932
|
-
- [T200-T210] Performance optimization, caching
|
|
933
|
-
- [T211-T220] Security hardening, penetration testing
|
|
934
|
-
- [T221-T230] Monitoring, alerting, logging
|
|
935
|
-
- [T231-T240] Documentation finalization
|
|
936
|
-
|
|
937
|
-
### Phase Benefits:
|
|
938
|
-
|
|
939
|
-
1. **Incremental Delivery**: Ship user stories as they complete
|
|
940
|
-
2. **Risk Mitigation**: Foundation issues caught early
|
|
941
|
-
3. **Team Scaling**: Multiple stories run in parallel
|
|
942
|
-
4. **Predictable Velocity**: Story points per sprint stabilize
|
|
943
|
-
5. **Quality Gates**: Each phase has clear exit criteria
|
|
944
|
-
|
|
945
|
-
---
|
|
946
|
-
|
|
947
|
-
## 🔗 Dependency Graph
|
|
198
|
+
**Standard Epic Structure:**
|
|
948
199
|
|
|
949
|
-
```mermaid
|
|
950
|
-
{{DEPENDENCY_GRAPH}}
|
|
951
200
|
```
|
|
201
|
+
EP-000: Foundation (ALWAYS FIRST)
|
|
202
|
+
├── Config, error handling, logging
|
|
203
|
+
├── Database connection, base classes
|
|
204
|
+
└── Priority: P0 | Duration: Week 1
|
|
952
205
|
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
- 🔵 **Medium Priority** (important)
|
|
958
|
-
- 🟢 **Low Priority** (nice-to-have)
|
|
959
|
-
- ⚪ **Operations** (ongoing)
|
|
960
|
-
|
|
961
|
-
---
|
|
962
|
-
|
|
963
|
-
## 📅 Implementation Phases
|
|
964
|
-
|
|
965
|
-
### Phase 1: Foundation (Weeks 1-2) • 21 SP
|
|
206
|
+
EP-001: Authentication (ALWAYS SECOND if auth exists)
|
|
207
|
+
├── Auth mechanism, password hashing, sessions/tokens
|
|
208
|
+
├── Security requirements from specs/security.md
|
|
209
|
+
└── Priority: P0 | Duration: Week 1-2
|
|
966
210
|
|
|
967
|
-
|
|
211
|
+
EP-XXX: Domain Epics (Group by bounded context)
|
|
212
|
+
├── Related entities + endpoints
|
|
213
|
+
└── Priority: P0/P1/P2
|
|
968
214
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
**Features:**
|
|
974
|
-
|
|
975
|
-
##### Feature 1.1: Base Application Configuration • 5 SP
|
|
976
|
-
|
|
977
|
-
⏱️ **Est. Time:** 1-2 days (~8-12h total) • 🎯 **Priority:** P0 • 📋 **Dependencies:** None
|
|
978
|
-
🏷️ **User Story:** [US0] As a developer, I need a robust configuration system
|
|
979
|
-
|
|
980
|
-
**Tasks:** (Test-First, execution order, hybrid estimation)
|
|
981
|
-
|
|
982
|
-
- [ ] [T001] [P] Write unit tests for configuration service (5 tests) • 2 SP (~3-4h)
|
|
983
|
-
File: tests/unit/config/ConfigService.spec.ts
|
|
984
|
-
Tests: env var loading, validation, defaults, type conversion, missing var errors
|
|
985
|
-
Dependencies: None (can run parallel with other foundational tests)
|
|
986
|
-
|
|
987
|
-
- [ ] [T002] Setup configuration service/module • 2 SP (~3-4h)
|
|
988
|
-
File: src/config/ConfigService.ts
|
|
989
|
-
Implements: Load env vars, validate required fields, type-safe access
|
|
990
|
-
Dependencies: None
|
|
991
|
-
|
|
992
|
-
- [ ] [T003] Configure environment variables (`.env` structure) • 1 SP (~1-2h)
|
|
993
|
-
File: .env.example
|
|
994
|
-
Structure: All required env vars with descriptions and example values
|
|
995
|
-
Dependencies: T002 (know which vars are needed)
|
|
996
|
-
|
|
997
|
-
- [ ] [T004] Add validation for required env vars • 1 SP (~1-2h)
|
|
998
|
-
File: src/config/ConfigService.ts (extend)
|
|
999
|
-
Logic: Fail-fast on missing vars, clear error messages
|
|
1000
|
-
Dependencies: T002 (base service exists)
|
|
1001
|
-
|
|
1002
|
-
- [ ] [T005] [P] Create constants file for app-wide values • 1 SP (~1h)
|
|
1003
|
-
File: src/constants/index.ts
|
|
1004
|
-
Constants: App name, version, default values, enums
|
|
1005
|
-
Dependencies: None (can run parallel with other tasks)
|
|
1006
|
-
|
|
1007
|
-
- [ ] [T006] Document configuration in specs/configuration.md • 1 SP (~1h)
|
|
1008
|
-
File: specs/configuration.md
|
|
1009
|
-
Add: All env vars, types, defaults, validation rules
|
|
1010
|
-
Dependencies: T002, T003, T004 (config system complete)
|
|
1011
|
-
|
|
1012
|
-
**Acceptance Criteria:**
|
|
1013
|
-
|
|
1014
|
-
- [ ] App fails fast with clear error if required env var missing
|
|
1015
|
-
- [ ] Configuration is type-safe (TypeScript interfaces)
|
|
1016
|
-
- [ ] Test coverage ≥ 80%
|
|
1017
|
-
|
|
1018
|
-
**Ready-to-execute command:**
|
|
1019
|
-
|
|
1020
|
-
```bash
|
|
1021
|
-
/feature new "Base application configuration with environment validation"
|
|
215
|
+
EP-ZZZ: Operations (ALWAYS LAST)
|
|
216
|
+
├── CI/CD, monitoring, deployment
|
|
217
|
+
└── Priority: P1 | Duration: Final week
|
|
1022
218
|
```
|
|
1023
219
|
|
|
1024
220
|
---
|
|
1025
221
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
---
|
|
222
|
+
### Step 9.4: Task Generation by Component Type (30-45 min)
|
|
1029
223
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
Before deploying to production, ensure all items are completed:
|
|
1033
|
-
|
|
1034
|
-
### Infrastructure
|
|
1035
|
-
|
|
1036
|
-
- [ ] All database migrations tested and documented
|
|
1037
|
-
- [ ] Environment variables documented in `.env.example`
|
|
1038
|
-
- [ ] Secrets rotated and stored securely (not in code)
|
|
1039
|
-
- [ ] Docker images built and tagged
|
|
1040
|
-
- [ ] CI/CD pipeline runs successfully
|
|
1041
|
-
- [ ] Staging environment tested
|
|
1042
|
-
|
|
1043
|
-
### Security
|
|
1044
|
-
|
|
1045
|
-
- [ ] Authentication works correctly (JWT/OAuth/etc.)
|
|
1046
|
-
- [ ] Authorization enforced on all protected endpoints
|
|
1047
|
-
- [ ] RBAC roles tested (if applicable)
|
|
1048
|
-
- [ ] Input validation on all endpoints
|
|
1049
|
-
- [ ] SQL injection prevention verified
|
|
1050
|
-
- [ ] XSS protection enabled
|
|
1051
|
-
- [ ] CORS configured correctly
|
|
1052
|
-
- [ ] Rate limiting implemented
|
|
1053
|
-
- [ ] Security headers configured (helmet.js or similar)
|
|
1054
|
-
- [ ] Compliance requirements met ({{COMPLIANCE}})
|
|
1055
|
-
|
|
1056
|
-
### Testing
|
|
1057
|
-
|
|
1058
|
-
- [ ] Unit test coverage ≥ {{COVERAGE_TARGET}}%
|
|
1059
|
-
- [ ] Integration tests passing
|
|
1060
|
-
- [ ] E2E tests covering critical flows
|
|
1061
|
-
- [ ] Performance tests passed
|
|
1062
|
-
- [ ] Load testing completed (if required)
|
|
1063
|
-
- [ ] Security scan completed (OWASP ZAP/similar)
|
|
1064
|
-
|
|
1065
|
-
### Documentation
|
|
1066
|
-
|
|
1067
|
-
- [ ] API documentation up-to-date (Swagger/OpenAPI)
|
|
1068
|
-
- [ ] README includes setup instructions
|
|
1069
|
-
- [ ] Architecture diagrams current
|
|
1070
|
-
- [ ] Deployment guide written
|
|
1071
|
-
- [ ] Runbook for common issues
|
|
1072
|
-
- [ ] Monitoring dashboard configured
|
|
1073
|
-
|
|
1074
|
-
### Monitoring & Operations
|
|
1075
|
-
|
|
1076
|
-
- [ ] Error tracking configured (Sentry/similar)
|
|
1077
|
-
- [ ] Application metrics exposed (Prometheus/similar)
|
|
1078
|
-
- [ ] Log aggregation configured (ELK/similar)
|
|
1079
|
-
- [ ] Alerting rules defined
|
|
1080
|
-
- [ ] Backup strategy implemented and tested
|
|
1081
|
-
- [ ] Rollback procedure documented
|
|
1082
|
-
- [ ] Health check endpoints working
|
|
1083
|
-
- [ ] Database backup automated
|
|
1084
|
-
|
|
1085
|
-
### Performance
|
|
1086
|
-
|
|
1087
|
-
- [ ] Database indexes optimized
|
|
1088
|
-
- [ ] N+1 queries eliminated
|
|
1089
|
-
- [ ] Caching strategy implemented (if needed)
|
|
1090
|
-
- [ ] API response times < {{RESPONSE_TIME_TARGET}}ms
|
|
1091
|
-
- [ ] Static assets optimized and CDN configured
|
|
1092
|
-
- [ ] Connection pooling configured
|
|
224
|
+
**For each Entity, generate tasks using context variables:**
|
|
1093
225
|
|
|
1094
|
-
|
|
226
|
+
```markdown
|
|
227
|
+
### Entity: {{NAME}} ({{COMPLEXITY}})
|
|
1095
228
|
|
|
1096
|
-
|
|
229
|
+
**[E] Schema (2-3 tasks):**
|
|
230
|
+
- [ ] T0XX [E] Create {{NAME}} entity schema (fields: ...) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/{{NAME}}{{EXT}} | deps: none
|
|
231
|
+
- [ ] T0XX [E] Add {{NAME}} validation rules (field constraints) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/{{NAME}}{{EXT}} | deps: T0XX
|
|
232
|
+
- [ ] T0XX [E] Create {{NAME}} database migration • 1 SP → {{MIGRATIONS_DIR}}/XXX_{{name}}{{MIGRATION_EXT}} | deps: T0XX
|
|
1097
233
|
|
|
1098
|
-
|
|
234
|
+
**[R] Repository (4-6 tasks):**
|
|
235
|
+
- [ ] T0XX [R] Create {{NAME}}Repository interface/contract • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
236
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.create() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
237
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.findById() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
238
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.findAll() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
239
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.update() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
240
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.delete() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
1099
241
|
|
|
1100
|
-
-
|
|
1101
|
-
-
|
|
1102
|
-
-
|
|
242
|
+
**[S] Service (2-4 tasks based on business logic):**
|
|
243
|
+
- [ ] T0XX [S] Create {{NAME}}Service with dependency injection • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
244
|
+
- [ ] T0XX [S] Implement {{NAME}}Service.create() with validation • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
245
|
+
- [ ] T0XX [S] Implement {{NAME}}Service business rules • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
1103
246
|
|
|
1104
|
-
|
|
247
|
+
**[T] Tests (3-5 tasks):**
|
|
248
|
+
- [ ] T0XX [T] Write {{NAME}} entity unit tests (5+ cases) • 2 SP → {{TESTS}}/unit/{{NAME}}{{TEST_EXT}} | deps: T0XX
|
|
249
|
+
- [ ] T0XX [T] Write {{NAME}}Repository integration tests • 2 SP → {{TESTS}}/integration/{{NAME}}Repository{{TEST_EXT}} | deps: T0XX
|
|
250
|
+
- [ ] T0XX [T] Write {{NAME}}Service unit tests • 2 SP → {{TESTS}}/unit/{{NAME}}Service{{TEST_EXT}} | deps: T0XX
|
|
1105
251
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
/feature new "Base application configuration with environment validation"
|
|
252
|
+
**[D] Documentation (1 task):**
|
|
253
|
+
- [ ] T0XX [D] Update data-model.md with {{NAME}} schema • 1 SP → docs/data-model.md | deps: T0XX
|
|
1109
254
|
```
|
|
1110
255
|
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
- Work through Epics sequentially (respecting dependencies)
|
|
1114
|
-
- Within an Epic, work through Features in order
|
|
1115
|
-
- Use `/feature` command for each Feature
|
|
1116
|
-
- Use `/work` command to track progress
|
|
256
|
+
**For each Endpoint, generate tasks:**
|
|
1117
257
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
After each Feature:
|
|
1121
|
-
|
|
1122
|
-
- [ ] Run tests: `npm run test`
|
|
1123
|
-
- [ ] Check linting: `npm run lint`
|
|
1124
|
-
- [ ] Check types: `npm run type-check`
|
|
1125
|
-
- [ ] Update documentation if needed: `/flow-docs-sync`
|
|
1126
|
-
- [ ] Commit with conventional commits
|
|
1127
|
-
- [ ] Create PR for review
|
|
258
|
+
```markdown
|
|
259
|
+
### Endpoint: {{METHOD}} {{PATH}}
|
|
1128
260
|
|
|
1129
|
-
|
|
261
|
+
**[C] Controller (2-3 tasks):**
|
|
262
|
+
- [ ] T0XX [C] Create {{METHOD}} {{PATH}} handler • 1 SP → {{SRC}}/{{CTRL_DIR}}/{{Controller}}{{EXT}} | deps: T0XX
|
|
263
|
+
- [ ] T0XX [C] Add request validation schema • 1 SP → {{SRC}}/{{DTO_DIR}}/{{DTO}}{{EXT}} | deps: T0XX
|
|
264
|
+
- [ ] T0XX [C] Add response schema • 1 SP → {{SRC}}/{{DTO_DIR}}/{{DTO}}{{EXT}} | deps: T0XX
|
|
1130
265
|
|
|
1131
|
-
|
|
266
|
+
**[T] Tests (1-2 tasks):**
|
|
267
|
+
- [ ] T0XX [T] Write {{METHOD}} {{PATH}} integration test • 2 SP → {{TESTS}}/integration/{{Controller}}{{TEST_EXT}} | deps: T0XX
|
|
1132
268
|
|
|
1133
|
-
|
|
1134
|
-
-
|
|
1135
|
-
|
|
269
|
+
**[D] Documentation (1 task):**
|
|
270
|
+
- [ ] T0XX [D] Document {{METHOD}} {{PATH}} in api.md • 1 SP → docs/api.md | deps: T0XX
|
|
271
|
+
```
|
|
1136
272
|
|
|
1137
273
|
---
|
|
1138
274
|
|
|
1139
|
-
|
|
275
|
+
### Step 9.5: Validate Coverage (5 min)
|
|
1140
276
|
|
|
1141
|
-
**
|
|
277
|
+
**MANDATORY: Verify matrix is complete before generating document:**
|
|
1142
278
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
**Generated by:** AI Flow v1.1.0
|
|
1155
|
-
**Last Updated:** {{TIMESTAMP}}
|
|
1156
|
-
````
|
|
279
|
+
```
|
|
280
|
+
COVERAGE VALIDATION
|
|
281
|
+
┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
|
282
|
+
│ Component │ [E] │ [R] │ [S] │ [C] │ [T] │ [D] │
|
|
283
|
+
├────────────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
284
|
+
│ User │ T01 │T03-8│ T09 │ T12 │T15-17│ T18│
|
|
285
|
+
│ Product │ T20 │T22-27│T28 │ T31 │T34-36│ T37│
|
|
286
|
+
│ POST /auth │ - │ - │ T40 │ T41 │ T43 │ T44│
|
|
287
|
+
│ GET /users │ - │ - │ T45 │ T46 │ T48 │ T49│
|
|
288
|
+
└────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
|
1157
289
|
|
|
1158
|
-
|
|
290
|
+
✅ All entities have [E], [R], [S], [T], [D]
|
|
291
|
+
✅ All endpoints have [S] or [C], [T], [D]
|
|
292
|
+
✅ No gaps in coverage
|
|
293
|
+
```
|
|
1159
294
|
|
|
295
|
+
**If gaps exist:**
|
|
1160
296
|
```
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
✅ Total: {{TOTAL_EPICS}} Epics, {{TOTAL_FEATURES}} Features, {{TOTAL_TASKS}} Tasks
|
|
1164
|
-
✅ Estimated: {{TOTAL_SP}} Story Points (~{{TOTAL_WEEKS}} weeks)
|
|
297
|
+
❌ COVERAGE ERROR: Product missing [T] category
|
|
298
|
+
→ Add: T0XX [T] Write Product unit tests • 2 SP → {{TESTS}}/unit/Product{{TEST_EXT}}
|
|
1165
299
|
```
|
|
1166
300
|
|
|
1167
301
|
---
|
|
1168
302
|
|
|
1169
|
-
### Step 9.6:
|
|
303
|
+
### Step 9.6: Generate Document (5-10 min)
|
|
1170
304
|
|
|
1171
|
-
|
|
1172
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1173
|
-
✅ PHASE 9 COMPLETE: ROADMAP GENERATED
|
|
1174
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
305
|
+
**Write `docs/roadmap.md` with this structure:**
|
|
1175
306
|
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
✅ Documentation analyzed: {{DOCS_COUNT}} files
|
|
1180
|
-
✅ Epics defined: {{EPICS_COUNT}}
|
|
1181
|
-
✅ Features identified: {{FEATURES_COUNT}}
|
|
1182
|
-
✅ Tasks breakdown: {{TASKS_COUNT}} total tasks
|
|
1183
|
-
✅ Story Points: {{TOTAL_SP}} SP
|
|
1184
|
-
✅ Estimated time: {{SOLO_WEEKS}} weeks (1 dev) | {{TWO_DEV_WEEKS}} weeks (2 devs)
|
|
1185
|
-
✅ Dependency graph: Generated
|
|
1186
|
-
✅ Execution order: Optimized for parallelization
|
|
1187
|
-
✅ Roadmap document: docs/roadmap.md
|
|
1188
|
-
|
|
1189
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1190
|
-
🎯 What This Roadmap Guarantees
|
|
1191
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1192
|
-
|
|
1193
|
-
✅ **100% Coverage:** Every entity, endpoint, flow, and requirement from
|
|
1194
|
-
documentation is included in the roadmap.
|
|
1195
|
-
|
|
1196
|
-
✅ **Complete Implementation:** Following this roadmap will result in a
|
|
1197
|
-
fully functional, production-ready application.
|
|
1198
|
-
|
|
1199
|
-
✅ **Optimal Order:** Dependencies are analyzed. You'll never build
|
|
1200
|
-
Feature B before its dependency Feature A.
|
|
1201
|
-
|
|
1202
|
-
✅ **Realistic Estimates:** Story Points based on actual complexity
|
|
1203
|
-
analysis, not guesswork.
|
|
1204
|
-
|
|
1205
|
-
✅ **Ready to Execute:** Each Feature has a `/feature` command ready
|
|
1206
|
-
to copy-paste and start implementation.
|
|
307
|
+
```markdown
|
|
308
|
+
# Implementation Roadmap: {{PROJECT_NAME}}
|
|
1207
309
|
|
|
1208
|
-
|
|
1209
|
-
|
|
310
|
+
> Generated: {{DATE}} | Total: {{SP}} SP | Estimated: {{WEEKS}} weeks
|
|
311
|
+
> Stack: {{LANGUAGE}} / {{FRAMEWORK}} / {{ARCHITECTURE}}
|
|
1210
312
|
|
|
1211
|
-
|
|
1212
|
-
🚀 Next Steps
|
|
1213
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
313
|
+
## Project Context
|
|
1214
314
|
|
|
1215
|
-
|
|
1216
|
-
|
|
315
|
+
| Variable | Value |
|
|
316
|
+
|----------|-------|
|
|
317
|
+
| Language | {{LANGUAGE}} |
|
|
318
|
+
| Source Dir | {{SRC}} |
|
|
319
|
+
| Tests Dir | {{TESTS}} |
|
|
320
|
+
| Architecture | {{ARCHITECTURE}} |
|
|
1217
321
|
|
|
1218
|
-
|
|
1219
|
-
└─ Decide which features are MVP vs future phases
|
|
1220
|
-
└─ Adjust P0/P1/P2/P3 priorities if needed
|
|
322
|
+
## Story Points Scale
|
|
1221
323
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
324
|
+
| SP | Effort | Time |
|
|
325
|
+
|----|-----------|-----------|
|
|
326
|
+
| 1 | Trivial | 1-2h |
|
|
327
|
+
| 2 | Small | 2-4h |
|
|
1225
328
|
|
|
1226
|
-
|
|
1227
|
-
└─ Begin with Phase 1, Epic 1, Feature 1.1
|
|
1228
|
-
└─ Copy the `/feature` command from roadmap
|
|
1229
|
-
└─ Execute: /feature new "Base application configuration..."
|
|
329
|
+
## Coverage Matrix
|
|
1230
330
|
|
|
1231
|
-
|
|
1232
|
-
└─ Mark tasks as complete: - [ ] → - [x]
|
|
1233
|
-
└─ Use /work show to see active features
|
|
1234
|
-
└─ Update estimates based on actual time
|
|
331
|
+
{{COVERAGE_MATRIX}}
|
|
1235
332
|
|
|
1236
|
-
|
|
1237
|
-
└─ Run tests after each feature
|
|
1238
|
-
└─ Use /review for code quality checks
|
|
1239
|
-
└─ Update docs with /flow-docs-sync when needed
|
|
333
|
+
## Epic Overview
|
|
1240
334
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
335
|
+
| Epic | Name | SP | Tasks | Priority |
|
|
336
|
+
|------|----------------|-----|-------|----------|
|
|
337
|
+
| EP-000 | Foundation | XX | XX | P0 |
|
|
338
|
+
| EP-001 | Auth | XX | XX | P0 |
|
|
1244
339
|
|
|
1245
|
-
|
|
1246
|
-
Epics marked "Can run in PARALLEL"
|
|
340
|
+
## EP-000: Foundation • XX SP
|
|
1247
341
|
|
|
1248
|
-
|
|
1249
|
-
features. Adjust remaining estimates accordingly.
|
|
342
|
+
### Feature 0.1: Base Configuration • X SP
|
|
1250
343
|
|
|
1251
|
-
|
|
1252
|
-
time-to-market.
|
|
344
|
+
{{TASKS}}
|
|
1253
345
|
|
|
1254
|
-
|
|
1255
|
-
/flow-build again (Phases 0-9) to update everything.
|
|
346
|
+
## EP-001: Authentication • XX SP
|
|
1256
347
|
|
|
1257
|
-
|
|
348
|
+
### Feature 1.1: User Entity • X SP
|
|
1258
349
|
|
|
1259
|
-
|
|
350
|
+
{{TASKS}}
|
|
1260
351
|
|
|
1261
|
-
|
|
352
|
+
### Feature 1.2: Login Endpoint • X SP
|
|
1262
353
|
|
|
1263
|
-
|
|
1264
|
-
```
|
|
354
|
+
{{TASKS}}
|
|
1265
355
|
|
|
1266
|
-
|
|
356
|
+
## Dependency Graph
|
|
1267
357
|
|
|
358
|
+
```mermaid
|
|
359
|
+
graph TD
|
|
360
|
+
EP000[Foundation] --> EP001[Auth]
|
|
361
|
+
EP000 --> EP002[Users]
|
|
362
|
+
EP001 --> EP003[Products]
|
|
1268
363
|
```
|
|
1269
|
-
Would you like to:
|
|
1270
|
-
|
|
1271
|
-
A) 📖 Continue to Phase 10: User Stories (RECOMMENDED)
|
|
1272
|
-
→ Generate detailed User Stories with acceptance criteria
|
|
1273
|
-
→ Will execute: /flow-build fase 10
|
|
1274
364
|
|
|
1275
|
-
|
|
1276
|
-
→ Will execute: /flow-dev-feature {{FIRST_FEATURE_ID}}
|
|
365
|
+
## Production Checklist
|
|
1277
366
|
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
Your choice (A/B/C/D): __
|
|
367
|
+
- [ ] All migrations tested
|
|
368
|
+
- [ ] Test coverage >= 80%
|
|
369
|
+
- [ ] API documentation complete
|
|
370
|
+
- [ ] Security requirements verified
|
|
371
|
+
- [ ] CI/CD pipeline working
|
|
1285
372
|
```
|
|
1286
373
|
|
|
1287
374
|
---
|
|
1288
375
|
|
|
1289
|
-
##
|
|
1290
|
-
|
|
1291
|
-
### Story Point Calibration
|
|
1292
|
-
|
|
1293
|
-
The Story Point estimates are based on:
|
|
376
|
+
## Validation Checklist
|
|
1294
377
|
|
|
1295
|
-
|
|
1296
|
-
- Number of entities involved
|
|
1297
|
-
- Business logic complexity
|
|
1298
|
-
- Integration complexity
|
|
1299
|
-
- Testing requirements
|
|
1300
|
-
- Security requirements
|
|
378
|
+
Before completing Phase 9:
|
|
1301
379
|
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
380
|
+
- [ ] Context variables extracted from ai-instructions.md
|
|
381
|
+
- [ ] All file paths use {{VARIABLE}} format (no hardcoded .ts, .py, etc.)
|
|
382
|
+
- [ ] Every entity has [E], [R], [S], [T], [D] tasks
|
|
383
|
+
- [ ] Every endpoint has [C] or [S], [T], [D] tasks
|
|
384
|
+
- [ ] All tasks use exact format: `TXXX [CAT] Desc • N SP → {{path}} | deps: X`
|
|
385
|
+
- [ ] No task exceeds 2 SP
|
|
386
|
+
- [ ] Coverage matrix shows no gaps
|
|
387
|
+
- [ ] Task IDs are sequential (T001, T002, T003...)
|
|
388
|
+
- [ ] Dependencies form valid DAG (no cycles)
|
|
1307
389
|
|
|
1308
|
-
|
|
1309
|
-
- Estimates assume use of AI tools (Copilot, Claude, etc.)
|
|
1310
|
-
- Without AI: multiply by 2-3x
|
|
390
|
+
## DO NOT
|
|
1311
391
|
|
|
1312
|
-
|
|
392
|
+
- ❌ Hardcode file extensions (.ts, .py, .go, .java)
|
|
393
|
+
- ❌ Hardcode directory structures (src/entities/, app/models/)
|
|
394
|
+
- ❌ Assume specific architecture patterns
|
|
395
|
+
- ❌ Use language-specific naming conventions (IRepository, _private)
|
|
396
|
+
- ❌ Create tasks > 2 SP
|
|
397
|
+
- ❌ Skip coverage matrix validation
|
|
398
|
+
- ❌ Leave entities without tests
|
|
1313
399
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
- Adjust priorities based on business needs
|
|
1317
|
-
- Re-estimate after velocity stabilizes (2-3 sprints)
|
|
1318
|
-
- Re-generate if documentation changes significantly
|
|
1319
|
-
- Break down large features (21+ SP) into smaller chunks
|
|
1320
|
-
|
|
1321
|
-
### Coverage Guarantee
|
|
1322
|
-
|
|
1323
|
-
The roadmap generation process ensures:
|
|
1324
|
-
|
|
1325
|
-
1. **Every entity** from `docs/data-model.md` has a Feature
|
|
1326
|
-
2. **Every endpoint** from `docs/api.md` has a Feature
|
|
1327
|
-
3. **Every business flow** from `docs/business-flows.md` is covered
|
|
1328
|
-
4. **All security requirements** from `specs/security.md` are included
|
|
1329
|
-
5. **All integrations** from `specs/configuration.md` are planned
|
|
1330
|
-
6. **Testing strategy** from `docs/testing.md` is embedded in every Feature
|
|
1331
|
-
7. **Operations requirements** from `docs/operations.md` are in final Epic
|
|
1332
|
-
|
|
1333
|
-
### Validation Logic
|
|
1334
|
-
|
|
1335
|
-
Before generating roadmap, validate:
|
|
400
|
+
## Summary
|
|
1336
401
|
|
|
1337
402
|
```
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
- [ ] No endpoints defined in docs/api.md
|
|
403
|
+
PHASE 9 COMPLETE
|
|
404
|
+
├── Stack: {{LANGUAGE}} / {{FRAMEWORK}}
|
|
405
|
+
├── Epics: X
|
|
406
|
+
├── Features: X
|
|
407
|
+
├── Tasks: X
|
|
408
|
+
├── Story Points: X SP
|
|
409
|
+
├── Coverage: 100% (all components have [E][R][S][C][T][D])
|
|
410
|
+
└── Ready for: /flow-dev-feature
|
|
1347
411
|
|
|
1348
|
-
|
|
412
|
+
Next: Open docs/roadmap.md and start with EP-000
|
|
1349
413
|
```
|
|
1350
|
-
|
|
1351
|
-
---
|
|
1352
|
-
|
|
1353
|
-
## Checklist for Phase 9
|
|
1354
|
-
|
|
1355
|
-
**9.1 Documentation Analysis:**
|
|
1356
|
-
|
|
1357
|
-
- [ ] Read all 11+ documentation files
|
|
1358
|
-
- [ ] Extract business context
|
|
1359
|
-
- [ ] Extract technical stack
|
|
1360
|
-
- [ ] Extract data model (all entities)
|
|
1361
|
-
- [ ] Extract API endpoints (all routes)
|
|
1362
|
-
- [ ] Extract business flows
|
|
1363
|
-
- [ ] Extract security requirements
|
|
1364
|
-
- [ ] Extract testing strategy
|
|
1365
|
-
- [ ] Extract operations requirements
|
|
1366
|
-
- [ ] Show analysis summary
|
|
1367
|
-
|
|
1368
|
-
**9.2 Epic Definition:**
|
|
1369
|
-
|
|
1370
|
-
- [ ] Define Foundation Epic
|
|
1371
|
-
- [ ] Define Data Layer Epic
|
|
1372
|
-
- [ ] Define Authentication & Authorization Epic
|
|
1373
|
-
- [ ] Define all Business Feature Epics
|
|
1374
|
-
- [ ] Define Integration Epic (if external services exist)
|
|
1375
|
-
- [ ] Define Operations & Deployment Epic
|
|
1376
|
-
- [ ] Estimate Story Points for each Epic
|
|
1377
|
-
- [ ] Show Epic summary
|
|
1378
|
-
|
|
1379
|
-
**9.3 Feature Breakdown:**
|
|
1380
|
-
|
|
1381
|
-
- [ ] For each Epic, break down into Features
|
|
1382
|
-
- [ ] Assign Story Points to each Feature (Fibonacci scale)
|
|
1383
|
-
- [ ] Define Tasks for each Feature with individual SP
|
|
1384
|
-
- [ ] Define Acceptance Criteria for each Feature
|
|
1385
|
-
- [ ] Add ready-to-execute `/feature` command
|
|
1386
|
-
- [ ] Show Feature summary
|
|
1387
|
-
|
|
1388
|
-
**9.4 Dependency Analysis:**
|
|
1389
|
-
|
|
1390
|
-
- [ ] Analyze entity dependencies (FK relationships)
|
|
1391
|
-
- [ ] Analyze logical dependencies (auth → protected endpoints)
|
|
1392
|
-
- [ ] Identify parallelization opportunities
|
|
1393
|
-
- [ ] Generate Mermaid dependency graph
|
|
1394
|
-
- [ ] Generate execution order recommendation
|
|
1395
|
-
- [ ] Show parallelization opportunities
|
|
1396
|
-
|
|
1397
|
-
**9.5 Generate Roadmap Document:**
|
|
1398
|
-
|
|
1399
|
-
- [ ] Create `docs/roadmap.md`
|
|
1400
|
-
- [ ] Include project overview
|
|
1401
|
-
- [ ] Include Story Points reference table
|
|
1402
|
-
- [ ] Include Epic overview table
|
|
1403
|
-
- [ ] Include dependency graph (Mermaid)
|
|
1404
|
-
- [ ] Include implementation phases
|
|
1405
|
-
- [ ] Include all Epics with all Features
|
|
1406
|
-
- [ ] Include production readiness checklist
|
|
1407
|
-
- [ ] Include getting started guide
|
|
1408
|
-
- [ ] Show roadmap location
|
|
1409
|
-
|
|
1410
|
-
**9.6 Summary & Next Steps:**
|
|
1411
|
-
|
|
1412
|
-
- [ ] Show complete summary
|
|
1413
|
-
- [ ] Show roadmap guarantees
|
|
1414
|
-
- [ ] Show next steps
|
|
1415
|
-
- [ ] Show pro tips
|
|
1416
|
-
- [ ] Ask user: Start first feature, Review, or Customize
|
|
1417
|
-
|
|
1418
|
-
**DO NOT:**
|
|
1419
|
-
|
|
1420
|
-
- ❌ Skip documentation analysis
|
|
1421
|
-
- ❌ Generate generic Epics not based on actual docs
|
|
1422
|
-
- ❌ Assign Story Points arbitrarily
|
|
1423
|
-
- ❌ Miss any entities, endpoints, or flows
|
|
1424
|
-
- ❌ Forget dependency analysis
|
|
1425
|
-
- ❌ Skip parallelization opportunities
|
|
1426
|
-
- ❌ Generate incomplete roadmap
|
|
1427
|
-
- ❌ Leave placeholder text in roadmap
|
|
1428
|
-
- ❌ Forget production readiness checklist
|
|
1429
|
-
|
|
1430
|
-
**ESTIMATED TIME:**
|
|
1431
|
-
|
|
1432
|
-
- 9.1: Documentation analysis - 5-8 min
|
|
1433
|
-
- 9.2: Epic definition - 3-5 min
|
|
1434
|
-
- 9.3: Feature breakdown - 5-10 min
|
|
1435
|
-
- 9.4: Dependency analysis - 2-3 min
|
|
1436
|
-
- 9.5: Generate roadmap - 2-5 min
|
|
1437
|
-
- 9.6: Summary & next steps - 1 min
|
|
1438
|
-
- **Total: 15-30 minutes**
|
|
1439
|
-
|
|
1440
|
-
---
|
|
1441
|
-
|
|
1442
|
-
**CONTINUE TO:** Phase 10 (User Stories) - OPTIONAL
|
|
1443
|
-
|
|
1444
|
-
**SUCCESS:** Complete implementation roadmap with Story Points generated! Ready to start building or continue to Phase 10 for detailed User Stories! 🚀
|