auto
Run an increment unattended - the Stop hook feeds you back into the loop until every task is done. Use when saying "auto mode", "run until done", or "ship this…
Implement a SpecWeave increment task by task through the ledger, with evidence per task and a verified close. Use for "implement this", "start working", "continue the increment", "keep going".
$ npx -y skills add anton-abyzov/specweave --skill sw-do --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sw-doContext preview
The summary Claude sees to decide when to auto-load this skill.
Implement a SpecWeave increment task by task through the ledger, with evidence per task and a verified close. Use for "implement this", "start working", "continue the increment", "keep going".
description: Implement a SpecWeave increment task by task through the ledger, with evidence per task and a verified close. Use for "implement this", "start working", "continue the increment", "keep going". argument-hint: "[increment-id]" version: "2.0.0"
One loop: pick a task, claim it, implement inside its `Files:`, prove it with a test, record the evidence. Repeat until nothing is claimable, then verify and close. State is the ledger (`sw-task`); the spec is the contract.
Run `specweave --version`: exit 0 → **CLI path**. Not found → **manual path** (same files, appended by hand — see `sw-task`).
No id given → the single increment whose `metadata.json` has `status: active`. Several active → list them and ask which. None → run `sw-increment` first.
1. **Next** — `specweave task next <inc>`: the first open task whose deps are done and whose `Files:` no live claim holds. Manual: lowest open `T-id` in `tasks.md` with no live claim in `ledger.jsonl`. 2. **Claim** — `specweave task claim T-01 <inc>` (exit 3 = someone owns it, pick another · 4 = Files overlap · 6 = deps unmet). Manual: append `{"t":"T-01","e":"claim","by":"<agent>","at":"<ISO>"}`. Never edit before claiming. 3. **Read** — the task's `AC:` ids in `spec.md` and its `Files:`. Read the Approach section for that scope only; do not re-read the whole repo. 4. **Implement** — inside that task's `Files:` and nothing else. Need another file → claim the task that owns it, or add a task: `### T-07 Title` + `- AC: AC-03 | Files: src/b.ts | Test: npm test -- b`. 5. **Prove** — run the task's `Test:` command. Red → fix; never continue past a failing test. 6. **Commit** — subject starts with the increment id: `git commit -m "0042: fold the ledger"`. 7. **Done with evidence** — `specweave task done T-01 <inc> --run "npm test -- a"` (exit 5 = the command failed, task stays open). No `Test:` → `--evidence "<sha> + what you ran"`. Manual: append `{"t":"T-01","e":"done","by":"<agent>","at":"<ISO>","evidence":"npm test -- a → exit 0 / <sha>"}`. 8. **Stuck / not needed** — `task block T-01 --note "<what is missing>"` or `task skip T-01 --note "<why>"` (skip is terminal and needs a reason). 9. Back to 1.
`ledger.jsonl` is the only state; append one line per event (full protocol in `sw-task`):
printf '%s\n' '{"t":"T-01","e":"claim","by":"codex@mbp","at":"2026-09-02T10:00:00Z"}' \
>> .specweave/increments/0042-slug/ledger.jsonl$L = '.specweave\increments\0042-slug\ledger.jsonl'
$line = '{"t":"T-01","e":"done","by":"codex@win","at":"2026-09-02T11:30:00Z","evidence":"npm test -- a → exit 0 / a1b2c3d"}'
[IO.File]::AppendAllText($L, $line + "`n", [Text.UTF8Encoding]::new($false))PowerShell never uses `>>` here: it writes UTF-16 with a BOM and the line is unreadable to every other tool.
When every task is `done` or `skipped`:
1. `specweave verify <inc>` — runs the project's test/lint/build commands (config `testing.commands`, else auto-detected), checks the ACs in `spec.md`, writes `reports/verify.md` + `reports/verify.json`. `verify.json.ok` is the only closure gate. Manual: run the same commands yourself and write `reports/verify.md` with the real output. 2. Tick the ACs you satisfied in `spec.md` (`- [x] AC-01 …`) — only the ones the evidence supports. 3. Review before shipping user-facing work: `sw-review` (fresh context, adversarial). 4. `specweave complete <inc>` — refuses without a passing `verify.json` unless you pass `--reason "<why>"`.
"All tasks are complete, should I close?" is the anti-pattern. Verify, then close.
Spec-first AI development: describe a feature → AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.
Repo: anton-abyzov/specweave
Run an increment unattended - the Stop hook feeds you back into the loop until every task is done. Use when saying "auto mode", "run until done", or "ship this…
Expand the solution space before committing - framed options compared on stated criteria, ending in a pick. Use when saying "brainstorm", "ideate", or "what…
Work an increment task by task through the ledger: task next, claim, implement, commit, task done with evidence. Use when saying "implement", "start working",…
Close an increment: ledger check, specweave verify, optional review, then specweave complete. Use when all tasks are done and saying "close increment", "we are…
Write a portable, secret-scrubbed handoff doc so this work can continue in any AI tool or on any machine. Use when saying "handoff", "running out of tokens",…
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,…