Implement OVP
Everything needed to build a conformant parser,
renderer, validator, or composer, without asking the authors anything.
The reference implementation lives in tools/ in the
repository; this page is the contract it implements.
Conformance levels
| Level | Name | You can claim it when |
|---|---|---|
| 1 | Parser | you read specs and tokens and validate them against the published schemas |
| 2 | Renderer | you reproduce the golden renders for at least one chart family from spec + tokens + data |
| 3 | Presenter | you compose recipes (language + charts + components) on the slide canvas |
| 4 | Advisor | you use the machine metadata to pick the right object for a message |
| 5 | Full | you deterministically reproduce every golden across all built objects |
The determinism contract
- Same spec + same tokens + same data = the same output. For SVG, byte-identical; for container formats with volatile envelopes (PPTX zip timestamps), member-identical.
- Specs carry exact px values and color ROLES. Resolve a role chain
like
benchmark -> mutedto the first role the palette defines. - Merge a spec's
overrides[DL-xx]block over the spec before rendering in that language. - Float formatting: at most 2 decimals, trailing zeros stripped,
never
-0. - Nice-tick algorithm (normative, FN-05): raw = max / target_ticks; mag = 10^floor(log10(raw)); step = first of nice_steps x mag >= raw; top = ceil(max / step) x step.
- No randomness, no timestamps, no environment-dependent values, ever. Deterministic layout algorithms are part of the spec (squarified treemap, first-free-lane beeswarm packing).
What you need
| File | Validates |
|---|---|
| bq.schema.json | BQ objects |
| ch.schema.json | CH objects |
| cp.schema.json | CP objects |
| dl.schema.json | DL objects |
| nr.schema.json | NR objects |
| rc.schema.json | RC objects |
| engine.json | decision rules + the controlled vocabularies |
| REGISTRY.json | the machine index of every object |
Golden renders and their input data live under golden/
in the repository: one folder per object, data.json plus
one render per design language. They are the conformance test suite:
re-render and compare bytes.
Self-test
for each golden folder:
output = render(spec, tokens[dl], data)
assert output == stored_golden_bytes # svg: byte-identical
The reference gate (tools/validate.py) also checks
schema validity, hex discipline (#RRGGBB uppercase only, in tokens
only), WCAG AA contrast for ink and body on background, and per-chart
data sanity (waterfalls reconcile, cumulative curves never decrease,
rank columns are permutations, five-number summaries are ordered).