# Git Safety ## Staging rules - **Stage files by name** — never use `git add -A` or `git add .` - Verify no secrets, saves, or binary blobs are staged - Skip files in `.gitignore` - The `.claude/` directory IS tracked — skills and agents belong in the repo ## Centralized version control (agent teams) Git is the **team lead's** job. Teammates edit files; the lead stages, commits, merges, and pushes. This is enforced, not just convention: - **Hook:** `.claude/hooks/git-centralize-guard.sh` (PreToolUse on Bash) blocks `.git`-mutating commands — `add`, `commit`, `merge`, `push`, `pull`, `rebase`, `reset`, `checkout`, `stash`, `cherry-pick`, `rm`, `mv` — for any agent-team teammate. Read-only git (`status`, `log`, `diff`, `show`, `fetch`) is allowed. - **Detection:** a teammate's PreToolUse hook input carries an `agent_type` field (e.g. `"qatux"`); the lead's main session does not. Present → block; absent → allow. (Confirmed on Claude Code 2.1.148.) - **Activation:** hooks load at lead startup and teammates inherit that snapshot, so changes to this hook require a Claude Code restart to reach teammates. ## Commit conventions Use conventional commits: `(): ` Scopes: `agents`, `skills`, `docs`, `briefings`, `discussions`, `schema`, `db`, `config`, `engine`, `simulation`, `client`, `ui`, `audio`, `assets`, `meta` See `/git-commit` for full commit format, types, CHANGELOG workflow, and examples.