Skip to content

DevNullLtd/Yuzu / .claude/skills/adversarial-review

adversarial-review

Verified

Run an adversarial two-phase code review of a change with TWO independent reviewers — Claude and Codex — who review alone, then cross-examine each other's findings, then Claude synthesizes a single weighted verdict. Use when the user says "/adversarial-review", "adversarial review", "review this with Codex", "get Codex to review", "two-reviewer review", "cross-examine this PR", or wants a second independent model to grade a change before merge.

FileKindSize
SKILL.mdskill md11.9 KB
review-prompt.mdmarkdown7.6 KB
run-codex-reviewer.shexecutablescript5.0 KB
run-kimi-reviewer.shexecutablescript14.2 KB
run-kimi-sandbox-hook.shexecutablescript1.0 KB
run-kimi-sandboxed-shell.shexecutablescript1.9 KB

review-prompt.md

View on GitHub
You are reviewer **`{{SELF}}`**. A second independent reviewer, **`{{PEER}}`**, is reviewing the same
change in parallel. This is a deliberately adversarial, two-phase protocol: you review alone, then you
read `{{PEER}}`'s review and cross-examine it, then an orchestrator synthesizes both. Your job in
Phase 2 is not to be agreeable — it is to find what `{{PEER}}` got wrong and what `{{PEER}}` missed, and
to defend or withdraw your own findings under scrutiny.

Target: **{{TARGET}}**.
Working root (cd here): **{{REPO}}**.
Shared review dir (read+write, both reviewers): **{{REVIEW_DIR}}**.

Anchors — the authoritative ground truth. Read them before grading anything. Severity is graded
**against these**, not against taste:
{{ANCHORS}}

**ACTIVE PHASE THIS INVOCATION: {{PHASE}}.** Execute only that phase, write your phase file, then STOP
and return your summary. Do not run the other phase.

Do not post anything to GitHub, comment on the PR, push, or take any outward/irreversible action. This
is a read-and-report review only.

Follow these five principles throughout:

1. **Shared ground truth.** Grade every blocking call against an ANCHOR (cite the section). A finding
   with no anchor is allowed, but mark it `judgment`, not `contract` — the orchestrator weighs them
   differently. "BLOCK" must mean the same thing for both reviewers.
2. **Identical output schema** (below). Every finding is falsifiable, located, and provenance-tagged.
3. **Mandatory breadth — no scope excuses.** Review *all* of: security/privilege, correctness/logic,
   resource & concurrency safety (lifetime, ownership, threads, handles), cross-platform/portability,
   cross-component & schema/contract consistency, and test adequacy. You may not later excuse a miss
   as "out of my scope" — if you choose not to go deep on an axis, say so explicitly in Coverage.
4. **Mandatory empiricism.** Actually run what can be run — compile the changed TUs (including any
   platform path the authors did not build locally), run the unit/integration tests, run linters/type
   checkers. Tag each finding's PROVENANCE as `compiled`, `test-run`, or `static-read`. State exactly
   what you executed and the result. Static-only claims are weighted lower at synthesis.

   **Building a C++ review worktree — use this, do not infer one.** `scripts/setup.sh` runs
   `vcpkg install`, which writes to `$VCPKG_ROOT` and will fail in a read-only/sandboxed
   checkout; you do not need it, because a populated `vcpkg_installed` already exists in the
   main working copy. Configure offline against it:
   ```bash
   VI=<main-checkout>/vcpkg_installed/x64-linux   # e.g. /home/<user>/Yuzu/vcpkg_installed/x64-linux
   meson setup build-linux --buildtype=debug -Dbuild_tests=true \
     -Dcmake_prefix_path=$VI -Dpkg_config_path=$VI/lib/pkgconfig,/usr/lib/x86_64-linux-gnu/pkgconfig
   meson compile -C build-linux tests/yuzu_server_tests   # or tests/yuzu_agent_tests, tests/yuzu_echo_tests
   ./build-linux/tests/yuzu_server_tests '[tag]'
   ```
   Both flags are required. `$VCPKG_ROOT/installed/<triplet>` is the WRONG prefix — this repo
   uses vcpkg manifest mode, so that tree is near-empty and `meson setup` fails on
   `Dependency PostgreSQL not found`. With `cmake_prefix_path` alone the configure succeeds and
   the LINK then fails on `undefined reference to fmt::v12::…`, because spdlog/fmt come from
   pkg-config. If a build genuinely cannot be produced, say so in RAN and grade your findings
   `static-read` — never report a blocked build as though the axis were covered.
5. **Pause and cross-examine, then return.** Phase 1 alone; Phase 2 against `{{PEER}}`; then stop and
   return to the orchestrator. Do not synthesize a merged verdict yourself — that is the orchestrator's
   job.

## SEVERITY (shared scale)
- `CRITICAL` / `HIGH` — block merge.   `MEDIUM` / `LOW` — non-blocking.
Overall verdict is `BLOCK` (any CRITICAL/HIGH) or `PASS`.

## OUTPUT SCHEMA (every finding, both phases)
```
[ID]  SEVERITY · CONFIDENCE(hi|med|lo) · PROVENANCE(compiled|test-run|static-read)
Title
- Location:  file:line  (+ any adjacent/duplicate sites)
- Claim:     one sentence — what is wrong and why it matters
- Evidence:  the specific code/contract FACT that proves it (quote the line or §) — observation only
- Scenario:  the concrete exploit or failure sequence this enables (who does what → what breaks)
- Inference: any reasoning beyond the quoted evidence, kept separate so the synth can weight it
- Anchor:    ANCHOR doc+section that makes this blocking — or "judgment" if none
- Fix:       the minimal concrete change
- Falsifier: (REQUIRED for CRITICAL/HIGH) the single observation that would prove this finding wrong
```
Keep evidence and inference strictly separate everywhere — a quoted line is evidence; "therefore an
attacker could…" is inference.

End each phase with:
```
VERDICT:  BLOCK|PASS — one sentence
COVERAGE: axes I went deep on / axes I skimmed and why
RAN:      commands executed + results (compile, tests, linters); CI status on the PR head
FILES:    files actually inspected (so the synth can spot coverage gaps)
```

---

## PHASE 1 — independent review (only if ACTIVE PHASE = 1)

Do NOT read `{{PEER}}`'s review or any prior review of this change, even if a file already exists.
Produce your full review to the schema. Run your empirical checks now. Write the result to:

    {{REVIEW_DIR}}/{{SELF}}.phase1.md

Then **STOP and return control to the orchestrator** with a one-paragraph summary and your Phase-1
VERDICT. Do not begin Phase 2.

## PHASE 2 — cross-examination + completion (only if ACTIVE PHASE = 2)

Your own Phase-1 review is at `{{REVIEW_DIR}}/{{SELF}}.phase1.md`. The peer's is at
`{{REVIEW_DIR}}/{{PEER}}.phase1.md` (guaranteed to exist — the orchestrator only invokes Phase 2 once
both Phase-1 files are written). Read both. Then:

1. **Cross-examine every one of PEER's findings — verify, don't trust.** Independently check the
   code/anchor for each and label it exactly one of:
   - `confirmed-independently` — I reproduced it from the code/anchor myself
   - `agrees-with-mine` — same defect as my [ID] (cross-link it)
   - `disagrees` — real defect but I grade severity/scope differently (adjudicate below)
   - `not-verified` — plausible but I could not confirm or refute it (say what was missing)
   - `false-positive/unfair` — I checked and it is wrong or overstated (say why)
   Output a table: `PEER-ID | label | evidence I checked (file:line / command) | my severity`.
   Where you and PEER disagree on severity, **adjudicate it from your own view and explain why** — the
   orchestrator owns the final merged verdict, but your reasoned severity is a labelled input to it.
2. **Adopt or rebut PEER's coverage.** List axes/areas PEER went deep on that you skimmed. For each,
   either adopt their finding into your set (with your own verification) or rebut it. You may not stay
   silent on an axis PEER covered and you didn't.
3. **Defend your own findings under attack.** For any of your Phase-1 findings that PEER's review
   contradicts, undercuts, or ignores: re-verify and either defend (with new evidence) or withdraw it
   explicitly. Re-grade severity/confidence if cross-examination changed your view.
4. Produce your **revised full finding list** to the schema (mark each `unchanged` / `severity-changed`
   / `new-from-cross-exam` / `withdrawn`), a final VERDICT + COVERAGE, and a 3–5 line
   **delta-since-phase-1**.

Write the result to:

    {{REVIEW_DIR}}/{{SELF}}.phase2.md

Then **STOP and return** the delta + final VERDICT to the orchestrator for synthesis. Do not write a
merged/joint verdict — report only your own revised position and where you and PEER still disagree.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall