A runtime for bounded experimentation under structured rebuttal.
Autoresearch-style loop:
edit → run → keep/discard
PRAE:
propose → rebut → audit → execute → audit → keep/revert/revise/branch/escalate
Same mutable surface. Same budget. Same metric. Different search discipline.
A minimal experiment loop can search effectively. PRAE adds explicit rebuttal before execution and explicit audit before and after execution, to test whether that extra discipline improves search under the same constraints.
PRAE adds these steps to the same loop:
- Propose: generate a bounded change
- Rebut: challenge it before it runs
- Pre-audit: verify the change is worth the budget
- Execute: run it under the same constraints
- Post-audit: evaluate whether the result is real
- Verdict: keep, revert, revise, branch, or escalate
Pre-audit catches wasted budget. Post-audit catches narrative laundering — the tendency to interpret noise as signal. Together they reduce the surface area for self-deception.
keep/discard is binary. PRAE's vocabulary (keep, revert, revise, branch, escalate) lets the loop express uncertainty, preserve alternatives, and ask for help. revise means "tighten and re-propose." branch means "this is interesting but not better — save it." escalate means "I don't know — human, look at this."
# Install PRAE
pip install -e .
# Dry run (no API key needed — uses stub LLM responses)
python -m prae.loop run --objective examples/autoresearch/objective.yaml --mode prae --dry-run
python -m prae.loop run --objective examples/autoresearch/objective.yaml --mode baseline --dry-runTo run against a real target:
# 1. Set up your target repo (must be a git repo with a train.py on main)
cd /path/to/your/target-repo
git init && git add train.py && git commit -m "initial"
# 2. Copy and edit the objective to point at your target
cp examples/autoresearch/objective.yaml my_objective.yaml
# Edit my_objective.yaml: set repo_path, run_command, metric_regex, etc.
# 3. Run
export OPENAI_API_KEY=sk-...
python -m prae.loop run --objective my_objective.yaml --mode baseline
python -m prae.loop run --objective my_objective.yaml --mode praePRAE creates a prae/work branch from baseline_ref in your target repo. All mutations happen there. Your main branch is never touched.
- A target repo with a
train.py - A
run_commandthat prints a metric to stdout - An
objective.yamldefining the contract
For v1, train.py is the only mutable surface. Everything else is immutable.
loop.py — the runtime
objective.yaml — the human control point
ledger.jsonl — the record of every cycle
Everything else is support.
prae/
loop.py — main runtime loop (baseline + prae modes)
llm.py — LLM integration (OpenAI-compatible)
executor.py — run target under budget
git_ops.py — git rollback and lineage
ledger.py — JSONL ledger read/write
objective.py — load and validate objective.yaml
prompts.py — prompt templates for each phase
examples/
autoresearch/
objective.yaml
train.py — example mutable target
docs/
design.md — deeper architecture and philosophy
tests/
v1 proving ground: a small neural net training loop (train.py), minimizing loss, 5 iterations, 120s budget per iteration.
| Baseline | PRAE | |
|---|---|---|
| Iterations used | — | — |
| Final metric | — | — |
| Proposals rejected pre-execution | n/a | — |
| Verdicts: keep / revert / revise | — / — / n/a | — / — / — |
Table will be filled after the first real benchmark run. Both modes run against the same target, same budget, same metric — the only variable is loop structure.
To reproduce:
export OPENAI_API_KEY=sk-...
python -m prae.loop run --objective examples/autoresearch/objective.yaml --mode baseline
python -m prae.loop run --objective examples/autoresearch/objective.yaml --mode praePRAE's proving-ground approach — point an LLM at a training script, run it, parse a metric, keep or discard — is directly inspired by Andrej Karpathy's autoresearch. PRAE wraps that same loop with structured rebuttal and double audit to test whether structured rebuttal and double audit improve search under the same constraints.
The deeper intellectual foundation comes from ARRC's reasoning lineage — the idea that structured adversarial reasoning makes AI systems more reliable. PRAE is a separate repo because it tests a different thesis: that these ideas work as a runtime loop, not just a reasoning framework.
MIT