How TokenCap Picks Files for a Task: Rare Words, Four Fields, Exact Identifiers

●1 ●12 ●49
calendar_today ago • schedule1 min read

How a TokenCap task pack picks files.

  • Each task word is weighted by how rare it is in the repository.
  • Words are matched against the file name (weight 3.0), declared symbols (1.5), directory (1.0) and full text (1.0, BM25-saturated).
  • A light stemmer: "cookies" meets "cookie", "validating" meets "validate".
  • Identifiers in the task (allShortcodes, DATABASE_URL) are matched exactly, in joined, snake_case and kebab-case spellings. File paths and stack frames are looked up directly.
  • Risk, impact and recent change are small multipliers on files that already match. They never admit a file alone.
  • Every file in the pack says why it was included, and ask lists the files it left out.
tokencap ask "allShortcodes includes drafts" --json

Benchmark: 89% of needed files shown as code, 74% of edited lines in the pack, at a median 18.4x fewer tokens than a keyword grep over 100 real commits. Grepping everything still finds more, 96%.

See tokencap.vansharora.app

Want more deep dives?

Join 6,168+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

Everyone says DeepSeek is cheaper, but I got tired of guessing the exact math. So I built a calculat

abarth23 - Apr 27

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelski - Mar 19

Python for commerce students, from a former bio kid

rahuldk1105 - Oct 30

The Audit Trail of Things: Using Hashgraph as a Digital Caliper for Provenance

Ken W. Algerverified - Apr 28

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9
chevron_left
2k Points • 62 Badges
Jaipur, India • t.co/BRmkFprjYq
25Posts
10Comments
16Connections
tech freak

Related Jobs

View all jobs →

Commenters (This Week)

13 comments
3 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!