Skip to content
CAI
Software that uses CAICheck a score

Wilfred/difftastic

56.3

Adequate · 27 September 2026

15.3k

lines of production code

Rust

with JavaScript

3

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Asciinema player to the homepage

The homepage now includes an Asciinema terminal player, with new CSS and JavaScript assets added to the static files. This enables the display of interactive terminal sessions on the page, allowing users to view and interact with recorded terminal output directly on the homepage.

_homepage/home\static · high confidence

Add Kotlin grammar and tooling to the vendored parsers

The vendored\_parsers/tree-sitter-kotlin directory now contains the complete tree-sitter grammar for the Kotlin language. This includes the core grammar definition (grammar.js), the generated C parser (src/parser.c), and supporting files such as the MIT license, build configuration (Makefile, binding.gyp), and CI workflows for building, testing, and publishing the parser to npm, crates.io, and GitHub. The addition enables syntax highlighting and code intelligence for Kotlin source files.

_vendored\parsers/tree-sitter-kotlin · high confidence

Add support for parsing and diffing files with Git conflict markers

The tool now parses files containing Git-style conflict markers (e.g., \<\<\<\<\<\<\<, =======, \>\>\>\>\>\>\>) to extract the left-hand side, right-hand side, and base versions of a file. This allows users to diff the conflicting states of a file directly, with the output showing the distinct changes for each side of the conflict. The implementation includes a new \conflicts\ module to handle the parsing logic and integrates with the main diffing pipeline to treat these extracted sides as standard input files.

src · high confidence

Added LaTeX grammar and bindings for tree-sitter

Added the \tree-sitter-latex\ parser, including the grammar definition (\grammar.js\), the generated C parser (\src/parser.c\), and language bindings for Python, Rust, Go, and Node.js. This enables syntax highlighting, code completion, and other language-server features for LaTeX documents.

_vendored\parsers/tree-sitter-latex · high confidence

Added Smali language support via vendored tree-sitter parser

The repository now includes a vendored copy of the \tree-sitter-smali\ parser, enabling syntax highlighting, code folding, and structural parsing for Smali files. This addition brings in the grammar definition, C-based external scanner, and language bindings for Node.js, Rust, and Swift, along with associated test cases and configuration files.

_vendored\_parsers/tree-sitter-hare, vendored\_parsers/tree-sitter-janet-simple, vendored\parsers/tree-sitter-smali · high confidence

Added support for Hare, Janet, Kotlin, LaTeX, and Smali languages

The editor now supports syntax highlighting and code navigation for Hare, Janet, Kotlin, LaTeX, and Smali. This is achieved by integrating new tree-sitter parsers for these languages, allowing users to edit files with these extensions with improved accuracy.

_vendored\parsers · high confidence

Added syntax highlighting for Ada, C\#, CMake, Devicetree, Hare, HCL, Janet, Julia, Kotlin, LaTeX, Newick, Pascal, Protocol Buffers, Smali, and Verilog

Users can now see syntax-highlighted code for a wide range of new and updated languages, including Ada, C\#, CMake, Devicetree, HCL, Julia, Kotlin, LaTeX, Newick, Pascal, Protocol Buffers (proto), Smali, and Verilog. This update also includes improved highlighting for C++, CMake, and other existing languages, ensuring consistent and accurate visual feedback for these file types.

_vendored\parsers/highlights · high confidence

Chinese (Simplified) manual translation added

The Difftastic manual is now available in Simplified Chinese. This includes all core documentation pages (installation, usage, parsing, diffing, etc.) and the table of contents, allowing Chinese-speaking users to access the full guide in their native language.

translation/zh-CN/manual-zh-CN · high confidence

Expanded sample file coverage for regression testing

Added a large set of new sample files across multiple programming languages and formats—including Kotlin, Ada, Assembly, C header files, Rust, JavaScript, C\#, YAML, and others—to serve as regression test cases. These files cover specific edge cases such as UTF-16 detection, large adjacent lists, word diffing heuristics, and syntax highlighting for various languages, ensuring the diffing engine handles these scenarios correctly.

_sample\files · high confidence

Architecture

Refactor display logic into a dedicated submodule

The display-related code has been reorganized into a new \src/display\ submodule, splitting the previous monolithic structure into focused modules: \context\ for calculating which lines to show, \hunks\ for grouping modified lines, \inline\ for unified diff output, \json\ for JSON serialization, \side\_by\_side\ for two-column output, and \style\ for coloring and formatting. This structural change improves code maintainability and separation of concerns without altering the user-facing diff output.

src/display · high confidence

Refactored diffing engine into a modular \`diff\` crate

The diffing logic has been reorganized into a new \src/diff\ module, separating concerns into distinct files: \changes.rs\ for tracking syntax node states, \graph.rs\ for the tree-diff graph representation, \lcs\_diff.rs\ for linear content diffing, \shortest\_path.rs\ for Dijkstra's algorithm, \sliders.rs\ for improving contiguous novel node handling, \stack.rs\ for arena-allocated stack operations, and \unchanged.rs\ for pre-diff unchanged node detection. This structural change improves code maintainability and performance by isolating the graph traversal, linear diffing, and slider correction logic.

src/diff · high confidence

Behavioural changes

Homepage redesign with dark theme and new features

The homepage has been redesigned with a dark theme (using Bootstrap's data-bs-theme="dark") and updated styling. The page now includes OpenGraph meta tags for better social sharing, a favicon, and improved CSS for mobile responsiveness and card padding. The layout features a new header, description, and a demo section. The page also includes a section for programming languages with SVG logos.

homepage · medium confidence

Improved handling of unordered syntax and delimiters

The diffing algorithm now better handles unordered syntax and delimiters, ensuring that changes to delimiters are correctly identified and displayed. This improves the accuracy of diffs for languages where the order of elements does not matter, such as in certain Lisp dialects and other tree-sitter-based languages.

(repo-wide) · high confidence

Manual build system and configuration updated

The manual build system has been updated to use mdbook 0.5, introducing a new book.toml configuration file that defines the book metadata, output settings, and redirects. A new script replaces the version placeholder with the actual cargo version, and the .gitignore file is updated to exclude the 'book' output directory.

manual · medium confidence

Refactor language detection and syntax tree representation

The language detection logic has been restructured into a dedicated module (guess\_language.rs) that maps file extensions and names to supported programming languages. Concurrently, the internal representation of the syntax tree has been refactored: the previous flat node structure has been replaced with a new Syntax enum that explicitly distinguishes between List and Atom nodes, each carrying specific metadata like content IDs and sibling pointers. This change improves how the tool identifies file types and structures the parsed output for diffing.

src/parse · high confidence

Refactored conflict marker parsing to use Option types for filenames

The \conflicts.rs\ module now returns \Option\<String\>\ for \lhs\_name\ and \rhs\_name\ in the \ConflictFiles\ struct, allowing for cases where filenames might be absent or invalid, rather than defaulting to empty strings. This change improves the handling of merge conflict markers by explicitly representing missing or unparseable filenames, which may affect how downstream components process or display conflict information.

_demo\_files/1, demo\files/2 · high confidence

Restructured demo files for the homepage

The homepage content has been moved from the root of the demo\_files directory into a dedicated subdirectory (demo\_files/1/index.html). This change reorganizes the static assets for the project's landing page, ensuring the HTML file is grouped with its associated resources in a structured folder layout.

_demo\files · medium confidence

Test coverage

Added CLI integration tests

Added a new integration test suite in \tests/cli.rs\ that exercises the command-line interface using \assert\_cmd\. The tests cover various scenarios including file diffing, binary file handling, exit codes, and specific flags like \--check-only\ and \--ignore-comments\.

tests · high confidence

Dependencies

Update dependencies and lockfile

The project's Cargo.lock has been regenerated and numerous dependencies have been updated to their latest compatible versions. This includes updates to core libraries such as clap, tree-sitter, and various tree-sitter parser crates, alongside maintenance bumps to build and test dependencies like cc, rayon, and assert\_cmd.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 50 → 56 (+6.5)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 89 → 77 (-11.3)
  • Architecture 69 → 100 (+31.0)
  • Maturity 57 → 65 (+7.9)
  • Readiness 32 → 84 (+52.1)
  • Security 76 → 73 (-2.8)
  • Accessibility 38 (new)

Resolved (18)

  • Dimension evaluation failed
  • FileTooLong: cli/format.js (demo_files/1/src/cli/format.js)
  • FileTooLong: cli/format.js (demo_files/2/src/cli/format.js)
  • High CVE: [GHSA redacted] (vendored_parsers/tree-sitter-latex/package-lock.json)
  • High CVE: [GHSA redacted] (vendored_parsers/tree-sitter-latex/package-lock.json)
  • High CVE: [GHSA redacted] (vendored_parsers/tree-sitter-latex/package-lock.json)
  • No automated tests
  • No exposed public API
  • No tests found
  • Test reliability not included
  • format (cognitive 21) (demo_files/1/src/cli/format.js)
  • format (cognitive 21) (demo_files/2/src/cli/format.js)
  • formatFiles (cognitive 62) (demo_files/1/src/cli/format.js)
  • formatFiles (cognitive 62) (demo_files/2/src/cli/format.js)
  • formatFiles (cyclomatic 45) (demo_files/1/src/cli/format.js)
  • formatFiles (cyclomatic 45) (demo_files/2/src/cli/format.js)
  • handleError (cognitive 18) (demo_files/1/src/cli/format.js)
  • handleError (cognitive 18) (demo_files/2/src/cli/format.js)

New (158)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (src/line_parser.rs)
  • Duplicated block (101 lines × 2) (demo_files/1/src/main.rs)
  • Duplicated block (11 lines × 2) (src/diff/sliders.rs)
  • Duplicated block (11 lines × 2) (src/display/context.rs)
  • Duplicated block (11 lines × 2) (src/display/side_by_side.rs)
  • Duplicated block (11 lines × 3) (src/main.rs)
  • Duplicated block (11 lines × 7) (src/parse/tree_sitter_parser.rs)
  • Duplicated block (11–12 lines × 3) (demo_files/1/src/main.rs)
  • Duplicated block (12 lines × 2) (src/diff/changes.rs)
  • Duplicated block (12 lines × 2) (src/line_parser.rs)
  • Duplicated block (13 lines × 2) (demo_files/1/src/main.rs)
  • Duplicated block (13 lines × 2) (demo_files/1/src/main.rs)
  • Duplicated block (13 lines × 2) (src/display/side_by_side.rs)
  • Duplicated block (13 lines × 2) (src/parse/tree_sitter_parser.rs)
  • Duplicated block (13 lines × 3) (demo_files/1/src/conflicts.rs)
  • Duplicated block (13–15 lines × 3) (src/parse/tree_sitter_parser.rs)
  • Duplicated block (14 lines × 3) (demo_files/1/src/conflicts.rs)
  • Duplicated block (15 lines × 2) (src/main.rs)
  • …and 138 more

Changes since last survey

  • 60 commits — 51 feature/other, 9 fixes

By area

  • (root) — 27 commits
  • src/parse — 11 commits
  • src/diff — 6 commits
  • src/display — 4 commits
  • src/options.rs — 4 commits
  • manual/src — 2 commits
  • src/line_parser.rs — 2 commits
  • sample_files/apex_1.trigger — 1 commit
  • sample_files/cli_tests — 1 commit
  • sample_files/compare.expected — 1 commit
  • vendored_parsers/tree-sitter-hare — 1 commit

Notable commits

  • fix: Fix apex file extensions in sample files
  • fix: Fix diagram that isn't Rust source
  • fix: Fix display path when the path has an extension
  • fix: Fix heredoc handling of dockerfiles
  • fix: Fix man page rendering (#1057)
  • fix: Fix sbcl detection in shebang
  • fix: Remove Haskell workarounds that have been fixed upstream
  • fix: Trailing commas and atom node fixes for Scala (#1032)
  • fix: fix(parse): add missing leading * to the .c++ glob (#1029)
  • change: Add a basic CLAUDE.md/AGENTS.md
  • change: Add short arg -c for context
  • change: Add test for nonexistent tree-sitter node names
  • change: Avoid hashing when computing all lines
  • change: Avoid unnecessary word splitting
  • change: Bump glob version
  • change: Bump line-numbers to improve doc comments
  • change: Clarify AI policy
  • change: Clarify singleton list logic
  • change: Clarify that uniqueness is a global property
  • change: Compute SingleLineSpan values directly where line number is known
  • …and 40 more

Architecture

  • Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 0 added · 0 removed

Added bounded contexts (1)

  • repository

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Wilfred/difftastic was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e2e1e3b7f5be18290135cc16ec521c16284eb21b — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-7c1cb6328e11.