Where should a team-wide coding convention live so that every developer gets it?
Why B is the answer
./CLAUDE.md, committed to the repository
The project file is shared through version control. User and local files are personal, which is why a convention can work for one person and not another.
In detail
- A project CLAUDE.md is committed to the repository, so everyone gets it.
- User and local files are personal, which is how a convention can work for one developer and not for a teammate.
- Treat the file like code: review changes to it, and keep it current.
Use case
An illustrative scenario, not a real incident.
A team agrees that all API errors must use a shared format. Added to ./CLAUDE.md and committed, the rule reaches each developer on their next pull, and it changes through code review.
See it in different ways
flowchart TD A["Managed policy"] --> E["Session context"] B["User file"] --> E C["Project file, in git"] --> E D["Local file, personal"] --> E
mindmap
root((Instructions))
Project CLAUDE.md
Shared through Git
User CLAUDE.md
One person, every project
CLAUDE.local.md
One person, one project
Skills
Loaded when usedflowchart LR S0["Edit CLAUDE.md"] --> S1["Review and merge"] --> S2["Team pulls"] --> S3["Every session has the rule"]
Key point: Team rules go in the committed project file.
Why the other options are wrong
- A. ./CLAUDE.local.md, added to every developer's personal setup by hand
- CLAUDE.local.md is personal, and adding it by hand for each person will drift.
- C. In the first message that each developer types into every new session
- Typing it each session relies on memory and is easily forgotten.
- D. ~/.claude/CLAUDE.md on each developer's own machine
- The user file sits on one machine, so nobody else receives it.

