Schemas

aindf — schemas
$ aindf schemas --list
json-schema/2020-12
6 files · one per axis of the contract graph · all validate
v0.1
Files
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.
fieldtypereqdescription
aindfVersionstringrequiredspec version this file targets
tiersenum[]fixed order: foundationssemanticcomponent
tokens[]tokenrequiredthe token entries
token.namestringrequiredslash-path, e.g. color/accent
token.tierenumrequiredfoundations | semantic | component
token.valueanyone-ofraw value; foundations tier only
token.aliasstringone-ofreferences another token downward (semantic/component)
token.scopesstring[]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.
fieldtypereqdescription
aindfVersionstringrequiredspec version
layersenum[]fixed: atoms · elements · blocks · sections
renderTargetsenum[]fixed: inline · overlay
rolesstring[]requiredrole vocabulary, declared by the system (recommended: display, interactive, form, feedback, layout)
components[]componentrequiredclassified component entries
component.namestringrequiredcomponent identity
component.layerenumrequiredone of the four layers
component.rolestringrequiredfrom the declared role vocabulary
component.renderTargetsenum[]requiredinline and/or overlay (≥1)
component.hasSlotsbooleanrequiredwhether the component exposes slots
component.interactionenum[]static · link · button · input; gates interaction-only modifiers
component.semanticsstringsemantic HTML / ARIA role, e.g. <button>
component.variations / sizes / statesstring[]visual variants, size scale, states
component.statusenumstable · 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.
fieldtypereqdescription
aindfVersionstringrequiredspec version
slotsets[]slotsetrequiredone entry per component that has slots
slotset.componentstringrequiredthe component owning the slots
slotset.slots[]slotrequiredits named slots
slot.namestringrequiredBEM slot, e.g. card__body
slot.acceptsobjectrequired≥1 of: layers, components, contracts
slot.cardinalityenumrequired0..1 · 1..1 · 0..* · 1..*
slot.orderintegerposition within the component
slot.requiredbooleanmust 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.
fieldtypereqdescription
aindfVersionstringrequiredspec version
modifierCategoriesstring[]category vocabulary declared by the system
modifiers[]modifierRulemodifier → target rules
modifierRule.categorystringrequirede.g. surface, effect
modifierRule.valuesstring[]allowed values for the category
modifierRule.appliesToobjectrequired≥1 of: layers · roles · components · when
appliesTo.whenobjectproperty → allowed values, e.g. {"interaction":["link","button"]} — a component set outside this set rejects the modifier (lint)
tokens[]tokenRuletoken-family → valid properties
tokenRule.familystringrequiredtoken name prefix, e.g. color, font
tokenRule.validPropertiesstring[]requiredproperties this family may bind to
tokenRule.invalidAsstring[]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.
fieldtypereqdescription
aindfVersionstringrequiredspec version
presets[]presetrequiredthe preset entries
preset.namestringrequirede.g. pricing-section
preset.builtOnstringrequiredthe component this preset instantiates
preset.descriptionstringhuman note
preset.slotsobjectrequiredslot name → ordered fill entries
fill.componentstringrequiredcomponent placed in the slot
fill.props / fill.textobject / stringdefault 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.
fieldtypereqdescription
aindfVersionstringrequiredspec version
patterns[]patternrequiredthe pattern entries
pattern.idstringrequiredstable identifier
pattern.intentstringrequiredhuman goal, e.g. "Newsletter subscribe section"
pattern.matchstring[]trigger phrases for intent matching
pattern.producesenumrequiredsection · block · composite
pattern.composenoderequiredrecursive composition tree (base · slots · children · with)
pattern.parameters[]paramclarifying questions: key · ask · options · default
pattern.modifiersobjectcategory → value or {param:key}
pattern.contentobjectcopy placeholders the agent fills
pattern.gapsstring[]components referenced but not yet in the taxonomy — drives what to build next

A design system is fully ai-native when it ships all six principles from one source. Most ship a subset. aindf is the spec for the whole graph.

$ git clone …/ai-native-design-framework.git