sparc-spec — Claude Code skill: what it does, how to install
Runs the first SPARC phase: turns a feature description into requirements, acceptance criteria and constraints, then keeps the spec in ruflo memory.
npx skills add ruvnet/ruflo --skill sparc-spec -a claude-codeWhat sparc-spec does
This skill handles the specification phase. It reads the feature description against the codebase and lists functional and non-functional requirements, integration points, and the data the feature touches. Then it writes at least three acceptance criteria in Given/When/Then form and at least three edge cases, covering bad input, concurrent access and failing dependencies.
Underneath it is a chain of ruflo MCP calls. The skill opens a trajectory, looks for similar past specs through neural_predict, and checks for existing work under current-phase-{feature-slug} in the sparc-state namespace. The finished document lands in sparc-phases as spec-{feature-slug}, so it survives a session restart.
None of that runs without the ruflo MCP server connected: the memory and task tools are what the save steps call. At the end the skill prints the document with a summary table and points at /ruflo-sparc:ruflo-sparc advance to clear the gate and start pseudocode. Check the server is up before pointing it at something large.
What it helps with
- gather requirements for a feature before any code exists
- write testable acceptance criteria in Given/When/Then form
- list performance, security and compatibility constraints
- map edge cases and failure paths for external dependencies
- store the spec in memory so it survives a restart
Example prompts for the agent
- Run the SPARC specification phase for `<feature-description>` — PDF report export
- sparc-spec: add OAuth login, gather requirements, acceptance criteria and constraints
- Save the spec to `sparc-phases` as `spec-export-report` and show it as a table
How to install sparc-spec
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a claude-code2Manually: put the files in place
~/.claude/skills/sparc-spec/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sparc-spec/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a codex2Manually: put the files in place
.agents/skills/sparc-spec/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a cursor2Manually: put the files in place
.cursor/skills/sparc-spec/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo sparc-spec2Manually: put the files in place
.github/skills/sparc-spec/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-sparc/skills/sparc-specManually: put the files in place
.devin/skills/sparc-spec/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about sparc-spec
How do I install sparc-spec in Claude Code?
Run npx skills add ruvnet/ruflo --skill sparc-spec -a claude-code. The skill file then sits at ~/.claude/skills/sparc-spec/SKILL.md.
What does sparc-spec do?
It runs phase one of the SPARC method: requirements, acceptance criteria, constraints, edge cases and integration points, saved afterwards to ruflo memory.
Does it work without the ruflo MCP server?
No. The skill calls ruflo memory, task and trajectory tools to check prior work and store the spec, so the server has to be connected.
Source text
SKILL.md · MIT
---
name: sparc-spec
description: Run the SPARC Specification phase — gather requirements, define acceptance criteria, identify constraints, and store the spec in memory
argument-hint: "<feature-description>"
allowed-tools: mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__memory_retrieve mcp__plugin_ruflo-core_ruflo__task_create mcp__plugin_ruflo-core_ruflo__task_update mcp__plugin_ruflo-core_ruflo__task_complete mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step mcp__plugin_ruflo-core_ruflo__neural_predict Bash Read Edit
---
# SPARC Specification Phase
Run Phase 1 of the SPARC methodology: define what must be built and how success is measured.
## When to use
When starting a new feature or project that needs structured requirements gathering before any code is written. This phase produces the foundational specification that all subsequent phases (Pseudocode, Architecture, Refinement, Completion) build upon.
## Steps
1. **Initialize phase tracking** — call `mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start` with metadata `{ "phase": "specification", "feature": "$ARGUMENTS" }`
2. **Check for prior work** — call `mcp__plugin_ruflo-core_ruflo__memory_retrieve` with namespace `sparc-state` and exact key `current-phase-{feature-slug}` to see if this workflow exists. If it does, retrieve existing artifacts. If not, initialize state at that exact key with phase 1, `status: "active"`, and `startedAt` and `updatedAt` set to the current ISO timestamp.
3. **Search for similar patterns** — call `mcp__plugin_ruflo-core_ruflo__neural_predict` with the feature description to find relevant past specifications and learned patterns
4. **Gather requirements** — analyze the feature description and the codebase to identify:
- **Functional requirements**: what the feature must do (user-facing behaviors)
- **Non-functional requirements**: performance targets, security constraints, scalability needs
- **Integration points**: what existing systems or APIs are affected
- **Data requirements**: what data is created, read, updated, or deleted
5. **Define acceptance criteria** — write at least 3 concrete, testable acceptance criteria in Given/When/Then format:
```
AC-1: Given [precondition], when [action], then [expected result]
AC-2: Given [precondition], when [action], then [expected result]
AC-3: Given [precondition], when [action], then [expected result]
```
6. **Identify constraints** — document:
- Performance constraints (latency, throughput, resource limits)
- Security constraints (authentication, authorization, data sensitivity)
- Compatibility constraints (browser support, API versions, backward compatibility)
- Infrastructure constraints (deployment environment, dependencies)
7. **Map edge cases** — list at least 3 edge cases or failure scenarios:
- What happens with invalid input?
- What happens under concurrent access?
- What happens when external dependencies fail?
8. **Store specification** — call `mcp__plugin_ruflo-core_ruflo__memory_store` with:
- Namespace: `sparc-phases`
- Key: `spec-{feature-slug}`
- Value: JSON with `{ status: "complete", requirements, acceptanceCriteria, constraints, edgeCases, integrationPoints }`
9. **Update phase state** — call `mcp__plugin_ruflo-core_ruflo__memory_store` with:
- Namespace: `sparc-state`
- Key: `current-phase-{feature-slug}`
- Value: preserve existing state fields, update artifacts list to include the spec key, and set `updatedAt` to the current ISO timestamp
10. **Record trajectory step** — call `mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step` with the specification summary
11. **Present specification** — display the full specification document to the user with a summary table and suggest running `/ruflo-sparc:ruflo-sparc advance` to pass the gate and move to the Pseudocode phase
## Output format
```
# Specification: {Feature Name}
## Requirements
### Functional
- FR-1: ...
- FR-2: ...
### Non-Functional
- NFR-1: ...
## Acceptance Criteria
- AC-1: Given ..., when ..., then ...
- AC-2: Given ..., when ..., then ...
- AC-3: Given ..., when ..., then ...
## Constraints
- Performance: ...
- Security: ...
- Compatibility: ...
## Edge Cases
- EC-1: ...
- EC-2: ...
- EC-3: ...
## Integration Points
- IP-1: ...
---
Phase 1 complete. Run `/ruflo-sparc:ruflo-sparc advance` to pass the gate check.
```
© ruvnet · MIT · ruvnet/ruflo