π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
name: ruflo-sparc description: SPARC methodology commands β initialize, track, advance, and report on Specification-Pseudocode-Architecture-Refinement-Completion workflows
$ARGUMENTS
Handle SPARC methodology commands based on the subcommand:
Subcommands
/ruflo-sparc:ruflo-sparc init <feature>
Initialize a new SPARC workflow for the given feature:
- Create a feature slug from the feature name (lowercase, hyphenated)
- Call
mcp__plugin_ruflo-core_ruflo__memory_storewith namespacesparc-state, keycurrent-phase-{slug}, value{ "phase": 1, "phaseName": "Specification", "feature": "<feature>", "startedAt": "<ISO timestamp>", "status": "active", "updatedAt": "<ISO timestamp>", "gateAttempts": 0, "artifacts": [] } - Call
mcp__plugin_ruflo-core_ruflo__memory_storewith namespacesparc-phases, keyspec-{slug}, value{ "status": "pending", "requirements": [], "acceptanceCriteria": [], "constraints": [], "edgeCases": [] } - Display: "SPARC workflow initialized for . Current phase: 1 - Specification. Run
/ruflo-sparc:ruflo-sparc statusto view progress or begin the specification phase with/ruflo-sparc:sparc-spec <feature-description>."
/ruflo-sparc:ruflo-sparc status
Show current SPARC phase and gate check results using exact reads:
- Call
mcp__plugin_ruflo-core_ruflo__memory_listwith namespacesparc-state,limit: 50,offset: 0. Continue withoffset += entries.lengthuntil offset reachestotal. A listing error or an empty page beforetotalmeans incomplete status; report it, never claim no workflows. - Keep keys starting with
current-phase-. For each key callmcp__plugin_ruflo-core_ruflo__memory_retrievewith that exact key and namespacesparc-state. Listing metadata is not phase state. Decode the returned value if JSON-encoded and display the feature, slug, current phase, start time, gate attempts, and completion status. A missing/malformed value is unavailable, not a pending workflow. Do not infer the current phase from a gate or artifact. Exclude records withstatus === "complete"from active status. Legacy records without status remain active. Do not infer completion from phase 5 alone. Sort active records newest first by valid stateupdatedAt; for legacy/malformed timestamps fall back to listing metadataupdatedAt, thenstoredAt(parse ISO strings or numeric epoch milliseconds). Put unknown timestamps last, breaking ties by exact key. - Enumerate namespace
sparc-gateswith the samelimit,offset, andtotalpagination. For each feature keep only keys matchinggate-{phase}-{exact-slug}-{timestamp}(phase 1β5, complete slug match, timestamp suffix). Retrieve each matching key exactly fromsparc-gates; sort chronologically. Do not mix a slug with its prefix neighbors. - Show each gate's phase, passed/failed status, criteria and blockers. Gate history describes past checks; only
current-phase-{slug}defines current state. Report retrieval failures and concurrent changes as incomplete; a multi-call read is not an atomic snapshot. - Display a progress bar based on the retrieved current phase:
[=====> ] Phase 3/5 β Architecture.
/ruflo-sparc:ruflo-sparc advance
Attempt to pass the current gate and advance to the next phase:
- Call
mcp__plugin_ruflo-core_ruflo__memory_retrieveinsparc-statewith exact keycurrent-phase-{slug}. Decode state; ifstatus === "complete", refuse advance without writing state or another gate. Stop on missing/malformed state. - Retrieve phase artifacts from
sparc-phasesnamespace - Run the gate check for the current phase:
- Phase 1 gate: Verify spec has >= 3 acceptance criteria, explicit constraints, and edge cases identified
- Phase 2 gate: Verify pseudocode covers all acceptance criteria, error paths are explicit, complexity annotated
- Phase 3 gate: Verify architecture addresses all constraints, API contracts are typed, no circular dependencies
- Phase 4 gate: Verify all acceptance criteria have passing tests, code review approved, coverage >= 80%
- Phase 5 gate: Verify all tests green, docs complete, deployment checklist verified, traceability matrix complete
- Store gate result in
sparc-gatesnamespace with keygate-{phase}-{slug}-{timestamp} - If gate passes:
- Preserve all existing state fields on every write to namespace
sparc-state, exact keycurrent-phase-{slug}, usingmcp__plugin_ruflo-core_ruflo__memory_store; setnow = new Date().toISOString(). - Phases 1β4: increment phase and update phaseName, retaining other state with
status: "active", updatedAt: now. Display the next phase. - Phase 5: only after the final gate passes, write
{ ...state, phase: 5, phaseName: "Completion", status: "complete", completedAt: now, updatedAt: now }once to that same exact key. Keep phase 5, never increment to 6. Display completion only after the state write succeeds.
- Preserve all existing state fields on every write to namespace
- If gate fails:
- Preserve existing state and phase, increment
gateAttempts, and setupdatedAtto the current ISO timestamp insparc-stateat exact keycurrent-phase-{slug}viamcp__plugin_ruflo-core_ruflo__memory_store. Do not mark state complete or setcompletedAt. - Display: "Gate failed. Blockers:" followed by the list of failing criteria
- Suggest specific actions to address each blocker
- Preserve existing state and phase, increment
/ruflo-sparc:ruflo-sparc phase <phase-name>
Jump to a specific phase (for re-entry or iteration):
- Validate phase-name is one of:
specification,pseudocode,architecture,refinement,completion(orspec,pseudo,arch,refine,completeas aliases, or a number 1-5) - Call
mcp__plugin_ruflo-core_ruflo__memory_retrieveinsparc-statewith exact keycurrent-phase-{slug} - Preserve existing state fields and update phase number and name at exact key
current-phase-{slug}insparc-stateviamcp__plugin_ruflo-core_ruflo__memory_store; setupdatedAtto the current ISO timestamp. Explicit re-entry reopens the workflow withstatus: "active"and removes stalecompletedAt; selecting phase 5 alone does not complete it. - Store warning if jumping forward (skipping gates): "Jumping forward skips gate checks. Run
/ruflo-sparc:ruflo-sparc advancefrom previous phases to ensure quality." - Display: "Phase set to {N} β {PhaseName} for {feature}."
/ruflo-sparc:ruflo-sparc report
Generate a full SPARC methodology report:
- Use the status pagination and exact retrieval procedure above for
sparc-stateandsparc-gates. Retrieve the exact artifact keys recorded in current state fromsparc-phasesfor the selected feature. A report may include completed workflows; the active-only status filter does not apply to reports. - Generate a structured report:
# SPARC Report: {Feature} ## Phase Summary | Phase | Status | Gate | Attempts | Duration | |-------|--------|------|----------|----------| | 1 - Specification | Complete | Passed | 1 | 2h | | 2 - Pseudocode | Complete | Passed | 2 | 3h | | 3 - Architecture | In Progress | β | 0 | 1h | | 4 - Refinement | Pending | β | β | β | | 5 - Completion | Pending | β | β | β | ## Specification - Requirements: [list] - Acceptance Criteria: [list] - Constraints: [list] ## Pseudocode - Algorithms: [summary] - Data Structures: [summary] ## Architecture - Bounded Contexts: [list] - API Contracts: [summary] ## Gate History [chronological list of gate attempts with pass/fail details] ## Traceability Matrix | Acceptance Criterion | Test | Status | |---------------------|------|--------| | AC-1: ... | test_xxx | Pass | - Display the report