nika:chart is the data twin of
nika:image_fx: pure compute plus one
permit-gated write — no network, no clock, no provider. Rows and a
semantic spec compile to an SVG that is byte-identical when you
re-run the same pinned engine with the same rows, spec, and
settings — not a promise across engine versions. The artifact’s sha256
joins the run’s hash-chained trace. Rehearse any surrounding infer with
mock/echo; this builtin does not call a model.
The 30-second chart
role="img" +
aria-label, a <title> node) and carries its own recipe in a
<metadata> block — the chart explains itself with no sidecar.
The five types (closed · v1)
x / y / y_lo / y_hi / y2 / color are field names into your
rows. title, width, height are optional.
Semantics drive the rendering
semantics: maps each field to what it means — the type picks the
formatting and the palette, so the chart is right by construction:
Rows in, artifact out
data accepts inline rows (an array of flat string/number objects) or
{ path: "rows.json" } to read a JSON file — the natural pair with an
upstream task that produced it. out must end in .svg (the
attestation surface); parents are created; the write is fs-permit
gated like every artifact.
The Vega-Lite sibling
out/spend.vl.json next to the SVG — a real Vega-Lite spec
($schema · data · encoding · mark) for any downstream tool that
speaks it. The SVG stays the canonical, hash-verified artifact; the
sibling is a projection.
Determinism is the contract
On one engine build, same rows, same spec, same bytes — the engine’s parity suite also checks wasm32 ≡ aarch64 for that build. That makes charts evidence for that pin: the sha256 in the task output is the same one the trace chain records,nika trace verify walks it, and a
regenerated chart that stops matching is a tamper signal, not a
formatting quirk. Re-render after an engine upgrade before treating an
old hash as current.
Pair it with the flight recorder: draw your run costs from
.nika/traces/ data, and the report about your runs is itself a
receipt in one.