Project Context — Intelligence Engine
Reference:
[PROJ-EBQKC-TNHEV] Intelligence Engine @ intelligence-engine
What This Project Is
A local code intelligence engine powered by GitNexus patterns — AST-driven knowledge graphs, hybrid search (BM25 + Semantic + Cypher), and MCP server integration — running on WSL Ubuntu alongside the existing MCP server ecosystem.
Problem Statement
The user manages 113+ projects across ``. Current tooling (PAAF, Smart Inventory MCP) can audit docs and scan for debt markers, but cannot understand code structure — what calls what, where dependencies flow, what the blast radius of a change is. This engine fills that gap.
Core Capabilities
- Parse codebases using Tree-sitter into ASTs (6 languages: Python, JS, TS/TSX, Java, Go)
- Build a knowledge graph of code entities and relationships (KuzuDB + NetworkX dual-backend)
- Generate embeddings for semantic search (all-MiniLM-L6-v2 + LanceDB)
- Provide hybrid search combining BM25, semantic, and graph search with 3-way RRF fusion
- Expose via MCP — 11 tools for Claude Code and other agents
- Web UI — React/Sigma.js graph explorer with FastAPI backend (15 endpoints)
- Incremental indexing — git diff + hash fallback, ~3-4s for small changes vs ~60s full
- AI-powered summaries — 4 LLM providers (Claude, OpenAI, Gemini, Ollama) for entity summaries
- Run 100% locally on WSL Ubuntu — no code leaves the machine
Technology Stack
- Language: Python 3.12+ (backend), TypeScript (frontend)
- AST Parser: py-tree-sitter (6 language grammars)
- Graph DB: KuzuDB 0.11.3 (default) + NetworkX (fallback)
- Vector Store: LanceDB
- Embeddings: all-MiniLM-L6-v2 (384-dim, CPU-only)
- Keyword Search: BM25 (rank_bm25)
- MCP Server: FastMCP
- Web: FastAPI + React 18 + Sigma.js 3 + Vite 6 + Tailwind CSS v4
- Package Manager: uv (Python), npm (frontend)
Key Constraints
- Personal-use tooling (not enterprise)
- Fail loudly, never silently
- No backward compatibility
- MVP-first, each phase building on the last
- Reuse existing project code where possible
- Local only — no data leaves the machine
Implementation Phases (All Complete)
- Phase 1 (MVP-0): AST Parsing & Entity Extraction (51 tests)
- Phase 2 (MVP-1): Knowledge Graph Storage (40 tests)
- Phase 3 (MVP-2): BM25 + Hybrid Search (43 tests)
- Phase 4 (MVP-3): MCP Server — 10 tools (23 tests)
- Phase 5 (MVP-4): Multi-Project Registry (35 tests)
- Phase 6 (MVP-5): Semantic Embeddings (34 tests)
- Phase 6.5: KuzuDB Migration (73 tests)
- Phase 7 (MVP-6): Web UI — FastAPI + React/Sigma.js (25 tests)
- Phase 8: Multi-Language Support — 6 languages (215 tests)
- Phase 9: Incremental Indexing (46 tests)
- Phase 10: Performance Dashboard — per-phase timing, health snapshots, 4-tab UI (24 tests)
- Phase 11: AI-Powered Summaries + KuzuDB Lock Fix — 4 LLM providers, ie_summarize, SettingsDialog (38 tests)
Total: 647 tests passing, 12 projects indexed.
KB Documents
All detailed reference material is in KB/:
CLAUDE.md— Main instruction documentREF-gitnexus-architecture.md— GitNexus architecture deep-diveREF-existing-projects-audit.md— Reusable code audit across 49+ projectsREF-implementation-phases.md— Detailed step-by-step implementationREF-mcp-integration-guide.md— MCP server integration patternsREF-technology-stack.md— Technology choices and installationmemory-systems-guide.md— Memory integration guide