Skip to content

worktree-discipline

ALL FEATURE WORK USES DILLOTREE. NO EXCEPTIONS.

The armadillo repo dogfoods its own tooling. Every feature branch, parallel agent, and isolated workspace MUST go through worktree.

Raw branch creation commands are intercepted by enforce-worktree.sh hook:

Blocked CommandUse Instead
git checkout -b feat/xworktree create feat/x
git switch -c feat/xworktree create feat/x
git switch --create feat/xworktree create feat/x
git branch feat/xworktree create feat/x

These git operations are NOT blocked — they don’t create branches:

  • git checkout main — switching to existing branch
  • git switch main — switching to existing branch
  • git branch -d feat/x — deleting a branch
  • git branch --list — listing branches
  • git branch -D feat/x — force-deleting a branch
  • git branch --merged — listing merged branches

Dillotree itself sets /tmp/.armadillo-worktree-bypass when it needs to run internal git operations. The hook consumes (deletes) the flag after one use.

  1. Dogfooding — we build worktree, we use worktree
  2. Isolation — worktrees prevent parallel agents from clobbering each other
  3. Consistency — one workflow for branch creation, no ad-hoc git commands
ComponentRole
enforce-worktree.shPreToolUse hook — intercepts and blocks
worktree skillThe approved way to create branches
dispatching-parallel-agentsMust use worktree launch for all agents
git-workflow ruleDocuments mandatory worktree usage