Skip to content

Repository files navigation

adversarial-review

A Claude Code skill that stress-tests academic manuscripts by launching parallel red-team and blue-team AI agents against opposition papers.

What it does

Given a manuscript and a directory of opposition papers, the pipeline runs 5 phases:

Phase What happens Agents Model
0 Inventory manuscript arguments, cluster opposition papers 2 parallel Sonnet
1 Read paper clusters, extract challenges, merge findings 15-20 parallel readers + merge Sonnet
2 Red team: academic reviewer + practitioner attacker 2 parallel Opus
3 3-round debate (BT defense / RT sharpen) + adjudication 7 sequential Opus
4 Synthesize into actionable final report 1 Opus

Output: a FINAL-REPORT.md with attack-defense matrix, insertable language per section, and prioritized revision roadmap.

Estimated cost: ~$33-36 per full run.

Prerequisites

  • Claude Code CLI with claude -p support
  • Python 3.6+
  • openpyxl (only if using --excel for paper abstracts)

Install

git clone git@github.com:YOUR_USER/adversarial-review.git ~/adversarial-review
bash ~/adversarial-review/install.sh

This creates a symlink from ~/.claude/skills/adversarial-review to the repo, so git pull updates the skill instantly.

Usage

In any Claude Code session:

/adversarial-review manuscript.tex ./papers/

Full syntax:

/adversarial-review <manuscript-path> <papers-dir> [output-dir] [phases] [--excel <path>]
Argument Description
manuscript-path Path to your manuscript (.tex, .md, etc.)
papers-dir Directory containing opposition papers (PDFs)
output-dir Where to write outputs (default: ./adversarial-review-output)
phases Which phases to run: all, 0,1, 2+, 3a-3g, 4 (default: auto-detect)
--excel <path> Excel file with paper abstracts (skips PDF reading in triage)

Phase control

  • Auto-detect (default): skips phases whose outputs already exist
  • Specific: 0,1 runs only phases 0 and 1
  • From: 2+ runs phase 2 through 4
  • Debate sub-phases: 3a=BT R1, 3b=RT R1, 3c=BT R2, 3d=RT R2, 3e=BT R3, 3f=RT R3, 3g=Adjudication

Optional: auto-update

Add to ~/.claude/settings.json to pull the latest version at every session start:

{
  "hooks": {
    "SessionStart": [{
      "command": "cd ~/adversarial-review && git pull --quiet 2>/dev/null || true"
    }]
  }
}

Uninstall

bash ~/adversarial-review/uninstall.sh

How it works

The skill is domain-agnostic — it works with any manuscript in any field. The practitioner red-team agent infers its adversarial persona from the manuscript's content automatically.

All prompts use {{PLACEHOLDER}} template variables filled at runtime by run.sh. The prompts/ directory contains the 13 prompt templates; the prompts/ subdirectory in your output captures the exact filled prompts for reproducibility.

See output-format.md for the full output directory structure.

A/B testing

ab-test.sh runs 12 variants (3 stages x 2 prompt styles x 2 models) for comparing constrained vs. loosened prompts:

./ab-test.sh <source-output-dir> <test-output-dir>

License

MIT

About

Claude Code skill: stress-test academic manuscripts with parallel red-team/blue-team AI agents

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages