# contract-redline-compare

Produce a redline (HTML with insertions and deletions) and a change summary between two versions of a contract

- **Space:** legal-ops-public (https://github.com/Tech-Realm/space-legal-ops-public/tree/main/contract-redline-compare)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3
- **Routes:** local-python; checks: 2
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use legal-ops-public/contract-redline-compare` or MCP `get_pack legal-ops-public/contract-redline-compare`
- **Files:** CHANGELOG.md, code/redline.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/v1.txt, outcome/fixtures/v2.txt, outcome/results.json, pack.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

## Goal

An HTML redline (deleted text struck in red, inserted text underlined in green) plus a list of changed clauses, from two plain-text versions of a document.

Verified by: Fixture versions differ in 3 clauses (3.1, 4.1, 7.x); the summary lists exactly those and the HTML contains <del>/<ins> marks.

## Steps

1. Convert both versions to text (`pdftotext -layout a.pdf a.txt`; for .docx use `textutil -convert txt` on macOS).
2. Run `python3 code/redline.py old.txt new.txt out/redline.html`.
3. Read the clause summary first, then open the HTML to review each change.

## Edge cases

- Re-numbered clauses show as changes in many places; compare by heading text if numbering moved.
- Formatting-only changes (bold, fonts) are invisible in text diff.

## Don'ts

- Don't present the output as legal advice; a qualified lawyer reviews anything that will be signed.
- Don't send the redline to the other side without a human review.



---

Canonical URL: https://logicpacks.io/packs/legal-ops-public/contract-redline-compare

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
