/decentpowers:writing-specfrom decentpowers
Use after a design is approved in brainstorming, to turn it into one layered detailed spec (acceptance criteria, tasks, and how to verify) before touching code.
Ships in decentpowers. 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.
One file holds the whole contract: intent, acceptance criteria, scope, design notes, the task breakdown, and how to verify. Spec and plan are the same document - there is no separate plan. brainstorming wrote the upper layers; you add the lower ones.
Announce: "I'm using writing-spec to complete the detailed spec."
Open the spec file brainstorming started (docs/specs/YYYY-MM-DD-<topic>.md). It already has the summary, Acceptance at a glance, Scope, Requirements & design notes, and Open questions. You append two layers and finalize:
Then set lane, and status: approved once Open questions is empty.
Follow spec-template.md in this skill's directory - it is the source of truth for structure. Layout (progressive disclosure): frontmatter → one-line summary → Acceptance at a glance → Scope → Requirements & design notes → Tasks → End-to-end verification → Open questions. A human skims top-down; an agent jumps to the layer it needs.
Stable IDs (AC-1, AC-2) with RFC-2119 verbs (MUST / SHOULD). Pick the lightest form that stays unambiguous:
When <trigger>, the system shall <response>. or The system shall <X>.A task is the smallest unit worth a fresh reviewer's gate. It is not line-by-line code: it is the contract a capable implementer turns into code without re-deriving the design. spec-template.md holds the shape; what follows is what each part must carry.
Group tasks under ### AC-n · <short name>. The group is the commit boundary, so the Tasks section shows at a glance how many commits the spec will produce. An acceptance criterion that produces no diff, because an existing gate already proves it, gets an empty group: ### AC-n · (no task - proven by the gate). Do not invent a task to satisfy a coverage rule.
A task with behavior carries four fields:
files - the boundary, test files included. What this task may touch.contract - signatures, data shapes in and out, exact constants and copy, invariants to hold. The contract, never the procedure: naming the steps to type turns the spec back into the line-by-line plan an explicit contract exists to replace.tests - the test names, one per behavior and one per edge case. Deciding the edge cases here, while the design is still in view, is what lets the build run test-first without stopping to think.done when - the narrow command that proves this task, the one run during its red-green cycle.A mechanical task, a version bump or a copy fix, collapses to one line carrying files and done when.
Hold contract to six lines and tests to six names. Past that the task is too big: split it. Without that ceiling the format drifts back into the plan it replaced.
[S] / [M] / [L] measure code volume, not contract complexity: a three-line contract that has to generate twelve files is still [L]. [P] means parallel-safe, touching no file another task touches. depends on Tn states ordering where it exists.
Fold setup, config, and docs into the task whose deliverable needs them. Split only where a reviewer could reject one task while approving its neighbor.
AC altitude sets the commit count. An AC is a user-visible behavior, not a micro-step - aim for roughly 3-6 per feature. Because implementing commits once per AC, chopping ACs too fine makes commits re-explode; keeping them at behavior altitude keeps history to a handful of atomic commits.
lane in the frontmatter decides which build skill runs, so decide it here rather than leaving it to the moment. Choose full when any of these holds: the work introduces an interface across modules, changes data or a schema, touches authentication, payment, or another security surface, involves concurrency, lands in code that has no tests yet, or the spec runs past roughly eight tasks. Otherwise choose fast.
Write one line of reasoning beside the value. A lane chosen without a stated reason is one nobody can check.
Copy the spec's project-wide constraints (version floors, naming/copy rules, exact magic values) verbatim into Requirements & design notes. Every task inherits them.
Every part must carry real content. These are failures: a "to-be-decided" stub, "handle edge cases" with no specifics, a task that names no files or no verify command, an acceptance criterion no task verifies, a name or type spelled two ways across tasks.
With fresh eyes, against the spec:
### AC-n group, holding at least one task or a stated reason the gate already proves it.done when is a command this project actually runs.Fix inline.
Spec complete, lane set, status: approved. Offer execution naming the skill the lane chose:
lane: full - "Detailed spec is ready at
<path>. I'll build it with implementing: task by task in this session, tests required, verifying after. Want me to start?"lane: fast - "Detailed spec is ready at
<path>. I'll build it with fast-implementing: red-green per task, one gate run and one commit per acceptance criterion, verifying after. Want me to start?"
On yes, invoke that skill. The lane already made the choice, so do not reopen it here.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores intent, requirements, and design before implementation./debuggingUse when you hit any bug, test failure, or unexpected behavior - find the root cause before proposing a fix./fast-implementingUse to build a spec whose frontmatter says lane fast - same detailed tasks as implementing, but red-green per task with one gate run and one commit per acceptance criterion, and no subagents.npx claudepluginhub hqkh4nh/decentpowers --plugin decentpowers