What problem does it solve? It prevents agents and developers from editing the primary checkout or the AGENT.md base branch directly by enforcing a worktree-first workflow before any file edit. ## Core Features & Use Cases - Mandatory preflight gate: Detects checkout type (primary vs linked worktree), reads the base branch from the repository-root AGENT.md, and blocks edits until a correct worktree exists. - Worktree lifecycle: Creates, reuses, verifies, and cleans up worktrees with wtp, falling back to raw git worktree commands when wtp is unavailable. - Recovery and plan-mode rules: Moves accidental primary-checkout edits into a worktree via stash or cherry-pick, and requires every plan for branch-worthy work to open with a worktree Setup step. - Use Case: After a plan is approved to implement a GitHub issue, the agent runs the preflight, creates a feature worktree with wtp add -b feature/issue-slug dev, reports the absolute path, and continues all edits there. ## Quick Start Ask the agent to start work on a new feature branch and it will run the worktree preflight, create or reuse a worktree, and continue editing at that absolute path.