From dossier
Execute a §T task with TDD covenant. Claims row (. → ~), runs tests/edits, commits, refreshes §X, flips row to x with commit cite. Resumable on crash via §S step-log. Invoke when the user says "ds:build T<N>", "build next task", "ds:build --next", "implement T<N>", or "work on <task-description>".
How this skill is triggered — by the user, by Claude, or both
Slash command
/dossier:build <T-id> | --next | --resume<T-id> | --next | --resumeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
TDD covenant: RED → GREEN → refactor. One commit per `x`-flip. Resumable.
TDD covenant: RED → GREEN → refactor. One commit per x-flip. Resumable.
<T-id> (e.g. T3): explicit target.--next: pick first state=. row in §T.--resume: re-enter incomplete op for the same target (auto-detected from §S; flag is explicit override).Per ADAPTERS.md. Note HAS_RTK, HAS_CTX, HAS_FASTEDIT.
Per ds:status step 1. If none: refuse w/ "no live dossier. ds:new first."
<T-id> provided: locate row in §T. Refuse if missing or already x.--next: pick first state=. row. Refuse if none.id, P, state, task, cite, verify.Write <dir>/.ds-lock:
{"pid": <PID>, "started": "<ISO>", "skill": "ds:build", "target": "<T-id>"}
If lock present + active (pid alive + age <30min): refuse w/ "active op: pid since ". Caller decides.
If stale: clear + proceed.
Read §S grep ds:build <T-id>. Identify last event:
| Last event | Resume point |
|---|---|
| (no entries) | full run from step 5 |
START | step 5 (re-run safe) |
commit=<sha> | step 7 (skip work + commit) |
§X=refreshed | step 8 (flip only) |
DONE | nothing to do; release lock + exit |
If state still .: flip to ~. Atomic write. Append §S as its own paragraph (blank line before AND after — per FORMAT.md §11; applies to every §S append in this skill):
<YYYY-MM-DD HH:MM> ds:build <T-id> START
If verify column references V<N>:
V<N> (search §V row's check column).test(<scope>): add <V-id> check).Then implement. Run test → GREEN. Refactor if needed.
If verify is shell predicate: run after work, must exit 0. If verify is —: implement, no test gate. (Discouraged; only for docs / config.)
Use fastedit if HAS_FASTEDIT=1 for surgical code edits. Else Edit tool.
If tests fail and root cause unclear: spawn dossier-scout subagent with mission "root-cause this failure: , repo=, last-passing=". Use report to guide fix. Scout output is caveman-compressed; main thread aggregates.
If failure suggests a missing invariant: trigger ds:backprop flow (don't just patch the symptom).
git add only files touched by this task. git commit with subject pattern:
<type>(<scope>): <imperative summary>
<optional body — only if "why" isn't obvious>
Refs §T <T-id>
Capture SHA. Append §S:
<YYYY-MM-DD HH:MM> ds:build <T-id> commit=<sha>
If commit hooks fail: investigate root cause (do NOT --no-verify). Fix, retry commit.
For each repo in §X: run git status -sb + git rev-list --count origin/<branch>..HEAD + git describe --tags --abbrev=0. Update row.
Use mcp__context-mode__ctx_batch_execute if HAS_CTX=1 (parallel multi-repo). Else parallel Bash.
Atomic write DOSSIER.md. Append §S:
<YYYY-MM-DD HH:MM> ds:build <T-id> §X=refreshed
State ~ → x. Update cite column with commit SHA. Atomic write. Append §S:
<YYYY-MM-DD HH:MM> ds:build <T-id> DONE → x cite=<sha>
Run lib-regen-index.sh. INDEX now reflects updated T <done>/<total>.
rm <dir>/.ds-lock.
ds:build <T-id> → x
commit=<sha>
§X: <repo> ahead=<n> [+ refreshes]
next: ds:build --next [or remaining T-ids]
--resume or wait.~, release lock, write §S w/ BLOCKED: <reason>. Operator decides.~, release lock. Operator investigates.npx claudepluginhub raisedadead/claude-code-plugins --plugin dossierGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.