Skip to main content

Commands Overview

SpecWeave provides slash commands for every stage of your development workflow. This page covers the main workflow commands you'll use daily.

Command Prefix

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

See: /sw:auto Documentation


/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:

  1. Clarity (18% weight)
  2. Testability (22% weight)
  3. Completeness (18% weight)
  4. Feasibility (13% weight)
  5. Maintainability (9% weight)
  6. Edge Cases (9% weight)
  7. 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"

See: /sw:pause Documentation


/sw:resume - Resume Incrementโ€‹

/sw:resume 0007

See: /sw:resume Documentation


/sw:abandon - Abandon Incrementโ€‹

/sw:abandon 0007
/sw:abandon 0007 --reason "Requirements changed"

See: /sw:abandon Documentation


All Available Commandsโ€‹

Essential Workflow (Use These!)โ€‹

CommandPurposePriority
/sw:incrementPlan new incrementโญ START HERE
/sw:doExecute tasksโญ MAIN WORK
/sw:autoAutonomous executionโญ HANDS-FREE
/sw:progressCheck statusโญ VISIBILITY
/sw:jobsMonitor background jobsโญ LONG OPS
/sw:validateQuick validationโญ PRE-CHECK
/sw:qaQuality assessmentโญ QUALITY GATE
/sw:check-testsTest coverage checkโญ TEST VALIDATION
/sw:doneClose incrementโญ FINISH
/sw:sync-docsSynchronize living docsโญ KEEP CURRENT

Auto Mode Commandsโ€‹

CommandPurpose
/sw:autoStart autonomous execution
/sw:auto-statusCheck session status
/sw:cancel-autoCancel running session

Status Managementโ€‹

CommandPurpose
/sw:pausePause increment (blocked/deprioritized)
/sw:resumeResume paused increment
/sw:abandonAbandon incomplete increment
/sw:statusShow 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:

  1. /sw:increment - Plan (START HERE)
  2. /sw:do or /sw:auto - Implement (MAIN WORK)
  3. /sw:progress - Check status (VISIBILITY)
  4. /sw:qa - Validate quality (QUALITY GATE)
  5. /sw:done - Close (FINISH)
  6. /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
}
}
}

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

View full glossary โ†’


Next Stepsโ€‹


Philosophy:

SpecWeave commands are designed for intelligent automation. The system detects intent, suggests actions, and handles workflow management - you focus on building.