@ruchit07/dcc
v0.2.0
Published
Compile token-budgeted LLM context from your codebase — deterministically. No embeddings, no inference, nothing leaves your machine.
Maintainers
Readme
DCC — Deterministic Context Compiler
Compile token-budgeted LLM context from your codebase — deterministically. No embeddings, no inference calls, nothing leaves your machine.
Give DCC a task — "fix the login redirect bug" — and it produces a compact, ranked Markdown package of exactly the code a coding agent needs, with a per-item provenance manifest explaining why each file was included. The output is the input to your agent (Claude Code, Cursor, Copilot, or anything that speaks MCP), replacing the 30–60% of tokens agents normally burn re-discovering files on every turn.
Built on tree-sitter + SQLite full-text search + personalized PageRank + Reciprocal Rank Fusion. No model, no network: the same task on the same commit yields a byte-identical package, every run.
Quick start
- Install the extension. Make sure Node.js ≥ 20 is installed (see Requirements below).
- Open your project and run
DCC: Index Workspacefrom the Command Palette. - Run
DCC: Open Context Compiler Chat, type a task, and copy the compiled package into your agent.
That's it — the index updates incrementally as you save files.
Commands
| Command | What it does |
|---|---|
| DCC: Index Workspace | Build or refresh the workspace index (incremental after the first run). |
| DCC: Open Context Compiler Chat | Task in → ranked context package out, with include/exclude toggles and copy/save. |
| DCC: Copy Repo Map | Token-budgeted, PageRank-ranked map of the codebase, seeded by your open tabs. |
| DCC: Search Symbols | camelCase/snake_case-aware symbol search with instant jump. |
| DCC: Index Stats | Files, symbols, and index health at a glance. |
Features
- Deterministic context packages — seeds extracted from your task (files, symbols, stack frames, quoted phrases) feed eight candidate channels: BM25, graph neighborhood, git co-change, recency, PageRank, impact slice, covering tests, and LSP references. Reciprocal Rank Fusion merges them; an intent-shaped token budget decides what ships. Every item in the package carries its provenance.
- Intent shaping —
bug-fix,feature-change,explain, andimpactintents reshape the package. Bug-fix packages include suspect commits (blame-based) and a guaranteed covering test. - Ten languages — TypeScript, TSX, JavaScript, Python, Go, Java, Rust, C#, Ruby, PHP. String-literal join keys connect cross-language pairs, such as a Go route handler and the TypeScript client that calls it.
- Monorepo-aware — project detection via manifest walking, with two-stage ranking anchored to the project your task is about.
- Fast — content-hash incremental indexing plus git-anchored resync: ~110 ms to re-sync a 4,500-file repository; warm context compiles in well under half a second.
- Policy Gate — secret redaction on every outbound package (12 regex packs plus an entropy backstop; counts are recorded, values never). Org-distributable path blocklists in
.dcc/policy.jsonoverride even explicit user includes. - Audit log — every compiled package is recorded in append-only
.dcc/audit.jsonlwith destination, files, hashes, scores, and redaction counts. Built for teams that need to answer "what context did the agent see?" - MCP server and CLI included — the same engine is available to agents over the Model Context Protocol and from the terminal (see below).
Use it with your agent (MCP)
The extension ships an MCP server exposing get_context, explain_symbol, and search_symbols. Point any MCP-capable agent at it — for Claude Code:
claude mcp add dcc -- node <extension-install-path>/dist/mcp.js /path/to/your/repoYour agent then requests ranked, secret-scrubbed, audited context packages on demand instead of grepping around your repository.
Use it from the terminal (CLI)
node <extension-install-path>/dist/cli.js index <repo>
node <extension-install-path>/dist/cli.js compile <repo> --intent=bug-fix "users can't log out"
node <extension-install-path>/dist/cli.js map <repo> --budget=2048
node <extension-install-path>/dist/cli.js explain <repo> getUserByIdEvery command accepts --db=<path>, so CI can build the index once and the whole team consumes it with zero cold start.
Extension settings
| Setting | Default | Description |
|---|---|---|
| dcc.repoMapBudget | 2048 | Token budget for the generated repo map. |
| dcc.nodePath | "" | Absolute path to a Node.js (≥ 20) binary. Leave empty to use node from PATH. |
Requirements
- VS Code 1.90+
- Node.js 20 or newer, reachable by VS Code. The DCC engine runs out-of-process on system Node (this is what keeps the native SQLite index fast and immune to editor updates). If VS Code is launched from the Dock and your Node is not on the GUI PATH — common with Homebrew keg-only installs — set
dcc.nodePathto the absolute binary path, e.g./opt/homebrew/opt/node@22/bin/node.
Privacy & security
- Nothing leaves your machine. No embeddings, no telemetry, no network calls. Indexing, ranking, and compilation are all local.
- Every outbound package passes the Policy Gate (secret redaction + path blocklists) and is recorded in the local audit log.
- The index lives in
.dcc/inside your workspace; delete the folder to remove all derived data.
Known limitations
- Retrieval quality is under active tuning; a built-in evaluation harness (
eval,mine-replay) measures recall on real fix commits so improvements are data-driven, not guesswork. - Very large repositories (100k+ files) are not yet performance-hardened.
- The engine requires system Node ≥ 20 (see Requirements).
Release notes
See the Changelog tab. 0.1.0 is the first Marketplace release: the full compile pipeline, ten languages, monorepo support, governance (Policy Gate + audit log), MCP server, and CLI.
Author: Ruchit Suthar · License: MIT
