1<!-- Author: Simon-Pierre Boucher — simon-pierre.boucher@uqo.ca -->2# Protocol-Guided Autonomous Research with Claude Code34**UQO Working Paper No. 29** — *Scientific Verification, Reproducibility, and the Cost of Delegation: A Controlled Study*56> A controlled, four-arm experiment in which fresh, isolated Claude Code sessions (bare mode, `claude-opus-5-5`) solve bounded scientific tasks under (A) an open instruction, (B) a structured research protocol, (C) the protocol plus controller-enforced executable gates, and (D) the same plus a separate review-and-repair session. Outcomes are scored by deterministic hidden oracles on a separate host. Every number in the paper is regenerated from `runs/state.sqlite`.78## Status9See `reports/phase_status.md` (append-only phase log), `protocol/amendments.csv` and `reports/interventions.csv`. The complete research mandate is `protocol/WP29_FULL_MANDATE.md`.1011## Layout12```13protocol/ mandate, preregistration, contract, treatments (arms/), evaluation plan, screenshot protocol, amendments14research/ corpus of 11 source mandates (hashed), coding, literature matrix + verified BibTeX15configs/ budgets and per-split node/envelope configuration16tasks/ TASK_AUTHORING_SPEC.md, registry.csv, task_cards/, public_bundles/ (hidden oracles live in ~/wp29-oracles/, outside the repo)17src/pgar/ harness: contracts, state (SQLite), events, launcher (ssh + claude --bare), isolation, budgets, runtime_gates (gate program), recovery, scheduler, evaluation, exports, capture, evidence_viewer, cli18evaluators/ public receipt schema + run_validations.py (seeded evaluator validation)19tests/ infrastructure tests (no provider access)20runs/ state.sqlite + per-run directories (raw streams are not committed)21evidence/ screenshot originals (restricted, not committed) and public copies22analysis/ build_analysis_dataset, primary_analysis, robustness, figures, tables23results/ analysis_data (CSV exports), estimates, figures (PDF), tables (LaTeX)24paper/ LaTeX manuscript (UQO template)25reports/ environment/isolation audits, evaluator validation, pilot report, accounting, final review26```2728## Commands (laptop = controller; see Makefile)29```bash30make test # infrastructure tests (state machine, gate, evaluator, bundle hygiene)31make deploy # install the gate program + key file on executor nodes32make probe # sentinel isolation probes on the nodes (tiny live calls)33make smoke-live # 1 task × 4 arms, live34PYTHONPATH=src .venv/bin/python -m pgar.cli assign --split pilot --tasks <ids> --repeats 1 --seed 20235PYTHONPATH=src .venv/bin/python -m pgar.cli run --split pilot --workers 836make analyze && make paper37```38Requirements: Python 3.12 venv (`uv venv .venv --python 3.12 && uv pip install -p .venv/bin/python -e .`), SSH access to the executor nodes, `ANTHROPIC_API_KEY` in `~/wp29/.env` on each node, Claude Code 2.1.314 on the nodes.39