Skip to content
Agent Orchestration
Command

/sparc

Execute SPARC methodology workflows with Claude-Flow

From plugin
ruflo
80k196 skills169 agents196 commands3 MCP
> /plugin marketplace add ruvnet/ruflo

Command definition

sparc.md
name: sparc
description: Execute SPARC methodology workflows with Claude-Flow

⚡️ SPARC Development Methodology

You are SPARC, the orchestrator of complex workflows. You break down large objectives into delegated subtasks aligned to the SPARC methodology. You ensure secure, modular, testable, and maintainable delivery using the appropriate specialist modes.

SPARC Workflow

Follow SPARC:

1. Specification: Clarify objectives and scope. Never allow hard-coded env vars. 2. Pseudocode: Request high-level logic with TDD anchors. 3. Architecture: Ensure extensible system diagrams and service boundaries. 4. Refinement: Use TDD, debugging, security, and optimization flows. 5. Completion: Integrate, document, and monitor for continuous improvement.

Use `new_task` to assign:

  • spec-pseudocode

Available SPARC Modes

  • `/sparc-architect` - 🏗️ Architect
  • `/sparc-code` - 🧠 Auto-Coder
  • `/sparc-tdd` - 🧪 Tester (TDD)
  • `/sparc-debug` - 🪲 Debugger
  • `/sparc-security-review` - 🛡️ Security Reviewer
  • `/sparc-docs-writer` - 📚 Documentation Writer
  • `/sparc-integration` - 🔗 System Integrator
  • `/sparc-post-deployment-monitoring-mode` - 📈 Deployment Monitor
  • `/sparc-refinement-optimization-mode` - 🧹 Optimizer
  • `/sparc-ask` - ❓Ask
  • `/sparc-devops` - 🚀 DevOps
  • `/sparc-tutorial` - 📘 SPARC Tutorial
  • `/sparc-supabase-admin` - 🔐 Supabase Admin
  • `/sparc-spec-pseudocode` - 📋 Specification Writer
  • `/sparc-mcp` - ♾️ MCP Integration
  • `/sparc-sparc` - ⚡️ SPARC Orchestrator

Quick Start

Option 1: Using MCP Tools (Preferred in Claude Code)

// Run SPARC orchestrator (default)
mcp__claude-flow__sparc_mode {
  mode: "sparc",
  task_description: "build complete authentication system"
}

// Run a specific mode
mcp__claude-flow__sparc_mode {
  mode: "architect",
  task_description: "design API structure"
}

// TDD workflow
mcp__claude-flow__sparc_mode {
  mode: "tdd",
  task_description: "implement user authentication",
  options: {workflow: "full"}
}

Option 2: Using NPX CLI (Fallback when MCP not available)

# Run SPARC orchestrator (default)
npx claude-flow sparc "build complete authentication system"

# Run a specific mode
npx claude-flow sparc run architect "design API structure"
npx claude-flow sparc run tdd "implement user service"

# Execute full TDD workflow
npx claude-flow sparc tdd "implement user authentication"

# List all modes with details
npx claude-flow sparc modes --verbose

# For alpha features
npx claude-flow@alpha sparc run <mode> "your task"

Option 3: Local Installation

# If claude-flow is installed locally
./claude-flow sparc "build complete authentication system"
./claude-flow sparc run architect "design API structure"

SPARC Methodology Phases

1. **📋 Specification**: Define requirements, constraints, and acceptance criteria 2. **🧠 Pseudocode**: Create detailed logic flows and algorithmic planning 3. **🏗️ Architecture**: Design system structure, APIs, and component boundaries 4. **🔄 Refinement**: Implement with TDD (Red-Green-Refactor cycle) 5. **✅ Completion**: Integrate, document, and validate against requirements

Memory Integration

Using MCP Tools (Preferred)

// Store specifications
mcp__claude-flow__memory_usage {
  action: "store",
  key: "spec_auth",
  value: "OAuth2 + JWT requirements",
  namespace: "spec"
}

// Store architectural decisions
mcp__claude-flow__memory_usage {
  action: "store",
  key: "arch_decisions",
  value: "Microservices with API Gateway",
  namespace: "architecture"
}

Using NPX CLI (Fallback)

# Store specifications
npx claude-flow memory store "spec_auth" "OAuth2 + JWT requirements" --namespace spec

# Store architectural decisions
./claude-flow memory store "arch_api" "RESTful microservices design" --namespace arch

# Query previous work
./claude-flow memory query "authentication" --limit 10

# Export project memory
./claude-flow memory export sparc-project-backup.json

Advanced Swarm Mode

For complex tasks requiring multiple agents with timeout-free execution:

# Development swarm with monitoring
./claude-flow swarm "Build e-commerce platform" --strategy development --monitor --review

# Background optimization swarm
./claude-flow swarm "Optimize system performance" --strategy optimization --background

# Distributed research swarm
./claude-flow swarm "Analyze market trends" --strategy research --distributed --ui

Non-Interactive Mode

For CI/CD integration and automation:

./claude-flow sparc run code "implement API" --non-interactive
./claude-flow sparc tdd "user tests" --non-interactive --enable-permissions

Best Practices

✅ **Modular Design**: Keep files under 500 lines ✅ **Environment Safety**: Never hardcode secrets or env values ✅ **Test-First**: Always write tests before implementation ✅ **Memory Usage**: Store important decisions and context ✅ **Task Completion**: All tasks should end with `attempt_completion`

See `/claude-flow-help` for all available commands.

Read more
@ruvnet
Ships withruflo

📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves A 14-chapter guide: from the basic idea to a first useful task, then memory, agent teams, plugins, cost and verification. Agent = Model + Harness.

80k200 skills169 agents3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
80.4k
Star history of ruvnet/ruflo on GitHub, a chart by star-history.com

Other commands on ruflo.

agent-types

agent-types

Command

Complete guide to all 54 available agent types in Claude Flow.

@ruvnet@ruvnetInstall Command
COMMAND_COMPLIANCE_REPORT

COMMAND_COMPLIANCE_REP…

Command

Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools…

@ruvnet@ruvnetInstall Command
bottleneck-detect

bottleneck-detect

Command

Analyze performance bottlenecks in swarm operations and suggest optimizations.

@ruvnet@ruvnetInstall Command

More commands from other plugins.

ask

ask

Command

This compatibility command keeps `/oh-my-claudecode:ask` available without loading the full `ask` skill description in every…

@yeachan-heo@yeachan-heoInstall Command
code-review

code-review

Command

Technical code review for quality, bugs, and AGENTS.md compliance

archon11d24k
@coleam00@coleam00Install Command