managing-development-brancheslisted
Install: claude install-skill dariovr1/sixth-sense
# Managing Development Branches
Three phases of one lifecycle: **Setup** (isolate a workspace before starting), **Conflicts** (resolve one if it comes up mid-work), **Closure** (integrate and clean up once done).
## Setup
### When to Activate
- After design approval and before writing implementation plans
- Before executing tasks with parallel agent dispatching
- Any time an isolated workspace for a new branch is required
Announce: "I'm setting up an isolated workspace for this branch."
### The Process
#### Step 1: Directory Selection
Follow this priority order:
1. Check for existing `.worktrees/` directory (preferred/hidden)
2. Check for existing `worktrees/` directory
3. Check CLAUDE.md / GEMINI.md / AGENTS.md for directory preference
4. If none found, ask user to choose:
- `.worktrees/` (project-local)
- `~/.config/sixth-sense/worktrees/<project-name>/` (global location)
#### Step 2: Safety Verification
Verify the worktree directory is included in `.gitignore`:
- **Why critical:** Prevents accidentally committing worktree contents to the repository
- **If not ignored:** Add the path to `.gitignore`, commit the change, then proceed
#### Step 2b: Uncommitted Work Check
A worktree branches from the last **commit** on the source branch, not from the current working tree — any uncommitted or staged changes are invisible to it. Run `git status --short`:
- **Clean:** proceed.
- **Dirty:** stop and ask the user whether to commit (even a temporary WIP commit) or `git