Files
settled-reach/.claude/rules/git-safety.md
T
jpmschweitzerandClaude Opus 4.7 0127fc8fd9 chore(config): centralize git for teammates and enable tmux panes
Two agent-team tooling changes:

- teammateMode: in-process -> auto. Teammates now spawn in tmux split panes
  when the lead runs inside tmux, with graceful in-process fallback.
- New PreToolUse hook git-centralize-guard.sh blocks .git-mutating commands
  (add, commit, merge, push, pull, rebase, reset, checkout, stash,
  cherry-pick, rm, mv) for teammates, keeping version control centralized to
  the lead. Detection keys on the agent_type field, which a teammate's hook
  input carries and the lead's does not. Read-only git is allowed.

Documented in .claude/rules/git-safety.md. Hooks load at lead startup, so a
restart is required for the hook to reach teammates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 12:37:47 +02:00

1.4 KiB

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: <type>(<scope>): <summary>

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.