document-editing
Capabilities
In-place partial editing for docx/xlsx/pptx:
- Search to locate paragraphs, cells, or shapes
- Local replace / insert / delete
- Preserve styles, tables, imagery, headers/footers
- Snapshot every edit via Elasticsearch Copy-on-Write for rollback
Positioning: ES collaboration layer, not raw file APIs
document-editing implements the cross-format flow “find the right spot inside the KB, then edit safely.”
It never hand-writes OOXML—the docx workload delegates to docx; spreadsheets use xlsx.
Rendering diagram…
When to use
| Scenario | Notes |
|---|---|
| Replace single chapters only | E.g., “rewrite section 3.2” |
| Find/replace preserving rich formatting | Avoid full regeneration |
| Audited doc revisions | Every change snapshots for history |
| Batch field fills | Template contracts/reports |
Invocation
Examples:
- "Update the Project Timeline section with Q2 numbers"
- "Rename slide 5 title to 'MCAL config automation'"
- "Change every ASIL_A cell to ASIL_B in this workbook"
Standard flow (DOCX example)
Rendering diagram…
Pairings
| Pair | Scenario |
|---|---|
| docx | Low-level DOCX read/write/link APIs |
| xlsx | Low-level Excel APIs |
| html-report | Polish HTML dashboards before exporting to docx |
| patent-doc-formatter | Chapter-level edits after patent drafting |
| alm-integration | Push requirement doc edits back into DOORS |
ES Copy-on-Write snapshots
Each edit emits a snapshot instead of overwriting the canonical asset:
- Zero data loss — originals remain reachable
- Audit trail — who/when/where/why
- Rollback — any revision can revert
- Diff chains — compare v1→v2→v3 visually