agentleFS
ekirtonekirton/Poule/.claude/skills/writing-specs/SKILL.md

writing-specs

Skill0 starsChanged 8 months agoApache-2.0View on GitHub

Specification writing standards — document structure, EARS template, Design by Contract, interface contracts, state machines, error specification, signal quality. Use when creating or editing specification/ files.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use writing-plans.

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.
  • OpenAISkill

    writing-plans

    Use when you have a spec or requirements for a multi-step task, before touching code

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 7

    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:

    Use domain language, not solution language.

    line 29
  2. Distinctive:

    Always provide an explicit transition table -- never narrative.

    line 66
  3. Distinctive:

    Every non-terminal state needs at least one outbound transition.

    line 72
  4. Distinctive:

    Prefer tables over prose for structured content.

    line 83
  5. Distinctive:

    No TBD/TODO -- make provisional decisions explicitly.

    line 84
  6. Distinctive:

    No aspirational prose or redundant restatements.

    line 85
  7. Distinctive:

    Keep language-agnostic content separate from language-specific content.

    line 90

“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

Specification Writing Standards

Document Structure

1. Purpose                  [required]
2. Scope                    [required]
3. Definitions              [if domain terms used]
4. Behavioral Requirements  [required]
5. Data Model               [if component owns/transforms data]
6. Interface Contracts      [if component has boundaries]
7. State and Lifecycle      [if behavior depends on history]
8. Error Specification      [required]
9. Non-Functional Reqs      [if applicable]
10. Examples                [required for complex behaviors]
11. Language-Specific Notes [separate section or file]

Order: happy path -> errors/edges -> NFRs -> nice-to-haves. Within components: inputs -> outputs -> errors -> internals.

Abstraction Level

  • Describe what and why, with enough how to constrain -- not dictate.
  • Use domain language, not solution language.
  • Be precise at boundaries (inputs, outputs, errors, state transitions). Be abstract about internals.
  • Platform-specific statements belong in Language-Specific Notes.

Requirements

Each requirement: atomic (one behavior), testable, unambiguous (one interpretation).

Banned terms (replace with measurables): robust, efficient, user-friendly, flexible, reliable, secure, fast, scalable, appropriate, various, quickly, "in a timely manner."

Fix ambiguity: replace pronouns with nouns, use active voice, split compound "and" statements.

EARS template:

[When <trigger>] [while <precondition>] the <system> shall <action> [the <object>]

Behavioral Specs -- Design by Contract

ElementDefinition
REQUIRESWhat must be true before (caller's obligation)
ENSURESWhat must be true after (implementer's obligation)
MAINTAINSWhat is always true (both sides)

Include 2-3 concrete Given/When/Then examples per behavior, placed immediately after the requirement.

Data Model

Define entities with domain-level types. State all constraints, validation rules, and relationships with cardinality.

Interface Contracts

Per boundary operation: Input, Output, Guarantees, Error strategy, Concurrency, Idempotency (required for retriable operations). Complete when either side can be implemented without reading the other's internals.

State Machines

Always provide an explicit transition table -- never narrative.

| Current State | Event | Guard | Action | Next State |

Every non-terminal state needs at least one outbound transition. Every event accounted for in every non-terminal state.

Error Specification

Classify per operation: input error, state error, dependency error, invariant violation.

Enumerate edge cases: empty input, boundary values, null/missing, duplicates, concurrent access, partial failure, repeated invocation.

Signal Quality

  • Target <= 3,000 tokens per section.
  • Prefer tables over prose for structured content.
  • No TBD/TODO -- make provisional decisions explicitly.
  • No aspirational prose or redundant restatements.
  • Front-load critical requirements.

Language Separation

Keep language-agnostic content separate from language-specific content. The agnostic layer must survive a technology migration unchanged.

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.