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>
1.8 KiB
1.8 KiB
name, description, argument-hint, allowed-tools, type
| name | description | argument-hint | allowed-tools | type | |||
|---|---|---|---|---|---|---|---|
| gsd:from-gsd2 | Import a GSD-2 (.gsd/) project back to GSD v1 (.planning/) format | [--path <dir>] [--force] |
|
prompt |
Maps the GSD-2 hierarchy (Milestone → Slice → Task) to the GSD v1 hierarchy (Milestone sections in ROADMAP.md → Phase → Plan), preserving completion state, research files, and summaries.
-
Locate the .gsd/ directory — check the current working directory (or
--pathargument):node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" from-gsd2 --dry-runIf no
.gsd/is found, report the error and stop. -
Show the dry-run preview — present the full file list and migration statistics to the user. Ask for confirmation before writing anything.
-
Run the migration after confirmation:
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" from-gsd2Use
--forceif.planning/already exists and the user has confirmed overwrite. -
Report the result — show the
filesWrittencount,planningDirpath, and the preview summary.