Skip to content

v2.15.0 Scientific Compression Evolution

Choose a tag to compare

@yvgude yvgude released this 03 Apr 06:06

Scientific Compression Evolution

Six algorithms from information theory, graph theory, and statistical mechanics now power lean-ctx's compression pipeline — all automatic, all local, zero configuration.

New Algorithms

Algorithm What it decides Based on
Predictive Surprise Which lines to keep BPE cross-entropy (Zipfian prior)
Spectral Relevance Which files matter Heat diffusion + PageRank on dependency graph
Boltzmann Allocation Token budget per file Statistical mechanics temperature from task specificity
Semantic Chunking How to order output AST boundaries + attention bridges + tail anchors
MMR Deduplication Redundant lines Bigram Jaccard similarity (Maximum Marginal Relevance)
BPE Optimization Final text encoding Token-boundary-aligned string replacements

Also in this release

  • Auto-build graph indexload_or_build() builds the project graph automatically on first use. No manual ctx_graph build needed.
  • Fish shell doctor checklean-ctx doctor now detects aliases in ~/.config/fish/config.fish
  • Codex hook refreshlean-ctx update now refreshes Codex PreToolUse hooks alongside Claude/Cursor/Gemini

Benchmark Results

Session simulation (30-min coding):
  Raw (no compression):    449.2K tokens    $1.12
  lean-ctx (with CCP):      64.5K tokens    $0.16    85.7% savings

Mode performance:
  map:          96.0% savings, 94.4% quality
  signatures:   96.0% savings, 88.1% quality  
  cache re-read: 99.3% savings (13 tokens)
  git commands:  95.0% savings across all patterns

Scientific verification: 12/12 checks passed
Intensive benchmarks:    39/39 tests passed

Install / Update

# New install
curl -fsSL https://leanctx.com/install.sh | sh
lean-ctx setup

# Update existing
lean-ctx update

Full changelog: https://github.com/yvgude/lean-ctx/blob/main/CHANGELOG.md

Full Changelog: v2.14.5...v2.15.0