Run git diff on any AI-generated pull request and you get the same experience: a wall of green and red lines that tells you bytes changed but not what actually changed. A function got renamed? Git shows a deletion and an addition. A method got split? Two deletions, two additions. The context lines — the ones surrounding the actual change — often outnumber the changes themselves. Sem fixes this. It is a new CLI tool from Ataraxy Labs that parses your codebase with tree-sitter, extracts every function, class, and method as a named entity, and diffs at that level. Instead of “lines 42–67 changed,” you get “validate_token() changed.”
Why Line-Level Diffs Are Showing Their Age
The unified diff format hasn’t changed since 1990. For most of its life that was fine — patches were small, humans reviewed them, and the context lines were enough to reason about intent. That era is over. AI coding agents (Claude Code, GitHub Copilot agents, Cursor, Codex) are generating pull requests that are, on average, 154% larger than pre-AI PRs according to the Google DORA 2025 report. A single agent session can produce thousands of changed lines across dozens of files. Asking a human — or another AI — to reason about what semantically changed from a unified diff is asking them to reconstruct meaning from the output of a tool designed for a different world.
The downstream cost is real. Qodo’s 2025 AI Code Quality Report found that 44% of developers who say AI degrades code review quality blame missing context as the root cause. Sem is a direct response to that missing context problem.
How Sem Works
Sem uses tree-sitter grammars to parse source code into a concrete syntax tree, then extracts named entities — functions, methods, classes — as first-class objects. When you run sem diff, it compares those entities across commits rather than comparing raw text. Renaming a function shows up as a rename, not a deletion plus an addition. Moving a method between files shows up as a move. The signal-to-noise ratio improves substantially.
The tool supports 28 languages, including Rust, Python, TypeScript, Go, Java, C++, Ruby, and Kotlin. It works in any Git repository with no configuration required beyond installation.
The Command Suite
Sem ships four core commands that together replace most of what you’d reach for from a semantic code understanding perspective:
sem diff — Entity-level diffs with word-level inline highlights.
sem diff # working tree changes
sem diff --staged # staged changes
sem diff --commit abc1234 # specific commit
sem diff HEAD~3..HEAD # commit range
sem diff --format json # JSON for pipelines and agents
sem blame — Per-entity blame rather than per-line. Instead of knowing which commit last touched line 54, you know which commit last touched process_payment().
sem blame src/payments.rs
sem impact — This is the feature that separates sem from syntax-aware diff tools like difftastic. Given a function name, sem builds a cross-file dependency graph and tells you what else would break if you changed it, including which tests are affected.
sem impact validate_token --file src/auth.rs
sem impact --tests validate_token # affected tests only
sem log — The history of a single entity across all commits that touched it.
sem log validate_token --file src/auth.rs --limit 20
The AI Agent Angle
Sem’s most important design decision is --format json. Every command can emit structured JSON rather than human-readable text, which makes sem composable with AI code review pipelines, custom agents, and CI systems. You pipe sem diff --format json into your review agent and it receives a list of named entities with their before/after signatures rather than a raw diff blob.
The accuracy improvement is significant: Ataraxy Labs reports that AI agents are 2.3x more accurate when given sem output compared to raw line diffs. That tracks with the broader research — AI reviewers lose coherence on large, noisy diffs. Giving an agent “validate_token() signature changed, three callers affected” is fundamentally different from giving it 200 lines of unified diff to reason about. For teams already running Claude Code, Copilot agents, or Cursor in agentic mode, adding sem to the pipeline is low-friction and high-return.
Cloud Mode and Performance
For large repositories, sem offers a cloud-hosted graph option. Heavy impact analysis queries take approximately 86ms from the cloud versus 573ms when rebuilt locally on large codebases. This is opt-in; the local tool works fine for most projects.
Getting Started
Install via Cargo or Homebrew:
cargo install --git https://github.com/Ataraxy-Labs/sem sem-cli
# or
brew install sem-diff
The project is on GitHub with 3,200+ stars and active development — v0.21.0 shipped July 10. The documentation covers the full command reference. It also picked up a mention in O’Reilly Radar’s July 2026 trends roundup, which tends to be a reliable signal that a tool has cleared the noise floor.
The Bottom Line
Git diff is a 35-year-old format built for a world where humans wrote every line of code in small, deliberate batches. That world is gone. If you are running AI coding agents and reviewing their output through raw git diff, you are asking a 1990 tool to explain 2026 code at 2026 velocity. Sem does not replace git — it adds a semantic layer on top of it that makes diffs meaningful again. Install it, run it on your next agent-generated PR, and see what you’ve been missing.





