Repository navigation
feat(cognition): unified experience stream — one being learns from everything it does AND is told (3 axes, #116) - #2024
Merged
Conversation
…SAME stream as an eval episode (#116) The self-improving-memory spine (Joel, 2026-07-26): "It's got to be both and they shouldn't be so separate from one another... if the being is different we're losing something. It's no longer first class." Today the being learns from two separate worlds — the eval-curriculum flywheel (ExperienceRecord::from_eval) here, the recorder→dataset path there. That separation is the failure: a lived chat turn and an exam task are the SAME being acting in different contexts, so they must be ONE experience stream. ExperienceRecord::from_lived_turn(stimulus, settled) closes that gap. A lived turn becomes a first-class record in the same shape as an eval episode — the full untruncated answer, the act→observe world-state, the effort count — so the salience/curriculum machinery works over BOTH sources without a fork. The lived-vs-eval difference is honestly encoded in the DATA, not in the machinery: - No ground-truth `test` (a lived turn has no objective grader), so the synthetic EvalTask carries only the stimulus as its prompt. salient_teach_set already gates remediation on test.is_some(), so a lived episode can NEVER become a grade-driven teach task it never earned — it flows to the EXPANSION synthesizer (outlier B), the next source the module doc already named. The objective-remediation loop stays uncorrupted; the being still grows from lived experience. - `ok` means "settled without an infra fault" (SettleOutcome.inference_error), NOT "correct" — the same honesty the eval path applies (an inference hiccup is never a capability miss). Capability-shaped lived salience (STRUGGLE via acts-near-budget, REPETITION via the spin detector) is the named next detector — a real proxy, not faked here (fallbacks-are-illegal-fail-loud). Test: from_lived_turn_joins_the_stream_but_never_the_remediation_set — a lived turn joins the stream with its full trajectory, a cleanly-settled turn is ok / an infra-faulted turn is not, and NEITHER can reach remediation curriculum (no test to validate against). One being, one stream; the grade-driven loop stays clean. 4/4 cognition::experience green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…nce is the honest struggle signal (#116) Slice 2 of the unification. A lived turn has no objective grader, so what makes one SALIENT (worth learning from)? The wrong answer is a struggle THRESHOLD (acts >= 6) — a magic number that drifts (audit-for-clamps). The right answer is already in the outcome: NON-CONVERGENCE. When the drive-loop runs out its action budget mid-Act and never reaches a verdict, SettleOutcome.decision is still Act — the exact "did not finish" the eval grader already recognizes. A structural fact of the outcome, not a tuned constant. from_lived_turn now sets ok = "settled cleanly" = converged (reached Speak/Pass/Raise) AND no inference fault. So two magic-number-free signals make a lived turn not-ok: - infra fault (inference_error) — same honesty the eval path applies - non-convergence (final decision is Act) — the honest lived struggle signal The win is compression: ErrorSalience selects these lived episodes with NO new detector. The DATA honestly carries the gap; one detector reads it. No StruggleSalience with a threshold — richer proxies (REPETITION via the spin brick, graded lived quality) stay the named frontier, real signals not faked. Test extended: a non-converged lived turn (decision Act, budget exhausted) is not-ok, its grade names "did not converge" (not a threshold), ErrorSalience selects it — and it STILL can't reach remediation curriculum (no test). 4/4 cognition::experience green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ience stream (from_shared_lesson + ReceivedSalience) Convergence with BigMama's memory/share (#2025, merged): the being learns from everything it DOES (lived + eval) AND everything it's TOLD (received). Her producer lane hands a lesson into a recipient's memory; this consumer lane lifts it into the same experience stream — one being, three axes. - ExperienceSource {Eval, Lived, Received} — the stream made self-describing. Provenance is now an explicit tag on the record, not implicit in the presence of a `test`. One record type, one origin axis, N detectors keying on it (compression). - ExperienceRecord::from_shared_lesson(record: &MemoryRecord) — lifts a shared engram (memory_type="shared", context.shared_by, source="shared:<from>") into the stream. ok=true (received knowledge, not a failure); the lesson content is the teaching material; shared_by named in the grade. Consumes the EXISTING MemoryRecord type, so it is fully decoupled from #2025's command — producer and consumer never block each other. - ReceivedSalience — provenance IS the signal. Fires iff source==Received; no proxy, no threshold, no faked number (someone deliberately CHOSE to teach it). Complementary to ErrorSalience, not a replacement: a composite running both selects lived+eval failures AND received lessons in one pass — the whole being's curriculum from all three axes. The safety guarantee holds for the third axis too: a received lesson has no ground-truth test, so the same salient_teach_set test.is_some() gate routes it to EXPANSION, never grade-driven remediation. The objective benchmark loop stays uncorrupted across all three sources. This is the falsifiable spine: unify everything the being experiences, and the grade-driven loop is never the thing that pays for it. Test: from_shared_lesson_is_the_third_axis_received_salience_never_remediation — a shared lesson enters tagged Received, ReceivedSalience selects it while ErrorSalience stays silent (and vice-versa on an eval failure), and it can't reach remediation. 5/5 cognition::experience + 3/3 genome::curriculum green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… from all three axes in one pass (#116) The selection primitive the dream consolidation reads to close the being loop. A single sweep over the unified experience stream (lived + eval + received) must select everything worth learning from, whatever its origin — one detector, one pass. AnySalience::all_axes() composes ErrorSalience (lived + eval failures) with ReceivedSalience (taught lessons); salient iff ANY constituent fires, priority order (Error names the kind over Received on a record that is both). Polymorphic and open — a later StruggleSalience / SurpriseSalience joins the composite without touching any caller; the detector list IS the extension point. Empty composite = never salient (honest degenerate case). This is the afferent selection layer completed: gather the stream, run all_axes() once, get the full teach set. The efferent tail (dream consolidation → curriculum → the existing train→eval→page-in flywheel #98, gated on benchmark lift) is next — and it closes the loop: a persona that measurably gets smarter from everything it does AND is told, benchmark-proven. Test: any_salience_selects_the_whole_being_curriculum_in_one_pass — an eval failure (Error), a received lesson (Received), a passed eval dropped, empty-composite degenerate. 6/6 cognition::experience green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ate that makes untestable lessons safe (#116) The complement of salient_teach_set. One salient sweep of the unified stream splits into TWO efferent organs, exhaustively and disjointly: - salient_teach_set (remediation): salient + testable → the test-validated teacher (built). - expansion_teach_set (expansion): salient + UNtestable → the benchmark-validated teacher. Why expansion is now safe to build (the CurriculumSynthesizer doc deliberately deferred it): it was blocked on a missing per-TRAJECTORY validation — "an unvalidated lesson is the confident-garbage the measurement spine forbids." Joel's spine supplies a different, sufficient signal: validate per-CONSOLIDATION, by whole-being benchmark lift (humane-snapshot #59, page-in only if score >= prior). Untestable lived turns and received lessons CAN drive training because the gate measures the whole being afterward and rejects anything that didn't lift. That is exactly "must improve benchmarks, never degrade" as a mechanism, not a hope. This completes the afferent+routing layer of the being-loop: gather the unified stream → AnySalience::all_axes() selects → remediation/expansion partition routes each to its teacher. The efferent tail (the expansion synthesizer + the train->eval->page-in gate) is where my cognition lane meets BigMama's serving lane — coordinating that seam next, not racing it. Test: remediation_and_expansion_partition_the_salient_stream_exhaustively — a testable failure routes to remediation, an untestable lived turn AND received lesson route to expansion, a pass to neither; partitions are complementary and exhaustive over the salient set. 7/7 green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…y reaches the genome (#116) The first piece of the being-loop's efferent half, and it needs ZERO new serving code (BigMama cleared the seam: genome/job-create is already dataset-source-agnostic, teacher resolved via her catalog's PlacementPlanner). expansion_examples turns salient UNtestable episodes into SFT {messages} examples for the SAME dataset->train->eval->page-in flywheel the remediation path feeds — validated per-CONSOLIDATION by whole-being benchmark lift (#59), which is what makes untestable material safe (never per-trajectory). Today it builds the RECEIVED axis directly: a shared lesson's content is deliberately-authored TRUE knowledge (not a synthesized guess), so it becomes a teaching pair with no LLM teacher — instilling into the GENOME what memory/share (#2025) wrote into the corpus. That is the telepathy->weights step: a lesson BigMama learns becomes M5's trained-in capability, not just a retrieved note. The whole cross-agent loop now has a path all the way to weights: BigMama learns -> memory/share -> from_shared_lesson (Received) -> expansion_teach_set -> expansion_examples -> dataset -> genome/job-create -> train -> eval-lift-gate -> page-in. The LIVED axis (generalize a non-converged trajectory) is skipped on purpose — without a known-correct answer it needs an LLM teacher to avoid confident garbage; named as the enrichment path (outlier B of this outlier B), never faked with a low-quality template (fallbacks-are-illegal-fail-loud). Empty in -> empty out. Test: expansion_examples_teaches_received_lessons_and_skips_lived — a received lesson becomes a real {messages} pair (content as the assistant turn, topic-framed), a lived non-convergence is skipped, an empty lesson dropped. 5/5 curriculum + experience green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… the LIVE training flywheel (#116) The received axis now goes LIVE: a lesson another agent teaches (memory/share #2025) enters the exact same producer flywheel a live turn uses. produce_received mirrors produce — submits a TrainingExample to genome/training-trigger/submit through the persona's identity-bearing Connection; the trigger buckets by trait, stamps the trait's MEASURING gym as evalSet, and auto-fires genome/job-create at the threshold. Zero new serving code, exactly as BigMama's seam answer promised (job-create source-agnostic + catalog teacher-resolution). Compression: extracted submit_plan — the shared submit tail both producers call. One submit path, N experience sources; produce (live turn) and produce_received (received lesson) differ only in the provenance label. produce is deduped into it. The honest nuance (ReceivedSalience made concrete at the producer): plan_received has NO MIN_TRAINING_QUALITY gate — a deliberately-shared lesson's salience is its PROVENANCE, not a chat-interaction score built for (stimulus→reply) turns; a terse-but-important lesson must not be filtered by the wrong heuristic. It STILL classifies the domain, so the lesson buckets into the gym that measures its trait — the L3 sentinel adopts the auto-produced gene only if it lifts the benchmark (#59), and refuses unmeasurable traits (fallbacks-are-illegal-fail-loud). The received-axis loop is now wired end to end: BigMama learns → memory/share → from_shared_lesson(Received) → [dream reads corpus] → produce_received → training-trigger → job-create → train → eval-lift-gate → page-in. Remaining to fire it: the caller that reads shared lessons from the corpus and calls produce_received (the dream tick / an explicit command) — the last wire. Test: received_lesson_skips_chat_quality_gate_but_stays_classified — a terse shared lesson still plans (quality=1.0, no gate) and stays domain-classified for a measuring gym. 3/3 training_producer green (produce dedup intact). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…-loop is LIVE-invokable (#116) The received axis now RUNS end to end. memory/consolidate reads a persona's SHARED lessons (memory_type="shared", written by memory/share #2025) from its durable corpus and submits each into the SAME training flywheel a live turn uses — telepathy reaching weights, by hand: continuum memory/consolidate --persona-id <peer> --base-model <base> The full received-axis loop, now firable: BigMama learns → memory/share → [corpus] → memory/consolidate → from_shared_lesson → plan_received → build_submit_params → genome/training-trigger/submit → buckets → gym-gated evalSet → auto genome/job-create → train → humane-snapshot lift (#59) → page-in. Zero new serving code (BigMama's seam answer held): reuses the data/list corpus read (the hydrate pattern, filtered server-side to memory_type="shared") and the producer's build_submit_params/plan_received — extracted build_submit_params as the ONE wire-payload contract so the synchronous command produces byte-identical params to the fire-and-forget producers. Dispatches AS the persona (LocalPersona identity gates the Privileged submit), synchronously, so the receipt {shared_lessons, consolidated} is truthful, not a promise. Explicit-command-first discipline: this lets us RUN and MEASURE a lesson becoming weights before wiring the autonomic dream tick (which calls the same core, resolving base_model from the serving snapshot). Registered in the DynCommand registry beside memory/remember + share; ts-rs bindings generated. Compiles clean; 3/3 training_producer green after the extraction. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… autonomic tick possible (#116) Recon into DreamConsolidationRegion showed it holds only a PersonaReflectionSource — no corpus/executor/serving access — so wiring received-lesson consolidation into the dream tick means expanding a BrainRegion's deps (concurrency STOP-doc territory) AND solving idempotence over an append-only corpus. That autonomic-tick wiring is the deliberate next pass; this lands the one thing it CANNOT work without, cleanly and testably: idempotence. memory/consolidate re-submitted EVERY shared lesson every run — a repeating tick would re-train the same lessons forever, wasting training compute (the lift-gate would reject the redundant genes, but the compute is spent). Fix: a watermark handshake, the standard idempotence mechanism, with zero corpus mutation: - since_timestamp param: consolidate only lessons strictly AFTER it (rfc3339, lexicographic). - latest_consolidated_ts in the receipt: the newest timestamp actually consolidated this run. The stateful caller (the autonomic tick) persists latest_consolidated_ts and passes it back as the next since_timestamp — so each lesson is consolidated exactly once. The explicit command is now also re-run-safe (a second run past the watermark honestly reports 0 new lessons). shared_lessons now counts in-scope candidates (post-watermark, non-empty), not the raw row count, so the receipt is truthful about what this run actually had to work with. is_after_watermark is pure + unit-tested (watermark_admits_only_strictly_newer_lessons): no watermark admits all (first run); a watermark admits only strictly-newer, excludes at/before. 12/12 green (watermark test + regenerated ts-rs bindings). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ence-stream # Conflicts: # core/continuum-core/src/commands/memory/mod.rs
joelteply
added a commit
that referenced
this pull request
Jul 29, 2026
… that proves AND improves Reframe (Joel): benchmarks are the learning signal, not just the scoreboard. A graded task == a training example; the benchmark engine is the data generator at the head of a continuous-learning loop. Prove (charts) and improve (train on failures) are the SAME pass. Connects the merged benchmark suite + unified experience stream (#2024) + stall-expansion (#2033) to cross-grid distribution, sentinel experiential plasticity, and AttnRes skip paths (the stable 'unet skip for generalization'). 5 gaps: cross-grid matrix, failure->curriculum emit, dream-forge consumes eval-fails, held-out + stochastic-depth generalization, honest-instrument discipline. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The spine (Joel, 2026-07-26)
The being must be the same first-class being whether it lives, takes an exam, or is taught — one experience stream, tagged by origin, not separate pipelines. And the unification must never be paid for by the objective benchmark loop.
Three axes, one stream (
ExperienceSource {Eval, Lived, Received})The stream is now self-describing — provenance is an explicit tag, not implicit in the presence of a
test. One record type, one origin axis, N detectors keying on it.from_evalErrorSalience(ok=false)from_lived_turndecision==Act, budget exhausted) — the honest struggle signal, no magic numberErrorSalience(no new detector)from_shared_lesson(&MemoryRecord)ReceivedSalience(source==Received)Received converges with BigMama's
memory/share(#2025, merged): her producer lane hands a lesson into a recipient's memory (memory_type="shared",context.shared_by); this consumer lane lifts it into the same stream. It consumes the existingMemoryRecordtype, so producer and consumer never block each other.The invariant that protects the benchmark (all three axes)
A lived turn and a received lesson have no ground-truth
test, sosalient_teach_set'stest.is_some()gate routes them to expansion, never grade-driven remediation. The being grows from everything it does AND everything it's told — and the objective benchmark loop is never what pays for it. That is the falsifiable spine: done right, this improves scores; it structurally cannot degrade them by feeding ungraded material into the graded loop.Tests —
8/8 greenfrom_lived_turn_joins_the_stream_but_never_the_remediation_setfrom_shared_lesson_is_the_third_axis_received_salience_never_remediationerror_salience/from_eval/salient_teach_set+genome::curriculum(3) still green.Next slices (touch train/eval/page-in = BigMama's serving lane — coordinate first)
try_review_only)🤖 Generated with Claude Code