agentleFS
chiruu12chiruu12/claude-skills-template/.claude/skills/spec-driven-development/SKILL.md

spec-driven-development

Skill0 starsChanged 7 months agoMITView on GitHub

Enforce writing a spec before coding. Captures requirements, decisions, and acceptance criteria in a durable document that guides implementation. Use when starting a new feature, when scope is unclear, when multiple people will work on the same feature, or when user says "spec", "requirements", or "what should we build".

126 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use using-agent-skills, idea-refine and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LLl0k0laDSkill

    using-agent-skills

    Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

    Also in 55 projects that use this

  • LLl0k0laDSkill

    idea-refine

    Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.

    Also in 62 projects that use this

  • steven123397Skill

    accessibility-engineering

    Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.

    Also in 4 projects that use this

  • MrCipherSmithSkill

    constraint-driven-development

    Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.

    Also in 22 projects that use this

  • jaydubya818Skill

    observability-and-instrumentation

    Add or review logs, metrics, traces, and actionable alerts.

    Also in 45 projects that use this

  • HK-hubSkill

    code-simplification

    Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

    Also in 69 projects that use this

  • +4 more from LLl0k0laD

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 119 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write the spec before the code.

    line 12
  2. Distinctive:

    Ask the user (max 3 questions):

    line 27
  3. Very specific:

    Create a spec file at the location the project uses (check CLAUDE.md for conventions, default to docs/specs/).

    line 35
  4. Distinctive:

    If open questions exist, resolve them before implementation starts.

    line 74
  5. Distinctive:

    DO NOT: leave open questions unresolved during implementation — they become assumptions that diverge from intent

    line 108
  6. Distinctive:

    DO NOT: write acceptance criteria you can't test — "works correctly" is not testable, "returns 404 for deleted resources" is

    line 109

“Common” is measured: kept by at least 6 in 10 of the 119 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spec-Driven Development

Write the spec before the code. A spec forces you to think through what you're building, why, and how you'll know it works — before implementation decisions constrain your thinking. It's cheaper to change words than code.

When to Use

  • Starting a new feature or significant change
  • Scope is unclear or disputed
  • Multiple people (or agents) will work on the feature
  • User says "spec", "requirements", or "what should we build"
  • NOT for bug fixes with clear reproduction steps — use triage-issue
  • NOT for one-line changes or obvious refactors — just do them

Process

1. Gather intent

Ask the user (max 3 questions):

  • "What problem does this solve for the user?"
  • "What's the simplest version that delivers value?"
  • "What's explicitly NOT included?"

2. Write the spec

Create a spec file at the location the project uses (check CLAUDE.md for conventions, default to docs/specs/).

Spec structure:

# Feature Name

## Problem
[One paragraph: what's wrong or missing today]

## Solution
[One paragraph: what we're building, from the user's perspective]

## Acceptance Criteria
- [ ] [Observable behavior 1]
- [ ] [Observable behavior 2]
- [ ] [Observable behavior 3]

## Decisions
- [Decision 1]: [choice] because [reason]
- [Decision 2]: [choice] because [reason]

## Out of Scope
- [Thing we're NOT doing and why]

## Open Questions
- [Anything unresolved that blocks implementation]

3. Review with user

Present the spec. Ask:

"Does this capture what you want? Anything missing, wrong, or out of scope?"

Iterate until the user approves.

4. Resolve open questions

If open questions exist, resolve them before implementation starts. Each resolved question becomes a decision.

5. Hand off to implementation

The spec is the contract. Implementation should satisfy every acceptance criterion. Link the spec from any related issues or PRs.

Common Rationalizations

ShortcutWhy It Fails
"I know what to build, I'll just start coding"You know what you THINK you'll build. Without a spec, scope creeps, edge cases surprise you mid-implementation, and you build something nobody actually wanted.
"The spec will be outdated by the time I finish"A spec captures intent and decisions. Code changes; intent shouldn't. If the spec is outdated, either update it or you've drifted from the original goal.
"Specs slow me down"Specs take 10-20 minutes. Rework from misalignment takes days. The spec IS the fast path — it catches "wait, that's not what I meant" before you've written 500 lines.
"I'll document it after I build it"Post-hoc docs describe what you built, not what you should have built. They can't catch misalignment because the misaligned code already exists.

Red Flags

  • Spec has no "Out of Scope" section — scope will creep because nothing is explicitly excluded
  • Acceptance criteria use vague language ("works correctly", "handles edge cases") — not testable
  • Open questions persist into implementation — decisions are being deferred, not made
  • Spec describes implementation, not behavior — it's a design doc, not a spec

Verification Checklist

  • Problem statement describes user pain, not implementation details
  • Solution is described from user perspective, not code perspective
  • Every acceptance criterion is observable and testable
  • At least one "Out of Scope" item exists
  • All open questions resolved before implementation starts
  • User approved the spec

Anti-patterns

  • DO NOT describe implementation in the spec — describe behavior and outcomes
  • DO NOT leave open questions unresolved during implementation — they become assumptions that diverge from intent
  • DO NOT write acceptance criteria you can't test — "works correctly" is not testable, "returns 404 for deleted resources" is
  • DO NOT skip the user review — the spec exists to align, not to document your assumptions

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.