HeadlinesBriefing favicon HeadlinesBriefing.com

Semantic Diff Tool sem Adds Entity-Level Analysis to Git

Hacker News •
×

Sem offers Git-integrated semantic diffing, pinpointing changes at the function or class level across 13+ languages via tree-sitter parsing. Instead of line numbers, it highlights added, modified, or deleted entities like `validateToken` in `src/auth.ts`. The tool detects renames and structural changes, not just text edits, using three-phase matching: exact ID, structural hash, and fuzzy similarity. Tree-sitter enables native Rust parsing without WASM, while xxhash ensures efficient structural hashing.

Built as a library (`sem-core`) and used in tools like weave, it provides impact analysis and entity blame. MIT OR Apache-2.0 licensing supports broad adoption.