{
  "version": "2.1",
  "lean_ctx_version": "3.6.6",
  "date": "2026-05-18T13:00:00Z",
  "tokenizer": "tiktoken cl100k_base (exact via Rust bindings)",
  "project": "lean-ctx (Rust/TS/Python, ~50K LOC)",
  "cli_compression": {
    "source": "production usage (lean-ctx gain)",
    "total_commands": 1973,
    "input_tokens": 99711868,
    "output_tokens": 39983946,
    "tokens_saved": 59727922,
    "savings_pct": 59.9,
    "avoided_usd": 149.32
  },
  "file_read_compression": {
    "files_measured": 50,
    "total_raw_tokens": 430767,
    "languages": [
      {
        "best_mode": "map",
        "best_mode_tokens": 5016,
        "best_savings_pct": 96.52,
        "count": 10,
        "ext": "rs",
        "total_tokens": 144295
      },
      {
        "best_mode": "aggressive",
        "best_mode_tokens": 75846,
        "best_savings_pct": 5.64,
        "count": 10,
        "ext": "md",
        "total_tokens": 80376
      },
      {
        "best_mode": "map",
        "best_mode_tokens": 634,
        "best_savings_pct": 99.11,
        "count": 10,
        "ext": "js",
        "total_tokens": 71352
      },
      {
        "best_mode": "aggressive",
        "best_mode_tokens": 67045,
        "best_savings_pct": 0.47,
        "count": 5,
        "ext": "json",
        "total_tokens": 67359
      },
      {
        "best_mode": "signatures",
        "best_mode_tokens": 1462,
        "best_savings_pct": 94.53,
        "count": 9,
        "ext": "py",
        "total_tokens": 26706
      },
      {
        "best_mode": "aggressive",
        "best_mode_tokens": 17615,
        "best_savings_pct": 2.4,
        "count": 1,
        "ext": "css",
        "total_tokens": 18049
      },
      {
        "best_mode": "map",
        "best_mode_tokens": 612,
        "best_savings_pct": 95.62,
        "count": 4,
        "ext": "ts",
        "total_tokens": 13974
      },
      {
        "best_mode": "aggressive",
        "best_mode_tokens": 8450,
        "best_savings_pct": 2.38,
        "count": 1,
        "ext": "html",
        "total_tokens": 8656
      }
    ],
    "mode_summaries": [
      {
        "avg_latency_us": 6050,
        "avg_preservation": 81.16,
        "avg_savings_pct": 97.59,
        "mode": "map",
        "total_compressed_tokens": 7864
      },
      {
        "avg_latency_us": 2308,
        "avg_preservation": 91.0,
        "avg_savings_pct": 96.82,
        "mode": "signatures",
        "total_compressed_tokens": 10992
      },
      {
        "avg_latency_us": 136,
        "avg_preservation": 100.0,
        "avg_savings_pct": 3.91,
        "mode": "aggressive",
        "total_compressed_tokens": 414596
      },
      {
        "avg_latency_us": 12901,
        "avg_preservation": 99.89,
        "avg_savings_pct": 0.5,
        "mode": "entropy",
        "total_compressed_tokens": 428940
      },
      {
        "avg_latency_us": 0,
        "avg_preservation": null,
        "avg_savings_pct": 99.76,
        "mode": "cache_hit",
        "total_compressed_tokens": 650
      }
    ]
  },
  "session_simulation": {
    "ccp_cost_usd": 0.2,
    "lean_ccp_tokens": 79868,
    "lean_cost_usd": 0.21,
    "lean_tokens": 84429,
    "raw_cost_usd": 1.51,
    "raw_tokens": 605422
  },
  "methodology": {
    "token_counting": "tiktoken cl100k_base via Rust bindings (exact counts, not char/4)",
    "best_mode_selection": "Structural modes (map, signatures) only for code files. Data/markup files (md, json, css, html) limited to aggressive/entropy. Modes returning 0 tokens always excluded.",
    "quality_metric": "Semantic preservation via key-symbol retention (exported names, types, signatures)",
    "cli_measurement": "Production telemetry from 1,962 real commands over multiple weeks",
    "reproducibility": "lean-ctx benchmark run /path --json",
    "honesty_notes": [
      "Markdown 5.6% (not 99.9%): md has no code structures, only whitespace stripping applies",
      "JSON 0.5%: no compression beyond whitespace normalization",
      "CSS/HTML 2.4%: comment removal only",
      "High savings (94-99%) only for actual programming languages with parseable structures"
    ]
  }
}
