ai-flow-dev 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/dist/cli.js +22 -30
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-build-phase-1.md +50 -56
- package/prompts/backend/flow-build-phase-10.md +707 -0
- package/prompts/backend/flow-build-phase-2.md +48 -50
- package/prompts/backend/flow-build-phase-3.md +12 -13
- package/prompts/backend/flow-build-phase-4.md +12 -13
- package/prompts/backend/flow-build-phase-5.md +12 -12
- package/prompts/backend/flow-build-phase-6.md +12 -14
- package/prompts/backend/flow-build-phase-7.md +13 -14
- package/prompts/backend/flow-build-phase-8.md +47 -46
- package/prompts/backend/flow-build-phase-9.md +11 -18
- package/prompts/backend/flow-dev-commit.md +76 -14
- package/prompts/backend/flow-dev-feature.md +366 -31
- package/templates/AGENT.template.md +1 -1
|
@@ -18,12 +18,118 @@ Create, modify, or refactor complete functionalities with automatic documentatio
|
|
|
18
18
|
- **`/feature new`** → New functionality from scratch
|
|
19
19
|
- **`/feature change`** → Modify existing functionality
|
|
20
20
|
- **`/feature refactor`** → Refactor existing code
|
|
21
|
+
- **`/feature HU-XXX-XXX`** → Implement specific User Story (from Phase 10)
|
|
22
|
+
- **`/feature Feature Name`** → Implement feature from roadmap.md (Phase 9)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Quick Examples
|
|
27
|
+
|
|
28
|
+
### With User Story (Recommended)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
/feature HU-001-001 # Auto-loads: acceptance criteria, tasks, tests, DoD
|
|
32
|
+
# ✅ 0 questions asked, 5 SP, ~1.5h
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### With Roadmap Feature
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
/feature User Entity Repository # Auto-loads: tasks from roadmap.md
|
|
39
|
+
# ✅ 0 questions asked, 12 SP, ~2-3h
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Interactive Mode
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
/feature new # AI asks 5 questions, generates plan
|
|
46
|
+
# ⏱️ 2-3 min questions, then implementation
|
|
47
|
+
```
|
|
21
48
|
|
|
22
49
|
---
|
|
23
50
|
|
|
24
51
|
## Workflow: 4 Phases (15-20 minutes)
|
|
25
52
|
|
|
26
|
-
### Phase
|
|
53
|
+
### Phase 0: Detect Input Mode (5 seconds - automatic)
|
|
54
|
+
|
|
55
|
+
**Check if User Story ID or Feature name provided:**
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
const input = getArguments(); // From /feature [args]
|
|
59
|
+
|
|
60
|
+
if (input.match(/^HU-\d{3}-\d{3}$/)) {
|
|
61
|
+
mode = 'USER_STORY';
|
|
62
|
+
storyId = input; // e.g., HU-001-001
|
|
63
|
+
// Load from user-stories/EP-XXX/HU-XXX-XXX.md
|
|
64
|
+
} else if (fs.existsSync('roadmap.md')) {
|
|
65
|
+
// Search for Feature in roadmap.md matching input
|
|
66
|
+
const roadmapContent = readFile('roadmap.md');
|
|
67
|
+
const featureMatch = roadmapContent.match(new RegExp(`### Feature.*${input}.*• (\d+) SP`));
|
|
68
|
+
if (featureMatch) {
|
|
69
|
+
mode = 'ROADMAP_FEATURE';
|
|
70
|
+
featureName = input;
|
|
71
|
+
// Extract tasks from roadmap.md
|
|
72
|
+
} else {
|
|
73
|
+
mode = 'INTERACTIVE'; // Fallback to manual questions
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
mode = 'INTERACTIVE'; // No roadmap/user-stories found
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Mode behavior:**
|
|
81
|
+
|
|
82
|
+
| Mode | Source | Skip Phase 1 |
|
|
83
|
+
| ----------------- | ----------------------------------- | ------------------------ |
|
|
84
|
+
| `USER_STORY` | `user-stories/EP-XXX/HU-XXX-XXX.md` | ✅ Yes (auto-load spec) |
|
|
85
|
+
| `ROADMAP_FEATURE` | `roadmap.md` Feature section | ✅ Yes (auto-load tasks) |
|
|
86
|
+
| `INTERACTIVE` | Manual questions | ❌ No (ask user) |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### Phase 1: Quick Specification (2-3 minutes or AUTO-SKIP)
|
|
91
|
+
|
|
92
|
+
**IF mode = `USER_STORY`:** _(Skip questions, load from file)_
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
96
|
+
🚀 Feature Workflow | Phase 1/4: Specification (AUTO-LOADED)
|
|
97
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
98
|
+
|
|
99
|
+
📖 Loading User Story: HU-001-001
|
|
100
|
+
|
|
101
|
+
Source: user-stories/EP-001/HU-001-001.md
|
|
102
|
+
|
|
103
|
+
✅ Title: Login básico con email y contraseña
|
|
104
|
+
✅ Priority: Alta (P0)
|
|
105
|
+
✅ Story Points: 5 SP
|
|
106
|
+
✅ Acceptance Criteria: 3 scenarios (Gherkin)
|
|
107
|
+
✅ Technical Tasks: 6 tasks
|
|
108
|
+
✅ Test Cases: 8 QA test cases
|
|
109
|
+
✅ Definition of Done: 9 items
|
|
110
|
+
|
|
111
|
+
Skipping manual questions (spec already defined)...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**IF mode = `ROADMAP_FEATURE`:** _(Skip questions, load from roadmap)_
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
118
|
+
🚀 Feature Workflow | Phase 1/4: Specification (AUTO-LOADED)
|
|
119
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
120
|
+
|
|
121
|
+
🗺️ Loading Feature from roadmap.md: User Entity & Repository
|
|
122
|
+
|
|
123
|
+
✅ Epic: 2 - Data Layer
|
|
124
|
+
✅ Priority: P0
|
|
125
|
+
✅ Story Points: 12 SP (~2-3d)
|
|
126
|
+
✅ Tasks: 8 tasks (T001-T008)
|
|
127
|
+
✅ Dependencies: None (foundational)
|
|
128
|
+
|
|
129
|
+
Skipping manual questions (roadmap already defined)...
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**IF mode = `INTERACTIVE`:** _(Ask manual questions)_
|
|
27
133
|
|
|
28
134
|
Ask 3-5 key questions to understand requirements:
|
|
29
135
|
|
|
@@ -36,6 +142,16 @@ Ask 3-5 key questions to understand requirements:
|
|
|
36
142
|
|
|
37
143
|
**Example:** `.ai-flow/work/003-user-authentication/spec.md`
|
|
38
144
|
|
|
145
|
+
**IF loaded from User Story (HU-XXX-XXX):**
|
|
146
|
+
|
|
147
|
+
- Copy `user-stories/EP-XXX/HU-XXX-XXX.md` → `.ai-flow/work/NNN-HU-XXX-XXX/spec.md`
|
|
148
|
+
- Include: User Story format, Acceptance Criteria (Gherkin), Technical Tasks, Test Cases, DoD
|
|
149
|
+
|
|
150
|
+
**IF loaded from roadmap.md Feature:**
|
|
151
|
+
|
|
152
|
+
- Extract Feature section → `.ai-flow/work/NNN-feature-name/spec.md`
|
|
153
|
+
- Include: Scope, Tasks (T001-T00N), Dependencies, Ready-to-execute command
|
|
154
|
+
|
|
39
155
|
**Example interaction:**
|
|
40
156
|
|
|
41
157
|
```
|
|
@@ -85,7 +201,81 @@ Creating: .ai-flow/work/003-[feature-name]/
|
|
|
85
201
|
- "Payment Processing" → `004-payment-processing`
|
|
86
202
|
- "Real-Time Notifications" → `005-real-time-notifications`
|
|
87
203
|
|
|
88
|
-
#### Step 2.2: Analyze Project Context
|
|
204
|
+
#### Step 2.2: Analyze Project Context & Load Tasks
|
|
205
|
+
|
|
206
|
+
**IF mode = `USER_STORY` or `ROADMAP_FEATURE`:** _(Reuse existing tasks)_
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
210
|
+
📐 Technical Plan (LOADED from User Story HU-001-001)
|
|
211
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
212
|
+
|
|
213
|
+
✅ Story Points: 5 SP (from roadmap.md)
|
|
214
|
+
✅ Tasks: 6 technical tasks (inherited)
|
|
215
|
+
✅ Test Cases: 8 QA test cases (from acceptance criteria)
|
|
216
|
+
✅ Acceptance Criteria: 3 scenarios (Gherkin Given/When/Then)
|
|
217
|
+
|
|
218
|
+
**Tasks from User Story:** (execution order with hybrid estimation)
|
|
219
|
+
|
|
220
|
+
- [ ] [T-001-001] Write User entity tests • 1 SP (~1-2h)
|
|
221
|
+
File: tests/unit/User.spec.ts
|
|
222
|
+
Dependencies: None
|
|
223
|
+
|
|
224
|
+
- [ ] [T-001-002] Create User entity • 1 SP (~1-2h)
|
|
225
|
+
File: src/domain/entities/User.ts
|
|
226
|
+
Dependencies: T-001-001
|
|
227
|
+
|
|
228
|
+
- [ ] [T-001-003] Implement AuthService login method • 2 SP (~3-4h)
|
|
229
|
+
File: src/services/AuthService.ts
|
|
230
|
+
Dependencies: T-001-002
|
|
231
|
+
|
|
232
|
+
- [ ] [T-001-004] Create POST /api/auth/login endpoint • 1 SP (~1-2h)
|
|
233
|
+
File: src/controllers/AuthController.ts
|
|
234
|
+
Dependencies: T-001-003
|
|
235
|
+
|
|
236
|
+
- [ ] [T-001-005] Write integration tests • 2 SP (~3-4h)
|
|
237
|
+
File: tests/integration/auth.spec.ts
|
|
238
|
+
Dependencies: T-001-003
|
|
239
|
+
|
|
240
|
+
- [ ] [T-001-006] Validate against Definition of Done • trivial (~15 min)
|
|
241
|
+
- Code review approved
|
|
242
|
+
- Tests passing (unit + integration)
|
|
243
|
+
- QA test cases executed (8/8)
|
|
244
|
+
- Documentation updated
|
|
245
|
+
- Lint/format clean
|
|
246
|
+
Dependencies: T-001-005
|
|
247
|
+
|
|
248
|
+
**Acceptance Criteria Validation:**
|
|
249
|
+
|
|
250
|
+
Will verify implementation against:
|
|
251
|
+
|
|
252
|
+
✅ Scenario 1: Login exitoso
|
|
253
|
+
Dado que el usuario tiene credenciales válidas
|
|
254
|
+
Cuando ingresa email y contraseña correctos
|
|
255
|
+
Entonces recibe JWT token y accede al sistema
|
|
256
|
+
|
|
257
|
+
✅ Scenario 2: Credenciales inválidas
|
|
258
|
+
Dado que el usuario ingresa credenciales incorrectas
|
|
259
|
+
Cuando intenta iniciar sesión
|
|
260
|
+
Entonces recibe error 401 con mensaje claro
|
|
261
|
+
|
|
262
|
+
✅ Scenario 3: Rate limiting
|
|
263
|
+
Dado que el usuario falla login 5 veces en 15 minutos
|
|
264
|
+
Cuando intenta login nuevamente
|
|
265
|
+
Entonces recibe error 429 (Too Many Requests)
|
|
266
|
+
|
|
267
|
+
**QA Test Cases to Execute:**
|
|
268
|
+
|
|
269
|
+
After implementation, run 8 test cases:
|
|
270
|
+
- TC-001-001: Login exitoso (Happy Path)
|
|
271
|
+
- TC-001-002: Credenciales inválidas (Error Case)
|
|
272
|
+
- TC-001-003: Rate limiting (Edge Case)
|
|
273
|
+
- [... 5 more test cases from User Story]
|
|
274
|
+
|
|
275
|
+
Ready to implement? (Y/n)
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**IF mode = `INTERACTIVE`:** _(Generate plan from scratch)_
|
|
89
279
|
|
|
90
280
|
Based on the project's detected stack and existing patterns, auto-generate a technical plan.
|
|
91
281
|
|
|
@@ -116,15 +306,15 @@ Count total tasks needed based on spec. Then classify:
|
|
|
116
306
|
|
|
117
307
|
Estimate complexity using industry-standard Fibonacci Story Points:
|
|
118
308
|
|
|
119
|
-
| Story Points | Complexity | Typical Time | Example Task
|
|
120
|
-
| ------------ | ---------- | ------------ |
|
|
121
|
-
| **1 SP** | Trivial | 1-2 hours | Add simple field, update enum
|
|
122
|
-
| **2 SP** | Very Small | 2-4 hours | Basic validation, simple test
|
|
123
|
-
| **3 SP** | Small | 4-8 hours | Simple CRUD endpoint, basic entity
|
|
124
|
-
| **5 SP** | Medium | 1-2 days | Complex endpoint with business logic
|
|
125
|
-
| **8 SP** | Complex | 2-3 days | Auth flow, complex validation
|
|
126
|
-
| **13 SP** | Large | 1 week | Complete module with full tests
|
|
127
|
-
| **21 SP** | Very Large | 2 weeks | Major feature with integration
|
|
309
|
+
| Story Points | Complexity | Typical Time | Example Task |
|
|
310
|
+
| ------------ | ---------- | ------------ | -------------------------------------- |
|
|
311
|
+
| **1 SP** | Trivial | 1-2 hours | Add simple field, update enum |
|
|
312
|
+
| **2 SP** | Very Small | 2-4 hours | Basic validation, simple test |
|
|
313
|
+
| **3 SP** | Small | 4-8 hours | Simple CRUD endpoint, basic entity |
|
|
314
|
+
| **5 SP** | Medium | 1-2 days | Complex endpoint with business logic |
|
|
315
|
+
| **8 SP** | Complex | 2-3 days | Auth flow, complex validation |
|
|
316
|
+
| **13 SP** | Large | 1 week | Complete module with full tests |
|
|
317
|
+
| **21 SP** | Very Large | 2 weeks | Major feature with integration |
|
|
128
318
|
| **34 SP** | Epic | 3 weeks | Multiple related features (Epic-level) |
|
|
129
319
|
|
|
130
320
|
> **Note:** Times assume experienced developer with AI assistance.
|
|
@@ -134,16 +324,16 @@ Estimate complexity using industry-standard Fibonacci Story Points:
|
|
|
134
324
|
|
|
135
325
|
**Use this table to add precise time estimates to each task:**
|
|
136
326
|
|
|
137
|
-
| Story Points | Time Estimate (solo dev) | Time Range
|
|
138
|
-
|
|
139
|
-
| **1 SP** | 1-2 hours | (~1-2h)
|
|
140
|
-
| **2 SP** | 3-4 hours | (~3-4h)
|
|
141
|
-
| **3 SP** | 4-8 hours | (~4-8h)
|
|
142
|
-
| **5 SP** | 1-2 days | (~1-2d)
|
|
143
|
-
| **8 SP** | 2-3 days | (~2-3d)
|
|
144
|
-
| **13 SP** | 1 week | (~1w)
|
|
145
|
-
| **21 SP** | 2 weeks | (~2w)
|
|
146
|
-
| **34 SP** | 3 weeks | (~3w)
|
|
327
|
+
| Story Points | Time Estimate (solo dev) | Time Range | Example Task |
|
|
328
|
+
| ------------ | ------------------------ | ---------- | --------------------------------------- |
|
|
329
|
+
| **1 SP** | 1-2 hours | (~1-2h) | Add enum value, simple config change |
|
|
330
|
+
| **2 SP** | 3-4 hours | (~3-4h) | Write 5-8 unit tests, basic validation |
|
|
331
|
+
| **3 SP** | 4-8 hours | (~4-8h) | Simple CRUD endpoint, basic entity |
|
|
332
|
+
| **5 SP** | 1-2 days | (~1-2d) | Complex endpoint with business logic |
|
|
333
|
+
| **8 SP** | 2-3 days | (~2-3d) | Auth flow, complex validation |
|
|
334
|
+
| **13 SP** | 1 week | (~1w) | Complete module with full test coverage |
|
|
335
|
+
| **21 SP** | 2 weeks | (~2w) | Major feature with integration |
|
|
336
|
+
| **34 SP** | 3 weeks | (~3w) | Multiple related features (Epic-level) |
|
|
147
337
|
|
|
148
338
|
> **Note:** Time assumes AI-assisted development (Copilot/Claude). Without AI, multiply by 2-3x.
|
|
149
339
|
> For team velocity adjustment, track actual time vs estimates after 2-3 features.
|
|
@@ -178,11 +368,13 @@ Estimate complexity using industry-standard Fibonacci Story Points:
|
|
|
178
368
|
**Parallelization Rules ([P] marker):**
|
|
179
369
|
|
|
180
370
|
✅ **Use [P] when:**
|
|
371
|
+
|
|
181
372
|
- Tasks target different files
|
|
182
373
|
- No shared dependencies
|
|
183
374
|
- Can run simultaneously (e.g., independent entities, different test suites)
|
|
184
375
|
|
|
185
376
|
❌ **Don't use [P] when:**
|
|
377
|
+
|
|
186
378
|
- Task depends on another incomplete task
|
|
187
379
|
- Same file is modified
|
|
188
380
|
- Shared resource (DB migration, config file)
|
|
@@ -351,17 +543,19 @@ Based on your project (Node.js + Express + PostgreSQL):
|
|
|
351
543
|
**Task Execution Graph (Phase 1):**
|
|
352
544
|
|
|
353
545
|
```
|
|
546
|
+
|
|
354
547
|
T001 [P] ──┐
|
|
355
548
|
T003 [P] ──┼──> (Tests can run parallel)
|
|
356
549
|
T005 [P] ──┘
|
|
357
550
|
|
|
358
551
|
T002 ──┬──> T004
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
552
|
+
├──> T006
|
|
553
|
+
├──> T007 (needs T002, T004, T006)
|
|
554
|
+
├──> T008 ──> T009
|
|
555
|
+
│
|
|
556
|
+
└──> T010 (needs T004)
|
|
557
|
+
T011 (needs T006)
|
|
558
|
+
|
|
365
559
|
```
|
|
366
560
|
|
|
367
561
|
**Parallelization Notes (Phase 1):**
|
|
@@ -426,6 +620,7 @@ T002 ──┬──> T004
|
|
|
426
620
|
**Task Execution Graph (Phase 2):**
|
|
427
621
|
|
|
428
622
|
```
|
|
623
|
+
|
|
429
624
|
T012 [P] ──┐
|
|
430
625
|
T014 [P] ──┼──> (Test suites can run parallel)
|
|
431
626
|
T016 [P] ──┘
|
|
@@ -436,6 +631,7 @@ T015 (TokenService) ──> T020 (Token rotation)
|
|
|
436
631
|
T017 (EmailService) ──> T021 (Email verification)
|
|
437
632
|
T018 (Password utils) ──> T013 (used by AuthService)
|
|
438
633
|
T019 (JWT utils) ──> T013 (used by AuthService)
|
|
634
|
+
|
|
439
635
|
```
|
|
440
636
|
|
|
441
637
|
**Parallelization Notes (Phase 2):**
|
|
@@ -485,6 +681,7 @@ T019 (JWT utils) ──> T013 (used by AuthService)
|
|
|
485
681
|
**Task Execution Graph (Phase 3):**
|
|
486
682
|
|
|
487
683
|
```
|
|
684
|
+
|
|
488
685
|
T022 [P] ──┐
|
|
489
686
|
T024 [P] ──┘──> (Test suites can run parallel)
|
|
490
687
|
|
|
@@ -492,9 +689,10 @@ T013 (AuthService) ──> T023 (AuthController)
|
|
|
492
689
|
T015 (TokenService) ──> T025 (Auth middleware)
|
|
493
690
|
|
|
494
691
|
T026 (Validators) ──┐
|
|
495
|
-
T027 (DTOs)
|
|
496
|
-
T023 (Controller)
|
|
692
|
+
T027 (DTOs) ├──> T028 (Routes)
|
|
693
|
+
T023 (Controller) ┘
|
|
497
694
|
T025 (Middleware) ─┘
|
|
695
|
+
|
|
498
696
|
```
|
|
499
697
|
|
|
500
698
|
## Phase 4: Integration • 3 SP (~15-20 min)
|
|
@@ -529,9 +727,11 @@ T025 (Middleware) ─┘
|
|
|
529
727
|
**Task Execution Graph (Phase 4):**
|
|
530
728
|
|
|
531
729
|
```
|
|
730
|
+
|
|
532
731
|
T030, T031, T033 [P] ──> (Can run parallel - different concerns)
|
|
533
732
|
|
|
534
733
|
T028 ──> T029 ──> T032 (Sequential: routes → DI → registration)
|
|
734
|
+
|
|
535
735
|
```
|
|
536
736
|
|
|
537
737
|
## Phase 5: Testing & Docs • 2 SP (~10-15 min)
|
|
@@ -571,6 +771,7 @@ T028 ──> T029 ──> T032 (Sequential: routes → DI → registration)
|
|
|
571
771
|
**Task Execution Graph (Phase 5):**
|
|
572
772
|
|
|
573
773
|
```
|
|
774
|
+
|
|
574
775
|
T001-T033 ──> T034 (Run all tests) ──> T035 (E2E flow test)
|
|
575
776
|
|
|
576
777
|
T036 [P] ──┐
|
|
@@ -578,6 +779,7 @@ T037 [P] ──┼──> (Documentation updates can run parallel)
|
|
|
578
779
|
T038 [P] ──┘
|
|
579
780
|
|
|
580
781
|
T039 (env example) ──> (Independent, can run anytime)
|
|
782
|
+
|
|
581
783
|
```
|
|
582
784
|
|
|
583
785
|
**Parallelization Notes (Phase 5):**
|
|
@@ -1069,7 +1271,53 @@ To resume: /work resume feature-[name]
|
|
|
1069
1271
|
- Validate each task before marking complete
|
|
1070
1272
|
- Update status.json after each task/phase
|
|
1071
1273
|
|
|
1072
|
-
### Phase 4: Security Check + Auto-Archive (1-2 minutes)
|
|
1274
|
+
### Phase 4: Security Check + Validation + Auto-Archive (1-2 minutes)
|
|
1275
|
+
|
|
1276
|
+
**IF mode = `USER_STORY`:** *(Validate against Definition of Done)*
|
|
1277
|
+
|
|
1278
|
+
```
|
|
1279
|
+
|
|
1280
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1281
|
+
✅ Definition of Done Validation (from HU-001-001)
|
|
1282
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1283
|
+
|
|
1284
|
+
Validating User Story completion...
|
|
1285
|
+
|
|
1286
|
+
✅ Código implementado siguiendo ai-instructions.md
|
|
1287
|
+
✅ Code review aprobado (mín 1 revisor) [Simulated: Auto-approved by AI]
|
|
1288
|
+
✅ Tests unitarios escritos (cobertura > 80%) [Coverage: 92%]
|
|
1289
|
+
✅ Tests de integración pasando [8/8 passing]
|
|
1290
|
+
✅ Casos de prueba QA ejecutados y aprobados (8/8)
|
|
1291
|
+
✅ TC-001-001: Login exitoso (Happy Path)
|
|
1292
|
+
✅ TC-001-002: Credenciales inválidas (Error Case)
|
|
1293
|
+
✅ TC-001-003: Rate limiting (Edge Case)
|
|
1294
|
+
... [5 more test cases]
|
|
1295
|
+
✅ Documentación técnica actualizada (docs/api.md)
|
|
1296
|
+
✅ Sin errores de lint ni formateo
|
|
1297
|
+
⚠️ Deploy a staging exitoso [SKIP: Local development]
|
|
1298
|
+
⚠️ Product Owner aprobó la funcionalidad [SKIP: Manual step]
|
|
1299
|
+
|
|
1300
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1301
|
+
Acceptance Criteria Verification
|
|
1302
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1303
|
+
|
|
1304
|
+
✅ Scenario 1: Login exitoso
|
|
1305
|
+
Test: TC-001-001 passed
|
|
1306
|
+
Verified: JWT token returned with valid exp, user_id, role
|
|
1307
|
+
|
|
1308
|
+
✅ Scenario 2: Credenciales inválidas
|
|
1309
|
+
Test: TC-001-002 passed
|
|
1310
|
+
Verified: 401 status with clear error message
|
|
1311
|
+
|
|
1312
|
+
✅ Scenario 3: Rate limiting
|
|
1313
|
+
Test: TC-001-003 passed
|
|
1314
|
+
Verified: 429 status after 5 failed attempts in 15 minutes
|
|
1315
|
+
|
|
1316
|
+
All acceptance criteria met! ✅
|
|
1317
|
+
|
|
1318
|
+
```
|
|
1319
|
+
|
|
1320
|
+
**IF mode = `ROADMAP_FEATURE` or `INTERACTIVE`:** *(Standard security check)*
|
|
1073
1321
|
|
|
1074
1322
|
**Security Quick Check:**
|
|
1075
1323
|
Ask 1-2 questions about production considerations:
|
|
@@ -1147,6 +1395,34 @@ Commit? (Y/n): \_\_
|
|
|
1147
1395
|
✅ Feature Complete!
|
|
1148
1396
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1149
1397
|
|
|
1398
|
+
**IF mode = `USER_STORY`:**
|
|
1399
|
+
|
|
1400
|
+
```
|
|
1401
|
+
Summary:
|
|
1402
|
+
|
|
1403
|
+
- User Story: HU-001-001 - Login básico con email y contraseña
|
|
1404
|
+
- Epic: EP-001 - Autenticación y Seguridad
|
|
1405
|
+
- Priority: Alta (P0)
|
|
1406
|
+
- Story Points: 5 SP (estimated) → 4.8 SP (actual)
|
|
1407
|
+
- Time: 1.5 hours (estimated: 6-8h with AI assistance)
|
|
1408
|
+
- Files: 6 created, 2 modified
|
|
1409
|
+
- Tests: 8 added (all passing ✅)
|
|
1410
|
+
|
|
1411
|
+
✅ Acceptance Criteria: 3/3 verified
|
|
1412
|
+
✅ Test Cases: 8/8 executed and passed
|
|
1413
|
+
✅ Definition of Done: 7/9 completed (2 manual steps pending)
|
|
1414
|
+
|
|
1415
|
+
Dependencies resolved:
|
|
1416
|
+
✅ Blocks: HU-001-002 (OAuth login) - Ready to start
|
|
1417
|
+
✅ Blocks: HU-002-001 (User CRUD) - Ready to start
|
|
1418
|
+
|
|
1419
|
+
📖 User Story Status: COMPLETED ✅
|
|
1420
|
+
File: user-stories/EP-001/HU-001-001.md updated with completion date
|
|
1421
|
+
```
|
|
1422
|
+
|
|
1423
|
+
**IF mode = `ROADMAP_FEATURE` or `INTERACTIVE`:**
|
|
1424
|
+
|
|
1425
|
+
```
|
|
1150
1426
|
Summary:
|
|
1151
1427
|
|
|
1152
1428
|
- Feature: JWT authentication system
|
|
@@ -1154,6 +1430,7 @@ Summary:
|
|
|
1154
1430
|
- Tests: 47 added (all passing ✅)
|
|
1155
1431
|
- Time: 2.5 hours
|
|
1156
1432
|
- Complexity: COMPLEX (52 tasks, 5 phases)
|
|
1433
|
+
```
|
|
1157
1434
|
|
|
1158
1435
|
📦 Git Summary:
|
|
1159
1436
|
Branch: feature/auth-jwt-system
|
|
@@ -1693,5 +1970,63 @@ Next steps:
|
|
|
1693
1970
|
|
|
1694
1971
|
---
|
|
1695
1972
|
|
|
1696
|
-
|
|
1973
|
+
## Common Use Cases
|
|
1974
|
+
|
|
1975
|
+
### 1. Sprint Development (with User Stories)
|
|
1697
1976
|
|
|
1977
|
+
```bash
|
|
1978
|
+
/feature HU-001-001 # Login: 5 SP, 1.5h
|
|
1979
|
+
/feature HU-001-002 # OAuth: 3 SP, 1h
|
|
1980
|
+
/feature HU-002-001 # User CRUD: 8 SP, 2h
|
|
1981
|
+
# Sprint: 16 SP in 4.5h
|
|
1982
|
+
```
|
|
1983
|
+
|
|
1984
|
+
### 2. Rapid Prototyping (with roadmap)
|
|
1985
|
+
|
|
1986
|
+
```bash
|
|
1987
|
+
/feature User Entity Repository # 12 SP
|
|
1988
|
+
/feature Product Entity Repository # 8 SP
|
|
1989
|
+
/feature Order Entity Repository # 5 SP
|
|
1990
|
+
# Data layer: 25 SP in ~2 days
|
|
1991
|
+
```
|
|
1992
|
+
|
|
1993
|
+
### 3. Feature Not Planned (interactive)
|
|
1994
|
+
|
|
1995
|
+
```bash
|
|
1996
|
+
/feature new
|
|
1997
|
+
# AI asks: What to build?
|
|
1998
|
+
> Real-time notifications with WebSockets
|
|
1999
|
+
# Generates: 24 tasks, 13 SP, ~3h
|
|
2000
|
+
```
|
|
2001
|
+
|
|
2002
|
+
### 4. Bug Fix or Quick Change
|
|
2003
|
+
|
|
2004
|
+
```bash
|
|
2005
|
+
/feature change
|
|
2006
|
+
# AI asks: What to modify?
|
|
2007
|
+
> Add rate limiting to login endpoint
|
|
2008
|
+
# Updates: middleware, tests, docs (~30 min)
|
|
2009
|
+
```
|
|
2010
|
+
|
|
2011
|
+
### 5. Code Quality Improvement
|
|
2012
|
+
|
|
2013
|
+
```bash
|
|
2014
|
+
/feature refactor
|
|
2015
|
+
# AI asks: What to refactor?
|
|
2016
|
+
> Extract duplicate validation logic to shared module
|
|
2017
|
+
# Refactors: 6 files, tests pass, docs updated (~1h)
|
|
2018
|
+
```
|
|
2019
|
+
|
|
2020
|
+
---
|
|
2021
|
+
|
|
2022
|
+
## Key Benefits by Mode
|
|
2023
|
+
|
|
2024
|
+
| Mode | Setup | Validation | Best For |
|
|
2025
|
+
| --------------- | ------- | ------------- | ----------- |
|
|
2026
|
+
| **HU-XXX-XXX** | 0 min | Gherkin + DoD | Scrum teams |
|
|
2027
|
+
| **Roadmap** | 0 min | Standard | Quick impl |
|
|
2028
|
+
| **Interactive** | 2-3 min | Standard | Exploration |
|
|
2029
|
+
|
|
2030
|
+
---
|
|
2031
|
+
|
|
2032
|
+
**BEGIN EXECUTION when user runs `/feature`, `/feature new`, `/feature change`, or `/feature refactor`**
|