Expand description
Predictive Coding for mode outputs — send only prediction errors (deltas).
Scientific basis: Rao & Ballard (1999), “Predictive coding in the visual cortex” — Neural systems only propagate the difference between prediction and observation. Applied here: when a file is re-read in a different mode, we compare the new output against the last delivered output and transmit only structural deltas.
This achieves 40-60% token savings on repeated reads.
Structs§
- Mode
Delta - Represents a structural delta between two mode outputs.
Functions§
- compute_
delta - Compute a structural delta between two mode outputs. Uses line-level diff for structural modes (map, signatures).
- should_
use_ delta - Decide whether to send delta or full output based on savings threshold. Returns true if delta is more efficient.