/airas:preregister-paperfrom airas
Writes a preregistration LaTeX paper (main.tex) from existing hypothesis and experimental design, before any pilot or full run. Results and Discussion remain stubs with \airasval placeholders until experiments complete.
Ships in airas. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You write the paper before the pilot and full runs, from the hypothesis and experimental design. The experiment code and its platform sanity run come first, so the freeze commit contains the code the design was written against; sanity outputs are never imported and are not evidence. The commit that adds this paper is the preregistration record: every claim, criterion and expected result is frozen in git history before any result exists, so nothing can be quietly rewritten to fit the data later. Pilot and full runs are expected to descend from this commit.
main.tex lives in .research/latex/{template}/, where {template} is
one of the bundled template directories (iclr2024, mdpi,
agents4science_2025) — the name the verification tools address the
paper by. The directory is only a slot: use the bundled style or your
own preamble, keeping the usual structure (title, abstract, numbered
sections, figures, bibliography). Write in the user's working
language; a CJK paper needs a LuaTeX preamble (luatexja-fontspec —
pdflatex silently drops non-Latin text from the PDF), and with the mdpi
class also \RequirePackage{luatex85} before \documentclass (drop its
pdftex option), since the class uses pdfTeX primitives LuaTeX no longer
has. This skill only changes when the paper is written and how Results
are stated.
.research/design.json
— the exact literature and hypotheses arguments of
preregister_record, committed by hypothesize-and-design — or are
supplied by the user. The design must fix the run ids (e.g.
proposed, baseline) and the metrics; if it does not, settle those
with the user first, because the placeholders below are named after
them..research/sources/<id>/ CI fetched it into, and the passages (page
and verbatim quote) picked while reading. Nothing is in the record yet.write-experiment-code): everything that run read and called is
covered by the design's params.Create the canonical record with preregister_record, passing
the literature and the hypotheses from .research/design.json
together, and delete that draft in the same commit so the record is
the only copy. This writes
.research/record.json — the machine-readable original the whole
verification system keys on — and pins each source from what CI
fetched: title, authors and text come from .research/sources/<id>/,
never from you, and every quote is checked against that snapshot.
literature entries are a fetched paper or AIRAS study by its id
({"source_id": "s3"}; one whose text could not be fetched cannot be
cited), or code — the code a paper ships too, as a source of its own —
as repositories alone, given the next free id (each url, a full
40-hex commit, files — a directory snapshots every text file under
it, so give the whole package a design's repository_integration runs
— and method_entry, the module.Class.method whose call runs the
method), each with
passages: [{"node_type": ..., "quote": "<verbatim>"}].
A quote that the snapshot does not contain (line breaks, hyphenation
and ligatures are normalised away; a paraphrase or a quote spanning
two pages is not) makes the call fail and roll back, so nothing is
frozen until every quote is found — and CI runs the same check on
the pushed commit.
Passages are numbered p1, p2, … within each source. The record is a tree, read as
"to support this hypothesis, these claims; to verify this claim,
these designs; a design is these runs":
hypotheses: [{
"id": "h1", "statement": "the hypothesis, in prose",
"quoted_passage_ids": ["s1.p2", ...],
"assumptions": ["what must be granted for the claims together to
imply h1, naming the claims concerned", ...],
"claims": [{
"id": "c1", "statement": "one assertive sentence",
"rationale": "why c1 holding is evidence for h1, and for which part",
"quoted_passage_ids": ["s1.p2", ...],
"verifier": {"kind": "seyval"},
"criterion": {"metric": "accuracy", "subject": "proposed-...",
"reference": "comparative-1-...", "op": ">=",
"margin": 0.02},
"prediction": {"low": 0.02, "high": 0.04, "basis": "prior work (s1.p2)"},
"designs": [{
"id": "d1", "summary": "...",
"repository_integration": { // when the design runs a source's code
"repository_id": "s2.r1",
"arguments": ["pkg.Runner.__init__.n_basis", "pkg.Runner.__init__.seed"],
"extension_points": ["pkg.Model"]},
"runs": [{"run_id": "proposed-...", "description": "...",
"params": {"mode": "full", "pkg.Runner.__init__.n_basis": 20,
"pkg.Runner.__init__.seed": 0}}]
}]
}],
"tables": [...], "notes": [...]
}]
notes (free text on the hypothesis) holds what the fields above
cannot: the gap in prose, why each margin and interval was chosen, the
compute target, and how many design ⇄ sanity rounds preceded the
freeze and what each changed. It is frozen with
the record and is where a fresh session reads the design rationale
from.
quoted_passage_ids (on hypotheses, claims and designs, and on
a criterion whose reference is a constant
read from a paper) name those passages as s1.p2 — the prior work's
own words the declaration rests on. The gate refuses a passage no
source declares.
run_id names the results directory the run will produce and must be
unique across the record — a run belongs to exactly one claim, and
results for an undeclared run_id fail verification. params declares
every condition that can change a result: the dispatch conditions
(mode) and the values the run's config fixes (iterations,
temperature, model, context window, timeouts, …) — every key of
config/config.yaml ⊕ config/run/<run_id>.yaml, not a subset.
Declaring them is what makes "we said full and ran pilot" and "we
said 20 iterations and ran 5" detectable later — the gate compares
them with the committed config and with what the platform recorded.
criterion is the falsification line, required for every seyval
claim: (subject.metric - reference) op margin, where subject is a
run under the claim and reference is a run of the record (this
claim's or another claim's, on the same metric) or a constant. The
verdict — supported or refuted — is derived from it once the runs are
in, and it is frozen with the claim: moving the margin later fails
the gate like rewording the statement. prediction is the interval
the difference is expected to land in, required, a range never a
point, with where it comes from. Whether the claim was declared
before its runs executed is not modelled yet (TODO). A second
hypothesis is a second entry in hypotheses.
A claim proved in Lean has "verifier": {"kind": "lean", "toolchain": ..., "mathlib_rev": ..., "allowed_axioms": [...]} — the toolchain and
mathlib revision are the repository's lean/lean-toolchain and
lean/lake-manifest.json — and no criterion or prediction; its run's
params are {"module": ..., "decl": ..., "statement": ...}, the
statement being what #check @decl prints. The statement is what gets
frozen: the proof is written afterwards, and a built declaration whose
type differs from it is inconclusive. See _shared/references/lean.md.
The claims are meant to imply the hypothesis together: c1 ∧ … ∧ cn
⇒ h1. rationale (required on every claim) says why the claim is a
member of that set — which part of the hypothesis it carries and why
its holding is evidence for it. assumptions (on the hypothesis)
say what has to be granted for the conjunction to reach h1: that the
metric stands for the property, that the datasets run generalise,
that the baseline is representative, and so on, each naming the
claims it concerns. These are exactly what every claim being
supported still leaves unverified, so state them as assumptions, not
as findings; an assumption that can be turned into a measurement is
a missing claim.
The tool also writes claims.tex — the numbered claim list with each
criterion, prediction and (pending) verdict — and references.bib
next to main.tex, and commits them with the record and the source
snapshots as the one freeze commit.
Write .research/latex/{template}/main.tex against
get_prompts(step="paper_writing"). It states the rules the gate
holds the paper to (the hypothesis, claims, bibkeys and passages are
in record.json and claims.tex): the frozen part written in
full now and the post-experiment part left as stubs behind the marker
comment, \input{claims.tex} for the hypothesis and predictions,
\airasval for every experimental number (none appears before the
marker), \cite[s1.p2]{key} for a sentence resting on a passage, the
fallback preamble that compiles without values.tex, and the LuaTeX
notes for a CJK paper.
Compile until green — this is a freeze condition, not a
courtesy check. Run verify_latex with local_path and iterate
until ok; any \airasval rendering as ??airasval:key?? is the
correct prereg state, not an error. A paper that does not
compile must not be frozen: post-experiment "fixes to make it
compile" open an editing channel where narrative changes can hide.
The local build is only the fast feedback loop — the local
toolchain is in the agent's hands, so its PDF proves nothing. The
official prereg PDF is the CI artifact: once the freeze commit
passes Verify Record on the staging ref and is fast-forwarded onto
the protected branch, Publish Paper builds it there, where the
agent cannot interfere, and that artifact is what a human
reviews at freeze time (are the criteria reasonable? are the
intervals narrow enough to miss? are the claims falsifiable?) and
what a reader compares the final paper against.
Commit main.tex and push. preregister_record already committed
record.json and returned the freeze_commit sha — that commit is the
freeze point. Commit the prereg main.tex on top, push, and tell the
user the freeze sha — later verification argues from runs being
descendants of it.
Once committed, the record only ever grows: every later revision
must contain the committed one whole, so the verifier fails on a
reworded claim, a changed run condition, a reordered list or a
dropped result alike — it does not have to enumerate what may change. The
legitimate revision path is append_to_record: append an entry with
the same id, and the later one becomes the live version while the
earlier stays readable in place. To retire an entry with no
replacement, append it again with "withdrawn": true. A claim becomes
verified when every run under it has results — the data it rests
on is in. verified does not say the claim held, and (for now) not
that it was declared before its runs executed; both are TODO. Once
results
exist, the legitimate diff to main.tex is what the results force
(values realized, negative results discussed) — a compiling freeze
keeps that diff small enough to review. A sanity run does not
surface everything (rare failures appear only at scale), so an
append with the same id before the pilot or full run is the normal
path, not a failure of the freeze.
Results and Discussion are written now, in the stub region; the same
get_prompts(step="paper_writing") states the rules for this stage. Do not edit the claims to fit the
results. The honest paths are:
append_to_record under its hypothesis, and presented
as exploratory. Dispatch its confirmation run after the append is
committed; the record cannot yet tell a preregistered claim from a
post-hoc one, so the discipline is yours.update_record (it reads
record.json and the run outputs itself, and commits what it wrote;
the verdict on it comes from CI, not from the tool); if you need a
number you did not declare, append the declaration with
append_to_record — never type it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/analyze-resultsRead imported experiment results, author the analysis, and produce the figures (verifiable charts and method diagrams). Use to analyze experiment outputs or make the paper's figures./auto-researchEnd-to-end automated research with the AIRAS integrity flow — the paper is preregistered (claims, criteria and expected results frozen in git, on top of the experiment code) before any pilot or full run, and every reported number is realized and verified from run outputs afterwards. This skill holds only the ordering and the rules that span steps; each step's contract lives in its own skill. Use when the user wants to run an AIRAS research project start to finish, or asks where in the flow they are or what comes next./hypothesize-and-designRead the fetched papers in .research/sources/, then author a falsifiable research hypothesis and an experimental design that fixes run ids, metrics, models, datasets and the compute environment. Use to create or rework a hypothesis and its experimental design./publish-paperTake a frozen AIRAS paper from experiment results to the paper of record — realize every stated number from declared values, compile and verify locally until green, then push and let CI re-run the verification, handing the user the CI-built PDF artifact and report. Use after experiments to fill, check, and publish the paper, or just to check whether the numbers hold up (stop before pushing)./run-experimentsExecute 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./search-papersSearch for literature or fetch specific papers by arXiv ID or DOI through the repository's CI into .research/sources/. Use to bring literature on a topic to hand; reading and distilling it happens in hypothesize-and-design, which returns here whenever it needs more.npx claudepluginhub airas-org/airas --plugin airasOther plugins' skills for the same job