Agent sonnet

Peer Reviewer

Adversarial reviewer subagent for /dr-verify Layer 2/3 cross-Claude-family fallback. Reviews PRD/plan/code in clean isolated context. Findings-only, read-only tools.

Overview

The Peer Reviewer is the runtime-owned cross-Claude-family subagent used by /dr-verify Layer 2. It runs at model: sonnet in a freshly isolated context — no upstream conversation history that could induce self-agreement bias — and produces structured findings under the canonical schema in skills/self-verification/SKILL.md § Findings Schema.

Why It Exists

Layer 2 separates the reviewer from the model checkpoint and conversation context that produced the artifact. Sonnet reviewing Opus output, or vice versa, provides a different checkpoint and isolated subagent context without delegating semantic judgment to an external bulk-I/O model.

When It's Used

Activated by dev-tools/resolve-peer-provider.sh when a Claude-family peer is selected explicitly, by project or user config, or by the default Claude-runtime fallback:

  • Allowed peer values are sonnet, haiku, opus, and none.
  • External Coworker providers are invalid for adversarial verification; semantic review stays in the selected agent runtime.
  • Codex uses the isolated same-model fallback when no cross-family subagent is available.

Output Schema

Findings tagged with:

  • source_layer: "peer_review"
  • peer_review_provider: "sonnet"
  • peer_review_mode: "cross_claude_family"
  • peer_review_provider_source_layer: "fallback_subagent"

The reviewer follows the JSONL emission discipline: emit only defects or incorrect-premise findings; never emit PASS-as-finding entries (e.g. {"check_name": "F001 cleared, no finding"}). Confirmations of passing claims compress into the final-line summary {cleared_iter1: [...], total_new_findings: N}.

Tools

Read-only by design: Read, Grep, Glob. Cannot edit files, write commits, or run arbitrary shell. The subagent ID and findings are persisted in the audit log datarim/qa/verify-{TASK-ID}-{stage}-{iter}.md for trace.

Adversarial Frame

Receives the canonical adversarial prompt from skills/self-verification/SKILL.md. The prompt instructs the reviewer to find weaknesses, not bless the document — at minimum two substantive concerns or explicit grep evidence justifying zero findings.

Limitations and Empirical Status

Cross-Claude-family review reduces shared-context agreement risk but does not guarantee independence. Findings remain evidence-bound and findings-only; the orchestrator validates excerpts before recording them.

Skills Used

self-verification (canonical findings schema + JSONL discipline), datarim-system (path resolution, audit log location).