ai-flow-dev 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +408 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +791 -0
- package/dist/cli.js.map +1 -0
- package/dist/fs-utils.d.ts +2 -0
- package/dist/fs-utils.d.ts.map +1 -0
- package/dist/fs-utils.js +46 -0
- package/dist/fs-utils.js.map +1 -0
- package/package.json +71 -0
- package/prompts/backend/flow-dev-feature.md +1318 -0
- package/prompts/backend/flow-dev-fix.md +903 -0
- package/prompts/backend/flow-dev-refactor.md +715 -0
- package/prompts/backend/flow-dev-review.md +401 -0
- package/prompts/backend/flow-dev-work.md +1129 -0
- package/prompts/backend/flow-docs-gen-phase-0.md +1840 -0
- package/prompts/backend/flow-docs-gen-phase-1.md +435 -0
- package/prompts/backend/flow-docs-gen-phase-2.md +460 -0
- package/prompts/backend/flow-docs-gen-phase-3.md +684 -0
- package/prompts/backend/flow-docs-gen-phase-4.md +516 -0
- package/prompts/backend/flow-docs-gen-phase-5.md +637 -0
- package/prompts/backend/flow-docs-gen-phase-6.md +465 -0
- package/prompts/backend/flow-docs-gen-phase-7.md +1207 -0
- package/prompts/backend/flow-docs-gen.md +820 -0
- package/prompts/backend/flow-docs-sync.md +526 -0
- package/prompts/backend/flow-project-init.md +248 -0
- package/prompts/backend/flow-project-roadmap.md +1159 -0
- package/prompts/frontend/flow-docs-gen-phase-0.md +494 -0
- package/prompts/frontend/flow-docs-gen-phase-1.md +449 -0
- package/prompts/frontend/flow-docs-gen-phase-2.md +983 -0
- package/prompts/frontend/flow-docs-gen-phase-3.md +685 -0
- package/prompts/frontend/flow-docs-gen-phase-4.md +480 -0
- package/prompts/frontend/flow-docs-gen-phase-5.md +483 -0
- package/prompts/frontend/flow-docs-gen-phase-6.md +570 -0
- package/prompts/frontend/flow-docs-gen-phase-7.md +582 -0
- package/prompts/frontend/flow-docs-gen.md +413 -0
- package/prompts/frontend/flow-docs-sync.md +561 -0
- package/prompts/mobile/flow-docs-gen-phase-0.md +387 -0
- package/prompts/mobile/flow-docs-gen-phase-1.md +530 -0
- package/prompts/mobile/flow-docs-gen-phase-2.md +584 -0
- package/prompts/mobile/flow-docs-gen-phase-3.md +659 -0
- package/prompts/mobile/flow-docs-gen-phase-4.md +363 -0
- package/prompts/mobile/flow-docs-gen-phase-5.md +369 -0
- package/prompts/mobile/flow-docs-gen-phase-6.md +490 -0
- package/prompts/mobile/flow-docs-gen-phase-7.md +407 -0
- package/prompts/mobile/flow-docs-gen.md +430 -0
- package/prompts/mobile/flow-docs-sync.md +634 -0
- package/templates/backend/.clauderules.template +111 -0
- package/templates/backend/.cursorrules.template +102 -0
- package/templates/backend/.env.example.template +122 -0
- package/templates/backend/README.template.md +200 -0
- package/templates/backend/ai-instructions.template.md +354 -0
- package/templates/backend/copilot-instructions.template.md +160 -0
- package/templates/backend/docs/api.template.md +251 -0
- package/templates/backend/docs/architecture.template.md +612 -0
- package/templates/backend/docs/business-flows.template.md +109 -0
- package/templates/backend/docs/code-standards.template.md +828 -0
- package/templates/backend/docs/contributing.template.md +163 -0
- package/templates/backend/docs/data-model.template.md +416 -0
- package/templates/backend/docs/operations.template.md +591 -0
- package/templates/backend/docs/testing.template.md +762 -0
- package/templates/backend/project-brief.template.md +176 -0
- package/templates/backend/specs/configuration.template.md +133 -0
- package/templates/backend/specs/security.template.md +422 -0
- package/templates/frontend/README.template.md +121 -0
- package/templates/frontend/ai-instructions.template.md +368 -0
- package/templates/frontend/docs/api-integration.template.md +390 -0
- package/templates/frontend/docs/components.template.md +567 -0
- package/templates/frontend/docs/error-handling.template.md +385 -0
- package/templates/frontend/docs/operations.template.md +123 -0
- package/templates/frontend/docs/performance.template.md +140 -0
- package/templates/frontend/docs/pwa.template.md +135 -0
- package/templates/frontend/docs/state-management.template.md +394 -0
- package/templates/frontend/docs/styling.template.md +779 -0
- package/templates/frontend/docs/testing.template.md +736 -0
- package/templates/frontend/project-brief.template.md +55 -0
- package/templates/frontend/specs/accessibility.template.md +111 -0
- package/templates/frontend/specs/configuration.template.md +520 -0
- package/templates/frontend/specs/security.template.md +197 -0
- package/templates/fullstack/README.template.md +282 -0
- package/templates/fullstack/ai-instructions.template.md +487 -0
- package/templates/fullstack/project-brief.template.md +197 -0
- package/templates/fullstack/specs/configuration.template.md +380 -0
- package/templates/mobile/AGENT.template.md +251 -0
- package/templates/mobile/README.template.md +195 -0
- package/templates/mobile/ai-instructions.template.md +221 -0
- package/templates/mobile/docs/app-store.template.md +163 -0
- package/templates/mobile/docs/architecture.template.md +100 -0
- package/templates/mobile/docs/native-features.template.md +137 -0
- package/templates/mobile/docs/navigation.template.md +81 -0
- package/templates/mobile/docs/offline-strategy.template.md +90 -0
- package/templates/mobile/docs/permissions.template.md +70 -0
- package/templates/mobile/docs/state-management.template.md +116 -0
- package/templates/mobile/docs/testing.template.md +146 -0
- package/templates/mobile/project-brief.template.md +97 -0
- package/templates/mobile/specs/build-configuration.template.md +116 -0
- package/templates/mobile/specs/deployment.template.md +114 -0
- package/templates/shared/AGENT.template.md +252 -0
|
@@ -0,0 +1,1159 @@
|
|
|
1
|
+
# AI Flow - Project Roadmap Generator
|
|
2
|
+
|
|
3
|
+
**YOU ARE AN EXPERT PROJECT MANAGER AND TECHNICAL ARCHITECT.**
|
|
4
|
+
|
|
5
|
+
Your mission is to analyze the complete project documentation and generate a detailed implementation roadmap with Story Point estimations when the user executes `/flow-project-roadmap`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Command: `/flow-project-roadmap`
|
|
10
|
+
|
|
11
|
+
### Objective
|
|
12
|
+
|
|
13
|
+
Generate a complete, prioritized implementation roadmap with Fibonacci-based Story Point estimations, organized into Epics, Features, and Tasks following GitHub Projects format.
|
|
14
|
+
|
|
15
|
+
### Prerequisites
|
|
16
|
+
|
|
17
|
+
Before executing this command, ensure:
|
|
18
|
+
|
|
19
|
+
- ✅ `/flow-docs-gen` completed (documentation generated)
|
|
20
|
+
- ✅ `/flow-project-init` completed (project initialized with framework)
|
|
21
|
+
- ✅ All documentation files exist in `.ai-flow/templates/`
|
|
22
|
+
|
|
23
|
+
### Duration
|
|
24
|
+
|
|
25
|
+
⏱️ **Estimated Time:** 15-30 minutes
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Workflow: 5 Phases
|
|
30
|
+
|
|
31
|
+
### Phase 1: Documentation Analysis (5-8 minutes - automatic)
|
|
32
|
+
|
|
33
|
+
**Read and analyze all generated documentation:**
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
37
|
+
📊 Analyzing Project Documentation
|
|
38
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
+
|
|
40
|
+
Phase 1/5: Reading documentation files...
|
|
41
|
+
|
|
42
|
+
✅ project-brief.md (business objectives, scope, constraints)
|
|
43
|
+
✅ ai-instructions.md (tech stack, framework, ORM)
|
|
44
|
+
✅ docs/architecture.md (system design, patterns, components)
|
|
45
|
+
✅ docs/data-model.md (entities, relationships, migrations)
|
|
46
|
+
✅ docs/api.md (endpoints, request/response formats)
|
|
47
|
+
✅ docs/business-flows.md (user journeys, workflows)
|
|
48
|
+
✅ docs/code-standards.md (naming, organization, patterns)
|
|
49
|
+
✅ docs/testing.md (test strategy, coverage targets)
|
|
50
|
+
✅ docs/operations.md (deployment, monitoring, CI/CD)
|
|
51
|
+
✅ specs/security.md (authentication, authorization, compliance)
|
|
52
|
+
✅ specs/configuration.md (environment variables, integrations)
|
|
53
|
+
|
|
54
|
+
Extracting key information...
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Extract structured data:**
|
|
58
|
+
|
|
59
|
+
1. **Business Context** (from `project-brief.md`):
|
|
60
|
+
|
|
61
|
+
- Primary objectives
|
|
62
|
+
- Target users
|
|
63
|
+
- Success metrics
|
|
64
|
+
- Constraints
|
|
65
|
+
- Timeline (if specified)
|
|
66
|
+
|
|
67
|
+
2. **Technical Stack** (from `ai-instructions.md`):
|
|
68
|
+
|
|
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
|
+
|
|
76
|
+
- Architecture pattern (Clean, Hexagonal, Layered, MVC)
|
|
77
|
+
- Layers/modules structure
|
|
78
|
+
- Integration points
|
|
79
|
+
- External services
|
|
80
|
+
|
|
81
|
+
4. **Data Model** (from `docs/data-model.md`):
|
|
82
|
+
|
|
83
|
+
- All entities/models
|
|
84
|
+
- Relationships (1:1, 1:N, N:M)
|
|
85
|
+
- Key fields per entity
|
|
86
|
+
- Validation rules
|
|
87
|
+
|
|
88
|
+
5. **API Endpoints** (from `docs/api.md`):
|
|
89
|
+
|
|
90
|
+
- All routes
|
|
91
|
+
- HTTP methods
|
|
92
|
+
- Authentication requirements
|
|
93
|
+
- Request/response schemas
|
|
94
|
+
|
|
95
|
+
6. **Business Flows** (from `docs/business-flows.md`):
|
|
96
|
+
|
|
97
|
+
- User journeys
|
|
98
|
+
- Critical workflows
|
|
99
|
+
- State transitions
|
|
100
|
+
|
|
101
|
+
7. **Security Requirements** (from `specs/security.md`):
|
|
102
|
+
|
|
103
|
+
- Authentication method
|
|
104
|
+
- Authorization strategy (RBAC, ABAC, etc.)
|
|
105
|
+
- Compliance requirements
|
|
106
|
+
- Security features
|
|
107
|
+
|
|
108
|
+
8. **Testing Strategy** (from `docs/testing.md`):
|
|
109
|
+
|
|
110
|
+
- Unit test coverage target
|
|
111
|
+
- Integration test scope
|
|
112
|
+
- E2E test scenarios
|
|
113
|
+
- Performance tests
|
|
114
|
+
|
|
115
|
+
9. **Operations** (from `docs/operations.md`):
|
|
116
|
+
- Deployment platform
|
|
117
|
+
- Monitoring tools
|
|
118
|
+
- Logging strategy
|
|
119
|
+
- Backup strategy
|
|
120
|
+
|
|
121
|
+
**Progress indicator:**
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
125
|
+
📈 Analysis Results
|
|
126
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
127
|
+
|
|
128
|
+
🎯 Business Scope:
|
|
129
|
+
• {{BUSINESS_OBJECTIVES_COUNT}} primary objectives
|
|
130
|
+
• {{USER_TYPES_COUNT}} user types
|
|
131
|
+
• {{CONSTRAINTS_COUNT}} constraints
|
|
132
|
+
|
|
133
|
+
🏗️ Technical Scope:
|
|
134
|
+
• {{ENTITIES_COUNT}} database entities
|
|
135
|
+
• {{ENDPOINTS_COUNT}} API endpoints
|
|
136
|
+
• {{BUSINESS_FLOWS_COUNT}} business flows
|
|
137
|
+
• {{INTEGRATIONS_COUNT}} external integrations
|
|
138
|
+
|
|
139
|
+
🔐 Security Scope:
|
|
140
|
+
• Authentication: {{AUTH_METHOD}}
|
|
141
|
+
• Authorization: {{AUTHZ_METHOD}}
|
|
142
|
+
• Compliance: {{COMPLIANCE_REQUIREMENTS}}
|
|
143
|
+
|
|
144
|
+
🧪 Testing Scope:
|
|
145
|
+
• Coverage target: {{COVERAGE_TARGET}}%
|
|
146
|
+
• Test types: Unit, Integration, E2E
|
|
147
|
+
• {{ESTIMATED_TEST_COUNT}} tests estimated
|
|
148
|
+
|
|
149
|
+
Proceeding to roadmap generation...
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### Phase 2: Epic Definition (3-5 minutes - automatic)
|
|
155
|
+
|
|
156
|
+
**Organize functionality into high-level Epics following industry standard patterns:**
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
160
|
+
🎯 Phase 2/5: Defining Epics
|
|
161
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Standard Epic Structure (adaptable based on project type):**
|
|
165
|
+
|
|
166
|
+
1. **Foundation Epic** (Infrastructure, core setup)
|
|
167
|
+
2. **Data Layer Epic** (Entities, repositories, migrations)
|
|
168
|
+
3. **Authentication & Authorization Epic** (Security layer)
|
|
169
|
+
4. **Core Business Features Epic(s)** (Main functionality by domain)
|
|
170
|
+
5. **Integration Epic** (External services, APIs)
|
|
171
|
+
6. **Testing & Quality Epic** (Comprehensive test coverage)
|
|
172
|
+
7. **Operations & Deployment Epic** (CI/CD, monitoring, docs)
|
|
173
|
+
|
|
174
|
+
**Epic Definition Logic:**
|
|
175
|
+
|
|
176
|
+
**Epic 1: Foundation • {{FOUNDATION_SP}} SP**
|
|
177
|
+
|
|
178
|
+
- Always first priority
|
|
179
|
+
- Includes: Base configuration, error handling, logging, validation utils
|
|
180
|
+
- Estimated based on framework complexity
|
|
181
|
+
|
|
182
|
+
**Epic 2: Data Layer • {{DATA_LAYER_SP}} SP**
|
|
183
|
+
|
|
184
|
+
- Priority: P0 (blocking all other features)
|
|
185
|
+
- Includes: All entities from `docs/data-model.md`, repositories, migrations
|
|
186
|
+
- Estimated: 3-5 SP per entity (simple) to 8-13 SP (complex with relationships)
|
|
187
|
+
|
|
188
|
+
**Epic 3: Authentication & Authorization • {{AUTH_SP}} SP**
|
|
189
|
+
|
|
190
|
+
- Priority: P0 (required for protected endpoints)
|
|
191
|
+
- Includes: Auth implementation from `specs/security.md`
|
|
192
|
+
- Estimated: 8 SP (basic JWT) to 21 SP (multi-provider + RBAC + 2FA)
|
|
193
|
+
|
|
194
|
+
**Epic 4-N: Business Features**
|
|
195
|
+
|
|
196
|
+
- Grouped by domain/module from `docs/api.md` and `docs/business-flows.md`
|
|
197
|
+
- Priority: P0 (MVP), P1 (High), P2 (Medium), P3 (Nice-to-have)
|
|
198
|
+
- Each business epic includes: endpoints + business logic + tests
|
|
199
|
+
|
|
200
|
+
**Epic N-1: Integration • {{INTEGRATION_SP}} SP**
|
|
201
|
+
|
|
202
|
+
- Priority: P1-P2 (depends on external dependencies)
|
|
203
|
+
- Includes: All external services from `specs/configuration.md`
|
|
204
|
+
- Estimated: 5-8 SP per integration
|
|
205
|
+
|
|
206
|
+
**Epic N: Operations & Deployment • {{OPS_SP}} SP**
|
|
207
|
+
|
|
208
|
+
- Priority: P1 (production readiness)
|
|
209
|
+
- Includes: Final CI/CD polish, monitoring, documentation finalization
|
|
210
|
+
|
|
211
|
+
**Example output:**
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Epics identified:
|
|
215
|
+
|
|
216
|
+
## 🏗️ Epic 1: Foundation & Infrastructure • 21 SP
|
|
217
|
+
Priority: P0 | Est. Time: ~2 weeks
|
|
218
|
+
- Base application setup, core utilities, error handling, logging
|
|
219
|
+
|
|
220
|
+
## 💾 Epic 2: Data Layer • 34 SP
|
|
221
|
+
Priority: P0 | Est. Time: ~3 weeks
|
|
222
|
+
- 7 entities, repositories, migrations, seeding
|
|
223
|
+
|
|
224
|
+
## 🔐 Epic 3: Authentication & Authorization • 21 SP
|
|
225
|
+
Priority: P0 | Est. Time: ~2 weeks
|
|
226
|
+
- JWT authentication, RBAC, password reset, 2FA
|
|
227
|
+
|
|
228
|
+
## 👤 Epic 4: User Management • 13 SP
|
|
229
|
+
Priority: P0 | Est. Time: ~1 week
|
|
230
|
+
- User CRUD, profile management, preferences
|
|
231
|
+
|
|
232
|
+
## 🛒 Epic 5: Product Catalog • 21 SP
|
|
233
|
+
Priority: P0 | Est. Time: ~2 weeks
|
|
234
|
+
- Products, categories, search, filters, inventory
|
|
235
|
+
|
|
236
|
+
## 🛍️ Epic 6: Order Management • 34 SP
|
|
237
|
+
Priority: P1 | Est. Time: ~3 weeks
|
|
238
|
+
- Shopping cart, checkout, orders, order tracking
|
|
239
|
+
|
|
240
|
+
## 💳 Epic 7: Payment Processing • 21 SP
|
|
241
|
+
Priority: P1 | Est. Time: ~2 weeks
|
|
242
|
+
- Stripe integration, webhooks, refunds
|
|
243
|
+
|
|
244
|
+
## 📧 Epic 8: Notifications • 13 SP
|
|
245
|
+
Priority: P2 | Est. Time: ~1 week
|
|
246
|
+
- Email notifications, push notifications, preferences
|
|
247
|
+
|
|
248
|
+
## 📊 Epic 9: Analytics & Reporting • 13 SP
|
|
249
|
+
Priority: P2 | Est. Time: ~1 week
|
|
250
|
+
- Admin dashboard, sales reports, user analytics
|
|
251
|
+
|
|
252
|
+
## 🔧 Epic 10: Operations & Deployment • 13 SP
|
|
253
|
+
Priority: P1 | Est. Time: ~1 week
|
|
254
|
+
- CI/CD finalization, monitoring, logging, backups
|
|
255
|
+
|
|
256
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
257
|
+
📊 Total: 204 SP (~20 weeks with 1 developer, ~10 weeks with 2)
|
|
258
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
### Phase 3: Feature Breakdown (5-10 minutes - automatic)
|
|
264
|
+
|
|
265
|
+
**Break down each Epic into Features (GitHub-style):**
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
269
|
+
🔨 Phase 3/5: Breaking Down Features
|
|
270
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**Feature Definition Logic:**
|
|
274
|
+
|
|
275
|
+
For each Epic, analyze:
|
|
276
|
+
|
|
277
|
+
- What endpoints belong to this Epic? (from `docs/api.md`)
|
|
278
|
+
- What entities are involved? (from `docs/data-model.md`)
|
|
279
|
+
- What business flows? (from `docs/business-flows.md`)
|
|
280
|
+
- What tests are needed? (from `docs/testing.md`)
|
|
281
|
+
|
|
282
|
+
**Feature Estimation (Fibonacci Scale):**
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
Story Points | Complexity | Typical Time | Examples
|
|
286
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
287
|
+
1 SP | Trivial | 1-2 hours | Add simple field, update enum
|
|
288
|
+
2 SP | Very Small | 2-4 hours | Simple validation, basic test
|
|
289
|
+
3 SP | Small | 4-8 hours | Simple CRUD endpoint, entity
|
|
290
|
+
5 SP | Medium | 1-2 days | Complex endpoint with logic
|
|
291
|
+
8 SP | Complex | 2-3 days | Auth flow, complex business rule
|
|
292
|
+
13 SP | Large | 1 week | Complete module with tests
|
|
293
|
+
21 SP | Very Large | 2 weeks | Major feature, integration
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Feature Template:**
|
|
297
|
+
|
|
298
|
+
```markdown
|
|
299
|
+
### Feature: {{FEATURE_NAME}} • {{SP}} SP
|
|
300
|
+
|
|
301
|
+
⏱️ **Est. Time:** {{TIME_RANGE}}
|
|
302
|
+
🎯 **Priority:** {{PRIORITY}}
|
|
303
|
+
📋 **Dependencies:** {{DEPENDENCIES}}
|
|
304
|
+
|
|
305
|
+
**Scope:**
|
|
306
|
+
|
|
307
|
+
- {{ENDPOINT_1}} ({{METHOD}})
|
|
308
|
+
- {{ENDPOINT_2}} ({{METHOD}})
|
|
309
|
+
- Entity: {{ENTITY_NAME}}
|
|
310
|
+
- Tests: {{TEST_COUNT}} ({{TEST_TYPES}})
|
|
311
|
+
|
|
312
|
+
**Tasks:**
|
|
313
|
+
|
|
314
|
+
- [ ] Create {{ENTITY}} entity with validation
|
|
315
|
+
- [ ] Create {{REPOSITORY}} repository
|
|
316
|
+
- [ ] Implement {{SERVICE}} service
|
|
317
|
+
- [ ] Create {{CONTROLLER}} controller
|
|
318
|
+
- [ ] Add {{ENDPOINT_1}} endpoint
|
|
319
|
+
- [ ] Add {{ENDPOINT_2}} endpoint
|
|
320
|
+
- [ ] Write unit tests for service ({{COUNT}} tests)
|
|
321
|
+
- [ ] Write integration tests for endpoints ({{COUNT}} tests)
|
|
322
|
+
- [ ] Update API documentation
|
|
323
|
+
- [ ] Update data model documentation
|
|
324
|
+
|
|
325
|
+
**Acceptance Criteria:**
|
|
326
|
+
|
|
327
|
+
- [ ] All endpoints return correct responses
|
|
328
|
+
- [ ] {{VALIDATION_RULES}} are enforced
|
|
329
|
+
- [ ] Test coverage ≥ {{COVERAGE_TARGET}}%
|
|
330
|
+
- [ ] API documentation is updated
|
|
331
|
+
- [ ] Code passes linting and type-check
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Example breakdown for Epic 2 (Data Layer):**
|
|
335
|
+
|
|
336
|
+
```markdown
|
|
337
|
+
## 💾 Epic 2: Data Layer • 34 SP
|
|
338
|
+
|
|
339
|
+
⏱️ **Est. Time:** ~3 weeks
|
|
340
|
+
🎯 **Priority:** P0 (Blocks all features)
|
|
341
|
+
|
|
342
|
+
### Feature 2.1: User Entity & Repository • 5 SP
|
|
343
|
+
|
|
344
|
+
⏱️ **Est. Time:** 1-2 days
|
|
345
|
+
🎯 **Priority:** P0
|
|
346
|
+
📋 **Dependencies:** None
|
|
347
|
+
|
|
348
|
+
**Scope:**
|
|
349
|
+
|
|
350
|
+
- Entity: User (id, email, username, passwordHash, role, createdAt, updatedAt)
|
|
351
|
+
- Repository: IUserRepository with CRUD operations
|
|
352
|
+
- Validation: Email format, username constraints, password strength
|
|
353
|
+
- Tests: 8 unit tests, 4 integration tests
|
|
354
|
+
|
|
355
|
+
**Tasks:**
|
|
356
|
+
|
|
357
|
+
- [ ] Create User entity with field validation
|
|
358
|
+
- [ ] Create IUserRepository interface
|
|
359
|
+
- [ ] Implement UserRepository (Prisma/TypeORM/etc.)
|
|
360
|
+
- [ ] Add database migration for users table
|
|
361
|
+
- [ ] Add indexes (email unique, username unique)
|
|
362
|
+
- [ ] Write unit tests for User entity validation (8 tests)
|
|
363
|
+
- [ ] Write integration tests for UserRepository (4 tests)
|
|
364
|
+
- [ ] Update docs/data-model.md
|
|
365
|
+
|
|
366
|
+
**Acceptance Criteria:**
|
|
367
|
+
|
|
368
|
+
- [ ] User entity validates email format
|
|
369
|
+
- [ ] Password is hashed before storage
|
|
370
|
+
- [ ] Repository handles all CRUD operations
|
|
371
|
+
- [ ] Migration creates table with correct schema
|
|
372
|
+
- [ ] Test coverage ≥ 80%
|
|
373
|
+
- [ ] No TypeScript errors
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
### Feature 2.2: Product Entity & Repository • 8 SP
|
|
378
|
+
|
|
379
|
+
⏱️ **Est. Time:** 2-3 days
|
|
380
|
+
🎯 **Priority:** P0
|
|
381
|
+
📋 **Dependencies:** Feature 2.4 (Category entity)
|
|
382
|
+
|
|
383
|
+
**Scope:**
|
|
384
|
+
|
|
385
|
+
- Entity: Product (id, name, description, price, stock, categoryId, images, createdAt, updatedAt)
|
|
386
|
+
- Repository: IProductRepository with CRUD + search
|
|
387
|
+
- Validation: Price > 0, stock ≥ 0, name required
|
|
388
|
+
- Relationships: belongsTo Category
|
|
389
|
+
- Tests: 12 unit tests, 6 integration tests
|
|
390
|
+
|
|
391
|
+
**Tasks:**
|
|
392
|
+
|
|
393
|
+
- [ ] Create Product entity with validation
|
|
394
|
+
- [ ] Add relationship to Category (FK constraint)
|
|
395
|
+
- [ ] Create IProductRepository interface
|
|
396
|
+
- [ ] Implement ProductRepository with search/filter methods
|
|
397
|
+
- [ ] Add database migration for products table
|
|
398
|
+
- [ ] Add indexes (categoryId, name for search)
|
|
399
|
+
- [ ] Implement inventory tracking logic
|
|
400
|
+
- [ ] Write unit tests for Product entity (12 tests)
|
|
401
|
+
- [ ] Write integration tests for ProductRepository (6 tests)
|
|
402
|
+
- [ ] Write tests for search/filter functionality (4 tests)
|
|
403
|
+
- [ ] Update docs/data-model.md
|
|
404
|
+
|
|
405
|
+
**Acceptance Criteria:**
|
|
406
|
+
|
|
407
|
+
- [ ] Product validates price and stock constraints
|
|
408
|
+
- [ ] Search by name works (case-insensitive)
|
|
409
|
+
- [ ] Filter by category works
|
|
410
|
+
- [ ] Inventory decrements correctly
|
|
411
|
+
- [ ] Migration includes FK constraint to categories
|
|
412
|
+
- [ ] Test coverage ≥ 80%
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
### Feature 2.3: Order Entity & Repository • 8 SP
|
|
417
|
+
|
|
418
|
+
⏱️ **Est. Time:** 2-3 days
|
|
419
|
+
🎯 **Priority:** P0
|
|
420
|
+
📋 **Dependencies:** Feature 2.1 (User), Feature 2.2 (Product)
|
|
421
|
+
|
|
422
|
+
**Scope:**
|
|
423
|
+
|
|
424
|
+
- Entity: Order (id, userId, status, totalAmount, items, createdAt, updatedAt)
|
|
425
|
+
- Entity: OrderItem (id, orderId, productId, quantity, price)
|
|
426
|
+
- Repository: IOrderRepository with complex queries
|
|
427
|
+
- Validation: Status transitions, amount calculation
|
|
428
|
+
- Relationships: belongsTo User, hasMany OrderItems
|
|
429
|
+
- Tests: 15 unit tests, 8 integration tests
|
|
430
|
+
|
|
431
|
+
**Tasks:**
|
|
432
|
+
|
|
433
|
+
- [ ] Create Order entity with status enum
|
|
434
|
+
- [ ] Create OrderItem entity
|
|
435
|
+
- [ ] Implement order total calculation logic
|
|
436
|
+
- [ ] Implement status transition validation (pending → paid → shipped → delivered)
|
|
437
|
+
- [ ] Create IOrderRepository interface
|
|
438
|
+
- [ ] Implement OrderRepository with aggregations
|
|
439
|
+
- [ ] Add database migrations (orders + order_items tables)
|
|
440
|
+
- [ ] Add indexes (userId, status, createdAt)
|
|
441
|
+
- [ ] Add FK constraints (userId → users, productId → products)
|
|
442
|
+
- [ ] Write unit tests for Order entity (10 tests)
|
|
443
|
+
- [ ] Write unit tests for OrderItem entity (5 tests)
|
|
444
|
+
- [ ] Write integration tests for OrderRepository (8 tests)
|
|
445
|
+
- [ ] Update docs/data-model.md
|
|
446
|
+
|
|
447
|
+
**Acceptance Criteria:**
|
|
448
|
+
|
|
449
|
+
- [ ] Order calculates total correctly
|
|
450
|
+
- [ ] Invalid status transitions are rejected
|
|
451
|
+
- [ ] Repository can query orders by user, status, date range
|
|
452
|
+
- [ ] OrderItems correctly reference products
|
|
453
|
+
- [ ] Test coverage ≥ 80%
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
[Continue for all 7 entities...]
|
|
458
|
+
|
|
459
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
460
|
+
📊 Epic 2 Summary: 7 features, 34 SP total
|
|
461
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
### Phase 4: Dependency Graph & Execution Order (2-3 minutes - automatic)
|
|
467
|
+
|
|
468
|
+
**Generate dependency graph and determine optimal execution order:**
|
|
469
|
+
|
|
470
|
+
```
|
|
471
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
472
|
+
🔗 Phase 4/5: Analyzing Dependencies
|
|
473
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
**Dependency Analysis:**
|
|
477
|
+
|
|
478
|
+
1. **Entity Dependencies** (from `docs/data-model.md`):
|
|
479
|
+
|
|
480
|
+
- Entities with no foreign keys can be built first
|
|
481
|
+
- Entities with FKs depend on referenced entities
|
|
482
|
+
|
|
483
|
+
2. **Feature Dependencies** (logical):
|
|
484
|
+
|
|
485
|
+
- Authentication must complete before protected endpoints
|
|
486
|
+
- Data layer must complete before business logic
|
|
487
|
+
- Business logic must complete before integrations
|
|
488
|
+
|
|
489
|
+
3. **Parallelization Opportunities:**
|
|
490
|
+
- Independent entities can be built in parallel
|
|
491
|
+
- Independent epics (after foundation) can be worked simultaneously
|
|
492
|
+
|
|
493
|
+
**Generate Mermaid Dependency Graph:**
|
|
494
|
+
|
|
495
|
+
```mermaid
|
|
496
|
+
graph TD
|
|
497
|
+
E1[Epic 1: Foundation] --> E2[Epic 2: Data Layer]
|
|
498
|
+
E1 --> E3[Epic 3: Auth & Authorization]
|
|
499
|
+
|
|
500
|
+
E2 --> E4[Epic 4: User Management]
|
|
501
|
+
E3 --> E4
|
|
502
|
+
|
|
503
|
+
E2 --> E5[Epic 5: Product Catalog]
|
|
504
|
+
E2 --> E6[Epic 6: Order Management]
|
|
505
|
+
|
|
506
|
+
E4 --> E6
|
|
507
|
+
E5 --> E6
|
|
508
|
+
|
|
509
|
+
E6 --> E7[Epic 7: Payment Processing]
|
|
510
|
+
E3 --> E7
|
|
511
|
+
|
|
512
|
+
E4 --> E8[Epic 8: Notifications]
|
|
513
|
+
E6 --> E8
|
|
514
|
+
|
|
515
|
+
E7 --> E9[Epic 9: Analytics]
|
|
516
|
+
E6 --> E9
|
|
517
|
+
|
|
518
|
+
E1 --> E10[Epic 10: Operations]
|
|
519
|
+
E7 --> E10
|
|
520
|
+
E8 --> E10
|
|
521
|
+
E9 --> E10
|
|
522
|
+
|
|
523
|
+
style E1 fill:#ff6b6b
|
|
524
|
+
style E2 fill:#4ecdc4
|
|
525
|
+
style E3 fill:#ffe66d
|
|
526
|
+
style E4 fill:#a8e6cf
|
|
527
|
+
style E5 fill:#a8e6cf
|
|
528
|
+
style E6 fill:#ffd93d
|
|
529
|
+
style E7 fill:#ffd93d
|
|
530
|
+
style E8 fill:#c7ceea
|
|
531
|
+
style E9 fill:#c7ceea
|
|
532
|
+
style E10 fill:#95e1d3
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
**Execution Order Recommendation:**
|
|
536
|
+
|
|
537
|
+
```
|
|
538
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
539
|
+
📅 Recommended Execution Order
|
|
540
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
541
|
+
|
|
542
|
+
**Phase 1: Foundation (Weeks 1-2) • 21 SP**
|
|
543
|
+
├─ Epic 1: Foundation & Infrastructure
|
|
544
|
+
└─ Can start Epic 2 and Epic 3 in parallel after Foundation
|
|
545
|
+
|
|
546
|
+
**Phase 2: Core Layer (Weeks 3-5) • 55 SP**
|
|
547
|
+
├─ Epic 2: Data Layer (blocking) • 34 SP
|
|
548
|
+
└─ Epic 3: Authentication & Authorization (parallel) • 21 SP
|
|
549
|
+
|
|
550
|
+
**Phase 3: Core Features (Weeks 6-8) • 34 SP**
|
|
551
|
+
├─ Epic 4: User Management • 13 SP
|
|
552
|
+
└─ Epic 5: Product Catalog (parallel) • 21 SP
|
|
553
|
+
|
|
554
|
+
**Phase 4: Advanced Features (Weeks 9-12) • 55 SP**
|
|
555
|
+
├─ Epic 6: Order Management • 34 SP
|
|
556
|
+
└─ Epic 7: Payment Processing • 21 SP
|
|
557
|
+
|
|
558
|
+
**Phase 5: Secondary Features (Weeks 13-15) • 26 SP**
|
|
559
|
+
├─ Epic 8: Notifications (parallel) • 13 SP
|
|
560
|
+
└─ Epic 9: Analytics (parallel) • 13 SP
|
|
561
|
+
|
|
562
|
+
**Phase 6: Production Readiness (Weeks 16-17) • 13 SP**
|
|
563
|
+
└─ Epic 10: Operations & Deployment
|
|
564
|
+
|
|
565
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
566
|
+
⚡ Parallelization Opportunities:
|
|
567
|
+
• Week 3-5: Data Layer + Auth (2 devs)
|
|
568
|
+
• Week 6-8: User Mgmt + Product Catalog (2 devs)
|
|
569
|
+
• Week 13-15: Notifications + Analytics (2 devs)
|
|
570
|
+
|
|
571
|
+
With 2 developers: ~12 weeks (60% time savings)
|
|
572
|
+
With 3 developers: ~9 weeks (50% time savings)
|
|
573
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
### Phase 5: Generate Roadmap Document (2-5 minutes - automatic)
|
|
579
|
+
|
|
580
|
+
**Generate `.ai-flow/roadmap.md` with complete implementation plan:**
|
|
581
|
+
|
|
582
|
+
```
|
|
583
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
584
|
+
📝 Phase 5/5: Generating Roadmap Document
|
|
585
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
586
|
+
|
|
587
|
+
Writing to .ai-flow/roadmap.md...
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
**Roadmap Document Structure:**
|
|
591
|
+
|
|
592
|
+
````markdown
|
|
593
|
+
# 🗺️ Implementation Roadmap: {{PROJECT_NAME}}
|
|
594
|
+
|
|
595
|
+
> **Generated:** {{DATE}} > **Based on:** Documentation v1.0 (Bootstrap + Scaffold)
|
|
596
|
+
> **Total Estimated:** {{TOTAL_WEEKS}} weeks • {{TOTAL_SP}} SP
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
## 📊 Project Overview
|
|
601
|
+
|
|
602
|
+
**Problem:** {{PROBLEM_STATEMENT}}
|
|
603
|
+
|
|
604
|
+
**Objectives:**
|
|
605
|
+
{{#EACH BUSINESS_OBJECTIVE}}
|
|
606
|
+
|
|
607
|
+
- {{OBJECTIVE_TITLE}}: {{SUCCESS_METRIC}}
|
|
608
|
+
{{/EACH}}
|
|
609
|
+
|
|
610
|
+
**Tech Stack:**
|
|
611
|
+
|
|
612
|
+
- **Framework:** {{FRAMEWORK}} {{VERSION}}
|
|
613
|
+
- **Database:** {{DATABASE}} + {{ORM}}
|
|
614
|
+
- **Architecture:** {{ARCHITECTURE_PATTERN}}
|
|
615
|
+
- **Deployment:** {{DEPLOYMENT_PLATFORM}}
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
## 📈 Story Points Reference
|
|
620
|
+
|
|
621
|
+
Use this table to translate Story Points to time estimates:
|
|
622
|
+
|
|
623
|
+
| Story Points | Complexity | Typical Time | Description |
|
|
624
|
+
| ------------ | ---------- | ------------ | --------------------------------------------- |
|
|
625
|
+
| **1 SP** | Trivial | 1-2 hours | Simple config change, add enum value |
|
|
626
|
+
| **2 SP** | Very Small | 2-4 hours | Basic validation, simple test |
|
|
627
|
+
| **3 SP** | Small | 4-8 hours | Simple CRUD endpoint, basic entity |
|
|
628
|
+
| **5 SP** | Medium | 1-2 days | Complex endpoint with business logic |
|
|
629
|
+
| **8 SP** | Complex | 2-3 days | Auth flow, complex validation, multiple tests |
|
|
630
|
+
| **13 SP** | Large | 1 week | Complete module with full test coverage |
|
|
631
|
+
| **21 SP** | Very Large | 2 weeks | Major feature with integration |
|
|
632
|
+
| **34 SP** | Epic | 3 weeks | Multiple related features |
|
|
633
|
+
|
|
634
|
+
> **Note:** Times assume experienced developer with AI assistance (GitHub Copilot, Claude, etc.)
|
|
635
|
+
> Without AI assistance, multiply time estimates by 2-3x.
|
|
636
|
+
|
|
637
|
+
---
|
|
638
|
+
|
|
639
|
+
## 🎯 Epic Overview
|
|
640
|
+
|
|
641
|
+
{{EPIC_TABLE}}
|
|
642
|
+
|
|
643
|
+
**Total Estimated Development Time:**
|
|
644
|
+
|
|
645
|
+
- **1 Developer:** {{SOLO_WEEKS}} weeks ({{SOLO_MONTHS}} months)
|
|
646
|
+
- **2 Developers:** {{TWO_DEV_WEEKS}} weeks ({{TWO_DEV_MONTHS}} months)
|
|
647
|
+
- **3 Developers:** {{THREE_DEV_WEEKS}} weeks ({{THREE_DEV_MONTHS}} months)
|
|
648
|
+
|
|
649
|
+
---
|
|
650
|
+
|
|
651
|
+
## 🔗 Dependency Graph
|
|
652
|
+
|
|
653
|
+
```mermaid
|
|
654
|
+
{{DEPENDENCY_GRAPH}}
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
**Legend:**
|
|
658
|
+
|
|
659
|
+
- 🔴 **Critical Path** (blocking)
|
|
660
|
+
- 🟡 **High Priority** (core features)
|
|
661
|
+
- 🔵 **Medium Priority** (important)
|
|
662
|
+
- 🟢 **Low Priority** (nice-to-have)
|
|
663
|
+
- ⚪ **Operations** (ongoing)
|
|
664
|
+
|
|
665
|
+
---
|
|
666
|
+
|
|
667
|
+
## 📅 Implementation Phases
|
|
668
|
+
|
|
669
|
+
### Phase 1: Foundation (Weeks 1-2) • 21 SP
|
|
670
|
+
|
|
671
|
+
**Goal:** Setup core infrastructure and utilities
|
|
672
|
+
|
|
673
|
+
#### 🏗️ Epic 1: Foundation & Infrastructure • 21 SP
|
|
674
|
+
|
|
675
|
+
⏱️ **Est. Time:** 2 weeks • 🎯 **Priority:** P0 (Critical)
|
|
676
|
+
|
|
677
|
+
**Features:**
|
|
678
|
+
|
|
679
|
+
##### Feature 1.1: Base Application Configuration • 5 SP
|
|
680
|
+
|
|
681
|
+
⏱️ **Est. Time:** 1-2 days • 🎯 **Priority:** P0 • 📋 **Dependencies:** None
|
|
682
|
+
|
|
683
|
+
**Tasks:**
|
|
684
|
+
|
|
685
|
+
- [ ] Configure environment variables (`.env` structure)
|
|
686
|
+
- [ ] Setup configuration service/module
|
|
687
|
+
- [ ] Add validation for required env vars
|
|
688
|
+
- [ ] Create constants file for app-wide values
|
|
689
|
+
- [ ] Write unit tests for configuration service (5 tests)
|
|
690
|
+
- [ ] Document configuration in `specs/configuration.md`
|
|
691
|
+
|
|
692
|
+
**Acceptance Criteria:**
|
|
693
|
+
|
|
694
|
+
- [ ] App fails fast with clear error if required env var missing
|
|
695
|
+
- [ ] Configuration is type-safe (TypeScript interfaces)
|
|
696
|
+
- [ ] Test coverage ≥ 80%
|
|
697
|
+
|
|
698
|
+
**Ready-to-execute command:**
|
|
699
|
+
|
|
700
|
+
```bash
|
|
701
|
+
/feature new "Base application configuration with environment validation"
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
##### Feature 1.2: Logging & Monitoring Setup • 5 SP
|
|
707
|
+
|
|
708
|
+
⏱️ **Est. Time:** 1-2 days • 🎯 **Priority:** P0 • 📋 **Dependencies:** Feature 1.1
|
|
709
|
+
|
|
710
|
+
**Tasks:**
|
|
711
|
+
|
|
712
|
+
- [ ] Integrate logging library (Winston/Pino/similar)
|
|
713
|
+
- [ ] Configure log levels (debug, info, warn, error)
|
|
714
|
+
- [ ] Add structured logging (JSON format)
|
|
715
|
+
- [ ] Add request/response logging middleware
|
|
716
|
+
- [ ] Configure log rotation and retention
|
|
717
|
+
- [ ] Add correlation IDs for request tracking
|
|
718
|
+
- [ ] Write tests for logger utility (6 tests)
|
|
719
|
+
|
|
720
|
+
**Acceptance Criteria:**
|
|
721
|
+
|
|
722
|
+
- [ ] All logs include timestamp, level, correlation ID
|
|
723
|
+
- [ ] Sensitive data (passwords, tokens) is redacted
|
|
724
|
+
- [ ] Logs are written to files with rotation
|
|
725
|
+
|
|
726
|
+
**Ready-to-execute command:**
|
|
727
|
+
|
|
728
|
+
```bash
|
|
729
|
+
/feature new "Logging and monitoring infrastructure with correlation tracking"
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
---
|
|
733
|
+
|
|
734
|
+
[Continue for all features in Epic 1...]
|
|
735
|
+
|
|
736
|
+
---
|
|
737
|
+
|
|
738
|
+
### Phase 2: Core Layer (Weeks 3-5) • 55 SP
|
|
739
|
+
|
|
740
|
+
**Goal:** Build data layer and authentication
|
|
741
|
+
|
|
742
|
+
#### 💾 Epic 2: Data Layer • 34 SP
|
|
743
|
+
|
|
744
|
+
⏱️ **Est. Time:** 3 weeks • 🎯 **Priority:** P0 (Blocking)
|
|
745
|
+
|
|
746
|
+
[Continue with all features from Epic 2...]
|
|
747
|
+
|
|
748
|
+
---
|
|
749
|
+
|
|
750
|
+
#### 🔐 Epic 3: Authentication & Authorization • 21 SP
|
|
751
|
+
|
|
752
|
+
⏱️ **Est. Time:** 2 weeks • 🎯 **Priority:** P0 (Blocking)
|
|
753
|
+
|
|
754
|
+
**Can run in PARALLEL with Epic 2 (Data Layer)**
|
|
755
|
+
|
|
756
|
+
[Continue with all features from Epic 3...]
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
760
|
+
[Continue for all Epics and Phases...]
|
|
761
|
+
|
|
762
|
+
---
|
|
763
|
+
|
|
764
|
+
## ✅ Production Readiness Checklist
|
|
765
|
+
|
|
766
|
+
Before deploying to production, ensure all items are completed:
|
|
767
|
+
|
|
768
|
+
### Infrastructure
|
|
769
|
+
|
|
770
|
+
- [ ] All database migrations tested and documented
|
|
771
|
+
- [ ] Environment variables documented in `.env.example`
|
|
772
|
+
- [ ] Secrets rotated and stored securely (not in code)
|
|
773
|
+
- [ ] Docker images built and tagged
|
|
774
|
+
- [ ] CI/CD pipeline runs successfully
|
|
775
|
+
- [ ] Staging environment tested
|
|
776
|
+
|
|
777
|
+
### Security
|
|
778
|
+
|
|
779
|
+
- [ ] Authentication works correctly (JWT/OAuth/etc.)
|
|
780
|
+
- [ ] Authorization enforced on all protected endpoints
|
|
781
|
+
- [ ] RBAC roles tested (if applicable)
|
|
782
|
+
- [ ] Input validation on all endpoints
|
|
783
|
+
- [ ] SQL injection prevention verified
|
|
784
|
+
- [ ] XSS protection enabled
|
|
785
|
+
- [ ] CORS configured correctly
|
|
786
|
+
- [ ] Rate limiting implemented
|
|
787
|
+
- [ ] Security headers configured (helmet.js or similar)
|
|
788
|
+
- [ ] Compliance requirements met ({{COMPLIANCE}})
|
|
789
|
+
|
|
790
|
+
### Testing
|
|
791
|
+
|
|
792
|
+
- [ ] Unit test coverage ≥ {{COVERAGE_TARGET}}%
|
|
793
|
+
- [ ] Integration tests passing
|
|
794
|
+
- [ ] E2E tests covering critical flows
|
|
795
|
+
- [ ] Performance tests passed
|
|
796
|
+
- [ ] Load testing completed (if required)
|
|
797
|
+
- [ ] Security scan completed (OWASP ZAP/similar)
|
|
798
|
+
|
|
799
|
+
### Documentation
|
|
800
|
+
|
|
801
|
+
- [ ] API documentation up-to-date (Swagger/OpenAPI)
|
|
802
|
+
- [ ] README includes setup instructions
|
|
803
|
+
- [ ] Architecture diagrams current
|
|
804
|
+
- [ ] Deployment guide written
|
|
805
|
+
- [ ] Runbook for common issues
|
|
806
|
+
- [ ] Monitoring dashboard configured
|
|
807
|
+
|
|
808
|
+
### Monitoring & Operations
|
|
809
|
+
|
|
810
|
+
- [ ] Error tracking configured (Sentry/similar)
|
|
811
|
+
- [ ] Application metrics exposed (Prometheus/similar)
|
|
812
|
+
- [ ] Log aggregation configured (ELK/similar)
|
|
813
|
+
- [ ] Alerting rules defined
|
|
814
|
+
- [ ] Backup strategy implemented and tested
|
|
815
|
+
- [ ] Rollback procedure documented
|
|
816
|
+
- [ ] Health check endpoints working
|
|
817
|
+
- [ ] Database backup automated
|
|
818
|
+
|
|
819
|
+
### Performance
|
|
820
|
+
|
|
821
|
+
- [ ] Database indexes optimized
|
|
822
|
+
- [ ] N+1 queries eliminated
|
|
823
|
+
- [ ] Caching strategy implemented (if needed)
|
|
824
|
+
- [ ] API response times < {{RESPONSE_TIME_TARGET}}ms
|
|
825
|
+
- [ ] Static assets optimized and CDN configured
|
|
826
|
+
- [ ] Connection pooling configured
|
|
827
|
+
|
|
828
|
+
---
|
|
829
|
+
|
|
830
|
+
## 🚀 Getting Started
|
|
831
|
+
|
|
832
|
+
### Step 1: Review This Roadmap
|
|
833
|
+
|
|
834
|
+
- Understand the Epic structure and dependencies
|
|
835
|
+
- Identify which features are MVP vs nice-to-have
|
|
836
|
+
- Adjust priorities based on business needs
|
|
837
|
+
|
|
838
|
+
### Step 2: Setup Your Workflow
|
|
839
|
+
|
|
840
|
+
```bash
|
|
841
|
+
# Ensure you've run init
|
|
842
|
+
/flow-project-init
|
|
843
|
+
|
|
844
|
+
# Start with Phase 1, Epic 1, Feature 1.1
|
|
845
|
+
/feature new "Base application configuration with environment validation"
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
### Step 3: Follow the Execution Order
|
|
849
|
+
|
|
850
|
+
- Work through Epics sequentially (respecting dependencies)
|
|
851
|
+
- Within an Epic, work through Features in order
|
|
852
|
+
- Use `/feature` command for each Feature
|
|
853
|
+
- Use `/work` command to track progress
|
|
854
|
+
|
|
855
|
+
### Step 4: Validate Continuously
|
|
856
|
+
|
|
857
|
+
After each Feature:
|
|
858
|
+
|
|
859
|
+
- [ ] Run tests: `npm run test`
|
|
860
|
+
- [ ] Check linting: `npm run lint`
|
|
861
|
+
- [ ] Check types: `npm run type-check`
|
|
862
|
+
- [ ] Update documentation if needed: `/flow-docs-sync`
|
|
863
|
+
- [ ] Commit with conventional commits
|
|
864
|
+
- [ ] Create PR for review
|
|
865
|
+
|
|
866
|
+
### Step 5: Track Progress
|
|
867
|
+
|
|
868
|
+
Update this roadmap as you complete features:
|
|
869
|
+
|
|
870
|
+
- Change `- [ ]` to `- [x]` for completed tasks
|
|
871
|
+
- Track actual time vs estimated
|
|
872
|
+
- Adjust remaining estimates based on velocity
|
|
873
|
+
|
|
874
|
+
---
|
|
875
|
+
|
|
876
|
+
## 📞 Support
|
|
877
|
+
|
|
878
|
+
**Questions about this roadmap?**
|
|
879
|
+
|
|
880
|
+
- Review `AGENT.md` for AI assistant guidance
|
|
881
|
+
- Review `docs/` for technical details
|
|
882
|
+
- Review `project-brief.md` for business context
|
|
883
|
+
|
|
884
|
+
**Need to modify the roadmap?**
|
|
885
|
+
|
|
886
|
+
- Update documentation first (`/flow-docs-gen` or `/flow-docs-sync`)
|
|
887
|
+
- Re-run `/flow-project-roadmap` to regenerate
|
|
888
|
+
|
|
889
|
+
---
|
|
890
|
+
|
|
891
|
+
**Generated by:** AI Flow v1.1.0
|
|
892
|
+
**Last Updated:** {{TIMESTAMP}}
|
|
893
|
+
````
|
|
894
|
+
|
|
895
|
+
**Progress:**
|
|
896
|
+
|
|
897
|
+
```
|
|
898
|
+
✅ Roadmap document generated
|
|
899
|
+
✅ Location: .ai-flow/roadmap.md
|
|
900
|
+
✅ Total: {{TOTAL_EPICS}} Epics, {{TOTAL_FEATURES}} Features, {{TOTAL_TASKS}} Tasks
|
|
901
|
+
✅ Estimated: {{TOTAL_SP}} Story Points (~{{TOTAL_WEEKS}} weeks)
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
---
|
|
905
|
+
|
|
906
|
+
## Phase 6: Summary & Next Steps (1 minute)
|
|
907
|
+
|
|
908
|
+
```
|
|
909
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
910
|
+
✅ ROADMAP GENERATION COMPLETE
|
|
911
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
912
|
+
|
|
913
|
+
📊 Summary
|
|
914
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
915
|
+
|
|
916
|
+
✅ Documentation analyzed: {{DOCS_COUNT}} files
|
|
917
|
+
✅ Epics defined: {{EPICS_COUNT}}
|
|
918
|
+
✅ Features identified: {{FEATURES_COUNT}}
|
|
919
|
+
✅ Tasks breakdown: {{TASKS_COUNT}} total tasks
|
|
920
|
+
✅ Story Points: {{TOTAL_SP}} SP
|
|
921
|
+
✅ Estimated time: {{SOLO_WEEKS}} weeks (1 dev) | {{TWO_DEV_WEEKS}} weeks (2 devs)
|
|
922
|
+
✅ Dependency graph: Generated
|
|
923
|
+
✅ Execution order: Optimized for parallelization
|
|
924
|
+
✅ Roadmap document: .ai-flow/roadmap.md
|
|
925
|
+
|
|
926
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
927
|
+
🎯 What This Roadmap Guarantees
|
|
928
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
929
|
+
|
|
930
|
+
✅ **100% Coverage:** Every entity, endpoint, flow, and requirement from
|
|
931
|
+
documentation is included in the roadmap.
|
|
932
|
+
|
|
933
|
+
✅ **Complete Implementation:** Following this roadmap will result in a
|
|
934
|
+
fully functional, production-ready application.
|
|
935
|
+
|
|
936
|
+
✅ **Optimal Order:** Dependencies are analyzed. You'll never build
|
|
937
|
+
Feature B before its dependency Feature A.
|
|
938
|
+
|
|
939
|
+
✅ **Realistic Estimates:** Story Points based on actual complexity
|
|
940
|
+
analysis, not guesswork.
|
|
941
|
+
|
|
942
|
+
✅ **Ready to Execute:** Each Feature has a `/feature` command ready
|
|
943
|
+
to copy-paste and start implementation.
|
|
944
|
+
|
|
945
|
+
✅ **Checkpoints:** Production readiness checklist ensures nothing
|
|
946
|
+
is forgotten before deployment.
|
|
947
|
+
|
|
948
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
949
|
+
🚀 Next Steps
|
|
950
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
951
|
+
|
|
952
|
+
1. **Open the roadmap**
|
|
953
|
+
└─ Open .ai-flow/roadmap.md in your editor
|
|
954
|
+
|
|
955
|
+
2. **Review and adjust priorities**
|
|
956
|
+
└─ Decide which features are MVP vs future phases
|
|
957
|
+
└─ Adjust P0/P1/P2/P3 priorities if needed
|
|
958
|
+
|
|
959
|
+
3. **Start implementation**
|
|
960
|
+
└─ Begin with Phase 1, Epic 1, Feature 1.1
|
|
961
|
+
└─ Copy the `/feature` command from roadmap
|
|
962
|
+
└─ Execute: /feature new "Base application configuration..."
|
|
963
|
+
|
|
964
|
+
4. **Track your progress**
|
|
965
|
+
└─ Mark tasks as complete: - [ ] → - [x]
|
|
966
|
+
└─ Use /work show to see active features
|
|
967
|
+
└─ Update estimates based on actual time
|
|
968
|
+
|
|
969
|
+
5. **Validate continuously**
|
|
970
|
+
└─ Run tests after each feature
|
|
971
|
+
└─ Use /review for code quality checks
|
|
972
|
+
└─ Update docs with /flow-docs-sync when needed
|
|
973
|
+
|
|
974
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
975
|
+
💡 Pro Tips
|
|
976
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
977
|
+
|
|
978
|
+
• **Parallelization:** If you have 2+ devs, check the roadmap for
|
|
979
|
+
Epics marked "Can run in PARALLEL"
|
|
980
|
+
|
|
981
|
+
• **Story Points:** Your team's velocity will stabilize after 2-3
|
|
982
|
+
features. Adjust remaining estimates accordingly.
|
|
983
|
+
|
|
984
|
+
• **MVP Strategy:** Filter roadmap for P0 features only for fastest
|
|
985
|
+
time-to-market.
|
|
986
|
+
|
|
987
|
+
• **Re-generate:** If documentation changes significantly, re-run
|
|
988
|
+
/flow-project-roadmap to update the plan.
|
|
989
|
+
|
|
990
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
991
|
+
|
|
992
|
+
Ready to start building? 🚀
|
|
993
|
+
|
|
994
|
+
Open .ai-flow/roadmap.md and let's ship this! 💪
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
---
|
|
998
|
+
|
|
999
|
+
## Important Notes
|
|
1000
|
+
|
|
1001
|
+
### Story Point Calibration
|
|
1002
|
+
|
|
1003
|
+
The Story Point estimates are based on:
|
|
1004
|
+
|
|
1005
|
+
1. **Complexity factors:**
|
|
1006
|
+
|
|
1007
|
+
- Number of entities involved
|
|
1008
|
+
- Business logic complexity
|
|
1009
|
+
- Integration complexity
|
|
1010
|
+
- Testing requirements
|
|
1011
|
+
- Security requirements
|
|
1012
|
+
|
|
1013
|
+
2. **Historical data:**
|
|
1014
|
+
|
|
1015
|
+
- Simple CRUD: 3-5 SP
|
|
1016
|
+
- Auth systems: 13-21 SP
|
|
1017
|
+
- Payment integrations: 13-21 SP
|
|
1018
|
+
- Complex business flows: 8-13 SP
|
|
1019
|
+
|
|
1020
|
+
3. **AI-assisted development:**
|
|
1021
|
+
- Estimates assume use of AI tools (Copilot, Claude, etc.)
|
|
1022
|
+
- Without AI: multiply by 2-3x
|
|
1023
|
+
|
|
1024
|
+
### Roadmap Adaptability
|
|
1025
|
+
|
|
1026
|
+
The generated roadmap is a starting point. Teams should:
|
|
1027
|
+
|
|
1028
|
+
- Adjust priorities based on business needs
|
|
1029
|
+
- Re-estimate after velocity stabilizes (2-3 sprints)
|
|
1030
|
+
- Re-generate if documentation changes significantly
|
|
1031
|
+
- Break down large features (21+ SP) into smaller chunks
|
|
1032
|
+
|
|
1033
|
+
### Coverage Guarantee
|
|
1034
|
+
|
|
1035
|
+
The roadmap generation process ensures:
|
|
1036
|
+
|
|
1037
|
+
1. **Every entity** from `docs/data-model.md` has a Feature
|
|
1038
|
+
2. **Every endpoint** from `docs/api.md` has a Feature
|
|
1039
|
+
3. **Every business flow** from `docs/business-flows.md` is covered
|
|
1040
|
+
4. **All security requirements** from `specs/security.md` are included
|
|
1041
|
+
5. **All integrations** from `specs/configuration.md` are planned
|
|
1042
|
+
6. **Testing strategy** from `docs/testing.md` is embedded in every Feature
|
|
1043
|
+
7. **Operations requirements** from `docs/operations.md` are in Epic N
|
|
1044
|
+
|
|
1045
|
+
### Validation Logic
|
|
1046
|
+
|
|
1047
|
+
Before generating roadmap, validate:
|
|
1048
|
+
|
|
1049
|
+
```
|
|
1050
|
+
⚠️ Validation Errors
|
|
1051
|
+
|
|
1052
|
+
Missing documentation:
|
|
1053
|
+
- [ ] docs/api.md not found
|
|
1054
|
+
- [ ] docs/business-flows.md not found
|
|
1055
|
+
|
|
1056
|
+
Incomplete documentation:
|
|
1057
|
+
- [ ] No entities defined in docs/data-model.md
|
|
1058
|
+
- [ ] No endpoints defined in docs/api.md
|
|
1059
|
+
|
|
1060
|
+
Please fix documentation and re-run /flow-project-roadmap
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
---
|
|
1064
|
+
|
|
1065
|
+
## Final Step: Commit Roadmap & Start Implementation
|
|
1066
|
+
|
|
1067
|
+
```
|
|
1068
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1069
|
+
✅ ROADMAP GENERATION COMPLETE
|
|
1070
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1071
|
+
|
|
1072
|
+
📊 Summary:
|
|
1073
|
+
• Total Epics: {{TOTAL_EPICS}}
|
|
1074
|
+
• Total Features: {{TOTAL_FEATURES}}
|
|
1075
|
+
• Total Tasks: {{TOTAL_TASKS}}
|
|
1076
|
+
• Total Story Points: {{TOTAL_SP}}
|
|
1077
|
+
• Estimated Duration: {{WEEKS}} weeks
|
|
1078
|
+
|
|
1079
|
+
📄 Roadmap saved to: .ai-flow/roadmap.md
|
|
1080
|
+
|
|
1081
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1082
|
+
|
|
1083
|
+
Ready to commit the roadmap?
|
|
1084
|
+
|
|
1085
|
+
A) ✅ Yes, create commit now
|
|
1086
|
+
B) No, I'll review first
|
|
1087
|
+
|
|
1088
|
+
Your choice (A): __
|
|
1089
|
+
```
|
|
1090
|
+
|
|
1091
|
+
**If choice A (recommended):**
|
|
1092
|
+
|
|
1093
|
+
```bash
|
|
1094
|
+
# Stage roadmap file
|
|
1095
|
+
git add .ai-flow/roadmap.md
|
|
1096
|
+
|
|
1097
|
+
# Create commit
|
|
1098
|
+
git commit -m "docs: add implementation roadmap with Story Points
|
|
1099
|
+
|
|
1100
|
+
Generated by AI Flow /flow-project-roadmap command:
|
|
1101
|
+
- {{TOTAL_EPICS}} epics, {{TOTAL_FEATURES}} features, {{TOTAL_TASKS}} tasks
|
|
1102
|
+
- Total estimation: {{TOTAL_SP}} Story Points (~{{WEEKS}} weeks)
|
|
1103
|
+
- Prioritized by business value
|
|
1104
|
+
- Ready for execution with /feature command"
|
|
1105
|
+
```
|
|
1106
|
+
|
|
1107
|
+
```
|
|
1108
|
+
✅ Roadmap committed
|
|
1109
|
+
|
|
1110
|
+
Commit hash: {{COMMIT_HASH}}
|
|
1111
|
+
|
|
1112
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1113
|
+
🎯 Next Step: Start Implementation
|
|
1114
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1115
|
+
|
|
1116
|
+
Your roadmap is ready! Let's start building.
|
|
1117
|
+
|
|
1118
|
+
**First Priority Feature:**
|
|
1119
|
+
📌 {{FIRST_FEATURE_NAME}} ({{FIRST_FEATURE_SP}} SP)
|
|
1120
|
+
• Epic: {{FIRST_EPIC_NAME}}
|
|
1121
|
+
• Tasks: {{FIRST_FEATURE_TASKS}}
|
|
1122
|
+
• Description: {{FIRST_FEATURE_DESC}}
|
|
1123
|
+
|
|
1124
|
+
Ready to implement this feature?
|
|
1125
|
+
|
|
1126
|
+
A) ✅ Yes, run /feature "{{FIRST_FEATURE_NAME}}" now (recommended)
|
|
1127
|
+
B) No, I'll choose a different feature
|
|
1128
|
+
|
|
1129
|
+
Your choice (A): __
|
|
1130
|
+
```
|
|
1131
|
+
|
|
1132
|
+
**If choice A:** Execute `/feature "{{FIRST_FEATURE_NAME}}"` automatically
|
|
1133
|
+
|
|
1134
|
+
**If choice B:** Show feature selection:
|
|
1135
|
+
|
|
1136
|
+
```
|
|
1137
|
+
**Available Features (Priority Order):**
|
|
1138
|
+
|
|
1139
|
+
1. {{FEATURE_1_NAME}} ({{SP_1}} SP) - {{EPIC_1}}
|
|
1140
|
+
2. {{FEATURE_2_NAME}} ({{SP_2}} SP) - {{EPIC_2}}
|
|
1141
|
+
3. {{FEATURE_3_NAME}} ({{SP_3}} SP) - {{EPIC_3}}
|
|
1142
|
+
4. {{FEATURE_4_NAME}} ({{SP_4}} SP) - {{EPIC_4}}
|
|
1143
|
+
5. {{FEATURE_5_NAME}} ({{SP_5}} SP) - {{EPIC_5}}
|
|
1144
|
+
|
|
1145
|
+
**To start any feature, run:**
|
|
1146
|
+
/feature "[Feature Name]"
|
|
1147
|
+
|
|
1148
|
+
Example: /feature "{{FEATURE_1_NAME}}"
|
|
1149
|
+
|
|
1150
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
---
|
|
1154
|
+
|
|
1155
|
+
**End of /flow-project-roadmap workflow**
|
|
1156
|
+
|
|
1157
|
+
**Time:** 15-30 minutes total
|
|
1158
|
+
**Output:** Complete implementation roadmap with Story Points
|
|
1159
|
+
**Next:** Start executing features with `/feature` command
|