Worktree Selection and Reaping

Rule

The two interactive host surfaces (Claude Code, Codex) share one canonical worktree location: the dedicated sibling directory D:/DPF-worktrees/<topic>. The tool-native .claude/worktrees/<name> nesting inside the root clone is not the convention — a worktree created there is non-canonical. Build Studio is legitimately containerized and has no host worktree; it is not forced onto this path. What is mandatory for all three surfaces is governance sameness: every work location is registered and claimed in the MCP coordination plane.

Every worktree is born governed:

Every worktree has a lifecycle — active (claimed workroom, live heartbeat), idle (no heartbeat past threshold), or done (branch merged/abandoned) — and the janitor reaps idle/done worktrees, their branches, their per-branch CI images, and any stray compose project. The target is a bounded worktree count, not the 119 observed on 2026-06-05.

Why

On 2026-06-05 the live install carried 119 worktrees in two conflicting conventions (43 nested .claude/worktrees/, ~75 sibling D:/DPF-<topic>), none reaped — because the doctrine and the tools disagreed about placement and nothing governed lifecycle. The kernel decided the canonical location with the most decisive margin of the five delivery decisions (margin 3.12): a worktree is source-control, not runtime (worktree-is-source-control-not-runtime), and there must be a single source of truth (single-source-of-truth) for where it lives. Nesting work inside the root clone confuses the source-control boundary; a dedicated sibling dir keeps it clean. The sprawl came from the registration-and-reaping gap, not the path difference — so both halves are binding: one canonical path, and every worktree governed and reaped.

How To Apply

Decision Dimensions

Origin

Unified Delivery Surfaces spec, 2026-06-05 (WWMD-ratified, Q1 — kernel high confidence, margin 3.12). Janitor tracked as BI-DBF3F426.