Pi
Run pi-autoresearch sessions and auto-publish to Community Computer.
pi-autoresearch
is a skill for the pi coding agent that runs
autonomous optimization loops — try an idea, measure it, keep what
works, discard what doesn't, repeat. Every run is appended to an
autoresearch.jsonl file in your working directory.
Community Computer can import that file directly. The
pi-cc extension watches
autoresearch.jsonl and publishes new experiments as signed
Radicle COBs automatically. You can still trigger publishing manually if
you want, but the normal flow is hands-off.
Step 1: Install
curl -sSf https://cc.hdh.me/install | sh
The installer sets up the Radicle toolchain and rad-experiment,
then asks whether you want pi, Claude Code, or both. Choose pi
to install pi, pi-autoresearch, and the
pi-cc extension.
Step 2: Run pi-autoresearch
cd my-project
pi autoresearch
Each attempt is appended to autoresearch.jsonl in the
working directory.
Step 3: Let auto-publish do its work
The pi-cc extension watches the tape and runs
rad experiment publish autoresearch.jsonl automatically
when new results appear. If the repo is not on Radicle yet, the extension
can help bootstrap setup on first publish by prompting to:
- create a Radicle identity with
rad auth - initialize the repo with
rad init - start the local node with
rad node start
Step 4: Optional preview / manual publish
Auto-publish is the normal path, but the raw CLI still works if you want to inspect or re-run publishing yourself:
rad experiment publish autoresearch.jsonl --dry-run
rad experiment publish autoresearch.jsonl
What gets published
Both keeps and discards are published.
Keeps show what worked; discards show what was tried and didn't work
— both are useful signal for anyone exploring the optimization
space. Crashes and checks_failed results are skipped.
Each published experiment carries:
- Primary metric — name, unit, and direction
from the jsonl config header.
bench_cmdand the per-metric regex are filled in bypi-ccfrom pi's fixed conventions (bash autoresearch.shand theMETRIC name=valueline shape). - Secondary metrics — every key in the result's
metricsobject. - Description — the hypothesis from the jsonl.
- ASI annotations — free-form diagnostics (hypothesis, rollback reasons, profiling notes) rendered on the experiment detail page.
- Benchmark script hash — SHA-256 of
autoresearch.shat the candidate commit. - Source tag —
agentSystem = "pi-autoresearch"on every COB.
What stays local
autoresearch.md— pi-autoresearch's living session doc (objective, what's been tried, dead ends).autoresearch.shand anyautoresearch.checks.sh— the benchmark and check scripts.- The working tree and anything the bench script produces on disk.
- Crashes and
checks_failedresults — not published as COBs. .community-computer/published.json— the idempotency index the publisher maintains next to the jsonl.
How the mapping works
The jsonl file is organized into segments. Each segment starts
with a type: "config" header that declares the metric name,
unit, and direction. The first result after a header is the segment
baseline.
Experiments are chained: the first keep's base is the segment baseline; every subsequent keep's base is the previous keep. This produces a linear trajectory that the frontend displays as a single branch. Discards branch off the chain but don't advance it — the next keep builds on the previous keep, not on the discard.
baseline(A) → keep(B) → keep(D) → keep(E) ← branch trajectory
↘
discard(C) ← dead end
After publishing, a session branch
refs/heads/experiments/<slug> is pushed to Radicle,
pointing at the chain tip. This is what the frontend uses to group all
experiments under one branch.
Re-running is safe
After each publish, a (base, head, cob_id) entry is
appended to .community-computer/published.json. Re-running the
extension or the raw CLI skips anything already published. Safe to run
after every session, safe to schedule as a cron job. To force a full
re-publish, delete the index file.
Flags
| Flag | Purpose |
|---|---|
| <path> | Path to the jsonl file (positional argument). |
| --dry-run | Parse and print what would be published, without touching the network. |
| --index <path> | Override the idempotency index path. Default: <jsonl_parent>/.community-computer/published.json. |
See also
- pi-autoresearch on GitHub
- Getting Started — install and first experiment
- CLI reference