These pages document master, which is unreleased and in development. The Quick Start installs the latest stable release; anything newer than that tag is marked in the text.
Getting Started with Code Reviewer Assistant
The Code Reviewer Assistant is a peer review system that uses a separate LLM to review work produced by the primary AI Copilot. The reviewer runs in a read-only sandbox and produces structured findings that the builder addresses in an iterative loop.
Quick Start
Section titled “Quick Start”1. Enable Peer Review
Section titled “1. Enable Peer Review”./claude-code --peer-review ~/my-projectOptions:
--peer-review [provider]— enable with optional provider override--peer-review-scope code|design|both— review focus (default:both)--review-commits single|per-round|squash— commit strategy (default:squash)--review-max-rounds N— max review rounds before circuit breaker (default: 5)
2. Configure Providers
Section titled “2. Configure Providers”Providers are configured in ~/.code-copilot-team/providers.toml. Run setup to create the default profile:
bash adapters/claude-code/setup.shOr add providers interactively:
bash adapters/claude-code/setup.sh --configure-providersFour provider types are supported:
- cli — local CLI tools (Codex, Aider)
- openai-compatible — any OpenAI-compatible HTTP endpoint
- ollama — Ollama instances (local or remote)
- custom — arbitrary command templates
3. Check Provider Health
Section titled “3. Check Provider Health”providers-health.shHow It Works
Section titled “How It Works”Build Phase — Review Loop
Section titled “Build Phase — Review Loop”- Build agent completes work and commits
- Agent runs
/review-submit - Runner spawns reviewer in a read-only sandbox
- Reviewer returns structured findings with a verdict
- On FAIL: agent addresses findings, commits fixes, runs
/review-submitagain - On PASS: proceed to
/phase-complete - On BREAKER: agent stops, human runs
/review-decide approve|reject|retry
Plan Phase — Advisory Review
Section titled “Plan Phase — Advisory Review”Plan review is single-round and advisory. A FAIL verdict is logged but does not block Build entry.
Commands
Section titled “Commands”| Command | Who runs it | What it does |
|---|---|---|
/review-submit |
Agent | Start or continue the review loop |
/review-decide approve|reject|retry |
Human | Resolve a circuit breaker |
/phase-complete |
Agent | Signal phase completion (validates review passed) |
Circuit Breakers
Section titled “Circuit Breakers”All breakers escalate to human — no automatic acceptance of unresolved work.
| Breaker | Default | Env Var |
|---|---|---|
| Max rounds | 5 | CCT_REVIEW_MAX_ROUNDS |
| Wall-clock timeout | 15 min | CCT_REVIEW_TIMEOUT_SEC |
| Stale findings | 2 consecutive | CCT_REVIEW_STALE_THRESHOLD |
| Provider unavailable | — | — |
When a breaker fires, the human runs /review-decide:
- approve — accept current state, bypass logged
- reject — abort, no merge
- retry — reset breaker, continue loop (rounds remain monotonic)
File Protocol
Section titled “File Protocol”All review state lives under .cct/review/ during the active loop:
| File | Purpose |
|---|---|
state.json |
Loop state (round, attempt, accumulated findings) |
findings-round-N.json |
Structured findings for round N |
resolution-round-N.json |
Builder’s response to findings |
breaker-tripped.json |
Breaker context (when tripped) |
decision.json |
Human’s decision (approve/reject/retry) |
loop-summary.json |
Final record on completion |
On completion, the collaboration artifact is written to specs/<feature-id>/collaboration/:
build-review.md— build phase reviewplan-consult.md— plan phase advisory review
CI Validation
Section titled “CI Validation”validate-collaboration.sh runs in CI and enforces:
- Build review: PASS or approved bypass required
- Plan review: advisory (warns, doesn’t block)
- Bypass without logged breaker type fails
Safety Model
Section titled “Safety Model”- Read-only sandbox — reviewer runs in a
cp -Rsnapshot, cannot modify the real repo - Fail-closed —
/phase-completerequires PASS; stop hook blocks if review started but incomplete - Stable finding IDs — SHA-256 of (file + category + description), line-number independent
- Audit trail — all rounds, findings, dispositions, and decisions recorded in
.cct/review/