Stop Dumping Your Entire Repository Into AI TokenCap released v0.7 — Smart Retrieval Engine, which allows developers to query their codebase with natural language instead of manually assembling context for AI tools. The engine searches across project intelligence, adapts retrieval strategy based on the query type, and uses a knowledge graph to include related files and dependencies. It also reuses TokenCap's Context Packing system to fit large repositories into AI context limits. One of the strangest workflows in modern software development looks like this: The problem isn't the AI. The problem is context retrieval. After building TokenCap's Knowledge Graph, Debug Handoff, Change Intelligence, and Context Packing systems, I realized something: We had become very good at generating context. We were still terrible at finding it. That's what led to TokenCap v0.7 — Smart Retrieval Engine . Instead of asking: Which files should I send to the AI? What if you could simply ask: tokencap ask "How does authentication work?" and let the tool figure out the rest? The new retrieval engine searches across multiple sources of project intelligence: It doesn't just find matching files. It finds the files that matter. A search for: tokencap ask "debug login redirect" automatically switches into debug mode. A search for: tokencap ask "review payment flow" switches into review mode. A search for: tokencap ask "explain dashboard architecture" switches into architecture mode. The retrieval strategy changes based on what you're trying to achieve. One thing I wanted to avoid was returning isolated files. Real systems are connected. If a file is relevant, its dependencies are often relevant too. TokenCap traverses the graph to find related files, dependents, and neighboring modules before building the final context package. Even after finding the right files, another challenge remains: Token budgets. The retrieval engine reuses TokenCap's Context Packing system to decide what deserves: This allows larger repositories to fit into practical AI context limits without losing important information. The evolution of TokenCap has been interesting: For the first six versions, the focus was: Generate better context. With v0.7, the focus becomes: Retrieve the right context. That's a subtle difference. But I think it's the difference between AI tools that know code and AI tools that understand projects. Website: tokencap.vansharora.app NPM: https://www.npmjs.com/package/tokencap https://www.npmjs.com/package/tokencap npm install -g tokencap Then ask your repository a question: tokencap ask "How does authentication work?" Instead of manually assembling context, let the repository tell the AI what matters. Feedback, ideas, and contributions are always welcome.