Open source · local-first

Document changes your CI can actually explain.

Compare PDF or DOCX outputs, classify what changed, and keep a deterministic JSON contract plus an offline HTML report—without sending documents to a service.

PDF + DOCX JSON + HTML No DocRefract service
DocRefract offline report showing a classified content change

First result

One command. No permanent install.

Use the .NET 10 dnx runner to generate two safe synthetic DOCX files and a complete report in about 30 seconds.

Terminal
dnx DocRefract.Tool@0.2.4 -- demo --out report
1
RunThe demo reads no personal files and returns success.
2
OpenInspect report/index.html locally in any browser.
3
AutomateMove the same category policy into CI when ready.

Signal, not noise

Gate the kind of change that matters.

Unlike a single opaque mismatch, DocRefract separates evidence into stable categories that can carry different release policies.

content

Inserted, deleted, or replaced text.

format

Font, emphasis, color, or paragraph styling.

layout

Margins, page geometry, position, or reflow.

media

Media added, removed, replaced, or relinked.

visual

Schema-reserved for future raster evidence; not emitted yet.

structure

Pages, paragraphs, rows, cells, or nodes.

CI adoption

Observe first. Enforce after review.

The Action always uploads the HTML and JSON evidence. Start with continue-on-error, tune the policy, then remove that line to make prohibited changes block a pull request.

.github/workflows/documents.yml
- name: Compare generated document
  id: docrefract
  continue-on-error: true
  uses: jinyounghub/docrefract@v0.2.4
  with:
    before: test/baseline.pdf
    after: build/report.pdf
    fail-on: content,layout,media