Context Router

•
12
•

Selects the minimum useful context across code structure, runtime evidence, and project memory for AI coding agents, reducing token consumption by 64–80% for coding tasks.

AI coding agents perform optimally with focused, relevant context rather than full codebases. Context Router addresses this by indexing your repository's symbols, dependencies, call graphs, and test coverage into a local SQLite database. It intelligently ranks candidate files based on structural relevance, query similarity, and community membership, ensuring your agent receives only the most pertinent information for review, debug, implement, or handover tasks. This process enforces a configurable token budget, significantly reducing prompt sizes, and transparently explains every selection decision. It operates as a versatile CLI, an MCP server, or a Python library, requiring no external API keys.

主要功能

01Indexes repository symbols, dependency edges, call graphs, and test coverage into a local SQLite database
02Ranks context candidates by structural relevance, query similarity, and community membership for various task modes
03Enforces configurable token budgets, achieving 64–80% token reduction on average
04Supports multi-repo workspaces with cross-repo confidence boosting and unified ranked pack generation
05Acts as an MCP server, providing 13 tools compatible with Claude Code, Cursor, and Windsurf
060 GitHub stars

使用案例

01Generate minimal context packs for AI agents during code reviews or feature implementation
02Debug code failures by analyzing error files and ranking relevant files by blast radius
03Provide relevant project memory (observations, ADRs) for agent onboarding or sprint handover tasks