← ClaudeAtlas

session-repairlisted

Transform a legacy layout into the work root, or reconcile a work root that has drifted. Surveys read-only, refuses unsafe ground, prints the per-item plan, applies only on explicit confirmation, then verifies the result entry by entry. Triggers on "/session-repair" or when user says "migrate the backlog to the work root", "the sequence and the records disagree", "reconcile the work root", or "repair session-flow state".
matshoppenbrouwers/session-flow · ★ 3 · AI & Automation · score 76
Install: claude install-skill matshoppenbrouwers/session-flow
# Session Repair Bring an existing repository into the work-root contract, or bring a drifted work root back to consistency. Open with one sentence saying what you are about to do and what it will produce. ## Two Entry Conditions, One Code Path - **Migrate** — a legacy layout: `_devdocs/todo/SEQUENCE.md`, per-task and phase files, old `paths` keys. Happens once. - **Reconcile** — a current layout that has drifted: a hand-edited generated sequence, an item with no sequence row or a row with no item, an unapplied journal operation, a stale claim, a missing tombstone. Drift recurs, which is why this is a durable skill and not a one-off script. The survey decides which, not the user's wording: a work root holding `namespace.json` and `seq-NNN/` directories is reconcile, anything else is migrate. Both run the same five stages. ## Non-Negotiables 1. **Five stages, always in this order, never skipped**: survey, refuse, plan, apply, verify. No entry condition, no user instruction, and no "it is obviously fine" shortens the list. Stages 1 to 3 write nothing. 2. **There is no `--force`.** A Stage 2 refusal is cleared by fixing the named condition and re-running, never by overriding it. Do not offer an override, and do not work around one by editing records or the sequence by hand. 3. **Plan is the default.** Stage 4 runs only after the user says apply in this session, having seen the Stage 3 plan. 4. **No ID is ever reused.** Every SEQ ever allocated is retired in `tombstones` —