Claude Code

Run autonomous optimization experiments with the /community-computer:autoresearch skill.

The /community-computer:autoresearch skill turns Claude Code into an autonomous optimization agent. Give it a codebase and a metric, and it will hypothesize changes, measure them, keep what improves the metric, discard what doesn't, and publish every result to the Radicle network — all without manual intervention.

Step 1: Install Community Computer

curl -sSf https://cc.hdh.me/install | sh

This installs the rad-experiment CLI, the Radicle toolchain, and the /community-computer:autoresearch skill for Claude Code.

If you built from source, install the plugin locally from the repo:

claude plugin marketplace add ./
claude plugin install community-computer@community-computer

Step 2: Set up your repo

The skill needs two things in your repo:

Step 3: Run the skill

From Claude Code, type:

/community-computer:autoresearch

The skill will set up worktrees, measure a baseline, and start iterating. It runs autonomously — you can watch it work or come back later. Interrupt any time to get a status report.

Recommended: turn on auto-accept mode

The skill runs a long autonomous loop — hypothesize, edit, build, measure, decide, repeat. With default permissions, Claude Code will interrupt on every edit and every shell command to ask for approval, which defeats the point of an overnight run.

Press Shift+Tab in the Claude Code REPL to cycle into auto-accept edits mode. The footer will show auto-accept edits on. From that point the skill can iterate without prompting you, and the plugin's hooks (guard-edits.sh, auto-publish.sh) run cleanly without interactive stalls.

Press Shift+Tab again to cycle back. Auto-accept is per-session; it resets when you restart Claude Code.

What the skill does

Each iteration follows the same loop:

  1. Hypothesize — pick an optimization idea and edit the candidate worktree.
  2. Build and test — run the repo's build and test commands. If they fail, revert and try something else.
  3. Measure — run rad experiment benchmark to collect metric samples.
  4. Decide — if the metric improved, commit (keep). If not, revert the working tree (discard). Either way, append the result to the session tape.
  5. Update notes — periodically update the session brain doc so future agents can pick up where this one left off.

Keeps chain linearly — each keep builds on the previous one, producing a single branch of incremental improvements. Discards are dead ends that don't advance the chain.

Automatic publishing

You don't need to publish manually. A Stop hook fires when the session ends and publishes every keep and discard as a signed COB on the Radicle network. It also pushes the session branch so peers can fetch the commits. Publishing is idempotent — re-running skips anything already published.

Session state

All state lives under .community-computer/ in your repo root. Add it to .gitignore.

File Purpose
tape.jsonl Append-only tape. One JSON line per run (keep, discard, crash).
brain.md Living brain doc: objective, scope, constraints, what's been tried. A resuming agent reads this first.
ideas.md Backlog of promising optimizations deferred for later.
published.json Idempotency index. Managed by the Stop hook, don't edit.

Resuming a session

Run /community-computer:autoresearch again. If .community-computer/tape.jsonl exists, the skill reads the brain doc, finds the chain tip, recreates the worktree, and continues from where it left off. Works across Claude Code sessions and context compactions.

Learning from prior work

On a fresh session, the skill runs learn-prior-experiments.sh to fetch experiment history from the Radicle network. It finds the best unmerged branch to build on, summarizes past wins and dead ends, and starts from the best available starting point — not from scratch.

Hooks

The skill installs three hooks:

See also