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
111 lines
3.3 KiB
JSON
111 lines
3.3 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://dss.overbits.luz.uy/schemas/guardrails.schema.json",
|
|
"title": "DSS Guardrails Schema",
|
|
"description": "AI boundary rules and enforcement policies",
|
|
"version": "2.0.0",
|
|
"type": "object",
|
|
"required": ["immutableFiles", "boundaries", "tempFolderPolicy"],
|
|
"properties": {
|
|
"immutableFiles": {
|
|
"type": "array",
|
|
"description": "Files that cannot be modified without authorization",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["pattern", "reason"],
|
|
"properties": {
|
|
"pattern": {
|
|
"type": "string",
|
|
"description": "File path pattern (glob)"
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"description": "Why this file is immutable"
|
|
},
|
|
"bypassMethod": {
|
|
"type": "string",
|
|
"enum": ["commit-message", "environment-variable", "admin-approval"],
|
|
"description": "How to bypass protection"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"boundaries": {
|
|
"type": "object",
|
|
"description": "External API and operation boundaries",
|
|
"properties": {
|
|
"blockedAPIs": {
|
|
"type": "array",
|
|
"description": "External APIs that cannot be accessed directly",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {"type": "string"},
|
|
"reason": {"type": "string"},
|
|
"requiredTool": {
|
|
"type": "string",
|
|
"description": "DSS tool that must be used instead"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"blockedImports": {
|
|
"type": "array",
|
|
"description": "Python modules that cannot be imported directly",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {"type": "string"},
|
|
"reason": {"type": "string"},
|
|
"alternative": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"enforcementMode": {
|
|
"type": "string",
|
|
"enum": ["strict", "warn", "disabled"],
|
|
"description": "How strictly to enforce boundaries"
|
|
}
|
|
}
|
|
},
|
|
"tempFolderPolicy": {
|
|
"type": "object",
|
|
"description": "Temporary file management rules",
|
|
"required": ["location", "autoCleanup"],
|
|
"properties": {
|
|
"location": {
|
|
"type": "string",
|
|
"description": "Where temp files must be created"
|
|
},
|
|
"autoCleanup": {
|
|
"type": "boolean",
|
|
"description": "Whether to auto-delete old temp files"
|
|
},
|
|
"maxAge": {
|
|
"type": "integer",
|
|
"description": "Max age in hours before auto-cleanup"
|
|
},
|
|
"maxSize": {
|
|
"type": "string",
|
|
"description": "Max total size (e.g., '1GB')"
|
|
}
|
|
}
|
|
},
|
|
"toolRequirements": {
|
|
"type": "object",
|
|
"description": "Operations that require specific DSS tools",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"operation": {"type": "string"},
|
|
"requiredTools": {
|
|
"type": "array",
|
|
"items": {"type": "string"}
|
|
},
|
|
"rationale": {"type": "string"}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|