Skip to content

/sdlc:migrate

Generated from solutions/ontological/skills/migrate/SKILL.md.

Umbrella migration skill. Sequences the two migrations a consuming project needs after a plugin upgrade: entity-schema drift (/sdlc:entities-migrate), then runtime-state relocation (/sdlc:migrate-runtime-state). Forwards flags and reports each subskill’s result; the subskills do the work — entities-migrate opens its own PR, migrate-runtime-state mutates gitignored state in place.

  • Bash
  • Skill

Usage:

  • /sdlc:migrate — run both migrations in order: first /sdlc:entities-migrate (entity-instance schema drift), then /sdlc:migrate-runtime-state (move .claude/ runtime state to .sdlc/).
  • /sdlc:migrate --entities-only — just /sdlc:entities-migrate. Equivalent to invoking /sdlc:entities-migrate directly.
  • /sdlc:migrate --runtime-only — just /sdlc:migrate-runtime-state.
  • /sdlc:migrate --dry-run — pass --dry-run through to both subskills. Report what each would do.

Project context (don’t re-derive every run):

  • This skill sequences the two subskills and forwards flags. Every edit, file move, or PR action happens inside one of them.
  • /sdlc:entities-migrate operates on tracked content (frontmatter inside docs/planning/<plural>/) and opens its own PR. /sdlc:migrate-runtime-state operates on gitignored content (.claude/worktrees/, .claude/pr-cursors/, .claude/orchestrator-log.md) and mutates in place with no commit and no PR.
  • Running /sdlc:migrate (without flags) on a project with both kinds of drift opens ONE PR (the entity-schema migration) AND mutates the runtime-state buckets in place. Report both; keep them as separate artifacts.
  • Entity-schema migration runs first; runtime-state migration runs second.

Parse the user’s flags:

FlagRun /sdlc:entities-migrate?Run /sdlc:migrate-runtime-state?
(none)yesyes
--entities-onlyyesno
--runtime-onlynoyes
--dry-runforwarded if selectedforwarded if selected

--entities-only and --runtime-only are mutually exclusive. If both are passed, stop and report to the user.

2. Run /sdlc:entities-migrate (if selected)

Section titled “2. Run /sdlc:entities-migrate (if selected)”

Invoke /sdlc:entities-migrate via the Skill tool, forwarding --dry-run if set. The subskill handles its own pre-flight, worktree creation, audit, migrate, commit, and PR open.

  • If the subskill reports nothing to migrate. and exits without opening a PR, that’s expected on projects with no schema drift. Continue to Step 3.
  • If the subskill opens a PR, capture the PR URL — Step 4’s report will include it.
  • If the subskill errors (dirty tree, validation failure, audit script error), stop here. Do NOT proceed to /sdlc:migrate-runtime-state — surface the error and let the user resolve it before re-running.

3. Run /sdlc:migrate-runtime-state (if selected)

Section titled “3. Run /sdlc:migrate-runtime-state (if selected)”

Invoke /sdlc:migrate-runtime-state via the Skill tool, forwarding --dry-run if set. The subskill emits one stdout marker line (MIGRATED ..., NOTHING-TO-MIGRATE, DRY-RUN ..., or ERROR ...).

Capture the marker line — Step 4’s report will include it verbatim.

Tell the user what each subskill did, in order:

  • For /sdlc:entities-migrate: PR URL (if one was opened), or “no schema drift to migrate.”
  • For /sdlc:migrate-runtime-state: the stdout marker line, plus a one-line interpretation (e.g. “moved 1 worktree, discarded 3 cursors, moved orchestrator-log to .sdlc/”).
  • If --dry-run was passed, prefix the summary with “DRY-RUN — re-run without —dry-run to apply.”
  • Keep the two artifacts separate. The entity-schema migration lands as a PR; the runtime-state migration mutates gitignored state in place. Do not fold them into a single PR.
  • Idempotent. Re-running the umbrella after a successful migration produces no second entities PR (the audit finds nothing) and no runtime-state mutations (the migrator emits NOTHING-TO-MIGRATE).
  • /sdlc:entities-migrate and /sdlc:migrate-runtime-state remain invocable directly; the umbrella is the convenience entry point for the common upgrade-the-plugin flow.
  • Mutually exclusive flags. --entities-only + --runtime-only is an error; pick one or omit both.