Apache-2.0 open source · Local-first · Alpha

The context packet layer for AI coding agents.

Context Delta builds a small, fresh, inspectable packet — the files that changed, the tests that cover them, the spec that defines them, the rules that govern them — for Codex, Claude Code, GitHub Copilot, or any MCP agent. The default is quiet: prepare context, show risk, and interrupt only when something needs review.

~2,493 estimated baseline tokens ~645 focused tokens · ~74% smaller · related test kept · stale spec dropped

Real figures from the bundled demo workspace, counted with an exact tokenizer — reproduce with npm run packet -- "Add refresh token rotation for admin users" --workspace examples/demo-workspace.

Quick start

Use your agent normally. Let Context Delta prepare the context.

Local-first and tool-agnostic. No IDE switch, no account. Packets are built and stored locally; agents can use the handoff directly, while the full packet stays available as the audit trail. Works with or without git.

Apache-2.0 No account required Works without git CLI first MCP ready
# Agent-integrated path
npm install
npm run setup -- --target mcp

# Copy host config and connect your MCP-capable agent
npm run doctor -- --mcp

# Then ask your agent normally.
# The agent should call prepare_context before editing
# and review_context_drift before final review.
# Manual handoff path
npm install
npm run setup -- --target cli

npm run prepare -- "Review the current UI changes"
Context ready · risk=low · budget=low · warnings=0

# Paste the handoff into Codex, Claude, or Copilot.
# After the agent edits:
npm run drift

The failure mode

Most AI coding misses are context misses.

Agents often receive stale specs, random open files, missing tests, hidden prompt assembly, and too much unrelated code. Context Delta makes the working set visible, bounded, and current.

Without Context Delta

  • Old auth docs mixed with current requirements
  • Related tests missed
  • Repo instructions buried
  • Token cost unknown
  • Exclusions invisible

With Context Delta

  • Changed artifacts anchored first
  • Spec sections and tests included with reasons
  • Warnings and redactions shown
  • Compact packet and agent handoff ready
  • Metrics emitted without raw code by default

The demo in one glance

Less prompt noise, more useful context.

A packet turns a broad, messy context pile into the files, specs, tests, rules, and warnings the agent needs for the task at hand.

Before and after context packet comparison showing 74 percent context reduction

Real demo-workspace figures. Actual savings depend on your repo, the task, and which baseline you compare against — Context Delta reports the full spectrum (open-files, naive-agent, whole-repo), not one number.

1 Prepare npm run prepare -- "Add admin refresh token rotation"
2 Let the agent work prepare_context(task)
3 Review drift npm run drift

The honest question

Why not just use my agent's built-in context?

Codex, Copilot, and Claude Code already gather context for you. The difference is that they do it invisibly — you can't see what was sent, you can't correct it, and you can't measure it across a team. Context Delta turns context into an artifact you control.

Transparent, not hidden

Every included file, spec, and test carries a reason. Every exclusion is listed. The packet is available when risk or drift says review is needed.

Portable, not locked in

One local packet feeds Codex, Copilot, Claude Code, or any MCP agent. Change tools without rebuilding your context setup.

Measurable, not opaque

Privacy-safe metrics show context reduction, risk, and stale-spec warnings — without shipping raw source to a server.

How it works

A packet workflow that fits normal development.

01

Scan signals

Read git status or local snapshots, specs, docs, tests, instructions, and user controls.

02

Rank context

Prefer fresh changed files, matching spec sections, nearby tests, and governing rules.

03

Prepare handoff

Return a prompt-ready handoff plus risk, budget, warning, test, and spec signals.

04

Check drift

After agent edits, compare current changes with the latest packet and rebuild only when needed.

Under the hood

The context is good because the engineering is real.

Context Delta is not a prompt wrapper. Building a packet is a deterministic, local analysis pass — no embeddings, no model calls, nothing leaves your machine, in a fraction of a second.

Exact, per-model token math

Delivered context is counted with a real tokenizer — GPT-4o by default, or pin gpt-4, a gpt-5.x model, or any other — not a characters-÷-4 guess. Savings are reported against a transparent spectrum (open-files, naive-agent, whole-repo) so the number can never be cherry-picked.

A real dependency graph

Multi-hop impact analysis with distance decay follows imports and re-exports — barrel files included — and coverage edges surface the tests that actually import the code you changed. Works across JavaScript, TypeScript, and Python.

Local-first and honest

Every included file carries a reason and every exclusion is listed. Metrics are token-weighted, windowable, and never ship raw source by default. An end-to-end suite drives the live MCP server to prove the whole pipeline on every change.

Product surface

CLI, MCP server, and VS Code dashboard from the same local engine.

The engine writes packets, reports, diffs, handoffs, and manager summaries under `.contextdelta/`. Integrations stay thin, visible, and replaceable.

$ npm run prepare -- "Add refresh token rotation"

Context ready · risk=low · budget=low · warnings=0 · tests=2 · specs=1
Packet is ready for spec-driven AI coding.

$ npm run drift
Risk: low
Changed outside packet: 0

Sample CLI output. Token figures are computed locally per run with a real tokenizer (configurable per model).

Editor preview

A dashboard for context quality, not another place to work.

Developers can prepare context, copy a Codex, Claude, or Copilot handoff, check setup, review drift, and inspect diffs without leaving VS Code.

Context Delta VS Code dashboard preview

For Developers

Keep using Codex, Copilot, Claude Code, or local agents. Context Delta prepares the packet underneath.

For Spec-Driven Teams

Bring Spec Kit, tasks, acceptance criteria, implementation files, and tests into one visible working set.

For Senior Engineers

Inspect why files were included, what was excluded, what changed since the previous packet, and what risks remain.

For Leaders

Track estimated token savings, risk mix, stale spec warnings, redactions, and budget pressure without collecting raw code.

Observable by design

Measure context quality without making context opaque.

Useful-context density, eval results, and local rollups help teams improve quality without pretending token savings prove correctness.

Demo useful density 98% average useful-context density across the bundled gold set
Eval pass rate 3/3 demo cases passed with impact coverage and omission checks
Metrics stream JSONL repo-local rollups for managers and dashboards
Raw code in metrics 0 metrics avoid raw source and packet text by default

Demo numbers are real and reproducible from the bundled eval gold set (npm run eval:multi). Token reduction is a cost signal; packet-quality eval is the correctness signal.

Context Delta team metrics rollup preview

Start here

Prepare agent context in minutes.