ai_misc/skills/rocka-spec-driven-dev/SKILL.md
Structured software development workflow that moves from specification through planning and review to test-driven implementation. Creates specs, breaks work into stories, defines test contracts, reviews plans with a devil's advocate agent, and builds features test-first. Use when building a new feature, refactoring a module, or when the user says /spec-dev.
npx skillsauth add madbomber/experiments spec-driven-devInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A structured workflow that takes features from idea to implementation through four phases: Specify → Plan → Review → Build.
/spec-dev or "let's build this properly"Most AI coding goes wrong in the same way: jumping straight to code without understanding what to build, then burning context fixing design mistakes that planning would have caught.
This workflow prevents that by:
/spec-dev spec)Create a clear specification document.
Gather requirements:
Write the spec:
Create specs/{feature-name}.md:
# Feature: {Name}
## Problem
[What problem does this solve and why does it matter?]
## Solution
[High-level description of the approach]
## Requirements
### Functional
- [ ] [Specific, testable requirement]
- [ ] [Another requirement]
### Non-Functional
- [ ] [Performance target, if any]
- [ ] [Security constraints, if any]
## User Stories
- As a [role], I want [action] so that [benefit]
## Edge Cases
- [What happens when X?]
- [What about empty/null/concurrent inputs?]
## Out of Scope
- [Explicitly list what this does NOT include]
## Open Questions
- [Anything that needs clarification before building]
Output: Confirm the spec with the user. Resolve any open questions before proceeding.
/spec-dev plan)Break the spec into implementable stories with test contracts.
Create stories:
Each story is a small, independently testable unit of work:
## Story 1: {Title}
**Description**: [What this story implements]
**Files**: [Which files will be created or modified]
### Acceptance Criteria
- [ ] [Specific, verifiable criterion]
- [ ] [Another criterion]
### Test Contract
Test: {test description} Given: {precondition} When: {action} Then: {expected result}
### Dependencies
- Depends on: [other stories, if any]
- Blocks: [stories that need this first]
Order stories so each builds on the last. Earlier stories should establish foundations (types, interfaces, utilities). Later stories add behavior.
Create the plan:
Create plans/{feature-name}.md:
# Plan: {Feature Name}
**Spec**: specs/{feature-name}.md
**Stories**: {count}
**Estimated complexity**: Low / Medium / High
## Architecture Notes
[Key design decisions, patterns used, rationale]
## Story Order
1. {Story 1 title} — {one-line summary}
2. {Story 2 title} — {one-line summary}
...
## Stories
[Full story details as above]
## Risk Areas
[Parts of the plan that might need adjustment during build]
/spec-dev review)Before building, get a second opinion. This catches overcomplexity, missed edge cases, and simpler alternatives.
Devil's advocate review:
Spawn a sub-agent (using the Task tool) with this prompt:
Review this implementation plan. You are a skeptical senior engineer.
Challenge the approach:
1. Is anything overcomplicated? Could it be simpler?
2. Are there missed edge cases or failure modes?
3. Does the story order make sense?
4. Are the test contracts actually testing the right things?
5. Is anything missing from the spec that the plan assumes?
Be specific. If you'd do something differently, say what and why.
Verdict: GO (plan is solid) or PAUSE (fix these issues first)
[paste plan content]
If PAUSE: Revise the plan based on feedback, then re-review. If GO: Proceed to build.
/spec-dev build)Implement stories in order, test-first.
For each story:
# Example commit
git commit -m "feat: add rate limiter middleware (story 3/7)
Implements token bucket algorithm with configurable
limits per route. Tests cover burst, sustained, and
reset scenarios."
Key rules during build:
After all stories complete:
| Command | Phase | Description |
|---------|-------|-------------|
| /spec-dev spec | Specify | Create or update a spec |
| /spec-dev plan | Plan | Create implementation plan from spec |
| /spec-dev review | Review | Devil's advocate review of plan |
| /spec-dev build | Build | Implement stories test-first |
| /spec-dev status | Any | Show current phase and progress |
specs/
feature-name.md # Specification
plans/
feature-name.md # Implementation plan with stories
tests/
feature-name/ # Tests written during build
The overhead of this workflow pays for itself on features that are medium complexity or higher — roughly anything that touches 3+ files or takes more than 15 minutes.
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
development
Apply SOLID principles when writing, reviewing, or refactoring Ruby code. This skill should be used when designing classes, evaluating architecture, reviewing pull requests, or refactoring existing code. It provides actionable checklists, violation detection patterns, and Ruby-idiomatic refactoring strategies for each of the five SOLID principles.
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
development
Analyze Ruby and Rails code quality with RubyCritic. Identifies code smells, complexity issues, and refactoring opportunities. Provides detailed metrics, scores files A-F, compares branches, and prioritizes high-churn problem areas. Use when analyzing Ruby code quality, reviewing PRs, or identifying technical debt.