the agent's word-diff ignored a deleted "not" - punctuation normalization skipped it and "shall not disclose" became...
Fixes word-diffs that silently drop negations: punctuation normalization skipped a deleted 'not', so 'shall not disclose' became 'shall disclose' with no flag. It shows how to normalize punctuation without dropping word tokens, and how to report token deletions explicitly. Use it when a diff's normalization step can erase meaning-carrying words and your redline must never miss a negation change.
TL;DR A punctuation-normalization step skipped the deleted word "not", so "shall not disclose" became "shall disclose" and the diff reported nothing. Normalize punctuation all you want, but never drop word tokens during normalization, and report every deleted token explicitly. A diff that can silently erase a negation is worse than no diff.
What the diff missed:
old: the Receiving Party shall not disclose the Confidential Information
new: the Receiving Party shall disclose the Confidential Information
diff reported: no changesSteps
- Reproduce the miss. Diff the two sentences with your current pipeline and confirm the deleted "not" produces no flag.
Command: run your word-diff on the old and new sentences above. Expected: you see the bug firsthand, an empty change list for a sentence whose meaning flipped entirely.
- Inspect your normalization step and find where tokens get dropped. Look for any filter that removes tokens based on punctuation adjacency, stopword lists, or length.
Expected: you find the rule that ate "not", often a stopword filter or a regex that strips tokens next to removed punctuation.
- Fix the normalization contract: it may rewrite characters, but it must preserve the token sequence one to one. Remove stopword filtering from the diff path entirely, and exempt negation words like not, no, never, and none from every filter.
Expected: re-running the diff flags the deleted "not" as a token deletion.
- Add a negation-change alarm: after every diff, scan the change list for added or removed negation words and escalate those changes to the top of the redline summary.
Expected: any future negation flip appears as a highlighted change, impossible to miss in review.
Use this when
- Your diff pipeline normalizes text before comparing and tokens can go missing
- A redline missed a deleted or added "not", "no", "never", or "none"
- Stopword removal or punctuation cleanup runs inside the diff path
- You need a guarantee that meaning-flipping single-word changes are always flagged
Not for this skill when
- The diff is character-based and already shows the deletion, your problem is summary-level, not diff-level
- The "not" was moved rather than deleted, that is a move-detection issue
- Both versions genuinely agree, verify against the source documents first
- You are diffing at the clause level where single words are out of scope by design
Variant phrasings
- word diff ignored a deleted not in a contract clause
- punctuation normalization dropped a negation word
- shall not disclose became shall disclose with no diff flag
- how to keep stopword removal from breaking redlines
- diff missed a single-word meaning change in a contract
Why it happens
Normalization pipelines are built to reduce noise, and aggressive ones treat short common words as noise too. A stopword filter or a punctuation-adjacent cleanup rule deletes "not" because it looks like filler, and the diff then compares two token streams that are identical. The pipeline optimized for clean diffs and accidentally optimized away the most dangerous class of change in contract language: the negation flip.
Edge cases
- Double negations, like "shall not be deemed not to", need the alarm to fire on the net meaning change, test these explicitly.
- "No" as a list label, like "No. 5", must not trip the negation alarm, exempt numbering contexts.
- Some clauses negate with phrases like "in no event" or "under no circumstances", extend the alarm's word list to multiword negations.
- Normalization that merges hyphenated words can also hide changes, keep hyphen handling conservative in the diff path.
- Run a regression suite of known negation flips through your diff after the fix, one passing test per negation word, so the bug cannot silently return.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_zMKihUR1EGA4aQmd2iQ9yA
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.