Skip to content

Discovery: implementation options for offline Office document support #488

Description

@andrii-novikov

QuickApps version

latest

What is the problem this feature will solve?

The offline Office documents epic (#487) has several viable implementations with very different cost, fidelity, security, and operational profiles. Committing to one without a structured comparison risks either an unusable result or a disproportionate investment — and, importantly, the two cheapest options are also the two with the worst failure modes.

Two distinct sub-problems are routinely conflated and must be separated explicitly:

  • Generating a new document — straightforward in every option.
  • Editing an existing document while preserving fidelity — hard. An OOXML file is a zip of XML parts, relationships, styles, media, layout rules, and comments. Edits that preserve the text routinely destroy the layout. This is the criterion that actually discriminates between the options.

What is the feature you are proposing to solve the problem?

A time-boxed discovery that produces a design doc under docs/designs/ (following docs/designs/template.md) with a recommendation, plus the follow-up child issues for the chosen option.

Options to evaluate (at minimum):

  1. Internal toolsetpython-docx / openpyxl / python-pptx in-process, behind a features.office_documents toggle alongside dial_files and web_fetch.
  2. Code interpreter + skill — preinstall the libraries in the interpreter image and ship an office-documents skill carrying the recipes. Note the interpreter is session-based, so it can hold a document open across several edit calls.
  3. External MCP document service — adopt an existing server (Office-PowerPoint-MCP-Server, ai-office-mcp, opendocswork-mcp, OfficeCLI) or expose a DIAL application over MCP — the same pattern as Code interpreter MCP service #422.
  4. Format conversion round trip — MarkItDown/Pandoc to Markdown, edit with the existing text file tools, convert back.
  5. Template fillingdocxtpl/Jinja2 over a builder-supplied OOXML template; substitution only, styles never touched.
  6. Self-hosted document engine — headless LibreOffice or equivalent.

Evaluation criteria:

Deliverables:

What alternatives have you considered?

  • Skip discovery and implement the obvious option. Rejected: the two cheapest options have the worst failure modes. Markdown round-tripping silently destroys layout, and the code-interpreter route is non-deterministic because the model rewrites the code each time. Both demo well and fail on a customer's real template.
  • Defer until the cloud-document path is decided. Rejected: the offline case is independent. Attachments and agent-home files exist regardless of whether a customer uses Google Workspace or Microsoft 365.
  • A spike branch instead of a design doc. Rejected: the decisive criteria are fidelity and security, which require reasoning about untrusted-input handling and real-world styled documents rather than a prototype that works on a clean file.
  • Pick per-format up front (e.g. templates for .docx, an engine for .xlsx). Not rejected — this is a plausible discovery outcome, but it should be a conclusion rather than a starting assumption.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions