Files
get-shit-done/commands/gsd/undo.md
Rezolv 567736f23d feat(commands): add safe git revert command /gsd-undo (#1800)
* feat(commands): add safe git revert command /gsd-undo

Adds a new /gsd-undo command for safely reverting GSD phase or plan
commits. Uses phase manifest lookup with git log fallback, atomic
single-commit reverts via git revert --no-commit, dependency checking
with user confirmation, and structured revert commit messages including
a user-provided reason.

Three modes: --last N (interactive selection), --phase NN (full phase
revert), --plan NN-MM (single plan revert).

Closes #1730

* fix(commands): address review feedback for /gsd-undo

- Add dirty-tree guard before revert operations (security)
- Fix manifest schema to use manifest.phases[N].commits (critical)
- Extend dependency check to MODE=plan for intra-phase deps
- Handle mid-sequence conflict cleanup with reset HEAD + restore
- Fix unbalanced grep alternation pattern for phase scope matching
- Remove Write from allowed-tools (never needed)
2026-04-05 18:33:21 -04:00

978 B

name, description, argument-hint, allowed-tools
name description argument-hint allowed-tools
gsd:undo Safe git revert. Roll back phase or plan commits using the phase manifest with dependency checks. --last N | --phase NN | --plan NN-MM
Read
Bash
Glob
Grep
AskUserQuestion
Safe git revert — roll back GSD phase or plan commits using the phase manifest, with dependency checks and a confirmation gate before execution.

Three modes:

  • --last N: Show recent GSD commits for interactive selection
  • --phase NN: Revert all commits for a phase (manifest + git log fallback)
  • --plan NN-MM: Revert all commits for a specific plan

<execution_context> @/.claude/get-shit-done/workflows/undo.md @/.claude/get-shit-done/references/ui-brand.md @~/.claude/get-shit-done/references/gate-prompts.md </execution_context>

$ARGUMENTS Execute the undo workflow from @~/.claude/get-shit-done/workflows/undo.md end-to-end.