agentleFS
stoa-platformstoa-platform/stoa/.claude/skills/spec-driven/SKILL.md

spec-driven

Skill9 starsChanged 7 months agoApache-2.0View on GitHub

Create a SPEC.md for a feature, validate via Council, then generate failing tests from acceptance criteria before implementation.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use implement.

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.
  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    If a CAB-XXXX ID is given, fetch the ticket from Linear: linear.get_issue("CAB-XXXX")

    line 21
  2. Very specific:

    Write to branch root as SPEC.md

    line 24
  3. Distinctive:

    Run the 4-persona Council but evaluate the spec quality, not the feature itself:

    line 28
  4. Distinctive:

    All tests MUST fail (red) at this stage.

    line 45
  5. Distinctive:

    Write code to make all tests pass.

    line 49
  6. Distinctive:

    All spec tests green

    line 53
  7. Distinctive:

    No other tests broken

    line 54
  8. Distinctive:

    Every acceptance criterion = exactly one test

    line 61
  9. Distinctive:

    If spec changes during implementation, re-run Council

    line 63

“Common” is measured: kept by at least 6 in 10 of the 12 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

CAB-2005: Formalize the spec-first pattern. Council validates the spec BEFORE code. Acceptance criteria become test cases. Tests are written BEFORE implementation.

Usage

/spec-driven CAB-XXXX
/spec-driven "feature description"

Step 1: Create Spec

  1. If a CAB-XXXX ID is given, fetch the ticket from Linear: linear.get_issue("CAB-XXXX")
  2. Copy template from .claude/templates/SPEC.md
  3. Fill in: Problem, Goal, API Contract, Acceptance Criteria, Edge Cases
  4. Write to branch root as SPEC.md

Step 2: Council on Spec (Stage 1 variant)

Run the 4-persona Council but evaluate the spec quality, not the feature itself:

  • Chucky: Are edge cases covered? Missing failure modes?
  • OSS Killer: Is the goal measurable? Will this deliver user value?
  • Archi: Is the API contract consistent with existing patterns? Breaking changes?
  • Better Call Saul: Security considerations complete? PII/GDPR noted?

Threshold: >= 7.0 to proceed. Below 7.0: revise spec first.

Step 3: Generate Failing Tests

From each acceptance criterion, generate a test:

  • Python (api): test_spec_ac1_<description>() in tests/test_spec_<ticket>.py
  • TypeScript (ui/portal): describe('spec/CAB-XXXX', () => { it('AC1: ...') }) in src/__tests__/spec/
  • Rust (gateway): fn spec_ac1_description() in inline #[cfg(test)] mod tests

All tests MUST fail (red) at this stage. If any passes, the criterion is already met or the test is wrong.

Step 4: Implement

Write code to make all tests pass. Standard Pattern 3 workflow.

Step 5: Verify

  • All spec tests green
  • No other tests broken
  • SPEC.md stays in the branch (committed with the PR) as documentation

Rules

  • Spec lives in branch root, committed in the same PR as the implementation
  • Council scores the spec, not the implementation plan
  • Every acceptance criterion = exactly one test
  • Edge cases table = additional tests (tagged @edge-case)
  • If spec changes during implementation, re-run Council
  • .spec.md = technical only. Business data → stoa-strategy (private repo)

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.