Mace-legal teaches Mike to read redlines

The fork now surfaces tracked changes and margin comments from Word and color-coded PDF redlines straight into the AI's view of a document.

contract-reviewdiscovery

Most legal AI tools quietly flatten a document before the model sees it - accepting all changes, dropping comments, ignoring the red and blue strikethroughs that carry half the meaning in a negotiation. Mace-legal's fork pushes the other way. On the Word side, insertions, deletions and reviewer comments (with author attribution) are pulled out and handed to the model as inline markers it knows how to interpret. On the PDF side, a new helper reads the actual span colors - red for cuts, blue for adds, green for moves - to reconstruct redlines from the kind of marked-up PDFs that Litera or Workshare spit out.

The model is then explicitly taught what to do with all this: treat comments as marginalia, not body text, and decide whether the user wants the marked-up or clean version. The PDF path leans on PyMuPDF, a Python library for reading PDF internals, and the author notes the algorithm is ported from a separate diff-tooling product they maintain.

So what If your team lives in negotiation drafts and reviewer comments, this is the kind of capability that closes the gap between what the lawyer sees and what the AI sees.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from Mace-legal/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
b3b5dee0 feat: add redline-aware document extraction Jonas Boury 2026-05-10 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-228.md from inside the repo you want the changes in.

⬇ Download capture-thread-228.md