[ docs · concepts ]
Dreaming & calibration
Memory that is never cleaned becomes a junk drawer. Dreaming is the nightly loop that curates Grist's verified memory — mechanically, in the open — and calibration is its sibling loop for the gate's thresholds.
Dreaming: curation without a curator
There is no human curation queue, and no person approves edits one by one. The policy is mechanical and runs on a schedule. Every change Dreaming makes is a Git commit to the memory repo, authored by the Dreaming identity — so a human doesn't gate the trail, they audit it after the fact, commit by commit.
What the nightly pass does
- Merges near-duplicates. The same lesson learned five times becomes one record, not five competing ones.
- Archives the stale. Records whose decayed score has faded past usefulness leave the active set.
- Supersedes retired traps. A cautionary failure record is retired when a newer verified success proves the trap is gone — old warnings don't haunt fixed code forever.
- Flags contradictions, keeps both. When records disagree, Dreaming marks the conflict instead of silently picking a winner. Both sides stay until evidence settles it.
- Synthesizes patterns. The same failure appearing in three or more records across two or more sessions is distilled into a single, stronger memory — a recurring trap becomes a standing warning.
Failure mining feeds the loop: repeated failure signatures and failed checks are distilled into the cautionary memories that Dreaming then curates, retires, or promotes into patterns.
Records in the restricted tier are never touched — not merged, not archived, not superseded. It is a hard wall, enforced in code and pinned by tests.
Calibration: tuning with an evidence bar
The gate's thresholds are tuned the same way memory is curated: mechanically, and only on evidence. Calibration joins routing decisions to their verified outcomes, then asks whether a threshold deserves to move.
- Evidence first. Nothing is suggested until there are at least 15 joined runs overall and 8 per rung. Below that, the honest answer is "not enough data."
- One bounded step. A single threshold moves by a single small step (0.05) at a time — no sweeping re-tunes, no oscillation.
- Configuration, not weights. Adjustments land as configuration overrides you can read and revert. Calibration never silently updates model weights.
Both loops share one design rule with memory itself: the system learns in the open, in artifacts you can diff — or it doesn't learn at all.