Schemas
aindf — schemas
$ aindf schemas --list
json-schema/2020-12
6 files · one per axis of the contract graph · all validate
Files
1.tokens.schema1.5 kb
2.taxonomy.schema2.6 kb
3.slots.schema1.8 kb
4.applicability.schema2.4 kb
5.presets.schema1.6 kb
6.patterns.schema3.4 kb
Sample · tokens.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://aindf.oleg.design/schemas/tokens.schema.json",
"$defs": { "token": {
"required": ["name", "tier"],
"oneOf": [{ "required": ["value"] },
{ "required": ["alias"] }]
} }
}
$ download schemas/ ↗
Expand a file to see its fields. Each is the canonical contract — the same JSON the validator and the MCP surface read. tier, layer and renderTarget are fixed by AINDF; values and the role vocabulary are declared by the system.
▸ tokens.schema.json 1.5 kb Design tokens across three tiers with applicability (scopes). Tier and the downward-reference rule are fixed by AINDF; values are system-specific.
| field | type | req | description |
|---|---|---|---|
| aindfVersion | string | required | spec version this file targets |
| tiers | enum[] | fixed order: foundations → semantic → component | |
| tokens[] | token | required | the token entries |
| token.name | string | required | slash-path, e.g. color/accent |
| token.tier | enum | required | foundations | semantic | component |
| token.value | any | one-of | raw value; foundations tier only |
| token.alias | string | one-of | references another token downward (semantic/component) |
| token.scopes | string[] | properties this token may bind to (applicability) |
▸ taxonomy.schema.json 2.6 kb Every component classified on three orthogonal axes. layer and renderTarget are fixed by AINDF; the role vocabulary is declared by the system.
| field | type | req | description |
|---|---|---|---|
| aindfVersion | string | required | spec version |
| layers | enum[] | fixed: atoms · elements · blocks · sections | |
| renderTargets | enum[] | fixed: inline · overlay | |
| roles | string[] | required | role vocabulary, declared by the system (recommended: display, interactive, form, feedback, layout) |
| components[] | component | required | classified component entries |
| component.name | string | required | component identity |
| component.layer | enum | required | one of the four layers |
| component.role | string | required | from the declared role vocabulary |
| component.renderTargets | enum[] | required | inline and/or overlay (≥1) |
| component.hasSlots | boolean | required | whether the component exposes slots |
| component.interaction | enum[] | static · link · button · input; gates interaction-only modifiers | |
| component.semantics | string | semantic HTML / ARIA role, e.g. <button> | |
| component.variations / sizes / states | string[] | visual variants, size scale, states | |
| component.status | enum | stable · beta · experimental · deprecated |
▸ slots.schema.json 1.8 kb Slot contracts: what each slot accepts (by layer / component / contract), how many, and in what order.
| field | type | req | description |
|---|---|---|---|
| aindfVersion | string | required | spec version |
| slotsets[] | slotset | required | one entry per component that has slots |
| slotset.component | string | required | the component owning the slots |
| slotset.slots[] | slot | required | its named slots |
| slot.name | string | required | BEM slot, e.g. card__body |
| slot.accepts | object | required | ≥1 of: layers, components, contracts |
| slot.cardinality | enum | required | 0..1 · 1..1 · 0..* · 1..* |
| slot.order | integer | position within the component | |
| slot.required | boolean | must be filled |
▸ applicability.schema.json 2.4 kb Two cross-cutting edge types: modifier → target, and token-family → valid properties. AINDF fixes the mechanism; the modifier category vocabulary is declared by the system.
| field | type | req | description |
|---|---|---|---|
| aindfVersion | string | required | spec version |
| modifierCategories | string[] | category vocabulary declared by the system | |
| modifiers[] | modifierRule | modifier → target rules | |
| modifierRule.category | string | required | e.g. surface, effect |
| modifierRule.values | string[] | allowed values for the category | |
| modifierRule.appliesTo | object | required | ≥1 of: layers · roles · components · when |
| appliesTo.when | object | property → allowed values, e.g. {"interaction":["link","button"]} — a component set outside this set rejects the modifier (lint) | |
| tokens[] | tokenRule | token-family → valid properties | |
| tokenRule.family | string | required | token name prefix, e.g. color, font |
| tokenRule.validProperties | string[] | required | properties this family may bind to |
| tokenRule.invalidAs | string[] | explicitly forbidden bindings |
▸ presets.schema.json 1.6 kb Pre-composed, ready-to-use instances of a block or section with slots already filled. A preset references existing components and introduces no new component identity.
| field | type | req | description |
|---|---|---|---|
| aindfVersion | string | required | spec version |
| presets[] | preset | required | the preset entries |
| preset.name | string | required | e.g. pricing-section |
| preset.builtOn | string | required | the component this preset instantiates |
| preset.description | string | human note | |
| preset.slots | object | required | slot name → ordered fill entries |
| fill.component | string | required | component placed in the slot |
| fill.props / fill.text | object / string | default props and copy |
▸ patterns.schema.json 3.4 kb Parametrized composition recipes. A pattern composes existing components and exposes clarifying parameters an agent asks before assembly. A preset is a pattern with all parameters bound.
| field | type | req | description |
|---|---|---|---|
| aindfVersion | string | required | spec version |
| patterns[] | pattern | required | the pattern entries |
| pattern.id | string | required | stable identifier |
| pattern.intent | string | required | human goal, e.g. "Newsletter subscribe section" |
| pattern.match | string[] | trigger phrases for intent matching | |
| pattern.produces | enum | required | section · block · composite |
| pattern.compose | node | required | recursive composition tree (base · slots · children · with) |
| pattern.parameters[] | param | clarifying questions: key · ask · options · default | |
| pattern.modifiers | object | category → value or {param:key} | |
| pattern.content | object | copy placeholders the agent fills | |
| pattern.gaps | string[] | components referenced but not yet in the taxonomy — drives what to build next |