specweave 1.0.261 → 1.0.263

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.
Files changed (133) hide show
  1. package/.claude-plugin/README.md +0 -2
  2. package/CLAUDE.md +27 -27
  3. package/bin/specweave.js +14 -85
  4. package/dist/dashboard/assets/index-Cv1XUAKk.css +1 -0
  5. package/dist/dashboard/assets/index-DHOztQSu.js +11 -0
  6. package/dist/dashboard/index.html +2 -2
  7. package/dist/src/adapters/README.md +1 -1
  8. package/dist/src/adapters/agents-md-generator.js +1 -1
  9. package/dist/src/adapters/agents-md-generator.js.map +1 -1
  10. package/dist/src/adapters/claude/README.md +8 -8
  11. package/dist/src/adapters/claude/adapter.js +2 -2
  12. package/dist/src/adapters/claude-md-generator.js +2 -2
  13. package/dist/src/adapters/claude-md-generator.js.map +1 -1
  14. package/dist/src/adapters/cursor/README.md +7 -7
  15. package/dist/src/adapters/generic/README.md +2 -2
  16. package/dist/src/cli/commands/create-increment.d.ts +1 -1
  17. package/dist/src/cli/commands/create-increment.js +1 -1
  18. package/dist/src/cli/commands/update.d.ts.map +1 -1
  19. package/dist/src/cli/commands/update.js +64 -1
  20. package/dist/src/cli/commands/update.js.map +1 -1
  21. package/dist/src/cli/helpers/init/api-docs-config.js +7 -7
  22. package/dist/src/cli/helpers/init/api-docs-config.js.map +1 -1
  23. package/dist/src/core/config/types.d.ts +18 -0
  24. package/dist/src/core/config/types.d.ts.map +1 -1
  25. package/dist/src/core/config/types.js +4 -0
  26. package/dist/src/core/config/types.js.map +1 -1
  27. package/dist/src/core/external-tools/external-items-display.d.ts.map +1 -1
  28. package/dist/src/core/external-tools/external-items-display.js +1 -11
  29. package/dist/src/core/external-tools/external-items-display.js.map +1 -1
  30. package/dist/src/core/increment/increment-archiver.js +1 -1
  31. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  32. package/dist/src/core/increment/metadata-manager.js +2 -2
  33. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  34. package/dist/src/core/increment/template-creator.d.ts +1 -1
  35. package/dist/src/core/increment/template-creator.js +4 -4
  36. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts +2 -2
  37. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
  38. package/dist/src/core/lazy-loading/llm-plugin-detector.js +15 -5
  39. package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
  40. package/dist/src/core/living-docs/feature-consistency-validator.js +1 -1
  41. package/dist/src/core/living-docs/feature-consistency-validator.js.map +1 -1
  42. package/dist/src/core/living-docs/scaffolding/scaffold.js +3 -3
  43. package/dist/src/core/notifications/command-integration.d.ts.map +1 -1
  44. package/dist/src/core/notifications/command-integration.js +0 -1
  45. package/dist/src/core/notifications/command-integration.js.map +1 -1
  46. package/dist/src/core/reflection/reflect-handler.js +2 -2
  47. package/dist/src/core/reflection/reflect-handler.js.map +1 -1
  48. package/dist/src/core/validators/ac-presence-validator.d.ts +1 -1
  49. package/dist/src/core/validators/ac-presence-validator.js +3 -3
  50. package/dist/src/core/validators/ac-presence-validator.js.map +1 -1
  51. package/dist/src/dashboard/server/command-runner.d.ts.map +1 -1
  52. package/dist/src/dashboard/server/command-runner.js +2 -2
  53. package/dist/src/dashboard/server/command-runner.js.map +1 -1
  54. package/dist/src/dashboard/server/dashboard-server.d.ts.map +1 -1
  55. package/dist/src/dashboard/server/dashboard-server.js +22 -10
  56. package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
  57. package/dist/src/dashboard/server/data/dashboard-data-aggregator.d.ts +9 -1
  58. package/dist/src/dashboard/server/data/dashboard-data-aggregator.d.ts.map +1 -1
  59. package/dist/src/dashboard/server/data/dashboard-data-aggregator.js +140 -13
  60. package/dist/src/dashboard/server/data/dashboard-data-aggregator.js.map +1 -1
  61. package/dist/src/dashboard/server/data/plugin-scanner.d.ts +1 -1
  62. package/dist/src/dashboard/server/data/plugin-scanner.d.ts.map +1 -1
  63. package/dist/src/dashboard/server/data/plugin-scanner.js +2 -2
  64. package/dist/src/dashboard/server/data/plugin-scanner.js.map +1 -1
  65. package/dist/src/utils/agents-md-compiler.js +1 -1
  66. package/dist/src/utils/agents-md-compiler.js.map +1 -1
  67. package/dist/src/utils/find-project-root.d.ts +5 -4
  68. package/dist/src/utils/find-project-root.d.ts.map +1 -1
  69. package/dist/src/utils/find-project-root.js +8 -10
  70. package/dist/src/utils/find-project-root.js.map +1 -1
  71. package/dist/src/utils/generate-skills-index.js +3 -3
  72. package/dist/src/utils/notification-constants.js +1 -1
  73. package/dist/src/utils/notification-constants.js.map +1 -1
  74. package/package.json +1 -1
  75. package/plugins/FINAL-AUDIT-RECOMMENDATIONS.md +3 -3
  76. package/plugins/specweave/PLUGIN.md +0 -22
  77. package/plugins/specweave/commands/analytics.md +1 -1
  78. package/plugins/specweave/commands/discrepancies.md +0 -1
  79. package/plugins/specweave/commands/living-docs.md +0 -1
  80. package/plugins/specweave/commands/reconcile.md +1 -1
  81. package/plugins/specweave/hooks/hooks.json +19 -0
  82. package/plugins/specweave/hooks/pre-compact.sh +39 -0
  83. package/plugins/specweave/hooks/stop-sync.sh +23 -1
  84. package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +4 -0
  85. package/plugins/specweave/hooks/user-prompt-submit.sh +193 -59
  86. package/plugins/specweave/hooks/v2/dispatchers/post-tool-use-analytics.sh +83 -0
  87. package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +7 -0
  88. package/plugins/specweave/hooks/v2/guards/spec-template-enforcement-guard.sh +1 -1
  89. package/plugins/specweave/hooks/v2/handlers/ac-sync-dispatcher.sh +25 -6
  90. package/plugins/specweave/hooks/v2/handlers/universal-auto-create-dispatcher.sh +21 -3
  91. package/plugins/specweave/hooks/v2/lib/check-provider-enabled.sh +52 -0
  92. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +2 -2
  93. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
  94. package/plugins/specweave/scripts/track-analytics.sh +4 -0
  95. package/plugins/specweave/skills/do/SKILL.md +1 -1
  96. package/plugins/specweave/skills/done/SKILL.md +1 -1
  97. package/plugins/specweave/skills/framework/SKILL.md +4 -4
  98. package/plugins/specweave/skills/increment/SKILL.md +192 -25
  99. package/plugins/specweave/skills/next/SKILL.md +36 -630
  100. package/plugins/specweave/skills/pm/phases/00-deep-interview.md +2 -2
  101. package/plugins/specweave/skills/progress-sync/SKILL.md +7 -25
  102. package/plugins/specweave/skills/spec-generator/SKILL.md +44 -626
  103. package/plugins/specweave/skills/tdd-green/SKILL.md +10 -798
  104. package/plugins/specweave/skills/tdd-red/SKILL.md +8 -136
  105. package/plugins/specweave/skills/tdd-refactor/SKILL.md +15 -147
  106. package/plugins/specweave-github/hooks/github-auto-create-handler.sh +23 -5
  107. package/src/templates/AGENTS.md.template +11 -11
  108. package/src/templates/CLAUDE.md.template +1 -1
  109. package/dist/dashboard/assets/index-CDl14O5G.css +0 -1
  110. package/dist/dashboard/assets/index-CmqBqnWd.js +0 -11
  111. package/plugins/specweave/commands/api-docs.md +0 -672
  112. package/plugins/specweave/commands/check-hooks.md +0 -241
  113. package/plugins/specweave/commands/embed-acs.md +0 -445
  114. package/plugins/specweave/commands/external.md +0 -145
  115. package/plugins/specweave/commands/import-docs.md +0 -212
  116. package/plugins/specweave/commands/migrate-config.md +0 -104
  117. package/plugins/specweave/commands/notifications.md +0 -94
  118. package/plugins/specweave/commands/plugin-validator.md +0 -429
  119. package/plugins/specweave/commands/revert-wip-limit.md +0 -82
  120. package/plugins/specweave/commands/sync-acs.md +0 -342
  121. package/plugins/specweave/commands/sync-specs.md +0 -339
  122. package/plugins/specweave/commands/sync-tasks.md +0 -255
  123. package/plugins/specweave/commands/update-scope.md +0 -351
  124. package/plugins/specweave/commands/validate-features.md +0 -207
  125. package/plugins/specweave/skills/archive-increments/SKILL.md +0 -209
  126. package/plugins/specweave/skills/code-review/SKILL.md +0 -598
  127. package/plugins/specweave/skills/increment-planner/SKILL.md +0 -238
  128. package/plugins/specweave/skills/increment-work-router/SKILL.md +0 -562
  129. package/plugins/specweave/skills/multi-project-spec-mapper/SKILL.md +0 -423
  130. package/plugins/specweave/skills/pm-closure-validation/SKILL.md +0 -542
  131. package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +0 -245
  132. package/plugins/specweave/skills/tdd-orchestrator/SKILL.md +0 -228
  133. package/plugins/specweave/skills/umbrella-repo-detector/SKILL.md +0 -301
@@ -4,165 +4,41 @@ description: Close current increment if ready and suggest next work. Use when sa
4
4
 
5
5
  # Next Increment (Smart Workflow Transition)
6
6
 
7
- **Smart Workflow**: Seamlessly transition from current work to next, with automatic closure validation.
8
-
9
- You are helping the user complete their current increment and move to the next one with intelligent suggestions.
10
-
11
- **CRITICAL**: This command requires **EXPLICIT USER CONFIRMATION** before closing any increment! This prevents the auto-completion bug where increments were marked "completed" without user approval.
12
-
13
- ## Usage
14
-
15
- ```bash
16
- /sw:next
17
- ```
18
-
19
- **No arguments needed** - the command intelligently handles the transition.
20
-
21
- ---
22
-
23
- ## What This Does
24
-
25
- The `/sw:next` command is your **workflow continuation** command. It:
26
-
27
- 1. **Validates current increment** - Checks if work is complete
28
- 2. **Transitions to ready_for_review** - If all tasks done, auto-transitions to `ready_for_review`
29
- 3. **ASKS USER FOR CONFIRMATION** - NEVER auto-closes! Always asks "Ready to close this increment?"
30
- 4. **Closes on explicit approval** - Only marks `completed` if user confirms
31
- 5. **Suggests next work** - Intelligent recommendations from backlog or prompt for new
32
-
33
- ---
7
+ **CRITICAL**: This command requires **EXPLICIT USER CONFIRMATION** before closing any increment!
34
8
 
35
9
  ## Workflow
36
10
 
37
11
  ### Step 1: Find Active Increment
38
12
 
39
13
  ```bash
40
- # Check for in-progress increments
41
14
  find .specweave/increments -type f -name "spec.md" -exec grep -l "status: in-progress" {} \;
42
15
  ```
43
16
 
44
- **Scenarios**:
45
- - One increment in-progress → Validate for closure
46
- - ⚠️ Multiple in-progress → Warn about WIP limit, ask which to close
47
- - ℹ️ None in-progress → Skip to Step 3 (suggest next work)
48
-
49
- ### Step 2: PM Validation Gates (3 Gates)
50
-
51
- **🔥 CRITICAL: Run PM validation like `/done` command**
52
-
53
- Invoke PM validation for the in-progress increment:
54
-
55
- #### Gate 1: Tasks Completed ✅
56
-
57
- Check `tasks.md`:
58
- - [ ] All P1 (critical) tasks completed
59
- - [ ] All P2 (important) tasks completed OR deferred with reason
60
- - [ ] P3 (nice-to-have) tasks completed, deferred, or moved to backlog
61
- - [ ] No tasks in "blocked" state
62
-
63
- **Example check**:
64
- ```
65
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
66
- GATE 1: Tasks Completion
67
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
68
-
69
- Checking tasks.md for increment 0001...
70
-
71
- Priority P1 (Critical): 12 tasks
72
- ✅ 12/12 completed (100%)
73
-
74
- Priority P2 (Important): 18 tasks
75
- ✅ 16/18 completed (89%)
76
- ⚠️ 2 deferred (documented reasons)
77
-
78
- Priority P3 (Nice-to-have): 12 tasks
79
- ✅ 8/12 completed (67%)
80
- 📋 4 moved to backlog
81
-
82
- Status: ✅ PASS
83
- ```
84
-
85
- #### Gate 2: Tests Passing ✅
17
+ - One in-progress → Validate for closure
18
+ - Multiple in-progress → Warn about WIP limit, ask which to close
19
+ - None in-progress → Skip to Step 4 (suggest next work)
86
20
 
87
- Run test suite:
88
- - [ ] All test suites passing (no failures)
89
- - [ ] Test coverage meets requirements (>80% for critical paths)
90
- - [ ] E2E tests passing (if UI exists)
91
- - [ ] No skipped tests without documentation
21
+ ### Step 2: PM Validation (3 Gates)
92
22
 
93
- **Example check**:
94
- ```
95
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
96
- GATE 2: Tests Passing
97
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
98
-
99
- Running test suite...
100
-
101
- Unit Tests: ✅ 47/47 passing (Coverage: 89%)
102
- Integration Tests: ✅ 15/15 passing
103
- E2E Tests: ✅ 8/8 passing
104
-
105
- Status: ✅ PASS
106
- ```
107
-
108
- #### Gate 3: Documentation Updated ✅
109
-
110
- Check documentation:
111
- - [ ] CLAUDE.md updated with new features
112
- - [ ] README.md updated with usage examples
113
- - [ ] CHANGELOG.md updated (if public API changed)
114
- - [ ] API documentation regenerated (if applicable)
23
+ #### Gate 1: Tasks Completed
24
+ - All P1 (critical) tasks completed
25
+ - All P2 (important) tasks completed OR deferred with reason
26
+ - P3 tasks completed, deferred, or moved to backlog
27
+ - No tasks in "blocked" state
115
28
 
116
- **Example check**:
117
- ```
118
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
119
- GATE 3: Documentation Updated
120
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
121
-
122
- Checking documentation updates...
29
+ #### Gate 2: Tests Passing
30
+ - All test suites passing (no failures)
31
+ - Coverage meets target (default 80%+ critical paths)
32
+ - No skipped tests without documentation
123
33
 
124
- CLAUDE.md: Updated with new features
125
- README.md: Examples added
126
- CHANGELOG.md: v0.1.7 entry created
127
- Inline Docs: All functions documented
128
-
129
- Status: ✅ PASS
130
- ```
34
+ #### Gate 3: Documentation Updated
35
+ - CLAUDE.md updated with new features
36
+ - README.md updated with usage examples
37
+ - CHANGELOG.md updated (if public API changed)
131
38
 
132
39
  ### Step 3: Closure Decision
133
40
 
134
- **Based on PM validation results**:
135
-
136
- #### Scenario A: All Gates Pass (ASK USER CONFIRMATION)
137
-
138
- **CRITICAL**: NEVER auto-close! Always ask for user confirmation to prevent the auto-completion bug.
139
-
140
- ```
141
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
142
- PM VALIDATION: ✅ READY TO CLOSE
143
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
144
-
145
- ✅ Gate 1: Tasks (100% P1, 89% P2)
146
- ✅ Gate 2: Tests (70/70 passing, 89% coverage)
147
- ✅ Gate 3: Docs (all current)
148
-
149
- Increment 0001-user-authentication is ready for closure!
150
-
151
- 📋 Status: ready_for_review (awaiting your approval)
152
-
153
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
154
- ⚠️ CONFIRMATION REQUIRED
155
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
156
-
157
- This will permanently mark the increment as COMPLETED.
158
-
159
- Please confirm: Do you want to close this increment?
160
-
161
- A. Yes, close it - I've reviewed the work and it's complete
162
- B. No, keep it open - I need to review or make changes first
163
- ```
164
-
165
- **🔥 CRITICAL**: Use the AskUserQuestion tool to get explicit confirmation:
41
+ **If ALL gates pass** — use AskUserQuestion for explicit confirmation:
166
42
  ```
167
43
  AskUserQuestion({
168
44
  questions: [{
@@ -177,499 +53,29 @@ AskUserQuestion({
177
53
  })
178
54
  ```
179
55
 
180
- **Only if user confirms "Yes"**:
181
- ```
182
- 🎯 Closing increment with your approval...
183
- ✓ Updated status: ready_for_review → completed
184
- ✓ Set completion date: 2025-10-28
185
- ✓ Set approvedAt timestamp
186
- ✓ Generated completion report
187
- ✓ Freed WIP slot (1/2 → 0/2)
188
-
189
- 🎉 Increment 0001 closed successfully!
190
-
191
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
192
- 🔍 POST-CLOSURE QUALITY ASSESSMENT
193
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
194
-
195
- Running quality assessment to validate implementation...
56
+ Only on user confirmation: update status → completed, set completion date, generate report, free WIP slot.
196
57
 
197
- /sw:qa 0001
58
+ **If ANY gate fails** — present options:
59
+ - A. Complete remaining work (recommended)
60
+ - B. Force close and defer incomplete tasks
61
+ - C. Stay on current increment
198
62
 
199
- Overall Score: 87/100 (GOOD)
200
-
201
- Dimension Scores:
202
- Clarity: 92/100 ✓✓
203
- Testability: 85/100 ✓
204
- Completeness: 90/100 ✓✓
205
- Feasibility: 88/100 ✓✓
206
- Maintainability: 85/100 ✓
207
- Edge Cases: 78/100 ✓
208
- Risk Assessment: 75/100 ✓
209
-
210
- Quality Gate Decision: ✅ PASS
211
-
212
- 📋 Quality report saved:
213
- .specweave/increments/0001-user-authentication/reports/qa-post-closure.md
214
-
215
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
216
-
217
- Proceeding to suggest next work...
218
- ```
219
-
220
- #### Scenario B: One or More Gates Fail ❌ (Present Options)
221
-
222
- ```
223
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
224
- PM VALIDATION: ❌ NOT READY TO CLOSE
225
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
226
-
227
- ❌ Gate 1: Tasks - 2 P1 tasks incomplete
228
- ✅ Gate 2: Tests - All passing
229
- ❌ Gate 3: Docs - CLAUDE.md and README.md outdated
230
-
231
- Increment 0001-user-authentication is NOT ready to close.
232
-
233
- Options:
234
- A. Complete remaining work (recommended)
235
- → Finish T005 (password hashing) - 2h
236
- → Finish T008 (JWT validation) - 3h
237
- → Update CLAUDE.md - 30m
238
- → Update README.md - 1h
239
- → Estimated: 6-7 hours
240
-
241
- B. Force close and defer incomplete tasks
242
- → Move T005, T008 to next increment (0002)
243
- → Close 0001 as "completed with deferrals"
244
- → Document deferral reasons
245
-
246
- C. Stay on current increment
247
- → Continue working on 0001
248
- → Run `/specweave do 0001` to resume
249
-
250
- What would you like to do? [A/B/C]
251
- ```
252
-
253
- **🔥 CRITICAL**: NEVER auto-close with incomplete work! Always give user control.
63
+ **NEVER auto-close!** Always give user control.
254
64
 
255
65
  ### Step 3.5: Post-Closure Quality Assessment
256
66
 
257
- **🎯 MANDATORY**: After successful closure, automatically run quality assessment to validate implementation quality.
258
-
259
- **Why This Step Matters**:
260
- - PM validation (Step 2) checks **structural completion** (tasks done, tests pass, docs updated)
261
- - Quality assessment checks **implementation quality** (code quality, architecture, risks)
262
- - Provides retrospective learning and continuous improvement
263
- - Identifies technical debt and areas for future enhancement
264
-
265
- **Implementation**:
266
-
267
- 1. **Invoke QA command automatically**:
268
- ```bash
269
- /sw:qa ${incrementId}
270
- ```
271
-
272
- 2. **Quality assessment evaluates**:
273
- - **7 dimensions**: Clarity, Testability, Completeness, Feasibility, Maintainability, Edge Cases, Risk
274
- - **BMAD risk scoring**: Probability × Impact (0-10 scale)
275
- - **Quality gate decision**: PASS/CONCERNS/FAIL
276
- - **Security vulnerabilities**: OWASP-based checks
277
- - **Architecture quality**: Design patterns, modularity, scalability
278
-
279
- 3. **Generate quality report**:
280
- - Save to `.specweave/increments/####/reports/qa-post-closure.md`
281
- - Include dimension scores, risks identified, recommendations
282
- - Link to specific code locations and acceptance criteria
283
-
284
- 4. **Display results**:
285
- ```
286
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
287
- 🔍 POST-CLOSURE QUALITY ASSESSMENT
288
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
289
-
290
- Overall Score: 87/100 (GOOD) ✓
291
-
292
- Dimension Scores:
293
- Clarity: 92/100 ✓✓
294
- Testability: 85/100 ✓
295
- Completeness: 90/100 ✓✓
296
- Feasibility: 88/100 ✓✓
297
- Maintainability: 85/100 ✓
298
- Edge Cases: 78/100 ✓
299
- Risk Assessment: 75/100 ✓
300
-
301
- Quality Gate Decision: ✅ PASS
302
-
303
- 📋 Full report: .specweave/increments/####/reports/qa-post-closure.md
304
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
305
- ```
306
-
307
- **Quality Gate Decisions**:
308
-
309
- | Decision | Criteria | Action |
310
- |----------|----------|--------|
311
- | ✅ PASS | Score ≥80, No critical risks | Proceed to next work |
312
- | 🟡 CONCERNS | Score 60-79, High risks present | Log concerns, suggest improvements |
313
- | 🔴 FAIL | Score <60, Critical risks present | Create follow-up increment for fixes |
314
-
315
- **If Quality Gate FAILS**:
316
- ```
317
- 🔴 QUALITY GATE: FAIL (Score: 58/100)
318
-
319
- Critical Issues Found:
320
- • CRITICAL RISK: Password storage implementation (9.0/10)
321
- • HIGH RISK: Rate limiting not specified (6.0/10)
322
- • Testability: 45/100 (below threshold)
323
-
324
- Recommendation: Create follow-up increment 0002-security-fixes
325
-
326
- Options:
327
- A. Create follow-up increment now (recommended)
328
- B. Log as technical debt (track in backlog)
329
- C. Continue to next feature (not recommended)
330
-
331
- What would you like to do? [A/B/C]
332
- ```
333
-
334
- **If Quality Gate CONCERNS**:
335
- ```
336
- 🟡 QUALITY GATE: CONCERNS (Score: 72/100)
337
-
338
- Issues to address:
339
- • Edge cases coverage: 65/100 (should be 80+)
340
- • 2 high-priority risks identified
341
- • Recommendations: 5 improvements suggested
342
-
343
- 📋 Review report: .specweave/increments/####/reports/qa-post-closure.md
344
-
345
- These can be addressed in future iterations.
346
- Proceeding to next work...
347
- ```
348
-
349
- **IMPORTANT**: Quality assessment runs AFTER closure to:
350
- - Not block delivery (increment is already closed and shipped)
351
- - Provide learning and continuous improvement
352
- - Identify technical debt for future planning
353
- - Build quality metrics over time
354
-
355
- ### Step 4: Suggest Next Work (After Successful Closure)
356
-
357
- **Intelligent suggestions based on project state**:
358
-
359
- 1. **Check for planned increments in backlog**:
360
- ```bash
361
- ls .specweave/increments/_backlog/*.md
362
- # or
363
- find .specweave/increments -name "spec.md" -exec grep -l "status: planned" {} \;
364
- ```
365
-
366
- 2. **Present options based on findings**:
367
-
368
- **Option A: Backlog items found** ✅
369
- ```
370
- 🎯 Next Work Suggestions
371
-
372
- Found 2 planned increments in backlog:
373
-
374
- 1. 0002-payment-processing (P1)
375
- → Stripe integration, payment flow
376
- → Estimated: 2 weeks
377
- → Dependencies: 0001 (✅ complete)
378
-
379
- 2. 0003-notification-system (P2)
380
- → Email + SMS notifications
381
- → Estimated: 1 week
382
- → Dependencies: None
383
-
384
- Recommendation: Start 0002-payment-processing (P1, ready to go)
385
-
386
- Actions:
387
- A. Start 0002 now → Run `/specweave do 0002`
388
- B. Start 0003 instead → Run `/specweave do 0003`
389
- C. Create new increment → Run `/specweave inc "feature name"`
390
-
391
- What would you like to do? [A/B/C]
392
- ```
393
-
394
- **Option B: No backlog, but in-progress work exists** ⚠️
395
- ```
396
- 🎯 Next Work Suggestions
67
+ After successful closure, automatically run `/sw:qa ${incrementId}`. Quality gate: PASS (≥80), CONCERNS (60-79), FAIL (<60). If FAIL, suggest creating follow-up increment.
397
68
 
398
- Current WIP: 1/2 increments active
399
- Active: 0002-payment-processing (50% complete)
69
+ ### Step 4: Suggest Next Work
400
70
 
401
- Recommendation: Continue 0002-payment-processing
71
+ 1. Check for planned increments in backlog
72
+ 2. Present options: start backlog item, continue in-progress work, or create new increment
402
73
 
403
- Next Action: Run `/specweave do 0002` to resume
404
-
405
- 💡 Tip: Run `/progress 0002` to see current status
406
- ```
407
-
408
- **Option C: Clean slate, no planned work** ✨
409
- ```
410
- 🎯 Next Work Suggestions
411
-
412
- No planned increments found.
413
- Current WIP: 0/2 (both slots available)
414
-
415
- Time to plan your next feature!
416
-
417
- Options:
418
- A. Create new increment → Run `/specweave inc "feature description"`
419
- Example: /specweave inc "Admin dashboard"
420
-
421
- B. Check existing ideas → Look in .specweave/increments/_backlog/
422
- If you have ideas saved, promote them with /sw:increment
423
-
424
- C. Review roadmap → See .specweave/docs/internal/strategy/roadmap.md
425
-
426
- 💡 Tip: Start with the most valuable feature for users!
427
- ```
428
-
429
- ---
430
-
431
- ## Example Workflows
432
-
433
- ### Example 1: Happy Path (Auto-Close and Continue)
434
-
435
- **User**:
436
- ```bash
437
- /sw:next
438
- ```
439
-
440
- **Output**:
441
- ```
442
- 📊 Checking current increment...
443
-
444
- Active: 0001-user-authentication
445
-
446
- 🔍 PM Validation:
447
- ✅ Gate 1: All P1 tasks complete (12/12)
448
- ✅ Gate 2: All tests passing (70/70, 89% coverage)
449
- ✅ Gate 3: Documentation updated
450
-
451
- ✅ All gates passed! Transitioning to ready_for_review...
452
-
453
- 📋 Status: ready_for_review (awaiting your approval)
454
-
455
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
456
- ⚠️ CONFIRMATION REQUIRED
457
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
458
-
459
- This will permanently mark increment 0001 as COMPLETED.
460
-
461
- Please confirm: Do you want to close this increment?
462
- ```
463
-
464
- **🔥 Claude uses AskUserQuestion tool here to get explicit confirmation**
465
-
466
- **User confirms: "Yes, close it"**
467
-
468
- **Output (after confirmation)**:
469
- ```
470
- 🎯 Closing increment with your approval...
471
- ✓ Status: ready_for_review → completed
472
- ✓ Set approvedAt: 2025-10-28
473
- ✓ Completion report generated
474
- ✓ WIP freed (1/2 → 0/2)
475
-
476
- 🎉 Increment 0001 closed successfully!
477
-
478
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
479
- 🔍 POST-CLOSURE QUALITY ASSESSMENT
480
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
481
-
482
- Running quality assessment...
483
-
484
- Overall Score: 87/100 (GOOD) ✓
485
-
486
- Quality Gate Decision: ✅ PASS
487
-
488
- 📋 Report: .specweave/increments/0001-user-authentication/reports/qa-post-closure.md
489
-
490
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
491
-
492
- 🎯 Next Work Suggestions
493
-
494
- Found 1 planned increment:
495
-
496
- 0002-payment-processing (P1)
497
- → Stripe integration, payment flow
498
- → Estimated: 2 weeks
499
- → Dependencies: 0001 (✅ complete)
500
-
501
- Recommendation: Start 0002-payment-processing
502
-
503
- Next Action: Run `/specweave do 0002` to begin
504
-
505
- 💡 Tip: Review spec first with `cat .specweave/increments/0002-payment-processing/spec.md`
506
- ```
507
-
508
- ### Example 2: Incomplete Work (User Decision)
509
-
510
- **User**:
511
- ```bash
512
- /sw:next
513
- ```
514
-
515
- **Output**:
516
- ```
517
- 📊 Checking current increment...
518
-
519
- Active: 0001-user-authentication
520
-
521
- 🔍 PM Validation:
522
- ❌ Gate 1: 2 P1 tasks incomplete (10/12)
523
- ✅ Gate 2: All tests passing
524
- ❌ Gate 3: README.md not updated
525
-
526
- Increment 0001 is NOT ready to close.
527
-
528
- Blockers:
529
- • T010: Add rate limiting (P1) - 2 hours
530
- • T012: Add password reset (P1) - 3 hours
531
- • README.md update - 1 hour
532
-
533
- Options:
534
- A. Complete remaining work (recommended) → 6 hours
535
- B. Force close and defer T010, T012 to 0002
536
- C. Stay on 0001 and continue working
537
-
538
- What would you like to do? [A/B/C] _
539
- ```
540
-
541
- **User types "A"**:
542
- ```
543
- ✅ Good choice! Let's finish 0001 properly.
544
-
545
- Next Action: Run `/specweave do 0001` to resume at T010
546
-
547
- 💡 Tip: `/specweave progress` shows your current status anytime
548
- ```
549
-
550
- ### Example 3: No Active Work (Clean Start)
551
-
552
- **User**:
553
- ```bash
554
- /sw:next
555
- ```
556
-
557
- **Output**:
558
- ```
559
- 📊 Checking current increment...
560
-
561
- No active increments found.
562
-
563
- Recent work:
564
- ✅ 0001-user-authentication (closed 2 days ago)
565
- ✅ 0002-payment-processing (closed 1 week ago)
566
-
567
- Current WIP: 0/2 (both slots available)
568
-
569
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
570
-
571
- 🎯 Next Work Suggestions
572
-
573
- No planned increments found. Time to plan new work!
574
-
575
- Options:
576
- 1. Create new increment:
577
- → Run `/specweave inc "feature description"`
578
- → Example: /specweave inc "Admin dashboard"
579
-
580
- 2. Check backlog for ideas:
581
- → Look in .specweave/increments/_backlog/
582
- → Promote with `/specweave inc "feature name"`
583
-
584
- 3. Review roadmap:
585
- → See .specweave/docs/internal/strategy/roadmap.md
586
-
587
- 💡 Tip: Focus on the most valuable feature for users!
588
- ```
589
-
590
- ### Example 4: Multiple In-Progress (WIP Limit Warning)
591
-
592
- **User**:
593
- ```bash
594
- /sw:next
595
- ```
596
-
597
- **Output**:
598
- ```
599
- 📊 Checking current increment...
600
-
601
- ⚠️ Warning: Multiple increments in-progress (2/2 at WIP limit)
602
-
603
- Active increments:
604
- 1. 0002-payment-processing (50% complete)
605
- → Last activity: 2 hours ago
606
- → Next task: T008
607
-
608
- 2. 0003-notification-system (25% complete)
609
- → Last activity: 1 day ago
610
- → Next task: T004
611
-
612
- Recommendation: Focus on completing one before starting new work.
613
-
614
- Which increment should we focus on closing?
615
- A. Close 0002-payment-processing
616
- B. Close 0003-notification-system
617
- C. Cancel (continue working as-is)
618
-
619
- Your choice? [A/B/C] _
620
- ```
621
-
622
- ---
623
-
624
- ## Key Differences from Other Commands
625
-
626
- | Command | Purpose | When to Use |
627
- |---------|---------|-------------|
628
- | `/sw:increment "feature"` | Create NEW increment with specific feature | Starting fresh work |
629
- | `/sw:do` | Execute tasks in increment | Implementing planned work |
630
- | `/sw:progress` | Check status (no action) | Quick status check |
631
- | `/sw:done` | Explicitly close increment | Manual closure with validation |
632
- | `/sw:qa` | Quality assessment only | Standalone QA check |
633
- | `/sw:next` ⭐ | **Smart transition** (close + QA + suggest next) | **Natural workflow continuation** |
634
-
635
- **Why `/sw:next` is special**:
636
- - ✅ Combines validation + closure + **quality assessment** + suggestion in one command
637
- - ✅ No need to remember `/sw:done` then `/sw:qa` then `/sw:increment` sequence
638
- - ✅ Intelligent suggestions (backlog, WIP, new work)
639
- - ✅ User stays in control (never forces actions)
640
- - ✅ Natural "what's next?" workflow
641
- - ✅ Automatic post-closure quality assessment
642
-
643
- ---
644
-
645
- ## Best Practices
646
-
647
- 1. **Run `/sw:next` when you feel done** - It validates completion and suggests next steps
648
- 2. **Trust the PM validation** - If gates fail, there's unfinished work
649
- 3. **Follow recommendations** - Backlog items are already planned
650
- 4. **Keep WIP limit in mind** - Don't force multiple increments
651
- 5. **Use `/specweave progress` for status** - `/next` is for transitions
652
-
653
- ---
654
-
655
- ## Related Commands
656
-
657
- - `/inc` - Create new increment (PM-led planning)
658
- - `/specweave do` - Execute tasks (auto-resumes)
659
- - `/specweave progress` - Check status
660
- - `/done` - Manual closure with PM validation
661
- - `/list-increments` - View all increments
662
-
663
- ---
664
-
665
- ## Configuration
666
-
667
- Auto-close uses sensible defaults:
668
- - PM validation gates must pass (tasks, tests, docs)
669
- - P1 tasks required, P2 can be deferred
670
- - Tests must pass with 80% coverage
671
- - Documentation must be updated
672
-
673
- ---
74
+ ## Key Differences
674
75
 
675
- **💡 Remember**: `/next` is your **"I'm done, what's next?"** command. It handles the transition intelligently so you can stay in flow!
76
+ | Command | Purpose |
77
+ |---------|---------|
78
+ | `/sw:do` | Execute tasks in increment |
79
+ | `/sw:progress` | Check status (no action) |
80
+ | `/sw:done` | Explicit close with validation |
81
+ | `/sw:next` | **Smart transition** (close + QA + suggest next) |