Session Write
Let an AI fill in an analysis template without letting it touch the science. Governed parameter-fill: the AI fills ONLY the typed parameter slots of a frozen template, and validate is the deterministic gate that asserts the frozen structure was untouched and every fill satisfies its slot contract — bounded, validated, reproducible AI authoring, not free-form code generation. author builds Quarto (.qmd) or Jupyter (.ipynb) templates from structured cells (the writer owns the document layout and binds each param at its declared type) for R or Python; init wires an R project to record its work. The guarantee: what the AI can change is exactly the typed slots and nothing else — the template is the contract.
Resources
session-write 2026.07.03.1 — Governed dataset input contracts
The input-side counterpart to the existing swamp.returns output gate: declare
what a dataset must be, and have it checked and sealed at fill time.
Features
- Schema-level input contracts —
requires_columns(a,b)on adatasetslot declares required columns, now checked against the file's actual header atvalidate(previously deferred to execute and never run). - Format-aware sealing — dataset files are classified (
csv/xlsx/binary); non-CSV files (plates, multi-sheet Excel) are sealed by hash without fabricating columns. New optionalformat:slot gate catches a renamed CSV posing as.xlsx(and vice versa). - Multi-dataset templates —
column/formulaslots resolve theirofdataset and validate against that file's columns (e.g.meta+data), not a merged list. Anofnaming no dataset slot is flagged. dataset_globslot — point a slot at a directory of same-schema files (file-per-sample); optionalglob: "*.csv"filter. Each file is format/column-checked and sealed as its own pin.- New
pinmethod — fingerprints dataset (and glob) files and recordsswamp.datapinssovalidatedetects drift. Writes atomically; optionaltemplatePath+forcerefuse to seal a tampered/invalid fill. - Authoring —
authorRoundTripnow emitsdataset_glob/format/globslots.
Fixes & hardening
- Quote-aware CSV header parsing (embedded commas no longer split a column).
- Plain-YAML (targets-style) config fills are sealed without being wrapped in
---frontmatter. - A dataset that passes the path gate but is unreadable now fails validation instead of being silently swallowed.
Modified 1 models
updated labels
Modified 1 models
repoDir auto-resolves (explicit --input repoDir → SWAMP_REPO_DIR env → cwd) so the SWAMP_REPO_DIR= on-ramp form bakes the correct control-plane path into swamp.qmd; add resolveRepoDir unit test; surface the R-project on-ramp in description/labels.
Modified 1 models. updated labels
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned