Skip to the content.

Memory-View Formats — a third, orthogonal axis (surface + ablate)

Extends MEMORY-VIEW-CONTRACT-2026-06-26.md (#904). That contract fixes two axes over a memory view: Kind (what was derived — snippet/summary/qa/fact) and the taint gate (whether it may enter context at all). This note adds a third, deliberately orthogonal axis: Format — how an already-admitted, already-rendered set of records is serialized for a consumer, and how that choice is ablated (measured, not assumed) rather than hardcoded to prose.

The stance (one sentence)

Once the trust gate has already decided a view may render, how it is spelled is a separate, swappable, measurable decision — markdown for a human-facing loop-turn block, JSON for a lossless machine-parseable envelope, or a compact tabular encoding (TOON-shaped) for token-constrained surfacing — and the choice should be justified by a measured byte/token delta, not a hunch.

Why this needed its own axis, not a Kind variant

ViewKind (memview.go) answers “what is this content” (a snippet vs a summary vs a fact). Format answers “what bytes do we emit for a fixed set of already-typed, already-admitted records.” Conflating them would mean a KindSummary view sometimes means “prose paragraph” and sometimes means “TOON row” depending on who asked — which breaks every consumer that pattern-matches on Kind. Keeping them separate means: change Format, and Kind/Source/Taint/Body are untouched; the Format layer is a pure re-encoding of bytes that already cleared admission.

What shipped

The measured claim (not asserted — witnessed)

TestTOONIsCheaperThanJSONForUniformRows (internal/memview/format_test.go) renders 20 uniform 4-field rows under both encodings and asserts TOON is strictly smaller in both bytes and estimated tokens — because JSON repeats every field name once per row while TOON declares the field list exactly once. This is the load-bearing ablation witness for “TOON can be used at the right time”: a caller (or --ablate-formats) can read the delta off real encoder output for its own actual content shape, rather than trusting a general claim about the format.

What this does not claim

Witnesses

Run: go test ./internal/memview/... ./cmd/fak/... -run 'Format|MemoryRecall'.