lossy compression for code context: fit a 1M token monorepo into 8k without losing the load bearing parts.
1 # ctx-compress
2
3 lossy compression for code context. fit a 1M token monorepo
4 into 8k without losing the load bearing parts.
5
6 ## how
7
8 - rank files by heat (recency x fan_in x churn)
9 - fold cold subtrees into one line stubs
10 - keep signatures, drop bodies, mark elisions honestly
11
12 ## use
13
14 ```sh
15 ctxc pack . --budget 8k --format md
16 ```
17
18 ## guarantees
19
20 the output always ends with an `elided:` line so the consumer
21 knows what it is not seeing. silent truncation is a bug here.
22
23 benchmarks live in `benches/`. claims are reproducible or deleted.