Skip to content
Skills Library
Science & research · Building & coding

write-experiment-code

/write-experiment-code

Produce the experiment code in an AIRAS experiment repository — against the execution contract stated here and the airas-eval input schema, with the environment fixed by lockfile and Dockerfile. Comes before the freeze — the design is settled, the record is not yet written. Use to write, fix, or regenerate experiment code, whether authored directly or via an external code-generation tool.

Repository
airas ↗
Licence
MIT
Last repository change
17.10.2026

Assessment and security

86/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content21 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 17.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Produce the experiment code in an AIRAS experiment repository — against the execution contract stated here and the airas-eval input schema, with the environment fixed by lockfile and Dockerfile. Comes before the freeze — the design is settled, the record is not yet written. Use to write, fix, or regenerate experiment code, whether authored directly or via an external code-generation tool.

Original author description

Produce the experiment code in an AIRAS experiment repository — against the execution contract stated here and the airas-eval input schema, with the environment fixed by lockfile and Dockerfile. Comes before the freeze — the design is settled, the record is not yet written. Use to write, fix, or regenerate experiment code, whether authored directly or via an external code-generation tool.

How it works

SKILL.md has no level-two headings · 79 lines, 690 words

SKILL.md preview
---
name: write-experiment-code
description: Produce the experiment code in an AIRAS experiment repository — against the execution contract stated here and the airas-eval input schema, with the environment fixed by lockfile and Dockerfile. Comes before the freeze — the design is settled, the record is not yet written. Use to write, fix, or regenerate experiment code, whether authored directly or via an external code-generation tool.
---

# Write the experiment code

Needs a clone with the agreed design committed as
`.research/design.json` (the `preregister_record` arguments: run ids,
params, metrics) and the execution platform settled — the platform's reference
under `_shared/references/` states the architecture and environment
constraints the code must satisfy, so read it before writing. The
record may not exist yet: `preregister-paper` freezes it on top of this
code.

However the code is produced — authored here or by an external
code-generation tool — the contract below is what the repository holds
it to; swapping the producer changes nothing else.

This contract is for experiment runs (a claim with `verifier.kind =
seyval`). A claim proved in Lean is written under `lean/` instead, to the
contract in `_shared/references/lean.md`; both kinds start through the same
`make run` and can live in one repository.

1. **Read the contract**: `get_prompts(step="experiment_code")` returns
   it; the runs it binds you to are in `.research/design.json` (in
   `.research/record.json` once frozen) and the eval plan is
   `.research/evaluation.json` — the files you may touch, the fixed CLI shape, the three modes and their
   validation lines, the three files verification reads, how the outputs
   feed airas-eval, and how the environment is pinned. Run ids and
   metric paths come from the record; a claim whose metric the code never
   emits can never be realized. Library docs via `get_library_docs`.
2. **Declare the eval plan first**: `.research/evaluation.json` with the
   task types the design calls for; `make schema` and `make list-tasks`
   read it and say what the prediction files must contain.
3. **Write the code and fix the environment**: the files the contract
   names, `pyproject.toml` pinned, `uv.lock` committed, a Dockerfile that
   builds from the lock alone for the platform reference's target. With
   an upstream implementation, write only what the design's method map
   assigns to you: the glue to the upstream entry points and the steps
   the upstream cannot carry. Never re-implement a step it provides, and
   never modify it (airas #1098).
4. **Prove it runs before handing it over**: `mode=sanity` locally until
   it prints `SANITY_VALIDATION: PASS`, then
   `make validate-inputs RUN_ID=<sanity run id>` to check the
   prediction files against the eval contract without scoring.
   Commit and push.
5. **One sanity run on the platform** (`run-experiments`, steps 2–3; a
   sanity run needs no declaration in the record). A local run proves
   nothing about the target architecture or the model the run will
   talk to. Read what the run read and called: every value it took and
   every upstream function it reached must be covered by the design's
   `params`, and a model server started outside the platform must be
   committed and referenced from the run yaml. `observed.json` in the
   run's outputs holds, per function, every `src/` function and directly
   called upstream function with the values its arguments took, the
   files opened, the hosts reached and the child processes. Fix the code
   or the design and repeat until the sanity run touches nothing
   undeclared.
   Name the settings so the gate can compare them: a run yaml key is
   the `module.Class.method.arg` of the function that consumes the
   value — the upstream's, or a `src/` function's for an own knob
   (seed, workers, timeouts, thresholds) — and the value reaches that
   argument unchanged. So: put the consuming function in an imported
   `src/` module, not the entry module (its functions are recorded as
   `__main__.*`); convert inside the function, not before it (pass
   `seed` to a `make_rng(seed)` that calls `default_rng`; pass the raw
   `sim_timeout` and compute the deadline inside); never declare a
   value derived per call (`seed + i`, a remaining budget) or one that
   varies within a run; keep values JSON-like (scalars, strings, small
   lists, floats written as floats); when two arguments take the same
   value write both keys with a YAML anchor; run child processes as
   imported modules (`python -m src.worker`), not as scripts.
   Then put the upstream / own-code boundary in the hypothesis's
   `notes` in numbers: the upstream calls and loaded files from
   `observed.json`, the `src/` lines that implement method steps, and
   the deviations the map listed.

**Output**: committed, pushed experiment code that passes local sanity,
input validation and one platform sanity run, with `uv.lock` and a
Dockerfile that fix its environment — what `preregister-paper` freezes
on top of.

Versions

The database has no other skills named write-experiment-code.

Database snapshot: 13.11.2026 · package version 353777430739 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 96setup-repository
    Create an AIRAS experiment repository from the template and clone it — the repository that will hold all research state from here on. Use to set up the repository for a research project.
  • 86run-experiments
    Execute committed experiment code on the chosen compute platform (GitHub Actions or Seyval) and bring the outputs back into the repository with provenance. Use to run, monitor, or re-run experiments in an AIRAS experiment repository.
  • 90research-experiment
    Guide experiment design, execution tracking, and result recording for an research hypothesis. Helps set up reproducible environments, plan minimal experiments, track progress against the timebox, and formally record outcomes. Use when starting an experiment for a hypothesis,…
  • 90experiment-bridge
    Implement a research experiment plan as runnable code, configs, metrics and result logging, then perform the requested smoke or pilot runs. Use for experiment implementation, translating a plan into code or completing a plan-to-results workflow.
  • 100paper-results-report
    Use when the user asks to ”write an experiment report”, ”summarize experimental results”, or a post-experiment summary.
  • 100report-research
    Write a complete Numerai experiment report in experiment.md (abstract, methods, results tables, decisions, next steps) and generate/link the standard show_experiment plot(s). Use after running any Numerai research experiments, or when a user asks for a “full report”, “write up”,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.