Worktree Manager
Use this skill when a task needs an isolated worktree or when the active runtime may provide native worktree management.
- Probe the active runtime with
scripts/capability_probe.py. - Treat the returned capability result as authoritative. Never infer native worktree support from a model name or an installed binary.
- If
native_worktreeis true, follow the returned activation guidance and retain the task's control-plane gates. - Otherwise use the portable plan from
scripts/worktree_manager.pyand delegate lifecycle operations to theissue-worktree-agentskill; its path must remain below<repo>/.worktrees/<task-id>. - Report the selected strategy, exact path, branch, activation guidance, and cleanup command before mutating the repository.
Native and portable execution have the same approval, verification, and review requirements. Native execution is an implementation facility, not a governance bypass.