SPARC Methodology
SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) is a
systematic development lifecycle wired into Claude Flow's multi-agent
orchestration. It offers 17 specialized modes covering research, architecture,
TDD, review, and deployment. This guide is the quick-path; the deep detail lives
in references/.
When to use
Reach for SPARC when a task benefits from a structured, multi-phase lifecycle with
coordinated agents — e.g. building a feature from requirements through tested,
reviewed, deployed code, or running a spec→design→TDD→review pipeline.
When not to use
- Full quality engineering with 34 agents, coverage gates, and defect prediction — use build-with-quality.
- GitHub-specific code-review swarms on PRs — use github-code-review.
- Queen-led hive-mind / Byzantine consensus without a full dev lifecycle — use hive-mind-advanced.
- PRD-to-documentation generation without the SPARC lifecycle — use prd2build.
- Raw swarm-coordination primitives (quick mesh/star/ring, load balancing) without methodology overhead — use swarm-advanced.
- Simple single-file changes that need no multi-phase orchestration — edit directly.
Core philosophy
Specification before code · design before implementation · tests before features ·
review everything · document continuously. Emphasises TDD, parallel agent
execution, persistent Memory sharing across agents/sessions, and modular design.
The five phases
| Phase |
Goal |
Key modes |
| 1. Specification |
Requirements, constraints, success criteria, pseudocode planning |
researcher, analyzer, memory-manager |
| 2. Architecture |
System structure, interfaces, schema, API contracts, infra |
architect, designer, orchestrator |
| 3. Refinement (TDD) |
Failing tests → minimum code → pass → refactor → iterate |
tdd, coder, tester |
| 4. Review |
Quality, security, performance, best-practice validation |
reviewer, optimizer, debugger |
| 5. Completion |
Integration, deployment, monitoring, docs, knowledge capture |
workflow-manager, documenter, memory-manager |
The 17 modes span core orchestration (orchestrator, swarm-coordinator,
workflow-manager, batch-executor), development (coder, architect, tdd,
reviewer), analysis/research (researcher, analyzer, optimizer), and
creative/support (designer, innovator, documenter, debugger, tester,
memory-manager). Full per-mode capabilities, quality standards, and usage
snippets: references/modes.md.
Quick path
mcp__claude-flow__sparc_mode is the primary, verified path — run a single mode:
mcp__claude-flow__sparc_mode { mode: "coder", task_description: "implement JWT auth" }
Claude Code only: the MCP tool above requires an MCP client. On Codex / GPT-6 Astra:
run the phase sequentially in one session using the mode's prompt from
references/modes.md instead.
Historical (v2, not current): earlier docs showed a claude-flow sparc modes|run|tdd| pipeline|batch CLI. The installed ruflo v3.38.21 binary has no sparc subcommand
(claude-flow sparc --help → "Unknown command: sparc") — that surface does not exist
in this image. Use the MCP tool above.
For complex work, initialize a swarm first, then spawn agents and monitor:
mcp__claude-flow__swarm_init { topology: "hierarchical", strategy: "adaptive", maxAgents: 8 }
mcp__claude-flow__sparc_mode { mode: "orchestrator", task_description: "coordinate feature dev" }
mcp__claude-flow__swarm_status { swarmId: "current" }
References
- references/modes.md — the five phases in depth and all 17 modes (capabilities, quality standards, usage snippets).
- references/orchestration.md — activation methods (MCP / NPX / local), the five swarm topologies, and the complete TDD + red-green-refactor workflows.
- references/cookbook.md — best practices (Memory, batching, hooks, coverage, file layout), worked integration examples (full-stack, innovation, legacy refactor), common CLI workflows, advanced features (neural training, cross-session memory, GitHub, monitoring), and performance context.
Working principles
- Memory for coordination: store architectural decisions and share across agents/sessions (
memory_store / memory_retrieve).
- Batch related operations in a single message rather than one call per message.
- Wire hooks (
pre-task / post-edit / post-task) for lifecycle coordination.
- Target ~90% coverage and document as you build.
See
references/cookbook.md for the full detail on each.
1---2name: sparc-methodology3description: SPARC — a systematic 5-phase development lifecycle (Specification, Pseudocode, Architecture, Refinement, Completion) run through Claude Flow multi-agent orchestration. Use when driving a feature from spec through review and deployment with coordinated agents, or when you want a structured spec→design→TDD→review→completion pipeline rather than ad-hoc edits.4---56# SPARC Methodology78SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) is a9systematic development lifecycle wired into Claude Flow's multi-agent10orchestration. It offers 17 specialized modes covering research, architecture,11TDD, review, and deployment. This guide is the quick-path; the deep detail lives12in `references/`.1314## When to use1516Reach for SPARC when a task benefits from a structured, multi-phase lifecycle with17coordinated agents — e.g. building a feature from requirements through tested,18reviewed, deployed code, or running a spec→design→TDD→review pipeline.1920## When not to use2122- Full quality engineering with 34 agents, coverage gates, and defect prediction — use **build-with-quality**.23- GitHub-specific code-review swarms on PRs — use **github-code-review**.24- Queen-led hive-mind / Byzantine consensus without a full dev lifecycle — use **hive-mind-advanced**.25- PRD-to-documentation generation without the SPARC lifecycle — use **prd2build**.26- Raw swarm-coordination primitives (quick mesh/star/ring, load balancing) without methodology overhead — use **swarm-advanced**.27- Simple single-file changes that need no multi-phase orchestration — edit directly.2829## Core philosophy3031Specification before code · design before implementation · tests before features ·32review everything · document continuously. Emphasises TDD, parallel agent33execution, persistent Memory sharing across agents/sessions, and modular design.3435## The five phases3637| Phase | Goal | Key modes |38|-------|------|-----------|39| 1. Specification | Requirements, constraints, success criteria, pseudocode planning | `researcher`, `analyzer`, `memory-manager` |40| 2. Architecture | System structure, interfaces, schema, API contracts, infra | `architect`, `designer`, `orchestrator` |41| 3. Refinement (TDD) | Failing tests → minimum code → pass → refactor → iterate | `tdd`, `coder`, `tester` |42| 4. Review | Quality, security, performance, best-practice validation | `reviewer`, `optimizer`, `debugger` |43| 5. Completion | Integration, deployment, monitoring, docs, knowledge capture | `workflow-manager`, `documenter`, `memory-manager` |4445The 17 modes span core orchestration (`orchestrator`, `swarm-coordinator`,46`workflow-manager`, `batch-executor`), development (`coder`, `architect`, `tdd`,47`reviewer`), analysis/research (`researcher`, `analyzer`, `optimizer`), and48creative/support (`designer`, `innovator`, `documenter`, `debugger`, `tester`,49`memory-manager`). Full per-mode capabilities, quality standards, and usage50snippets: **[references/modes.md](references/modes.md)**.5152## Quick path5354`mcp__claude-flow__sparc_mode` is the primary, verified path — run a single mode:5556```javascript57mcp__claude-flow__sparc_mode { mode: "coder", task_description: "implement JWT auth" }58```5960Claude Code only: the MCP tool above requires an MCP client. On Codex / GPT-6 Astra:61run the phase sequentially in one session using the mode's prompt from62[references/modes.md](references/modes.md) instead.6364Historical (v2, not current): earlier docs showed a `claude-flow sparc modes|run|tdd|65pipeline|batch` CLI. The installed ruflo v3.38.21 binary has no `sparc` subcommand66(`claude-flow sparc --help` → "Unknown command: sparc") — that surface does not exist67in this image. Use the MCP tool above.6869For complex work, initialize a swarm first, then spawn agents and monitor:7071```javascript72mcp__claude-flow__swarm_init { topology: "hierarchical", strategy: "adaptive", maxAgents: 8 }73mcp__claude-flow__sparc_mode { mode: "orchestrator", task_description: "coordinate feature dev" }74mcp__claude-flow__swarm_status { swarmId: "current" }75```7677## References7879- **[references/modes.md](references/modes.md)** — the five phases in depth and all 17 modes (capabilities, quality standards, usage snippets).80- **[references/orchestration.md](references/orchestration.md)** — activation methods (MCP / NPX / local), the five swarm topologies, and the complete TDD + red-green-refactor workflows.81- **[references/cookbook.md](references/cookbook.md)** — best practices (Memory, batching, hooks, coverage, file layout), worked integration examples (full-stack, innovation, legacy refactor), common CLI workflows, advanced features (neural training, cross-session memory, GitHub, monitoring), and performance context.8283## Working principles8485- **Memory for coordination**: store architectural decisions and share across agents/sessions (`memory_store` / `memory_retrieve`).86- **Batch related operations** in a single message rather than one call per message.87- **Wire hooks** (`pre-task` / `post-edit` / `post-task`) for lifecycle coordination.88- **Target ~90% coverage** and document as you build.89See `references/cookbook.md` for the full detail on each.