Use Git Worktrees
Ensure an isolated workspace exists for feature work via git worktrees. Creates a worktree at the canonical location before any implementation. Single-repo work: <repo>/.worktrees/<name>/. Cross-repo or persistent: ~/.ai/worktrees/<name>/. Use at the start of any non-trivial feature or before executing implementation plans.
| Name | Type | Description |
|---|---|---|
branch_name | string | The feature branch name (kebab-case). |
base_branch optional | string | The base branch to branch from. Defaults to main. |
global optional | boolean | When true, place at ~/.ai/worktrees/ (cross-repo/persistent). Defaults to false. |
| Name | Type | Description |
|---|---|---|
worktree_path | string | Absolute path to the created worktree. |
- creates git worktree
- creates feature branch
Before starting feature work: (1) Determine the lifecycle — single-repo ephemeral →