feat(import): add /gsd-from-gsd2 reverse migration from GSD-2 to v1 (#2072)
Adds a new command and CLI subcommand that converts a GSD-2 `.gsd/` project back to GSD v1 `.planning/` format — the reverse of the forward migration GSD-2 ships. Closes #2069 Maps GSD-2's Milestone → Slice → Task hierarchy to v1's flat Milestone sections → Phase → Plan structure. Slices are numbered sequentially across all milestones; tasks become numbered plans within their phase. Completion state, research files, and summaries are preserved. New files: - `get-shit-done/bin/lib/gsd2-import.cjs` — parser, transformer, writer - `commands/gsd/from-gsd2.md` — slash command definition - `tests/gsd2-import.test.cjs` — 41 tests, 99.21% statement coverage Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,10 @@
|
||||
* learnings copy Copy from current project's LEARNINGS.md
|
||||
* learnings prune --older-than <dur> Remove entries older than duration (e.g. 90d)
|
||||
* learnings delete <id> Delete a learning by ID
|
||||
*
|
||||
* GSD-2 Migration:
|
||||
* from-gsd2 [--path <dir>] [--force] [--dry-run]
|
||||
* Import a GSD-2 (.gsd/) project back to GSD v1 (.planning/) format
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
@@ -1070,6 +1074,14 @@ async function runCommand(command, args, cwd, raw, defaultValue) {
|
||||
break;
|
||||
}
|
||||
|
||||
// ─── GSD-2 Reverse Migration ───────────────────────────────────────────
|
||||
|
||||
case 'from-gsd2': {
|
||||
const gsd2Import = require('./lib/gsd2-import.cjs');
|
||||
gsd2Import.cmdFromGsd2(args.slice(1), cwd, raw);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
error(`Unknown command: ${command}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user