🔄 Agentic Methodology · Branch Isolation
Isolate parallel work with git worktrees
Separate directories per branch letting agents work concurrently without stepping on each other.
intermediate~25 minAgent Power UsersAI-Native EngineersTeams Shipping With Agents
Steps
- 1Create worktrees per workstream: git worktree add ../feat-x -b feat-x
- 2Install dependencies inside EACH worktree; they do not share node_modules
- 3Assign one agent per worktree; forbid cross-worktree checkouts mid-run
- 4Name worktree dirs after branches; delete immediately after merge
- 5Prune stale worktrees monthly: git worktree prune plus manual sweep
- 6Never create a worktree INSIDE another repository's working tree
Common Pitfalls
- ▲Assuming installed deps carry across worktrees
- ▲Two agents editing the same file via different worktrees then merging blindly
Commands
Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill branch-isolation-git-worktree-isolationInstall globally
$ npx skills add aniruddhaadak80/skills --skill branch-isolation-git-worktree-isolation -gTags
#git#worktrees#parallel#agentic-methodology#branch-isolation