Revert Code Changes Safely with Git Awareness
Reverts a Conductor track, phase, or single task with full git awareness and a mandatory execution-plan confirmation.
Why it matters
Safely revert code changes by logical work units with full Git awareness. This skill ensures that your project history remains clean and manageable by supporting the reversion of entire tracks, specific phases, or individual tasks.
Outcomes
What it gets done
Revert entire Git tracks based on track ID.
Revert specific phases within a track, including subsequent phases.
Revert individual tasks within a track.
Provide guided selection for revert targets when no argument is provided.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-conductor-revert | bash Overview
Revert Track
Git-aware revert skill for Conductor tracks, phases, or individual tasks, requiring a reviewed execution plan and literal YES confirmation before executing safe git revert commits, with automatic halting on merge conflicts. Use when reverting an entire Conductor track, a specific phase, or an individual task and you need git-aware commit discovery and safe rollback.
What it does
This skill reverts changes by logical work unit - an entire Conductor track, a specific phase, or an individual task - with full git awareness. Pre-flight checks confirm Conductor is initialized (conductor/tracks.md exists, else it suggests running /conductor:setup), confirm the repository is a git repo with git status, surface any uncommitted changes with stash/commit/cancel options, and halt if a merge or rebase is already in progress. Target selection accepts an argument in one of three formats - a full track ID (e.g. auth_20250115), a track plus phase (auth_20250115:phase2, reverting that phase and all subsequent ones), or a track plus task (auth_20250115:task2.3, reverting only that task) - or, with no argument, shows a guided menu of in-progress and recently completed work to pick from. Commit discovery differs by target: task revert searches git log with a combined track-ID and task-ID grep plus the matching plan.md update commit; phase revert reads plan.md to determine the task range for the phase, then searches for all matching task commits and phase-verification commits; full-track revert finds every commit mentioning the track ID plus its track-creation commits. Before touching anything, it displays a full execution plan - the commits to revert in reverse chronological order, the files that will be affected, and the plan.md checkbox updates - along with an explicit warning of how many revert commits will be created, how many files modified, and how many tasks reset to pending, and requires the literal text 'YES' (not 'y', not Enter) to proceed. Reverts execute newest-first using git revert --no-edit per commit, and any merge conflict halts the sequence immediately with conflicted files listed and options to view details, abort (keeping completed reverts), or open a manual resolution guide - no automatic conflict resolution is attempted. After a successful revert, plan.md task markers are flipped back to pending (without being committed, since that's part of the revert operation itself) and metadata.json's completed-task count and status are updated; tracks.md is updated similarly for full-track or partial reverts. A verification summary reports commits reverted, tasks reset, and files affected, and suggests running tests to confirm success. Seven hard safety rules govern the whole flow: never use git reset --hard, never force-push, never auto-resolve conflicts, always show the full plan first, require the literal 'YES', halt on any error, and prefer revert commits over history rewriting. Documented edge cases cover a track with no commits (offers to just delete the track directory), commits that were already reverted (offers to skip them), and commits already pushed to a remote (warns that new revert commits will need pushing, which is still safer than a force push) - plus an explicit way to undo the revert itself via git revert HEAD~{N}..HEAD or, if unpushed, a cautioned git reset --soft plus git checkout --.
When to use - and when NOT to
Use this skill when reverting an entire Conductor track, a specific phase, or an individual task, and you need git-aware commit discovery, a reviewable execution plan, and safe rollback with no history rewriting. Do not use it for a generic revert unrelated to Conductor's track/phase/task structure, or when you actually want to discard history rather than preserve it via revert commits.
Inputs and outputs
Input is a target reference (a full track ID, a track:phase, or a track:task) or, if omitted, a selection from a guided menu. Output is a git-reverted history (via git revert --no-edit, never a hard reset), an updated plan.md with reverted tasks reset to pending, updated tracks.md/metadata.json, and a verification summary - all gated behind an explicit reviewed plan and a literal 'YES' confirmation.
Integrations
Built entirely on git (git status, git log --grep, git revert --no-edit) plus Conductor's own tracks.md, plan.md, and metadata.json files.
git log --oneline --grep="{trackId}" --grep="Task {X.Y}" --all-match
Who it's for
Developers using Conductor who need to safely undo a track, phase, or task's commits with full git awareness, an explicit reviewed plan, and no destructive history rewriting.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.