/modaal-skills:spec-driven-developmentfrom modaal-skills
Write the spec rules into a repository's agent rules file, AGENTS.md and CLAUDE.md, and write, review or amend a spec by hand in specs/NNN-slug/spec.md. Covers measuring the current state before planning, phasing the work into one commit per phase under the spec's slug, editing the spec in place while its feature is in progress and by addition once it is done, and listing every external reference so a public repository names nothing private. Use when asked to add or update spec rules in AGENTS.md or CLAUDE.md; when asked to write, review, update or amend a spec, design document or implementation plan in the spec directory; when a change is too big to describe in a commit message; or when a spec cites a private repository, a section that does not resolve, or an unpinned source.
Ships in modaal-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill does two jobs.
specs/NNN-slug/spec.md.Write this block verbatim, from its heading to its last line:
## Specs
- **Write a spec for a change too big to describe in a commit message**, in
`specs/NNN-slug/spec.md`: `NNN` counts up from `001`, and the slug names the feature.
- **Writing a spec is not authorization to implement it.** When the task is a spec, write the
document alone, then stop and ask.
- **While the feature is in progress, edit the spec in place** to keep the plan current. Where later
work overturns an important decision, leave a short note saying what it replaced and why.
- **Once the feature is done, amend the spec by addition.** A feature is done when the commit that
lands its last planned phase reaches the default branch. An addition that supersedes a claim names
that claim's section, and the section takes a line pointing to the addition. A closed spec may
take a follow-up file beside it instead, `followup-<topic>.md`, under the same rule.
- **A new spec names what it obsoletes**, by number and section: "obsoletes 001 §4.6".
- **Every reference in a spec resolves for its reader.** A section reference points at a heading in
the same file. An external reference is to a public source, pinned where the spec cites a line, a
count or a quotation, and has a row in the spec's `External references` section. In a public
repository, a private reference is named only in that section, and redacted before the commit
carrying it is pushed.
*Maintained by the `spec-driven-development` skill down to this line. This repository's own lines go below.*
The agent rules file is AGENTS.md, and every byte-identical per-agent copy the repository
carries, CLAUDE.md among them.
AGENTS.md and CLAUDE.md the repository has. With neither, stop: say so, and
name the repository-init skill, which writes both. With both, run cmp AGENTS.md CLAUDE.md
before editing; a CLAUDE.md that matches is a copy.## Specs in AGENTS.md when it exists, otherwise in the one file present, and make
every edit below in that file. Also list any other section that states spec rules, such as a
heading naming specs, design documents or plans, to show the user in step 4.writing-style or git-discipline skill, and after any lines the repository added
below that line. With neither section present, append the block at the end of the file.## heading when there is
no such line. Show the user the difference, and replace the text only when the user confirms.
Offer to move the repository's own examples and exceptions below the skill's line; lines already
below it are the repository's own, so leave them.cp AGENTS.md CLAUDE.md.
Leave a symlink or an @AGENTS.md import as it is. Report a CLAUDE.md that differed before
the edit as drift, and ask the user which file holds the rules they want.git-discipline skill is installed, its confirmation rule covers this commit.ls specs/ lists the specs; the new one takes the next number, and a slug
of two to five words naming the feature: specs/007-offline-sync/spec.md.git rev-parse --short HEAD. A plan written from memory plans against a repository that may not
exist.[007-offline-sync], and the commit that writes the spec is the
first of the series. When the git-discipline skill is installed, it owns the subject-line
format and the confirmation before each commit.followup-<topic>.md beside it, naming by section each claim it supersedes, and a line in each
superseded section pointing forward.A reader holds the repository and the public internet. Every reference in the spec has to resolve for that reader.
§4.2. List the headings with
grep -n '^#' specs/007-offline-sync/spec.md and check each § against them. A decision or
question number, such as D3 or Q2, points at its definition in the same file.src/sync.ts:40-52 at a1b2c3d". Where a section heading will do, name the
heading instead.External references section: an id (E1,
E2 …), what the reference is, whether it is public, the URL with its pin or the redaction text,
and the sections citing it. The body cites the id, and a section of an external document is cited
after its id: E3 §4. Pin a reference the spec quotes, or cites a line or a count from: a commit
hash, a page revision, a package version, an arXiv version.gh repo view --json visibility --jq .visibility on GitHub, or ask the user. When it is public,
name a private repository, document or path only in its row, and cite the id everywhere else.
Before the commit carrying the row is pushed, replace the row's name and location with a redaction
text that starts *Redacted:* and says what the reference was and when it was read. A pushed
commit stays readable in clones, forks and pull requests after a history rewrite, so redacting at
merge is too late. In a private repository, redact before the merge into any published branch.Before a push, check the spec's ids against its rows:
grep -o 'E[0-9][0-9]*' specs/007-offline-sync/spec.md | sort -u # every id the spec mentions
grep -n '^| E[0-9]' specs/007-offline-sync/spec.md # every row
Read the spec against these, and report each gap with its section:
§, decision and question reference resolves to a heading or definition in the file.No tool in this flow generates a spec, assigns its number or checks that §1 was measured. The commit-subject prefix is the only part a reviewer can check mechanically, by reading the log. The review in the previous section is where the rest is caught.
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/git-disciplineWrite the git and pull-request rules into a repository's agent rules file, AGENTS.md and CLAUDE.md, so an agent there confirms every commit, leaves the index alone, writes imperative subject lines and reaches the default branch through a pull request, starting with its first commit. Records the repository's default branch, merge strategy and branch-naming scheme with the user. Use when asked to add or update git, commit or pull-request rules in AGENTS.md or CLAUDE.md; when choosing a repository's default branch, merge strategy or branch names; or when a user asks that agents stop committing, staging, pushing or merging without asking./repository-initSet a repository up so a coding agent working in it has rules to follow from its first turn. Writes AGENTS.md and its byte-identical copy CLAUDE.md, the check and CI job that hold the two identical, README.md, CONTRIBUTING.md, SECURITY.md, a license file, .gitignore and specs/. Use when creating a new repository, when a repository has no AGENTS.md or CLAUDE.md, when asked to add agent rules, contributor documentation, a security policy or a license, when AGENTS.md and CLAUDE.md have drifted apart, or when a CI job reports that CLAUDE.md differs from AGENTS.md./writing-styleWrite twelve rules for prose that states facts and actions into a repository's agent rules file, AGENTS.md and CLAUDE.md, so every agent session there follows them from its first turn, and review a draft against them. Use when asked to add or update writing rules in AGENTS.md or CLAUDE.md; when a user wants the agents in a repository to stop producing LLM-isms, AI tells, filler, buzzwords or padded prose; when asked to make a document concrete or to cut it down; or when asked to review a README, a spec, a commit message, a pull-request description or a reply for those tells.Other plugins' skills for the same job
npx claudepluginhub modaal-agent/skills --plugin modaal-skills