system/git-protocol.md
The binding code of version-control ethics for every agent operating in any McRitchie repo. Every soul.md references this doc. These rules supersede individual preference.
When multiple agent instances share a codebase, naïve git workflows produce: branches switching under you mid-edit, files mutating during Edit, stashes drifting from their labels, and merge conflicts masquerading as bugs. We have been bitten by all of these. The rules below are recovery, not theory.
Every implementation task gets its own hidden git worktree -- an independent
working directory sharing the underlying .git database. A branch can only be
checked out in one worktree at a time; git enforces this for us.
~/projects/<repo> # primary checkout, integration/deploy
~/projects/<repo>/.worktrees/<task-slug> # per-task worktrees
~/projects/turf-monster/.worktrees/new-contest-card
~/projects/mcritchie-studio/.worktrees/parallel-agent-devops
Create:
cd ~/projects/mcritchie-studio
bin/agent-worktree new <app> <task-slug>
Graduate when done:
bin/agent-worktree finish <app> <task-slug> --push --pr
Remove only after the PR is merged or intentionally abandoned:
bin/agent-worktree cleanup --write
Default branch naming is <type>/<task-slug>, where type is usually feat.
The task slug is the stable collaboration unit; do not include an agent id in
the branch unless the task itself requires it.
Examples:
- feat/agent-page-banner
- feat/dark-mode-cards
- fix/usdc-vault-refactor
- chore/heroku-buildpack-bump
Feature agents push only their own branch. main is not a backup target.
| Step | Owner | Meaning |
|---|---|---|
| Branch pushed + PR opened | Feature agent | From the task worktree, against origin/main |
| PR intake + merge safety | Avi | "This matches the ticket and does not drop another branch's work" |
| QA pass when warranted | Steffon | "Tests green, acceptance criteria met, no regression" |
| Merge | Avi or release conductor | Only after PR review and required QA |
| Release/deploy/gem publish | Release conductor | Only with explicit production/release approval |
Avi can merge low-risk docs/tooling/copy PRs alone. Risky code, migrations,
auth, payments, email, Solana, provider config, or deployment changes get
Steffon QA. Disagreement between Avi and Steffon escalates to Alex the
orchestrator, and to Mr. McRitchie when product or external-account judgment is
needed.
When Steffon (or Avi) rejects, the chat message goes in the PR's chat thread using this template:
@<author> — Rejected
Reason: <one line>
Acceptance criterion not met: <which>
Evidence: <test failure / screenshot / repro steps>
Look at: <file:line>
Suggested direction: <if obvious> | Open: <if unsure>
A rejection is a teaching moment, not a punishment. Be specific about what would pass.
origin/main. Never off another agent's branch unless coordinated explicitly in chat.--force-with-lease, never --force. --force can silently overwrite a colleague's push.--no-verify. If a hook fails, investigate. Don't work around.main advances. Before opening a PR, fetch and rebase on origin/main. Keep history linear.Ask in chat. Git mistakes are recoverable; pushing through ambiguity rarely is.
We emailed a one-tap sign-in link to . It expires shortly and can only be used once.
No email? Check spam, or close this and try again.