README.md

May 24, 2026 · View on GitHub

Dextree

See what your code actually does — and what your next commit could break.

An interactive semantic graph of your codebase. Live in VS Code. Powered by Tree-sitter + DuckDB.

CI CodeQL OSV-Scanner Coverage License: MIT Status: Pre-alpha OpenSSF Scorecard OpenSSF Best Practices


What it does

Three things every codebase tool should do — but doesn't.

Blast radius

Point at any branch, commit, or PR. Get a live visualization of exactly what the change could break — with a risk score and the core files in the impact zone.

VS Code fusion

The graph is enriched with live diagnostics, git blame, and test discovery — signals headless competitors literally can't access. Ask "most-edited unused public function with type errors and no tests" as one query.

Goes where you work

Mermaid · Obsidian Canvas · PNG · PDF · SVG · SCIP · MCP server for Claude / Cursor / Copilot · Vite component for your docs site.


Status — pre-alpha

Dextree isn't on the Marketplace yet. v0.1 is in active development. Watch this repo to get the release notification.

VersionStatusShips
v0.1🔨 in progressGraph view, Tree-sitter indexing, Mermaid export
v0.2nextLSP enrichment, diagnostics overlay, blast radius
v0.3plannedCanvas / PNG / PDF / SVG export, MCP server
v0.4plannedAlfred — opt-in LLM narrative reports

Active slices are tagged status:in-progress. Open issues ready for pickup are tagged status:specced.


Why a code graph at all?

Most code intelligence tools answer "what does this symbol do?" Dextree answers a different question: "what depends on it, and what would break if I change it?"

That sounds obvious. It isn't — because the answer requires:

  1. A structural graph of every file in the repo (Tree-sitter pass)
  2. A semantic graph with type-accurate edges (LSP pass)
  3. Live context from your editor: diagnostics, blame, test discovery
  4. A query engine fast enough to answer in milliseconds

Everyone has one or two. Dextree has all four, fused into one DuckDB file. No server, no daemon, no tsserver of doom — just an embedded graph that knows your code the way you do.

The full architectural pitch is in .dextree/design.md.


Quickstart — when v0.1 ships

# In VS Code
Cmd+P ext install dextree

# In your project
Cmd+Shift+P Dextree: Index Workspace

That's it. Open the graph view, click any node, follow the call edges.

Want it sooner? See Development — clone, build, and you have it locally today.


Commands

CommandWhat it does
Dextree: Index WorkspaceIndex the current workspace into the embedded graph
Dextree: Open Graph ViewOpen the interactive WebGL graph webview
Dextree: Export as MermaidExport the current view as a .mmd file
Dextree: Show Blast RadiusAnalyze impact of current branch vs main (v0.2)
Dextree: Run Alfred Prompt…Run a markdown prompt template against the graph (v0.4)

Configuration

Settings reference
{
  "dextree.indexing.languages": ["typescript", "javascript", "python"],
  "dextree.indexing.autoIndex": true,

  "dextree.blastRadius.coreFanInThreshold": 10,
  "dextree.blastRadius.coreFilePatterns": ["**/auth/**", "**/core/index.*"],
  "dextree.blastRadius.maxHops": 5,

  "dextree.alfred.enabled": false, // opt-in LLM, off by default
  "dextree.alfred.provider": "anthropic", // anthropic | openai | ollama
  "dextree.alfred.model": "claude-sonnet-4-6",
  // API key stored in VS Code SecretStorage — never in settings
}

Full settings reference: .dextree/design.md §9.2


Development

Dextree is built spec-first. Every change starts as a spec in specs/NNN-<slice>/, gets a plan + task breakdown, and only then turns into code. Any agent — Claude, Copilot, or a human — can pick up a spec and implement it. The spec is the contract; the agent is interchangeable. See .dextree/build.md for the operations manual.

git clone https://github.com/dgtalbug/dextree
cd dextree
pnpm install
pnpm build
ScriptWhat it does
pnpm devwatch mode (all packages)
pnpm buildbuild all packages
pnpm testvitest, all packages
pnpm typechecktsc, all packages
pnpm lintESLint, all packages
Project structure
packages/
  core/        — graph engine (parser, storage, query) — no VS Code deps
  extension/   — VS Code extension (webview, tree view, commands)
  alfred/      — LLM provider abstraction + prompt runner
  exporters/   — Mermaid, Canvas, PNG, PDF, SVG adapters
  mcp/         — MCP server
  cli/         — dextree CLI
  web/         — Vite-embeddable component
specs/         — slice specs (one folder per slice: spec.md, plan.md, tasks.md)
.dextree/      — design doc, rules, build playbook, alfred prompts
.specify/      — spec toolchain internals
.claude/       — repo-local Claude sub-agent definitions
.github/copilot-instructions.md  — Copilot agent guidance

Contributing a slice

  1. Read .dextree/build.md
  2. Find an open issue tagged type:slice and status:specced — each links to a spec under specs/
  3. Pick it up locally (fork → branch → PR), or comment @claude implement this / @copilot implement this to dispatch an agent

Architecture

Two-pass indexing over one DuckDB graph:

  • Pass 1 — Tree-sitter WASM parses every file structurally. Graph is usable in under a second.
  • Pass 2 — LSP semantic enrichment runs lazily in the background. Type-accurate call edges, resolved references, framework annotations upgrade the pass-1 graph in place.

Storage: DuckDB + DuckPGQ (ISO SQL:2023 graph queries) + vss (HNSW vector index, opt-in) + fts (symbol search). One embedded file. No server. No daemon.

The moat is editor fusion — live diagnostics, blame, test discovery — that headless tools simply can't see. Full pitch in .dextree/design.md §6.


License

MIT © 2026 @dgtalbug

Built on

Sigma.js · graphology · DuckDB · DuckPGQ · web-tree-sitter · Framer Motion · @modelcontextprotocol/sdk