context-packer ranks the files a coding task needs and hands them to your agent before it starts searching. It runs as a CLI, an MCP server or a Claude Code hook.
Keyword search alone: 69%. Measured on 120 real past changes from four open-source projects.
$ context-packer pack "Add exponential backoff with jitter to Jev HTTP retries" -p jev -n 3
Picked 3 of 36 files in 1.9 s.score path
0.89 src/jev.ts (edit)
0.33 src/service.ts
0.30 test/service.test.ts (test)9 Jev requests, 65,977 input tokens,about $0.0028.
69% → 78%
Needed files in the top 10: keyword search, then Jev, over 120 real changes.
$0.007
Average Jev cost per search, on projects of 73 to 1,222 files.
2.5 s
Average Jev search time on those projects. Keyword search took 53 ms.
3.5 s
Keyword search over the 14,004 files of a VS Code checkout.
Three ways to rank
Keywords is the default and needs nothing. Jev finds more of the right files. Laya keeps everything on your machine, at the cost of finding fewer.
Jev
TypeSafe's decision model reads a short sketch of every file, then the full source of a 120-file shortlist. It combines those scores with keyword rank, and a final call compares the top ten.
Needs
TYPESAFE_API_KEY
Cost
about $0.007 a search
Top 10
78% of needed files
Keywords
Classic keyword ranking (BM25) over paths and full source. It splits camelCase and snake_case names into words. No model and no key.
Needs
nothing
Cost
$0
Top 10
69% on the same tests
Laya
A small local model scores a 60-file keyword shortlist, one excerpt per request. Nothing leaves the machine, but it found fewer files than keyword search.
Needs
a local Laya server
Cost
$0, 27 to 54 s of CPU
Top 10
81%, where keywords got 87%
How a Jev pack works
Jev answers typed questions with calibrated probabilities. It can't write code, but it can judge hundreds of files quickly, so it does the looking and your agent does the editing.
01
Collect
Source files git tracks, plus new ones it doesn't ignore. Binaries, symlinks and files over 100 KB stay out.
02
Sketch
Each file becomes a summary of about 300 tokens: its path, package, declarations and their first doc lines.
03
Wide pass
Jev reads 60 sketches per call. Keyword search ranks the full text at the same time.
04
Narrow pass
The top 60 from each go into a pool, and Jev reads their source, 6 files per call.
05
Fuse and compare
Jev's probability and keyword rank count equally. One more call compares the top ten and reorders them.
Node 22 or newer. Without a key, everything runs on keywords.
The hook is the part that changes what the agent does. Agents tend to trust their own search and skip an offered tool; the hook ranks the project before the agent reads your prompt. It stays silent for short prompts, slash commands, replies like "thanks", and prompts whose words don't occur in the project.