using-git-worktrees
Using Git Worktrees
Contract
Research and review share an existing checkout and install nothing. Tracked implementation gets one source-only branch at sibling <repo-name>-worktrees/<branch-slug>. A no-edit local run reuses detached <repo-name>-worktrees/local-main. Hydration requires a 2–4 GiB storage budget and a resolved workspace storage policy: the desired target is informational, a warning or freeze may block non-incident hydration, and the hard hydration floor is the absolute stop. Every runtime owns its ports and local state, then stops and dehydrates when the task finishes. Only explicitly synthetic Convex state is disposable.
Announce: “I’m using the using-git-worktrees skill to prepare the task workspace and lifecycle.”
Fast path: repos with the local-runtime contract
When the repository exposes setup:worktree in its root package.json (the Andes repository
contract), do not walk sections 1–5 by hand. Run one command and stop:
<skill-dir>/scripts/worktree-dev.sh up <slug> [--surface <s>]... [--mode human|smoke]