agentleFS
khuynh22khuynh22/agent-dev-team/skills/spec-writing/SKILL.md

spec-writing

Skill9 starsChanged 2 months agoMITView on GitHub

Turns gathered requirements into a written specification that an implementer can build from without asking follow-up questions. Use when requirements are known but not written down, before starting a feature that spans several tasks, or when a spec needs reviewing for gaps and contradictions. Produces a committed document, not a chat message.

17 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 6

    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. Very specific:

    If requirements are not yet gathered, use requirements-interview first.

    line 17
  2. Distinctive:

    If the request contains several independent subsystems, do not write one spec.

    line 21
  3. Distinctive:

    Test: can one implementer, working alone, take this from start to verifiable in a bounded amount of work?

    line 25
  4. Distinctive:

    Read it fresh and fix inline:

    line 90
  5. Distinctive:

    Every requirement has an acceptance criterion.

    line 102
  6. Distinctive:

    Every interface states its compatibility story.

    line 103
  7. Distinctive:

    No TBD remains, or each remaining one is listed as blocking with an owner.

    line 105

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

A spec exists so that implementation does not require the author to be available. The test of a spec is not whether it is complete; it is whether someone else can build from it and arrive at the same thing.

If requirements are not yet gathered, use requirements-interview first.

Scope check before you write

If the request contains several independent subsystems, do not write one spec. Decompose it, state the pieces and their dependency order, and spec the first piece. A spec spanning four subsystems produces a plan nobody can execute and a review nobody can do.

Test: can one implementer, working alone, take this from start to verifiable in a bounded amount of work? If not, split.

Structure

# <Feature>

## Problem
<why this exists; the cost of not doing it>

## Goals
## Non-goals
<the adjacent things explicitly out of scope, and why>

## Requirements
<numbered, each observable from outside the system>

## Design
<the shape of the solution: components, responsibilities, boundaries, data flow>

## Interfaces
<each contract this creates or changes, with its shape and its compatibility story>

## Data
<what is stored, in what shape, what migrates, what is retained and for how long>

## Error handling
<what fails, what the caller sees, what is retried, what is logged>

## Security
<trust boundaries, authorization, what is untrusted>

## Testing
<what gets tested, at what level, what the acceptance test is>

## Rollout
<flags, sequencing, rollback, and how you will know it is working>

## Acceptance criteria
<Given / when / then, each verifiable by someone who has not read the code>

## Open questions
| Question | Who answers | Blocking? |

Scale each section to its risk. A section that says "nothing special" is a real answer and better than three paragraphs of filler; delete the section instead if truly nothing applies, and say so in one line.

Writing rules

  • Observable, not internal. A requirement that can only be checked with a debugger is not a requirement.
  • Decide, do not survey. A spec that lists three options has deferred the work to the implementer, who has less context.
  • Name the boundaries. Each component: what it does, how it is used, what it depends on. If you cannot say what a component does in one sentence, it does too much.
  • Write the error paths. Most specs describe only success, and most implementation time goes to the rest.
  • Prefer smaller units. A design where each piece can be understood and tested alone survives contact with implementation; a design that must be held whole does not.

Self-review before handing it over

Read it fresh and fix inline:

  1. Placeholders. Any TBD, TODO, or vague requirement. Resolve or mark it blocking.
  2. Contradictions. Does the design section match the requirements section? Does the data model support every stated requirement?
  3. Ambiguity. Could any requirement be read two ways? Pick one and say it explicitly.
  4. Scope. Still one implementable unit?
  5. Verifiability. Could an implementer tell, from this document alone, when they are done?

Verification

  • Every requirement has an acceptance criterion.
  • Every interface states its compatibility story.
  • Error handling is present and specific.
  • No TBD remains, or each remaining one is listed as blocking with an owner.
  • Committed to the repository, not left in a chat message.

Red flags

ThoughtReality
"The implementer can figure out the details"The implementer has less context than you. Decide now.
"I'll list the options and let them choose"That is deferring the decision downhill.
"This spec covers the whole platform"Then it covers nothing implementable. Decompose.
"Error handling is standard"Write what the caller sees. Standard means different things in different modules.
"It is written, we are done"Read it again cold. Half the contradictions are only visible on the second pass.

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.