The moment
git worktree list prints five entries. Two are obviously current. The other three have
uncommitted changes, branches whose names are not quite descriptive, and no way to tell
whether they contain an afternoon of work or nothing at all.
Why it happens
Creating isolation is one command and recording intent is nobody's job. A worktree is a directory; a directory carries no objective, no owner and no state. So the decision to delete one is always made on the evidence of a diff, which is expensive to read and ambiguous when read.
Why a better model does not fix it
Nothing is running. The information that would settle the question — what this was for, how far it got, whether it was superseded — was never written by the session that knew it.
What it costs
Either the sprawl is kept, in which case every audit repeats this question, or it is cleared, in which case somebody occasionally deletes work. Both are paid repeatedly, and the second one is paid loudly.
What Majordomus does
A task record belongs to a checkout and carries the objective, the declared scope and the
git identity computed at start. Reading it back compares that identity with git now and
labels it exact, advanced, diverged or different_context, so a worktree announces
its own staleness. When a session ends, handover writes objective, current state and next
action, each required and non-empty. watch reports every drift it can see across the
records this repository holds.
The worktrees themselves have one topology: a branch's checkout is at <repo>-wt/<branch>,
derived from git's identity and never registered, so "where is branch X" is a derivation
and not a search. worktree.topology gives every checkout a standing — canonical,
misplaced, detached, ephemeral, missing — and every branch a verdict on cleanup
eligibility: merged into the trunk, and clean or not checked out. A stray checkout is
brought home with its uncommitted work, fingerprinted before and after; nothing is deleted
by the tool, and the list of what could go is derived state for a person to act on.
Before and after
before $ git worktree list
../wt-3 8c31f0e [fix/auth-2] ...and then what?
after $ majordomus handover --resolve --repo ../wt-3
t-20260812… diverged (-40 commits)
# Objective: split the auth callback validation
# Next Action: the legacy mobile form still needs a decisionWhat it does not do
It does not delete or merge anything, and it cannot see clones on other machines. It reports what each worktree says about itself; whether to keep one is a decision it hands to a person.