| name | superdoc-redlines |
| title | superdoc-redlines — Multi-Agent DOCX Redlining |
| description | Use when you need to apply tracked changes and comments to DOCX files programmatically, merge multi-agent edits with conflict resolution, or produce native Word revisions from AI agent output. |
| author | LegalQuants |
| author_url | https://github.com/LegalQuants/lq-skills/tree/main/skills/superdoc-redlines |
| license | Apache-2.0 |
| version | 0.1.0 |
| execution_mode | open |
| jurisdiction | general |
| practice | general |
| language | en |
| tags | ["docx","redlines","multi-agent","conflict-resolution","document-processing"] |
superdoc-redlines — Multi-Agent DOCX Redlining
When to Use
- Multi-agent legal workflows where different agents produce edits to the same document
- Applying AI-generated tracked changes to DOCX files
- Merging edits from multiple reviewers with conflict resolution
- Headless document transformation (no Word installation required)
- Deterministic document edits with stable block IDs
How It Works
Core Innovation
Uses stable block IDs instead of fragile text matching. Unlike approaches that try to find text by content (and fail when formatting changes), Superdoc assigns stable IDs to document blocks and applies changes by reference.
Architecture
AI Agent output → Conflict resolution → Block ID mapping → Native Word revisions
Process
- Parse — Extract document blocks with stable IDs
- Receive edits — AI agent produces change instructions
- Conflict resolution — If multiple agents edit same block, resolve conflicts
- Apply — Insert Word tracked changes using block IDs (not text matching)
- Output — Native DOCX with Word revision marks
Usage
import { applyRedlines } from 'superdoc-redlines';
const result = await applyRedlines({
input: './contract.docx',
edits: agentEdits,
agentName: 'Claude'
});
Key Features
- Multi-agent merging — Multiple agents can edit; conflicts are flagged
- Conflict resolution — Human review for overlapping edits
- Deterministic — Same edits → same output (unlike text-matching approaches)
- Native Word revisions — Output is valid DOCX, not a proprietary format
- Works headlessly — No Word installation needed
Audience and Work Shape
Audience: lawyers and developers running multi-agent DOCX workflows where several AI agents propose edits to the same document. The lawyer is the merger of last resort.