70 lines
3.3 KiB
JSON
70 lines
3.3 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://cangjie-skill.org/schemas/capability.schema.json",
|
|
"title": "Cangjie Capability",
|
|
"description": "单个稳定能力。生命周期见方案 §4.5.1:文案润色只加 revision,语义拆分/合并才换 ID。",
|
|
"type": "object",
|
|
"required": ["capability_id", "revision", "status", "slug", "title", "importance", "importance_rationale", "one_liner", "intents", "keywords", "card"],
|
|
"properties": {
|
|
"capability_id": { "type": "string", "pattern": "^cap\\.[a-z0-9-]+\\.[a-z0-9-]+$" },
|
|
"revision": { "type": "integer", "minimum": 1 },
|
|
"status": { "enum": ["active", "deprecated", "merged", "split"] },
|
|
"aliases": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
"supersedes": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
"merged_into": { "type": ["string", "null"], "default": null },
|
|
"split_into": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
"slug": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
"title": { "type": "string", "minLength": 2 },
|
|
"importance": { "enum": ["critical", "high", "medium", "low"] },
|
|
"importance_rationale": { "type": "string", "minLength": 8, "description": "必须附依据:引用图入度/DIGEST 篇幅/任务集命中/读者任务映射,不得纯自评" },
|
|
"one_liner": { "type": "string", "minLength": 4 },
|
|
"intents": { "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
"keywords": { "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
"also_read": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
"card": { "type": "string", "description": "能力卡正文相对路径(bundle 内),R/I/A1/A2/E/B 六段", "pattern": "^cards/[a-z0-9-]+\\.md$" },
|
|
"frontmatter": {
|
|
"type": "object",
|
|
"description": "晋级为独立 Skill 时使用的 frontmatter 数据(description/tags 等)",
|
|
"properties": {
|
|
"description": { "type": "string" },
|
|
"tags": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
"source_evidence": {
|
|
"type": "array",
|
|
"description": "来源定位:source_id + version_id + 章节/页码/时间戳/chunk_id",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["source_id"],
|
|
"properties": {
|
|
"source_id": { "type": "string" },
|
|
"version_id": { "type": "string" },
|
|
"location": { "type": "string" },
|
|
"chunk_ids": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
"default": []
|
|
},
|
|
"promotion": {
|
|
"type": "object",
|
|
"description": "阶段 1.6 晋级门评审结果",
|
|
"required": ["destination"],
|
|
"properties": {
|
|
"destination": { "enum": ["promoted", "router"] },
|
|
"gate": {
|
|
"type": "object",
|
|
"description": "五条判据;前 3 条必须为 true 才可 promoted,后 2 条至少 1 条为 true",
|
|
"properties": {
|
|
"independent_intent": { "type": "boolean" },
|
|
"independent_contract": { "type": "boolean" },
|
|
"independent_run": { "type": "boolean" },
|
|
"independent_reuse": { "type": "boolean" },
|
|
"independent_eval": { "type": "boolean" }
|
|
}
|
|
},
|
|
"notes": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|