Commands Overview
SpecWeave provides commands for every stage of your development workflow. You can invoke them in three ways: natural language, Claude Code slash commands, or CLI commands in other AI tools. This page covers the main workflow commands you'll use daily.
Every SpecWeave command can be triggered three ways:
- Natural language -- Just describe what you want. SpecWeave auto-detects intent.
- Claude Code -- Use
sw:*slash commands for precise control. - Other AI tools -- Use CLI-style
specweave <command>syntax (Cursor, Copilot, Windsurf, Aider).
All examples on this page show all three methods. Pick whichever feels natural.
The Core Workflow
1. Planning Commands
Create New Increment
Most frequently used command - Start every new feature here.
Additional examples:
sw:increment "Payment processing with Stripe"
sw:increment "Real-time notifications"
What it does:
- Detects tech stack automatically
- PM-led planning (market research, spec.md, plan)
- Auto-generates tasks.md from plan
- Creates test strategy
- Strategic agent review (Architect, Security, QA, Tech Lead)
See: ADR (Architecture Decision Records) for design decisions made during planning.
2. Implementation Commands
Execute Tasks
Smart auto-resume - Continue from where you left off.
To target a specific increment:
sw:do 0007 # Specific increment
What it does:
- Resumes from last incomplete task
- Plays sound after each task (via hooks)
- Updates docs inline (CLAUDE.md, README.md, CHANGELOG)
- Syncs to GitHub (if plugin enabled)
- Runs tests continuously
Key Features:
- Cost optimization: Uses Haiku for simple tasks (3x faster, 20x cheaper)
- Automatic hooks: Runs after EVERY task completion
- Living docs sync: Updates
.specweave/docs/after all tasks complete
See: Execute Tasks Documentation
Autonomous Execution
Full autonomous mode - Work until all tasks complete.
Additional examples with options:
sw:auto 0001 0002 0003 # Multiple increments
sw:auto --max-iterations 50 # With limits
sw:auto --all-backlog # All backlog items
What it does:
- Continuous execution until all tasks complete
- Stop hook prevents exit (feedback loop pattern)
- Self-healing test loop (max 3 attempts)
- Self-assessment scoring (pauses on low confidence)
- Auto-execute with credentials (no manual steps)
Safety Features:
- Max iterations limit (default: 100)
- Max hours limit (optional)
- Human gates for sensitive operations
- Circuit breakers for external services
- Low confidence score pauses for review
See: Autonomous Execution Documentation
Check Auto Session Status
Check auto session progress.
Additional options:
sw:auto-status --json # JSON output
See: Auto Status Documentation
Cancel Auto Session
Cancel running auto session.
Additional options:
sw:cancel-auto --force # No confirmation
sw:cancel-auto --reason "Switching to bug fix" # With reason
See: Cancel Auto Documentation
3. Quality Assurance Commands
Validate Increment
120+ checks - Fast, free validation.
Additional options:
sw:validate 0007 --quality # Include AI assessment
sw:validate 0007 --export # Export suggestions to tasks.md
What it validates:
- Consistency (spec -> plan -> tasks)
- Completeness (all required sections)
- Quality (testable criteria, actionable tasks)
- Traceability (AC-IDs, ADR references)
Quality Assessment with Risk Scoring
Comprehensive quality gate - AI-powered assessment with BMAD risk scoring.
Additional options:
sw:qa 0007 --pre # Before starting work
sw:qa 0007 --gate # Before closing increment
sw:qa 0007 --export # Export blockers to tasks.md
7 Quality Dimensions:
- Clarity (18% weight)
- Testability (22% weight)
- Completeness (18% weight)
- Feasibility (13% weight)
- Maintainability (9% weight)
- Edge Cases (9% weight)
- Risk Assessment (11% weight)
Quality Gate Decisions:
- PASS - Ready to proceed
- CONCERNS - Should fix before release
- FAIL - Must fix before proceeding
npx vitest run - Test Coverage Check
npx vitest run 0007
What it checks:
- Per-task coverage (unit, integration, E2E)
- AC-ID coverage (all acceptance criteria tested)
- Overall coverage vs target (80-90%)
- Missing tests and recommendations
4. Completion Commands
Close Increment
PM validation before closing - Ensures quality gates pass.
What it does:
- Validates all tasks complete
- Runs quality gate check
- PM agent validates completion
- Creates completion report
- Closes GitHub issues (if plugin enabled)
Synchronize Living Documentation
Bidirectional sync - Keep strategic docs and implementation in sync.
Additional mode:
sw:sync-docs update # After implementation (update with learnings)
What it syncs:
- ADRs (Proposed -> Accepted)
- Architecture diagrams (planned -> actual)
- API documentation (contracts -> endpoints)
- Feature lists (planned -> completed)
5. Monitoring Commands
Check Increment Progress
To check a specific increment:
sw:progress 0007
What it shows:
- Task completion (15/42 tasks, 36%)
- Time tracking (1.2 weeks elapsed, 2.1 weeks remaining)
- Current phase and next phase
- Recent completions
- Upcoming tasks
Background Jobs Monitor
Monitor long-running operations that continue even after closing Claude.
Additional options:
sw:jobs --follow ae362dfe # Follow progress live
sw:jobs --logs ae362dfe # View worker logs
sw:jobs --kill ae362dfe # Stop running job
sw:jobs --resume ae362dfe # Resume paused job
Job types:
clone-repos- Multi-repo cloning (5-30 min)import-issues- Large issue imports (10-60 min)sync-external- Bidirectional sync (1-10 min)
See: Full Jobs Documentation | Background Jobs Concepts
6. Status Management Commands
Pause Increment
With reason:
sw:pause 0007 --reason "Blocked by external API"
See: Pause Documentation
Resume Increment
See: Resume Documentation
Abandon Increment
With reason:
sw:abandon 0007 --reason "Requirements changed"
All Available Commands
Essential Workflow (Use These!)
| Natural Language | Claude Code | Other AI Tools | Purpose |
|---|---|---|---|
| "Let's build X" | sw:increment "feature" | increment "feature" | Plan new increment |
| "Start implementing" | sw:do | do | Execute tasks |
| "Ship it while I sleep" | sw:auto | auto | Autonomous execution |
| "What's the status?" | sw:progress | progress | Check progress |
| "Show background jobs" | sw:jobs | jobs | Monitor long-running ops |
| "Check quality" | sw:validate | validate | Quick validation |
| "We're done" | sw:done | done | Close increment |
| "Update the docs" | sw:sync-docs | sync-docs | Synchronize living docs |
Auto Mode Commands
| Natural Language | Claude Code | Other AI Tools | Purpose |
|---|---|---|---|
| "Run autonomously" | sw:auto | auto | Start autonomous execution |
| "Check auto status" | sw:auto-status | auto-status | Check session status |
| "Stop auto" | sw:cancel-auto | cancel-auto | Cancel running session |
Status Management
| Natural Language | Claude Code | Other AI Tools | Purpose |
|---|---|---|---|
| "Pause this" | sw:pause | pause | Pause increment (blocked/deprioritized) |
| "Resume work" | sw:resume | resume | Resume paused increment |
| "Abandon this" | sw:abandon | abandon | Abandon incomplete increment |
| "Show status" | sw:status | status | Show increment status overview |
Workflow Example: Standard Feature Development
# 1. Plan new feature (or say "Let's build user authentication")
sw:increment "User authentication"
# -> Creates: spec.md, plan.md, tasks.md
# 2. Review docs (optional — or say "review the docs")
sw:sync-docs review
# -> Review strategic docs before starting
# 3. Pre-check quality (optional — or say "check quality")
sw:qa 0007 --pre
# -> Pre-implementation quality check
# 4. Implement tasks (or say "start implementing" / "ship while I sleep")
sw:do 0007 # Manual execution
sw:auto 0007 # Autonomous execution
# 5. Check progress (or say "what's the status?")
sw:progress 0007
# -> See completion status
# 6. Validate quality (or say "validate it")
sw:qa 0007 --gate
# -> Comprehensive quality gate check
# 7. Check test coverage
npx vitest run 0007
# -> Validate all AC-IDs are tested
# 8. Close increment (or say "we're done")
sw:done 0007
# -> PM validates and closes
# 9. Update living docs (or say "update the docs")
sw:sync-docs update
# -> Sync learnings to strategic docs
Workflow Example: Autonomous Execution
# 1. Plan feature (or say "let's build payment processing")
sw:increment "Payment processing"
# 2. Start autonomous execution (or say "ship while I sleep")
sw:auto 0008 --max-hours 8
# -> Works until all tasks complete (max 8 hours)
# 3. Check status anytime (or say "how's auto going?")
sw:auto-status
# -> See iteration, progress, any gates pending
# 4. Cancel if needed (or say "stop auto")
sw:cancel-auto --reason "Need to pivot"
# -> Generates summary, preserves progress
# 5. Resume work anytime (or say "continue working")
sw:do
# -> Continues from where auto left off
Integration with External Tools
All sync skills are part of the unified sw plugin.
GitHub Issues
# Sync increment to GitHub
sw:github-sync 0007
Automatic sync: When GitHub sync is configured, running implementation (or type sw:do in Claude Code) and closing (or type sw:done in Claude Code) automatically sync to GitHub.
JIRA Integration
# Sync to JIRA
sw:jira-sync 0007
Azure DevOps
# Sync to Azure DevOps
sw:ado-sync 0007
Best Practices
1. Follow the Core Flow
Always use the standard workflow for best results:
- Plan with an increment (or type
sw:incrementin Claude Code) -- START HERE - Implement with do or auto (or type
sw:doorsw:auto) -- MAIN WORK - Check progress (or type
sw:progress) -- VISIBILITY - Validate quality (or type
sw:qa) -- QUALITY GATE - Close the increment (or type
sw:done) -- FINISH - Sync docs (or type
sw:sync-docs) -- KEEP CURRENT
2. Use Auto Mode for Larger Increments
For increments with 10+ tasks, autonomous execution (or type sw:auto in Claude Code) is more efficient:
- No need to keep checking progress
- Self-healing test loops fix issues automatically
- Human gates still require approval
3. Validate Early and Often
# Before starting work
sw:qa 0007 --pre
# Before closing
sw:qa 0007 --gate
4. Check Test Coverage
# Always validate tests before closing
npx vitest run 0007
5. Keep Living Docs Current
# After completing increment
sw:sync-docs update
Configuration
All commands respect .specweave/config.json:
{
"limits": {
"maxActiveIncrements": 1,
"hardCap": 2
},
"auto": {
"enabled": true,
"maxIterations": 100,
"maxHours": 24,
"testCommand": "npm test",
"coverageThreshold": 80,
"humanGated": {
"patterns": ["deploy", "migrate", "publish"],
"timeout": 1800
}
},
"validation": {
"quality_judge": {
"enabled": true,
"always_run": false
}
}
}
Glossary Links
Understanding SpecWeave terminology:
- ADR - Architecture Decision Records
- RFC - Request for Comments (specification format)
- API - Application Programming Interface
- E2E - End-to-End Testing
- Node.js - JavaScript runtime
- REST - RESTful API pattern
- GraphQL - Query language for APIs
- Microservices - Distributed architecture pattern
- IaC - Infrastructure as Code
Next Steps
- Getting Started: Quick Start Guide
- Workflow Guide: Complete Development Workflow
- Quality Gates: Quality Assurance Guide
- Auto Mode: Autonomous Execution Documentation
- GitHub Integration: GitHub Sync Guide
Philosophy:
SpecWeave commands are designed for intelligent automation. The system detects intent, suggests actions, and handles workflow management - you focus on building.