Code Intelligence

Requirements to code, with context in the middle.

ContextHarbor indexes a repository into a symbol, file, and relationship graph and serves it over MCP next to the project's requirements and decisions. Agents reach the right implementation with fewer exploration calls and fewer raw-code tokens.

Code IntelligenceInteractive sample

PROJECT / ATLAS

Change impact

What calls reserveStock, and what should I inspect before changing it?

Project-scoped

Sample code relationships found

Related code surfaced

The sample graph connects reserveStock to checkout submission and reservation renewal. Inspect both callers before changing its expiry argument or return value.

Next step: Confirm the graph matches the current revision, inspect the source, and run the checkout and reservation tests.

src/inventory/reserve-stock.ts · reserveStock

Sample symbol: reserveStock(sku, quantity, expiresAt). Called by submitCheckout and renewReservation.

src/checkout/submit.ts · submitCheckout

Sample relationship: submitCheckout → reserveStock. The caller uses the reservation identifier to confirm or release stock after payment.

Illustrative workflow with fictional project data. No live query is sent.

Progressive retrieval

From project brief to raw source, one layer at a time.

Each layer answers more precisely than the last. Agents stop as soon as they have enough, instead of reading the whole repository.

Project briefLinked repositories, analysis status, symbol and relationship counts, and index staleness via get_code_brief.
Code contextPrimary symbols, files, signatures, definitions, and callers for a query or requirement via code_context.
Impact / blast radiusCallers, dependent modules, related tests, and linked requirements affected by changing a symbol or file via code_impact.
Raw sourceOnly when the layers above are insufficient — the minimum necessary tokens, in the tool the developer already uses.

Agent-facing tools

Four MCP tools, alongside the project knowledge tools.

Code Intelligence adds its own tool group to the ContextHarbor MCP server. It respects the same project ACL as document retrieval.

ToolWhen to use
setup_code_graphFetch the self-install script that indexes the current repository into the code graph.
code_context(project, query)Find symbols, files, and signatures matching a query, with their callers.
code_impact(project, symbol)Blast radius of changing a symbol or file — callers, dependent modules, related tests, linked requirements.
get_code_brief(project)Linked repositories, analysis status, counts, and staleness.
ContextHarbor Code Graph tab for a project: indexed commit, branch, 6056 symbols across 900 files, 24505 relationships, status ready
The Code Graph tab on a project in the Web portal — indexed commit and branch, symbol, file, and relationship counts, and index status.
An OpenCode session: the agent looks up the ContextHarbor skill, calls context-harbor_get_code_brief for the project, explains what the tool is for, and runs a live index check showing status ready with file, symbol, and relationship counts
The same brief reached from a coding session — OpenCode looks up the ContextHarbor skill, calls get_code_brief over MCP, and verifies the index is ready before trusting code_context or code_impact.

Indexing the repository

One prompt to a connected agent. No hand-edited config.

Ask the agent"Index this repository into the ContextHarbor code graph for project SEG-PACE." The agent calls setup_code_graph, writes the returned script, and runs it.
Pick the branch onceThe first run per repository asks which branch to index — the branch you deploy from, which can differ from the git default.
Keep it freshLater runs auto-delta from the last indexed commit. Run ch code sync after a merge, or wire it into CI.

Auth reuses the same bearer MCP key the harness already holds — you are never asked for a key. Prefer copy-paste? The Web portal Project Setup page generates the same script.

Where this stands

Available now, with more depth on the way.

Working today

Repository indexing, incremental delta sync, and the code_context, code_impact, and get_code_brief tools over MCP, scoped per project.

Coming next

Module-level briefs, tighter requirement-to-symbol linkage, and CI/CD automation for GitHub Actions, GitLab CI, and Woodpecker.

Not in scope

A custom language server, an organization-wide code portal, or autonomous code modification. ContextHarbor stays a retrieval layer.

Code Intelligence

Give the agent the project behind the code.

Tell us about your repository structure and where fragmented context slows your team down.

Pricing depends on deployment, integration, and support requirements.