05 Compression
Making a lesson shorter without making it wrong.
A node becomes eligible when it is an active apex, below
max_level (6), has at least min_successes (2)
recalls that were attributed as used, is past its cooldown, and
has recorded episodes to validate against. A node with no episodes
is left alone: compressing with no way to check the result is worse than
not compressing.
The manifest is mandatory#
Every compression must declare what it removed, as discrete claims:
dropped:
- claim: "Backoff constants are 100ms / 400ms / 1.6s, jitter ±25%"
kind: parameter
holder: n_7f2a
A compression that does not record its losses cannot be descended, so the lost detail is simply gone. A candidate that shrank materially while declaring nothing is rejected as under-reported.
Deltas are inherited — an apex knows about detail several levels below it without holding the text, which is what makes delta-jumping possible.
Validation#
R = sample(regression episodes over the node's whole subtree, k=5) for each: fresh agent process, candidate lesson + the original prompt accept iff pass_rate >= 1.0 and tokens <= 0.75 × original
- Fresh process — otherwise the main agent's memory of the verbose lesson leaks in and every compression looks successful.
- Subtree-wide — validating only on the triggering episode is how you get a beautifully compressed, useless tree.
- Probe form — replay asks how would you approach this, not do the work. Asking for the work meant judging scaffolding completeness and truncation artefacts rather than the lesson.
- An unreadable judge is a failure, never a pass, so an infrastructure blip cannot promote a bad compression.
- Rejections are informative — failing episodes become
preserve:hints for the next attempt, so the compressor converges instead of thrashing.
What the compressor is told to keep#
It is given the spans a reflection pass observed doing work — the sentences that changed what an agent did, reported per session. Where that evidence exists the reduction is taken from everything else; where it is absent the compressor is told so explicitly and compresses conservatively, because a span with no record may simply not have come up yet.
This is what separates compression from guessing. Before it, the compressor chose what to cut from the text alone and found out afterwards whether it had been wrong.
Repair#
A delta that repeatedly rescues the same node is proof the compression cut too deep, so it is folded permanently back into the body and dropped from the manifest. The graph heals where it was over-cut.