/wr-retrospective:migrate-briefingfrom wr-retrospective
Migrates a legacy single-file `docs/BRIEFING.md` into the per-topic `docs/briefing/` tree. Idempotent — no-ops when tree exists or no legacy file found.
Ships in wr-retrospective. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Adopters who carried a legacy monolithic docs/BRIEFING.md from an older @windyroad/retrospective release have no automation path to the per-topic docs/briefing/ tree the current Tier-3 rotation contract (ADR-040) expects. The dual-tolerant SessionStart hook (packages/retrospective/hooks/session-start-briefing.sh) keeps adopters working while the legacy file remains, but per-topic-rotation only fires once the tree exists. This skill closes the loop.
See REFERENCE.md in this directory for the heading-extraction algorithm, slug-collision handling, code-fence-aware parsing, recovery semantics, and scope exclusions (progressive disclosure per ADR-038).
This skill is foreground-synchronous per ADR-032 (Governance skill invocation patterns). Migration writes files into docs/briefing/ that the user normally wants to review before they commit — the wrapped subagent shape would defeat that review. The skill commits its own work per ADR-014.
The target tree shape (per-topic files + README.md index + Critical Points roll-up) is defined by ADR-040. This skill is the migration path INTO that shape — not a re-encoding of it.
REFERENCE.md split + the progressive-disclosure structure of this SKILL.md follows ADR-038. Behavioural-first bats coverage follows ADR-052.
The skill MUST silently no-op in two cases:
docs/briefing/README.md exists. Re-running after a previous migration is safe and reports "already migrated; no action".docs/BRIEFING.md does not exist (or is empty). Fresh adopters who never had a monolithic briefing get a "no legacy file found; no action" outcome.Both no-op paths exit 0. The fixture bats asserts both directions.
/wr-retrospective:migrate-briefing [--dry-run] [--force]
| Flag | Effect |
|---|---|
--dry-run | Print the topic slug list + per-topic file plan; no writes. |
--force | Re-run even when docs/briefing/README.md already exists. Off by default — present tree is reported and skipped per the idempotency contract. |
LEGACY="docs/BRIEFING.md"
TREE_DIR="docs/briefing"
TREE_INDEX="$TREE_DIR/README.md"
if [ -f "$TREE_INDEX" ] && [ "${FORCE:-0}" != "1" ]; then
echo "migrate-briefing: $TREE_INDEX already exists; tree already migrated (no action)."
exit 0
fi
if [ ! -s "$LEGACY" ]; then
echo "migrate-briefing: $LEGACY missing or empty; nothing to migrate (no action)."
exit 0
fi
-s (non-empty file test) covers the empty-file edge case. An empty legacy stub is functionally indistinguishable from "no legacy file" — both warrant the no-op path.
Walk the legacy file line-by-line. Skip lines inside fenced code blocks (toggled by ``` or ~~~ at column 0) so accidental ## patterns inside code samples are not promoted to topic markers. Each H2 (^## ) starts a new topic; H1 (^# ) becomes the document preamble.
Slug derivation per heading text:
---2, -3, ...Write each topic body to docs/briefing/<slug>.md. The preamble (everything before the first H2) goes to the index README under a "Preamble" section.
The full bash implementation ships as a script invoked via the wr-retrospective-migrate-briefing shim on $PATH per ADR-049 (no repo-relative packages/... paths in shipped SKILL prose). The shim is wrapped per ADR-080 so it resolves correctly under both source-monorepo execution and installed-cache execution:
wr-retrospective-migrate-briefing "$@"
See REFERENCE.md → "Heading-extraction algorithm" for the line-walker pseudocode + slug-collision worked example.
docs/briefing/README.md is written with:
# Project Briefing.docs/BRIEFING.md via /wr-retrospective:migrate-briefing" provenance line.The Critical Points section is intentionally left as a placeholder. The next /wr-retrospective:run-retro Step 1.5 signal-vs-noise pass populates it from per-entry classifications. Pre-seeding from heading text would be lossy guesswork.
Rename docs/BRIEFING.md → docs/BRIEFING.md.migrated-<date> so the source is preserved on disk but no longer matches the SessionStart hook's read paths. git mv is used so the rename stages cleanly. (Per the briefing's own git mv + Edit + git add note — there is no Edit in this step, so no re-stage is needed.)
One coherent commit per ADR-014:
chore(retrospective): migrate legacy docs/BRIEFING.md to per-topic docs/briefing/ tree
with a RISK_BYPASS: legacy-briefing-migration trailer if the project's risk-scorer pipeline flags the bulk-file-add.
This skill emits no AskUserQuestion calls. Every decision is mechanical (idempotency detection, slug derivation, file write). Per ADR-032 + ADR-013 Rule 5, mechanical / policy-authorised stages own silent classification and MUST NOT surface consent gates (P132 inverse-P078).
If a future enhancement adds direction-setting choices (e.g. user-supplied topic-grouping), that surface routes through AskUserQuestion per ADR-013 Rule 1 with the 4-option cap. The non-interactive / AFK fallback is the queue-and-continue default per ADR-013 Rule 6 (P352 universal default) — never auto-decide direction-setters.
@windyroad/retrospective ≥ the version that ships per-topic rotation.docs/BRIEFING.md that the adopter wants to formally re-split (use --force)./wr-retrospective:run-retro — once the tree exists, Step 1.5 (signal-vs-noise pass) + Step 3 (briefing curation) operate on the per-topic files. Pre-migration, run-retro reads the legacy single file.session-start-briefing.sh) — the hook silently no-ops when neither docs/briefing/README.md nor docs/BRIEFING.md is present; this skill produces the former from the latter./install-updates — that skill refreshes the plugin install cache; this skill migrates adopter artefacts on disk.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
3 skills in this plugin
/analyze-contextwr-retrospective:analyze-contextDeep context-usage analyzer. Runs richer heuristics than run-retro Step 2c — per-turn attribution, per-plugin decomposition, suggestion generation, policy-breach detection. Produces a markdown report at docs/retros/<date>-context-analysis.md with an HTML-comment trailer carrying the bucket-snapshot for delta-from-prior comparison. Auto-fires from run-retro Step 2c when the combined trigger holds (calendar-elapse >14 days OR a bucket changes >20% AND >10 KB, once-per-day guard) per ADR-043 Amendments 2026-06-08 / 2026-06-17; also user-invokable on demand./run-retrowr-retrospective:run-retroRun a session retrospective. Updates docs/BRIEFING.md with learnings and creates problem tickets for failures and friction.Other plugins' skills for the same job
npx claudepluginhub windyroad/agent-plugins --plugin wr-retrospective