Code Intelligence Engine

Your codebase,
understood.

31-language structural intelligence for AI-native IDEs. Tree-sitter parsing, knowledge graph, hybrid search.

$ cargo build --release

What BearWisdom Does

A structural search engine — not an LLM wrapper. Fast, deterministic, queryable.

Parse 31 Languages

Tree-sitter extracts every symbol, reference, and signature. Classes, functions, interfaces, enums — with full qualified names and scope paths.

Knowledge Graph

SQLite database with symbols, edges, and concepts. Call hierarchy, blast radius, cross-file references — all pre-computed and queryable.

6 Search Modes

FTS5 symbols, fuzzy matching, content trigram, regex grep, hybrid vector + text, and CodeRankEmbed semantic search.

4 Interfaces

CLI with 30+ JSON commands. MCP server for LLM agents. Web explorer with D3 force graph. Claude Code agent for conversational analysis.

Built for AI-Native IDEs

BearWisdom isn't an LLM optimization layer. It's a structural search engine that serves both the editor and the AI.

The Editor

Go-to-definition, find-references, symbol search, file explorer. The same APIs power IDE features and agent queries.

The AI

MCP server feeds structural context to any LLM. Blast radius before refactoring. Call chains before debugging. Concepts for onboarding.

The Developer

Web explorer for visual architecture review. Force-directed knowledge graph. Concept sidebar. Symbol detail with code preview.

Explore Your Architecture

BearWisdom Explorer — force-directed knowledge graph with concept sidebar
Symbol search results Symbol Search
Concept-filtered graph view Concept Filtering

Real screenshots from the BearWisdom web explorer running on Microsoft's eShop reference architecture.

Switch to the Flow tab to see a Sankey diagram of execution flows — from entry points through services to data stores. Click paths to pin them, hover to explore, and trace from specific symbols.

BearWisdom Flow — Sankey overview

Flow tab — Sankey diagram showing execution flows across an entire project. Nodes are colored by symbol kind (class, method, interface, constructor).

BearWisdom Flow — Controller trace

Tracing from CategoryApiController — shows the full call chain from controller methods through DI-injected services to repository operations.

30+ Commands, One Tool

Every query returns structured JSON. Pipe into jq, scripts, or your editor.

Index & Query
$ bw open ./eShop
675 files, 3451 symbols, 2909 edges (2.8s)
$ bw blast-radius Entity --depth 3
62 symbols affected across 24 files
$ bw calls-in PlaceOrder
8 callers: OrderController, OrderService, ...
$ bw architecture
9 languages, 12 hotspots, 4 entry points
Search & Navigate
$ bw hybrid "payment retry logic"
3 results (FTS5 + vector RRF)
$ bw fuzzy-symbols "CatServ"
CatalogService (0.92), CatalogServiceTest (0.87)
$ bw grep "throw.*Exception" --lang rust
14 matches across 7 files
$ bw symbol OrderService --refs
Kind: class · 18 refs · 4 methods
v0.2 Commands
full-trace <path> [symbol] — End-to-end execution trace across call graph and flow edges
smart-context <path> <task> — Smart context selection for LLM prompts
investigate <path> <symbol> — Combined deep-dive: info, callers, callees, blast radius
complete-at <path> <file> <line> — Scope-aware symbol completion
diagnostics <path> <file> — Unresolved refs and low-confidence edges for a file
quality-check --baseline <file> — Regression testing against a quality baseline
import-scip <path> <scip-file> — Import SCIP index for high-confidence edges

Benchmarks

v0.2 benchmarks test three conditions — MCP tools, CLI tools, and native Read/Grep/Glob — across 4 real-world projects spanning .NET, Go, and TypeScript. Composite score combines precision, recall, and efficiency (penalizing tool call count).

Project MCP CLI Native
eShop (.NET) 0.456 0.626 0.404
SimplCommerce (.NET) 0.627 0.574 0.433
go-gitea (Go) 0.294 0.414 0.302
react-calcom (TS) 0.534 0.549 0.380
Project MCP Tokens CLI Tokens Native Tokens
eShop (.NET) 29,812 21,843 37,538
SimplCommerce (.NET) 61,306 50,084 45,895
go-gitea (Go) 52,267 35,128 36,572
react-calcom (TS) 49,567 38,410 40,244
Key Findings

CLI wins 3 of 4 projects on composite score. Both BearWisdom conditions (MCP and CLI) consistently outperform native tools on graph-heavy tasks — blast radius, call hierarchy, cross-file references. Native tools use 2–4× more tool calls to reach the same answers. CLI's slim JSON output keeps token cost lower than MCP in most cases.

Run your own: bw-bench full --project /path/to/project --output results/

Roadmap

v0.2 — Current Release
v0.2
Flow Intelligence
Full Trace Engine
End-to-end execution flow tracing that walks the call graph AND cross-framework flow edges (DI, HTTP, events). Traces from specific symbols or auto-detected structural roots.
Smart Context (fixed)
Natural language task descriptions now return relevant symbols. Multi-strategy seeding: FTS5 raw, per-keyword, and LIKE fallback. Previously returned empty for anything that wasn't an exact symbol name.
Sankey Flow Visualization
New Flow tab in the web explorer. D3-Sankey diagram shows architecture flows from entry points through services to data stores. Click to pin paths, hover to explore, depth slider, symbol-specific tracing.
7 New CLI Commands
full-trace smart-context investigate complete-at diagnostics quality-check import-scip — bringing the total to 30+.
3-Condition Benchmarks
MCP, CLI, and Native conditions tested across 4 projects (eShop, SimplCommerce, go-gitea, react-calcom). CLI wins 3/4 on composite score. BearWisdom uses 2-4x fewer tool calls than native.
Integration Test Suite
43 new integration tests covering all query commands. 5 SCIP import tests. 6 quality-check tests. Total: 885 tests, 0 failures.
Cross-Language Sampler Fix
Benchmark sampler now supports TypeScript (NULL visibility) and Go (struct/type_alias kinds). Ground truth deduplication across all categories.
v0.3
Depth
Resolution engine
Per-language scope rules for 100% edge confidence — no more low-confidence cross-file edges.
RAG layer
Retrieve chunks, synthesize natural language answers via LLM.
Workspace / monorepo
Index multiple roots with cross-project references.
Git-aware indexing
Use git diff to scope re-indexing — faster than a full walk.
v0.4
Production
Plugin system
Custom connectors without forking.
Publish to crates.io
cargo install bearwisdom-cli
Streaming results
Stream search results as found for large codebases.

Get Started in 60 Seconds

Rust is the only prerequisite. No runtime, no daemon, no config file.

1
Build

Compile the CLI from source with a single cargo command.

cargo build --release -p bearwisdom-cli
2
Index

Point BearWisdom at any directory. Index builds in seconds.

bw open /path/to/your/project
3
Explore

Use the CLI, launch the web explorer, or register the MCP server with your IDE.

bw web # or bw mcp-serve

Inside BearWisdom

A thin set of consumer crates over a single intelligence library.

Parser
31 languages · Tree-sitter
Graph DB
SQLite · rusqlite
Search Engine
FTS5 · vector · hybrid
bearwisdom
core library · Rust
bw
CLI · 30+ cmds
bw-mcp
MCP Server
bw-web
Web Explorer
bw-bench
Benchmarks