New AI Language docs · static / Cloudflare Pages

Agent rationalization: cross-pollinated hybrids → token-efficient AI playbooks

Scope: fewer tokens + better multi-step reliability, no model retrain.

Corpus: memory/hybrids.jsonl (seed=42, n=15) + memory/hybrids_seed99.jsonl (seed=99, n=15).

Method: re-read story/verbs/media per hybrid; distrust auto score=1.0; merge duplicates into mechanism-named playbooks; reject purpose-mismatches.


1. Executive summary

  • 30 hybrids, all auto-scored confidence=1.0 / score=1.0scores are not informative. Rationalization is keyword-lexicon + RNG among first hits, not mechanism fit.
  • Auto techniques collapse hard: Session codebook 12/30, Priority-priced 5, Delta+stratum 4, Bloom 3, Freeze-plan 2, Hardness router 2, Prefix cache 1, Ping tools 1. Many strong stories (Merkle, metamorphosis, speculative draft-verify, stigmergy traces) were mislabeled as codebook — but the underlying idea (dense codes instead of prose) is correct and under-specified, not wrong.
  • After re-rationalization: 12 keep playbooks (incl. elevated dense IR / token compression language), 2 reject patterns, several hybrids reassigned.
  • Nothing here is a new computational primitive. Closest priors: dense structured IR, codebooks/DSLs, rolling summary, prompt/result cache, model cascade, RAG budget, tool-minimal I/O, plan-critique, external memory.
  • Core representation claim (kept, strengthened): natural-language prose is usually the worst packing of meaning into BPE/WordPiece tokens. Prefer a token compression language: fixed schema STATE, tables, ids, enums, diffs, and session codes — not essay memory.
  • Top ROI for our purpose: (1) dense IR / token compression language, (2) rolling summary + delta window, (3) stable prefix + result cache, (4) hardness cascade router, (5) tool-ping / expand-on-demand. Plan/critique remains the top pure-thinking lever (rank 6, still in stack).
  • Weekend stack: cached schema+codebook prefix → STATE in dense IR (not prose) → delta window → budgeted admit → route by hardness → tools by id → plan/critique only when escalated → milestone re-encode into the same IR.
  • Not found: magical free compression with zero schema design and zero error risk; infinite context; no-retrain soft prompts that beat a good dense system prefix; novelty claims.

2. Corpus stats

Runs

FileSeedModeHybridsPool
hybrids.jsonl42all_buckets15analogy 15, cs 18, ai 22, nature 18 (73 total), 7 ops
hybrids_seed99.jsonl99all_buckets15same

Task tag on both metas: token_efficiency_and_thinking_no_retrain.

Operator frequency (30 hybrids)

opcount
chain12
compress_fuse6
tension_as_law4
import_medium4
import_verb3
inversion1
scale_shift0

Auto-technique frequency (do not trust)

Auto techniquecountNotes
Session codebook12Lexicon catch-all (token, prefix, compress, radix, …)
Priority-priced context5Hits on priority/keystone/auction keywords
Delta + stratum memory4Hits on diff/wal/layer/archive
Bloom gate on retrieval3Hits on bloom/hash; also false-positive on filter in names
Freeze-plan then shake-check2Anneal/sample/vote keywords
Hardness curriculum router2curriculum/route/hardness
Prefix + result cache1
Ping tools, don't paste worlds1

All 30: helps=["token_efficiency","thinking_structure"], identical falsification template, no_retrain=true.

Topic frequency (top 15 names across 120 topic slots)

crystal_growth (5); phase_transition, homeostasis, bloom_filter, gossip, stigmergy (4 each); b_tree, soft_prompt, tides, mycorrhizal_share, diff_patch, tokenization, prompt_cache, crdt, skip_list, slime_mold, river_delta, flocking, circuit_breaker (3 each).

Buckets are balanced by construction (every hybrid is 4-bucket: nature+ai+analogy+cs → 30 each).

Generator limitation (important)

cross_pollinate.py::rationalize matches a fixed TACTIC_LEXICON by substring on topic blob + story, then randomly picks among the first ≤3 hits. That explains inflated scores and codebook domination. Re-rationalization below is story/verb-first, not lexicon-first.


3. Rejected patterns (nothing silent)

PatternWhy reject / demoteAffected hybrids (examples)
**Auto “Session codebook” *as random default***Keyword collision assigned codebook where Merkle/metamorphosis/etc. fit better. Not a rejection of codebooks themselves — see PB12 elevated.Misassigned labels on 42:H0001, H0003, H0007, …; mechanism still recovered elsewhere
Soft prompt / activation steering as primary tacticNeeds train (learned embeddings / steering vectors). Out of scope unless marked skip.42:H0003 soft_prompt; 99:H0004 activation_steering; 99:H0009, H0015 soft_prompt
Always-on multi-sample self-consistency / gossip swarmOften increases tokens; thinking gain only on hard tasks. Reject as default path; allow gated.42:H0012, H0014; 99:H0010
Metaphor-only nature/analogy with no CS hingeCannot implement without inventing the CS half. Demote pair_quality→noise.42:H0001 camouflage×attention (weak); pure story noise where chain hops don’t pin an operator
“Bloom gate” from name substring filter aloneconstitutional_filter ≠ bloom filter. Re-map to prune/critique/breaker.99:H0008
Claim of novelty / score=1.0 as evidenceGenerator honesty text already denies this; we treat all as known costumes.all 30
KV-cache / speculative decoding as user-space tricksReal KV cache is inference runtime; user-space analog is prefix cache + draft-verify cascade, not tensor reuse.42:H0007; 99:H0012 kv_cache

Rejected hybrids are not deleted: each is reassigned to a playbook or listed under open_questions / failure in the JSONL.


4. Playbook catalog (≤12)

IDs use s42: / s99: prefixes because both files reuse H0001H0015.

PB01 — Rolling summary + delta window

FieldContent
nameRolling summary + delta window
source hybridss42:H0005, s42:H0009, s42:H0011; s99:H0001, s99:H0010, s99:H0011
mechanismDual-timescale context: slow SUMMARY (consolidated facts/decisions) + fast DELTA (last N turns or edit script). Drop raw prior turns. Stigmergy/WAL flavor: append durable traces offline; prompt only sees summary+delta. Ice-core/stratum: archive full history outside the window.
token effecthigh on multi-turn sessions (linear history → O(summary+N))
thinking effectmed (preserves goals/facts if summary discipline is good; fails if summary drops constraints)
implementation sketchAfter each turn: delta = diff(prev_STATE, new); every K turns or on token pressure: SUMMARY = compress(SUMMARY + deltas); prompt = SYSTEM + SUMMARY + DELTA + user. Store full log offline.
falsification20 multi-turn tasks (≥8 turns). Kill if mean tokens_in not ↓≥20% vs full-history or success ↓>10% or constraint-miss rate up.
known priorcontext_distill / rolling summary; MemGPT-style paging; chat “memory” products; diff/patch; WAL
pair_qualitystrong where diff_patch / weight_memory / wal / stigmergy present
keepyes

PB02 — Stable prefix + result cache

FieldContent
nameStable prefix + result cache
source hybridss42:H0002, s42:H0006, s42:H0011; s99:H0003, s99:H0012 (kv_cache as metaphor only)
mechanismFix system+tools+schemas as an immutable prefix (provider prompt cache). Cache results of identical sub-tasks by hash(prefix_id + task_type + normalized_args). Radix/shared-stem idea: one template tree for task families.
token effecthigh on repeated workflows (prefix billing + skip recompute)
thinking effectlow–med (does not deepen reasoning; avoids re-deriving known sub-answers)
implementation sketchcache_key = hash(system_version, tools_version, task_sig); on hit return cached; on miss LLM and store. Keep prefix byte-stable (no per-turn junk in system).
falsification50 repeated/templated tasks. Kill if effective billed tokens not ↓≥20% or stale-cache wrong answers >2%.
known priorProvider prompt caching; response caches; radix/shared prefix compression; speculative work-stealing of finished subresults
pair_qualitystrong (radix_trie, prompt_cache); weak when only “tides” metaphor
keepyes

PB03 — Budgeted priority admission

FieldContent
nameBudgeted priority admission
source hybridss42:H0004, s42:H0008, s42:H0010; s99:H0006
mechanismCandidate chunks (RAG, tools, history pages) get score = f(relevance, recency, keystone flag, auction bid). Admit until token budget B. LRU evaporates cold non-keystone chunks. Quorum: escalate model only if several high-score uncertainty signals fire.
token effecthigh when retrieval dumps are large
thinking effectmed (forces agenda; can drop rare but critical context — pin keystone ids)
implementation sketchRetrieve top-M cheaply; score; sort; pack while used < B; always pin GOAL + keystone docs; optional homeostasis loop if over set-point.
falsification20 RAG-heavy tasks. Kill if tokens_in not ↓≥20% vs “stuff top-20 chunks” or recall of required facts ↓>10%.
known priorPriority queues; RAG top-k; lost-in-the-middle mitigation via budget; LRU caches
pair_qualitystrong (priority_queue, lru, auction, model_router)
keepyes

PB04 — Hardness cascade router

FieldContent
nameHardness cascade router
source hybridss42:H0004, s42:H0007; s99:H0001 (curriculum), s99:H0004, s99:H0012
mechanismCurriculum of paths: (0) deterministic template / detector hit → (1) small/fast model short answer → (2) large model + tools + optional CoT. Phase-transition: only cross critical uncertainty/confidence threshold to spend tokens. Inversion of speculative decoding in user space: cheap first, expensive verify/fix only when needed (not always draft-then-verify).
token effecthigh on mixed easy/hard workloads (and $ proxy)
thinking effecthigh if hard path is truly better; cosmetic if router mislabels
implementation sketchHeuristics: length, keywords, tool-need, self-rated confidence, unit-test fail. if detector: return; if small.ok(conf): stop; else big+tools. Circuit-breaker: trip big-path after N timeouts.
falsification100 mixed tasks with known difficulty labels. Kill if total tokens/$ not ↓≥20% or hard-task success ↓>10% vs always-big.
known priormodel_router; cascade/speculative decoding (user-space analog); FrugalGPT; route-by-hardness
pair_qualitystrong when curriculum/router/phase present; activation_steering in s99:H0004 is needs train — skip
keepyes

PB05 — Freeze-plan then gated critique

FieldContent
nameFreeze-plan then gated critique
source hybridss42:H0007, s42:H0014, s42:H0015; s99:H0008
mechanismPrepare-then-commit (2PC): short PLAN (freeze, ≤5 bullets) → optional CRITIQUE×n only if hardness high → FINAL commit. Slime-mold: overbuild options cheaply, prune to one network. Constitutional checklist as critic, not as giant system essay every turn. Circuit-breaker aborts infinite revise loops.
token effectmed (can ↑ tokens if critique always on; ↓ output fluff if plan caps prose; net positive when gated)
thinking effecthigh on multi-step work
implementation sketchSystem: “Phase1 PLAN only, no solution prose. Phase2 if conf<τ or user marks hard: 1 critique pass. Phase3 FINAL only.” Cap critique to 1 for default.
falsification20 multi-step coding/analysis tasks. Kill if quality not ↑≥ human-noticeable or if tokens ↑>15% without quality gain (then gate harder).
known priorPlan-and-solve; constitutional AI critique-revise; tree-of-thought prune; 2PC; draft-verify
pair_qualitystrong for 2PC/slime/constitutional; weak for work_stealing×camouflage costume
keepyes

PB06 — Bloom / detector gate before deep work

FieldContent
nameBloom / detector gate before deep work
source hybridss42:H0010, s42:H0013; s99:H0009, s99:H0013
mechanismCheap membership / pattern detectors before RAG or CoT. Negative: skip retrieval, answer from STATE. Positive-maybe: retrieve under budget. Keystone: one disproportionate-stabilize chunk always pinned. Percolation: grow context only after connectivity/relevance threshold.
token effecthigh when many queries are out-of-corpus or trivial
thinking effectmed (avoids fake-deep reasoning on empty retrieval)
implementation sketchMaintain bloom or embedding-threshold over corpus ids + FAQ detectors. if not maybe(q): answer_STATE; elif easy: short; else: RAG+optional CoT.
falsification50 queries half in-corpus half OOD. Kill if tokens not ↓≥20% or false-negative rate (skipped needed RAG) >5%.
known priorBloom filters; RAG gating; query classifiers; “don’t retrieve if not needed”
pair_qualitystrong with real bloom_filter topic; noise when only name-substring filter
keepyes

PB07 — Content-addressed expand-on-demand (Merkle ids)

FieldContent
nameContent-addressed expand-on-demand
source hybridss42:H0003, s42:H0001 (weak); s99:H0005, s99:H0007
mechanismContext holds ids/hashes + one-line titles, not full bodies. Model or router requests expand(id) when needed. Merkle root optional for integrity of pack. Ant/B-tree: paged index of stigmergic traces; attention/similarity chooses which page.
token effecthigh for large docs/codebases
thinking effectmed (good if expand policy is right; thrashing if model re-expands endlessly — cap expands)
implementation sketchCONTEXT = [{id, title, score}]; tool fetch(id)->≤M tokens; max expands/turn; cache expansions in-session.
falsification15 codebase/doc tasks. Kill if tokens_in not ↓≥20% vs full-file paste or success ↓>10%.
known priorMerkle trees; content-addressed storage; agent “open file by path”; progressive disclosure
pair_qualitystrong with merkle/tool_use/b_tree; weak soft_prompt chain
keepyes

PB08 — Tool ping, don’t paste worlds

FieldContent
nameTool ping, don’t paste worlds
source hybridss99:H0002, s99:H0005; s42:H0008, s42:H0015
mechanismReplace world-dumps with call-then-ground: tools return ≤M rows / ≤T tokens. Mycorrhizal trade: specialized tools/agents exchange deltas, not full state. Echolocation: ping before large explore. Prefer structured rows over narrative tool spam.
token effecthigh vs paste-DB / paste-log baselines
thinking effectmed–high (grounding reduces hallucination if tools are correct)
implementation sketchTool contracts: hard max rows; column projection; server-side filter. Prompt forbids “dump full table”. Diff-patch tool results into STATE.
falsification20 data/debug tasks. Kill if tokens_in not ↓≥20% vs full dumps or answer accuracy ↓>10%.
known priortool_use; RAG; SQL LIMIT; ReAct with observation truncation
pair_qualitystrong
keepyes

PB09 — Stigmergic external traces + memory bank

FieldContent
nameStigmergic external traces + memory bank
source hybridss99:H0001, s99:H0007, s99:H0011, s99:H0014; s42:H0005 (seed_bank)
mechanismDurable side-channel (TRACES.md / memory bank): decisions, defs, failed attempts, open questions. Next prompts load traces + skip-list/paged lookup, not full chat. Gossip compresses multi-agent notes to one-liners into the bank. Phase flip: skim bank vs deep recall when uncertainty high.
token effecthigh across sessions; med single-shot
thinking effecthigh for long projects (continuity, less re-litigation)
implementation sketchAppend-only TRACES; retrieval by tag/similarity top-k under budget; never paste entire bank. Periodic consolidate into SUMMARY (links PB01, PB11).
falsification5 multi-session projects. Kill if re-asked facts still require full re-derive or tokens not ↓≥20% vs resending chat logs.
known priormemory_bank; stigmergy; MemGPT; agent scratchpads; project RULES.md
pair_qualitystrong
keepyes

PB10 — Align-merge multi-view (gated)

FieldContent
nameAlign-merge multi-view (gated)
source hybridss42:H0012, s42:H0014; s99:H0010, s99:H0012
mechanismFor hard tasks only: 2–3 short views (correctness, risk, cost) or samples; CRDT-like merge into STATE (commutative fields: sets of facts, max conf, union open Qs). Percolation stop: stop sampling once views agree above threshold. Flocking: align without a boss coordinator essay.
token effectlow if always-on (can hurt); med positive if gated to hard only and outputs are one-liners
thinking effecthigh when gated
implementation sketch`if hard: views=small_model×3 short; STATE=merge(views); optional big_model(FINALSTATE)`. Soft max 3 views.
falsificationSplit easy/hard. Kill if easy-path tokens ↑>10%; hard-path quality must ↑ or tie with ≤+20% tokens.
known priorself_consistency; multi-agent debate (cheap form); CRDT merge; ensemble vote
pair_qualitymed (good mechanism, easy to waste tokens)
keepyes (gated only)

PB11 — Metamorphic STATE re-encode + homeostasis

FieldContent
nameMetamorphic STATE re-encode + homeostasis
source hybridss99:H0015, s99:H0009, s99:H0011; s42:H0009
mechanismAt milestones, discard larval notes; rebuild clean adult STATE from goals+verified facts only (metamorphosis). Homeostasis: if tokens > set-point T, compress oldest 50% until under. Circuit-breaker half-open: if rebuild fails QA checks, restore last good STATE snapshot. River-delta: successful structure becomes durable infrastructure (prefix/templates).
token effecthigh on long sessions
thinking effectmed (reduces contradiction debt; risk of dropping nuance)
implementation sketchTriggers: turn%K==0, tokens>T, phase change. Prompt: “Rewrite STATE from GOAL+FACTS only; max 15 lines; archive old offline.” Snapshot before rewrite.
falsificationLong 15+ turn tasks. Kill if tokens not ↓≥20% late-session or factual regressions >10%.
known priorcontext compaction; “start a new chat with summary”; metamorphosis tactic in generator lexicon
pair_qualitystrong for metamorphosis×circuit_breaker; soft_prompt skipped
keepyes

PB12 — Dense IR / token compression language (elevated)

FieldContent
nameDense IR / token compression language
source hybridss42:H0005 (tokenization + seed_bank + diff), s42:H0012 (radix shared stems), s42:H0002 (prefix share), s99:H0001 (diff_patch), s99:H0003 (prompt_cache + skip_list), s99:H0015 (metamorphosis → rebuild clean STATE); auto “Session codebook” mass hits are noisy labels for this real mechanism
mechanismProse is a bad codec for model context. BPE tokens charge you for articles, hedging, and repeated entity names. A token compression language is a fixed, model-taught schema that packs the same facts into fewer tokens and often clearer structure: (1) typed STATE (G=… F=[…] D=[…] O=[…] or YAML/JSON with short keys), (2) session codebook / dictionary (T1=AuthService, then only T1), (3) tabular / columnar tool returns, (4) diff/patch IR instead of restating documents, (5) enum + id addressing (err=E_TIMEOUT ref=#a3f) instead of paragraphs. This is not free lunch: you pay schema design + one-time legend in the cached prefix + risk of ambiguous codes. It is the correct answer to “text is the worst representation.”
token effecthigh on multi-turn + structured work (often the largest continuous win after dropping full chat history)
thinking effectmed–high — models reason well over fields/lists; fewer tokens of fluff → more of the window for actual constraints; fails if codes are underspecified
implementation sketchSee §5 #1 drop-in. Layers: schema in cached prefix → all memory as IR → human prose only at I/O edges → expand codes on user-facing final only.
falsificationSame tasks, prose-STATE vs dense-IR STATE, equal information content. Kill if tokens_in not ↓≥25% or task success ↓>10% or model asks to clarify codes >15% of turns.
known priorcompression_dict / session codebooks; structured prompting; JSON/YAML STATE; DSLs; diff_patch; entity aliases; token-oriented notations; “answer as table”; tool schemas as IR
pair_qualitystrong as a representation thesis; auto hybrid pairing was often noise — we keep the thesis, not the poetry
keepyes — first-class, default on for agent memory

Worked density example (same facts):


# prose (~90+ tokens depending on tokenizer)

We decided to use Postgres for the users table because we need

transactions. Auth is still blocked on the OAuth redirect URI.

Next step is to write the migration.



# dense IR (~35–45 tokens)

D:[db=postgres reason=tx]

F:[users.tbl planned]

O:[auth blocked=oauth_redirect]

N:[write migration]

Codes in legend (once, prefix-cached): D=decisions F=facts O=open N=next.


5. Top 5 ranked for our purpose

Rank key: roughly (token_savings × thinking_gain) / effort, with honesty about implementability next week and A/B ≥20–25% tokens_in without quality collapse.

#1 — Dense IR / token compression language (PB12) [elevated]

Mechanism. Stop storing and exchanging agent memory as English essays. Define a small schema + optional codebook once (in the prompt-cache prefix). All SUMMARY, DELTA, tool observations, and plans are written in that IR. Human-facing prose is a decode step at the edge, not the working medium. This attacks the representation tax: every “the / we should / currently” is a wasted token that also dilutes attention.

Drop-in sketch.


# PREFIX (cached, stable)

IR v1 keys: G=goal F=facts[] D=decisions[] O=open[] N=next[] X=constraints[]

LEGEND: T1=..., E2=...  (session entities; grow only)

Rules: mutate only via field ops; no narrative memory; expand for user only.



# EACH TURN BODY

G: ship billing v1

F: [T1 uses stripe, webhook=/v1/hook]

D: [idempotency=key-header]

O: [PCI review]

N: [add signature verify]

Δ: F+ [rate_limit=100rpm]

Architecture.


[User prose] → encode → [Dense STATE store] → [LLM thinks in IR]

                ↑                              ↓

         decode for human              tools return tables/ids

Falsification. Prose memory vs IR memory, 20 multi-turn tasks; kill if tokens_in not ↓≥25% or success ↓>10% or code-confusion rate high.

Closest prior. Structured STATE; compression dictionaries; DSLs; diff_patch; JSON tool schemas; entity codes.

#2 — Rolling summary + delta window (PB01) — in dense IR, not prose

Mechanism. Dual-timescale context: slow SUMMARY + fast DELTA, but both are PB12 records, not paragraphs. Archive raw log offline.

Drop-in sketch.


SYSTEM: Context is IR only (see prefix schema).

SUMMARY: {G,F,D,O,X}   # compacted IR

DELTA:   patch ops last ≤3 turns

USER: ...

Architecture. [User] → [Orchestrator] → [STATE: summary|delta|archive as IR] → [LLM]

Falsification. 20 multi-turn tasks; ≥20% tokens_in down (often stacks with #1 to more); ≤10% success drop.

Closest prior. Rolling summary / context distill / MemGPT paging / diff_patch.

#3 — Stable prefix + result cache (PB02)

Mechanism. Byte-stable system+schema+codebook+tools for provider cache; hash-keyed reuse of identical sub-answers.

Drop-in sketch.


PREFIX = IR schema + LEGEND + tools  # never churn

TASK body variable only

cache_key=hash(prefix_ver, task_sig)

Architecture. [Router] → [Result cache] → miss → [LLM + prompt-cache prefix]

Falsification. 50 templated tasks; billed tokens ↓≥20%; stale errors ≤2%.

Closest prior. Prompt cache; response cache; shared system prompts.

#4 — Hardness cascade router (PB04)

Mechanism. Easy template/detector → small model → large+tools only on uncertainty.

Drop-in sketch.


if detector(q): return

a, conf = small(q, STATE_IR)

if conf >= τ and not needs_tools: return

return big(q, STATE_IR, tools, plan_mode)

Architecture. [Heuristics] → [Small LLM] → [Big LLM+tools]

Falsification. 100 mixed tasks; tokens/$ ↓≥20%; hard success drop ≤10% vs always-big.

Closest prior. Model routing / FrugalGPT / cascade.

#5 — Tool ping + expand-on-demand (PB08 + PB07)

Mechanism. Tools return rows/enums/ids (IR), never world-dumps; large artifacts behind content ids.

Drop-in sketch.


TOOL out: table|json ≤M rows, short keys

CONTEXT: [{id,title,score}] only

fetch(id) max 3/turn → merge as Δ into STATE_IR

Architecture. [LLM] ⇄ [Tool gateway] ⇄ [Doc store by id] ; [IR STATE]

Falsification. 20 data/codebase tasks; ≥20% tokens_in vs full paste; ≤10% success drop.

Closest prior. ReAct; progressive disclosure; content-addressed packs.

#6 (thinking spear, still in stack) — Freeze-plan then gated critique (PB05)

Same as before; plans written as N:[...] IR bullets, not essays.

Honorable mentions: PB03 budgeted admission, PB06 bloom gate, PB11 metamorphic re-encode into denser IR, PB09 traces as append-only IR log, PB10 multi-view (hard-only).


6. Unified stack (weekend-implementable)

One pipeline, no contradictions. IR is the spine — every other playbook reads/writes the same dense language.


                    ┌──────────────────┐

                    │  Detector / FAQ  │──hit──► return (0 LLM tokens)

                    └────────┬─────────┘

                             miss

                    ┌────────▼─────────┐

                    │ Result cache     │──hit──► return

                    └────────┬─────────┘

                             miss

┌────────────┐      ┌────────▼─────────┐      ┌─────────────────────┐

│ Prefix     │      │ Hardness router  │      │ External memory     │

│ cache:     │─────►│ EASY: small LLM  │◄────►│ SUMMARY+DELTA+      │

│ schema +   │      │ HARD: big+tools  │      │ TRACES — all as IR  │

│ LEGEND +   │      └────────┬─────────┘      │ + content-id index  │

│ tools      │               │                └─────────────────────┘

└────────────┘               │

              ┌──────────────┼──────────────┐

              ▼              ▼              ▼

        [Budget admit] [Tool gateway] [Plan→(crit)→Final]

         IR chunks      tables/ids       IR bullets

              │              │              │

              └──────────────┼──────────────┘

                             ▼

                    patch STATE_IR; append TRACE_IR

                    if tokens>T or milestone:

                       metamorphic re-encode SUMMARY_IR (denser, not essay)

                    user edge: decode IR → prose only when needed

Weekend build order (honest):

  1. Hours 0–4: Define IR schema + LEGEND rules; forbid prose memory (PB12).
  2. Hours 4–7: Rolling SUMMARY_IR + DELTA patches (PB01 on top of PB12).
  3. Hours 7–9: Stable prefix (schema+legend+tools) + result cache (PB02).
  4. Hours 9–12: Heuristic router small vs big (PB04).
  5. Hours 12–16: Tool row/table caps + fetch-by-id (PB08/07); plan/critique in IR (PB05); milestone re-encode (PB11).
  6. Optional day 2: Priority admit (PB03), bloom/FAQ (PB06), cross-session TRACES (PB09).

A/B harness (required): same 20 tasks; log tokens_in/out, success, human rubric; kill stages that fail ≥20–25% tokens / ≤10% quality. Mandatory arm: prose-STATE vs dense-IR STATE.


7. Open questions

  1. Best dense IR for your domain — ultra-short key=value vs YAML vs JSON vs custom DSL? Tokenizer-specific density differs (measure with your model’s tokenizer).
  2. How large can LEGEND grow before codes themselves need secondary compression / paging?
  3. Encode path: deterministic templates vs small model “prose→IR” — error rates?
  4. What is the real easy/hard mix of production tasks? Router ROI collapses if almost everything is hard.
  5. Provider prompt cache invalidation if LEGEND grows every session (prefix churn)?
  6. Multi-view (PB10): small×3+merge vs one big CoT under equal token budget?
  7. Cross-pollinator: force tokenization|compression_dict|diff_patch|radix → dense-IR playbook instead of RNG Session codebook.

8. Explicit statement of what was / was NOT found

Found (including correction)

  • Token compression languages / dense IRs are real and central — not a sci-fi free lunch, but the right fix for “prose is a terrible packing of meaning into tokens.” Hybrids repeatedly gestured here (tokenization, compression_dict lexicon, diff_patch, radix prefix share, session codebook, seed_bank names); the first pass under-ranked them because auto-labels were noisy. Corrected: PB12 is Top #1.
  • Standard engineering levers still stand: move state out of prompt, cache, route, gate, tool-minimal I/O, plan/critique.

Not found

  • No magical codec that compresses arbitrary natural language with zero schema, zero legend, and zero ambiguity risk.
  • No new learning rule / attention replacement / soft prompt that beats a dense system prefix + tools without training. Soft prompt / activation steering = needs train — skip for now.
  • No novelty claim. Dense IR is known (structured prompting, DSLs, dictionaries, diffs) — the win is using it as default agent memory, not inventing a new primitive.
  • No trustworthy auto scores (score=1.0 everywhere).
  • No always-on multi-agent swarm as a token strategy.
  • Discovery packets / atlas were not treated as proven primitives.

Appendix A — Per-hybrid re-map (brief)

IDAuto techniqueRe-rationalized homekeep hybrid?
s42:H0001Session codebookPB07 weak / selective visibilityreassigned (weak pair)
s42:H0002Prefix + result cachePB02yes
s42:H0003Session codebookPB07 (skip soft_prompt train)yes
s42:H0004Priority-pricedPB03 + PB04yes
s42:H0005Delta + stratumPB01 + PB12 conditionalyes
s42:H0006Priority-pricedPB02 + hierarchical pagereassigned
s42:H0007Session codebookPB04 + PB05 draft-verifyyes
s42:H0008Priority-pricedPB03 + PB08 prune/toolsyes
s42:H0009Session codebookPB01 dual-timescaleyes
s42:H0010Priority-pricedPB06 + keystone pinyes
s42:H0011Session codebookPB01 + PB02 WAL/prefixyes
s42:H0012Session codebookPB10 gated + shared prefixgated
s42:H0013Bloom gatePB06yes
s42:H0014Freeze-planPB10 gossip / weak PB05gated
s42:H0015Freeze-planPB05 2PC + PB08 pingyes
s99:H0001Delta + stratumPB01 + PB09 + curriculumyes
s99:H0002Ping toolsPB08 deltas between agentsyes
s99:H0003Session codebookPB02 + homeostasisyes
s99:H0004Hardness routerPB04 (skip activation_steering train)yes
s99:H0005Session codebookPB08 + PB07 + gossipyes
s99:H0006Priority-pricedPB03 + LRUyes
s99:H0007Session codebookPB09 paged tracesyes
s99:H0008Bloom gatePB05 prune+constitution+breakeryes (remapped)
s99:H0009Bloom gatePB06 + symbiotic compress/reason + homeoyes
s99:H0010Delta + stratumPB10 + WALgated
s99:H0011Delta + stratumPB01 + PB11 + breakeryes
s99:H0012Hardness routerPB04 + CRDT merge + cacheyes
s99:H0013Session codebookPB06 selective CoTyes
s99:H0014Session codebookPB09 memory bank + phaseyes
s99:H0015Session codebookPB11 metamorphic re-encodeyes

End of rationalization. Outputs also in memory/agent_rationalization.jsonl.


Follow-up: focused primitive cross-pollination (dense IR)

A representation-relevant pool and generator were added so analogies hit codecs, not random nature tourism:

  • Generator: cross_pollinate_dense_ir.py
  • Run: memory/hybrids_dense_ir.jsonl (seed=7, n=24)
  • Analysis: memory/dense_ir_primitives.md

Result: cross-pollination rediscovers a small set of IR primitives (legend, typed schema, patch, table, content-id, plan bytecode, gate, trace) that compose the token compression language (PB12) and also structure multi-step thinking. See that doc for the STATE-IR v1 alphabet and ranked implementation list.