Files
playbook/cangjie-skill/schemas/registry-entry-v1.schema.json
T
2026-08-31 05:00:46 +08:00

62 lines
2.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cangjie-skill.org/schemas/registry-entry-v1.schema.json",
"title": "Cangjie Skill Registry Entry v1 (frozen)",
"description": "冻结的 v1 契约(ADR-004):旧条目永远走本 schema,字段语义不变,读取层规范化为 output_mode=legacy-pack 但不回写文件。",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"slug",
"name",
"summary",
"source_type",
"source_url",
"skill_count",
"domains",
"language",
"status",
"quality",
"use_cases"
],
"properties": {
"schema_version": { "const": 1 },
"slug": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
"name": { "type": "string", "minLength": 2, "maxLength": 80 },
"summary": { "type": "string", "minLength": 10, "maxLength": 240 },
"source_type": { "enum": ["github", "bundled"] },
"source_url": { "type": "string", "format": "uri", "pattern": "^https://github\\.com/" },
"skill_path": { "type": "string", "pattern": "^[^/].*" },
"skill_count": { "type": "integer", "minimum": 1 },
"domains": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "string", "minLength": 2, "maxLength": 30 }
},
"language": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "enum": ["zh-CN", "en", "ja"] }
},
"status": { "enum": ["active", "experimental", "archived"] },
"quality": { "enum": ["verified", "community", "experimental"] },
"featured": { "type": "boolean", "default": false },
"use_cases": {
"type": "array",
"minItems": 1,
"maxItems": 6,
"items": { "type": "string", "minLength": 4, "maxLength": 100 }
},
"install": {
"type": "object",
"additionalProperties": false,
"properties": {
"clone": { "type": "string", "minLength": 8 },
"copy": { "type": "string", "minLength": 8 }
}
}
}
}