From dossier
Convert legacy 4-file dossiers (PLAN+SPEC+AUDIT+closeout/) to single-file DOSSIER.md format. Claude-driven per-repo (handles arbitrary shapes). Spawns dossier-scout subagents in parallel for inspection. Idempotent via per-repo marker. Operator confirms each repo before mutation. Invoke when the user says "ds:migrate", "migrate dossiers", "convert legacy dossier", or after installing the plugin to upgrade existing repos.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dossier:migrateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Walks repos that have a legacy `.scratchpad/dossier/` (PLAN+SPEC+AUDIT layout). Spawns one `dossier-scout` per repo (parallel) to inspect shape + derive content. Synthesizes single-file DOSSIER.md. Operator reviews + greenlights per repo. Mutates only after approval.
Walks repos that have a legacy .scratchpad/dossier/ (PLAN+SPEC+AUDIT layout). Spawns one dossier-scout per repo (parallel) to inspect shape + derive content. Synthesizes single-file DOSSIER.md. Operator reviews + greenlights per repo. Mutates only after approval.
<repo-path>: single repo override.--all: walk a known/configured list of repos (operator provides at first run).--gc: cleanup pass — move orphan legacy files to _archive/_legacy-pre-v2/ for already-migrated repos.Per ADAPTERS.md. HAS_CTX=1 is high-leverage here (parallel scout dispatch).
If <repo-path> given: list = [].
If --all:
.scratchpad/.migrate-targets (operator-local file, gitignored) for resume.If --gc: walk repos where marker exists, look for orphan legacy files, archive.
For each target repo:
marker=<repo>/.scratchpad/.migrate-v2-done
If marker exists: skip (idempotent). Print <repo>: skip (migrated <timestamp>).
For each unmigrated repo: spawn dossier-scout with mission:
You are a dossier-scout. Inspect <repo-path>/.scratchpad/dossier/.
Detect files present (PLAN.md, SPEC.md, AUDIT.md, closeout/*.md, others).
Derive:
1. <date>: prefer closeout/*.md filename pattern (YYYY-MM-DD-*), else PLAN mtime, else AUDIT mtime.
2. <slug>: prefer closeout filename slug, else first §G heading from PLAN, else dir-name.
3. Phase count: scan PLAN/SPEC/closeout for "Phase N" mentions, count distinct.
4. Section map: which legacy file holds which DOSSIER.md section.
- §G ← PLAN §G or first goal-like heading
- §C ← PLAN constraints / locked decisions
- §I ← SPEC §I or interface section
- §V ← SPEC §V or invariants table
- §T ← PLAN §T or task table
- §B ← AUDIT §B or bug ledger
- §S ← closeout dates (synthesize timeline)
- §Z ← closeout content (postscript)
5. Ambiguities: list anything you can't auto-derive (custom files, multi-phase shorthand collisions, missing sections).
Output: caveman pipe-table report.
DO NOT MODIFY any files. Read-only.
Use mcp__context-mode__ctx_batch_execute for scout dispatch if HAS_CTX=1. Else parallel Agent tool calls (one per repo).
For each scout report:
Build proposed DOSSIER.md content per FORMAT.md. Identify ambiguities for operator.
Print per-repo summary:
<repo>:
detected: PLAN.md SPEC.md AUDIT.md closeout/phase-2-<slug>.md
derived: date=<YYYY-MM-DD>, slug=<slug>, phases=<N>
section map:
§G ← PLAN.md §1
§C ← PLAN.md §3
§V ← SPEC.md (12 rows)
§T ← PLAN.md (8 rows, 6 x / 2 .)
§B ← AUDIT.md (4 rows)
§S ← synthesized from closeout dates (3 entries)
§Z ← closeout postscript
ambiguities:
- "Phase G1/G2/G3" shorthand → mapping to P1/P2/P3
- 2 stray .md files: notes.md, hand-off.md → include in §S verbatim?
proposed dest: <repo>/.scratchpad/dossier/<date>-<slug>/DOSSIER.md
proposed move: legacy files → <repo>/.scratchpad/dossier/_archive/_legacy-pre-v2/<date>-<slug>/
Approve? [y/n/skip]
Ordering matters for crash-safety:
<repo>/.scratchpad/dossier/<date>-<slug>/<dest>/DOSSIER.md.tmp w/ proposed content.tmp → DOSSIER.md (atomic, POSIX rename on same FS)<repo>/.scratchpad/.migrate-v2-done w/ ISO timestamp<repo>/.scratchpad/dossier/_archive/_legacy-pre-v2/<date>-<slug>/ (mkdir then mv)Crash points:
--gc cleans later.If interrupted mid-batch: re-run ds:migrate --all. Marker-present repos skip. Unmarked re-process.
For repos with marker present: walk <repo>/.scratchpad/dossier/ for orphan PLAN.md / SPEC.md / AUDIT.md / closeout/. If found: move to _archive/_legacy-pre-v2/<inferred-date-slug>/.
Caveats:
_archive/_legacy-pre-v2/<date-slug>/ doesn't exist: create.-2, -3.ds:migrate summary:
migrated: <N> repos
skipped (already done): <M>
failed / pending operator review: <K>
per-repo:
<repo>: <status> [<dest> | <reason>]
...
gc:
cleaned <P> orphan legacy files
Plugin does NOT auto-uninstall. After all targets show done:
.scratchpad/.migrate-targets if they want.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.