revertlisted
Install: claude install-skill drafthq/draft
# Draft Revert
Perform intelligent git revert that understands Draft's logical units of work.
## Red Flags - STOP if you're:
- Reverting without showing preview first
- Skipping user confirmation
- Not checking for uncommitted changes first
- Reverting more than requested
- Not updating Draft state after git revert
- Assuming you know which commits to revert without checking
**Preview and confirm before any destructive action.**
---
## Step 0: Pre-flight Check
1. **Verify Draft context exists:**
```bash
ls draft/tracks.md 2>/dev/null
```
If `draft/` does not exist: **STOP** — "No Draft context found. Run `/draft:init` first."
2. **Check working tree:**
Run `git status --porcelain`. If output is non-empty, warn the user about uncommitted changes and suggest stashing or committing first. Do NOT proceed until working tree is clean.
---
## Step 1: Analyze What to Revert
Ask user what level to revert:
1. **Task** - Revert a single task's commits
2. **Phase** - Revert all commits in a phase
3. **Track** - Revert entire track's commits
If user specifies by name/description, find the matching commits.
## Step 2: Find Related Commits
**Primary method:** Read `plan.md` — every completed task has its commit SHA recorded inline. Use these SHAs directly.
**If no commits found** (all tasks are `[ ]` Pending with no SHAs): announce "No commits found for this scope — nothing to revert." and **STOP**.
**Fallback method (if SHAs missing but completed tasks exist