agentleFS
kwhornekwhorne/elyra-skills/skills/spec-writing/SKILL.md

spec-writing

Skill1 starsChanged 6 months agoMITView on GitHub

Write a focused spec before building - problem statement, scope, acceptance criteria, edge cases, and open questions. Use when the user describes a feature to build, asks for a spec or PRD, or starts a task that is too vague to implement directly.

11 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

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

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 5

    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. Distinctive:

    Before any task expected to take more than an hour of implementation

    line 22
  2. Distinctive:

    Acceptance criteria are the contract: If you can't write a testable criterion, the requirement isn't understood yet.

    line 28
  3. Distinctive:

    Before writing anything, answer (ask the user if needed):

    line 35
  4. Distinctive:

    What already exists?: Read the relevant code first.

    line 40
  5. Very specific:

    Use Given/When/Then or a checklist.

    line 54
  6. Distinctive:

    If a criterion can't fail, delete it

    line 56

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

Define what to build and how you'll know it's done before writing code. A good spec is the cheapest place to find a design flaw.

When to use

  • "Build a feature that…" (and the description fits in one sentence)
  • "Write a spec / PRD for…"
  • The task has unstated assumptions, multiple interpretations, or unclear success criteria
  • Before any task expected to take more than an hour of implementation

Principles

  • Spec before code. Changing a sentence is cheaper than changing a system.
  • Shorter is better. One page that gets read beats ten pages that don't.
  • Acceptance criteria are the contract. If you can't write a testable criterion, the requirement isn't understood yet.
  • Unknowns are content, not gaps. An explicit "Open questions" section is a feature of the spec.

Process

1. Interrogate the request

Before writing anything, answer (ask the user if needed):

  • Who is this for? (end user, admin, another system, developer)
  • What problem does it solve? Not the solution — the problem.
  • Why now? What breaks or stays broken without it?
  • What already exists? Read the relevant code first; the spec must fit reality.

2. Draw the boundary

The most valuable section is Out of scope. Explicitly list:

  • Adjacent features that will not be built
  • Cases that will be rejected or deferred, not handled
  • Quality attributes intentionally skipped (e.g. "no i18n in v1")

3. Write acceptance criteria

Each criterion must be verifiable — a test, a command, or an observable behavior.

  • Use Given/When/Then or a checklist; be consistent
  • Cover the happy path and the named failure modes
  • If a criterion can't fail, delete it

4. Hunt edge cases

Walk these categories explicitly:

  • Empty / zero / null — no items, empty string, missing field
  • Boundaries — max length, first/last page, exactly-at-limit
  • Concurrency — double submit, race between two users
  • Permissions — wrong role, expired session, cross-tenant access
  • Failure — dependency down, timeout, partial write

5. Surface open questions

Anything you'd otherwise silently assume goes here, with your proposed default:

Q: Should deleted items appear in the export? Proposed: no.

Output format

# Spec: <feature name>

**Problem:** 1–3 sentences. The user pain, not the solution.

**Goal:** What changes for the user when this ships.

## In scope
- …

## Out of scope
- …

## Acceptance criteria
- [ ] Given …, when …, then …
- [ ] …

## Edge cases
| Case | Expected behavior |
|------|-------------------|
| …    | …                 |

## Open questions
- Q: …? Proposed: …

Anti-patterns

  • ❌ Writing the spec as a disguised implementation plan ("add a column, then a service…")
  • ❌ Acceptance criteria that restate the feature ("the export works correctly")
  • ❌ Resolving open questions by silent assumption instead of writing them down
  • ❌ Specs longer than the code they describe
  • ❌ Skipping the codebase read — a spec that ignores existing architecture is fiction

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.