A three-tier data journalism system that uses multi-LLM adversarial debate to produce rigorous, well-sourced longform writing.
| Tier | Location | Purpose |
|---|---|---|
| Research | articles/<slug>/research/ |
Sources, raw data, claims inventory, bias log. Ground truth for every factual claim. |
| Essay | articles/<slug>/essay/ |
Longform Quarto narrative. Depth-first, unapologetic. |
| Interactive | articles/<slug>/interactive/ |
Observable Framework entry point. Evidence-first, engaging. |
Three LLM agents critique each draft in parallel, then a synthesizer revises:
- Research Advocate — defends factual accuracy, flags every unverified claim
- Narrative Advocate — defends clarity and reader engagement
- Adversary — attacks logical fallacies, unsupported causation, selection bias
Debate runs for up to N rounds until critiques converge (all agents report no major issues).
# 1. Install Python dependencies
uv sync
# 2. Configure credentials
cp .env.example .env
# Edit .env with your OpenRouter and Anthropic API keys
# 3. Start a new article
bash scripts/new-article.sh my-article-slug
# 4. Write your draft, then run the debate
uv run scripts/run-debate.py my-article-slug --max-rounds 3adversarial-writing/
├── adversarial/ # Debate system (Python package)
│ ├── prompts/ # Agent system prompts (edit to tune behavior)
│ ├── agents.py # Agent + persona definitions
│ ├── debate.py # Orchestration loop
│ ├── llm.py # OpenRouter + Anthropic abstraction
│ └── models.py # Pydantic state models
├── articles/
│ ├── _template/ # Copy this to create a new article
│ └── <slug>/ # One folder per article
└── scripts/
├── new-article.sh # Scaffold a new article
├── run-debate.py # Run the adversarial debate
└── validate-claims.py # Check claims.yaml integrity
Each agent has a configurable persona that shapes its tone and emphasis. Edit articles/<slug>/debate-config.yaml to assign different personas or models per article.
- Python 3.12+ with uv
- OpenRouter API key (for adversary + advocate models)
- Anthropic API key (for synthesizer + Claude Code orchestration)
- Quarto for essay rendering
- Node.js + Observable Framework for interactive layer