agentleFS
KylianmgtKylianmgt/spec-first-skills/skills/spec-first/SKILL.md

spec-first

Skill0 starsChanged 35 days agoMITView on GitHub

Write a spec and get explicit human approval before implementing any feature, change, or bug fix. Use whenever the user asks to build, add, change, refactor, or fix something that touches source code. Not for answering questions, read-only exploration, or fixes the user explicitly wants applied immediately.

12 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

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

  • 0

    Common

    Most of the 9 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:

    When the user asks for a feature, change, or fix, do NOT start writing code.

    line 8
  2. Distinctive:

    Write a spec first, present it, and wait for explicit approval.

    line 9
  3. Distinctive:

    Investigate before writing: Read the files the change will touch and note how the existing code works.

    line 14
  4. Distinctive:

    Keep the spec under one page: if it will not fit, the feature is too big, propose splitting it into smaller specs instead.

    line 22
  5. Distinctive:

    Do not write, edit, or scaffold any implementation code until the user replies with explicit approval ("approved", "go ahead", "yes, build …

    line 27
  6. Distinctive:

    Never write implementation code before explicit approval.

    line 75
  7. Distinctive:

    Never mark an acceptance criterion as met without having run the verification command in this session.

    line 77
  8. Distinctive:

    Never widen scope beyond the approved spec without a new approval.

    line 79

“Common” is measured: kept by at least 6 in 10 of the 9 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-First: No Code Before an Approved Spec

When the user asks for a feature, change, or fix, do NOT start writing code. Write a spec first, present it, and wait for explicit approval. A prompt is a wish; a spec is a contract.

Workflow

  1. Investigate before writing. Read the files the change will touch and note how the existing code works. If a decision materially shapes the spec (data model, API surface, new dependency), ask the user before drafting, not after.
  2. Write the spec to specs/<slug>.md, where <slug> is a short kebab-case name for the task (e.g. specs/rate-limit-login.md). Create the specs/ directory if it does not exist. Use the template below. Keep the spec under one page: if it will not fit, the feature is too big, propose splitting it into smaller specs instead.
  3. Present it and stop. Show the spec (or a faithful summary plus the file path) and ask: "Approve this spec, or want changes?" Then WAIT. Do not write, edit, or scaffold any implementation code until the user replies with explicit approval ("approved", "go ahead", "yes, build it"). Silence, follow-up questions, or partial answers are not approval.
  4. After approval, the spec is the contract. Implement exactly what it says. If reality contradicts the spec mid-implementation (an API that does not exist, a wrong assumption), stop, update the spec file, and re-request approval for the delta before continuing. Never expand scope silently, "while I was in there" improvements belong in a future spec, not this diff.
  5. Before declaring done, re-read the spec. Walk the acceptance criteria one by one, run the verification command, and report each criterion as met or not met.

Spec template

# <Title>

## Context
Why this change is needed, in 2-4 sentences. Link related code or issues.

## Scope
What will be built, and which files/modules it touches.

## Out of scope
Explicit non-goals, so nobody "helpfully" builds them.

## Acceptance criteria
- [ ] Machine-checkable statements ("GET /api/login returns 429 after
      5 requests/minute"), never vibes ("works well", "feels fast").

## Verification
One command that proves the criteria, e.g.
npm test -- rate-limit && npx tsc --noEmit

Edge cases

  • Tiny change (typo, comment, one-line config): a one-paragraph spec in chat is enough, but still get a "yes" before editing.
  • User says "skip the spec, just do it": comply, and note in one line that spec-first was skipped at their request.
  • Vague request: draft the spec anyway with your best-guess scope and mark every guess with ASSUMPTION: so approval doubles as clarification.
  • A spec for this task already exists: re-read it and confirm it still stands instead of writing a duplicate.

Boundaries

  • Never write implementation code before explicit approval. The only file you may create pre-approval is the spec itself.
  • Never mark an acceptance criterion as met without having run the verification command in this session.
  • Never widen scope beyond the approved spec without a new approval.
  • Approval comes from the human, never from you deciding the spec "looks fine".

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.