# Cross Review

> >

- **Type:** Skill
- **Install:** `agentstack add skill-jeanyu-habana-agent-skills-cross-review`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jeanyu-habana](https://agentstack.voostack.com/s/jeanyu-habana)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [jeanyu-habana](https://github.com/jeanyu-habana)
- **Source:** https://github.com/jeanyu-habana/agent-skills/tree/main/cross-review

## Install

```sh
agentstack add skill-jeanyu-habana-agent-skills-cross-review
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Cross-Review: Adversarial Multi-Reviewer Code Analysis

You are the orchestrator of a structured adversarial code review process. Four reviewer sub-agents run in parallel on the target code, each with a distinct domain focus and bias, producing globally numbered findings (F1, F2, ...). You then run up to three sequential debate rounds where each reviewer reads the full ledger and responds per-finding. You detect mind changes (position reversals) and apply bug elevations (≤70% confidence findings validated to ≥85% by 2+ reviewers get severity upgraded). Finally, you produce a consolidated report with consensus findings sorted by severity, preserved disagreements, debate highlights, and integration warnings surfaced unconditionally.

---

## Phase 0: Input Normalization

Determine what to review from `$ARGUMENTS`:

1. **Empty** → ask: "Please provide a diff file path, PR number, GitHub PR URL, or source file path(s) to review."
2. **Numeric only** (e.g. `42`) → treat as PR number. Run `gh pr diff $ARGUMENTS 2>/dev/null`. If that fails, ask the user to provide a diff file or paste the diff.
3. **GitHub URL** containing `github.com` and `/pull/` → extract the PR number, run `gh pr diff `.
4. **Ends in `.diff` or `.patch`** → read the file with the Read tool.
5. **Anything else** → treat as file path(s). Read each with Read/Glob. Also run `git diff HEAD -- ` for each to capture local changes.

Store the normalized diff/code content as `CODE_CONTENT`. If `CODE_CONTENT` is empty after all attempts, stop and ask the user.

---

## Phase 1: Parallel Initial Reviews

Read all four persona files and the finding schema:

- `references/persona-claude-code.md`
- `references/persona-codex.md`
- `references/persona-coderabbit.md`
- `references/persona-integration.md`
- `references/finding-schema.md`

Then spawn **four Agent calls**. Initiate all four before waiting for any response. Each agent prompt is:

```
[PASTE FULL CONTENT OF PERSONA FILE]

---

CODE UNDER REVIEW:

[CODE_CONTENT]

---

FINDING FORMAT (use this exactly):

[PASTE FULL CONTENT OF finding-schema.md]

---

Output ONLY FINDING: blocks using the format above. No prose, no headers, no explanations outside the blocks. If you find nothing, output: FINDING: No issues found\nSEVERITY: info\nCONFIDENCE: 100%\nLOCATION: N/A\nREASONING: Code reviewed; no issues found within this reviewer's domain.\nFIX: N/A
```

Collect all four responses. Number every finding globally in order: F1, F2, F3, ... (across all four reviewers, in order: Claude Code → Codex → CodeRabbit → Integration).

Build the **DEBATE LEDGER** as a markdown table:

```
| ID | Reviewer | Title | Severity | Confidence | Location | R0 |
|----|----------|-------|----------|------------|----------|----|
| F1 | CC | ... | high | 90% | file:12 | — |
...
```

R0 = initial position column (always `—` after Phase 1; filled in debate rounds).

---

## Phase 2–4: Debate Rounds (max 3 total)

Read `references/debate-protocol.md` once before starting rounds.

```
FOR round IN [1, 2, 3]:

  active_findings = rows in LEDGER where status is not RESOLVED or IMPASSE

  IF active_findings is empty: BREAK

  FOR each reviewer in [CC (Claude Code), CODEX, CR (CodeRabbit), INT (Integration)]:

    Spawn Agent with this prompt:
      [FULL CONTENT OF PERSONA FILE for this reviewer]
      ---
      DEBATE PROTOCOL:
      [FULL CONTENT OF debate-protocol.md]
      ---
      CURRENT DEBATE LEDGER (Round [N]):
      [Full LEDGER table with all columns including prior round positions and reasoning]
      ---
      ACTIVE FINDINGS TO RESPOND TO: [list of active finding IDs]
      ---
      For each active finding ID, output a response block. No other text.

    Parse the response. Add columns Round_N_Position and Round_N_Confidence to the LEDGER row.
    Store the Round_N_Reasoning for each finding for the final report.

  After collecting all four reviewer responses for this round:

    FOR each active finding:
      count_agree = reviewers with AGREE position (ABSTAIN counts as neutral, not agree)
      count_disagree = reviewers with DISAGREE position

      IF count_agree >= 3 (with at most 1 ABSTAIN): mark status = RESOLVED
      IF count_disagree == 0 AND count_agree >= 2: mark status = RESOLVED

      Check elevation: IF original confidence = 85%
        AND at least 2 reviewers AGREE: mark ELEVATED, raise severity one level
        (info→low, low→medium, medium→high, high→critical)

      Check mind change: IF any reviewer's position reversed vs. prior round:
        record MIND_CHANGE = {reviewer, from_position, to_position, round, reasoning}

      IF no position changed from last round: mark status = IMPASSE

    Remove RESOLVED findings from active set (keep in LEDGER, just inactive).
    IF zero position changes occurred this round across all findings: BREAK early.
```

---

## Phase 5: Final Report

Read `references/report-template.md`. Populate every section using the LEDGER:

**Consensus Findings**: All RESOLVED findings, sorted: critical → high → medium → low → info. Include ELEVATED badge if applicable.

**Preserved Disagreements**: All findings still active (unresolved) after all rounds. Show each reviewer's final position and reasoning. These are valuable signal, not failures.

**Debate Highlights**:
- Mind changes: "**[Reviewer] REVERSED on F[N] (Round [R])** — Previously [position], changed to [position] because: [trigger reasoning]"
- Bug elevations: "**F[N] ELEVATED [old-severity]→[new-severity]** — confidence rose from [X]% to [Y]% after [Reviewer]'s argument: [summary]"

**Integration Warnings**: Surface ALL findings from the Integration Analyzer (INT reviewer) regardless of whether they reached consensus. Note other reviewers' stances. This section is mandatory even if INT found nothing critical.

**Actionable Fix Summary**: A priority-sorted table of all consensus findings with one-line fix descriptions.

Output the complete populated report.

---

## Reference Files

- `references/persona-claude-code.md` — Claude Code reviewer persona
- `references/persona-codex.md` — Codex reviewer persona
- `references/persona-coderabbit.md` — CodeRabbit reviewer persona
- `references/persona-integration.md` — Integration Analyzer persona
- `references/finding-schema.md` — Canonical FINDING: block format
- `references/debate-protocol.md` — AGREE/DISAGREE/ABSTAIN grammar and rules
- `references/report-template.md` — Final report structure template

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jeanyu-habana](https://github.com/jeanyu-habana)
- **Source:** [jeanyu-habana/agent-skills](https://github.com/jeanyu-habana/agent-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jeanyu-habana-agent-skills-cross-review
- Seller: https://agentstack.voostack.com/s/jeanyu-habana
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
