worktreelisted
Install: claude install-skill vindm/dotclaude
# `/dotclaude:worktree` — parallel-session isolation kit
You are setting up worktree-per-feature discipline: every substantive edit to
the policed repo happens in a dedicated git worktree, enforced by a blocking
PreToolUse hook. Read `../../principles/worktree-discipline.md` FIRST — it
carries the doctrine and the five hard-won lessons this flow encodes; this
file is the procedure.
**The hook is CONSUMED, not rendered.** The plugin ships one debugged
`check-main-checkout-edit.sh` (in `hooks/scripts/`, wired always-on) that reads
a `worktree:` block from the project's `dotclaude.yml` and NO-OPs when there is
none. So this flow does NOT copy a hook into the project — it writes the config
the consumed hook reads. No per-project hook copy, no drift, and a project
tunes its policing in one data file.
The deliverable is not files — it is a **proven** install: the `worktree:`
config the consumed hook reads correctly, a smoke worktree that built the
project for real, and an explicit restart + live-fire handoff.
## Phase 1 — Read the project's concurrency shape
Before any question:
1. **Repo topology** — is the project root the repo, or does the policed repo
sit below it?
```bash
git rev-parse --show-toplevel 2>/dev/null
for d in */; do git -C "$d" rev-parse --show-toplevel 2>/dev/null; done
git worktree list 2>/dev/null
```
Multiple sibling repos → ask which one(s) carry the collision risk (usually
the one being actively developed, not read-only referenc