@verevoir/design-gate
v0.2.0
Published
The design substrate: a zero-dependency deterministic design gate (DTCG token validation, regenerate-diff of generated views, value-drift checks) that ships into a produced pack's CI, plus the typed DesignSurface contract (`./surface`) the tooling reasons
Readme
@verevoir/design-gate
The design substrate, in two layers:
- The 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-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.
