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.
01Ledger — 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.
02Episodes — shape the storySession activity is cut into episodes at todo, intent, and file-disjoint boundaries. Shapes like Struggle-Resolved, Reverted, User-Corrected, and Contradicted mark where learning lives; clean runs and pure exploration are skipped.
03Extract — contrast, don't summarizeOne LLM pass per episode pulls contrastive claims — what was tried, what failed, what the counterfactual is — with grounding and durability attached. Ten automatic reject filters kill vague, ungrounded, or duplicate lessons.
04Adjudicate — corroborate or waitClaims stay invisible hypotheses until N-of-M distinct sessions corroborate them (Beta posterior), or contradict and supersede. Nothing is deleted; history is preserved while the live graph stays trustworthy.
05Shadow — prove it before servingCandidate knowledge runs in shadow mode first: scored against real queries without affecting answers. UNKNOWN is never treated as zero. Only what beats the baseline in shadow gets promoted to live memory.