becker-charles wants Mike's redlines to land in the right paragraph

A proposed rebuild swaps custom track-changes code for a library wrapper, but the real fix is how edits find their target.

contract-reviewdrafting

Mike's current redline engine locates the spot to edit by matching a snippet of text plus a bit of surrounding context. In documents where similar phrasing repeats - a representations and warranties section, a schedule of definitions, a contract with parallel clauses - that approach can latch onto the wrong paragraph and quietly rewrite the wrong line.

becker-charles proposes giving every paragraph a stable identifier the first time a document is opened, so every later accept or reject points at a specific paragraph instead of guessing from context. The change also retires roughly eight hundred lines of hand-rolled document plumbing in favour of a maintained open-source library, and clears up a smaller bug where the preview pane didn't refresh after an edit was accepted or rejected.

So what For anyone running AI redlines through Mike on dense, repetitive contracts, this is the difference between an edit landing where you meant it and silently rewriting a parallel clause elsewhere in the document.

View this fork on GitHub →

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