The learning loop
Ledger to instinct in five stages.
Each gate exists because the naive version fails: raw logs bloat, naive summaries hallucinate, uncorroborated rules mislead.
›Ledger: record everythingEvery tool call lands in an append-only, TTL-bound ledger: args, output, error, duration, denials. Total recall of what happened, cheap to keep, bounded to forget.
›Episodes: shape the storySessions are cut into episodes; shapes like Struggle-Resolved, Reverted and User-Corrected mark where learning lives. Clean runs are skipped.
›Extract: contrast, don't summarizeOne pass per episode pulls contrastive claims: what was tried, what failed, the counterfactual. Ten filters reject vague or duplicate lessons.
›Adjudicate: corroborate or waitClaims stay hypotheses until N-of-M sessions corroborate or contradict them. Nothing is deleted.
›Shadow: prove it before servingCandidates are scored against real queries in shadow first. Only what beats the baseline goes live.