`core demo learning-loop` (+ `--json`) walks a single prompt through the
full ADR-0055..0057 inter-session-memory architecture:
S1. Cold turn → universal disclosure, grounding_source=none
S2. Discovery emission → DiscoveryCandidate to attached sink
S3. Operator proposal → real replay-equivalence gate, no regression
S4. Operator accept → TRANSIENT corpus only; active untouched
S5. Same prompt → teaching-grounded surface with the new chain
Before / after on the deterministic prompt "Why does thought exist?":
before: [none] I don't know — insufficient grounding for that yet.
after: [teaching] thought — teaching-grounded (cognition_chains_v1):
cognition.thought; logos.internal. thought reveals meaning
(cognition.meaning). No session evidence yet.
The active corpus on disk is byte-identical pre/post. The demo writes
only to a transient corpus, then swaps `_CORPUS_PATH` for the after
turn — the same pattern the replay-equivalence gate uses.
- evals/learning_loop/run_demo.py — `run_demo(emit_json=False)` returns
a structured `DemoReport` with both surfaces and per-scene detail.
- core/cli.py — `core demo learning-loop` target wired.
- tests/test_learning_loop_demo.py — 7 tests pin: full loop closes,
before is ungrounded, after contains new chain atoms (thought /
reveal / meaning), discovery emits ≥1, replay gate reports no
regression, S4 byte-identical active + 1 line on transient, same
prompt drives both surfaces.
Lane state: learning-loop-demo 7 new — green. Demo runs in ~15s
end-to-end (cognition lane runs twice via replay gate).
No LLM provider has a published equivalent of this loop: per-fact
provenance from operator accept to surface, replay-equivalence gate
proving non-regression, byte-identical active state regardless of
outcome, full audit trail back to the originating cold turn.