add-phase
Add phase to end of current milestone in roadmap
Rollback to a previous checkpoint when things go wrong
How it fires
How this command gets triggered: by you, by Claude, or both.
/rollbackContext preview
What this command does when you run it.
Rollback to a previous checkpoint when things go wrong
description: Rollback to a previous checkpoint when things go wrong argument-hint: "[phase-plan] or 'last'" allowed-tools: - Read - Bash - Write - AskUserQuestion
<objective> Safely rollback to a previous GSD checkpoint, undoing changes from failed or unwanted plan executions.
GSD 2.0 creates git tags before and after each plan execution, enabling clean rollback to any checkpoint. </objective>
<process>
<step name="list_checkpoints">
# Find all GSD checkpoints git tag | grep "gsd-checkpoint" | sort -V | tail -20
Display format:
Available checkpoints: gsd-checkpoint-01-01-pre (before Phase 1, Plan 1) gsd-checkpoint-01-01-post (after Phase 1, Plan 1) gsd-checkpoint-01-02-pre (before Phase 1, Plan 2) gsd-checkpoint-01-02-post (after Phase 1, Plan 2) gsd-checkpoint-02-01-pre (before Phase 2, Plan 1) ← most recent
If no checkpoints exist:
No GSD checkpoints found. Checkpoints are created automatically during /gsd:execute-plan in GSD 2.0.
</step>
<step name="parse_target">
**If argument is "last":**
**If argument is "{phase}-{plan}":**
**If no argument:** Use AskUserQuestion:
</step>
<step name="show_impact">
# Show commits that will be undone
git log {target-tag}..HEAD --oneline# Show files that will change
git diff {target-tag} HEAD --statPresent to user:
Rollback to: gsd-checkpoint-02-01-pre This will undo: • 3 commits • 8 files changed Commits to be undone: abc1234 feat(02-01): implement user authentication def5678 feat(02-01): add password hashing ghi9012 docs(02-01): complete auth plan Files affected: src/auth/login.ts | 45 +++++ src/auth/middleware.ts | 32 +++++ .planning/phases/02-auth/02-01-SUMMARY.md | 80 +++++
</step>
<step name="confirm">
Use AskUserQuestion:
</step>
<step name="execute_rollback">
**If confirmed:**
1. Create safety backup:
git tag gsd-rollback-backup-$(date +%Y%m%d%H%M%S)
2. Reset to checkpoint:
git reset --hard {target-tag}3. Clean up post-rollback artifacts:
4. Update STATE.md:
## Current Position
Phase: {rolled-back-to-phase}
Plan: Ready to execute
Status: Rolled back from {original-position}
Last activity: {date} - Rolled back to checkpoint {target}
## Rollback History
- {date}: Rolled back from {phase}-{plan} to {target}
Reason: User-initiated rollback
Backup tag: gsd-rollback-backup-{timestamp}5. Report success:
✓ Rolled back to gsd-checkpoint-{target}
Backup created: gsd-rollback-backup-{timestamp}
(Use this to undo the rollback if needed)
Current position: Phase {X}, ready to execute Plan {Y}
Next: /gsd:execute-plan or /gsd:progress</step>
<step name="handle_conflicts">
**If uncommitted changes exist:**
⚠️ You have uncommitted changes that would be lost. Options: 1. Stash changes (git stash) 2. Commit changes first 3. Discard changes and rollback anyway
**If working in the middle of a plan:**
⚠️ It looks like a plan is currently executing. The current agent may still be running. Consider using /gsd:recover instead.
**If target checkpoint doesn't exist:**
❌ Checkpoint gsd-checkpoint-{target} not found.
Available checkpoints:
[list checkpoints]
Hint: Checkpoints are created during /gsd:execute-plan</step>
</process>
<undo_rollback>
If you rollback and want to undo:
# Find your backup tag
git tag | grep gsd-rollback-backup
# Reset to the backup
git reset --hard gsd-rollback-backup-{timestamp}Or use this command:
/gsd:rollback undo
</undo_rollback>
<integration>
During `/gsd:execute-plan`:
**Before execution:**
git tag gsd-checkpoint-{phase}-{plan}-pre**After successful execution:**
git tag gsd-checkpoint-{phase}-{plan}-postThis ensures every plan execution has a clean rollback point. </integration>
<success_criteria>
</success_criteria>
GSD Pro — The most powerful AI coding workflow for Claude Code. Free alternative to Cursor Composer, Copilot Workspace, Devin & Bolt. Multi-model routing, rollback/recovery, adaptive context. Fork of 30K★ original. npx get-shit-done-cc
Repo: itsjwill/gsd-pro
Add phase to end of current milestone in roadmap
Generate tests for a completed phase based on UAT criteria and implementation
Capture idea or task as todo from current conversation context
Audit milestone completion against original intent before archiving
Run all remaining phases autonomously — discuss→plan→execute per phase
List pending todos and select one to work on