agentleFS
ChrisLamDevChrisLamDev/hermes-core-skills/skills/spec-driven-development/SKILL.md

spec-driven-development

Skill11 starsChanged 5 months agoMITView on GitHub

Use when starting a new project, feature, or significant change and no specification exists yet. Use when requirements are unclear, ambiguous, or only exist as a vague idea.

68 other projects use a version of this, 37 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use using-agent-skills, git-workflow-and-versioning and 10 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 28 projects that use this

  • LLl0k0laDSkill

    git-workflow-and-versioning

    Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.

    Also in 27 projects that use this

  • vinvcnSkill

    constraint-driven-development

    把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。

    Also in 4 projects that use this

  • az9713Skill

    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 31 projects that use this

  • az9713Skill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 20 projects that use this

  • +7 more from LLl0k0laD

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 65 edited versions we read keep these.

  • 13

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Write a structured specification before writing any code.

    line 33
  2. Distinctive:

    Start with a high-level vision.

    line 59
  3. Distinctive:

    Surface assumptions immediately: Before writing any spec content, list what you're assuming:

    line 61
  4. Distinctive:

    Always do: Run compile checks before commits, follow naming conventions, validate inputs

    line 96
  5. Distinctive:

    Never do: Commit secrets, delete source files without approval, commit broken code

    line 98
  6. Distinctive:

    Reframe instructions as success criteria: When receiving vague requirements, translate them into concrete conditions:

    line 135
  7. Distinctive:

    No task should require changing more than ~5 files

    line 167
  8. Very specific:

    Follow the task list in order.

    line 179
  9. Distinctive:

    Verify after each task before moving to the next

    line 182
  10. Distinctive:

    Commit after each task

    line 183
  11. Distinctive:

    If something unexpected blocks a task, stop and revise the plan (don't hack around it)

    line 184
  12. Distinctive:

    Run all tests/compile checks

    line 197
  13. Distinctive:

    Verify against the spec's success criteria

    line 198
  14. Distinctive:

    If anything differs from the spec, decide: fix code or update spec?

    line 199

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

Overview

Write a structured specification before writing any code. The spec is the shared source of truth between you and Chris — it defines what we're building, why, and how we'll know it's done. Code without a spec is guessing.

When to Use

  • Starting a new project or feature
  • Requirements are ambiguous or incomplete (e.g. "make it better", "add more features")
  • The change touches multiple files or modules
  • You're about to make an architectural decision
  • The task would take more than 15 minutes to implement

When NOT to use: Single-line fixes, typo corrections, or changes where requirements are unambiguous and self-contained.

The Gated Workflow

Spec-driven development has four phases. Do not advance to the next phase until the current one is validated.

SPECIFY ──→ PLAN ──→ TASKS ──→ IMPLEMENT
   │          │        │          │
   ▼          ▼        ▼          ▼
 Chris      Chris    Chris      Chris
 reviews    reviews  reviews    reviews

Phase 1: Specify

Start with a high-level vision. Ask Chris clarifying questions until requirements are concrete.

Surface assumptions immediately. Before writing any spec content, list what you're assuming:

ASSUMPTIONS I'M MAKING:
1. This is a WeChat Mini Program (not a web app)
2. Data is stored locally (not on a server)
3. We use Cocos Creator 3.x for the game engine
4. Target users are Chinese-speaking Buddhists, including elderly
→ Correct me now or I'll proceed with these.

Write a spec document covering these six core areas:

  1. Objective — What are we building and why? Who is the user? What does success look like?
  2. Commands — Full executable commands with flags, not just tool names.
    Build: npm run build
    Test: npx jest --passWithNoTests
    Verify: npm run compile
  3. Project Structure — Where source code lives, where tests go, where docs belong.
    assets/        → Game assets (images, audio, fonts)
    src/           → Application source code
    src/scenes/    → Cocos Creator scenes
    src/scripts/   → TypeScript game scripts
  4. Code Style — One real code snippet showing your style beats three paragraphs describing it.
  5. Testing Strategy — What framework, where tests live, coverage expectations.
  6. Boundaries — Three-tier system:
    • Always do: Run compile checks before commits, follow naming conventions, validate inputs
    • Ask first: Database schema changes, adding dependencies, changing build config
    • Never do: Commit secrets, delete source files without approval, commit broken code

Spec template:

# Spec: [Project/Feature Name]

## Objective
[What we're building and why. User stories or acceptance criteria.]

## Tech Stack
[Framework, language, key dependencies with versions]

## Commands
[Build, test, lint, dev — full commands]

## Project Structure
[Directory layout with descriptions]

## Code Style
[Example snippet + key conventions]

## Testing Strategy
[Framework, test locations, coverage requirements]

## Boundaries
- Always: [...]
- Ask first: [...]
- Never: [...]

## Success Criteria
[How we'll know this is done — specific, testable conditions]

## Open Questions
[Anything unresolved that needs Chris's input]

Reframe instructions as success criteria. When receiving vague requirements, translate them into concrete conditions:

REQUIREMENT: "Make the story choices feel more meaningful"

REFRAMED SUCCESS CRITERIA:
- Each choice in a chapter leads to measurably different next-screen content
- At least 30% of choices have a consequence that appears 2+ chapters later
- Player can visibly see their choice's impact (text changes, UI feedback)
→ Are these the right targets?

Phase 2: Plan

With the validated spec, generate a technical implementation plan:

  1. Identify the major components and their dependencies
  2. Determine the implementation order (what must be built first)
  3. Note risks and mitigation strategies
  4. Identify what can be built in parallel vs. what must be sequential
  5. Define verification checkpoints between phases

The plan should be reviewable: Chris should be able to read it and say "yes, that's the right approach" or "no, change X."

Phase 3: Tasks

Break the plan into discrete, implementable tasks:

  • Each task should be completable in a single focused session
  • Each task has explicit acceptance criteria
  • Each task includes a verification step (test, build, manual check)
  • Tasks are ordered by dependency, not by perceived importance
  • No task should require changing more than ~5 files

Task template:

- [ ] Task: [Description]
  - Acceptance: [What must be true when done]
  - Verify: [How to confirm — test command, build, manual check]
  - Files: [Which files will be touched]

Phase 4: Implement

Follow the task list in order. Use the subagent-driven-development skill for parallel work.

  • One task at a time
  • Verify after each task before moving to the next
  • Commit after each task
  • If something unexpected blocks a task, stop and revise the plan (don't hack around it)

Pitfalls

  • Skipping Phase 1 — "I already know what to build" is the most common source of rework. Write the spec anyway.
  • Vague success criteria — "Works well" is not a testable condition. Every criterion must be falsifiable.
  • Over-specifying — Don't write implementation details in the spec. The spec is WHAT and WHY, not HOW.
  • Not surfacing assumptions — Silent assumptions cause the most expensive bugs. List them explicitly.
  • Skipping Chris review — Each phase gate requires Chris's approval. Don't proceed without it.

Verification

After implementation:

  1. Run all tests/compile checks
  2. Verify against the spec's success criteria
  3. If anything differs from the spec, decide: fix code or update spec?

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.