0139GitHub
winnow
A context sieve for Claude Code: Jev judges each tool result before it lands.
GhalebDweikat/winnowREADME ↗
# winnow
[](https://github.com/GhalebDweikat/winnow/actions/workflows/tests.yml)
A calibrated context sieve for Claude Code.
Every large `Read`, `Bash`, or `Grep` result is judged before it enters Claude's context. Blocks the judge is confident you don't need are replaced with a three-line stub: what was hidden, a one-paragraph summary from a cheap model, and a key that restores the full text on demand. Nothing is lost; it just stops costing tokens until you ask for it.
**Terms used below.** The *judge* is the model that answers one yes/no question per block ("is this block needed for the current task?") with a probability. By default that is **Jev**, TypeSafe AI's *System One* model: a model that returns calibrated probabilities for typed questions instead of generating text, so a hundred questions come back in one call in a few hundred milliseconds. Jev is in early access. The *adapter* is TypeSafe's `system-one-adapter` package, which answers the same questions by prompting Claude Haiku 4.5; it is not calibrated, but it lets the whole pipeline run today.
## What it does
```
Read big.py ──► Claude Code ──► tool.call hook ──► winnow
│
split into ~25-line blocks ◄─────────────────────────┘
one call to the judge: "is block N needed for the current task?" ×N, in parallel
keep confident-yes and uncertain blocks verbatim
hide confident-no blocks: cache full text ─► summarize ─► stub
│
Claude sees ◄── { result } ◄───────────────────────────────┘
```
A stub looks like this:
```
[winnow] Lines 41-188 (148 lines) hidden: judged unlikely to matter for the current task (relevance <= 0.22).
[winnow] Summary: