sparc-refine

Runs SPARC Refinement and Completion phases to review code, improve test coverage, and validate deployment readiness.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

After architecture and implementation are done, teams still need a disciplined process to review code, close test coverage gaps, verify specification compliance, and produce documentation before shipping. This Skill automates the final two phases of the SPARC methodology so nothing is missed before release.

Core Features & Use Cases

  • Iterative Code Review and Testing: Reviews implementation against acceptance criteria, architecture boundaries, and pseudocode fidelity, then writes missing unit, integration, and edge-case tests targeting 80%+ coverage on new code.
  • Traceability and Validation: Builds a traceability matrix mapping every acceptance criterion to its tests and code files, runs full regression suites, and validates performance constraints against measured results.
  • Documentation and Deployment Readiness: Generates API documentation, usage examples, and a deployment checklist covering migrations, configuration, feature flags, rollback plans, and security review.
  • Use Case: After completing the SPARC Architecture phase for a new API feature, run this Skill to review the code, raise test coverage from 45% to 85%, produce a traceability matrix, and confirm the deployment checklist before merging.

Quick Start

Run the SPARC refinement and completion phases for my current feature to review the code, improve test coverage, and generate the deployment readiness report.

Frequently Asked Questions about sparc-refine

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

FAQPage Schema
How do I run the SPARC refinement phase on my code?

Invoke this Skill after the SPARC Architecture phase gate has passed. It retrieves prior artifacts from memory, reviews code against acceptance criteria and architecture rules, writes missing tests, and iterates until coverage and quality thresholds are met.

What test coverage does SPARC refinement target?

The Skill targets at least 80% coverage on new code. It runs existing tests, identifies uncovered acceptance criteria, and writes unit, integration, and edge-case tests until every acceptance criterion has a passing test.

What is a traceability matrix in SPARC completion?

A traceability matrix maps every acceptance criterion to the tests that verify it, the code files that implement it, and the current pass/fail status. The Skill generates this matrix during the Completion phase as part of the final report.

When should I not use the SPARC refine skill?

Do not use it before the Architecture phase gate has passed, since it depends on stored specification, pseudocode, and architecture artifacts. It is also unsuited for quick prototypes that do not need formal review, coverage targets, or deployment checklists.

Does SPARC refinement validate performance requirements?

Yes, when the specification includes performance constraints, the Skill profiles critical paths identified in the pseudocode, compares measured results against thresholds, and optimizes code until constraints are satisfied.