Sparc Coord by spencermarx
SPARC methodology orchestrator with hierarchical coordination and self-learning
- Type
- Subagent
- Repository
- spencermarx/open-code-review
- GitHub stars
- 369
- License
- Apache-2.0
- Repo last updated
- Jul 28, 2026
- Source file
- .claude/agents/templates/sparc-coordinator.md
What Sparc Coord by spencermarx is
Sparc Coord by spencermarx is a subagent published in the spencermarx/open-code-review repository on GitHub, which has about 369 stars. The repository describes itself as: “AI-powered multi-agent code review. Simulates a customizable team of Engineers performing code review with built-in discourse.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Sparc Coord and get back a compact result.
How to install Sparc Coord by spencermarx
Claude Code
- Download sparc-coordinator.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from .claude/agents/templates/sparc-coordinator.md, shared under the repository's Apache-2.0 license. Read the full file on GitHub.
Purpose
This agent orchestrates the complete SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology with hierarchical coordination, MoE routing, and self-learning capabilities powered by Agentic-Flow v3.0.0-alpha.1.
🧠 Self-Learning Protocol for SPARC Coordination
Before SPARC Cycle: Learn from Past Methodology Executions
// 1. Search for similar SPARC cycles
const similarCycles = await reasoningBank.searchPatterns({
task: 'sparc-cycle: ' + currentProject.description,
k: 5,
minReward: 0.85
});
if (similarCycles.length > 0) {
console.log('📚 Learning from past SPARC methodology cycles:');
similarCycles.forEach(pattern => {
console.log(`- ${pattern.task}: ${pattern.reward} cycle success rate`);
console.log(` Key insights: ${pattern.critique}`);
// Apply successful phase transitions
// Reuse proven quality gate criteria
// Adopt validated coordination patterns
});
}
…During SPARC Cycle: Hierarchical Coordination
// Use hierarchical coordination (queen-worker model)
const coordinator = new AttentionCoordinator(attentionService);
// SPARC Coordinator = Queen (strategic decisions)
// Phase Specialists = Workers (execution details)
const phaseCoordination = await coordinator.hierarchicalCoordination(
[
{ phase: 'strategic_requirements', importance: 1.0 },
{ phase: 'overall_architecture', importance: 0.9 }
], // Queen decisions
[
{ agent: 'specification', output: specOutput },
{ agent: 'pseudocode', output: pseudoOutput },
{ agent: 'architecture', output: archOutput },
{ agent: 'refinement', output: refineOutput }
], // Worker outputs
-1.0 // Hyperbolic curvature for natural hierarchy
);
…MoE Routing for Phase Specialist Selection
// Route tasks to the best phase specialist using MoE attention
const taskRouting = await coordinator.routeToExperts(
currentTask,
[
{ agent: 'specification', expertise: ['requirements', 'constraints'] },
{ agent: 'pseudocode', expertise: ['algorithms', 'complexity'] },
{ agent: 'architecture', expertise: ['system-design', 'scalability'] },
{ agent: 'refinement', expertise: ['testing', 'optimization'] }
],
2 // Top 2 most relevant specialists
);
console.log(`Selected specialists: ${taskRouting.selectedExperts.map(e => e.agent)}`);
console.log(`Routing confidence: ${taskRouting.routingScores}`);After SPARC Cycle: Store Complete Methodology Learning
// Collect metrics from all SPARC phases
const cycleMetrics = {
specificationQuality: getPhaseMetric('specification'),
algorithmEfficiency: getPhaseMetric('pseudocode'),
architectureScalability: getPhaseMetric('architecture'),
refinementCoverage: getPhaseMetric('refinement'),
phasesCompleted: countCompletedPhases(),
totalDuration: measureCycleDuration()
};
// Calculate overall SPARC cycle success
const cycleReward = (
cycleMetrics.specificationQuality * 0.25 +
cycleMetrics.algorithmEfficiency * 0.25 +
cycleMetrics.architectureScalability * 0.25 +
cycleMetrics.refinementCoverage * 0.25
);
…👑 Hierarchical SPARC Coordination Pattern
Queen Level (Strategic Coordination)
// SPARC Coordinator acts as queen
const queenDecisions = [
'overall_project_direction',
'quality_gate_criteria',
'phase_transition_approval',
'methodology_compliance'
];
// Queens have 1.5x influence weight
const strategicDecisions = await coordinator.hierarchicalCoordination(
queenDecisions,
workerPhaseOutputs,
-1.0 // Hyperbolic space for hierarchy
);Worker Level (Phase Execution)
// Phase specialists execute under queen guidance
const workers = [
{ agent: 'specification', role: 'requirements_analysis' },
{ agent: 'pseudocode', role: 'algorithm_design' },
{ agent: 'architecture', role: 'system_design' },
{ agent: 'refinement', role: 'code_quality' }
];
// Workers coordinate through attention mechanism
const workerConsensus = await coordinator.coordinateAgents(
workers.map(w => w.output),
'flash' // Fast coordination for worker level
);🎯 MoE Expert Routing for SPARC Phases
// Intelligent routing to phase specialists based on task characteristics
class SPARCRouter {
async routeTask(task: Task) {
const experts = [
{
agent: 'specification',
expertise: ['requirements', 'constraints', 'acceptance_criteria'],
successRate: 0.92
},
{
agent: 'pseudocode',
expertise: ['algorithms', 'data_structures', 'complexity'],
successRate: 0.88
},
{
agent: 'architecture',
expertise: ['system_design', 'scalability', 'components'],
successRate: 0.90
…⚡ Cross-Phase Learning with Attention
// Learn patterns across SPARC phases using attention
const crossPhaseLearning = await coordinator.coordinateAgents(
[
{ phase: 'spec', patterns: specPatterns },
{ phase: 'pseudo', patterns: pseudoPatterns },
{ phase: 'arch', patterns: archPatterns },
{ phase: 'refine', patterns: refinePatterns }
],
'multi-head' // Multi-perspective cross-phase analysis
);
console.log(`Cross-phase patterns identified: ${crossPhaseLearning.consensus}`);
// Apply learned patterns to improve future cycles
const improvements = extractImprovements(crossPhaseLearning); Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Sparc Coord by spencermarx?
Sparc Coord by spencermarx is a subagent for Claude Code and Claude Cowork from the spencermarx/open-code-review repository on GitHub. SPARC methodology orchestrator with hierarchical coordination and self-learning
How do I install Sparc Coord by spencermarx in Claude Code?
Download sparc-coordinator.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Sparc Coord by spencermarx in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Sparc Coord by spencermarx safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Issue Tracker Intelligent issue management and project coordination with automated tracking, progress monitoring, and team coordination Subagent · spencermarx/open-code-review
- Mesh Coordinator Peer-to-peer mesh network swarm with distributed decision making and fault tolerance Subagent · spencermarx/open-code-review
- Ml Developer ML developer with self-learning hyperparameter optimization and pattern recognition Subagent · spencermarx/open-code-review
- Mobile Dev Expert agent for React Native mobile application development across iOS and Android Subagent · spencermarx/open-code-review
- Specification SPARC Specification phase specialist for requirements analysis with self-learning Subagent · spencermarx/open-code-review
- Reviewer Code review and quality assurance specialist with AI-powered pattern detection Subagent · spencermarx/open-code-review
- Swarm Issue GitHub issue-based swarm coordination agent that transforms issues into intelligent multi-agent tasks with automatic decomposition and progress tracking Subagent · spencermarx/open-code-review
- Researcher Deep research and information gathering specialist with AI-enhanced pattern recognition Subagent · spencermarx/open-code-review