revert

Solid

Git-aware revert that understands Draft tracks, phases, and tasks. Safely undo work at task, phase, or track level. Use when the user asks to 'revert this track', 'undo a phase', 'revert task X', or says 'roll back the last task', 'undo this work'.

Code & Development 40 stars 6 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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...

Details

Author
drafthq
Repository
drafthq/draft
Created
7 months ago
Last Updated
2 days ago
Language
HTML
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category