{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "design-system-ai-record",
  "title": "Design System AI Affordances Record",
  "description": "One record per design system or component library in the State of AI in Design Systems — July 2026 study. Every affordance, technique and capability carries the source URL of the file it was quoted from.",
  "type": "object",
  "required": [
    "id",
    "name",
    "summary",
    "maintenance",
    "ai_maturity",
    "affordances",
    "techniques"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "kebab-case slug, e.g. 'shadcn-ui'"
    },
    "name": {
      "type": "string"
    },
    "org": {
      "type": "string",
      "description": "Maintaining org/company"
    },
    "category": {
      "enum": [
        "design-system",
        "component-library",
        "headless-library"
      ],
      "description": "design-system = tokens+components+guidelines under a brand; component-library = reusable components without a single brand mandate"
    },
    "repo_url": {
      "type": "string"
    },
    "docs_url": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "maintenance": {
      "type": "object",
      "properties": {
        "last_release": {
          "type": "string",
          "description": "version + approx date"
        },
        "activity_note": {
          "type": "string",
          "description": "commit cadence, open development signals"
        },
        "actively_maintained": {
          "type": "boolean"
        }
      }
    },
    "ai_maturity": {
      "enum": [
        "none",
        "emerging",
        "invested",
        "ai-native"
      ],
      "description": "none = no AI affordances found; emerging = llms.txt or docs page only; invested = official MCP/rules/skills with real engineering behind them; ai-native = AI consumption is a core design goal of the system"
    },
    "affordances": {
      "type": "array",
      "description": "Concrete AI-facing artifacts this system ships",
      "items": {
        "type": "object",
        "required": [
          "type",
          "name",
          "official",
          "audience",
          "description"
        ],
        "properties": {
          "type": {
            "enum": [
              "mcp-server",
              "llms-txt",
              "agents-md",
              "claude-md",
              "claude-skill",
              "cursor-rules",
              "copilot-instructions",
              "ai-docs-page",
              "registry",
              "cli-scaffolding",
              "figma-code-connect",
              "storybook-integration",
              "prompt-library",
              "codemod-ai",
              "other"
            ]
          },
          "name": {
            "type": "string"
          },
          "official": {
            "type": "boolean",
            "description": "shipped by the DS team vs community"
          },
          "audience": {
            "enum": [
              "consumers",
              "builders",
              "both"
            ],
            "description": "consumers = people/agents building UIs WITH the system; builders = the DS team maintaining the system itself"
          },
          "description": {
            "type": "string"
          },
          "docs_url": {
            "type": "string"
          },
          "code_url": {
            "type": "string",
            "description": "link to the actual source (prefer raw.githubusercontent / permalink)"
          },
          "snippet": {
            "type": "object",
            "properties": {
              "language": {
                "type": "string"
              },
              "content": {
                "type": "string",
                "description": "verbatim excerpt, <= 40 lines / 1500 chars"
              },
              "source_url": {
                "type": "string"
              }
            }
          },
          "notes": {
            "type": "string"
          }
        }
      }
    },
    "techniques": {
      "type": "array",
      "description": "Model-coercion techniques: how the system forces AI agents to stay on-system instead of inventing components/tokens",
      "items": {
        "type": "object",
        "required": [
          "name",
          "category",
          "description"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "category": {
            "enum": [
              "prohibition",
              "tool-gating",
              "curated-context",
              "validation-loop",
              "scaffolding",
              "exemplars",
              "token-enforcement",
              "registry-metadata",
              "instruction-files",
              "design-code-mapping",
              "other"
            ],
            "description": "prohibition = explicit negative rules ('never invent components'); tool-gating = agent must call MCP/CLI to obtain source, cannot hallucinate it; curated-context = llms.txt-style condensed docs sized for context windows; validation-loop = linters/type-checkers the agent runs for feedback (e.g. slds-linter); scaffolding = CLIs generate the correct code, agent orchestrates; exemplars = few-shot examples/templates in agent-readable form; token-enforcement = rules/types that force design tokens over raw values; registry-metadata = machine-readable component registry with deps/props; instruction-files = CLAUDE.md/AGENTS.md/rules distributed to repos; design-code-mapping = Figma Code Connect-style node-to-component mapping"
          },
          "description": {
            "type": "string"
          },
          "snippet": {
            "type": "object",
            "properties": {
              "language": {
                "type": "string"
              },
              "content": {
                "type": "string"
              },
              "source_url": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "platform_integrations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "platform",
          "description"
        ],
        "properties": {
          "platform": {
            "enum": [
              "figma",
              "storybook",
              "supernova",
              "knapsack",
              "zeroheight",
              "other"
            ]
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    },
    "building_vs_consumption": {
      "type": "object",
      "properties": {
        "for_consumers": {
          "type": "string",
          "description": "1-3 sentence summary of AI support for using the system"
        },
        "for_builders": {
          "type": "string",
          "description": "1-3 sentence summary of how the team uses AI to build the system"
        }
      }
    },
    "gaps": {
      "type": "string",
      "description": "what could not be confirmed; open questions"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "summary": {
      "type": "string",
      "description": "2-4 sentence editorial summary for the dashboard"
    }
  }
}
