cross-review-project

Conduct a structured cross-project code review between two Claude Code instances via the cross-review-mcp broker. Each agent reads its own codebase, reviews the peer's code, and engages in evidence-backed dialogue — with QSG scaling laws enforcing review quality through minimum bandwidth constraints and phase-gated progression.

9 stars

Best use case

cross-review-project is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Conduct a structured cross-project code review between two Claude Code instances via the cross-review-mcp broker. Each agent reads its own codebase, reviews the peer's code, and engages in evidence-backed dialogue — with QSG scaling laws enforcing review quality through minimum bandwidth constraints and phase-gated progression.

Teams using cross-review-project should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cross-review-project/SKILL.md --create-dirs "https://raw.githubusercontent.com/pjt222/agent-almanac/main/i18n/caveman-lite/skills/cross-review-project/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cross-review-project/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cross-review-project Compares

Feature / Agentcross-review-projectStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Conduct a structured cross-project code review between two Claude Code instances via the cross-review-mcp broker. Each agent reads its own codebase, reviews the peer's code, and engages in evidence-backed dialogue — with QSG scaling laws enforcing review quality through minimum bandwidth constraints and phase-gated progression.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Cross-Review Project

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.

## When to Use

- Two projects share architectural concerns and could learn from each other
- You want independent code review that goes beyond what a single reviewer sees
- Cross-pollination is the goal: finding patterns in one project that are missing in the other
- You need structured, evidence-backed review with accept/reject/discuss verdicts

## Inputs

- **Required**: Two project paths accessible to two Claude Code instances
- **Required**: `cross-review-mcp` broker running and configured as an MCP server in both instances
- **Optional**: Focus areas — specific directories, patterns, or concerns to prioritize
- **Optional**: Agent IDs — identifiers for each instance (default: project directory name)

## Procedure

### Step 1: Verify Prerequisites

Confirm the broker is running and both instances can reach it.

1. Check the broker is configured as an MCP server:
   ```bash
   claude mcp list | grep cross-review
   ```
2. Call `get_status` to verify the broker is responsive and no stale agents are registered
3. Read the protocol resource at `cross-review://protocol` — this is a markdown document describing the review dimensions and QSG constraints

**Got:** The broker responds to `get_status` with an empty agent list. The protocol resource is readable as markdown.

**If fail:** 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.

### Step 2: Register

Register this agent with the broker.

1. Call `register` with:
   - `agentId`: a short, unique identifier (e.g., project directory name)
   - `project`: the project name
   - `capabilities`: `["review", "suggest"]`
2. Verify registration by calling `get_status` — your agent should appear with phase `"registered"`
3. Wait for the peer agent to register: call `wait_for_phase` with the peer's agent ID and phase `"registered"`

**Got:** Both agents registered with the broker. `get_status` shows 2 agents at phase `"registered"`.

**If fail:** If `register` fails with "already registered", the agent ID is taken from a previous session. Call `deregister` first, then re-register.

### Step 3: Briefing Phase

Read your own codebase and send a structured briefing to the peer.

1. Read systematically:
   - Entry points (main files, index, CLI commands)
   - Dependency graph (package.json, DESCRIPTION, go.mod)
   - Architectural patterns (directory structure, module boundaries)
   - Known issues (TODO comments, open issues, tech debt)
   - Test coverage (test directories, CI configuration)
2. Compose a `Briefing` artifact — a structured summary the peer can use to navigate your codebase efficiently
3. Call `send_task` with:
   - `from`: your agent ID
   - `to`: peer agent ID
   - `type`: `"briefing"`
   - `payload`: JSON-encoded briefing
4. Call `signal_phase` with phase `"briefing"`

**Got:** Briefing sent and phase signaled. The broker enforces that you must send a briefing before advancing to review.

**If fail:** If `send_task` rejects the briefing, check that the `from` field matches your registered agent ID. Self-sends are rejected.

### Step 4: Review Phase

Wait for the peer's briefing, then review their code and send findings.

1. Call `wait_for_phase` with the peer's ID and phase `"briefing"`
2. Call `poll_tasks` to retrieve the peer's briefing
3. Call `ack_tasks` with the received task IDs — this is required (peek-then-ack pattern)
4. Read the peer's actual source code, informed by their briefing
5. Produce findings across 6 categories:
   - `pattern_transfer` — a pattern in your project that the peer could adopt
   - `missing_practice` — a practice the peer lacks (testing, validation, error handling)
   - `inconsistency` — internal contradiction within the peer's codebase
   - `simplification` — unnecessary complexity that could be reduced
   - `bug_risk` — potential runtime failure or edge case
   - `documentation_gap` — missing or misleading documentation
6. Each finding must include:
   - `id`: unique identifier (e.g., `"F-001"`)
   - `category`: one of the 6 categories above
   - `targetFile`: path in the peer's project
   - `description`: what you found
   - `evidence`: 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-pollination
7. Bundle at least **5 findings** (QSG constraint: m ≥ 5 keeps Γ_h ≈ 1.67 in selection regime)
8. Call `send_task` with type `"review_bundle"` and the JSON-encoded findings array
9. Call `signal_phase` with phase `"review"`

**Got:** Review bundle accepted by the broker. Fewer than 5 findings will be rejected.

**If fail:** 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.

### Step 5: Dialogue Phase

Receive findings about your own project and respond with evidence-backed verdicts.

1. Call `wait_for_phase` with the peer's ID and phase `"review"`
2. Call `poll_tasks` to retrieve findings about your project
3. Call `ack_tasks` with the received task IDs
4. For each finding, produce a `FindingResponse`:
   - `findingId`: matches the finding's ID
   - `verdict`: `"accept"` (valid, will act on it), `"reject"` (invalid, with counter-evidence), or `"discuss"` (needs clarification)
   - `evidence`: why you accept or reject — must be non-empty
   - `counterEvidence` (optional): specific code references that contradict the finding
5. Send all responses via `send_task` with type `"response"`
6. Call `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.

**Got:** All findings responded to with verdicts. Empty responses are rejected by the broker.

**If fail:** If you cannot form an opinion on a finding, default to `"discuss"` with evidence explaining what additional context you need.

### Step 6: Synthesis Phase

Produce a synthesis artifact summarizing accepted findings and planned actions.

1. Call `wait_for_phase` with the peer's ID and phase `"dialogue"`
2. Poll any remaining tasks and acknowledge them
3. Compile a `Synthesis` artifact:
   - Accepted findings with planned actions (what you will change and why)
   - Rejected findings with reasons (preserves the reasoning for future review)
4. Call `send_task` with type `"synthesis"` and the JSON-encoded synthesis
5. Call `signal_phase` with phase `"synthesis"`
6. Optionally create GitHub issues for accepted findings
7. Call `signal_phase` with phase `"complete"`
8. Call `deregister` to clean up

**Got:** Both agents reach `"complete"`. The broker requires at least 2 registered agents to advance to complete.

**If fail:** If the peer has already deregistered, you can still complete locally. Compile your synthesis from the findings you received.

## Validation

- [ ] Both agents registered and reached `"complete"` phase
- [ ] Briefings exchanged before reviews began (phase enforcement)
- [ ] Review bundles contained at least 5 findings each
- [ ] All findings received a verdict (accept/reject/discuss) with evidence
- [ ] `ack_tasks` called after every `poll_tasks`
- [ ] Synthesis produced with accepted findings mapped to actions
- [ ] Agents deregistered after completion

## Pitfalls

- **Fewer than 5 findings**: The broker rejects bundles with m < 5. This is not arbitrary — with N=2 agents and 6 categories, m < 5 puts Γ_h at or below the critical boundary where consensus is indistinguishable from noise. Review more deeply; if 5 findings genuinely cannot be found, the projects may not benefit from cross-review.
- **Forgetting `ack_tasks`**: The broker uses peek-then-ack delivery. Tasks remain in queue until acknowledged. Forgetting to ack causes duplicate processing on the next poll.
- **Forgetting the `from` parameter**: `send_task` requires an explicit `from` field matching your agent ID. Self-sends are rejected.
- **Same-model epistemic correlation**: Two Claude instances share training biases. Temporal ordering ensures they don't read each other's output during review, but their priors are correlated. For genuine epistemic independence, use different model families across instances.
- **Skipping `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.
- **Treating `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.
- **Not reviewing telemetry**: The broker logs all events to JSONL. After a session, review the log to validate QSG assumptions — estimate α empirically (`α ≈ 1 - reject_rate`) and check per-category accept rates.

## Related Skills

- `scaffold-mcp-server` — for building or extending the broker itself
- `implement-a2a-server` — A2A protocol patterns the broker draws from
- `review-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 Code
- `unleash-the-agents` — can be used to analyze the broker itself (battle-tested: 40 agents, 10 hypothesis families)

Related Skills

tidy-project-structure

9
from pjt222/agent-almanac

Organize project files into conventional directories, update stale READMEs, clean configuration drift, and archive deprecated items without changing code logic. Use when files are scattered without clear organization, READMEs are outdated or contain broken examples, configuration files have multiplied across dev/staging/prod, deprecated files remain in the project root, or naming conventions are inconsistent across directories.

setup-gxp-r-project

9
from pjt222/agent-almanac

Set up an R project structure compliant with GxP regulations (21 CFR Part 11, EU Annex 11). Covers validated environments, qualification documentation, change control, and electronic records requirements. Use when starting an R analysis project in a regulated environment (pharma, biotech, medical devices), setting up R for clinical trial analysis, creating a validated computing environment for regulatory submissions, or implementing 21 CFR Part 11 or EU Annex 11 requirements.

review-web-design

9
from pjt222/agent-almanac

Review web design for layout, typography, colour, spacing, responsive behaviour, brand consistency, and visual hierarchy. Covers design principles and improvement recommendations. Use for mockup review before development, implemented site assessment, design review feedback, brand consistency check, or responsive behaviour at breakpoints.

review-ux-ui

9
from pjt222/agent-almanac

Review UX and UI design with Nielsen heuristics, WCAG 2.1 accessibility, keyboard and screen reader audit, user flow analysis, cognitive load assessment, and form usability. Use for usability review before release, WCAG 2.1 audit, user flow evaluation, form review, or heuristic evaluation of an existing interface.

review-software-architecture

9
from pjt222/agent-almanac

Review software architecture for coupling, cohesion, SOLID principles, API design, scalability, and technical debt. Covers system-level evaluation, architecture decision record review, and improvement recommendations. Use when evaluating a proposed architecture before implementation, assessing an existing system for scalability or security, reviewing ADRs, performing a technical debt assessment, or evaluating readiness for significant scale-up.

review-skill-format

9
from pjt222/agent-almanac

Review a SKILL.md file for compliance with the agentskills.io standard. Checks YAML frontmatter fields, required sections, line count limits, procedure step format, and registry synchronization. Use when a new skill needs format validation before merge, an existing skill has been modified and requires re-validation, performing a batch audit of all skills in a domain, or reviewing a contributor's skill submission in a pull request.

review-research

9
from pjt222/agent-almanac

Conduct a peer review of research methodology, experimental design, and manuscript quality. Covers methodology evaluation, statistical appropriateness, reproducibility assessment, bias identification, and constructive feedback. Use when reviewing a manuscript, preprint, or internal research report, evaluating a research proposal or study protocol, assessing evidence quality behind a claim, or reviewing a thesis chapter or dissertation section.

review-pull-request

9
from pjt222/agent-almanac

Review a pull request end-to-end using GitHub CLI. Covers diff analysis, commit history review, CI/CD check verification, severity-leveled feedback (blocking/suggestion/nit/praise), and gh pr review submission. Use when a pull request is assigned for review, performing a self-review before requesting others' input, conducting a second review after feedback is addressed, or auditing a merged PR for post-merge quality assessment.

review-data-analysis

9
from pjt222/agent-almanac

Review a data analysis for quality, correctness, and reproducibility. Covers data quality assessment, assumption checking, model validation, data leakage detection, and reproducibility verification. Use when reviewing a colleague's analysis before publication, validating an ML pipeline before production deployment, auditing a report for regulatory or business decision-making, or performing a second-analyst review in a regulated environment.

review-codebase

9
from pjt222/agent-almanac

Multi-phase deep codebase review with severity ratings and structured output. Covers architecture, security, code quality, and UX/accessibility in a single coordinated pass. Produces a prioritized findings table suitable for direct conversion to GitHub issues via the create-github-issues skill.

polish-claw-project

9
from pjt222/agent-almanac

Contribute to OpenClaw ecosystem projects (OpenClaw, NemoClaw, NanoClaw) through a structured 9-step workflow: target verification, codebase exploration, parallel audit, finding cross-reference, and pull request creation. Emphasizes false positive prevention and project convention adherence.

draft-project-charter

9
from pjt222/agent-almanac

Draft a project charter that defines scope, stakeholders, success criteria, and initial risk register. Covers problem statement, RACI matrix, milestone planning, and scope boundaries for both agile and classic methodologies. Use when kicking off a new project or initiative, formalizing scope after an informal start, aligning stakeholders before detailed planning begins, or transitioning from discovery to active project work.