sparc-spec

Generates structured feature specifications with requirements, acceptance criteria, and constraints for the SPARC methodology.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill sparc-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparc-spec
Source: https://github.com/ruvnet/claude-flow/tree/main/plugins/ruflo-sparc/skills/sparc-spec
Command: npx skills add https://github.com/ruvnet/claude-flow --skill sparc-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting a feature without a clear specification leads to scope creep, missed edge cases, and rework. This Skill runs Phase 1 of the SPARC methodology, turning a rough feature description into a structured, testable specification stored in persistent memory.

Core Features & Use Cases

  • Requirements Gathering: Identifies functional and non-functional requirements, integration points, and data requirements from a feature description and the existing codebase.
  • Acceptance Criteria & Edge Cases: Produces at least three Given/When/Then acceptance criteria plus documented constraints and failure scenarios.
  • Persistent Phase State: Stores the specification in the ruflo memory system under the sparc-phases namespace and tracks workflow state so later SPARC phases (Pseudocode, Architecture, Refinement, Completion) can build on it.
  • Use Case: Before implementing a new API endpoint, run this phase to produce a specification document with testable acceptance criteria, then advance to the Pseudocode phase via the SPARC gate check.

Quick Start

Run the sparc-spec skill with a feature description such as "user authentication with OAuth" to generate and store the Phase 1 specification.

Frequently Asked Questions about sparc-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a feature specification before coding?

Run the sparc-spec skill with a feature description. It analyzes the codebase, gathers functional and non-functional requirements, and produces acceptance criteria in Given/When/Then format, storing everything in persistent memory for later phases.

What is the SPARC methodology specification phase?

The Specification phase is Phase 1 of SPARC, where you define what must be built and how success is measured. It produces requirements, acceptance criteria, constraints, and edge cases that the Pseudocode, Architecture, Refinement, and Completion phases build upon.

How many acceptance criteria should a feature spec have?

This skill enforces a minimum of three concrete, testable acceptance criteria written in Given/When/Then format, plus at least three documented edge cases covering invalid input, concurrent access, and external dependency failures.

Does sparc-spec work with existing SPARC workflows?

Yes. It searches the sparc-state memory namespace for prior work on the feature and retrieves existing artifacts if a workflow already exists, otherwise it initializes new phase state. It also uses neural prediction to find similar past specifications.

What happens after the specification phase completes?

The specification is stored under the sparc-phases namespace and the phase state is updated. You then run /sparc advance to pass the gate check and move to the Pseudocode phase.