Status: accepted for implementation on 2026-08-24.
Make Git patches independently reviewable without relying on color, side-by- side layout, or punctuation-only cues.
- Developers who use screen readers.
- Developers with low vision or color-vision deficiency.
- Anyone who wants a compact, deterministic diff representation for an agent, CI job, or text-only interface.
Given a unified diff file, standard input, or a local Git working tree, EarPatch must parse each file and hunk once, then emit one of these views:
text: a screen-reader-first narrative.html: a keyboard-navigable document with semantic headings and explicit line labels.json: a stable machine-readable representation.
- Python 3.10+ and no runtime dependencies.
- No network calls, telemetry, model calls, or shell invocation.
- Git is called through an argument array with external diff helpers disabled.
- Git mode requires explicit repository trust; patch-input mode does not load repository configuration.
- Text is the default output.
- Output describes evidence in the patch. It does not infer intent.
- MIT license.
- Parse modified, added, deleted, renamed, and binary file records.
- Parse omitted hunk counts, multiple hunks, and the no-newline marker.
- Track old and new line numbers.
- Group adjacent removals and additions into a change block.
- Report file and patch totals.
- Support
summary,changes, andfullverbosity for text. - Escape all patch content in HTML.
- Return useful nonzero exit codes for bad input and Git failures.
- Preserve code locally unless the user explicitly redirects output.
- Make terminal and bidirectional controls visible rather than executable.
- Bound input size, hunk numbers, and Git run time.
- Refuse to overwrite output unless the user supplies
--force.
- Do not depend on red/green color,
+/-alone, or a two-column layout. - Start with a patch summary.
- Announce file position, status, totals, and change-block position.
- Announce the old and new line number for each changed line.
- In HTML, use one
main, a level-one title, level-two file headings, and level-three change headings. - Include a visible-on-focus skip link and strong focus styling.
- Keep the DOM order identical to the reading order.
- A one-file replacement is narrated as "changed", with old and new text.
- Pure additions and removals are announced explicitly.
- HTML contains escaped code and a valid heading hierarchy.
- JSON totals agree with the sum of file totals.
- A temporary Git repository can be read without invoking a shell.
- The complete test suite passes on Python 3.12.
- User testing with blind developers and revisions based on that feedback.
- Localization and customizable spoken labels.
- Structural narration through optional tree-sitter adapters.
- GitHub Action and editor integrations.
- Audio earcons. These must remain optional and never replace text.