Skip to content
Aswanth edited this page Sep 1, 2026 · 1 revision

Welcome to the docx_walking wiki! I'll examine the repository to generate an appropriate "About" section for you.## About

docx-redline is a production-grade Python library for creating tracked changes (redlines) in Word documents (.docx files). It builds on python-docx and lxml to write real OOXML revision markup that works natively in Word, LibreOffice, and Google Docs.

Key Features

  • Real Revision Markup: Generates authentic Word revision elements (w:ins, w:del, w:moveFrom/w:moveTo, w:rPrChange, w:pPrChange) instead of simulating redlines with strikethrough formatting

  • Three Layers of Functionality:

    • Redliner: Low-level text/paragraph operations (insert, delete, replace, format)
    • ParagraphIndex: Stable paragraph IDs with verified edits and quote-based targeting
    • ActionPlanner & Pipeline: High-level automation with clause-aware redlining, renumbering, and cross-reference management
  • Document Comparison: Diff two .docx files Word-Compare style into one redlined output

  • Smart Renumbering: Move a clause and siblings automatically renumber; cross-references update correctly

  • Structured Actions: Apply action items from AI models or JSON plans with full validation before writing

  • Review & Verification: Accept/reject changes with byte-exact round-trip verification

  • Chunked Review: Process 300+ page contracts by segmenting on structural boundaries with parallel processing

What It Does

Every edit is written as real Word revision markup, so reviewers see a working Accept/Reject UI in Word, LibreOffice, and Google Docs. The library handles text edits, paragraph operations, table modifications, formatting changes, comments, and structural reorganization — all with tracked changes and proper clause renumbering.

Use Cases

  • Automated legal document review and redlining
  • Contract comparison and markup
  • Bulk document editing with full change tracking
  • AI-assisted document revision with verifiable results
  • Building document review workflows

License: MPL-2.0 — use commercially; your modifications stay open.

Clone this wiki locally