ASTRA
The open specification every Lightcone project is written in.
ASTRA, the Agentic Schema for Transparent Research Analysis, is an open specification for describing
a research analysis in one YAML file, astra.yaml. Your code says how the analysis runs; astra.yaml
says what it is: its inputs and outputs, the methodological choices behind them, and the evidence for
those choices. Anyone who picks up the work, an agent or a person, can read it without reading the
code.
ASTRA doesn't depend on any tool. It has its own documentation, schema and releases at astra-spec.org; this page covers what you need to use it with the Lightcone Stack.
What an analysis records
An ASTRA record is a graph: each element is a node, and the fields that name other elements are its edges. Here is a slice of one, an example from Price-Whelan & Bonaca (2018), Off the beaten path: Gaia reveals GD-1 stars outside of the main stream:
Inputs feed the outputs that list them, and one output can feed another. Each decision parameterizes the outputs whose recipes use it, and an option can cite the prior insight that backs it; the filled options are each decision's default. A finding cites the outputs that support it.
Each element type in full:
| Element | What you record |
|---|---|
| Inputs | The datasets, files and upstream analyses you use |
| Outputs | The metrics, figures, tables and other artifacts you intend to produce |
| Recipes | The command that produces each output from its declared inputs and choices |
| Decisions | Methodological choices, their alternatives, and the reasons for them |
| Prior insights | Existing knowledge, with its evidence, that informs the approach |
| Findings | Claims supported by the analysis's outputs |
Decisions
Results depend on choices, such as which data to include or which prior to assume. In most research code those choices sit in scattered scripts and in people's heads. In ASTRA each one is a decision: it lists the options you considered, records why the choice matters, and names the default. An output lists the decisions it depends on, and its recipe receives the chosen option:
outputs:
- id: fit_params
type: table
format: csv
description: Slope, intercept and scatter for the fitted relation.
inputs: [catalog_data]
decisions: [fit_method]
recipe:
command: >-
python src/fit_period_luminosity.py
--catalog {inputs.catalog_data}
--method {decisions.fit_method}
--out {output}
decisions:
fit_method:
label: Fitting method
rationale: The fitting method determines how outliers influence the inferred relation.
default: ordinary_least_squares
options:
ordinary_least_squares:
label: Ordinary least squares
robust_linear:
label: Robust linear fitAn option can also list the prior insights that back it.
Prior insights
A prior insight records something the analysis takes from the literature: a claim, and the evidence for it. Each piece of evidence cites a paper by its DOI and quotes the exact sentence the claim rests on, with its page. In the example from Price-Whelan & Bonaca (2018), one of the Milky Way potential options rests on this insight from Bovy (2015):
prior_insights:
mwpotential2014_composition:
id: mwpotential2014_composition
claim: >-
galpy's MWPotential2014 is a three-component Milky Way model: a power-law bulge,
a Miyamoto–Nagai disk and an NFW dark-matter halo, fit to dynamical data.
created_at: '2026-09-10T13:30:00Z'
evidence:
- id: ev2
doi: "10.1088/0067-0049/216/2/29"
quote:
exact: >-
The galpy.potential module also contains a model MWPotential2014 for the
Milky Way’s gravitational potential that is designed to provide a simple,
easy-to-use model in cases where a realistic model for the Milky Way is
required.
location:
page: 7The astra command can check each quote against its paper: a quote that
isn't in the paper fails validation.
What the analysis concludes goes into findings, which have the same shape as prior insights but cite the analysis's own outputs as their evidence, such as a figure or a table of results.
How the stack uses it
- Agent Skills: the
astraskill teaches your agent the format, so it writes and revisesastra.yamlwith you. A hook validates the file each time the agent saves it. - Lightcone CLI:
lcexecutes the recipes. Each output thatlcruns needs aformat, arecipe, and itsinputsanddecisionsdeclared; its file lands inresults/, next to a manifest that records how it was made. - MySTRA: the report refers to outputs, decisions and values by their path in
astra.yaml, rather than copying them. - Lightcone Lab: the workbench shows the analysis as an inventory and a pipeline.
Keep the version: field that lc init writes: it is the version of the ASTRA schema, separate from
the version of any tool.
The astra command
astra-tools provides the astra command, which
validates and inspects a specification. Install it with uv, at the version the current Lightcone CLI
expects:
uv tool install astra-tools@0.2.18Then run it from your project directory:
astra validate
astra infoWith no file name, validate checks every specification file in the project.
To check the quotes in your evidence, add each cited paper to astra's local cache, then validate
with --verify-evidence:
astra paper add 10.1088/0067-0049/216/2/29 --pdf bovy2015.pdf
astra validate astra.yaml --verify-evidenceWithout --pdf, paper add downloads the paper itself: arXiv DOIs straight from arXiv, and other
DOIs from an open-access copy when one exists. Publisher DOIs often have none, as for Bovy (2015)
above, so download the PDF yourself and register it with --pdf. Evidence that cites the analysis's
own outputs is skipped until those outputs exist.
The agent plugin runs astra with its own pinned version, so you only need to install it to check
things yourself.
Learn more
- Getting started with ASTRA: the format on its own, without Lightcone.
- Specification reference: every element and field.
- CLI reference: validation, inspection and paper tools.
