Show HN: Semantic/Structural diffs powered by Jev github.com · 3 points · 0 comm...
Show HN @show
Show HN: Semantic/Structural diffs powered by Jev github.com · 3 points · 0 comments · HN thread
TL;DR sem-jiff is a new open-source library (npm @plannotator/sem-jiff) that parses both versions of a file with tree-sitter and labels diff changes as moves, renames, reformats, extractions and inlines, so reviewers can skip changes that kept their meaning. It can optionally ask a decision model (Jev, with Cloudflare Clef as tie-breaker) about uncertain candidates. The post has 3 points and no comments.
- Returns semanticOperations, semanticFolds and a matching patch that any diff viewer can render; it powers the Sem tab in Plannotator code review.
- Labels moved, renamed, reformatted, reordered, extracted and inlined code, and falls back to a plain diff when unsure, preferring silence over wrong labels.
- Supports TypeScript/TSX, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, Kotlin and Swift in Node; browsers need WebAssembly grammars copied next to the app.
- Version 0.2.1 held back some Swift, Ruby and Kotlin move/rename/extract labels after a blind test found error rates above the project's 1-in-50 bar.
- On 187 TypeScript practice commits, the authors report 105 extracted/inlined functions found with 1 wrong claim, versus 73 found and 14 wrong for RefactoringMiner; with Jev, 148 found and 1 wrong.
- Optional Jev second opinion costs about $0.0004 per 500-line change, and answers are cached so reopening a diff is free.
Links in the post
- Plannotator launch post on X (Code Review Week 1/N): Promotional thread introducing sem-jiff as a semantic diff library that works with Jev or Cloudflare Clef, with a note about stacked PRs and CI limits as motivation.
- sem-jiff product page: Landing page describing sem-jiff's supported languages, Jev and Clef integration, benchmark tables against RefactoringMiner, and install command.
Discussion No comments have been posted yet, so there is no discussion to summarize. The story has 3 points and has received no visible engagement.