ai-flow-dev 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +573 -570
- package/package.json +74 -74
- package/prompts/backend/flow-build-phase-0.md +535 -535
- package/prompts/backend/flow-build-phase-1.md +626 -626
- package/prompts/backend/flow-build-phase-10.md +340 -340
- package/prompts/backend/flow-build-phase-2.md +573 -573
- package/prompts/backend/flow-build-phase-3.md +834 -834
- package/prompts/backend/flow-build-phase-4.md +554 -554
- package/prompts/backend/flow-build-phase-5.md +703 -703
- package/prompts/backend/flow-build-phase-6.md +524 -524
- package/prompts/backend/flow-build-phase-7.md +1001 -1001
- package/prompts/backend/flow-build-phase-8.md +1407 -1407
- package/prompts/backend/flow-build-phase-9.md +477 -477
- package/prompts/backend/flow-build.md +137 -137
- package/prompts/backend/flow-check-review.md +656 -20
- package/prompts/backend/flow-check-test.md +526 -14
- package/prompts/backend/flow-check.md +725 -67
- package/prompts/backend/flow-commit.md +88 -119
- package/prompts/backend/flow-docs-sync.md +354 -354
- package/prompts/backend/flow-finish.md +919 -0
- package/prompts/backend/flow-release.md +949 -0
- package/prompts/backend/flow-work-feature.md +61 -61
- package/prompts/backend/flow-work-fix.md +46 -46
- package/prompts/backend/flow-work-refactor.md +48 -48
- package/prompts/backend/flow-work-resume.md +34 -34
- package/prompts/backend/flow-work.md +1098 -1286
- package/prompts/desktop/flow-build-phase-0.md +359 -359
- package/prompts/desktop/flow-build-phase-1.md +295 -295
- package/prompts/desktop/flow-build-phase-10.md +357 -357
- package/prompts/desktop/flow-build-phase-2.md +282 -282
- package/prompts/desktop/flow-build-phase-3.md +291 -291
- package/prompts/desktop/flow-build-phase-4.md +308 -308
- package/prompts/desktop/flow-build-phase-5.md +269 -269
- package/prompts/desktop/flow-build-phase-6.md +350 -350
- package/prompts/desktop/flow-build-phase-7.md +297 -297
- package/prompts/desktop/flow-build-phase-8.md +541 -541
- package/prompts/desktop/flow-build-phase-9.md +439 -439
- package/prompts/desktop/flow-build.md +156 -156
- package/prompts/desktop/flow-check-review.md +656 -20
- package/prompts/desktop/flow-check-test.md +526 -14
- package/prompts/desktop/flow-check.md +725 -67
- package/prompts/desktop/flow-commit.md +88 -119
- package/prompts/desktop/flow-docs-sync.md +354 -354
- package/prompts/desktop/flow-finish.md +910 -0
- package/prompts/desktop/flow-release.md +662 -0
- package/prompts/desktop/flow-work-feature.md +61 -61
- package/prompts/desktop/flow-work-fix.md +46 -46
- package/prompts/desktop/flow-work-refactor.md +48 -48
- package/prompts/desktop/flow-work-resume.md +34 -34
- package/prompts/desktop/flow-work.md +1202 -1390
- package/prompts/frontend/flow-build-phase-0.md +425 -425
- package/prompts/frontend/flow-build-phase-1.md +626 -626
- package/prompts/frontend/flow-build-phase-10.md +33 -33
- package/prompts/frontend/flow-build-phase-2.md +573 -573
- package/prompts/frontend/flow-build-phase-3.md +782 -782
- package/prompts/frontend/flow-build-phase-4.md +554 -554
- package/prompts/frontend/flow-build-phase-5.md +703 -703
- package/prompts/frontend/flow-build-phase-6.md +524 -524
- package/prompts/frontend/flow-build-phase-7.md +1001 -1001
- package/prompts/frontend/flow-build-phase-8.md +872 -872
- package/prompts/frontend/flow-build-phase-9.md +94 -94
- package/prompts/frontend/flow-build.md +137 -137
- package/prompts/frontend/flow-check-review.md +656 -20
- package/prompts/frontend/flow-check-test.md +526 -14
- package/prompts/frontend/flow-check.md +725 -67
- package/prompts/frontend/flow-commit.md +88 -119
- package/prompts/frontend/flow-docs-sync.md +550 -550
- package/prompts/frontend/flow-finish.md +910 -0
- package/prompts/frontend/flow-release.md +519 -0
- package/prompts/frontend/flow-work-api.md +1540 -0
- package/prompts/frontend/flow-work-feature.md +61 -61
- package/prompts/frontend/flow-work-fix.md +38 -38
- package/prompts/frontend/flow-work-refactor.md +48 -48
- package/prompts/frontend/flow-work-resume.md +34 -34
- package/prompts/frontend/flow-work.md +1583 -1320
- package/prompts/mobile/flow-build-phase-0.md +425 -425
- package/prompts/mobile/flow-build-phase-1.md +626 -626
- package/prompts/mobile/flow-build-phase-10.md +32 -32
- package/prompts/mobile/flow-build-phase-2.md +573 -573
- package/prompts/mobile/flow-build-phase-3.md +782 -782
- package/prompts/mobile/flow-build-phase-4.md +554 -554
- package/prompts/mobile/flow-build-phase-5.md +703 -703
- package/prompts/mobile/flow-build-phase-6.md +524 -524
- package/prompts/mobile/flow-build-phase-7.md +1001 -1001
- package/prompts/mobile/flow-build-phase-8.md +888 -888
- package/prompts/mobile/flow-build-phase-9.md +90 -90
- package/prompts/mobile/flow-build.md +135 -135
- package/prompts/mobile/flow-check-review.md +656 -20
- package/prompts/mobile/flow-check-test.md +526 -14
- package/prompts/mobile/flow-check.md +725 -67
- package/prompts/mobile/flow-commit.md +88 -119
- package/prompts/mobile/flow-docs-sync.md +620 -620
- package/prompts/mobile/flow-finish.md +910 -0
- package/prompts/mobile/flow-release.md +751 -0
- package/prompts/mobile/flow-work-api.md +1493 -0
- package/prompts/mobile/flow-work-feature.md +61 -61
- package/prompts/mobile/flow-work-fix.md +46 -46
- package/prompts/mobile/flow-work-refactor.md +48 -48
- package/prompts/mobile/flow-work-resume.md +34 -34
- package/prompts/mobile/flow-work.md +1593 -1329
- package/prompts/shared/mermaid-guidelines.md +102 -102
- package/prompts/shared/scope-levels.md +114 -114
- package/prompts/shared/smart-skip-preflight.md +214 -214
- package/prompts/shared/story-points.md +55 -55
- package/prompts/shared/task-format.md +74 -74
- package/prompts/shared/task-summary-template.md +277 -277
- package/templates/AGENT.template.md +443 -443
- package/templates/backend/.clauderules.template +112 -112
- package/templates/backend/.cursorrules.template +102 -102
- package/templates/backend/README.template.md +2 -2
- package/templates/backend/ai-instructions.template.md +2 -2
- package/templates/backend/copilot-instructions.template.md +2 -2
- package/templates/backend/docs/api.template.md +320 -320
- package/templates/backend/docs/business-flows.template.md +97 -97
- package/templates/backend/docs/code-standards.template.md +2 -2
- package/templates/backend/docs/contributing.template.md +3 -3
- package/templates/backend/docs/data-model.template.md +520 -520
- package/templates/backend/docs/testing.template.md +2 -2
- package/templates/backend/project-brief.template.md +2 -2
- package/templates/backend/specs/configuration.template.md +2 -2
- package/templates/backend/specs/security.template.md +2 -2
- package/templates/desktop/.clauderules.template +112 -112
- package/templates/desktop/.cursorrules.template +102 -102
- package/templates/desktop/README.template.md +170 -170
- package/templates/desktop/ai-instructions.template.md +366 -366
- package/templates/desktop/copilot-instructions.template.md +140 -140
- package/templates/desktop/docs/docs/api.template.md +320 -320
- package/templates/desktop/docs/docs/architecture.template.md +724 -724
- package/templates/desktop/docs/docs/business-flows.template.md +102 -102
- package/templates/desktop/docs/docs/code-standards.template.md +792 -792
- package/templates/desktop/docs/docs/contributing.template.md +149 -149
- package/templates/desktop/docs/docs/data-model.template.md +520 -520
- package/templates/desktop/docs/docs/operations.template.md +720 -720
- package/templates/desktop/docs/docs/testing.template.md +722 -722
- package/templates/desktop/project-brief.template.md +150 -150
- package/templates/desktop/specs/specs/configuration.template.md +121 -121
- package/templates/desktop/specs/specs/security.template.md +392 -392
- package/templates/frontend/README.template.md +2 -2
- package/templates/frontend/ai-instructions.template.md +2 -2
- package/templates/frontend/docs/api-integration.template.md +362 -362
- package/templates/frontend/docs/components.template.md +2 -2
- package/templates/frontend/docs/error-handling.template.md +360 -360
- package/templates/frontend/docs/operations.template.md +107 -107
- package/templates/frontend/docs/performance.template.md +124 -124
- package/templates/frontend/docs/pwa.template.md +119 -119
- package/templates/frontend/docs/state-management.template.md +2 -2
- package/templates/frontend/docs/styling.template.md +2 -2
- package/templates/frontend/docs/testing.template.md +2 -2
- package/templates/frontend/project-brief.template.md +2 -2
- package/templates/frontend/specs/accessibility.template.md +95 -95
- package/templates/frontend/specs/configuration.template.md +2 -2
- package/templates/frontend/specs/security.template.md +175 -175
- package/templates/fullstack/README.template.md +252 -252
- package/templates/fullstack/ai-instructions.template.md +444 -444
- package/templates/fullstack/project-brief.template.md +157 -157
- package/templates/fullstack/specs/configuration.template.md +340 -340
- package/templates/mobile/README.template.md +167 -167
- package/templates/mobile/ai-instructions.template.md +196 -196
- package/templates/mobile/docs/app-store.template.md +135 -135
- package/templates/mobile/docs/architecture.template.md +63 -63
- package/templates/mobile/docs/native-features.template.md +94 -94
- package/templates/mobile/docs/navigation.template.md +59 -59
- package/templates/mobile/docs/offline-strategy.template.md +65 -65
- package/templates/mobile/docs/permissions.template.md +56 -56
- package/templates/mobile/docs/state-management.template.md +85 -85
- package/templates/mobile/docs/testing.template.md +109 -109
- package/templates/mobile/project-brief.template.md +69 -69
- package/templates/mobile/specs/build-configuration.template.md +91 -91
- package/templates/mobile/specs/deployment.template.md +92 -92
- package/templates/work.template.md +47 -47
|
@@ -1,477 +1,477 @@
|
|
|
1
|
-
## PHASE 9: Implementation Roadmap (5-10 min)
|
|
2
|
-
|
|
3
|
-
> **Order for this phase:** OPTIONAL. Executed after Phase 8 or on demand.
|
|
4
|
-
|
|
5
|
-
> **📌 Scope-based behavior:**
|
|
6
|
-
> - **All Scopes:** Generate a complete Implementation Roadmap with atomic tasks.
|
|
7
|
-
|
|
8
|
-
### Objective
|
|
9
|
-
Translate all architectural and business specifications into a prioritized, actionable implementation plan (Roadmap) with clear milestones and tasks.
|
|
10
|
-
|
|
11
|
-
## Context Variables (Extract from docs)
|
|
12
|
-
|
|
13
|
-
**Before generating tasks, extract these from project documentation:**
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
From ai-instructions.md:
|
|
17
|
-
├── LANG: {{LANGUAGE}} # e.g., TypeScript, Python, Go, Java, PHP, Ruby
|
|
18
|
-
├── EXT: {{FILE_EXTENSION}} # e.g., .ts, .py, .go, .java, .php, .rb
|
|
19
|
-
├── SRC: {{SOURCE_DIR}} # e.g., src/, app/, lib/, internal/
|
|
20
|
-
├── TESTS: {{TESTS_DIR}} # e.g., tests/, __tests__/, test/, spec/
|
|
21
|
-
└── ARCH: {{ARCHITECTURE}} # e.g., Clean, Hexagonal, MVC, Layered
|
|
22
|
-
|
|
23
|
-
From docs/architecture.md:
|
|
24
|
-
├── ENTITY_DIR: {{ENTITY_PATH}} # e.g., entities/, models/, domain/
|
|
25
|
-
├── REPO_DIR: {{REPO_PATH}} # e.g., repositories/, data/, infrastructure/
|
|
26
|
-
├── SERVICE_DIR: {{SERVICE_PATH}}# e.g., services/, usecases/, application/
|
|
27
|
-
├── CTRL_DIR: {{CONTROLLER_PATH}}# e.g., controllers/, handlers/, api/
|
|
28
|
-
└── DTO_DIR: {{DTO_PATH}} # e.g., dtos/, schemas/, types/
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Use these variables in ALL file paths. Never hardcode language-specific paths.**
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Task Format (MANDATORY)
|
|
36
|
-
|
|
37
|
-
**Every task MUST use this exact format:**
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
- [ ] TXXX [CAT] Description • 1 SP → {{path}} | deps: TXXX
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Components:**
|
|
44
|
-
- `TXXX` - Sequential ID (T001, T002...)
|
|
45
|
-
- `[CAT]` - Category (see below)
|
|
46
|
-
- `Description` - Specific action (verb + what + where)
|
|
47
|
-
- `1 SP` - Story Points (1 or 2 only)
|
|
48
|
-
- `→ {{path}}` - Target file path using context variables
|
|
49
|
-
- `deps: TXXX` - Dependencies (or `deps: none`)
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Categories [CAT]
|
|
54
|
-
|
|
55
|
-
| Cat | Name | Description | SP Range |
|
|
56
|
-
|-----|------------|------------------------------------|----------|
|
|
57
|
-
| [E] | Entity | Schema, model, migration | 1 SP |
|
|
58
|
-
| [R] | Repository | Data access layer | 1 SP |
|
|
59
|
-
| [S] | Service | Business logic, use cases | 1-2 SP |
|
|
60
|
-
| [C] | Controller | Endpoints, routes, handlers | 1 SP |
|
|
61
|
-
| [T] | Test | Unit, integration, e2e tests | 1-2 SP |
|
|
62
|
-
| [D] | Docs | Documentation updates | 1 SP |
|
|
63
|
-
| [I] | Infra | Config, setup, DevOps | 1-2 SP |
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Atomic Task Rules
|
|
68
|
-
|
|
69
|
-
**Maximum 1-2 SP per task. Break down larger tasks:**
|
|
70
|
-
|
|
71
|
-
**BAD (too large):**
|
|
72
|
-
```
|
|
73
|
-
- [ ] T001 [E] Create User entity with CRUD • 5 SP
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**GOOD (atomic, language-agnostic):**
|
|
77
|
-
```
|
|
78
|
-
- [ ] T001 [E] Create User entity schema (id, email, password, role) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/User{{EXT}} | deps: none
|
|
79
|
-
- [ ] T002 [E] Add User validation rules (email format, password min length) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/User{{EXT}} | deps: T001
|
|
80
|
-
- [ ] T003 [R] Create UserRepository interface/contract • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T001
|
|
81
|
-
- [ ] T004 [R] Implement UserRepository.create() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
82
|
-
- [ ] T005 [R] Implement UserRepository.findById() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
83
|
-
- [ ] T006 [R] Implement UserRepository.findByEmail() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
84
|
-
- [ ] T007 [R] Implement UserRepository.update() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
85
|
-
- [ ] T008 [R] Implement UserRepository.delete() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Workflow: 6 Steps
|
|
91
|
-
|
|
92
|
-
// turbo
|
|
93
|
-
### Step 9.1: Extract Context & Inventory (10-15 min)
|
|
94
|
-
|
|
95
|
-
**1. Extract context variables from `ai-instructions.md`:**
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
CONTEXT EXTRACTED
|
|
99
|
-
├── Language: Python
|
|
100
|
-
├── Extension: .py
|
|
101
|
-
├── Source dir: src/
|
|
102
|
-
├── Tests dir: tests/
|
|
103
|
-
├── Architecture: Clean Architecture
|
|
104
|
-
├── Entity path: domain/entities/
|
|
105
|
-
├── Repository path: infrastructure/repositories/
|
|
106
|
-
├── Service path: application/services/
|
|
107
|
-
├── Controller path: interfaces/api/
|
|
108
|
-
└── DTO path: interfaces/dtos/
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**2. Extract inventory from documentation:**
|
|
112
|
-
|
|
113
|
-
**From `docs/data-model.md`:**
|
|
114
|
-
```
|
|
115
|
-
ENTITIES:
|
|
116
|
-
| Entity | Fields | Relations | Complexity |
|
|
117
|
-
|----------|--------|-----------|------------|
|
|
118
|
-
| User | 8 | 3 (1:N) | Medium |
|
|
119
|
-
| Product | 12 | 2 (N:1) | Medium |
|
|
120
|
-
|
|
121
|
-
Complexity: Simple (1-5 fields) | Medium (6-10) | Complex (11+)
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**From `docs/api.md`:**
|
|
125
|
-
```
|
|
126
|
-
ENDPOINTS:
|
|
127
|
-
| Method | Path | Auth | Body | Complexity |
|
|
128
|
-
|--------|----------------|------|------|------------|
|
|
129
|
-
| POST | /auth/login | No | Yes | Medium |
|
|
130
|
-
| GET | /users/:id | Yes | No | Simple |
|
|
131
|
-
|
|
132
|
-
Complexity: Simple (no body) | Medium (body+validation) | Complex (transactions)
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**From `docs/architecture.md`:**
|
|
136
|
-
```
|
|
137
|
-
INTEGRATIONS:
|
|
138
|
-
| Service | Type | Priority |
|
|
139
|
-
|----------|---------|----------|
|
|
140
|
-
| Stripe | Payment | P0 |
|
|
141
|
-
| SendGrid | Email | P1 |
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**From `specs/security.md`:**
|
|
145
|
-
```
|
|
146
|
-
SECURITY:
|
|
147
|
-
| Requirement | Category | Priority |
|
|
148
|
-
|-------------------|----------|----------|
|
|
149
|
-
| JWT Auth | Auth | P0 |
|
|
150
|
-
| Password Hashing | Auth | P0 |
|
|
151
|
-
| Rate Limiting | Security | P1 |
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
**Show summary:**
|
|
155
|
-
```
|
|
156
|
-
INVENTORY COMPLETE
|
|
157
|
-
├── Context: {{LANGUAGE}} / {{ARCHITECTURE}}
|
|
158
|
-
├── Entities: X (simple: X, medium: X, complex: X)
|
|
159
|
-
├── Endpoints: X (simple: X, medium: X, complex: X)
|
|
160
|
-
├── Integrations: X
|
|
161
|
-
├── Security: X requirements
|
|
162
|
-
└── Estimated tasks: XXX-XXX
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
### Step 9.2: Coverage Matrix (5-10 min)
|
|
168
|
-
|
|
169
|
-
**BUILD MANDATORY COVERAGE MATRIX before generating tasks:**
|
|
170
|
-
|
|
171
|
-
```
|
|
172
|
-
COVERAGE MATRIX
|
|
173
|
-
┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
|
174
|
-
│ Component │ [E] │ [R] │ [S] │ [C] │ [T] │ [D] │
|
|
175
|
-
├────────────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
176
|
-
│ User │ ? │ ? │ ? │ ? │ ? │ ? │
|
|
177
|
-
│ Product │ ? │ ? │ ? │ ? │ ? │ ? │
|
|
178
|
-
│ POST /auth │ - │ - │ ? │ ? │ ? │ ? │
|
|
179
|
-
│ GET /users │ - │ - │ ? │ ? │ ? │ ? │
|
|
180
|
-
└────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
|
181
|
-
|
|
182
|
-
Legend: ? = needs task | ✓ = has task | - = not applicable
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
**Rules:**
|
|
186
|
-
- Every Entity MUST have: [E], [R], [S], [T], [D]
|
|
187
|
-
- Every Endpoint MUST have: [S] or [C], [T], [D]
|
|
188
|
-
- Every Integration MUST have: [S], [T], [D]
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
### Step 9.3: Epic Definition (5-10 min)
|
|
193
|
-
|
|
194
|
-
**Standard Epic Structure:**
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
EP-000: Foundation (ALWAYS FIRST)
|
|
198
|
-
├── Config, error handling, logging
|
|
199
|
-
├── Database connection, base classes
|
|
200
|
-
└── Priority: P0 | Duration: Week 1
|
|
201
|
-
|
|
202
|
-
EP-001: Authentication (ALWAYS SECOND if auth exists)
|
|
203
|
-
├── Auth mechanism, password hashing, sessions/tokens
|
|
204
|
-
├── Security requirements from specs/security.md
|
|
205
|
-
└── Priority: P0 | Duration: Week 1-2
|
|
206
|
-
|
|
207
|
-
EP-XXX: Domain Epics (Group by bounded context)
|
|
208
|
-
├── Related entities + endpoints
|
|
209
|
-
└── Priority: P0/P1/P2
|
|
210
|
-
|
|
211
|
-
EP-ZZZ: Operations (ALWAYS LAST)
|
|
212
|
-
├── CI/CD, monitoring, deployment
|
|
213
|
-
└── Priority: P1 | Duration: Final week
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
### Step 9.4: Task Generation by Component Type (30-45 min)
|
|
219
|
-
|
|
220
|
-
**For each Entity, generate tasks using context variables:**
|
|
221
|
-
|
|
222
|
-
```markdown
|
|
223
|
-
### Entity: {{NAME}} ({{COMPLEXITY}})
|
|
224
|
-
|
|
225
|
-
**[E] Schema (2-3 tasks):**
|
|
226
|
-
- [ ] T0XX [E] Create {{NAME}} entity schema (fields: ...) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/{{NAME}}{{EXT}} | deps: none
|
|
227
|
-
- [ ] T0XX [E] Add {{NAME}} validation rules (field constraints) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/{{NAME}}{{EXT}} | deps: T0XX
|
|
228
|
-
- [ ] T0XX [E] Create {{NAME}} database migration • 1 SP → {{MIGRATIONS_DIR}}/XXX_{{name}}{{MIGRATION_EXT}} | deps: T0XX
|
|
229
|
-
|
|
230
|
-
**[R] Repository (4-6 tasks):**
|
|
231
|
-
- [ ] T0XX [R] Create {{NAME}}Repository interface/contract • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
232
|
-
- [ ] T0XX [R] Implement {{NAME}}Repository.create() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
233
|
-
- [ ] T0XX [R] Implement {{NAME}}Repository.findById() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
234
|
-
- [ ] T0XX [R] Implement {{NAME}}Repository.findAll() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
235
|
-
- [ ] T0XX [R] Implement {{NAME}}Repository.update() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
236
|
-
- [ ] T0XX [R] Implement {{NAME}}Repository.delete() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
237
|
-
|
|
238
|
-
**[S] Service (2-4 tasks based on business logic):**
|
|
239
|
-
- [ ] T0XX [S] Create {{NAME}}Service with dependency injection • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
240
|
-
- [ ] T0XX [S] Implement {{NAME}}Service.create() with validation • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
241
|
-
- [ ] T0XX [S] Implement {{NAME}}Service business rules • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
242
|
-
|
|
243
|
-
**[T] Tests (3-5 tasks):**
|
|
244
|
-
- [ ] T0XX [T] Write {{NAME}} entity unit tests (5+ cases) • 2 SP → {{TESTS}}/unit/{{NAME}}{{TEST_EXT}} | deps: T0XX
|
|
245
|
-
- [ ] T0XX [T] Write {{NAME}}Repository integration tests • 2 SP → {{TESTS}}/integration/{{NAME}}Repository{{TEST_EXT}} | deps: T0XX
|
|
246
|
-
- [ ] T0XX [T] Write {{NAME}}Service unit tests • 2 SP → {{TESTS}}/unit/{{NAME}}Service{{TEST_EXT}} | deps: T0XX
|
|
247
|
-
|
|
248
|
-
**[D] Documentation (1 task):**
|
|
249
|
-
- [ ] T0XX [D] Update data-model.md with {{NAME}} schema • 1 SP → docs/data-model.md | deps: T0XX
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
**For each Endpoint, generate tasks:**
|
|
253
|
-
|
|
254
|
-
```markdown
|
|
255
|
-
### Endpoint: {{METHOD}} {{PATH}}
|
|
256
|
-
|
|
257
|
-
**[C] Controller (2-3 tasks):**
|
|
258
|
-
- [ ] T0XX [C] Create {{METHOD}} {{PATH}} handler • 1 SP → {{SRC}}/{{CTRL_DIR}}/{{Controller}}{{EXT}} | deps: T0XX
|
|
259
|
-
- [ ] T0XX [C] Add request validation schema • 1 SP → {{SRC}}/{{DTO_DIR}}/{{DTO}}{{EXT}} | deps: T0XX
|
|
260
|
-
- [ ] T0XX [C] Add response schema • 1 SP → {{SRC}}/{{DTO_DIR}}/{{DTO}}{{EXT}} | deps: T0XX
|
|
261
|
-
|
|
262
|
-
**[T] Tests (1-2 tasks):**
|
|
263
|
-
- [ ] T0XX [T] Write {{METHOD}} {{PATH}} integration test • 2 SP → {{TESTS}}/integration/{{Controller}}{{TEST_EXT}} | deps: T0XX
|
|
264
|
-
|
|
265
|
-
**[D] Documentation (1 task):**
|
|
266
|
-
- [ ] T0XX [D] Document {{METHOD}} {{PATH}} in api.md • 1 SP → docs/api.md | deps: T0XX
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
### Step 9.5: Validate Coverage (5 min)
|
|
272
|
-
|
|
273
|
-
**MANDATORY: Verify matrix is complete before generating document:**
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
COVERAGE VALIDATION
|
|
277
|
-
┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
|
278
|
-
│ Component │ [E] │ [R] │ [S] │ [C] │ [T] │ [D] │
|
|
279
|
-
├────────────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
280
|
-
│ User │ T01 │T03-8│ T09 │ T12 │T15-17│ T18│
|
|
281
|
-
│ Product │ T20 │T22-27│T28 │ T31 │T34-36│ T37│
|
|
282
|
-
│ POST /auth │ - │ - │ T40 │ T41 │ T43 │ T44│
|
|
283
|
-
│ GET /users │ - │ - │ T45 │ T46 │ T48 │ T49│
|
|
284
|
-
└────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
|
285
|
-
|
|
286
|
-
✅ All entities have [E], [R], [S], [T], [D]
|
|
287
|
-
✅ All endpoints have [S] or [C], [T], [D]
|
|
288
|
-
✅ No gaps in coverage
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**If gaps exist:**
|
|
292
|
-
```
|
|
293
|
-
❌ COVERAGE ERROR: Product missing [T] category
|
|
294
|
-
→ Add: T0XX [T] Write Product unit tests • 2 SP → {{TESTS}}/unit/Product{{TEST_EXT}}
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
---
|
|
298
|
-
|
|
299
|
-
### Step 9.6: Generate Document (5-10 min)
|
|
300
|
-
|
|
301
|
-
## Architectural Markers Key
|
|
302
|
-
|
|
303
|
-
| Marker | Name | Description |
|
|
304
|
-
|--------|------|-------------|
|
|
305
|
-
| **[I]** | Infrastructure | Technical setup, configuration, and core utilities |
|
|
306
|
-
| **[E]** | Entity | Database models and schema definitions |
|
|
307
|
-
| **[R]** | Repository | Data access layer (Prisma ORM) |
|
|
308
|
-
| **[S]** | Service | Business logic and use cases |
|
|
309
|
-
| **[C]** | Controller | API endpoints and request handling |
|
|
310
|
-
| **[T]** | Tests | Unit, integration, and E2E testing |
|
|
311
|
-
| **[D]** | Documentation | Technical and API documentation |
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
**Write `planning/roadmap.md` with this structure:**
|
|
316
|
-
|
|
317
|
-
```markdown
|
|
318
|
-
# Implementation Roadmap: {{PROJECT_NAME}}
|
|
319
|
-
|
|
320
|
-
> Generated: {{DATE}} | Total: {{SP}} SP | Estimated: {{WEEKS}} weeks
|
|
321
|
-
> Stack: {{LANGUAGE}} / {{FRAMEWORK}} / {{ARCHITECTURE}}
|
|
322
|
-
|
|
323
|
-
## Project Context
|
|
324
|
-
|
|
325
|
-
| Variable | Value |
|
|
326
|
-
|----------|-------|
|
|
327
|
-
| Language | {{LANGUAGE}} |
|
|
328
|
-
| Source Dir | {{SRC}} |
|
|
329
|
-
| Tests Dir | {{TESTS}} |
|
|
330
|
-
| Architecture | {{ARCHITECTURE}} |
|
|
331
|
-
|
|
332
|
-
## Story Points Scale
|
|
333
|
-
|
|
334
|
-
| SP | Effort | Time |
|
|
335
|
-
|----|-----------|-----------|
|
|
336
|
-
| 1 | Trivial | 1-2h |
|
|
337
|
-
| 2 | Small | 2-4h |
|
|
338
|
-
|
|
339
|
-
## Coverage Matrix
|
|
340
|
-
|
|
341
|
-
{{COVERAGE_MATRIX}}
|
|
342
|
-
|
|
343
|
-
## Epic Overview
|
|
344
|
-
|
|
345
|
-
| Epic | Name | SP | Tasks | Priority |
|
|
346
|
-
|------|----------------|-----|-------|----------|
|
|
347
|
-
| EP-000 | Foundation | XX | XX | P0 |
|
|
348
|
-
| EP-001 | Auth | XX | XX | P0 |
|
|
349
|
-
|
|
350
|
-
## EP-000: Foundation • XX SP
|
|
351
|
-
|
|
352
|
-
### Feature 0.1: Base Configuration • X SP
|
|
353
|
-
|
|
354
|
-
{{TASKS}}
|
|
355
|
-
|
|
356
|
-
## EP-001: Authentication • XX SP
|
|
357
|
-
|
|
358
|
-
### Feature 1.1: User Entity • X SP
|
|
359
|
-
|
|
360
|
-
{{TASKS}}
|
|
361
|
-
|
|
362
|
-
### Feature 1.2: Login Endpoint • X SP
|
|
363
|
-
|
|
364
|
-
{{TASKS}}
|
|
365
|
-
|
|
366
|
-
## Dependency Graph
|
|
367
|
-
|
|
368
|
-
```mermaid
|
|
369
|
-
graph TD
|
|
370
|
-
EP000[Foundation] --> EP001[Auth]
|
|
371
|
-
EP000 --> EP002[Users]
|
|
372
|
-
EP001 --> EP003[Products]
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
## Production Checklist
|
|
376
|
-
|
|
377
|
-
- [ ] All migrations tested
|
|
378
|
-
- [ ] Test coverage >= 80%
|
|
379
|
-
- [ ] API documentation complete
|
|
380
|
-
- [ ] Security requirements verified
|
|
381
|
-
- [ ] CI/CD pipeline working
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## Validation Checklist
|
|
387
|
-
|
|
388
|
-
Before completing Phase 9:
|
|
389
|
-
|
|
390
|
-
- [ ] Context variables extracted from ai-instructions.md
|
|
391
|
-
- [ ] All file paths use {{VARIABLE}} format (no hardcoded .ts, .py, etc.)
|
|
392
|
-
- [ ] Every entity has [E], [R], [S], [T], [D] tasks
|
|
393
|
-
- [ ] Every endpoint has [C] or [S], [T], [D] tasks
|
|
394
|
-
- [ ] All tasks use exact format: `TXXX [CAT] Desc • N SP → {{path}} | deps: X`
|
|
395
|
-
- [ ] No task exceeds 2 SP
|
|
396
|
-
- [ ] Coverage matrix shows no gaps
|
|
397
|
-
- [ ] Task IDs are sequential (T001, T002, T003...)
|
|
398
|
-
- [ ] Dependencies form valid DAG (no cycles)
|
|
399
|
-
|
|
400
|
-
## DO NOT
|
|
401
|
-
|
|
402
|
-
- ❌ Hardcode file extensions (.ts, .py, .go, .java)
|
|
403
|
-
- ❌ Hardcode directory structures (src/entities/, app/models/)
|
|
404
|
-
- ❌ Assume specific architecture patterns
|
|
405
|
-
- ❌ Use language-specific naming conventions (IRepository, _private)
|
|
406
|
-
- ❌ Create tasks > 2 SP
|
|
407
|
-
- ❌ Skip coverage matrix validation
|
|
408
|
-
- ❌ Leave entities without tests
|
|
409
|
-
|
|
410
|
-
## Summary
|
|
411
|
-
|
|
412
|
-
```
|
|
413
|
-
PHASE 9 COMPLETE
|
|
414
|
-
├── Stack: {{LANGUAGE}} / {{FRAMEWORK}}
|
|
415
|
-
├── Epics: X
|
|
416
|
-
├── Features: X
|
|
417
|
-
├── Tasks: X
|
|
418
|
-
├── Story Points: X SP
|
|
419
|
-
├── Coverage: 100% (all components have [E][R][S][C][T][D])
|
|
420
|
-
└── Ready for: /flow-dev-feature
|
|
421
|
-
|
|
422
|
-
Next: Open planning/roadmap.md and start with EP-000, or continue to Phase 10 for detailed User Stories.
|
|
423
|
-
|
|
424
|
-
**OFFER PHASE 10:**
|
|
425
|
-
|
|
426
|
-
```
|
|
427
|
-
---
|
|
428
|
-
✅ PHASE 9 COMPLETE: IMPLEMENTATION ROADMAP GENERATED
|
|
429
|
-
---
|
|
430
|
-
🎯 Roadmap created in planning/roadmap.md
|
|
431
|
-
📊 Total Story Points: {{SP}}
|
|
432
|
-
🏗️ Epics defined: {{EPICS_COUNT}}
|
|
433
|
-
---
|
|
434
|
-
🚀 Optional: Generate Detailed User Stories?
|
|
435
|
-
---
|
|
436
|
-
Phase 10 will convert your roadmap features into detailed User Stories with:
|
|
437
|
-
|
|
438
|
-
✅ Gherkin-style Acceptance Criteria (Given/When/Then)
|
|
439
|
-
✅ Functional, Error, Edge, and Security scenarios
|
|
440
|
-
✅ Technical details inherited from patterns
|
|
441
|
-
✅ Ready-to-use QA Test Cases with data
|
|
442
|
-
✅ Definition of Done (DoD) checklist
|
|
443
|
-
|
|
444
|
-
⏱️ Estimated time: 30-60 minutes
|
|
445
|
-
|
|
446
|
-
Would you like to continue to Phase 10?
|
|
447
|
-
|
|
448
|
-
A) ✅ Yes, generate User Stories now (recommended)
|
|
449
|
-
→ Best for Sprint planning and QA alignment
|
|
450
|
-
→ Will generate {{FEATURES_COUNT}} User Stories
|
|
451
|
-
|
|
452
|
-
B) ⏭️ Skip for now (you can run Phase 10 later)
|
|
453
|
-
→ You can start coding directly from roadmap
|
|
454
|
-
→ Run Phase 10 anytime: /flow-build fase 10
|
|
455
|
-
|
|
456
|
-
Your choice (A/B): __
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
## 📝 Generated Documents
|
|
462
|
-
|
|
463
|
-
After Phase 9, generate/update:
|
|
464
|
-
|
|
465
|
-
- `planning/roadmap.md` - Technical implementation plan
|
|
466
|
-
|
|
467
|
-
---
|
|
468
|
-
|
|
469
|
-
**Next Phase:** Phase 10 - Agile Planning (User Stories)
|
|
470
|
-
|
|
471
|
-
Read: `.ai-flow/prompts/backend/flow-build-phase-10.md`
|
|
472
|
-
|
|
473
|
-
---
|
|
474
|
-
|
|
475
|
-
**Last Updated:** 2025-12-20
|
|
476
|
-
**Version:** 2.1.8
|
|
477
|
-
|
|
1
|
+
## PHASE 9: Implementation Roadmap (5-10 min)
|
|
2
|
+
|
|
3
|
+
> **Order for this phase:** OPTIONAL. Executed after Phase 8 or on demand.
|
|
4
|
+
|
|
5
|
+
> **📌 Scope-based behavior:**
|
|
6
|
+
> - **All Scopes:** Generate a complete Implementation Roadmap with atomic tasks.
|
|
7
|
+
|
|
8
|
+
### Objective
|
|
9
|
+
Translate all architectural and business specifications into a prioritized, actionable implementation plan (Roadmap) with clear milestones and tasks.
|
|
10
|
+
|
|
11
|
+
## Context Variables (Extract from docs)
|
|
12
|
+
|
|
13
|
+
**Before generating tasks, extract these from project documentation:**
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
From ai-instructions.md:
|
|
17
|
+
├── LANG: {{LANGUAGE}} # e.g., TypeScript, Python, Go, Java, PHP, Ruby
|
|
18
|
+
├── EXT: {{FILE_EXTENSION}} # e.g., .ts, .py, .go, .java, .php, .rb
|
|
19
|
+
├── SRC: {{SOURCE_DIR}} # e.g., src/, app/, lib/, internal/
|
|
20
|
+
├── TESTS: {{TESTS_DIR}} # e.g., tests/, __tests__/, test/, spec/
|
|
21
|
+
└── ARCH: {{ARCHITECTURE}} # e.g., Clean, Hexagonal, MVC, Layered
|
|
22
|
+
|
|
23
|
+
From docs/architecture.md:
|
|
24
|
+
├── ENTITY_DIR: {{ENTITY_PATH}} # e.g., entities/, models/, domain/
|
|
25
|
+
├── REPO_DIR: {{REPO_PATH}} # e.g., repositories/, data/, infrastructure/
|
|
26
|
+
├── SERVICE_DIR: {{SERVICE_PATH}}# e.g., services/, usecases/, application/
|
|
27
|
+
├── CTRL_DIR: {{CONTROLLER_PATH}}# e.g., controllers/, handlers/, api/
|
|
28
|
+
└── DTO_DIR: {{DTO_PATH}} # e.g., dtos/, schemas/, types/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Use these variables in ALL file paths. Never hardcode language-specific paths.**
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Task Format (MANDATORY)
|
|
36
|
+
|
|
37
|
+
**Every task MUST use this exact format:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
- [ ] TXXX [CAT] Description • 1 SP → {{path}} | deps: TXXX
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Components:**
|
|
44
|
+
- `TXXX` - Sequential ID (T001, T002...)
|
|
45
|
+
- `[CAT]` - Category (see below)
|
|
46
|
+
- `Description` - Specific action (verb + what + where)
|
|
47
|
+
- `1 SP` - Story Points (1 or 2 only)
|
|
48
|
+
- `→ {{path}}` - Target file path using context variables
|
|
49
|
+
- `deps: TXXX` - Dependencies (or `deps: none`)
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Categories [CAT]
|
|
54
|
+
|
|
55
|
+
| Cat | Name | Description | SP Range |
|
|
56
|
+
|-----|------------|------------------------------------|----------|
|
|
57
|
+
| [E] | Entity | Schema, model, migration | 1 SP |
|
|
58
|
+
| [R] | Repository | Data access layer | 1 SP |
|
|
59
|
+
| [S] | Service | Business logic, use cases | 1-2 SP |
|
|
60
|
+
| [C] | Controller | Endpoints, routes, handlers | 1 SP |
|
|
61
|
+
| [T] | Test | Unit, integration, e2e tests | 1-2 SP |
|
|
62
|
+
| [D] | Docs | Documentation updates | 1 SP |
|
|
63
|
+
| [I] | Infra | Config, setup, DevOps | 1-2 SP |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Atomic Task Rules
|
|
68
|
+
|
|
69
|
+
**Maximum 1-2 SP per task. Break down larger tasks:**
|
|
70
|
+
|
|
71
|
+
**BAD (too large):**
|
|
72
|
+
```
|
|
73
|
+
- [ ] T001 [E] Create User entity with CRUD • 5 SP
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**GOOD (atomic, language-agnostic):**
|
|
77
|
+
```
|
|
78
|
+
- [ ] T001 [E] Create User entity schema (id, email, password, role) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/User{{EXT}} | deps: none
|
|
79
|
+
- [ ] T002 [E] Add User validation rules (email format, password min length) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/User{{EXT}} | deps: T001
|
|
80
|
+
- [ ] T003 [R] Create UserRepository interface/contract • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T001
|
|
81
|
+
- [ ] T004 [R] Implement UserRepository.create() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
82
|
+
- [ ] T005 [R] Implement UserRepository.findById() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
83
|
+
- [ ] T006 [R] Implement UserRepository.findByEmail() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
84
|
+
- [ ] T007 [R] Implement UserRepository.update() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
85
|
+
- [ ] T008 [R] Implement UserRepository.delete() • 1 SP → {{SRC}}/{{REPO_DIR}}/UserRepository{{EXT}} | deps: T003
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Workflow: 6 Steps
|
|
91
|
+
|
|
92
|
+
// turbo
|
|
93
|
+
### Step 9.1: Extract Context & Inventory (10-15 min)
|
|
94
|
+
|
|
95
|
+
**1. Extract context variables from `ai-instructions.md`:**
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
CONTEXT EXTRACTED
|
|
99
|
+
├── Language: Python
|
|
100
|
+
├── Extension: .py
|
|
101
|
+
├── Source dir: src/
|
|
102
|
+
├── Tests dir: tests/
|
|
103
|
+
├── Architecture: Clean Architecture
|
|
104
|
+
├── Entity path: domain/entities/
|
|
105
|
+
├── Repository path: infrastructure/repositories/
|
|
106
|
+
├── Service path: application/services/
|
|
107
|
+
├── Controller path: interfaces/api/
|
|
108
|
+
└── DTO path: interfaces/dtos/
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**2. Extract inventory from documentation:**
|
|
112
|
+
|
|
113
|
+
**From `docs/data-model.md`:**
|
|
114
|
+
```
|
|
115
|
+
ENTITIES:
|
|
116
|
+
| Entity | Fields | Relations | Complexity |
|
|
117
|
+
|----------|--------|-----------|------------|
|
|
118
|
+
| User | 8 | 3 (1:N) | Medium |
|
|
119
|
+
| Product | 12 | 2 (N:1) | Medium |
|
|
120
|
+
|
|
121
|
+
Complexity: Simple (1-5 fields) | Medium (6-10) | Complex (11+)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**From `docs/api.md`:**
|
|
125
|
+
```
|
|
126
|
+
ENDPOINTS:
|
|
127
|
+
| Method | Path | Auth | Body | Complexity |
|
|
128
|
+
|--------|----------------|------|------|------------|
|
|
129
|
+
| POST | /auth/login | No | Yes | Medium |
|
|
130
|
+
| GET | /users/:id | Yes | No | Simple |
|
|
131
|
+
|
|
132
|
+
Complexity: Simple (no body) | Medium (body+validation) | Complex (transactions)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**From `docs/architecture.md`:**
|
|
136
|
+
```
|
|
137
|
+
INTEGRATIONS:
|
|
138
|
+
| Service | Type | Priority |
|
|
139
|
+
|----------|---------|----------|
|
|
140
|
+
| Stripe | Payment | P0 |
|
|
141
|
+
| SendGrid | Email | P1 |
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**From `specs/security.md`:**
|
|
145
|
+
```
|
|
146
|
+
SECURITY:
|
|
147
|
+
| Requirement | Category | Priority |
|
|
148
|
+
|-------------------|----------|----------|
|
|
149
|
+
| JWT Auth | Auth | P0 |
|
|
150
|
+
| Password Hashing | Auth | P0 |
|
|
151
|
+
| Rate Limiting | Security | P1 |
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Show summary:**
|
|
155
|
+
```
|
|
156
|
+
INVENTORY COMPLETE
|
|
157
|
+
├── Context: {{LANGUAGE}} / {{ARCHITECTURE}}
|
|
158
|
+
├── Entities: X (simple: X, medium: X, complex: X)
|
|
159
|
+
├── Endpoints: X (simple: X, medium: X, complex: X)
|
|
160
|
+
├── Integrations: X
|
|
161
|
+
├── Security: X requirements
|
|
162
|
+
└── Estimated tasks: XXX-XXX
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### Step 9.2: Coverage Matrix (5-10 min)
|
|
168
|
+
|
|
169
|
+
**BUILD MANDATORY COVERAGE MATRIX before generating tasks:**
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
COVERAGE MATRIX
|
|
173
|
+
┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
|
174
|
+
│ Component │ [E] │ [R] │ [S] │ [C] │ [T] │ [D] │
|
|
175
|
+
├────────────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
176
|
+
│ User │ ? │ ? │ ? │ ? │ ? │ ? │
|
|
177
|
+
│ Product │ ? │ ? │ ? │ ? │ ? │ ? │
|
|
178
|
+
│ POST /auth │ - │ - │ ? │ ? │ ? │ ? │
|
|
179
|
+
│ GET /users │ - │ - │ ? │ ? │ ? │ ? │
|
|
180
|
+
└────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
|
181
|
+
|
|
182
|
+
Legend: ? = needs task | ✓ = has task | - = not applicable
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Rules:**
|
|
186
|
+
- Every Entity MUST have: [E], [R], [S], [T], [D]
|
|
187
|
+
- Every Endpoint MUST have: [S] or [C], [T], [D]
|
|
188
|
+
- Every Integration MUST have: [S], [T], [D]
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### Step 9.3: Epic Definition (5-10 min)
|
|
193
|
+
|
|
194
|
+
**Standard Epic Structure:**
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
EP-000: Foundation (ALWAYS FIRST)
|
|
198
|
+
├── Config, error handling, logging
|
|
199
|
+
├── Database connection, base classes
|
|
200
|
+
└── Priority: P0 | Duration: Week 1
|
|
201
|
+
|
|
202
|
+
EP-001: Authentication (ALWAYS SECOND if auth exists)
|
|
203
|
+
├── Auth mechanism, password hashing, sessions/tokens
|
|
204
|
+
├── Security requirements from specs/security.md
|
|
205
|
+
└── Priority: P0 | Duration: Week 1-2
|
|
206
|
+
|
|
207
|
+
EP-XXX: Domain Epics (Group by bounded context)
|
|
208
|
+
├── Related entities + endpoints
|
|
209
|
+
└── Priority: P0/P1/P2
|
|
210
|
+
|
|
211
|
+
EP-ZZZ: Operations (ALWAYS LAST)
|
|
212
|
+
├── CI/CD, monitoring, deployment
|
|
213
|
+
└── Priority: P1 | Duration: Final week
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### Step 9.4: Task Generation by Component Type (30-45 min)
|
|
219
|
+
|
|
220
|
+
**For each Entity, generate tasks using context variables:**
|
|
221
|
+
|
|
222
|
+
```markdown
|
|
223
|
+
### Entity: {{NAME}} ({{COMPLEXITY}})
|
|
224
|
+
|
|
225
|
+
**[E] Schema (2-3 tasks):**
|
|
226
|
+
- [ ] T0XX [E] Create {{NAME}} entity schema (fields: ...) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/{{NAME}}{{EXT}} | deps: none
|
|
227
|
+
- [ ] T0XX [E] Add {{NAME}} validation rules (field constraints) • 1 SP → {{SRC}}/{{ENTITY_DIR}}/{{NAME}}{{EXT}} | deps: T0XX
|
|
228
|
+
- [ ] T0XX [E] Create {{NAME}} database migration • 1 SP → {{MIGRATIONS_DIR}}/XXX_{{name}}{{MIGRATION_EXT}} | deps: T0XX
|
|
229
|
+
|
|
230
|
+
**[R] Repository (4-6 tasks):**
|
|
231
|
+
- [ ] T0XX [R] Create {{NAME}}Repository interface/contract • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
232
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.create() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
233
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.findById() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
234
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.findAll() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
235
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.update() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
236
|
+
- [ ] T0XX [R] Implement {{NAME}}Repository.delete() • 1 SP → {{SRC}}/{{REPO_DIR}}/{{NAME}}Repository{{EXT}} | deps: T0XX
|
|
237
|
+
|
|
238
|
+
**[S] Service (2-4 tasks based on business logic):**
|
|
239
|
+
- [ ] T0XX [S] Create {{NAME}}Service with dependency injection • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
240
|
+
- [ ] T0XX [S] Implement {{NAME}}Service.create() with validation • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
241
|
+
- [ ] T0XX [S] Implement {{NAME}}Service business rules • 1 SP → {{SRC}}/{{SERVICE_DIR}}/{{NAME}}Service{{EXT}} | deps: T0XX
|
|
242
|
+
|
|
243
|
+
**[T] Tests (3-5 tasks):**
|
|
244
|
+
- [ ] T0XX [T] Write {{NAME}} entity unit tests (5+ cases) • 2 SP → {{TESTS}}/unit/{{NAME}}{{TEST_EXT}} | deps: T0XX
|
|
245
|
+
- [ ] T0XX [T] Write {{NAME}}Repository integration tests • 2 SP → {{TESTS}}/integration/{{NAME}}Repository{{TEST_EXT}} | deps: T0XX
|
|
246
|
+
- [ ] T0XX [T] Write {{NAME}}Service unit tests • 2 SP → {{TESTS}}/unit/{{NAME}}Service{{TEST_EXT}} | deps: T0XX
|
|
247
|
+
|
|
248
|
+
**[D] Documentation (1 task):**
|
|
249
|
+
- [ ] T0XX [D] Update data-model.md with {{NAME}} schema • 1 SP → docs/data-model.md | deps: T0XX
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**For each Endpoint, generate tasks:**
|
|
253
|
+
|
|
254
|
+
```markdown
|
|
255
|
+
### Endpoint: {{METHOD}} {{PATH}}
|
|
256
|
+
|
|
257
|
+
**[C] Controller (2-3 tasks):**
|
|
258
|
+
- [ ] T0XX [C] Create {{METHOD}} {{PATH}} handler • 1 SP → {{SRC}}/{{CTRL_DIR}}/{{Controller}}{{EXT}} | deps: T0XX
|
|
259
|
+
- [ ] T0XX [C] Add request validation schema • 1 SP → {{SRC}}/{{DTO_DIR}}/{{DTO}}{{EXT}} | deps: T0XX
|
|
260
|
+
- [ ] T0XX [C] Add response schema • 1 SP → {{SRC}}/{{DTO_DIR}}/{{DTO}}{{EXT}} | deps: T0XX
|
|
261
|
+
|
|
262
|
+
**[T] Tests (1-2 tasks):**
|
|
263
|
+
- [ ] T0XX [T] Write {{METHOD}} {{PATH}} integration test • 2 SP → {{TESTS}}/integration/{{Controller}}{{TEST_EXT}} | deps: T0XX
|
|
264
|
+
|
|
265
|
+
**[D] Documentation (1 task):**
|
|
266
|
+
- [ ] T0XX [D] Document {{METHOD}} {{PATH}} in api.md • 1 SP → docs/api.md | deps: T0XX
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### Step 9.5: Validate Coverage (5 min)
|
|
272
|
+
|
|
273
|
+
**MANDATORY: Verify matrix is complete before generating document:**
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
COVERAGE VALIDATION
|
|
277
|
+
┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
|
278
|
+
│ Component │ [E] │ [R] │ [S] │ [C] │ [T] │ [D] │
|
|
279
|
+
├────────────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
280
|
+
│ User │ T01 │T03-8│ T09 │ T12 │T15-17│ T18│
|
|
281
|
+
│ Product │ T20 │T22-27│T28 │ T31 │T34-36│ T37│
|
|
282
|
+
│ POST /auth │ - │ - │ T40 │ T41 │ T43 │ T44│
|
|
283
|
+
│ GET /users │ - │ - │ T45 │ T46 │ T48 │ T49│
|
|
284
|
+
└────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
|
285
|
+
|
|
286
|
+
✅ All entities have [E], [R], [S], [T], [D]
|
|
287
|
+
✅ All endpoints have [S] or [C], [T], [D]
|
|
288
|
+
✅ No gaps in coverage
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**If gaps exist:**
|
|
292
|
+
```
|
|
293
|
+
❌ COVERAGE ERROR: Product missing [T] category
|
|
294
|
+
→ Add: T0XX [T] Write Product unit tests • 2 SP → {{TESTS}}/unit/Product{{TEST_EXT}}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
### Step 9.6: Generate Document (5-10 min)
|
|
300
|
+
|
|
301
|
+
## Architectural Markers Key
|
|
302
|
+
|
|
303
|
+
| Marker | Name | Description |
|
|
304
|
+
|--------|------|-------------|
|
|
305
|
+
| **[I]** | Infrastructure | Technical setup, configuration, and core utilities |
|
|
306
|
+
| **[E]** | Entity | Database models and schema definitions |
|
|
307
|
+
| **[R]** | Repository | Data access layer (Prisma ORM) |
|
|
308
|
+
| **[S]** | Service | Business logic and use cases |
|
|
309
|
+
| **[C]** | Controller | API endpoints and request handling |
|
|
310
|
+
| **[T]** | Tests | Unit, integration, and E2E testing |
|
|
311
|
+
| **[D]** | Documentation | Technical and API documentation |
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
**Write `planning/roadmap.md` with this structure:**
|
|
316
|
+
|
|
317
|
+
```markdown
|
|
318
|
+
# Implementation Roadmap: {{PROJECT_NAME}}
|
|
319
|
+
|
|
320
|
+
> Generated: {{DATE}} | Total: {{SP}} SP | Estimated: {{WEEKS}} weeks
|
|
321
|
+
> Stack: {{LANGUAGE}} / {{FRAMEWORK}} / {{ARCHITECTURE}}
|
|
322
|
+
|
|
323
|
+
## Project Context
|
|
324
|
+
|
|
325
|
+
| Variable | Value |
|
|
326
|
+
|----------|-------|
|
|
327
|
+
| Language | {{LANGUAGE}} |
|
|
328
|
+
| Source Dir | {{SRC}} |
|
|
329
|
+
| Tests Dir | {{TESTS}} |
|
|
330
|
+
| Architecture | {{ARCHITECTURE}} |
|
|
331
|
+
|
|
332
|
+
## Story Points Scale
|
|
333
|
+
|
|
334
|
+
| SP | Effort | Time |
|
|
335
|
+
|----|-----------|-----------|
|
|
336
|
+
| 1 | Trivial | 1-2h |
|
|
337
|
+
| 2 | Small | 2-4h |
|
|
338
|
+
|
|
339
|
+
## Coverage Matrix
|
|
340
|
+
|
|
341
|
+
{{COVERAGE_MATRIX}}
|
|
342
|
+
|
|
343
|
+
## Epic Overview
|
|
344
|
+
|
|
345
|
+
| Epic | Name | SP | Tasks | Priority |
|
|
346
|
+
|------|----------------|-----|-------|----------|
|
|
347
|
+
| EP-000 | Foundation | XX | XX | P0 |
|
|
348
|
+
| EP-001 | Auth | XX | XX | P0 |
|
|
349
|
+
|
|
350
|
+
## EP-000: Foundation • XX SP
|
|
351
|
+
|
|
352
|
+
### Feature 0.1: Base Configuration • X SP
|
|
353
|
+
|
|
354
|
+
{{TASKS}}
|
|
355
|
+
|
|
356
|
+
## EP-001: Authentication • XX SP
|
|
357
|
+
|
|
358
|
+
### Feature 1.1: User Entity • X SP
|
|
359
|
+
|
|
360
|
+
{{TASKS}}
|
|
361
|
+
|
|
362
|
+
### Feature 1.2: Login Endpoint • X SP
|
|
363
|
+
|
|
364
|
+
{{TASKS}}
|
|
365
|
+
|
|
366
|
+
## Dependency Graph
|
|
367
|
+
|
|
368
|
+
```mermaid
|
|
369
|
+
graph TD
|
|
370
|
+
EP000[Foundation] --> EP001[Auth]
|
|
371
|
+
EP000 --> EP002[Users]
|
|
372
|
+
EP001 --> EP003[Products]
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## Production Checklist
|
|
376
|
+
|
|
377
|
+
- [ ] All migrations tested
|
|
378
|
+
- [ ] Test coverage >= 80%
|
|
379
|
+
- [ ] API documentation complete
|
|
380
|
+
- [ ] Security requirements verified
|
|
381
|
+
- [ ] CI/CD pipeline working
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Validation Checklist
|
|
387
|
+
|
|
388
|
+
Before completing Phase 9:
|
|
389
|
+
|
|
390
|
+
- [ ] Context variables extracted from ai-instructions.md
|
|
391
|
+
- [ ] All file paths use {{VARIABLE}} format (no hardcoded .ts, .py, etc.)
|
|
392
|
+
- [ ] Every entity has [E], [R], [S], [T], [D] tasks
|
|
393
|
+
- [ ] Every endpoint has [C] or [S], [T], [D] tasks
|
|
394
|
+
- [ ] All tasks use exact format: `TXXX [CAT] Desc • N SP → {{path}} | deps: X`
|
|
395
|
+
- [ ] No task exceeds 2 SP
|
|
396
|
+
- [ ] Coverage matrix shows no gaps
|
|
397
|
+
- [ ] Task IDs are sequential (T001, T002, T003...)
|
|
398
|
+
- [ ] Dependencies form valid DAG (no cycles)
|
|
399
|
+
|
|
400
|
+
## DO NOT
|
|
401
|
+
|
|
402
|
+
- ❌ Hardcode file extensions (.ts, .py, .go, .java)
|
|
403
|
+
- ❌ Hardcode directory structures (src/entities/, app/models/)
|
|
404
|
+
- ❌ Assume specific architecture patterns
|
|
405
|
+
- ❌ Use language-specific naming conventions (IRepository, _private)
|
|
406
|
+
- ❌ Create tasks > 2 SP
|
|
407
|
+
- ❌ Skip coverage matrix validation
|
|
408
|
+
- ❌ Leave entities without tests
|
|
409
|
+
|
|
410
|
+
## Summary
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
PHASE 9 COMPLETE
|
|
414
|
+
├── Stack: {{LANGUAGE}} / {{FRAMEWORK}}
|
|
415
|
+
├── Epics: X
|
|
416
|
+
├── Features: X
|
|
417
|
+
├── Tasks: X
|
|
418
|
+
├── Story Points: X SP
|
|
419
|
+
├── Coverage: 100% (all components have [E][R][S][C][T][D])
|
|
420
|
+
└── Ready for: /flow-dev-feature
|
|
421
|
+
|
|
422
|
+
Next: Open planning/roadmap.md and start with EP-000, or continue to Phase 10 for detailed User Stories.
|
|
423
|
+
|
|
424
|
+
**OFFER PHASE 10:**
|
|
425
|
+
|
|
426
|
+
```
|
|
427
|
+
---
|
|
428
|
+
✅ PHASE 9 COMPLETE: IMPLEMENTATION ROADMAP GENERATED
|
|
429
|
+
---
|
|
430
|
+
🎯 Roadmap created in planning/roadmap.md
|
|
431
|
+
📊 Total Story Points: {{SP}}
|
|
432
|
+
🏗️ Epics defined: {{EPICS_COUNT}}
|
|
433
|
+
---
|
|
434
|
+
🚀 Optional: Generate Detailed User Stories?
|
|
435
|
+
---
|
|
436
|
+
Phase 10 will convert your roadmap features into detailed User Stories with:
|
|
437
|
+
|
|
438
|
+
✅ Gherkin-style Acceptance Criteria (Given/When/Then)
|
|
439
|
+
✅ Functional, Error, Edge, and Security scenarios
|
|
440
|
+
✅ Technical details inherited from patterns
|
|
441
|
+
✅ Ready-to-use QA Test Cases with data
|
|
442
|
+
✅ Definition of Done (DoD) checklist
|
|
443
|
+
|
|
444
|
+
⏱️ Estimated time: 30-60 minutes
|
|
445
|
+
|
|
446
|
+
Would you like to continue to Phase 10?
|
|
447
|
+
|
|
448
|
+
A) ✅ Yes, generate User Stories now (recommended)
|
|
449
|
+
→ Best for Sprint planning and QA alignment
|
|
450
|
+
→ Will generate {{FEATURES_COUNT}} User Stories
|
|
451
|
+
|
|
452
|
+
B) ⏭️ Skip for now (you can run Phase 10 later)
|
|
453
|
+
→ You can start coding directly from roadmap
|
|
454
|
+
→ Run Phase 10 anytime: /flow-build fase 10
|
|
455
|
+
|
|
456
|
+
Your choice (A/B): __
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## 📝 Generated Documents
|
|
462
|
+
|
|
463
|
+
After Phase 9, generate/update:
|
|
464
|
+
|
|
465
|
+
- `planning/roadmap.md` - Technical implementation plan
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
**Next Phase:** Phase 10 - Agile Planning (User Stories)
|
|
470
|
+
|
|
471
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-10.md`
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
**Last Updated:** 2025-12-20
|
|
476
|
+
**Version:** 2.1.8
|
|
477
|
+
|