agentic-diff
# AgenticDiff
**Understand what your AI coding agent changed — and why.**
AgenticDiff combines your AI agent's decision-making with its actual code changes into clear, reviewable diffs. Instead of digging through a raw wall of patches, you see changes grouped by intent, alongside visual architecture diagrams, test results, and a built-in review loop to send feedback straight back to your agent.
Works natively as an **MCP App** in **Antigravity**, **Claude Code**, **Claude Desktop**, **Cursor**, and other MCP clients — or standalone right in your browser.

---
## Why AgenticDiff?
- **The "why" next to the "what"** — Your agent groups related edits into logical **Decisions** explaining the reasoning behind each change.
- **No silent edits** — Every changed line is checked against your agent's decisions. Anything left unexplained is automatically highlighted under **Unexplained Changes**.
- **Readable refactors** — Renamed, moved, or split functions stay paired side-by-side instead of showing up as unrelated deletions and additions.
- **Built-in feedback loop** — Approve, flag, or comment on any decision or file, then send structured review notes right back to your AI assistant.
---
## A Quick Tour
### 1. Reasoning Right Above the Code
Pick any decision from **Overview** or the **Decisions** tab to read your agent's reasoning first, then expand the related files underneath to inspect the exact diff. Approve what looks good, flag what needs work, or leave targeted comments right where they belong.

### 2. Visual Structure with UML Diff
Need the big picture? **UML Diff** maps out added, modified, and renamed classes, interfaces, and dependencies automatically. Scroll to zoom, middle-click drag to pan, and click any block to preview its diff right next to the diagram.

### 3. Confidence in One Place with Tests
The **Tests** tab shows everything your agent ran to verify its work — automated **Test Suites** (with newly added tests badged `NEW`), **Build & Checks** (typecheck, build, lint), and **Manual Checks** — each linked back to the decisions it verifies.

### Plus Everything Else You Need
- **Files tab**: Classic unified or side-by-side file diffs with a collapsible repository tree.
- **Snapshots**: Already have uncommitted edits before your agent starts? Snapshots isolate only the changes your agent made.
- **How To tab**: A searchable built-in guide right inside the app whenever you need a refresher.
- **Dark & Light themes**: Switch themes or adjust diff context lines anytime in Settings.
---
## How the Review Loop Works
1. **Your agent makes edits** and presents its changes (along with its reasoning and test results).
2. **You review at your own pace** — start in **Overview**, drill into **Decisions**, **Files**, **UML Diff**, or **Tests**.
3. **Mark what matters** — click **Approve** (green tick), **Flag** (red flag), or add comments on decisions, files, or general notes.
4. **Send feedback back** — click **Send Review to Agent** (or **Copy Review Markdown**) in the bottom bar to give your AI clear, structured instructions on what to fix next.
---
## Install & Get Started
Requires **Node.js 20+**.
### Antigravity (One-Command Plugin Install)
Installs the plugin (MCP server, sidebar & side-pane entrypoints, and agent skill) automatically — no restart required:
```bash
npx -y @jakethorn/agentic-diff install
```
Open the side pane **`+`** menu → **Semantic Diff**, or ask your agent to present a semantic diff.
### Claude Code
```bash
claude mcp add agentic-diff -- npx -y @jakethorn/agentic-diff
```
### Claude Desktop, Cursor & Other MCP Clients
Add this entry under `mcpServers` in your MCP configuration:
```json
{
"mcpServers": {
"agentic-diff": {
"command": "npx",
"args": ["-y", "@jakethorn/agentic-diff"]
}
}
}
```
### Try It Right Now in Your Browser
Want to explore the UI first with built-in example refactors (no MCP setup needed)?
```bash
npx -y @jakethorn/agentic-diff web --demo ts # TypeScript / React refactor demo
npx -y @jakethorn/agentic-diff web --demo cpp # C / C++ refactor demo
npx -y @jakethorn/agentic-diff web --repo . # Inspect uncommitted changes in your current repo
```
---
## Language Support
AgenticDiff understands symbol-level structure and UML relationships out of the box for **TypeScript, JavaScript, TSX, JSX, C, and C++**, and falls back smoothly to line-block diffs for every other language and file type.
---
<details>
<summary><strong>Local Development</strong></summary>
```bash
git clone https://github.com/jakethorn/AgenticDiff.git
cd AgenticDiff
npm install
npm run build
npm test
```
Useful scripts:
```bash
npm run preview:demo # Launch TypeScript demo in browser
npm run preview:demo-cpp # Launch C/C++ demo in browser
npm run preview:web -- --repo . --base HEAD
npm run install:plugin # Install Antigravity plugin pointing to your local build
```
</details>
## License
MIT — see [LICENSE](./LICENSE).
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes, and the app-only prefix cleanly separates UI/session helpers from agent-facing actions. There is some overlap between present_diff and open_diff_viewer, since both can analyze changes and open the Semantic Diff viewer, but the descriptions clarify that present_diff is the annotated analysis workflow while open_diff_viewer is the niche viewer command.
Core tools follow a readable verb_noun snake_case pattern, and app-only tools are consistently prefixed with app_. The only minor deviation is app_reanalyze, which is a prefixed verb without a noun object, but the overall convention remains predictable.
Seven tools are well-scoped for an agentic diff review server. The set is compact but covers baseline capture, annotated diff presentation, viewer access, session retrieval, raw diff retrieval, review persistence, and reanalysis without obvious bloat.
The surface covers the full diff-review lifecycle: snapshotting a baseline, presenting annotated changes, opening the viewer, fetching session and raw diff data, saving review state, and reanalyzing against a different baseline. No obvious lifecycle gaps remain for the stated purpose.