From sw
Closes the current work increment after validation checks, then suggests the next increment or backlog item to work on.
How this command is triggered — by the user, by Claude, or both
Slash command
/sw:nextThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Next Increment (Smart Workflow Transition) **CRITICAL**: This command requires **EXPLICIT USER CONFIRMATION** before closing any increment! ## Workflow ### Step 1: Find Active Increment - One in-progress → Validate for closure - Multiple in-progress → Warn about WIP limit, ask which to close - None in-progress → Skip to Step 4 (suggest next work) ### Step 2: PM Validation (3 Gates) #### Gate 1: Tasks Completed - All P1 (critical) tasks completed - All P2 (important) tasks completed OR deferred with reason - P3 tasks completed, deferred, or moved to backlog - No tasks in "blocked" ...
CRITICAL: This command requires EXPLICIT USER CONFIRMATION before closing any increment!
find .specweave/increments -type f -name "spec.md" -exec grep -l "status: in-progress" {} \;
If ALL gates pass — use AskUserQuestion for explicit confirmation:
AskUserQuestion({
questions: [{
header: "Close increment?",
question: "All PM gates passed. Ready to permanently close this increment?",
options: [
{ label: "Yes, close it", description: "Mark as completed (irreversible)" },
{ label: "No, keep open", description: "Stay at ready_for_review status" }
],
multiSelect: false
}]
})
Only on user confirmation: update status → completed, set completion date, generate report, free WIP slot.
If ANY gate fails — present options:
NEVER auto-close! Always give user control.
After successful closure, automatically run sw:qa ${incrementId}. Quality gate: PASS (≥80), CONCERNS (60-79), FAIL (<60). If FAIL, suggest creating follow-up increment.
| Command | Purpose |
|---|---|
sw:do | Execute tasks in increment |
sw:progress | Check status (no action) |
sw:done | Explicit close with validation |
sw:next | Smart transition (close + QA + suggest next) |
npx claudepluginhub anton-abyzov/specweave --plugin sw/nextSuggests the next prioritized action based on current project state, task hierarchy, and quality gates.
/progressChecks project progress, summarizes recent work, and routes to the next action. Also supports --next (auto-advance), --do (freeform dispatch), and --forensic (integrity audit) modes.
/nextGets the next prioritized task and implements it following a strict TDD workflow. Supports dry-run, quiet mode, and check/done steps via agent-foreman.
/nextShows the next pending task with context and related knowledge, then starts working on it on user confirmation.
/nextDecides and executes the next operational step in an Alfred-driven development workflow, resuming sessions, verifying UAT, or mapping codebase as needed.
/nextReads project state and executes the correct next workflow automatically, preserving all gates and validations.