agentleFS
MinLee0210MinLee0210/paper-orchestra-skills/skills/research-experiment-loop/SKILL.md

research-experiment-loop

Skill0 starsChanged 10 days agoApache-2.0View on GitHub

Run a budgeted, evidence-logged optimization loop against a fixed evaluator: propose one testable idea with rubrics, copy the best program, change it, evaluate it once, verify the rubrics, record what was learned, and decide the next step. Use when a scored task already exists and the user wants to improve a program or method iteratively, run a search campaign, resume one, or report its status and best result. Needs a task from research-task-setup. For open-ended multi-hypothesis projects use research-autoresearch.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    every started call consumes budget, including crashes, timeouts, and interrupted calls.

    line 40
  2. Distinctive:

    no evaluation after the budget is spent.

    line 41
  3. Very specific:

    no evaluation if task.md or evaluate.py in the snapshot changed.

    line 42
  4. Distinctive:

    Check feasibility: Use only inputs and controls the candidate interface actually exposes.

    line 51
  5. Distinctive:

    Decide: keep going, change direction, or stop.

    line 56
  6. Distinctive:

    When the cause is unknown, record it as unknown.

    line 63
  7. Distinctive:

    Never cancel a job you did not start.

    line 73
  8. Distinctive:

    Ask before resuming after a failure whose cause is unknown.

    line 74
  9. Distinctive:

    Search scores are proxies.

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Experiment loop

Optimization by an agent fails in predictable ways: it re-runs a program until the score looks good, edits the evaluator, forgets what already failed, and reports a search score as a result. This loop removes those options. A ledger counts every evaluation, programs are never overwritten, and the task is sealed when the run starts.

idea + rubrics -> clone best -> edit -> evaluate once -> verify rubrics -> log -> decide

Before the first evaluation

  1. The task passes research-task-setup validation, including a scored baseline.
  2. Agree the budget with the user: maximum evaluations, wall time per evaluation, hardware, and rough cost. Evaluations multiplied by wall time is the compute bill; agent tokens grow with the number of cycles. Starting a run spends real money, so get a go-ahead unless the user already gave one.
  3. For expensive or remote hardware, run one cycle as a pilot and report it before committing the rest.

Commands

# Snapshot and seal the task, set the budget
python scripts/loop.py init --task my-task --run runs/r1 --max-evals 20
# Score the baseline; this counts against the budget like any other call
python scripts/loop.py eval --run runs/r1 --program program_0
# Copy the best correct program to the next index, without its results
python scripts/loop.py clone --run runs/r1
# ...edit runs/r1/programs/program_1/src/...
python scripts/loop.py eval --run runs/r1 --program program_1 --note "evenly spaced points"
python scripts/loop.py status --run runs/r1
# Markdown table of every attempt, for the experimental log
python scripts/loop.py export --run runs/r1

The script enforces:

  • one evaluation per program; to try again, clone and edit;
  • every started call consumes budget, including crashes, timeouts, and interrupted calls;
  • no evaluation after the budget is spent;
  • no evaluation if task.md or evaluate.py in the snapshot changed;
  • clones only from program_0 or an already evaluated program.

It does not sandbox anything. Candidate code runs with your permissions.

One cycle

  1. Read the memory (memory.md, conclusions.md, loop.py status). Do not repeat a refuted direction without a stated reason.
  2. Write one idea with a hypothesis, a short implementation plan, and rubrics: at least one metric rubric and one implementation rubric. See references/loop-protocol.md.
  3. Check feasibility. Use only inputs and controls the candidate interface actually exposes. Do not read the evaluator to discover hidden answers.
  4. Clone and edit. Change one thing, fixed configuration. A sweep inside one program is many experiments reported as one.
  5. Evaluate once through the script. Never wrap it in a background process or a shorter timeout than its own.
  6. Verify the rubrics immediately, with one line of evidence each, before any further edit.
  7. Log the result in memory.md, then apply the conclusions update gate.
  8. Decide: keep going, change direction, or stop.

Reading failures

  • correct: false means acceptance was not established. It does not by itself prove a bug or that the idea is wrong.
  • An evaluator error or timeout is an operational failure. It measures nothing about the method and must not enter a comparison.
  • A rubric that was not assessed is not evidence that the method is missing it.
  • When the cause is unknown, record it as unknown. Do not turn a guess into a rule.

Stopping

Stop when the target rubrics pass, the budget is spent, or the remaining ideas no longer justify their cost. Stopping with no improvement over the baseline is a valid outcome: report it as a negative result, with the number of scored and unscored attempts. An unscored attempt is missing evidence, not a measured loss.

Monitoring and resuming

  • State lives in the run directory, so a new session resumes with loop.py status and the memory files.
  • Report changes: new best score, repeated failures, budget consumed.
  • Never cancel a job you did not start. Cancel your own only when asked, or when it is clearly broken and burning compute, and say what happened.
  • Ask before resuming after a failure whose cause is unknown.

Handoff

  • Selected program: the best correct one, or the baseline when nothing beat it.
  • Search scores are proxies. Confirm the winner on the full or held-out evaluation before claiming anything.
  • Next stage: research-ablation-study to find out why it works, then write the log for research-orchestra.

Files

  • scripts/loop.py — run initialization, cloning, budgeted evaluation, status, export.
  • references/loop-protocol.md — idea and rubric formats, memory log, conclusions gate.

Attribution

Adapted from the agent skills and prompts of SakanaAI/AI-Scientist-v3 (create-idea, edit-program, evaluate-program, verify-rubrics, memory-log, run-campaign; commit f8ae47d), Apache-2.0, Copyright 2026 Sakana AI. Changes: merged into one harness-independent skill with a new standard-library ledger script. See NOTICE.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.