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:

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:

What stays local

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