specweave 0.1.7 → 0.1.9
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 +50 -32
- package/SPECWEAVE.md +97 -63
- package/package.json +2 -2
- package/src/agents/pm/AGENT.md +286 -0
- package/src/commands/build.md +474 -0
- package/src/commands/done.md +544 -56
- package/src/commands/inc.md +85 -0
- package/src/commands/increment.md +316 -0
- package/src/commands/progress.md +258 -0
- package/src/commands/{validate-increment.md → validate.md} +1 -1
- package/src/templates/CLAUDE.md.template +11 -10
- package/src/commands/add-tasks.md +0 -176
- package/src/commands/at.md +0 -114
- package/src/commands/close-increment.md +0 -347
- package/src/commands/create-increment.md +0 -223
- package/src/commands/init.md +0 -123
- package/src/commands/ls.md +0 -100
- package/src/commands/pi.md +0 -65
- package/src/commands/si.md +0 -83
- package/src/commands/start-increment.md +0 -139
- package/src/commands/vi.md +0 -89
package/src/commands/done.md
CHANGED
|
@@ -1,103 +1,591 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
name: done
|
|
3
|
+
description: Close increment with PM validation - checks tasks, tests, and docs before closing
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
# Close Increment (
|
|
6
|
+
# Close Increment (PM Validated)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
**Product Manager-Led Closure**: PM validates tasks, tests, and docs before closing.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
You are acting as the Product Manager to validate increment completion before closure. You must check all 3 gates: tasks done, tests passing, and docs updated.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
/done <increment-id>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Arguments
|
|
19
|
+
|
|
20
|
+
- `<increment-id>`: Required. Increment ID (e.g., "001", "0001", "1", "0042")
|
|
10
21
|
|
|
11
22
|
---
|
|
12
23
|
|
|
13
|
-
##
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
### Step 1: Load Increment Context
|
|
27
|
+
|
|
28
|
+
1. **Find increment directory**:
|
|
29
|
+
- Normalize ID to 4-digit format (e.g., "1" → "0001")
|
|
30
|
+
- Find `.specweave/increments/0001-name/`
|
|
31
|
+
- Verify increment exists and is in-progress
|
|
32
|
+
|
|
33
|
+
2. **Load all documents**:
|
|
34
|
+
- `spec.md` - Requirements and acceptance criteria
|
|
35
|
+
- `plan.md` - Architecture and implementation approach
|
|
36
|
+
- `tasks.md` - Implementation tasks
|
|
37
|
+
- `tests.md` - Test strategy
|
|
38
|
+
|
|
39
|
+
**Example output**:
|
|
40
|
+
```
|
|
41
|
+
📂 Loading increment 0001-user-authentication...
|
|
42
|
+
|
|
43
|
+
✅ Context loaded:
|
|
44
|
+
• spec.md (6 user stories, 15 requirements)
|
|
45
|
+
• plan.md (Architecture: JWT + PostgreSQL)
|
|
46
|
+
• tasks.md (42 tasks)
|
|
47
|
+
• tests.md (12 test cases)
|
|
48
|
+
|
|
49
|
+
🎯 Validating readiness for closure...
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Step 2: PM Validation (3 Gates)
|
|
53
|
+
|
|
54
|
+
**🔥 CRITICAL: PM agent MUST validate all 3 gates before allowing closure!**
|
|
55
|
+
|
|
56
|
+
Invoke PM agent with validation task:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
PM Agent: Please validate if increment 0001 is ready to close.
|
|
60
|
+
|
|
61
|
+
Check these 3 gates:
|
|
62
|
+
1. ✅ All tasks completed (especially P1 priority)
|
|
63
|
+
2. ✅ Tests passing (unit, integration, E2E if applicable)
|
|
64
|
+
3. ✅ Documentation updated (CLAUDE.md, README.md reflect new features)
|
|
65
|
+
|
|
66
|
+
Provide detailed feedback for each gate.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### Gate 1: Tasks Completed ✅
|
|
70
|
+
|
|
71
|
+
**PM checks**:
|
|
72
|
+
- [ ] All P1 (critical) tasks completed
|
|
73
|
+
- [ ] All P2 (important) tasks completed OR deferred with reason
|
|
74
|
+
- [ ] P3 (nice-to-have) tasks completed, deferred, or moved to backlog
|
|
75
|
+
- [ ] No tasks in "blocked" state
|
|
76
|
+
- [ ] Acceptance criteria for each task met
|
|
77
|
+
|
|
78
|
+
**Example check**:
|
|
79
|
+
```
|
|
80
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
+
GATE 1: Tasks Completion
|
|
82
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
83
|
+
|
|
84
|
+
Checking tasks.md...
|
|
85
|
+
|
|
86
|
+
Priority P1 (Critical): 12 tasks
|
|
87
|
+
✅ 12/12 completed (100%)
|
|
88
|
+
|
|
89
|
+
Priority P2 (Important): 18 tasks
|
|
90
|
+
✅ 16/18 completed (89%)
|
|
91
|
+
⚠️ 2 deferred to next increment (with reason)
|
|
92
|
+
|
|
93
|
+
Priority P3 (Nice-to-have): 12 tasks
|
|
94
|
+
✅ 8/12 completed (67%)
|
|
95
|
+
📋 4 moved to backlog (acceptable)
|
|
96
|
+
|
|
97
|
+
Status: ✅ PASS
|
|
98
|
+
• All critical tasks completed
|
|
99
|
+
• P2 deferrals documented with valid reasons
|
|
100
|
+
• P3 tasks appropriately triaged
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**If tasks incomplete**:
|
|
104
|
+
```
|
|
105
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
106
|
+
GATE 1: Tasks Completion
|
|
107
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
108
|
+
|
|
109
|
+
❌ FAIL - Incomplete tasks found
|
|
110
|
+
|
|
111
|
+
Priority P1 (Critical): 12 tasks
|
|
112
|
+
⚠️ 10/12 completed (83%)
|
|
113
|
+
❌ 2 tasks INCOMPLETE:
|
|
114
|
+
- T005: Add password hashing (CRITICAL - security requirement)
|
|
115
|
+
- T008: Implement JWT validation (CRITICAL - authentication won't work)
|
|
116
|
+
|
|
117
|
+
Recommendation: ❌ CANNOT close increment
|
|
118
|
+
• Complete T005 and T008 (security critical)
|
|
119
|
+
• These are core authentication features from spec.md
|
|
120
|
+
• Estimated effort: 4-6 hours
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
#### Gate 2: Tests Passing ✅
|
|
124
|
+
|
|
125
|
+
**PM checks**:
|
|
126
|
+
- [ ] All test suites passing (no failures)
|
|
127
|
+
- [ ] Test coverage meets requirements (>80% for critical paths)
|
|
128
|
+
- [ ] E2E tests passing (if UI exists)
|
|
129
|
+
- [ ] No skipped tests without documentation
|
|
130
|
+
- [ ] Test cases align with acceptance criteria in spec.md
|
|
131
|
+
|
|
132
|
+
**Example check**:
|
|
133
|
+
```
|
|
134
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
135
|
+
GATE 2: Tests Passing
|
|
136
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
137
|
+
|
|
138
|
+
Running test suite...
|
|
139
|
+
|
|
140
|
+
Unit Tests:
|
|
141
|
+
✅ 47/47 passing
|
|
142
|
+
✅ Coverage: 89% (above 80% target)
|
|
143
|
+
|
|
144
|
+
Integration Tests:
|
|
145
|
+
✅ 15/15 passing
|
|
146
|
+
✅ All API endpoints tested
|
|
147
|
+
|
|
148
|
+
E2E Tests:
|
|
149
|
+
✅ 8/8 passing
|
|
150
|
+
✅ Login flow verified
|
|
151
|
+
✅ Password reset flow verified
|
|
152
|
+
|
|
153
|
+
Test Coverage by Component:
|
|
154
|
+
• User model: 95%
|
|
155
|
+
• Auth service: 92%
|
|
156
|
+
• JWT middleware: 88%
|
|
157
|
+
• Password util: 90%
|
|
158
|
+
|
|
159
|
+
Status: ✅ PASS
|
|
160
|
+
• All tests passing
|
|
161
|
+
• Coverage exceeds target
|
|
162
|
+
• E2E tests validate user stories
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**If tests failing**:
|
|
166
|
+
```
|
|
167
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
168
|
+
GATE 2: Tests Passing
|
|
169
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
+
|
|
171
|
+
❌ FAIL - Tests failing
|
|
172
|
+
|
|
173
|
+
Unit Tests:
|
|
174
|
+
⚠️ 45/47 passing (96%)
|
|
175
|
+
❌ 2 FAILURES:
|
|
176
|
+
- test/auth/jwt.test.ts: Token expiry validation
|
|
177
|
+
Expected 24h, got 1h
|
|
178
|
+
- test/auth/password.test.ts: Weak password rejection
|
|
179
|
+
Allowed weak password "password123"
|
|
180
|
+
|
|
181
|
+
Integration Tests:
|
|
182
|
+
✅ 15/15 passing
|
|
183
|
+
|
|
184
|
+
E2E Tests:
|
|
185
|
+
❌ 7/8 passing (88%)
|
|
186
|
+
❌ 1 FAILURE:
|
|
187
|
+
- test/e2e/login.spec.ts: Rate limiting test
|
|
188
|
+
Expected 429 after 5 attempts, got 200
|
|
189
|
+
|
|
190
|
+
Recommendation: ❌ CANNOT close increment
|
|
191
|
+
• Fix JWT expiry configuration (security issue)
|
|
192
|
+
• Strengthen password validation (spec.md requirement)
|
|
193
|
+
• Fix rate limiting (prevents brute force attacks)
|
|
194
|
+
• Estimated effort: 2-3 hours
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Gate 3: Documentation Updated ✅
|
|
198
|
+
|
|
199
|
+
**PM checks**:
|
|
200
|
+
- [ ] CLAUDE.md updated with new features
|
|
201
|
+
- [ ] README.md updated with usage examples
|
|
202
|
+
- [ ] CHANGELOG.md updated (if public API changed)
|
|
203
|
+
- [ ] API documentation regenerated (if applicable)
|
|
204
|
+
- [ ] Inline code documentation complete
|
|
205
|
+
- [ ] No stale references to old code
|
|
206
|
+
|
|
207
|
+
**Example check**:
|
|
208
|
+
```
|
|
209
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
210
|
+
GATE 3: Documentation Updated
|
|
211
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
212
|
+
|
|
213
|
+
Checking documentation updates...
|
|
214
|
+
|
|
215
|
+
CLAUDE.md:
|
|
216
|
+
✅ Added authentication section
|
|
217
|
+
✅ Added User model to schema reference
|
|
218
|
+
✅ Updated slash commands table
|
|
219
|
+
✅ No stale references found
|
|
220
|
+
|
|
221
|
+
README.md:
|
|
222
|
+
✅ Added authentication quick start example
|
|
223
|
+
✅ Updated API documentation link
|
|
224
|
+
✅ Added database setup instructions
|
|
225
|
+
|
|
226
|
+
CHANGELOG.md:
|
|
227
|
+
✅ Added v0.1.7 entry
|
|
228
|
+
✅ Listed new authentication features
|
|
229
|
+
✅ Migration guide included
|
|
230
|
+
|
|
231
|
+
Inline Documentation:
|
|
232
|
+
✅ All public functions documented (JSDoc)
|
|
233
|
+
✅ API routes have descriptions
|
|
234
|
+
✅ Complex logic explained with comments
|
|
235
|
+
|
|
236
|
+
Status: ✅ PASS
|
|
237
|
+
• All documentation current
|
|
238
|
+
• Examples tested and working
|
|
239
|
+
• No doc/code drift detected
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**If docs outdated**:
|
|
243
|
+
```
|
|
244
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
245
|
+
GATE 3: Documentation Updated
|
|
246
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
247
|
+
|
|
248
|
+
❌ FAIL - Documentation outdated
|
|
249
|
+
|
|
250
|
+
CLAUDE.md:
|
|
251
|
+
⚠️ Partially updated
|
|
252
|
+
❌ Missing authentication section in quick reference
|
|
253
|
+
❌ Slash commands table doesn't mention /login
|
|
254
|
+
|
|
255
|
+
README.md:
|
|
256
|
+
❌ Not updated
|
|
257
|
+
❌ No authentication examples
|
|
258
|
+
❌ Setup instructions don't mention database migrations
|
|
259
|
+
|
|
260
|
+
CHANGELOG.md:
|
|
261
|
+
❌ Not updated
|
|
262
|
+
❌ v0.1.7 entry missing
|
|
263
|
+
|
|
264
|
+
Inline Documentation:
|
|
265
|
+
⚠️ 80% complete
|
|
266
|
+
❌ JWT middleware missing JSDoc comments
|
|
267
|
+
❌ Password util functions undocumented
|
|
268
|
+
|
|
269
|
+
Recommendation: ❌ CANNOT close increment
|
|
270
|
+
• Update CLAUDE.md with authentication section
|
|
271
|
+
• Add authentication examples to README.md
|
|
272
|
+
• Create CHANGELOG.md entry for v0.1.7
|
|
273
|
+
• Document JWT and password utilities
|
|
274
|
+
• Estimated effort: 1-2 hours
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Step 3: PM Decision
|
|
278
|
+
|
|
279
|
+
**Based on 3-gate validation**:
|
|
280
|
+
|
|
281
|
+
#### Scenario A: All Gates Pass ✅
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
285
|
+
PM VALIDATION RESULT: ✅ READY TO CLOSE
|
|
286
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
287
|
+
|
|
288
|
+
✅ Gate 1: Tasks Completed (100% P1, 89% P2)
|
|
289
|
+
✅ Gate 2: Tests Passing (70/70, 89% coverage)
|
|
290
|
+
✅ Gate 3: Documentation Updated (all current)
|
|
291
|
+
|
|
292
|
+
Increment Summary:
|
|
293
|
+
• Started: 2025-10-14
|
|
294
|
+
• Duration: 14 days (vs 21 days estimated)
|
|
295
|
+
• Velocity: +50% faster than planned
|
|
296
|
+
• Quality: Excellent
|
|
297
|
+
|
|
298
|
+
Business Value Delivered:
|
|
299
|
+
• Users can register and log in
|
|
300
|
+
• JWT authentication secure and tested
|
|
301
|
+
• Password security meets OWASP standards
|
|
302
|
+
• Rate limiting prevents brute force attacks
|
|
303
|
+
|
|
304
|
+
PM Approval: ✅ APPROVED for closure
|
|
305
|
+
|
|
306
|
+
Closing increment 0001-user-authentication...
|
|
307
|
+
✓ Updated status: in-progress → completed
|
|
308
|
+
✓ Set completion date: 2025-10-28
|
|
309
|
+
✓ Generated completion report
|
|
310
|
+
✓ Updated backlog (4 P3 tasks moved)
|
|
311
|
+
|
|
312
|
+
🎉 Increment 0001 closed successfully!
|
|
313
|
+
|
|
314
|
+
Next steps:
|
|
315
|
+
1. Create PR: git push && gh pr create
|
|
316
|
+
2. Deploy to staging: npm run deploy:staging
|
|
317
|
+
3. Create new increment: /increment "Next feature"
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
#### Scenario B: One or More Gates Fail ❌
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
324
|
+
PM VALIDATION RESULT: ❌ NOT READY TO CLOSE
|
|
325
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
326
|
+
|
|
327
|
+
❌ Gate 1: Tasks Completed - 2 P1 tasks incomplete
|
|
328
|
+
✅ Gate 2: Tests Passing - All tests pass
|
|
329
|
+
❌ Gate 3: Documentation Updated - CLAUDE.md and README.md outdated
|
|
330
|
+
|
|
331
|
+
PM Decision: ❌ CANNOT close increment
|
|
332
|
+
|
|
333
|
+
Blockers (MUST fix before closure):
|
|
334
|
+
1. Complete tasks T005 and T008 (security critical)
|
|
335
|
+
Estimated: 4-6 hours
|
|
336
|
+
Impact: Authentication won't work without these
|
|
337
|
+
|
|
338
|
+
2. Update CLAUDE.md and README.md
|
|
339
|
+
Estimated: 1-2 hours
|
|
340
|
+
Impact: Users won't know how to use authentication
|
|
341
|
+
|
|
342
|
+
Total estimated effort to fix: 5-8 hours
|
|
343
|
+
|
|
344
|
+
Action Plan:
|
|
345
|
+
1. Complete T005 (password hashing) - 2h
|
|
346
|
+
2. Complete T008 (JWT validation) - 3h
|
|
347
|
+
3. Update CLAUDE.md - 30m
|
|
348
|
+
4. Update README.md - 1h
|
|
349
|
+
5. Re-run /done 0001 for validation
|
|
14
350
|
|
|
15
|
-
|
|
351
|
+
Increment remains: in-progress
|
|
16
352
|
|
|
17
|
-
|
|
353
|
+
Try again after fixing blockers: /done 0001
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Step 4: Handle Incomplete Work
|
|
357
|
+
|
|
358
|
+
**If increment cannot close due to scope creep**:
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
🤔 PM Analysis: Scope creep detected
|
|
362
|
+
|
|
363
|
+
Original plan: 42 tasks (estimated 3-4 weeks)
|
|
364
|
+
Current state: 55 tasks (3 weeks elapsed)
|
|
365
|
+
Reason: 13 tasks added during implementation
|
|
366
|
+
|
|
367
|
+
Options:
|
|
368
|
+
A) Complete all 55 tasks (1 more week)
|
|
369
|
+
B) Move 13 new tasks to next increment (close now)
|
|
370
|
+
C) Re-plan as 2 increments (recommended)
|
|
371
|
+
|
|
372
|
+
Recommendation: Option C - Split into two increments
|
|
373
|
+
• Increment 0001: Core authentication (42 tasks) - Close now
|
|
374
|
+
• Increment 0002: Enhanced authentication (13 tasks) - New increment
|
|
375
|
+
|
|
376
|
+
PM Approval: ✅ APPROVED for closure with scope transfer
|
|
377
|
+
|
|
378
|
+
Creating increment 0002-auth-enhancements...
|
|
379
|
+
✓ Created spec.md (13 requirements from 0001)
|
|
380
|
+
✓ Created tasks.md (13 tasks transferred)
|
|
381
|
+
✓ Updated dependencies (depends on 0001)
|
|
382
|
+
|
|
383
|
+
Closing increment 0001-user-authentication...
|
|
384
|
+
✓ Status: completed
|
|
385
|
+
✓ Transferred 13 tasks to 0002
|
|
386
|
+
|
|
387
|
+
🎉 Increment 0001 closed successfully!
|
|
388
|
+
📋 Increment 0002 ready to plan
|
|
389
|
+
```
|
|
18
390
|
|
|
19
391
|
---
|
|
20
392
|
|
|
21
|
-
##
|
|
393
|
+
## Examples
|
|
394
|
+
|
|
395
|
+
### Example 1: Successful Closure
|
|
22
396
|
|
|
23
397
|
```bash
|
|
24
|
-
/done
|
|
398
|
+
/done 0001
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**Output**:
|
|
25
402
|
```
|
|
403
|
+
✅ Gate 1: Tasks (100% P1)
|
|
404
|
+
✅ Gate 2: Tests (70/70 passing)
|
|
405
|
+
✅ Gate 3: Docs (all updated)
|
|
406
|
+
|
|
407
|
+
PM Approval: ✅ APPROVED
|
|
408
|
+
|
|
409
|
+
🎉 Increment 0001 closed successfully!
|
|
410
|
+
|
|
411
|
+
Next: /increment "Next feature"
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Example 2: Blocked by Failing Tests
|
|
26
415
|
|
|
27
|
-
**Examples**:
|
|
28
416
|
```bash
|
|
29
|
-
/done
|
|
30
|
-
/done 0042
|
|
417
|
+
/done 0002
|
|
31
418
|
```
|
|
32
419
|
|
|
33
|
-
|
|
420
|
+
**Output**:
|
|
421
|
+
```
|
|
422
|
+
✅ Gate 1: Tasks (100%)
|
|
423
|
+
❌ Gate 2: Tests (3 failures)
|
|
424
|
+
✅ Gate 3: Docs (current)
|
|
34
425
|
|
|
35
|
-
|
|
426
|
+
PM Decision: ❌ CANNOT close
|
|
36
427
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
428
|
+
Blockers:
|
|
429
|
+
• Fix 3 test failures (JWT, password, rate limiting)
|
|
430
|
+
• Estimated: 2-3 hours
|
|
431
|
+
|
|
432
|
+
Increment remains: in-progress
|
|
433
|
+
```
|
|
42
434
|
|
|
43
|
-
|
|
44
|
-
- Prompts to transfer incomplete tasks to new increment
|
|
45
|
-
- OR mark as deferred/cancelled
|
|
46
|
-
- Ensures no work is lost
|
|
435
|
+
### Example 3: Blocked by Outdated Docs
|
|
47
436
|
|
|
48
|
-
|
|
437
|
+
```bash
|
|
438
|
+
/done 0003
|
|
439
|
+
```
|
|
49
440
|
|
|
50
|
-
|
|
441
|
+
**Output**:
|
|
442
|
+
```
|
|
443
|
+
✅ Gate 1: Tasks (100%)
|
|
444
|
+
✅ Gate 2: Tests (passing)
|
|
445
|
+
❌ Gate 3: Docs (CLAUDE.md, README.md outdated)
|
|
51
446
|
|
|
52
|
-
|
|
53
|
-
- Merge PR (if using git workflow)
|
|
54
|
-
- Deploy (if using CI/CD)
|
|
55
|
-
- Create release notes
|
|
447
|
+
PM Decision: ❌ CANNOT close
|
|
56
448
|
|
|
57
|
-
|
|
449
|
+
Blockers:
|
|
450
|
+
• Update CLAUDE.md with new features
|
|
451
|
+
• Add examples to README.md
|
|
452
|
+
• Update CHANGELOG.md
|
|
453
|
+
• Estimated: 1-2 hours
|
|
58
454
|
|
|
59
|
-
|
|
455
|
+
Increment remains: in-progress
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Example 4: Scope Creep - Transfer to Next Increment
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
/done 0004
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
**Output**:
|
|
465
|
+
```
|
|
466
|
+
🤔 Scope creep detected (15 extra tasks)
|
|
467
|
+
|
|
468
|
+
Options:
|
|
469
|
+
A) Complete all (1 more week)
|
|
470
|
+
B) Move to next increment
|
|
471
|
+
C) Split into 2 increments ✅ (recommended)
|
|
60
472
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- [ ] Tests passing
|
|
64
|
-
- [ ] Code reviewed
|
|
65
|
-
- [ ] Documentation updated
|
|
473
|
+
Creating increment 0005 for extra scope...
|
|
474
|
+
✓ Transferred 15 tasks
|
|
66
475
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
476
|
+
Closing increment 0004...
|
|
477
|
+
✅ Completed (original scope)
|
|
478
|
+
|
|
479
|
+
🎉 Increment 0004 closed!
|
|
480
|
+
📋 Increment 0005 ready to plan
|
|
481
|
+
```
|
|
72
482
|
|
|
73
483
|
---
|
|
74
484
|
|
|
75
|
-
##
|
|
485
|
+
## Error Handling
|
|
486
|
+
|
|
487
|
+
### Increment Not Found
|
|
488
|
+
```
|
|
489
|
+
❌ Error: Increment 0001 not found
|
|
490
|
+
|
|
491
|
+
Available increments:
|
|
492
|
+
• 0002-core-enhancements (in-progress)
|
|
493
|
+
• 0003-payment-processing (planned)
|
|
76
494
|
|
|
77
|
-
|
|
495
|
+
Usage: /done <increment-id>
|
|
496
|
+
```
|
|
78
497
|
|
|
498
|
+
### Increment Not In-Progress
|
|
79
499
|
```
|
|
80
|
-
|
|
500
|
+
❌ Error: Cannot close increment 0001 (status: planned)
|
|
81
501
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
502
|
+
Increment must be "in-progress" before closing.
|
|
503
|
+
|
|
504
|
+
Run: /build 0001 to start implementation first.
|
|
505
|
+
```
|
|
86
506
|
|
|
87
|
-
|
|
507
|
+
### Major Blockers Found
|
|
88
508
|
```
|
|
509
|
+
❌ CRITICAL: Major blockers prevent closure
|
|
510
|
+
|
|
511
|
+
Gate 1: ❌ 5 P1 tasks incomplete (38% done)
|
|
512
|
+
Gate 2: ❌ 12 test failures (including security tests)
|
|
513
|
+
Gate 3: ❌ Documentation completely outdated
|
|
514
|
+
|
|
515
|
+
PM Analysis: Increment is NOT ready for closure
|
|
516
|
+
|
|
517
|
+
Recommendation: Continue working on increment
|
|
518
|
+
• Complete critical P1 tasks (estimated 2-3 days)
|
|
519
|
+
• Fix all test failures (estimated 1 day)
|
|
520
|
+
• Update all documentation (estimated 4 hours)
|
|
521
|
+
|
|
522
|
+
Total estimated effort: 3-4 days
|
|
89
523
|
|
|
90
|
-
|
|
524
|
+
Increment remains: in-progress
|
|
525
|
+
|
|
526
|
+
Check progress: /list-increments
|
|
527
|
+
```
|
|
91
528
|
|
|
92
529
|
---
|
|
93
530
|
|
|
94
|
-
##
|
|
531
|
+
## Related Commands
|
|
95
532
|
|
|
96
|
-
- `/
|
|
97
|
-
- `/
|
|
98
|
-
- `/
|
|
99
|
-
- `/
|
|
533
|
+
- `/increment`: Plan new increment
|
|
534
|
+
- `/build`: Execute implementation
|
|
535
|
+
- `/validate`: Validate quality before closing
|
|
536
|
+
- `/list-increments`: List all increments with status
|
|
100
537
|
|
|
101
538
|
---
|
|
102
539
|
|
|
103
|
-
|
|
540
|
+
## Related Agents
|
|
541
|
+
|
|
542
|
+
- `pm`: Product Manager agent (validates completion)
|
|
543
|
+
- `qa-lead`: QA Lead agent (validates tests)
|
|
544
|
+
- `tech-lead`: Tech Lead agent (validates code quality)
|
|
545
|
+
- `docs-writer`: Documentation writer (validates docs)
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Configuration
|
|
550
|
+
|
|
551
|
+
**File**: `.specweave/config.yaml`
|
|
552
|
+
|
|
553
|
+
```yaml
|
|
554
|
+
increment_closure:
|
|
555
|
+
pm_validation:
|
|
556
|
+
enabled: true # ← MUST be true
|
|
557
|
+
strict_mode: true # Require all 3 gates to pass
|
|
558
|
+
|
|
559
|
+
gates:
|
|
560
|
+
tasks:
|
|
561
|
+
require_p1_complete: true
|
|
562
|
+
require_p2_complete: false # P2 can be deferred
|
|
563
|
+
allow_scope_transfer: true
|
|
564
|
+
|
|
565
|
+
tests:
|
|
566
|
+
require_all_passing: true
|
|
567
|
+
min_coverage: 80 # 80% coverage required
|
|
568
|
+
allow_skipped: false
|
|
569
|
+
|
|
570
|
+
documentation:
|
|
571
|
+
require_claude_md: true
|
|
572
|
+
require_readme: true
|
|
573
|
+
require_changelog: true # For public APIs
|
|
574
|
+
allow_inline_only: false
|
|
575
|
+
|
|
576
|
+
scope_creep:
|
|
577
|
+
detect: true
|
|
578
|
+
max_additional_tasks: 10 # Warn if >10 tasks added
|
|
579
|
+
auto_transfer: true # Auto-transfer to next increment
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
**Important**: This command represents PM validation and MUST NOT be bypassed. All 3 gates (tasks, tests, docs) must pass before increment can close.
|
|
585
|
+
|
|
586
|
+
**Best Practice**: Always run `/validate 0001 --quality` before `/done 0001` to catch issues early.
|
|
587
|
+
|
|
588
|
+
**PM Role**: The PM agent acts as the final quality gate, ensuring:
|
|
589
|
+
- ✅ Business value delivered (tasks complete)
|
|
590
|
+
- ✅ Quality maintained (tests passing)
|
|
591
|
+
- ✅ Knowledge preserved (docs updated)
|