/airas:publish-paperfrom airas
Automates the pipeline from experiment results to a published paper: realizes declared numbers from run outputs, compiles LaTeX locally until green, then pushes for CI verification and artifact delivery.
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.
Needs a main.tex and results with their provenance manifest in a clone. Two stages with two checkpoints: local green (your own check) and CI green (the check outside your hands — only its artifact is the paper of record). A red CI gate loops back to the local stage.
Realize the record from the run outputs. The declarations live
in .research/record.json (created at preregistration);
update_record reads them and .research/results/
itself — numbers cannot be passed in — appends to each run a
result (the platform's execution id and commit, the hash of the
evaluation inputs, the evaluator's report, and the metrics file
verbatim), marks each claim all of whose runs have results as
verified, renders values.tex and
tables/<key>.tex into .research/latex/{template}/ (each
\airasval prints as a hyperlink pinned to the commit that wrote the
record, at the line of record.json that holds the number; table cells
are always <row.run_id>.<column.ref_path>, so
a label cannot be paired with another run's number; a column with
reference: {passage, values} instead shows a published number per
run read from that passage, and with ref_path as well the
measured-minus-published difference, so a prior work's table can sit
beside the runs with the paper as its source), and commits
what it wrote. It does not judge the result: a local verdict
could be pushed past regardless, so the judgement is CI's, on the
pushed commit. This is the only sanctioned way an experimental
number enters the paper; never hand-write a tabular of experimental
numbers. Honor the preregister-paper contract: the
record is append-only, and a claim that missed its criterion is
reported as a negative result, not rewritten.
Run update_record last, after every other change to the
record. The links in values.tex pin the commit that last wrote
record.json, and the gate regenerates values.tex from that
commit — so a render_chart or append_to_record made after
update_record leaves values.tex pointing at a superseded commit
and the gate reports values.tex differs from its regeneration.
The tool is idempotent (a result already recorded is not appended
twice), so re-running it after a late chart or append is the fix.
How the text addresses values (\airasval{<run_id>.<metric.path>},
\airasval{<run_id>.params.<key>}, \unverified{...} for a number no
declaration can produce) and passages (\cite[s1.p2]{key}) is in the
paper_writing prompt (get_prompts). Every \cite key
must be a source in the record (pinned at preregistration, or appended
since with append_to_record(literature=[...])); registered sources
the paper never cites are listed in uncited_sources for you to judge,
not failed. Need an undeclared value? Append the declaration with
append_to_record and re-run — never type the number.
Once the text is settled, run
verify_record with implementation_verifier_model, then
verify_paper_values with citation_verifier_model. The citation model reads every
unjudged passage citation against the passage in its snapshot, writes
the judgments into the record, and then reports what the model found
overstated, clipped or reversed in unsupported_citations — review
those like unverified. An unsupported citation is fixed by
rewriting the sentence, never by judging the same sentence again
until it passes: the gate reads the latest judgment of the text as it
stands, so a re-judgment of unchanged text would launder a false into
a true. Without the models (as CI runs it) a citation
no judgment covers as the text now stands fails the check
(unjudged_citations), so re-run with them after a rewrite — with
both models settled up front (auto-research), not a different
one per run. The implementation model reads each design's code and runs
against its declaration once per state of the three. A design with
no such review fails; the findings do not — read them on the
design's reviews[] (undeclared, unverified, contradiction)
and declare in the record (or change in the code) what should not
have been a silent choice. verify_record's declaration_statuses is the
whole record with the gate's coverage on it: its unverified rows are
what no deterministic check compared, so that is what you read. CI
commits the same, with a link to the record.json line and to the
evidence file of each row, as .research/verification.md on the
default branch.
Bibliography: preregister_record wrote
.research/latex/{template}/references.bib from the record and the
gate regenerates it — never edit it.
Check that it builds: verify_latex with local_path
(working tree; no push). Use it for what a local run can honestly
tell you — whether the document compiles, and page_count,
undefined_citations, undefined_references, missing_figures.
Loop with step 1 until it compiles cleanly; a ? citation and an
absent figure still produce a PDF, so read the fields rather than
the presence of the file.
It also re-runs the record checks, and those are worth reading when something looks wrong — but they are diagnostics, not a verdict. A green local run proves only that the agent's own toolchain agrees with itself. Do not report a paper as verified on this basis, and do not treat a local pass as permission to skip reading the CI run.
Report what CI's verification says, not just that it passed.
Once the gate has run (step 5), read its report rather than the
local one:
a result's declaration_statuses row unverified with the store
unreachable — say so rather than presenting the numbers as
provenance-backed; "other completed runs of the same commit" on that
row — the same code ran more than once, name the run the paper reports;
\unverified{...} occurrences — surface them for human review;
unverified_claims — claims some of whose declared runs have no
results may still be published, but say so honestly in the paper and
to the user. verified: true says the claim's data is in, not that
it held — verdict does, derived from the declared criterion: a
claim that was tested and refuted is a negative result, reported
as such, and claims.tex already says so. Never read the
verified flags alone as support for the hypothesis, and never reword
a claim to fit what the data did.
Even if the user only asked whether the numbers hold up, the answer
comes from CI: the realized files are already committed by
update_record, so push and read the gate. There is no local
shortcut that settles the question.
Commit the main.tex edits and push to the staging ref — not to
the protected branch (git push origin main:verify). The two
required checks, Verify the record and Verify the paper, run
there. Together they are the whole integrity verdict: the record's
checks (recomputation, containment history, provenance cross-check)
in one, and the paper's numbers in the other — values.tex
against its regeneration, declared tables, every \airasval key
declared. Neither builds LaTeX, so they are fast, and a
hand-edited number is caught here, before the sha can land. The
report is uploaded even when red, so a failure is readable rather
than merely reported.
Confirm the gate is green — get_workflow_runs with
branch_name="verify", reading the run whose head_sha is the sha
you pushed (an older green run on the same ref proves nothing about
the new commit) — then
fast-forward the same sha onto the protected branch
(git push origin main:main) — never squash or rebase. Squash and rebase rewrite commits, and verification asks
whether each run's recorded commit is an ancestor of HEAD; after a
rewrite it is not, so the merge that was supposed to publish the
result is what invalidates it. A fast-forward lands the exact sha
CI judged. (prepare_repository disables both merge methods, so
normally the attempt simply fails — do not work around it.)
Landing on the protected branch is what publishes. Publish Paper runs there and nowhere else — every sha on that branch has
already passed the gate, so all that is left is to compile and
upload the PDF with its report. That ordering comes from the
branch rule, not from one workflow waiting on another.
The workflow then commits the PDF it built, byte for byte, as
.research/latex/{template}/paper.pdf on the protected branch —
through the gate like any other commit (scratch ref, both required
checks dispatched on it, fast-forward on green), under the
github-actions[bot] author. So the paper of record is in the
repository, not only in an expiring artifact, and it is never a
PDF built on the agent's machine: do not commit a locally built
PDF, and git pull --ff-only origin main before pushing anything
further, since main has moved by one commit.
Give the user the commit sha, the Publish Paper run URL, and
its artifact (the same bytes as the committed paper.pdf) — that
trio is the citable, re-checkable result. A
red gate is not published: return to the local stage, fix, push
to the staging ref again. A red publish on a green gate is a
rendering failure (a citation, a figure), not an integrity one;
fix it the same way.
Optional, on request — editable export: open_in_overleaf
(pass local_path to export without pushing). Say explicitly that
this copy is outside the verification guarantee: editable,
never read back, not covered by the CI-verified artifact. Each
click creates a new project.
Output: a green verification run whose CI-built PDF and report the user has been handed.
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./npx claudepluginhub airas-org/airas --plugin airasOther plugins' skills for the same job