From agent-almanac
Structured cross-project code review between two Claude Code instances via cross-review-mcp broker with evidence-backed verdicts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-almanac:cross-review-projectThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Two Claude Code instances review each other's projects through structured artifact exchange via the `cross-review-mcp` broker. The broker enforces Quantized Simplex Gossip (QSG) scaling laws — review bundles must contain at least 5 findings to stay in the selection regime (Γ_h ≈ 1.67), preventing shallow consensus from passing as agreement.
Two Claude Code instances review each other's projects through structured artifact exchange via the cross-review-mcp broker. The broker enforces Quantized Simplex Gossip (QSG) scaling laws — review bundles must contain at least 5 findings to stay in the selection regime (Γ_h ≈ 1.67), preventing shallow consensus from passing as agreement.
cross-review-mcp broker running and configured as an MCP server in both instancesConfirm the broker is running and both instances can reach it.
claude mcp list | grep cross-review
get_status to verify the broker is responsive and no stale agents are registeredcross-review://protocol — this is a markdown document describing the review dimensions and QSG constraintsExpected: The broker responds to get_status with an empty agent list. The protocol resource is readable as markdown.
On failure: If the broker is not configured, add it: claude mcp add cross-review-mcp -- npx cross-review-mcp. If stale agents exist from a previous session, call deregister for each before proceeding.
Register this agent with the broker.
register with:
agentId: a short, unique identifier (e.g., project directory name)project: the project namecapabilities: ["review", "suggest"]get_status — your agent should appear with phase "registered"wait_for_phase with the peer's agent ID and phase "registered"Expected: Both agents registered with the broker. get_status shows 2 agents at phase "registered".
On failure: If register fails with "already registered", the agent ID is taken from a previous session. Call deregister first, then re-register.
Read your own codebase and send a structured briefing to the peer.
Briefing artifact — a structured summary the peer can use to navigate your codebase efficientlysend_task with:
from: your agent IDto: peer agent IDtype: "briefing"payload: JSON-encoded briefingsignal_phase with phase "briefing"Expected: Briefing sent and phase signaled. The broker enforces that you must send a briefing before advancing to review.
On failure: If send_task rejects the briefing, check that the from field matches your registered agent ID. Self-sends are rejected.
Wait for the peer's briefing, then review their code and send findings.
wait_for_phase with the peer's ID and phase "briefing"poll_tasks to retrieve the peer's briefingack_tasks with the received task IDs — this is required (peek-then-ack pattern)pattern_transfer — a pattern in your project that the peer could adoptmissing_practice — a practice the peer lacks (testing, validation, error handling)inconsistency — internal contradiction within the peer's codebasesimplification — unnecessary complexity that could be reducedbug_risk — potential runtime failure or edge casedocumentation_gap — missing or misleading documentationid: unique identifier (e.g., "F-001")category: one of the 6 categories abovetargetFile: path in the peer's projectdescription: what you foundevidence: why this is a valid finding (code references, patterns)sourceAnalog (recommended): the equivalent in your own project that demonstrates the pattern — this is the single mechanism for genuine cross-pollinationsend_task with type "review_bundle" and the JSON-encoded findings arraysignal_phase with phase "review"Expected: Review bundle accepted by the broker. Fewer than 5 findings will be rejected.
On failure: If the bundle is rejected for insufficient findings, review more deeply. The constraint exists to prevent shallow reviews from dominating. If you genuinely cannot find 5 issues, reconsider whether cross-review is the right tool for this project pair.
Receive findings about your own project and respond with evidence-backed verdicts.
wait_for_phase with the peer's ID and phase "review"poll_tasks to retrieve findings about your projectack_tasks with the received task IDsFindingResponse:
findingId: matches the finding's IDverdict: "accept" (valid, will act on it), "reject" (invalid, with counter-evidence), or "discuss" (needs clarification)evidence: why you accept or reject — must be non-emptycounterEvidence (optional): specific code references that contradict the findingsend_task with type "response"signal_phase with phase "dialogue"Note: the "discuss" verdict is not gated by the protocol — treat it as a flag for manual follow-up, not an automated sub-exchange.
Expected: All findings responded to with verdicts. Empty responses are rejected by the broker.
On failure: If you cannot form an opinion on a finding, default to "discuss" with evidence explaining what additional context you need.
Produce a synthesis artifact summarizing accepted findings and planned actions.
wait_for_phase with the peer's ID and phase "dialogue"Synthesis artifact:
send_task with type "synthesis" and the JSON-encoded synthesissignal_phase with phase "synthesis"signal_phase with phase "complete"deregister to clean upExpected: Both agents reach "complete". The broker requires at least 2 registered agents to advance to complete.
On failure: If the peer has already deregistered, you can still complete locally. Compile your synthesis from the findings you received.
"complete" phaseack_tasks called after every poll_tasksack_tasks: The broker uses peek-then-ack delivery. Tasks remain in queue until acknowledged. Forgetting to ack causes duplicate processing on the next poll.from parameter: send_task requires an explicit from field matching your agent ID. Self-sends are rejected.sourceAnalog: The sourceAnalog field is optional but is the single mechanism for genuine cross-pollination — it shows your implementation of the pattern you're recommending. Always populate it when a source analog exists.discuss as blocking: Nothing in the protocol gates complete on pending discussions being resolved. Treat discuss verdicts as flags for manual follow-up after the session.α ≈ 1 - reject_rate) and check per-category accept rates.scaffold-mcp-server — for building or extending the broker itselfimplement-a2a-server — A2A protocol patterns the broker draws fromreview-codebase — single-agent review (this skill extends it to cross-agent structured exchange)build-consensus — swarm consensus patterns (QSG is the theoretical foundation)configure-mcp-server — configuring the broker as an MCP server in Claude Codeunleash-the-agents — can be used to analyze the broker itself (battle-tested: 40 agents, 10 hypothesis families)npx claudepluginhub pjt222/agent-almanacOrchestrates multi-agent code reviews with specialized agents for quality, security, architecture, performance, compliance, and best practices. Use for holistic code assessments.
Requests an independent code review from a different AI agent backend (e.g., Codex reviewing Claude) over the repowire mesh before merging. Useful for unbiased second opinions.
Orchestrates multi-agent code review with Codex CLI, Gemini CLI, and five Claude specialist subagents (security, performance, logic, regression, robustness) then synthesizes findings into verified fixes. Use for deep reviews, second opinions, or council reviews on PRs, commits, or branches.