Context engine for AI coding agents
Context engine for AI coding agents
CCM (Context engine for AI coding agents) is a tool that bridges the gap between a codebase and AI editors by transforming static source code into a dynamic, queryable knowledge graph. It parses projects using tree-sitter, supporting 13 programming languages, and maintains a call and import graph along with an optional semantic index on disk. This graph is served to AI coding agents such as Claude Code, Codex, and Cursor through 10 MCP tools, allowing them to navigate, understand, and reason about the project structure. The tool is designed to keep the graph current while the user edits code. On a Django 5.1 project with 6,670 files, a saved change appears in graph results after a median of about 0.6 seconds when the embedder is off. Query responses include the index state, indicating whether the data is fresh, stale, or pending a re-index. A failed re-index does not replace the last valid graph. In a freshness benchmark involving one-function edits in Flask 3.0.3 and Django 5.1, every graph answer from 0.25 seconds after a save matched the edit; within the first 250 milliseconds before the watcher applied the event, a small number of probes returned pre-edit answers still labeled fresh. CCM provides graph queries such as find_usages, impact_of_change, and trace_call_chain, which give AI agents structural information that grep cannot: who calls a function, what a change might break, and which calls connect two places. In Python files, calls and other uses of a name are resolved through the syntax tree and file imports, including relative imports and package re-exports. Rust files are resolved through use paths, inline and file modules, impl blocks, and traits. For the other 11 languages, call edges are matched by name and labeled as inferred. The tool includes a 35-task pilot benchmark for search quality; in a 24-question benchmark on Flask and Django, version 0.4.0 tools answered with 74 percent fewer response bytes and a third fewer calls than version 0.3 tools.