Turn a ticket plus the owner's decisions into requirements.md (what) and plan.md (how, split by intent). Use when a feature is bigger than one PR, when the user says "write the spec/plan", or before any Workflow that builds in parallel.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Spec Writing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/shishir10-spec-writing)
---
name: spec-writing
description: Turn a ticket plus the owner's decisions into requirements.md (what) and plan.md (how, split by intent). Use when a feature is bigger than one PR, when the user says "write the spec/plan", or before any Workflow that builds in parallel.
---
# spec-writing
Read `sous.config.md` first. Output goes to `docs/specs/<ticket>/` and is
COMMITTED with the foundation PR, never left in a scratchpad.
Also read `${CLAUDE_SKILL_DIR}/../sous-rules/evidence.md` and `${CLAUDE_SKILL_DIR}/../sous-rules/parallel-work-contract.md`.
Why committed. *Example incident (replace with your own):* a stack of six PRs cited "prs/P0-devrecord.md for the
per-round contract deltas"; the file lived in a temp directory and was gone
before the second reviewer opened the PR.
## Inputs
1. The ticket, snapshotted to `docs/specs/<ticket>/ticket.md` (template:
`${CLAUDE_SKILL_DIR}/../../templates/ticket.md`) before anything else. If that file exists, use it and
do not fetch again. Otherwise take the first that works, checking each as
`${CLAUDE_SKILL_DIR}/../sous-doctor/checks.md` says:
a. a Jira key (`ABC-123`) and a Jira tool is listed: read the issue, and any
Confluence page it links if a Confluence tool is listed;
b. a GitHub issue (`#<n>`, `owner/repo#<n>` or its URL) and `gh` is OK:
`gh issue view <n> --json number,title,body,labels,comments,url`;
c. otherwise ask the user to paste the ticket (and any linked PRD), name the
one step that would let you read it next time, and stop until they paste.
Record the source and anything not read in the snapshot's header. Never
reconstruct a ticket from its id, title or memory.
2. `decisions.md`: the owner's numbered answers to the open questions. If it
does not exist, THIS skill writes the numbered questions (each with your
recommendation) into `decisions.md`, stops, and asks. Answer them, then
re-run. Do not invent answers;
write `[CLARIFY]` and take the most conservative reading.
## requirements.md (template: `${CLAUDE_SKILL_DIR}/../../templates/requirements.md`)
Per capability:
- business rules and resolution order (who wins when two settings conflict)
- who can do what, by role from the config
- every user-facing message, exact copy, checked twice: can the reader's role
take the action named, and does the control exist at all
- acceptance criteria numbered per intent id (`P0-1`, `P1-3`), each testable
- the scenario matrix (roles x surfaces) and the scope/failure dimensions
- the Money & data line
- out of scope, explicitly
Keep the ticket's own ACs verbatim; add, never rewrite.
## plan.md (template: `${CLAUDE_SKILL_DIR}/../../templates/plan.md`)
- The intent split (see `intent-split-planning`): P0 foundation + parallel
intents, with a size budget per intent.
- ALL schema changes and migrations in P0. No parallel PR adds a migration.
- Frozen interfaces: contracts, service signatures, route shapes, written out,
tagged `<ticket>-freeze` on P0's head.
- File-ownership table: every file each intent may touch; overlaps listed with
how they stay mergeable.
- Per intent: steps, tests (unit + db-backed where races matter), the
divergence fixture (two of everything, see rule "scope pairing"), red-on-
revert targets, the flag read-by table for any new mutating endpoint, e2e
specs, docs to update.
- Rollout: what changes at deploy with the seeded/default config ("nothing"
is a claim; name the test that proves it).
## Keeping the spec alive
The spec is not frozen at P0. When behaviour deviates from it, append a dated
entry to `decisions.md` (never rewrite old rows). At acceptance the
completeness critic diffs ACs against merged behaviour; every deviation is
logged. The PR body names the spec path and commit sha.
## Checks before handing over
- [ ] every AC has an intent id and a planned test
- [ ] every new mutating endpoint has a gate row (flag or `ungated: <why>`)
- [ ] no intent touches a file owned by another without a listed resolution
- [ ] the two-resolution-point cases are named (preview/commit, cron/button, list/detail)
- [ ] `[CLARIFY]` count is listed at the top of plan.md