# Repository Briefing: Jakedismo/codegraph-rust
> Source: https://repoforai.com/repo/Jakedismo/codegraph-rust (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Jakedismo/codegraph-rust
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Rust
- **License**: See repository
- **Engineering Health**: B (54/100 · Maintenance 26/35 · Adoption 16/25 · Releases 6/20 · License 6/20)
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI, MCP
- **Momentum**: 927 ★ total (+0 24h / +5 7d) · 100 forks
- **Topics**: `agents`, `ai-agents`, `ai-coding`, `claude-code`, `code-search`, `codex`, `coding-agent`, `context-engine`, `cursor`, `gemini-cli`, `graphrag`, `rag`
- **When to Use**: Best for: Teams maintaining a shared codebase whose agents repeatedly need cross-file context, caller tracing, or package-boundary analysis, and that can keep the index and model providers operational. Skip if: Exact search and editor navigation already cover the work, or policy prohibits sending source to remote providers and the team cannot provision local inference.

## Overview
```text
### Architecture & Core Mechanics
CodeGraph is a Rust workspace with separate parser, graph, vector, and MCP crates, including dedicated MCP tool, server, and daemon crates. Indexing extracts source spans and relationships with AST parsing and FastML. The selected tier determines whether build context, LSP resolution, and enrichment also run. SurrealDB backs the code graph, while embeddings support semantic retrieval. The combination lets an agent retrieve relevant code and then follow its recorded relationships instead of treating each retrieved snippet as an isolated result.

The same four agentic operations are available through the CLI and MCP over stdio. Rig supplies the reasoning layer: ReAct is the default tool-calling loop, LATS explores and evaluates candidate branches using their graph observations, and Reflexion retries with error feedback. Index construction is separate from this query-time reasoning, and embedding and semantic-resolution scheduling can be configured independently of the extraction tier.

### Key Capabilities & Differentiators
The default `fast` tier keeps AST nodes and core edges without LSP or enrichment. `balanced` adds build context, LSP symbols, module links, and document and contract enrichment, while still filtering out `References` edges. `full` enables all analyzers and LSP definitions without that edge filtering. The richer graph can connect Markdown and SurrealQL documentation to backticked symbols, represent Rust-local dataflow, and surface package cycles or configured boundary violations.

`agentic_context`, `agentic_impact`, `agentic_architecture`, and `agentic_quality` cover context assembly, dependency and call-chain analysis, system structure and API surfaces, and complexity or coupling hotspots. Full, single-file, and watch indexing reconcile against the same project-wide catalog, retaining caller information across edits, renames, and deletions. For embeddings, Ollama and LM Studio are covered by batching controls; Ollama input handling accounts for model and serving context, including Qwen3 Embedding and `nomic-embed-text-v2-moe`.

### Trade-offs & Limitations
Compared with grep or editor LSP alone, CodeGraph is most useful when the starting point is a question rather than a known string or symbol, and the answer requires following relationships across files. It can retrieve by meaning and then traverse call or dependency edges. In exchange, the team has an index to keep current and an additional model in the query path. Treat change-impact output as evidence to verify, not as a complete list of everything a refactor will break.

Start with `fast` and move up when missing edge types limit useful answers; richer extraction adds analyzer and storage costs without guaranteeing better answers. Deferred inference can make structural graph data available before semantic processing finishes. LATS adds candidate exploration and evaluator calls, so use ReAct as a baseline before paying for the extra work. Cloud providers add network, quota, cost, and source-data considerations; local inference shifts the load to model-serving hardware. The Cargo workspace declares `MIT OR Apache-2.0`, but verify repository-level coverage and dependency and model terms before redistribution.

### Hardware & Deployment Guide
The Cargo workspace declares Rust 1.95 and edition 2024. It defaults to the core crate, so a plain workspace-root build should not be assumed to produce the CLI. The tree includes `install-codegraph.sh` and `install-codegraph-full-features.sh`. Configure embedding and LLM providers through the project `.env` or environment, then start with `codegraph index /path/to/project --index-tier fast`. Use the CLI directly or launch `codegraph start stdio` from an MCP client. The Python manifest is for test utilities, not the server runtime.

`balanced` and `full` fail early if required LSP tooling is absent. Check `rust-analyzer --version` from the target Rust project; JavaScript and TypeScript require Node.js and `typescript-language-server`, while Python requires Node.js and `pyright-langserver`. For offline Ollama use, pre-stage the model weights and tokenizer: recognized tokenizers can be downloaded on first use, but weights are not. No GitHub release is listed, so pin a source revision and validate build flags and indexing behavior before rolling it out to a team.
```

## Key Capabilities
```text
- Index tiers: `fast` keeps AST nodes and core edges; `balanced` adds LSP symbols and module linking; `full` adds definition resolution and dataflow.
- Incremental reconciliation: Full, single-file, and watch runs share a project-wide catalog, reuse unchanged artifacts, and write changed graph records and file metadata.
- Inference scheduling: Embedding and semantic resolution have independent `sync`, `deferred`, and `off` policies; deferred work is resumable.
- Embedding inputs: AST spans preserve whole functions or classes when they fit; oversized inputs split at Tree-sitter boundaries, and Ollama requests use `truncate=false`.
- Agent execution: Rig runs the same tools through ReAct, branching LATS with evaluator calls, or Reflexion with error feedback.
- Architecture rules: `codegraph.boundaries.toml` matches denied package dependencies and records `violates_boundary` edges.
```

## Quick Start / Clone
```bash
# Install LLVM so ld64.lld is on PATH (Homebrew)
brew install llvm

# Use the repo-provided Makefile targets
make build-llvm
make test-llvm
```
