feat(office): anydoc for fast-mode office → markdown extraction [VLM-749] - #195
Draft
nwaughachukwuma wants to merge 4 commits into
Draft
feat(office): anydoc for fast-mode office → markdown extraction [VLM-749]#195nwaughachukwuma wants to merge 4 commits into
nwaughachukwuma wants to merge 4 commits into
Conversation
…749] Swap the fast-mode office extraction backend from libreoffice-pure to the anydoc Python binding (firecrawl-anydoc): docx/pptx/xlsx/odt/odp/ods now convert to GitHub-Flavored Markdown instead of plain text. In firecrawl's 100-document benchmark anydoc scores 81 vs libreoffice's 40 (median 4.4ms vs 1129.5ms) and wins every shared format head-to-head. Each backend keeps the job it is strongest at: anydoc for file → markdown (page-text encoder + extract_meta passthrough), libreoffice-rs for accurate mode's office → PDF → page-text → LLM flow and for peek --full document metadata — both unchanged, as is the entire Rust surface. Also fixes AGENTS.md drift: it claimed mode is a no-op for non-PDF documents, but the design (and the code) runs office docs through the LLM pipeline in accurate mode. README carried the same stale claim. Two new tests cover the swap: page-text encoder output and the fast passthrough path against a minimal in-test docx. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LrXDqpPAFvk3mTdjcKtpnh
nwaughachukwuma
force-pushed
the
claude/replace-libreoffice-anydoc-1cti6p
branch
from
August 12, 2026 13:20
ddccc9c to
a1e7737
Compare
…rding With anydoc handling office → markdown on the Python side, the libreoffice-backed Rust surface shrinks to the two entry points the codebase actually calls: office_to_pdf (accurate-mode cat) and office_metadata (peek --full). The dead content path — office content(), parse_full(), OfficeDoc, and their PyO3 bindings and type stubs — is removed. All five libreoffice workspace deps remain: each is still used by the two surviving entry points (libreoffice-pure for conversion + format sniffing, lo_core for the Metadata type, lo_writer/lo_calc/lo_impress for the per-family parsers behind metadata()), and all are transitive dependencies of libreoffice-pure regardless. Also: say 'markdown' plainly instead of 'GitHub-Flavored Markdown' across docs and docstrings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LrXDqpPAFvk3mTdjcKtpnh
nwaughachukwuma
marked this pull request as draft
August 12, 2026 13:35
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LrXDqpPAFvk3mTdjcKtpnh
Collaborator
Author
|
@claude, fix the rust version to fix the failing CI job |
The test-python job's make lint-python step failed after the pyproject change invalidated CI's uv cache: the unpinned 'ruff>=0.4' dev dependency resolved to 0.16.2, whose newer rules flag 294 pre-existing violations repo-wide. The rustc toolchain itself built fine (1.97.1). Pin ruff to 0.11.6 — the same version .pre-commit-config.yaml pins and the passing lint job uses — so bare ruff and pre-commit agree on one ruleset. Verified locally: make lint-python passes on 0.11.6. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LrXDqpPAFvk3mTdjcKtpnh
Collaborator
Author
|
Fixed in b2649ac — though the culprit turned out to be ruff, not rustc: the job's Rust build succeeded (rustc 1.97.1), and Pinned Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves VLM-749. Adopts anydoc for office → markdown, keeping libreoffice where it is strongest.
Design
firecrawl-anydocPython binding)office_to_pdf)mm peek --fulldocument metadataoffice_metadata)Per the benchmarks attached to the ticket, anydoc beats libreoffice on every shared format (overall score 81 vs 40, median 4.4 ms vs 1129.5 ms) — but it doesn't convert to PDF, so accurate mode keeps its libreoffice flow.
Changes
page_text.py/extract_meta.py: office extraction callsanydoc.to_markdowninstead ofmm._mm.office_content.office.rs/mm-python/_mm.pyi: libreoffice surface stripped to the two entry points in use (office_to_pdf,office_metadata); dead content path (office_content/office_parse_full/OfficeDoc) removed. All five workspace deps remain — each is used by the surviving entry points, and all are transitive deps oflibreoffice-pureregardless.pyproject.toml/uv.lock: addfirecrawl-anydoc>=0.1.8.docs/cat.md,SPEC.md, user guide, mm-skill.Validation
cargo test --workspace: 100 passed; clippy cleanpytest tests/python: 1191 passed, 46 skippedmm cat notes.docxreturns anydoc markdown; stripped module surface verified in the built extensionFollow-ups
OFFICE_EXTScould extend todoc/ppt/xls/rtf/epub/csv(anydoc reads them) — separate change, affects kind classification and accurate routing.page-textis now a cleanfile → markdown Messageboundary; separate design note.🤖 Generated with Claude Code
https://claude.ai/code/session_01LrXDqpPAFvk3mTdjcKtpnh