Skip to content

How-to

Undo a task

Take one task's commits back out of the branch with a single revert commit, and reopen the task.

What you'll do

Undo the commits of one task, or of the whole implementation phase, while the work is still on its branch. AIDLC finds the commits by the Task: <instance>/T<n> line each one carries, shows you the plan, and adds one commit that undoes them.

Steps

  1. Claim the instance, so AIDLC knows the work is yours. Without a claim, the revert needs --override:

    aidlc claim <instance>
    
  2. See the plan first. This changes nothing:

    aidlc revert <instance> --task T3 --dry-run
    

    It lists the commits newest first. A commit that also belongs to another task is marked as shared, and that task is reset too.

  3. Run it for real. It shows the plan again and asks before it writes:

    aidlc revert <instance> --task T3
    

    Without a terminal, add --yes. To undo every task commit at once, use --phase implementation instead of --task.

  4. If the undo clashes with later work, AIDLC stops and leaves your branch as it was. Fix the later work, or pick a later task to undo first.

revert works only during the implementation phase, and never on main.

Check it worked

Run git log --oneline -1. You should see one new revert commit at the top. Open .aidlc/state/<instance>/tasks.md. The task should show as open again.