Deep Dive

Powerful features for codebase intelligence

Every tool you need to understand, query, edit, and optimize your codebase.

Architecture

Source Code
PythonTypeScriptRustJavaC+++6 more
Tree-sitter AST Parsing
Language-agnostic abstract syntax tree analysis
Knowledge Graph (Memgraph)
15 Node Types
ProjectPackageFolderFileModuleClassFunctionMethodInterfaceEnumTypeUnionModuleInterfaceModuleImplementationExternalPackage
15 Relationship Types
CONTAINS_PACKAGECONTAINS_FOLDERCONTAINS_FILECONTAINS_MODULEDEFINESDEFINES_METHODIMPORTSEXPORTSEXPORTS_MODULEIMPLEMENTS_MODULEINHERITSIMPLEMENTSOVERRIDESCALLSDEPENDS_ON_EXTERNAL
RAG System
NL → Cypher → Results → AI Response

Tree-sitter AST Parsing

Robust, language-agnostic parsing using Tree-sitter grammars. Extracts functions, classes, modules, imports, and call relationships with full source location tracking.

LanguageStatusExtensions
PythonFully Supported.py
TypeScriptFully Supported.ts, .tsx
JavaScriptFully Supported.js, .jsx
RustFully Supported.rs
JavaFully Supported.java
C++Fully Supported.cpp, .h, .hpp, .cc
LuaFully Supported.lua
C#In Development.cs
GoIn Development.go
PHPIn Development.php
ScalaIn Development.scala, .sc

Knowledge Graph Architecture

Your codebase stored as an interconnected graph in Memgraph. Nodes represent code entities, edges represent relationships like calls, imports, contains, and inherits.

Nodes: Function, Class, Module, File, Package
Edges: CALLS, IMPORTS, CONTAINS, INHERITS, IMPLEMENTS
Properties: name, file_path, line_number, source_code, language

Natural Language Querying

Ask questions in plain English. The AI translates your intent into Cypher queries, executes them against the graph, and returns human-readable answers.

# Natural Language Queries
> "What functions call the authenticate method?"
> "Show me all classes that implement the Logger interface"
> "Find functions with more than 50 lines in the auth module"
> "What are the dependencies between the payment and user modules?"

AI-Powered Code Editing

Surgical code replacement that targets specific functions using AST analysis. Preview diffs before applying changes with exact code block modifications.

# Surgical Code Replacement
> replace_code(
file="auth/login.py",
function="authenticate_user",
new_code="...updated code..."
)
✓ Replaced authenticate_user in auth/login.py (lines 42-51)

Interactive Code Optimization

AI analyzes your codebase with language-specific best practices. Review each suggestion interactively and apply with confidence.

# AI-Powered Optimization
> optimize_codebase(scope="auth/", focus="security")
Suggestions:
1. [auth/login.py:42] Add rate limiting to authenticate_user
Impact: HIGH | Type: Security
[Accept] [Reject] [Modify]
2. [auth/token.py:15] Use constant-time comparison for token validation
Impact: HIGH | Type: Security
[Accept] [Reject] [Modify]

Semantic Code Search

Find functions by describing what they do. Search by intent rather than exact names.

# Semantic Search — find by intent, not by name
> semantic_search("error handling functions")
Found 5 results for "error handling functions":
1. auth.exceptions:handle_auth_error (score: 0.923)
2. api.middleware:error_handler (score: 0.891)
3. db.retry:handle_connection_failure (score: 0.847)
4. payments.stripe:handle_webhook_error (score: 0.812)
5. utils.logging:log_and_reraise (score: 0.798)
> semantic_search("user authentication and login")
Found 3 results:
1. auth.login:authenticate_user (score: 0.951)
2. auth.token:verify_jwt_token (score: 0.887)

MCP Server / Claude Code

Full MCP server integration with 10 tools available directly in Claude Code. Query, edit, search, and optimize without leaving your terminal.

query_codebaseget_function_codesearch_codereplace_codeoptimize_codebaseget_graph_schemaget_graph_statsexport_graphsemantic_searchexecute_command

Graph Export & Real-Time Updates

Export your knowledge graph data for external analysis. The graph updates in real-time as your codebase changes — re-parse to capture the latest structure.

{
"nodes": [
{
"node_id": 0,
"labels": ["Module"],
"properties": {
"qualified_name": "auth.login",
"name": "login",
"path": "auth/login.py"
}
},
{
"node_id": 1,
"labels": ["Function"],
"properties": {
"qualified_name": "auth.login:authenticate_user",
"name": "authenticate_user",
"decorators": []
}
},
{
"node_id": 2,
"labels": ["Class"],
"properties": {
"qualified_name": "auth.login:AuthService",
"name": "AuthService",
"decorators": []
}
}
],
"relationships": [
{
"from_id": 0, "to_id": 1,
"type": "DEFINES",
"properties": {}
},
{
"from_id": 1, "to_id": 5,
"type": "CALLS",
"properties": {}
}
],
"metadata": {
"total_nodes": 1247,
"total_relationships": 3891,
"exported_at": "2025-01-15T10:30:00+00:00"
}
}

Extensible Language Support

Adding a new language is straightforward thanks to the unified Tree-sitter architecture. Each language parser produces the same graph schema, so all query and editing tools work automatically with new languages.