inference¶
mode: subagent — runs after the SACC data vector and its covariance are
assembled and reviewed.
What it does¶
Runs Firecrown + CosmoSIS inference on the session's SACC by filling a typed InferenceSpec — it does not hand-author any config. The loop:
draft_inference_specreads the SACC and writes a skeleton spec with the structure filled and the value choices left asTODOslots.- The agent fills those slots via
update_inference_spec(a deterministic deep-merge) — choosing priors, IA model, external likelihoods, sampler — guided by thecosmosis-standard-libraryskill. validate_inference_specchecks the spec against the schema and the SACC and promotes it toinference_spec.json.- The human spec gate: the agent emits
SPEC_READY:and stops;@cosmotronpresents the parameterisation and waits for your approval (default-on — see below). - On approval,
compile_inferencecompiles the config and runs the deterministic dry-run gate; on aPASSverdict,run_inferencelaunches the CosmoSIS chain as a background job, confirms it's alive, then pauses for convergence rather than blocking the session.
Tools-only, never writes Firecrown/CosmoSIS config text by hand. The model picks the
choices in the spec; the compiler owns all syntax (firecrown YAML, values.ini,
pipeline.ini) — the same "model picks a choice, the tool owns the syntax" pattern used
throughout. See Writing TASK.md for the ## inference priors: /
## inference sampler: / ## inference scale cuts: / ## inference gate: sections that
seed the draft.
The spec gate is default-on. The run pauses for your approval of the spec before
anything compiles or launches. Add ## inference gate: skip (or set the session-wide
skip_gates) to proceed unattended — validation and the dry-run still run, and a dry-run
FAIL still stops the run. The legacy text-driven build_cosmosis_inference /
run_inference path still works but is superseded by the spec path.
Remote chains. run_inference runs the CosmoSIS chain on a cluster when
the session pins inference remote (a ## remote: block or site:path
data) — the agent's submit → confirm-alive → summarise flow is identical; the
job just runs over Slurm. See Remote execution.