v0.1.0 · MCP KNOWLEDGE SERVER

Codebase memory for every AI coding tool.

@codebase knows what is written today. WhyBase knows why it exists, which symbols break if you change it, and which files are fragile — 100% locally.

$ npx whybase init
MIT Open Source Node.js 20+ Zero Cloud APIs Multi-Repo Ready
127.0.0.1:4173
src/core/decisions.ts Impacted: 13
git-analyzer.ts types.ts decisions.ts cli/index.ts mcp/tools.ts ui/server.ts
recordDecision (3 callers) Co-changed: store.ts
THE CONTEXT GAP

Why AI coding agents still break production code

Traditional RAG indexes current source text, leaving agents blind to historical bugs, team constraints, and cross-module coupling.

Missing "Why" Context

Agents routinely strip out retry delays, race-condition locks, and defensive null guards because current syntax alone never reveals the outage that caused them.

Blind Downstream Edits

Changing an exported utility or database helper without tracing direct callers, symbol usages, and affected API routes causes silent regressions.

Fragmented Editor Rules

Rules isolated in .cursorrules, CLAUDE.md, or .continuerules drift apart across editors and never stay synced automatically.

Multi-Repo Blindness

Polyrepo and microservice workspaces split Git history across child folders. WhyBase auto-discovers nested Git repos and unifies hotspots in one graph.

CORE ARCHITECTURE

Built for local speed, team memory, and zero lock-in

Everything runs locally over Node.js 20+ with incremental mtime caching and Git-tracked Markdown/YAML guardrails.

Symbol-Level Blast Radius

Uses the TypeScript Compiler API with tsconfig.json path aliases and workspace package resolution to trace exact exported symbols and downstream routes/tests.

Time-Weighted Hotspot Radar

Parses commit history with rename tracking (git log -M) and recency weighting across bug fixes, reverts, and co-changed file coupling.

Polyglot Dependency Parsing

Resolves intra-repo imports across TypeScript, JavaScript, Python, Go (go.mod), PHP (PSR-4), Rust (crate::), and Java.

Visual Knowledge Graph UI

Run whybase ui to inspect interactive dependency graphs, expandable blast-radius flows, live SSE sync, and click files open directly inside your running IDE.

PR Check CI Quality Gate

Run whybase pr-check in GitHub Actions to generate blast-radius Markdown summaries and fail builds when fragile or impact thresholds are exceeded.

100% Private Local Sync

Zero API keys required. Optionally connect a local Ollama model (--ollama) to attach plain-English risk summaries to your hottest fragile modules.

MODEL CONTEXT PROTOCOL

Six structured MCP tools shared across every AI editor

Click any tool below to inspect the exact JSON payload WhyBase returns to Cursor, Claude Code, VS Code Copilot, Continue, Windsurf, or Antigravity.

get_blast_radius() response stdio JSON-RPC
{
  "target": "src/core/decisions.ts",
  "targetSymbol": "recordDecision",
  "directDependents": [
    "src/cli/index.ts",
    "src/mcp/tools.ts",
    "src/ui/server.ts"
  ],
  "symbolCallers": [
    { "symbol": "recordDecision", "callers": ["src/cli/index.ts", "src/mcp/tools.ts", "src/ui/server.ts"] },
    { "symbol": "getGuardrailsForPath", "callers": ["src/cli/pr-check.ts", "src/mcp/tools.ts"] }
  ],
  "affectedRoutes": ["POST /api/decisions"],
  "relatedTests": ["test/git-decisions.test.ts", "test/phase4-upgrades.test.ts"],
  "totalImpacted": 7
}
FAQ

Frequently asked questions

How is WhyBase different from @codebase indexing in Cursor or Copilot?

Vector @codebase search reads current file text to show what code exists today. WhyBase indexes Git history, bug-fix density, reverts, symbol-level callers, and team decision records so AI assistants understand why defensive code exists and what breaks if it changes.

Does WhyBase upload my source code or commit history anywhere?

No. WhyBase executes 100% locally on your machine via Node.js, local git log, and an MCP stdio server. Optional hotspot summaries use your local Ollama server when explicitly enabled.

Which editors and programming languages does WhyBase support?

whybase init configures MCP targets for Cursor, Claude Code, VS Code Copilot, Continue, and Windsurf, and works with Antigravity and other MCP clients. Dependency graphs support TypeScript, JavaScript, Python, Go, PHP, Rust, and Java.

Can I share WhyBase rules and decisions with my team via Git?

Yes. Rules (.ai-context/rules.yaml) and ADRs (.ai-context/decisions/*.md) are plain human-readable files meant to be committed to Git, while .ai-context/.cache/ stays git-ignored per developer machine.