Git worktrees in practice

The WorktreeManager handles the full lifecycle: create (git worktree add with a new branch), run (execute commands scoped to the worktree directory), status (git status within the worktree), keep (mark as preserved), and remove (git worktree remove + optionally mark the task completed). Each worktree can be bound to a task for bidirectional tracking.

Fill in the blanks: Worktree name validation

Loading practice…

Terminal
bash
# Run the worktree agent (requires a git repo)
make 12-worktree-isolation

# Try: "Create a task 'fix-auth-bug', then create a worktree
#       bound to that task. Run 'ls' in the worktree to verify
#       it has its own directory."

See worktree creation, task binding, and scoped execution.