How WOZCODE cuts file reading tokens by 40 to 60% without losing any useful information
Something I found interesting digging into how WOZCODE actually works under the hood.
When a coding session reads a file it normally gets the whole thing dumped into context. Every function body, every implementation detail, every line. The model has it whether it needs it right now or not.
WOZCODE does something called AST truncation instead. It parses the file structure and stubs out function bodies while keeping types, exports, and signatures fully intact. So the model gets the shape of the code without the implementation details it does not need yet.
40 to 60% fewer tokens per file read. And because every token in context gets re-ingested on every call after that, a smaller read early in the session stays smaller across everything that follows. The savings stack up across the whole session not just at the point of reading.
The implementation details are not gone either. They load when the model actually needs to work inside a specific function. It is just not front-loading everything upfront when the model only needs to understand the structure.
Found it to be a genuinely interesting approach to the context bloat problem. Curious if others have looked into this or found other ways to keep file reads lean in longer sessions.