plugins/ruflo-sparc/commands/ruflo-sparc.md
$ARGUMENTS
Handle SPARC methodology commands based on the subcommand:
sparc init <feature>Initialize a new SPARC workflow for the given feature:
mcp__claude-flow__memory_store with namespace sparc-state, key current-phase-{slug}, value { "phase": 1, "phaseName": "Specification", "feature": "<feature>", "startedAt": "<ISO timestamp>", "gateAttempts": 0, "artifacts": [] }mcp__claude-flow__memory_store with namespace sparc-phases, key spec-{slug}, value { "status": "pending", "requirements": [], "acceptanceCriteria": [], "constraints": [], "edgeCases": [] }/sparc status to view progress or begin the specification phase with /sparc-spec <feature-description>."sparc statusShow current SPARC phase and gate check results:
mcp__claude-flow__memory_search with namespace sparc-state and query current-phase to list all active SPARC workflowsmcp__claude-flow__memory_search with namespace sparc-gates and query matching the feature slug to list gate check history[=====> ] Phase 3/5 — Architecturesparc advanceAttempt to pass the current gate and advance to the next phase:
sparc-state namespacesparc-phases namespacesparc-gates namespace with key gate-{phase}-{slug}-{timestamp}sparc-stategateAttempts in statesparc phase <phase-name>Jump to a specific phase (for re-entry or iteration):
specification, pseudocode, architecture, refinement, completion (or spec, pseudo, arch, refine, complete as aliases, or a number 1-5)sparc-state namespace/sparc advance from previous phases to ensure quality."sparc reportGenerate a full SPARC methodology report:
sparc-state, sparc-phases, and sparc-gates namespaces for the active feature# 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 |