spec-writing
Skill1 starsChanged 23 days agoMITView on GitHub
Write a specification or design doc before building a feature, refactor or pipeline change. Use whenever asked to write, draft or plan a spec, design doc or implementation plan, or before starting work large enough to need one (several modules, a new command or stage, a data-format change). A spec here is testable: numbered requirements, each with an acceptance test that is written before the implementation, the domain rules and data sources the change depends on, and the wiring and docs it must touch.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- rajanrx/skillstheir own version, first seen Nov 8, 2026
- crbnos/carbontheir own version, first seen Nov 7, 2026
- rioffe/specchecktheir own version, first seen Nov 6, 2026
- ragna-ai/ragna-studiotheir own version, first seen Nov 1, 2026
- converge-ai-labs/agent-foundationtheir own version, first seen Oct 29, 2026
- dagarre00/claude-code-templatetheir own version, first seen Oct 15, 2026
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- crbnos/carbon★ 2.8ksame name
- converge-ai-labs/agent-foundation★ 825same name
- itseffi/agentic-os★ 114same name
- khuynh22/agent-dev-team★ 9same name
- rioffe/speccheck★ 5same name
- anyoneanderson/agent-skills★ 3same name
- mariomile/builder-os★ 2same name
- rajanrx/skills★ 2same name
- bedomax/webdesigner-agent★ 1same name
- dagarre00/claude-code-template★ 1same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- clarify-firstSkill
- coding-standardsSkill
- dependency-safetySkill
- docs-maintenanceSkill
- lean-contextSkill
- security-advisoriesSkill
- writing-claude-mdSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
2
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
- Distinctive: line 68
Write the acceptance tests first — unit by unit when the spec has several — run them and see each fail for the right reason before writing …
- Very specific: line 74
Run diff-reviewer with the spec path.
- Distinctive: line 75
If the implementation had to deviate, change the requirement itself in the same change — not a note on top — and update the spec's status …
“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.
Files
Spec writing
A spec exists so that "done" can be checked. Every requirement must be one a test
or a command can confirm; anything that can't be checked is a note, not a
requirement. Put it where the repo keeps specs (e.g. docs/specs/), match their
existing format if one exists, open it with the repo's status header, and add it
to the specs index (see docs-maintenance). An implementation plan is a build
order within the spec, or a temporary companion folded back into it once built.
Structure
- Goal — the problem, in two or three sentences, and who it is for.
- Non-goals — what this deliberately does not do. Prevents scope creep and tells the reviewer what not to flag.
- Interface — signatures, CLI commands and flags, file and data shapes, config keys. Concrete enough to write tests against. Design the operations and their laws first (what composes with what, what must always hold), then the types.
- Requirements — numbered
R1,R2, … Each is one observable behaviour: "given X, the command does Y". Include the failure behaviour, not just the happy path. - Acceptance tests — for each requirement, the test that proves it: input,
expected output, and the test's name. Work expected values out independently
of the code (the arithmetic, or a hand-checked example). Add properties
where they exist (round-trip, idempotence, ordering, conservation, "never more
than N") — they become property-based tests. Every acceptance test must run
offline and free: mock or record any paid model or API call. The rules for
good tests are in
coding-standards. - Edge cases — empty, missing, duplicate, boundary, malformed, concurrent (including parallel agents or workers writing the same files). Each one either maps to a requirement or is explicitly out of scope.
- Data and domain — whichever of these the change depends on:
- Domain rules: each limit, formula, threshold or external fact, with its source, the requirements that apply it, every code path that must apply it, and a worked example. A rule is usually missed in the second place it applies.
- Sources: where each input comes from (command, API, file), who maintains it (committed, gitignored, hand-kept), its limits (pagination, rate limits, freshness), and the recorded fixture tests use instead.
- Numbers: units, rounding, decimal or float, time zone, which day's rate.
- Determinism boundary: when a skill, agent or prompt presents figures, the command that produces each one. The model selects, quotes and judges; it never computes.
- Wiring — every entry point that must reach the new behaviour (CLI, registry, orchestrator, config) and every doc, skill, prompt or README that describes the area and must change with it, the specs index included. This list is what the reviewer checks the diff against.
- Open questions — decisions the user must make. Resolve them before
implementing (see
clarify-first).
Building from a spec
- Have the spec reviewed: run
spec-reviewerwith the user's request and the spec path, and wait for its result. Resolve what it confirms and the open questions before writing tests. - Write the acceptance tests first — unit by unit when the spec has several — run them and see each fail for the right reason before writing the code it covers. List that failing run among the commands in the report.
- Implement until they pass; add tests for edge cases found on the way.
- Walk the Wiring list; exercise the change through its real entry point at no cost (dry run, fixtures, recorded responses — never a paid call).
- Run
diff-reviewerwith the spec path; it maps each requirement to code. - If the implementation had to deviate, change the requirement itself in the same change — not a note on top — and update the spec's status and the index. A spec that disagrees with the code misleads the next reader.
Requirement ids live in the spec only. Code, comments and test names describe
behaviour (test_merge_keeps_newest_entry), never R3 or the spec section.
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
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.

