@verevoir/design-system
v0.4.0
Published
The design substrate, split by purpose: `./surface` is the typed DesignSurface contract (the design interlingua — schema, gate, merge/synthesise); `./gate` is a zero-dependency deterministic DTCG gate that ships into a produced pack's CI. The gate is the
Readme
@verevoir/design-system
The design substrate, in two layers:
- The gate (
./gate→design/) — a zero-dependency deterministic verifier for a design pack: DTCG token validation, regenerate-diff of generated value views, and value-drift checks over the concept docs. Node built-ins only — runs anywhere with no install. The same code the design capabilities emit into a produced pack (for that pack's CI) and the runtime imports to enforce a capability'sverify: design-packpostcondition (STDIO-451) — one source, two consumers. - The surface (
./surface→surface/surface.ts) — the typedDesignSurfacecontract (the design interlingua) with itsvalidateSurfacegate andmerge/synthesise. Its token layer is validated by delegating to the gate'svalidateDtcg, so the tokens are the token-layer slice of one surface rather than a separate DTCG pipeline (STDIO-524). This layer is TypeScript and depends onzod; the gate stays zero-dependency and is what ships into packs.
Use
import { verifyFiles } from '@verevoir/design-system/gate';
// files: { path -> content } (e.g. read back from the branch the model wrote to)
const { ok, findings } = verifyFiles({
'design-language/tokens/colour.tokens.json': '…',
'design-language/tokens/colour.tokens.md': '…',
'design-language/colour.md': '…',
});verifyFiles(map) returns { ok, findings }; each finding is
{ kind, file?, where?, message } (kinds DTCG / VIEW_DRIFT / VALUE_DRIFT /
NO_TOKENS / PARSE), model-actionable so an execution loop can re-prompt until
green. The full surface (verifyPack, renderTokenView, validateDtcg,
tokenLiterals, findValueDrift, runGate) and the check semantics are in
design/README.md.
