What problem does it solve?
It prevents branch-based work from contaminating your main working tree by isolating each issue’s changes inside its own Git worktree and ensuring consistent creation, usage, PR opening, and cleanup.
Core Features & Use Cases
- Issue-first branch scoping: Forces you to use an existing GitHub issue number in the branch and directory naming scheme (e.g., feat/42-scheduled-payments-api and .worktrees/42-scheduled-payments-api).
- Safe worktree lifecycle: Verifies whether the branch or directory already exists before creating a new worktree, then enters the worktree to implement and commit changes.
- End-to-end PR workflow: Pushes the branch, opens a PR that closes the issue, and removes both the worktree and local branch after merge.
- Use Case: When implementing a feature for a specific ticket (like “Add scheduled payments API”), create an isolated worktree, implement the changes there, and then open a PR without risking other local work.
Quick Start
Ask the AI to create and manage a worktree for issue #42 using type feat and slug scheduled-payments-api, then open the PR and clean up after it’s merged.