agentleFS
sohaibdevvsohaibdevv/AI-AGENT-SKILLS/skills/spec-driven-development/SKILL.md

spec-driven-development

Skill2 starsChanged 6 months agoMITView on GitHub

Write a specification before writing any implementation code

68 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use shipping-and-launch, constraint-driven-development and 2 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

    shipping-and-launch

    Use when preparing to deploy to production. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.

    Also in 29 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

    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

  • LLl0k0laDSkill

    frontend-ui-engineering

    Use when building or modifying user-facing interfaces. Use when creating components, implementing layouts, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

    Also in 21 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 65 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before implementing any new feature or significant change

    line 14
  2. Distinctive:

    When requirements are unclear or verbally communicated

    line 15
  3. Distinctive:

    Before writing any public API or interface

    line 16
  4. Distinctive:

    When multiple engineers will work on the same feature

    line 17
  5. Distinctive:

    Write down what you've been asked to build, in plain English, without interpretation.

    line 22
  6. Distinctive:

    Document: performance expectations, security constraints, accessibility requirements, scale targets, error handling expectations.

    line 31
  7. Distinctive:

    Document every assumption you made and every question you don't have an answer to.

    line 42
  8. Distinctive:

    If it's obvious, the spec takes 10 minutes.

    line 50

“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

Overview

Specification-driven development forces clarity before commitment. A spec written before code reveals ambiguities, surfaces missing requirements, and creates a shared contract between implementer and reviewer. Code written without a spec is often solving the wrong problem correctly.

When to Use

  • Before implementing any new feature or significant change
  • When requirements are unclear or verbally communicated
  • Before writing any public API or interface
  • When multiple engineers will work on the same feature

Process

Step 1: Capture the raw requirement

Write down what you've been asked to build, in plain English, without interpretation. Include the source (ticket, conversation, PR comment).

Step 2: Identify stakeholders and success criteria

Answer: Who uses this? How do they know it works? What does failure look like?

Step 3: Write functional requirements

List what the system must do. Use "The system shall..." or "When X, then Y." Each requirement must be independently testable.

Step 4: Write non-functional requirements

Document: performance expectations, security constraints, accessibility requirements, scale targets, error handling expectations.

Step 5: Define the data model

Sketch the inputs, outputs, and state transitions. Identify what data must be stored, what must not be stored, and what can be computed.

Step 6: Define the interface contract

For APIs: endpoints, methods, request/response shapes, error codes. For UIs: wireframe or component tree, states (loading, empty, error, populated). For libraries: public function signatures and contracts.

Step 7: List open questions

Document every assumption you made and every question you don't have an answer to. Get answers before writing code.

Step 8: Get sign-off

Have the spec reviewed by at least one stakeholder before starting implementation. A spec that nobody reads is not a spec.

Anti-Rationalizations

"This feature is obvious - I don't need to write it down" If it's obvious, the spec takes 10 minutes. If it's not obvious, the spec saves days. Either way: write it.

"We'll iterate quickly - the spec will be wrong anyway" Iteration is not an excuse to skip specs. It means you write smaller, tighter specs for each iteration. Iterating on code without a spec means iterating in circles.

"The ticket has enough detail" Tickets capture requests, not contracts. A spec translates requests into testable requirements. These are different things.

Red Flags

  • Implementation started before all open questions are resolved
  • Spec has no acceptance criteria
  • "I'll just figure it out as I go"
  • Spec written after implementation to explain what was built

Verification Requirements

Before starting implementation:

  • Functional requirements listed and independently testable
  • Non-functional requirements documented
  • Interface contract defined
  • Open questions list is empty (all answered)
  • At least one stakeholder has reviewed the spec
  • Acceptance criteria are measurable, not subjective

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.