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…
Claim, finish, skip and release SpecWeave tasks via the append-only ledger so many agents share one increment. Use for "claim a task", "mark task done", "what next", "who owns T-03".
$ npx -y skills add anton-abyzov/specweave --skill sw-task --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sw-taskContext preview
The summary Claude sees to decide when to auto-load this skill.
Claim, finish, skip and release SpecWeave tasks via the append-only ledger so many agents share one increment. Use for "claim a task", "mark task done", "what next", "who owns T-03".
description: Claim, finish, skip and release SpecWeave tasks via the append-only ledger so many agents share one increment. Use for "claim a task", "mark task done", "what next", "who owns T-03". argument-hint: "<list|next|claim|done|skip|release|block> [T-id] [increment-id]" version: "2.0.0"
Task state lives in `.specweave/increments/<id>/ledger.jsonl`: an append-only JSONL file that any agent, from any vendor, can write. `tasks.md` holds the task DEFINITIONS; the ledger holds the STATE. Never edit a ledger line — append.
**Two paths, one file format.** Run `specweave --version`: exit 0 → **CLI path** (accelerator). Command not found → **manual path**. Both produce byte-identical ledger lines.
Task definition in `tasks.md` — header + one field line:
### T-01 Fold the ledger - AC: AC-01, AC-02 | Files: src/a.ts, src/a.test.ts | Test: npm test -- a
`Files:` is the ownership unit: claim the task that owns a file before editing it.
Ledger line — one JSON object per line, keys in this order:
{"t":"T-01","e":"claim","by":"codex@mbp","at":"2026-09-02T10:00:00Z","note":"optional","evidence":"optional"}Sort events by `at` (ties: smaller `by` first), then apply per task:
| Event | Accepted when | Result | |---|---|---| | `claim` | task open, or held by you, or the holder's claim is older than the 2h lease | `claimed by <you>` | | `done` | has `evidence`, and you hold it / it is open / the claim is stale | `done` (terminal) | | `release` | you are the holder | `open` | | `block` | open or held by you | `blocked` + reason | | `skip` | has `note`, not already done/skipped | `skipped` (terminal) |
Earliest live claim wins; a claim with no `done` after **2 hours** is stale and may be taken over. A task with no ledger events is `open`.
specweave task next [<inc>] # first open task, deps met, no Files conflict specweave task claim T-01 [<inc>] # exit 3 lost race · 4 Files overlap · 6 deps unmet specweave task done T-01 [<inc>] --run "npm test -- a" # exit 5 = command failed, stays open specweave task done T-01 [<inc>] --evidence "<sha> + what you ran" specweave task skip T-01 [<inc>] --note "<why>" specweave task block T-01 [<inc>] --note "<what is missing>" specweave task release T-01 [<inc>] | specweave task release --all-mine specweave task list [<inc>] [--json] # table + counts specweave task render [<inc>] # refresh the SW:BOARD block in tasks.md specweave task whoami # your agent id
`<inc>` may be omitted when exactly one increment is `active`. `done` runs the task's `Test:` command when `--run` is omitted and stores its exit code plus the last output lines as evidence; it auto-claims a task nobody holds.
1. Read `tasks.md` for the definitions and `ledger.jsonl` for the state; pick the lowest open `T-id` whose `Files:` nobody holds. 2. Append the event. Timestamp: `date -u +%Y-%m-%dT%H:%M:%SZ` (bash) / `(Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')` (PowerShell).
bash / zsh:
L=.specweave/increments/0042-slug/ledger.jsonl
printf '%s\n' '{"t":"T-01","e":"claim","by":"codex@mbp","at":"2026-09-02T10:00:00Z"}' >> "$L"PowerShell — always `[IO.File]::AppendAllText`, never `>>` (it writes UTF-16 with a BOM):
$L = '.specweave\increments\0042-slug\ledger.jsonl'
$line = '{"t":"T-01","e":"claim","by":"codex@win","at":"2026-09-02T10:00:00Z"}'
[IO.File]::AppendAllText($L, $line + "`n", [Text.UTF8Encoding]::new($false))3. Run the task's `Test:` command yourself, commit with the increment id in the subject (`0042: …`), then append the `done` line — evidence is what makes it believable:
{"t":"T-01","e":"done","by":"codex@mbp","at":"2026-09-02T11:30:00Z","evidence":"npm test -- a → exit 0 (14 passed) / a1b2c3d"}4. Leave `tasks.md` alone in this path — a later `specweave task render` rewrites its state lines and the `<!-- SW:BOARD -->` table from the ledger.
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,…