WDF · Web Document Format · Core 0.1 draft

Documents that humans and machines read identically — verifiably.

A .wdf file is a small ZIP of constrained, semantic web content plus an AI layer (Markdown + outline with stable element ids) derived by a canonical, byte-deterministic algorithm. Hashes prove integrity; re-running the extraction proves the two views never drift apart. Responsive on any phone, offline by design, no new rendering engine.

Open a document Viewer (drop your own .wdf) Spec draft

Three examples, side by side with their PDF

Each example is authored once and published in every form below. The PDFs are printed from the very same source with Chrome — a deliberately fair comparison, not a strawman. (The PA documents are fictional, written for demonstration.)

Municipal decree

A public-administration decree with a typed commitments table bound to data/commitments.json.

Data report

An energy report: two dataset-bound tables and an SVG chart generated from the same values.

Technical article

Code blocks, a figure, a glossary — and its own verification story.

In the viewer, toggle Human / Agent and click any paragraph: the same element highlights in both views, with a copyable citation like wdf:<document-id>#tbl-commitments. The standalone files open with a double click, offline, viewer included.

Install the Reader: the viewer is an installable app (Chrome/Edge — install icon in the address bar). Once installed, .wdf files open with a double click, offline, like any document reader.

The same document, four axes

WDF PDF
Mobile reading Reflows: it is semantic HTML with responsive CSS. Fixed A4 pages; pinch-and-pan on a phone.
Tabular data Tables are typed datasets; a validator proves cells equal the data. Rows serialize to flat text; columns and types are inferred by heuristics.
Verifiability SHA-256 per file, plus a determinism check tying the AI layer to the content. No link between extracted text and rendered pages.
AI extraction wdf extract: canonical Markdown with stable, citable anchors. Parsing pipelines; citations stop at page numbers.

One prompt, two answers

We gave the same task — “extract the committed amounts and cite your source so a reviewer can verify it” — to the same LLM, on the decree's PDF and on its wdf extract output.

From the PDF

Values read correctly (a clean, born-digital PDF is the best case) — but table rows arrive as flat lines like 1042.3 — Servizi informatici 2026 14640 2026-12-31, so column meaning is guessed from position, and the only possible citation is “page 2”. Nothing ties the extracted text to what the document displays.

From WDF

Typed values (integer, number, date) from the dataset bound to the visible table, each with a resolvable citation: wdf:urn:uuid:7d44…#tbl-commitments. The package verifies: hashes plus the proof that the agent view is the canonical derivation of the human view.

Full method and transcript: LLM extraction comparison.

Agent-native by design (MCP)

The @wdf/mcp server gives any MCP-capable agent four tools — wdf_open, wdf_outline, wdf_read, wdf_cite — so an assistant answers questions about a document by navigating stable ids, never by parsing heuristics, and cites verifiably:

> wdf_cite { "id": "tbl-commitments" }

Citation: wdf:urn:uuid:7d444840-…#tbl-commitments
Verified: yes — the cited content is provably what the human-view document shows
Resolves to:
Spending commitments by chapter and year {#tbl-commitments}

Full recorded session: MCP demo transcript. Register it in Claude Code with claude mcp add wdf -- node packages/mcp/dist/index.js.

Boring on purpose

WDF invents almost nothing: ZIP container (the EPUB model), JSON manifest with JSON Schema, a closed whitelist of HTML5 + CSS, CommonMark for the AI layer, SHA-256 for integrity. The core spec draft is ~20 pages; the reference implementation (validator, CLI, this viewer) is open source. Signatures/C2PA, live data and vertical profiles are versioned extensions, out of the core.