Model Peer v0.2.0
Cross-model peer review, now with a bounded consultation chain.
Install
curl -fsSL https://raw.githubusercontent.com/makedirectory/ModelPeer/v0.2.0/install.sh | bashAs with any remote shell installer, inspect it before piping it into a shell.
Highlights
Peer-chain depth
--depth N on ask and review, plus MODEL_PEER_MAX_DEPTH, bounds how far consultation can recurse. Default 1 (a peer answers alone), ceiling 10. The limit propagates down the chain, so a peer cannot raise its own ceiling.
model-peer ask claude "..." # depth 1: claude answers alone
model-peer ask claude --depth 2 "..." # claude may consult one further peer
model-peer review --depth 2 "..." # each reviewer may consult one peerDepth is a limit, not a permission
The governing invariant:
Increasing depth may increase how many models can participate.
Increasing depth must never increase what a model can do to the host system.
Delegation — the permission to initiate a further consultation — is tracked separately from depth and granted only where a provider's sandbox can scope it to Model Peer alone:
| Provider | Nested consultation | What delegation grants |
|---|---|---|
| Claude | yes | Bash auto-approved only for Bash(model-peer:*) |
| Codex | yes | nothing — the read-only sandbox already permits it |
| Gemini | no | n/a; its deny rules are unconditional at every depth |
Gemini is deliberately excluded: its policy engine can only allow or deny run_shell_command wholesale, and an uneven provider matrix is more honest than a weakened boundary. A depth budget a provider cannot safely hold is reported on stderr, never silently converted into a wider sandbox.
This is a known implementation limitation rather than the intended end state. The README documents a consultation broker roadmap, where peers request a consultation from the parent process instead of executing model-peer, so peers stay read-only at every depth.
Chain guards
Two independent guards, both exiting 64: the chain may not exceed the depth limit, and a model is never consulted by itself at any depth.
Fixed
model-peer reviewoverwroteMODEL_PEER_STACK, so a review launched from inside a peer chain escaped the recursion guard entirely. The synthesizer is now always a leaf.install.shembeds a verbatim copy ofbin/model-peerfor thecurlpath and could drift from it silently.make syncregenerates it;make check-syncfails the build on drift.- The documented one-line install pointed at a
YOUR_GITHUB_USERNAMEplaceholder and could never have worked. - CI had never passed on this repository —
make lintfailed shellcheck from the first commit. It is green on ubuntu and macOS as of this release.
Changed
- Agent rules consolidate into a single
AGENTS.md, withCLAUDE.mdandGEMINI.mdas symlinks so all three CLIs read one file.examples/ships one shared template instead of three near-identical copies. model-peer doctorreports the per-provider nested-consultation matrix, the effective depth limit, and any active chain.
Full detail in CHANGELOG.md.