How AI Mind Map Works

From source code to intelligent context — every layer explained

The Pipeline

Your code flows through these stages to become instant, queryable knowledge

📂

Your Code

60+ symbol types

30+ languages

🌳

Tree-Sitter AST Parser

14 native grammars

+ 20 regex fallback

🕸️

Knowledge Graph

Nodes + Edges

PageRank scoring

👁️

File Watcher

chokidar

real-time sync

📊

Change Tracker

git-aware

symbol-level diffs

💾

Persistent Memory

SQLite database

10 memory categories

⚙️

Context Engine

Compression · Progressive Disclosure · Smart Retrieval

🛠️

50+ MCP Tools

Search · Explain · Trace · Remember

stdio
🤖

Your AI Agent

Claude · Cursor · Copilot · Windsurf · Zed


Three-Tier Memory System

Like human memory — working, episodic, and semantic

Tier 1

Working Memory

Current conversation context

≤ 1,250 tokens
  • Active function signatures
  • Current file context
  • Immediate dependencies
Tier 2

Episodic Memory

Recent session history

≤ 5,000 tokens
  • Recent decisions & context
  • Session summaries
  • Change deltas
Tier 3

Semantic Memory

Permanent knowledge graph

Unlimited
  • Full codebase graph
  • Architecture patterns
  • Historical decisions

Supported Languages

14 native Tree-Sitter grammars + 20 regex fallback parsers

TSTypeScript
JSJavaScript
🐍Python
🦀Rust
GoGo
Java
CC
C++C++
C#C#
💎Ruby
🐘PHP
KKotlin
🕊️Swift
🎯Dart
$_Bash
🎨CSS
📄HTML
{}JSON

+ 20 more via regex fallback (YAML, TOML, Markdown, SQL, Lua, Zig, …)


Relationship Types

12 edge types capture every code relationship

calls

Function invocations

📥

imports

Module dependencies

📤

exports

Public API surface

🧬

inherits

Class inheritance

📋

implements

Interface contracts

🔗

uses

Variable references

🎀

decorates

Decorators/annotations

overrides

Method overriding

📦

contains

Nested symbols

🧪

tests

Test → implementation

⚙️

depends_on

External packages

🛣️

routes_to

Route → handler


PageRank-Powered Importance

Not all code is equally important. AI Mind Map knows which symbols matter most.

authenticate() Rank: 0.94
loginHandler() apiMiddleware() socketAuth() refreshToken() oauthCallback() testAuth()

Why PageRank?

Just like Google ranks web pages by incoming links, AI Mind Map ranks code symbols by how many other symbols reference them.

  • High rank — Called by many functions, critical to architecture
  • Medium rank — Moderate usage, utility functions
  • Low rank — Leaf nodes, called by few or none

Edge weights affect ranking: calls (1.0), inherits (0.8), imports (0.5), uses (0.3)