worktree-session-pinning
Worktree Session Pinning — A Lane Session Stays on Its Lane
Section titled “Worktree Session Pinning — A Lane Session Stays on Its Lane”A session that OPENS a linked worktree is PINNED to it and its home branch for life — one session per lane. NEVER switch your own HEAD (switch/checkout <branch>/switch -c/checkout -b/branch -f/--detach); read another ref without moving (git show <ref>:<path>, git log <ref>). Other-branch work is DELEGATED: the caller creates the worktree and names it via t1k-lane-directive.cjs emit (a routed spawn ignores isolation: "worktree"); merges back by PR, never the lane’s home branch as a PR head (except a merge-up tree child, t1k-tree.cjs merge-child). Sync by rebasing onto origin/<base> (t1k-git/references/rebase-over-merge.md) top-down if nested; --force-with-lease own branch only. Leave a live/unmerged lane ONLY on explicit user cleanup; a merged one is reaped by worktree-auto-prune.cjs. Full text: docs/worktree-session-pinning.md.
How to apply
Section titled “How to apply”- Record the pin at session start (
git rev-parse --abbrev-ref HEAD). - Guard blocks you? Take its delegate escape.
T1K_WORKTREE_PIN_OVERRIDE=1is audited, for the user’s explicit leave-the-lane instruction only.