Skip to content
Back to skills

Experiment

ASecurity

Runs an eval, A/B, ablation, replay, or benchmark as a preregistered experiment, writing down and committing the hypothesis, the predicted result, the pass bar, the counted sets, controls, n, the exact commit under test, and a stop rule before anything runs, then scoring the result against what was written. Use before running an eval whose result will decide something - "does this prompt change help", "A/B these two versions", "run the evals on this branch", "rerun the replay", "ablate this m...

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 29, 2026
ai-agentsgogit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add JoshuaOliphant/compost --skill experiment --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Experiment?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Experiment
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joshuaoliphant-experiment/badge)](https://www.skillsdirectory.com/skills/joshuaoliphant-experiment)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: experiment
description: Runs an eval, A/B, ablation, replay, or benchmark as a preregistered experiment, writing down and committing the hypothesis, the predicted result, the pass bar, the counted sets, controls, n, the exact commit under test, and a stop rule before anything runs, then scoring the result against what was written. Use before running an eval whose result will decide something - "does this prompt change help", "A/B these two versions", "run the evals on this branch", "rerun the replay", "ablate this mechanism", "is the new version better", "measure whether", "benchmark this" - or when a number is about to justify a merge, a revert, or a claim in a write-up.
---

# Experiment

An eval answers a question only if the answer was fixed before the run. Once the numbers are in, it
is easy to move the bar to where they landed, count a different set, rerun until the noise breaks
your way, or test a commit that isn't the one you mean to ship, and each of those feels like a
fair correction at the time. A preregistration closes all of them: what you expect, what counts,
and what you will do about it, committed before the first run, and the verdict read from that
commit. `compost:diagnose` runs the same loop for a bug; this skill runs it for a measurement. The
why is in [prove it works](../../canon/prove-it-works.md), under Numbers.

The mechanical part lives in `scripts/prereg.py`: `check` refuses an incomplete, unpinned, or
uncommitted preregistration, or one whose prediction lists no basis, and `score` judges a run's results by the bars in the registration
commit, so editing the file afterwards changes nothing.

## Steps

1. **Name the decision first.** Write the question, then what you will do if the answer is yes and
   what you will do if it is no: merge or don't, keep the mechanism or cut it, file a follow-up.
   When no decision hangs on the result, say so and don't run it; a number nobody acts on costs
   money and adds noise to the record. When the user's request has no decision in it, propose one
   and ask.

2. **Pick the instrument and read it.** Prefer a harness that already exists over a new one, and
   read its scorer before you write a bar, so the bar is in the units the scorer prints:
   - `claude plugin eval` cases in compost-evals `evals/plugin-eval/`, run with
     `scripts/run-plugin-eval.sh <checkout> <ref> [model]` (does a skill fire, does its output beat
     the no-plugin arm);
   - `evals/review-recall/run.sh` and `score.py` (does `/compost:review-changes` catch known bugs),
     and its skeptic replay, `replay/run.py` and `replay/bars.py` (the reviewer's output held
     fixed, only the skeptics rerun);
   - the Jev evals, `pytest -m jev` from `plugin/` (labeled cases per tool);
   - this project's own eval cases, cut from its merged changes: `evalcases.py summary` (in
     `${CLAUDE_PLUGIN_ROOT}/scripts/`) gives the admitted count and the last run's solved rate.
     Run each arm into one results file with `evalcases.py run --plugin-dir <checkout> --n <N>
     --arm <name> --ref <subject.ref> --results <file>`; an arm with an instruction change runs
     from a checkout carrying it. `prereg.py score` reads the file: metrics `<arm>_solved_rate`,
     `<arm>_case_solved_rates`, and `<a>_minus_<b>_solved_rate`;
   - an `experiments/<name>/` harness in compost when none of these fits.

   If the scorer leaves a judgement to a reader (a free-text reason sorted by hand, a judge model's
   call), that judgement is part of the instrument: fix its rule now, in the preregistration.

3. **Pin the subject.** Resolve the commit under test to a full 40-character SHA with
   `git rev-parse <branch>` and check it is the head you mean: the branch's current tip, pushed,
   not a local commit that differs from it and not an older run's pin. Each arm names its own SHA
   when the arms are two commits. A short SHA, a branch name, or "main" is not a pin; the run must
   be reproducible from the file alone.

4. **Write the preregistration.** Copy
   [references/prereg-template.toml](references/prereg-template.toml) next to where the results
   will land (in compost-evals, `evals/<harness>/results/<date>-<slug>/prereg.toml`) and fill
   every field:
   - **question, hypothesis, prediction**: the prediction is a number in the scorer's units, with
     the direction you expect.
   - **basis**: the claims the prediction rests on, each with its evidence; step 5 fills it.
   - **decision**: `pass` and `miss`, from step 1.
   - **subject**: the repo and the SHA from step 3.
   - **arms and controls**: what each arm runs, and what tells you the instrument works at all: a
     no-plugin arm, the base commit, clean control cases, a known-good case that must stay good.
     When there is no control, write `"none: <why>"`.
   - **sets**: the members of every set a bar counts, listed by id. "The wrong claims" is not a
     set; ten case ids are. A set defined after the run is the commonest way a bar moves. A bar
     names its set with `set = "<name>"`; `check` refuses a set that isn't listed and `score`
     prints the count out of it. It can't see what the scorer counted, so the scorer must count
     exactly these members: read the list from here, or show in the write-up that its list matches.
   - **n and the noise**: how many runs, and why that many is enough. Read the run-to-run spread
     from earlier results of the same harness; when single cases flip between runs, a bar on one
     run can't tell 7 from 8, so run more or bar on every run (`aggregate = "each"`).
   - **bars**: each a metric the scorer prints, an operator, a value, and how the n runs combine
     (`each`, `mean`, `sum`, `min`, `max`). Every bar must be one a skeptical reader would accept
     as the test of the hypothesis, not one the arm is sure to clear.
   - **scorer**: the exact command that turns a run into those metrics.
   - **stop and budget**: when the experiment ends (after n runs; an errored or rate-limited run is
     rerun once and logged; no extra runs to rescue a miss) and what it may spend.

5. **Check the prediction against what you can read now.** A prediction is a model of the
   subject: a mechanism that moves the number and the inputs it moves on. Each claim in that model
   goes in `[[basis]]` with its evidence, and the evidence is something you read before
   registering, not something you remember:
   - **how the code behaves**: read the path the mechanism runs through and cite it as
     `file:line`. "Each culprit is reverted as soon as the search finds it" is a claim about the
     code, and one read of the revert path settles it.
   - **what the inputs hold**: read the workload, the history, or the cases the run will feed in,
     and cite what shows it. A predicted event that the inputs rule out (a break whose fix lands
     before any check could catch it alone) costs a run to learn otherwise.
   - **the model as a whole**: apply it to a run you already have (the baseline, the control
     arm's last results, a probe) and show it reproduces that run's number within the noise from
     step 4. Read that run's logs for the mechanism too, not only its summary. A model that can't
     reproduce the baseline can't predict the treatment. When no earlier run exists, say so in
     the evidence.

   A claim only the run can settle gets `unchecked:` and the reason in words as its evidence
   (`"unchecked: only the full replay shows the revert timing"`), and the prediction says it rests
   on it. When a check contradicts the prediction, change the prediction, and the
   hypothesis, the decision, or whether to run at all if they rested on it: nothing is registered
   yet, so changing course is free. This step reads code, inputs, and earlier runs only. It runs
   nothing against the subject and reads no bar.

6. **Check and commit before the first run.** Run
   `uv run ${CLAUDE_PLUGIN_ROOT}/scripts/prereg.py check <prereg.toml> --subject-repo <checkout>`,
   fix what it names, commit the file, run check again, and record the registration commit it
   prints: in the commit message that adds the results and in the write-up. Push it when the repo
   has a remote, so the registration has a timestamp someone else can see. Nothing runs before this
   commit exists. Under `compost:implement` or as a worker, post the preregistration and its
   commit as a ruling comment on the issue before running. Any ruling that cites the prediction
   names the basis claims marked unchecked, so a reader sees what it rests on.

7. **Run exactly what you registered.** Same SHA, same n, same command. Anything that departs
   from the file (a run that errored and was rerun, a usage limit that split the run, a case that
   couldn't be prepared) goes in a Deviations list in the write-up, with what it might have done
   to the result. Do not edit the preregistration to match what happened.

8. **Score against the registration.** Have the scorer write a results JSON:
   `{"ref": "<SHA>", "n": <runs>, "metrics": {"<metric>": <number or one value per run>}}`, then run
   `uv run ${CLAUDE_PLUGIN_ROOT}/scripts/prereg.py score <prereg.toml> --registered <commit> --results <results.json>`. It exits 0 on
   PASS, 1 on MISS, 2 when the results don't match the registration (another ref, another n, a
   metric missing), and says so when the file was amended after registration. A 2 is not a
   verdict: fix the run, not the file, and score again.

9. **Report the verdict as the scorer gave it.** Lead the write-up with the verdict line, the
   registration commit, and the subject SHA. A miss is a miss, even by one: say which bar and by
   how much, and which basis claim the run contradicted, if one did. Then the deviations. Anything you noticed after the run that the preregistration did
   not ask (another set that looks better, a subgroup, a different reading of a reason) goes under
   **Exploratory**, labelled as such, and is a hypothesis for the next preregistration, never a
   new verdict on this one.

10. **Act on the decision you wrote down.** Do what `decision.pass` or `decision.miss` says. When
   the user wants to act otherwise, such as merging after a miss, that is their call to make: put
   the override in their words, the bar it overrides, and the reason in the PR body or on the
   issue. Never restate the result so the override looks like a pass.

## Before you call it done

- Every basis claim cites what was read for it before registration, or says `unchecked:` and
  why, and every ruling that cites the prediction names the unchecked ones.
- `prereg.py check` passed on the committed file before the first run, and the write-up names
  the registration commit.
- The subject SHA in the results equals the registered one.
- `prereg.py score` produced the verdict line the write-up leads with.
- Deviations and Exploratory are separate sections, and neither changes the verdict.

## Next moves

- `compost:diagnose` when the result is a surprise you can't explain, or a run fails in a way
  that looks like a bug in the harness rather than the subject.
- `compost:fan-out` when the experiment is a comparison of several designs at once.
- `compost:spec` or `compost:slice` when the decision is to build something.
- `compost:verify` or `compost:finish` when the experiment was the proof a PR was waiting on.
- `compost:experiment` again for any Exploratory finding worth a verdict.

Files in this skill

  • SKILL.md8.5 KB
  • references/prereg-template.toml1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.