Why AI makes team rules more important
With AI, every developer types less and changes more. That is great until three agents edit the same files, or one push of half tested code reaches the live site. The problem is not the agent. It is a repository without rules.
Two words first. main is the branch with what is live right now. develop is where everything new lands first and is tested on a staging copy of the site.
Rule 1. Two branches that never mix
main is what is live. develop is where everything is tested first. Nobody pushes to main, ever. Code reaches main only after it works on the staging copy.
maindevelopfeature/TASK-42Task branches start from develop and come back through a pull request. Only a tested develop goes into main.
Rule 2. One task, one branch, one pull request
Every task gets its own branch from develop, named feature/TASK-number-short-name. Our task board creates that name automatically, and every task links to its pull request, so you always see what is waiting for review.
And every developer's Claude gets its own worktree: a separate checkout of the repository on its own branch. Two agents never edit the same files.
Rule 3. One shared CLAUDE.md and a review gate
The team rules live in CLAUDE.md in the root of the repository. Claude reads it at the start of every session, so every agent on the team follows the same rules. Claude reviews every pull request. A human merges. Secrets never go into the repository.
That is how three people ship fast, and the live site stays safe.