peer_review_diff
Route a full code diff with source files and a task description to specialized peer models for targeted review based on focus area and risk level.
Instructions
Before calling: read relevant source files and attach full contents via files. Pass complete diffs/logs — never prose summaries. Set task with goals, affected behavior, and specific concerns. Route a diff review to the best peer model(s) based on focus and risk.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"diff": "<diff>",
"repo_path": "<repo_path>",
"idempotency_key": "<idempotency_key>"
},
"name": "peer_review_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | Required. Full unified diff (`git diff`, `git diff --cached`, or patch file). Do not summarize. | |
| repo_path | Yes | Absolute path to the repository root the peer should work in (e.g. /home/user/my-app). | |
| focus | No | Primary review lens. Pair with a detailed diff, related files, and a rich `task` describing risks. | |
| risk_level | No | Use high for auth, payments, migrations, concurrency, and public API changes. | |
| files | No | Changed source files and binary attachments (screenshots, PDFs). Use correct file extensions for images/PDFs and pass base64 or data-URI content. | |
| task | No | Human-readable session label: what you are trying to achieve, affected behavior, and specific concerns for the peer. | |
| needs_speed | No | Prefer a faster peer when true; still include full context. | |
| idempotency_key | Yes | Stable key for this operation (e.g. review-auth-jwt-1). Reuse the same key when retrying after timeout. |