agentleFS
mariano-agueromariano-aguero/spec-driven-development-skill/CLAUDE.md

spec-driven-development-skill

CLAUDE.md11 starsChanged 9 days agoMITView on GitHub

Documentation-only Agent Skill. No runtime dependencies, no build step. Install: npx skills add mariano-aguero/spec-driven-development-skill

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

15 rules. About 0 are common, 0 are distinctive, and 15 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 15

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add the check to the relevant gate in references/quality-gates.md

    line 53
  2. Very specific:

    Add corresponding verification to references/workflow-phases.md in the relevant phase

    line 54
  3. Very specific:

    Update the gate summary in references/quick-reference.md

    line 55
  4. Very specific:

    Update SKILL.md if the change affects the phase overview

    line 56
  5. Very specific:

    Add to references/anti-patterns.md with: symptom, example (wrong vs correct), fix

    line 60
  6. Very specific:

    Add to the relevant gate in references/quality-gates.md if it's checkable

    line 61
  7. Very specific:

    Update references/INDEX.md with a link to the new anti-pattern

    line 62
  8. Very specific:

    Add to references/prompt-patterns.md under the relevant phase section

    line 66
  9. Very specific:

    Verify references/workflow-phases.md steps still match the new template

    line 72
  10. Very specific:

    Update examples in references/anti-patterns.md if they reference template fields

    line 73
  11. Very specific:

    Update SKILL.md, the canonical workflow description

    line 77
  12. Very specific:

    Update the step-by-step details in references/workflow-phases.md

    line 78
  13. Very specific:

    Update the summary tables in references/quick-reference.md

    line 79
  14. Very specific:

    Update references/INDEX.md if section names change

    line 80
  15. Very specific:

    Every other reference file defines what to write to a *file*, consumed by the next phase.

    line 118

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “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
CLAUDE.md

Spec-Driven Development Skill: Architecture

Documentation-only Agent Skill. No runtime dependencies, no build step. Install: npx skills add mariano-aguero/spec-driven-development-skill

File Structure

spec-driven-development-skill/
├── CLAUDE.md                          # This file, architecture and maintenance guide
├── README.md                          # User-facing documentation
├── CHANGELOG.md                       # Keep-a-Changelog release history
├── package.json                       # npm metadata for skills.sh discovery
├── evals/                             # Behavioral scenarios (≥3 required before release)
├── specs/                             # Planning specs for this repo, not shipped
├── .github/scripts/                   # check-repo.mjs and contract-lock tests, run by CI
└── skills/spec-driven-development/    # The installable skill, the only shipped folder
    ├── SKILL.md                       # Entry point, workflow overview, phase descriptions
    ├── examples/                      # Worked end-to-end example (magic-link login)
    └── references/
        ├── INDEX.md                   # Topic navigation map
        ├── quick-reference.md         # One-page cheat sheet
        ├── artifact-templates.md      # Copy-paste templates for all artifacts
        ├── prompt-patterns.md         # Prompts for every phase and scenario
        ├── workflow-phases.md         # Step-by-step phase instructions
        ├── quality-gates.md           # Per-phase checklists, CI/CD integration
        ├── output-formats.md          # Formats and line budgets for what the user reads
        ├── enforcement.md             # Hooks, contract locks, worktrees, AGENTS.md bridge
        ├── ai-agent-patterns.md       # Multi-agent patterns, context management
        └── anti-patterns.md           # Failure modes and fixes

Reference File Responsibilities

FileContentsUpdate When
SKILL.mdWorkflow overview, phase summaries, artifact structure, context model, comprehension debtCore workflow changes
artifact-templates.mdresearch.md, spec.md, plan.md, data-model.md, contracts/, tasks.md, progress.md templatesTemplate format evolves
prompt-patterns.mdPrompts for each phase + research, handover, walkthrough, multi-agent reviewBetter prompts discovered
workflow-phases.mdDetailed step-by-step for each phase (0, 0.5, 1 to 5)Phase details change
quality-gates.mdReview checklists (Gate 0, R, 1 to 5, C), CI/CD scripts, drift classificationNew quality checks needed
output-formats.mdFormats and line budgets for everything the user readsA command gains user-facing output
enforcement.mdHooks, contract locks, worktrees, AGENTS.md bridgeA rule becomes mechanically enforceable
ai-agent-patterns.mdContext engineering, subagent patterns, parallel tasksNew AI agent patterns emerge
anti-patterns.mdFailure modes with examples and fixesNew failure patterns identified
quick-reference.mdSummary tables and cheat sheetAny structural changes
INDEX.mdNavigation links to all topicsNew sections added to any file

Maintenance Workflow

Adding a new phase check

  1. Add the check to the relevant gate in references/quality-gates.md
  2. Add corresponding verification to references/workflow-phases.md in the relevant phase
  3. Update the gate summary in references/quick-reference.md
  4. Update SKILL.md if the change affects the phase overview

Adding a new anti-pattern

  1. Add to references/anti-patterns.md with: symptom, example (wrong vs correct), fix
  2. Add to the relevant gate in references/quality-gates.md if it's checkable
  3. Update references/INDEX.md with a link to the new anti-pattern

Adding a new prompt

  1. Add to references/prompt-patterns.md under the relevant phase section
  2. Reference it in references/workflow-phases.md in the corresponding step

Updating templates

  1. Update references/artifact-templates.md
  2. Verify references/workflow-phases.md steps still match the new template
  3. Update examples in references/anti-patterns.md if they reference template fields

Changing the workflow structure

  1. Update SKILL.md, the canonical workflow description
  2. Update the step-by-step details in references/workflow-phases.md
  3. Update the summary tables in references/quick-reference.md
  4. Update references/INDEX.md if section names change
  5. Bump version in package.json

Budgets (enforced on every release)

These come from Anthropic's skill-authoring spec. Check them before tagging a version.

ItemLimitWhy
description (frontmatter)≤1024 chars, target ~120 tokensLoaded in every conversation whether the skill fires or not
SKILL.md body<500 lines, target <4000 tokensLoaded in full whenever the skill activates
Reference file with >100 linesMust open with a ## Contents sectionAgents preview files with partial reads; without a TOC they cannot see what they missed
Reference depthEvery file reachable in one hop from SKILL.mdChained references cause partial reads and incomplete information
Evals≥3 scenarios in evals/Lint proves the files are well-formed, not that the skill works

Measure before releasing:

# description and body size
python3 -c "import re;s=open('skills/spec-driven-development/SKILL.md').read();d=' '.join(re.search(r'description:\s*>?\s*\n?(.*?)(?=\n[a-z_-]+:|\Z)',s.split('---')[1],re.S).group(1).split());print(f'description {len(d)} chars ~{len(d)//4} tok')"
wc -l skills/spec-driven-development/SKILL.md

# every reference file must have a TOC
for f in skills/spec-driven-development/references/*.md; do head -20 "$f" | grep -q "^## Contents" || echo "MISSING TOC: $f"; done

Reference files may cross-link for convenience, but no piece of information may require following a chain. Anything a phase needs is reachable directly from SKILL.md.

Design Decisions

Why separate files instead of one large SKILL.md? The references are loaded on demand. Keeping them separate avoids loading reference material into every conversation. Only the relevant section is loaded when needed. The entry point has its own budget (above) precisely because this optimization is easy to undo by letting SKILL.md grow.

Why a dedicated output-formats.md? Every other reference file defines what to write to a file, consumed by the next phase. output-formats.md defines what to show the human. Conflating the two is how spec-driven workflows earn a reputation for ceremony: the user drowns in artifacts that were never written for them.

Why no runtime components? This skill is documentation only. The workflows it describes run inside the AI agent's reasoning, not as external scripts. CI/CD scripts in quality-gates.md are provided as templates for teams to adapt, not as packaged tooling.

Why copy-paste templates instead of a CLI generator? Keeping templates as plain markdown means they work in any environment (Claude Code, Cursor, web interfaces) without any installation or dependency management.

Version Policy

  • Patch (1.0.x): Typo fixes, clarifications that don't change behavior
  • Minor (1.x.0): New reference files, new templates, new prompts, new anti-patterns
  • Major (x.0.0): Phase workflow changes, artifact format changes, naming convention changes

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.