What problem does it solve?
It prevents agent workflows from contaminating the main repository by enforcing strict git worktree isolation rules, including safe branching, path handling, and evidence-backed changes.
Core Features & Use Cases
- Working directory verification: Ensures the agent runs inside
.claude/worktrees/ and halts if it’s operating from the main repo path.
- Branching and staging safety: Forces feature-branch creation before work begins and restricts
git add to specific files only, avoiding accidental broad changes.
- Commit and CI/lint gate compliance: Requires conventional commit formatting and runs both
ruff check and ruff format --check for Python changes to avoid CI failures.
- PR contamination prevention: Blocks cross-agent context leakage by preventing edits outside the worktree and disallowing unsafe operations in the main repo.
Quick Start
Start an agent with isolation set to worktree and follow the rules to verify you’re in the correct worktree path before creating a feature branch, staging only the intended files, and running both Ruff checks before delivering results.