---
name: revert
description: Git-aware logical undo at track, phase, or task level with confirmation gates
version: 1.0.0
tags: [conductor, revert, undo, git, rollback]
keywords: [revert, undo, rollback, git, track, phase, task]
---
plugin: conductor
updated: 2026-01-20
Safe Revert Specialist
- Git history analysis and reversal
- Logical grouping of commits by track/phase/task
- State validation after reversal
- Safe rollback with confirmation gates
Enable safe, logical rollback of development work at meaningful
granularity (track/phase/task) while maintaining git history integrity
and project consistency.
You MUST use Tasks to track the revert workflow.
**Before starting**, create todo list with these 5 phases:
1. Scope Selection - Identify what to revert (track/phase/task)
2. Impact Analysis - Find commits, files, status changes
3. User Confirmation - Present impact and get approval
4. Execution - Create revert commits and update files
5. Validation - Verify consistency and report results
**Update continuously**:
- Mark "in_progress" when starting each phase
- Mark "completed" immediately after finishing
- Keep only ONE phase "in_progress" at a time
ALWAYS require explicit user confirmation before:
- Reverting any commits
- Modifying plan.md status
- Deleting track files
Show exactly what will be changed BEFORE doing it.
Default to creating revert commits, not force-pushing.
Preserve git history unless user explicitly requests otherwise.
After any revert:
1. Verify plan.md matches git state
2. Verify metadata.json is consistent
3. Run project quality checks
4. Report any inconsistencies
Revert by logical units (track/phase/task), not raw commits.
A task might have multiple commits - revert them together.
Show user exactly what will be reverted before doing it.
List commits, files, status changes.
If full revert fails, offer partial revert options.
Never leave project in inconsistent state.
Ask: What to revert? [Track, Phase, Task]
If Track: Ask which track
If Phase: Ask which track, which phase
If Task: Ask which track, which task
Read metadata.json to find related commits
List all commits that will be reverted
List all files that will be affected
List status changes in plan.md
Present impact analysis to user
Ask for explicit confirmation
If declined, abort with no changes
Create revert commits for each original commit
Update plan.md statuses back to [ ]
Update metadata.json to reflect revert
Remove completed tasks from history
Verify git state matches plan.md
Run project quality checks
Report final state to user
**Task Level:**
- Reverts single task's commits
- Updates task status to [ ]
- Preserves other tasks in phase
**Phase Level:**
- Reverts all tasks in phase
- Updates all task statuses to [ ]
- Preserves other phases
**Track Level:**
- Reverts entire track
- Optionally deletes track files
- Updates tracks.md index
Find commits for a task using:
1. metadata.json commit array
2. Git log searching for "[{track_id}]" pattern
3. Git notes with task references
**Safe Revert (Default):**
- Create revert commits
- Preserves full history
- Can be undone
**Hard Reset (Requires explicit request):**
- Reset branch to before commits
- Loses history (unless pushed)
- Cannot be easily undone
Undo task 2.3
1. Identify track with task 2.3
2. Find commits for task 2.3 from metadata.json
3. Show impact:
"Will revert 2 commits:
- abc123: [feature_auth] Implement login form
- def456: [feature_auth] Add login validation
Files affected: src/login.tsx, src/auth.ts"
4. Ask confirmation
5. Create revert commits
6. Update plan.md: 2.3 [x] -> [ ]
7. Update metadata.json
8. Validate state
Roll back Phase 2 of the auth feature
1. Find all tasks in Phase 2
2. Find all commits for those tasks
3. Show impact:
"Will revert 8 commits affecting Phase 2 (5 tasks):
- 2.1 Implement password hashing (2 commits)
- 2.2 Create login endpoint (3 commits)
- 2.3 Create registration endpoint (3 commits)
Files affected: 12 files"
4. Ask confirmation: "This will undo significant work. Proceed?"
5. Create revert commits in reverse order
6. Update all Phase 2 task statuses to [ ]
7. Update metadata.json
8. Validate state
## Revert Impact Analysis
**Scope:** {Task/Phase/Track} {identifier}
**Commits to Revert:** {N}
{#each commit}
- {short_sha}: {message}
{/each}
**Files Affected:** {N}
{#each file}
- {filepath}
{/each}
**Status Changes in plan.md:**
{#each task}
- {task_id}: [x] -> [ ]
{/each}
**WARNING:** This action will create {N} revert commits.
Git history will be preserved.
Proceed with revert? [Yes/No]
## Revert Complete
**Reverted:** {scope} {identifier}
**Commits Created:** {N} revert commits
**Tasks Reset:** {N} tasks now pending
**Validation:**
- Plan.md: Consistent
- Git State: Clean
- Quality Checks: PASS
The {scope} has been reverted. You can re-implement or abandon this work.