One-Line Summary: SPARC (Specification, Pseudocode, Architecture, Refinement, Code) is an agent-driven engineering methodology packaged as a ruflo plugin (ruflo-sparc) — it is the cleanest example of how a software methodology can be encoded as a multi-step agent workflow, not just adopted as a habit.
Prerequisites: Plugin and marketplace systems, role-based orchestration, plan-and-execute
What Is SPARC?
SPARC is a five-stage software-development process:
- Specification — capture requirements unambiguously.
- Pseudocode — sketch the algorithm in language-agnostic form.
- Architecture — decide module boundaries, data flow, file layout.
- Refinement — iteratively improve all of the above.
- Code — implement the result.
As a human methodology, it's recognizable as a careful version of standard practice. As a plugin — ruflo-sparc — each stage is a sub-agent with its own prompt, tool set, and termination criterion, run in sequence with explicit handoffs. The user types /sparc <feature>, and the plugin runs through the five stages in order, surfacing each stage's output for review before proceeding.
Why "Methodology as Plugin" Is a Useful Pattern
Traditional engineering methodologies are documents and habits — adopt the practice, follow the steps. The "methodology as plugin" reframing makes them executable: install the plugin, type the slash command, get the methodology applied. The agent is the discipline that humans struggle to maintain.
This is especially valuable for methodologies with high upfront cost. SPARC's "specification-first" stage is exactly the kind of step engineers skip under time pressure. A plugin that won't let you skip it (or that does it for you) recovers the methodology's benefits.
How It Works
ruflo-sparc is a plugin with:
- Five sub-agent definitions:
sparc-specifier,sparc-pseudocoder,sparc-architect,sparc-refiner,sparc-coder. Each has scoped tools and a tight prompt. - A slash command (
/sparc <task>): the entry point. - An orchestrator hook: chains the five sub-agents, passing each one's output as input to the next.
- Approval gates: between stages, the user can review or edit before proceeding.
The orchestration shape is supervisor-pattern with strictly sequential ordering and human review between each step.
Why It Matters
SPARC is the cleanest worked example of a broader trend: software-engineering methodologies (DDD, ADR, TDD, BDD, code-review checklists) are increasingly distributable as plugins. Adopting the practice no longer requires team-wide buy-in — one person installs the plugin, runs it once, sees the value, and the practice spreads.
For learners, SPARC-as-plugin is also a tour of how multi-stage agent workflows are built. Reading ruflo-sparc's source is a faster way to learn this pattern than designing one from scratch.
Key Technical Details
- Per-stage scope is critical: Each SPARC stage's agent should have only the tools and context relevant to that stage. The architect doesn't need code-execution tools.
- Approval gates need to be skip-able for trusted users: Otherwise SPARC becomes too slow for routine work. Pair gates with a
--skip-gatesmode. - Output formats matter: Specification → Pseudocode → Architecture → Code is a chain of progressively more concrete artifacts. Each stage's output format should be stable so downstream stages can rely on it.
- Reversibility: A user reviewing stage 4 should be able to revise stage 2 without losing stage 3. Plugin should checkpoint between stages.
- Method-specific evals: SPARC's value is the methodology, so eval should measure things like spec-quality, architecture-coherence, not just code quality.
How Harnesses & Frameworks Implement This
| Harness / Framework | Methodology-as-plugin |
|---|---|
| Claude Code | DIY — write a plugin |
| Claude Agent SDK | Programmatic plugin construction |
| ruflo | First-class — ruflo-sparc, ruflo-adr, ruflo-ddd ship as plugins |
| LangGraph | Build as a graph application |
| AutoGen | Build as a group-chat application |
| CrewAI | Build as a crew |
| OpenAI Agents SDK | Build as agents with handoffs |
| Codex CLI / Cursor | Limited |
Connections to Other Concepts
methodology-as-plugin-adr-and-ddd.md— Adjacent examples.plugin-and-marketplace-systems.md— How methodologies ship.role-based-orchestration.md— The orchestration shape SPARC uses.sub-agents-as-primitives.md— The substrate.
Further Reading
- ruvnet, ruflo-sparc documentation and source — Best learning artifact.