Plan an Increment
An increment is one folder — .specweave/increments/NNNN-slug/ — holding
spec.md (intent + ACs + approach), tasks.md (task definitions),
ledger.jsonl (state, written by the CLI) and metadata.json. It is the unit of
work and the tracker; every commit for it carries its id in the subject.
Plan mode first (blocking)
Planning produces a document the user approves before any code is written. If your
tool has a plan mode, enter it now (Claude Code: EnterPlanMode) and wait for
confirmation. Do not create files, do not implement, until the plan is approved.
Steps
Understand the request. Restate it in one sentence: what changes, for whom, why now.
- Scope clear enough to write ACs? Go to 2.
- Not clear (vague goal, unknown users, competing options, unclear done-condition)?
Interview first — ask only the questions whose answers change the spec, in one batch:
the problem behind the request, who hits it, what "done" looks like, what is explicitly
out of scope, constraints (stack, deadline, data), and the riskiest unknown.
Trivial fix → 0 questions. Do not interview to fill a quota.
Look before writing. Read .specweave/config.json (testing commands, sync,
workspace.repos), skim existing increments for overlap (specweave status), and
read the code the change will touch. An Approach written without reading the files is a guess.
Create the folder — the CLI owns id allocation (atomic, retried):
specweave create-increment --auto-id --name "<kebab-slug>" --title "<Title>" \
--description "<one line>" --project "<project id from config>" \
[--type feature|bug|hotfix|refactor] [--supersedes <old-id>]
Superseding an older increment: pass --supersedes <old-id>. That one command abandons the
old increment with closeReason: "superseded by <new-id>" and records supersedes on the new
one — do not split it into two steps. Name the old id in the new spec's Problem section.
No CLI: create the folder by hand, put "supersedes": "<old-id>" in the new metadata.json
and set the old one to "status": "abandoned" with the same closeReason.
Write spec.md — one evolving document, these sections:
# NNNN — <Title>
## Problem
What is wrong today, for whom, and the evidence (issue, log, user quote). Not the solution.
## Scope
In: … · Out: … (the "out" list is what stops scope creep later.)
## Acceptance Criteria
- [ ] AC-01: <observable, testable outcome — a reviewer can check it without asking you>
- [ ] AC-02: …
## Approach
Files that change and in what order · key decisions (+ ADR links) · rejected alternatives
and why · risks and the mitigation.
## Open questions
- <question> — blocking? who decides?
ACs are numbered and observable. "Improve performance" is not an AC; "p95 of
/search under 300 ms with 10k rows" is. Keep them to what this increment ships.
plan.md is optional overflow for a genuinely large design — --with-plan; the
Approach section is the default home.
Write tasks.md — definitions only; the ledger holds state:
### T-01 Add the ledger fold
- AC: AC-01, AC-02 | Files: src/core/tasks/ledger.ts, src/core/tasks/ledger.test.ts | Test: npm test -- ledger
Files: is the ownership unit — two tasks that edit the same file cannot run in
parallel, so merge them or add **Dependencies**: T-NN. Every AC must be covered by at
least one task; every task needs a Test: that a machine can run (or an explicit
"manual: "). Shared contracts (types, schema, migrations) go in an early
task everything else depends on.
Present the plan (problem, ACs, task list, risks) and get approval. Then leave plan mode.
Hand off to execution: sw:do <id> for one agent; sw:team <id> when the work has
3+ disjoint lanes or 15+ tasks.
Rules
- Never hand-edit
metadata.json status — CLI transitions own it. The vocabulary is
planned | active | paused | completed | abandoned; create-increment writes active
(use --planned for backlog work, then specweave start <id> when you pick it up).
- WIP is advisory. The CLI prints one note when active increments exceed
limits.activeIncrements (0 = off). It never blocks; do not invent a cap.
- One agent plans. No planning fan-out — a second opinion on a spec costs more than it adds.
- Umbrella workspaces: increments live in the umbrella root only. The
Project: field on
a user story routes sync to a child repo; never create .specweave/ inside a child repo.
- Bug / hotfix increments are still increments — smaller spec (Problem, one or two ACs,
Approach), same folder shape. Do not skip the spec because it is "quick".
- If the user says "don't create an increment", respect it and work in the conversation.
Resources
1---2name: increment3description: Plan a unit of work as a SpecWeave increment - spec.md with Problem, Scope, numbered ACs and an Approach, plus tasks.md. Use when starting a feature, bug, hotfix or refactor.4---56# Plan an Increment78An increment is one folder — `.specweave/increments/NNNN-slug/` — holding9`spec.md` (intent + ACs + approach), `tasks.md` (task definitions),10`ledger.jsonl` (state, written by the CLI) and `metadata.json`. It is the unit of11work and the tracker; every commit for it carries its id in the subject.1213## Plan mode first (blocking)1415Planning produces a document the user approves before any code is written. If your16tool has a plan mode, enter it now (Claude Code: `EnterPlanMode`) and wait for17confirmation. Do not create files, do not implement, until the plan is approved.1819## Steps20211. **Understand the request.** Restate it in one sentence: what changes, for whom, why now.22 - Scope clear enough to write ACs? Go to 2.23 - Not clear (vague goal, unknown users, competing options, unclear done-condition)?24 Interview first — ask only the questions whose answers change the spec, in one batch:25 the problem behind the request, who hits it, what "done" looks like, what is explicitly26 out of scope, constraints (stack, deadline, data), and the riskiest unknown.27 Trivial fix → 0 questions. Do not interview to fill a quota.282. **Look before writing.** Read `.specweave/config.json` (testing commands, sync,29 `workspace.repos`), skim existing increments for overlap (`specweave status`), and30 read the code the change will touch. An Approach written without reading the files is a guess.313. **Create the folder** — the CLI owns id allocation (atomic, retried):32 ```33 specweave create-increment --auto-id --name "<kebab-slug>" --title "<Title>" \34 --description "<one line>" --project "<project id from config>" \35 [--type feature|bug|hotfix|refactor] [--supersedes <old-id>]36 ```37 Superseding an older increment: pass `--supersedes <old-id>`. That one command abandons the38 old increment with `closeReason: "superseded by <new-id>"` and records `supersedes` on the new39 one — do not split it into two steps. Name the old id in the new spec's Problem section.40 No CLI: create the folder by hand, put `"supersedes": "<old-id>"` in the new `metadata.json`41 and set the old one to `"status": "abandoned"` with the same `closeReason`.424. **Write `spec.md`** — one evolving document, these sections:4344 ```markdown45 # NNNN — <Title>4647 ## Problem48 What is wrong today, for whom, and the evidence (issue, log, user quote). Not the solution.4950 ## Scope51 In: … · Out: … (the "out" list is what stops scope creep later.)5253 ## Acceptance Criteria54 - [ ] AC-01: <observable, testable outcome — a reviewer can check it without asking you>55 - [ ] AC-02: …5657 ## Approach58 Files that change and in what order · key decisions (+ ADR links) · rejected alternatives59 and why · risks and the mitigation.6061 ## Open questions62 - <question> — blocking? who decides?63 ```6465 ACs are numbered and observable. "Improve performance" is not an AC; "p95 of66 `/search` under 300 ms with 10k rows" is. Keep them to what this increment ships.67 `plan.md` is optional overflow for a genuinely large design — `--with-plan`; the68 Approach section is the default home.695. **Write `tasks.md`** — definitions only; the ledger holds state:7071 ```markdown72 ### T-01 Add the ledger fold73 - AC: AC-01, AC-02 | Files: src/core/tasks/ledger.ts, src/core/tasks/ledger.test.ts | Test: npm test -- ledger74 ```7576 `Files:` is the ownership unit — two tasks that edit the same file cannot run in77 parallel, so merge them or add `**Dependencies**: T-NN`. Every AC must be covered by at78 least one task; every task needs a `Test:` that a machine can run (or an explicit79 "manual: <what to check>"). Shared contracts (types, schema, migrations) go in an early80 task everything else depends on.816. **Present the plan** (problem, ACs, task list, risks) and get approval. Then leave plan mode.827. **Hand off to execution**: `sw:do <id>` for one agent; `sw:team <id>` when the work has83 3+ disjoint lanes or 15+ tasks.8485## Rules8687- **Never hand-edit `metadata.json` status** — CLI transitions own it. The vocabulary is88 `planned | active | paused | completed | abandoned`; `create-increment` writes `active`89 (use `--planned` for backlog work, then `specweave start <id>` when you pick it up).90- **WIP is advisory.** The CLI prints one note when active increments exceed91 `limits.activeIncrements` (`0` = off). It never blocks; do not invent a cap.92- **One agent plans.** No planning fan-out — a second opinion on a spec costs more than it adds.93- **Umbrella workspaces**: increments live in the umbrella root only. The `Project:` field on94 a user story routes sync to a child repo; never create `.specweave/` inside a child repo.95- **Bug / hotfix increments are still increments** — smaller spec (Problem, one or two ACs,96 Approach), same folder shape. Do not skip the spec because it is "quick".97- If the user says "don't create an increment", respect it and work in the conversation.9899## Resources100101- `specweave create-increment --help`, `specweave status`102- [Official Documentation](https://verified-skill.com/docs/reference/skills#increment)