From dossier
Close a live dossier. Validates §T all-x, §X clean, §B all-fixed, writes §Z postscript (requires --complete or --successor <slug>), moves dir to _archive/. Atomic. Resumable. Invoke when the user says "ds:close", "close dossier", "wrap dossier", "archive this phase", "ds:close --complete", or "ds:close --successor <slug>".
How this skill is triggered — by the user, by Claude, or both
Slash command
/dossier:close --complete | --successor <slug> | --resume--complete | --successor <slug> | --resumeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Refuses to close without `--complete` OR `--successor <slug>`. Refuses if §T has non-`x` rows or §B has unfixed rows.
Refuses to close without --complete OR --successor <slug>. Refuses if §T has non-x rows or §B has unfixed rows.
--complete: project done, no follow-on dossier.--successor <slug>: next phase continues in dossier <slug> (validated against INDEX).--resume: re-enter incomplete close op.Per ADAPTERS.md.
Per ds:status step 1. Refuse if none.
Exactly one of --complete or --successor <slug> required. Refuse otherwise:
ds:close requires --complete OR --successor <slug>.
Closing without either orphans the handoff.
If --successor <slug>: validate the successor exists in .scratchpad/dossier/<...>-<slug>/DOSSIER.md OR offer to scaffold via ds:new <slug> first.
Write <dir>/.ds-lock with skill: "ds:close", target: "—".
Read §S grep ds:close:
| Last event | Resume point |
|---|---|
| (none) | step 5 |
START | step 5 |
§Z=written | step 7 (mv) |
DONE + dir still live | step 7 (mv) |
DONE + dir archived | exit (already closed) |
Pre-flight gates:
| Gate | Rule | On fail |
|---|---|---|
| §T all-x | every row state=x | refuse, list non-x rows |
| §T cites | every x row has cite | refuse, list rows missing cite |
| §B all-fixed | every row has non-empty fix cite | refuse OR allow w/ --accept-open-bugs (operator override) |
| §X pushed | every repo pushed=yes | warn, allow operator decision (push or close anyway) |
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:close — START successor=<slug-or-—> complete=<bool>
Atomic write DOSSIER.md with §Z section populated. Each metadata line is its own paragraph (blank line between) — per FORMAT.md §12, prevents formatter-induced prose merge that breaks lib-regen-index.sh §Z parsing.
If --complete:
## §Z — Closeout
<YYYY-MM-DD HH:MM> — closed
complete: true
summary: <operator-provided one-line summary>
key cites: <list of T-row cites, comma-separated>
If --successor <slug>:
## §Z — Closeout
<YYYY-MM-DD HH:MM> — closed
successor: <slug>
summary: <operator-provided one-line summary>
key cites: <list of T-row cites>
Append §S:
<YYYY-MM-DD HH:MM> ds:close — §Z=written
Update header line at top of DOSSIER.md: state live → done.
Atomic POSIX rename:
mv .scratchpad/dossier/<date>-<slug>/ .scratchpad/dossier/_archive/<date>-<slug>/
Ensure _archive/ exists first (mkdir -p).
Append §S (to the moved file):
<YYYY-MM-DD HH:MM> ds:close — DONE archived
Run lib-regen-index.sh. INDEX flips dossier row to state=done + §Z column to complete or →<slug>.
rm <archived-dir>/.ds-lock.
ds:close <slug> → done
§Z: <complete | →<slug>>
archived: .scratchpad/dossier/_archive/<date>-<slug>/
next: <ds:new <successor> | nothing — project complete>
x rows present: refuse, list, suggest ds:build --next.ds:backprop B<N> per row.--resume finishes mv.ds:new <successor> inline scaffold.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub raisedadead/claude-code-plugins --plugin dossier