Commands Overview
SpecWeave provides slash commands for every stage of your development workflow. This page covers the main workflow commands you'll use daily.
All SpecWeave commands use the /sw:* namespace prefix. For example: /sw:increment, /sw:do, /sw:auto.
The Core Workflowโ
1. Planning Commandsโ
/sw:increment - Create New Incrementโ
Most frequently used command - Start every new feature here.
/sw:increment "User authentication with JWT"
/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โ
/sw:do - Execute Tasksโ
Smart auto-resume - Continue from where you left off.
/sw:do # Auto-finds active 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: /sw:do Documentation
/sw:auto - Autonomous Execution โญ NEWโ
Full autonomous mode - Work until all tasks complete.
/sw:auto # Current increment
/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
/sw:auto-status - Session Statusโ
Check auto session progress.
/sw:auto-status # Full status
/sw:auto-status --json # JSON output
See: /sw:auto-status Documentation
/sw:cancel-auto - Cancel Sessionโ
Cancel running auto session.
/sw:cancel-auto # Interactive
/sw:cancel-auto --force # No confirmation
/sw:cancel-auto --reason "Switching to bug fix" # With reason
See: /sw:cancel-auto Documentation
3. Quality Assurance Commandsโ
/sw:validate - Rule-Based Validationโ
120+ checks - Fast, free validation.
/sw:validate 0007
/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)
/sw:qa - Quality Assessment with Risk Scoringโ
Comprehensive quality gate - AI-powered assessment with BMAD risk scoring.
/sw:qa 0007 # Quick mode (default)
/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
/sw:check-tests - Test Coverage Checkโ
/sw:check-tests 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โ
/sw:done - Close Incrementโ
PM validation before closing - Ensures quality gates pass.
/sw:done 0007
What it does:
- โ Validates all tasks complete
- โ
Runs
/sw:qa --gate(quality gate check) - โ PM agent validates completion
- โ Creates completion report
- ๐ Closes GitHub issues (if plugin enabled)
/sw:sync-docs - Synchronize Living Documentationโ
Bidirectional sync - Keep strategic docs and implementation in sync.
/sw:sync-docs review # Before implementation (review strategic docs)
/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โ
/sw:progress - Check Increment Progressโ
/sw:progress
/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
/sw:jobs - Background Jobs Monitorโ
Monitor long-running operations that continue even after closing Claude.
/sw:jobs # Show active jobs
/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 /sw:jobs Documentation | Background Jobs Concepts
6. Status Management Commandsโ
/sw:pause - Pause Incrementโ
/sw:pause 0007
/sw:pause 0007 --reason "Blocked by external API"
/sw:resume - Resume Incrementโ
/sw:resume 0007
/sw:abandon - Abandon Incrementโ
/sw:abandon 0007
/sw:abandon 0007 --reason "Requirements changed"
See: /sw:abandon Documentation
All Available Commandsโ
Essential Workflow (Use These!)โ
| Command | Purpose | Priority |
|---|---|---|
/sw:increment | Plan new increment | โญ START HERE |
/sw:do | Execute tasks | โญ MAIN WORK |
/sw:auto | Autonomous execution | โญ HANDS-FREE |
/sw:progress | Check status | โญ VISIBILITY |
/sw:jobs | Monitor background jobs | โญ LONG OPS |
/sw:validate | Quick validation | โญ PRE-CHECK |
/sw:qa | Quality assessment | โญ QUALITY GATE |
/sw:check-tests | Test coverage check | โญ TEST VALIDATION |
/sw:done | Close increment | โญ FINISH |
/sw:sync-docs | Synchronize living docs | โญ KEEP CURRENT |
Auto Mode Commandsโ
| Command | Purpose |
|---|---|
/sw:auto | Start autonomous execution |
/sw:auto-status | Check session status |
/sw:cancel-auto | Cancel running session |
Status Managementโ
| Command | Purpose |
|---|---|
/sw:pause | Pause increment (blocked/deprioritized) |
/sw:resume | Resume paused increment |
/sw:abandon | Abandon incomplete increment |
/sw:status | Show increment status overview |
Workflow Example: Standard Feature Developmentโ
# 1. Plan new feature
/sw:increment "User authentication"
# โ Creates: spec.md, plan.md, tasks.md
# 2. Review docs (optional)
/sw:sync-docs review
# โ Review strategic docs before starting
# 3. Pre-check quality (optional)
/sw:qa 0007 --pre
# โ Pre-implementation quality check
# 4. Implement tasks (choose one)
/sw:do 0007 # Manual execution
/sw:auto 0007 # Autonomous execution
# 5. Check progress
/sw:progress 0007
# โ See completion status
# 6. Validate quality
/sw:qa 0007 --gate
# โ Comprehensive quality gate check
# 7. Check test coverage
/sw:check-tests 0007
# โ Validate all AC-IDs are tested
# 8. Close increment
/sw:done 0007
# โ PM validates and closes
# 9. Update living docs
/sw:sync-docs update
# โ Sync learnings to strategic docs
Workflow Example: Autonomous Executionโ
# 1. Plan feature
/sw:increment "Payment processing"
# 2. Start autonomous execution
/sw:auto 0008 --max-hours 8
# โ Works until all tasks complete (max 8 hours)
# 3. Check status anytime
/sw:auto-status
# โ See iteration, progress, any gates pending
# 4. Cancel if needed
/sw:cancel-auto --reason "Need to pivot"
# โ Generates summary, preserves progress
# 5. Resume work anytime
/sw:do
# โ Continues from where auto left off
Integration with External Toolsโ
GitHub Issues (via sw-github plugin)โ
# Sync increment to GitHub
/sw-github:sync 0007
# View sync status
/sw-github:reconcile
Automatic sync: When GitHub plugin enabled, /sw:do and /sw:done automatically sync to GitHub.
JIRA Integration (via sw-jira plugin)โ
# Sync to JIRA
/sw-jira:sync 0007
Azure DevOps (via sw-ado plugin)โ
# Sync to Azure DevOps
/sw-ado:sync 0007
Best Practicesโ
1. Follow the Core Flowโ
Always use the standard workflow for best results:
/sw:increment- Plan (START HERE)/sw:door/sw:auto- Implement (MAIN WORK)/sw:progress- Check status (VISIBILITY)/sw:qa- Validate quality (QUALITY GATE)/sw:done- Close (FINISH)/sw:sync-docs- Update docs (KEEP CURRENT)
2. Use Auto Mode for Larger Incrementsโ
For increments with 10+ tasks, /sw:auto 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
/sw:check-tests 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: /sw:auto 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.