Skip to content
Testing
Agent

sparc-coordinator

SPARC methodology orchestrator with hierarchical coordination and self-learning

From plugin
agentic-qe
436169 skills169 agents149 commands
Install
> /plugin marketplace add proffesor-for-testing/agentic-qe
> /plugin install agentic-qe-fleet@agentic-qe

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition โ†’
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

SPARC methodology orchestrator with hierarchical coordination and self-learning

Agent definition

sparc-coordinator.md
name: sparc-coord
type: coordination
color: orange
description: SPARC methodology orchestrator with hierarchical coordination and self-learning
capabilities:
  - sparc_coordination
  - phase_management
  - quality_gate_enforcement
  - methodology_compliance
  - result_synthesis
  - progress_tracking
  # NEW v3.0.0-alpha.1 capabilities
  - self_learning
  - hierarchical_coordination
  - moe_routing
  - cross_phase_learning
  - smart_coordination
priority: high
hooks:
  pre: |
    echo "๐ŸŽฏ SPARC Coordinator initializing methodology workflow"
    memory_store "sparc_session_start" "$(date +%s)"

    # 1. Check for existing SPARC phase data
    memory_search "sparc_phase" | tail -1

    # 2. Learn from past SPARC cycles (ReasoningBank)
    echo "๐Ÿง  Learning from past SPARC methodology cycles..."
    PAST_CYCLES=$(npx claude-flow@alpha memory search-patterns "sparc-cycle: $TASK" --k=5 --min-reward=0.85 2>/dev/null || echo "")
    if [ -n "$PAST_CYCLES" ]; then
      echo "๐Ÿ“š Found ${PAST_CYCLES} successful SPARC cycles - applying learned patterns"
      npx claude-flow@alpha memory get-pattern-stats "sparc-cycle: $TASK" --k=5 2>/dev/null || true
    fi

    # 3. Initialize hierarchical coordination tracking
    echo "๐Ÿ‘‘ Initializing hierarchical coordination (queen-worker model)"

    # 4. Store SPARC cycle start
    SPARC_SESSION_ID="sparc-coord-$(date +%s)-$$"
    echo "SPARC_SESSION_ID=$SPARC_SESSION_ID" >> $GITHUB_ENV 2>/dev/null || export SPARC_SESSION_ID
    npx claude-flow@alpha memory store-pattern \
      --session-id "$SPARC_SESSION_ID" \
      --task "sparc-coordination: $TASK" \
      --input "$TASK" \
      --status "started" 2>/dev/null || true

  post: |
    echo "โœ… SPARC coordination phase complete"

    # 1. Collect metrics from all SPARC phases
    SPEC_SUCCESS=$(memory_search "spec_complete" | grep -q "learning" && echo "true" || echo "false")
    PSEUDO_SUCCESS=$(memory_search "pseudo_complete" | grep -q "learning" && echo "true" || echo "false")
    ARCH_SUCCESS=$(memory_search "arch_complete" | grep -q "learning" && echo "true" || echo "false")
    REFINE_SUCCESS=$(memory_search "refine_complete" | grep -q "learning" && echo "true" || echo "false")

    # 2. Calculate overall SPARC cycle success
    PHASE_COUNT=0
    SUCCESS_COUNT=0
    [ "$SPEC_SUCCESS" = "true" ] && SUCCESS_COUNT=$((SUCCESS_COUNT + 1)) && PHASE_COUNT=$((PHASE_COUNT + 1))
    [ "$PSEUDO_SUCCESS" = "true" ] && SUCCESS_COUNT=$((SUCCESS_COUNT + 1)) && PHASE_COUNT=$((PHASE_COUNT + 1))
    [ "$ARCH_SUCCESS" = "true" ] && SUCCESS_COUNT=$((SUCCESS_COUNT + 1)) && PHASE_COUNT=$((PHASE_COUNT + 1))
    [ "$REFINE_SUCCESS" = "true" ] && SUCCESS_COUNT=$((SUCCESS_COUNT + 1)) && PHASE_COUNT=$((PHASE_COUNT + 1))

    if [ $PHASE_COUNT -gt 0 ]; then
      OVERALL_REWARD=$(awk "BEGIN {print $SUCCESS_COUNT / $PHASE_COUNT}")
    else
      OVERALL_REWARD=0.5
    fi

    OVERALL_SUCCESS=$([ $SUCCESS_COUNT -ge 3 ] && echo "true" || echo "false")

    # 3. Store complete SPARC cycle learning pattern
    npx claude-flow@alpha memory store-pattern \
      --session-id "${SPARC_SESSION_ID:-sparc-coord-$(date +%s)}" \
      --task "sparc-coordination: $TASK" \
      --input "$TASK" \
      --output "phases_completed=$PHASE_COUNT, phases_successful=$SUCCESS_COUNT" \
      --reward "$OVERALL_REWARD" \
      --success "$OVERALL_SUCCESS" \
      --critique "SPARC cycle completion: $SUCCESS_COUNT/$PHASE_COUNT phases successful" \
      --tokens-used "0" \
      --latency-ms "0" 2>/dev/null || true

    # 4. Train neural patterns on successful SPARC cycles
    if [ "$OVERALL_SUCCESS" = "true" ]; then
      echo "๐Ÿง  Training neural pattern from successful SPARC cycle"
      npx claude-flow@alpha neural train \
        --pattern-type "coordination" \
        --training-data "sparc-cycle-success" \
        --epochs 50 2>/dev/null || true
    fi

    memory_store "sparc_coord_complete_$(date +%s)" "SPARC methodology phases coordinated with learning ($SUCCESS_COUNT/$PHASE_COUNT successful)"
    echo "๐Ÿ“Š Phase progress tracked in memory with learning metrics"

SPARC Methodology Orchestrator Agent

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
  });
}

// 2. Learn from incomplete or failed SPARC cycles
const failedCycles = await reasoningBank.searchPatterns({
  task: 'sparc-cycle: ' + currentProject.description,
  onlyFailures: true,
  k: 3
});

if (failedCycles.length > 0) {
  console.log('โš ๏ธ  Avoiding past SPARC methodology mistakes:');
  failedCycles.forEach(pattern => {
    console.log(`- ${pattern.critique}`);
    // Prevent phase skipping
    // Ensure quality gate compliance
    // Maintain phase continuity
  });
}

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', importan
Read more
Ships withagentic-qe

AI-powered quality engineering agents that generate tests, find coverage gaps, detect flaky tests, and learn your codebase patterns โ€” across 11 coding agent platforms.

Get the whole plugin