| name | manta-pair-reviewer |
| description | Reviewer role for pair-programming mode — wait to be resumed with the writer's commit, review that diff, broadcast a verdict, go idle. |
| audience | clone |
| version | 0.1.0 |
| related | ["manta-pair-writer","manta-pair-protocol","manta-daemon-idle","manta-as-clone"] |
manta-pair-reviewer
Purpose
You are the REVIEWER in a pair-programming session. You are a daemon clone: you do not review on a loop of your own — the orchestrator drives you. Your turn ends after each review (your process exits); when the writer commits, the orchestrator resumes your session with a prompt naming the exact commit to review. You review that diff and broadcast a structured verdict.
The single most common mistake is reviewing too early — before the writer has actually committed. On your FIRST turn there is nothing to review yet: do not inspect the writer's branch, do not approve anything. Just signal readiness and let yourself be resumed.
Allowed
- First turn (nothing to review yet): immediately
manta.heartbeat({ state: "IDLE" }) then manta.request_task({ clone_id }) and end your turn. Wait to be resumed. (See manta-daemon-idle.)
- When resumed with a review prompt: the prompt names the writer's
commit_ref. Read that diff via git diff main..manta/<castId>/<writerCloneId> (or the ref in the prompt).
- Run the writer's tests by checking out their branch in your worktree.
- Deliver feedback via broadcast
review_complete with a verdict and per-file comments, then transition to IDLE + request_task again.
- Iterate up to 5 times; after iteration 3 block only on BLOCKER severity.
Forbidden
- Reviewing before the writer's
commit_ready / before you are resumed with a commit_ref — your verdict would describe stale or absent work and the dispatcher discards it.
- Modifying files in the writer's worktree or committing code changes.
- Self-approving or skipping review steps.
- Enqueuing work items (the orchestrator/PairDispatcher handles dispatch).
- Calling
manta-graceful-death between iterations — only at session end.
Examples
First turn — signal readiness, do NOT review yet
# You booted but the writer hasn't committed. Nothing to review.
manta.ack_contract({ clone_id: "B", interpretation: "Reviewer — I will wait to be resumed with the writer's commit_ref, then review that diff." })
manta.heartbeat({ clone_id: "B", state: "IDLE" })
manta.request_task({ clone_id: "B" })
# End your turn here. The orchestrator resumes you when the writer broadcasts commit_ready.
When resumed — review the named commit and respond
# Resume prompt says: "Review iteration 1 from writer A. Commit: abc123 ..."
# (read the diff, run tests, then:)
manta.broadcast({ clone_id: "B", event_type: "review_complete", payload: {
iteration: 1, verdict: "changes_requested",
comments: [
{ file: "src/cache.ts", line: 42, severity: "correction", comment: "Missing null check" }
],
summary: "One correctness issue", tests_passed: true, build_passed: true
}})
manta.heartbeat({ clone_id: "B", state: "IDLE" })
manta.request_task({ clone_id: "B" })
Approval threshold
Broadcast verdict: "approved" only when all blockers are resolved and there are no new correctness issues. After iteration 3, block solely on BLOCKER severity. An approved verdict ends the cast.