{{command_prefix}}migrate
Closes the GDD-on-GDD gap: when GDD moves or removes its own paths (e.g. the Phase 31.5
scripts/lib/** → sdk/** reorg), a project that referenced the old paths needs updating. This skill
consults the deprecation registry, finds the stale references in this project, and rewrites them -
after showing you the diff. It never edits silently. Contract: ../../reference/DEPRECATIONS.md.
Invocation
| Command | Behavior |
|---|---|
{{command_prefix}}migrate | Scan + preview every applicable migration, then confirm each before applying. |
{{command_prefix}}migrate --dry-run | Preview only - print the diff, change nothing. |
{{command_prefix}}migrate --yes | Apply every applicable migration without the per-change prompt (still prints what changed). |
Steps
-
Resolve the installed version from
.claude-plugin/plugin.json(version). -
Load the registry. Parse
reference/DEPRECATIONS.mdwith the pure helper:bashnode -e ' const fs = require("fs"); const dr = require("./scripts/lib/deprecation-registry.cjs"); const entries = dr.parseDeprecations(fs.readFileSync("reference/DEPRECATIONS.md","utf8")); const version = require("./.claude-plugin/plugin.json").version; // Only entries that are deprecated/removed at the installed version are actionable. const actionable = entries.filter(e => dr.classify(e, version) !== "pending"); console.log(JSON.stringify({ version, actionable })); ' -
Scan the project for each actionable entry's
Oldpath:.design/config.json(string values referencing an old path),- project-local skill/agent references (
grepthe repo, excluding.git/,node_modules/, and GDD's ownreference/DEPRECATIONS.md), - any
require(...)/import of a removed SDK path. For a code rewrite, scaffold the edit withscripts/lib/migration/codemod-gen.cjs(Phase 39.1) - you emit the change as a reviewable patch, you do not run a codemod engine.
-
Preview. Print a unified-diff-style preview per file:
Old → New, the registry status (deprecatedvsremoved), and the migration hint. If--dry-run, stop here. -
Confirm + apply. Without
--yes, ask per change. With--yes, apply all. UseWriteto make the edits; never touch a file the user didn't consent to. -
Report. Summarize: files changed, references rewritten, and any
removed-status reference that still has no replacement wired (flag it loudly - that one breaks at the installed version).
Boundaries
- Preview-first. Nothing changes before you've shown the diff (or
--yeswas passed). - Migrates this project's references to GDD paths - it does not rewrite GDD's own source, and it never performs a downgrade (reverse migrations are out of scope).
- Read the registry; never invent a migration that isn't in
reference/DEPRECATIONS.md.
Record
Print a ## Migration summary (version, actionable entries, files changed, unresolved removed
references) and append one JSONL line to .design/intel/insights.jsonl recording the migration run.
Close with:
## MIGRATE COMPLETE


