Scope and limits

v0.1 is deliberately small. This page marks where it stops: what the format doesn't cover yet, what schema validation won't catch, and where the schemas accept more than the specification intends.

Rules the schema does not check

A stock JSON Schema 2020-12 validator (for example Ajv) that accepts a contract or manifest has checked structure only. The rules in this table are specified in prose as publisher or consumer obligations. This repository ships no checker tool that implements them.

RuleChecked bySpecReference
contractId is the fold of the declared namePublisherSR-130Fold steps
Declared names that fold to empty or carry a residual character are rejectedPublisherSR-131, SR-132Classification
contractId is unique within a manifest (no collisions)PublisherSR-133Collisions
Every props.required name is a key of props.propertiesPublisherSR-126props.required
default is one of the enum values when a prop carries bothPublisherSR-127default
The manifest lists only component contracts and never itselfPublisherSR-136artifacts
Each address equals the recomputed content addressConsumerSR-137Mismatch handling

Permissive schema behavior

The v0.1 schemas accept each of these. This is current behavior, not a contradiction between schema and prose: the schema is more permissive than the informal intent. Where the schema and prose disagree, the schema is correct.

InputSchema resultReason
"enum": [] on a propValidenum has no minItems
"" as a key of props.propertiesValidProp names have no pattern constraint
"contractVersion": "2026-09 release"ValidcontractVersion is free text with minLength: 1; semantic versioning is not required
"artifacts": []Validartifacts has no minItems
"description": "" on a contractValiddescription has no minLength

Schema identifiers

$id and $schema URLs #

Component contract
https://knapsack-oss.github.io/design-system-contract/schemas/v0/component.contract.schema.json
Manifest
https://knapsack-oss.github.io/design-system-contract/schemas/v0/manifest.schema.json
Status
Served from this site (GitHub Pages for knapsack-oss/design-system-contract). The v0 path segment is kept stable; a breaking version of the format gets a new path.
Local copies
schemas/v0/component.contract.schema.json, schemas/v0/manifest.schema.json

A validator configured to retrieve schemas over the network by $schema or $id can fetch them from these URLs. Validation also works offline with the schema files in the repository; the repository's own tests run that way.

Out of scope in v0.1

v0.1 defines two formats (the component contract and the manifest) and their schemas. It does not define the following.

AreaStatus in v0.1
Design tokens (DTCG)Not defined. A future tokens.json with byte-verbatim carriage is a candidate.
Tolerance envelopes and strictness per destinationNot defined
Agent index (AGENTS.md)Not defined
Provenance log, ratification, signing, and attestationDeferred. No signer, signature, ratified, or canonicalForm member exists; the closed manifest schema rejects each.
origin: "authored"Not a legal value. Deferred along with any signature verification scheme.
Command-line tool or CI action (for example init, sync, verify, score)None exists
Deterministic checker for publish-time checks (fold, collision, address recompute)Described as a future direction. Not present in the repository.
How a publisher extracts slots and states from sourceUnspecified. Both members are optional.
Per-source rules for the declared nameNo derivation profile. Left to publisher documentation.
Cross-prop rules (which enum values may combine)Not defined. DSDS combos is cited as prior art.
Collision detection against previously published manifestsNot performed. Only collisions within one manifest and one publish count.
Per-prop JSON Schema keywords beyond type, default, description, and enum (for example items, properties, anyOf, minimum, format) Not permitted; the prop schema is closed. An additive candidate for a later version.
Judgment-based or model-based evaluation of a contract or usageExcluded. No mechanical check uses model inference.
Per-state metadataNot defined. states items are plain strings.