PCProvider ComplianceDocument factory research
GitHub lane 2 · 44 screened · 12 deep profiles

The document system is a controlled factory, not mail merge.

Harrison's master packs require edition selection, source precedence, split-run handling, tables, headers, workbooks, PDF forms, deterministic census, two review states, metadata scrubbing, manifests and immutable finalisation.

No single document repo completes the job.

The closest individual library is python-docx because Harrison's instructions require direct access to actual document structure. The credible minimum is python-docx + openpyxl + pypdf + Pydantic. Optional workers are introduced only for failing fixtures.

Core principleThe document worker executes a pinned, typed job and emits receipts. It never decides client facts, regulatory authority or approval state.

Harrison-fit requirements

edition manifestinclusion flagssource precedencesplit-run tokenstables + headersXLSX censusPDF field mapcomments + highlightsmetadata scrubdelta logimmutable final set

Twelve strongest document references

Template expansion · probe

docxtemplater

Parses tags inside OOXML ZIP parts, resolves loops/conditions and writes a new DOCX.

Fit
Strong JS templating; test split runs, headers, tables and paid-module licensing.
Repository ↗
Jinja-style DOCX · probe

python-docx-template

Embeds Jinja-like tags into Word templates and renders new files from context.

Fit
Useful for controlled net-new templates; existing masters may require surgical logic.
Repository ↗
DOCX primitive · recommended

python-docx

Manipulates paragraphs, runs, tables, sections and related structures from Python.

Fit
Best direct base; add OOXML helpers for comments, fields, metadata and complex parts.
Repository ↗
OOXML reference

Open XML SDK

Microsoft's strongly typed .NET object model for WordprocessingML, SpreadsheetML and PresentationML.

Fit
Best authoritative structural reference; adopting .NET would split the worker stack.
Repository ↗
XLSX .NET

ClosedXML

Higher-level .NET workbook manipulation over Open XML.

Fit
Good usability reference; unnecessary if Python worker uses openpyxl.
Repository ↗
XLSX primitive · recommended

openpyxl

Loads and edits cells, formulas, styles, worksheets and workbook metadata in Python.

Fit
Register census and controlled edits; test formulas, validations and styles on real files.
Repository ↗
PDF forms · recommended

pypdf

Inspects PDF objects, pages and AcroForm fields and can update compatible form values.

Fit
First probe; classify XFA, appearances, signatures and flattening before promises.
Repository ↗
PDF structure · optional

qpdf

CLI/library for structural inspection, repair, transformation and normalisation of PDFs.

Fit
Useful when Commission forms contain structural quirks that pypdf alone cannot handle.
Repository ↗
Mixed-document extraction

Docling

Layout-aware local parsing of PDFs and office documents into structured representations.

Fit
Add only when simple parsers fail measured tables/layout fixtures.
Repository ↗
Scanned evidence

OCRmyPDF + Tesseract

Adds searchable OCR layers to scanned PDFs using a mature OCR engine.

Fit
Fallback for scans; confidence and visual QA remain mandatory.
OCRmyPDF ↗
Preview worker

Gotenberg

Containerised office/HTML-to-PDF conversion service with API-driven rendering.

Fit
Versioned preview/conversion worker; does not prove source DOCX correctness.
Repository ↗
Signing reference

Documenso

Document preparation, recipients, signing requests, completion and audit events.

Fit
Reference for declarations/signing; do not make it application authority prematurely.
Repository ↗

Minimum combination

LayerRepositoryOwnsDoes not own
ContractsPydanticTyped jobs, manifests and validationRegulatory meaning
DOCXpython-docxWord structure/edit mechanicsSource precedence or approval
XLSXopenpyxlWorkbook inspection and editsRegister semantics
PDFpypdfObject/form mechanicsField authority or submission

Immediate probe order

  1. 1
    DOCX corpus

    Runs, tables, headers, footers, comments, highlights, fields and metadata.

  2. 2
    XLSX controls

    Values, formulas, validation, styles and deterministic register census.

  3. 3
    Commission PDF classification

    AcroForm/XFA, appearances, signatures, save/reopen and round-trip visual proof.

  4. 4
    Artifact receipt

    Input hash, edition, replacements, census, validation, output hash and approval state.