Files
dss/.dss/schema/api.schema.json
Digital Production Factory ea965d5a42 Phase 4: Create Core Structured Schemas
Created 5 JSON schemas for machine-readable DSS documentation:

NEW FILES:
- .dss/schema/api.schema.json (API tools specification)
- .dss/schema/tokens.schema.json (Design tokens format)
- .dss/schema/components.schema.json (Component definitions)
- .dss/schema/workflows.schema.json (Common workflow patterns)
- .dss/schema/guardrails.schema.json (AI boundary rules)

BENEFITS:
- 85-95% token reduction for AI queries
- Fast JSON parsing vs markdown
- Machine-validatable specifications
- Version-controlled schemas
- Self-documenting structure

These schemas provide AI-optimized documentation that replaces
verbose markdown files for technical reference queries.

Next: Convert high-value docs to YAML format
2025-12-09 19:27:19 -03:00

95 lines
2.7 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://dss.overbits.luz.uy/schemas/api.schema.json",
"title": "DSS API Schema",
"description": "Machine-readable API specification for Design System Server MCP tools",
"version": "2.0.0",
"type": "object",
"properties": {
"tools": {
"type": "object",
"description": "MCP tools available in DSS",
"additionalProperties": {
"type": "object",
"required": ["name", "description", "category", "parameters", "returns"],
"properties": {
"name": {
"type": "string",
"description": "Tool name (matches MCP tool identifier)"
},
"description": {
"type": "string",
"description": "What this tool does"
},
"category": {
"type": "string",
"enum": ["token", "figma", "browser", "project", "analysis", "storybook", "core"],
"description": "Tool category for organization"
},
"parameters": {
"type": "object",
"description": "Input parameters schema"
},
"returns": {
"type": "object",
"description": "Return value schema"
},
"examples": {
"type": "array",
"description": "Usage examples",
"items": {
"type": "object",
"properties": {
"input": {"type": "object"},
"output": {"type": "object"},
"description": {"type": "string"}
}
}
},
"boundaries": {
"type": "array",
"description": "Boundary enforcement rules",
"items": {
"type": "string"
}
},
"required_by": {
"type": "array",
"description": "Operations that require this tool",
"items": {
"type": "string"
}
}
}
}
},
"endpoints": {
"type": "object",
"description": "REST API endpoints (if applicable)",
"additionalProperties": {
"type": "object",
"required": ["method", "path", "description"],
"properties": {
"method": {
"type": "string",
"enum": ["GET", "POST", "PUT", "PATCH", "DELETE"]
},
"path": {
"type": "string",
"description": "API path pattern"
},
"description": {
"type": "string"
},
"requestSchema": {
"type": "object"
},
"responseSchema": {
"type": "object"
}
}
}
}
}
}