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.
In this repository20 other files it gives its agents.
- llms.txtllms.txt
- research-ablation-studySkill
- research-autoresearchSkill
- research-concept-figureSkill
- research-conference-talksSkill
- research-content-refinementSkill
- research-evaluationSkill
- research-evidence-auditSkill
- research-experimental-designSkill
- research-ideationSkill
- research-inputsSkill
- research-literature-reviewSkill
- research-orchestraSkill
- research-outlineSkill
- research-plottingSkill
- research-section-writingSkill
- research-statistical-powerSkill
- research-systems-paper-writingSkill
- research-task-setupSkill
- research-templateSkill
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
- Distinctive: line 40
every started call consumes budget, including crashes, timeouts, and interrupted calls.
- Distinctive: line 41
no evaluation after the budget is spent.
- Very specific: line 42
no evaluation if task.md or evaluate.py in the snapshot changed.
- Distinctive: line 51
Check feasibility: Use only inputs and controls the candidate interface actually exposes.
- Distinctive: line 56
Decide: keep going, change direction, or stop.
- Distinctive: line 63
When the cause is unknown, record it as unknown.
- Distinctive: line 73
Never cancel a job you did not start.
- Distinctive: line 74
Ask before resuming after a failure whose cause is unknown.
- Distinctive: line 79
Search scores are proxies.
≈ “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.
Files
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 -> decideBefore the first evaluation
- The task passes
research-task-setupvalidation, including a scored baseline. - 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.
- 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/r1The 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.mdorevaluate.pyin the snapshot changed; - clones only from
program_0or an already evaluated program.
It does not sandbox anything. Candidate code runs with your permissions.
One cycle
- Read the memory (
memory.md,conclusions.md,loop.py status). Do not repeat a refuted direction without a stated reason. - 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. - Check feasibility. Use only inputs and controls the candidate interface actually exposes. Do not read the evaluator to discover hidden answers.
- Clone and edit. Change one thing, fixed configuration. A sweep inside one program is many experiments reported as one.
- Evaluate once through the script. Never wrap it in a background process or a shorter timeout than its own.
- Verify the rubrics immediately, with one line of evidence each, before any further edit.
- Log the result in
memory.md, then apply the conclusions update gate. - Decide: keep going, change direction, or stop.
Reading failures
correct: falsemeans 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 statusand 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-studyto find out why it works, then write the log forresearch-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.
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
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.

