General · apply by default

/undo

Reverse a recorded local task while preserving unrelated changes

Use for a recorded local working-tree task; git-commit undoes or reverts a commit, and remote rollback requires its own exact target and authorization.

Make it your own.

In Claude Code, use the slash command and add your context. In Codex, select undo from the just-vibe skill picker, then send the same brief.

Version 0.11.0 also supports /jv undo, /just-vibe undo and /jv:undo in Claude. See shortcut setup and context examples.

Example · apply
/just-vibe:undo Undo checkout-retry and keep my later copy changes.
edge · inspect
/just-vibe:undo Preview undo after I edited a different paragraph in the same file.
blocked · inspect
/just-vibe:undo Undo a change with no ownership snapshot; inspect what is attributable first.

What the agent does

  1. Identify the named ownership record using workbench list and task show. Reconcile the requested task, project, original branch/HEAD, external effects and actual current files; never infer ownership from the whole dirty tree.
  2. Read the selective task undo guide and run task preview. Inspect affected files and any overlap; unchanged task regions must preserve later user edits. A missing record or ambiguous authorship requires useful Git inspection and a narrow clarification, not a fabricated snapshot.
  3. For an authorized, unambiguous undo with no conflicts, run task undo using the exact current revision. Preview-only requests stop with the dry-run result. Do not ask again merely because a reversible requested action writes files.
  4. Refuse overlapping creation/deletion/binary edits, changed scoped staging, unknown concurrent file versions or a different branch/HEAD. Recover an interrupted known transaction using task recover after inspecting the journal; do not reset or clean broadly.
  5. Run proportionate existing checks on the resulting tree and explain what was reversed, which later changes were preserved, and any external effects that remain. Never add agent attribution to the user-owned changes.

Inputs

  • Exact task record or enough context to identify one unambiguously.

Optional context: scope, references, constraints, successCriteria, environment, mode, budget.

Scope

Reads
Selected task ownership record, current Git identity/index and affected file contents.
Writes
Only the conflict-free inverse of the recorded task; preserve index and other work. Remote effects and Git history are outside scope.
Mode
Apply for an explicit undo request against a known local ownership record; preview/inspect requests never write.
Prerequisites
Resolve the user brief and inspect the relevant project or supplied evidence. External capabilities are optional unless the selected action actually needs them.

Expected output

  • Task identity, dry-run conflict/affected-file assessment, applied inverse when authorized, preserved later edits, verification and external effects left in place.

How the work is checked

  • A later nonoverlapping edit in the same file survives undo; an overlapping edit blocks all initial writes; the original index remains unchanged.
  • An interrupted journal accepts only recorded before/after bytes and refuses a third version.

When to stop or clarify

  • Unknown ownership, changed branch/HEAD or scoped index, overlapping edits, unsupported files and external effects require explicit reconciliation without destructive Git shortcuts.

Handling missing context

Infer
Resolve the named files, existing scripts, current task and earlier corrections from the conversation and repository.
Assume
Use the narrowest interpretation that completes a reversible local task; state a consequential assumption once.
Ask
Ask when competing targets or incompatible success conditions would change the result; continue independent inspection first.

Technical guidance

Evidence
Read recorded before/after hashes, owned paths and the current worktree/index, including later edits.
Method
Preview inverse changes and apply only paths whose expected post-task state still matches; preserve conflicts for review.
Pitfall
Whole-repository reset destroys unrelated work; matching a filename alone does not prove the task still owns its contents.
Check
Check restored paths, unchanged unrelated files and partial-operation recovery; later modifications must block automatic reversal of that path.

Situational decisions

When later edits overlap the inverse patch: Preserve every current file and report the conflict before any initial undo writes.

When no ownership record exists: Inspect a narrowly attributable inverse or ask for missing ownership information; do not invent automatic coverage.

The coding agent follows this workflow using its available tools. Installation does not grant service access or guarantee an outcome. Read the compatibility notes.

Keep exploring