Files
zk-data-agent/skills/label-fast-slow-routing/schemas/label-record.schema.json
T
2026-07-23 21:35:18 +08:00

246 lines
4.8 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://local.skills/label-fast-slow-routing/label-record.schema.json",
"title": "2026.7 快慢分流分层打标记录",
"type": "object",
"additionalProperties": false,
"required": [
"query",
"label",
"default_route",
"domain",
"candidate_domains",
"decision_level",
"decision_rule_id",
"decision_source",
"decision_path",
"reason",
"evidence",
"structural_signals",
"context_used",
"fast_system_pending",
"route_override",
"policy_conflict",
"conflict_refs",
"confidence",
"review_required",
"uncertainties",
"policy_version"
],
"properties": {
"id": {
"type": ["string", "number", "null"]
},
"query": {
"type": "string",
"minLength": 1
},
"label": {
"enum": ["快", "慢", "模糊"]
},
"default_route": {
"enum": ["快系统", "慢系统"]
},
"domain": {
"enum": [
"导航/生服",
"车控",
"产品问答",
"内容",
"系统/App控制",
"通用工具",
"IoT",
"自动化",
null
]
},
"candidate_domains": {
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"导航/生服",
"车控",
"产品问答",
"内容",
"系统/App控制",
"通用工具",
"IoT",
"自动化"
]
}
},
"decision_level": {
"enum": ["domain", "structure", "core"]
},
"decision_rule_id": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9_]+$"
},
"decision_source": {
"type": "string",
"pattern": "^references/[a-z0-9-]+\\.md(?:#.*)?$"
},
"decision_path": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"reason": {
"type": "string",
"minLength": 1
},
"evidence": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"counterevidence": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"structural_signals": {
"type": "object",
"additionalProperties": false,
"required": [
"complex",
"multi_instruction",
"auto_task",
"context_dependent"
],
"properties": {
"complex": {
"type": ["boolean", "null"]
},
"multi_instruction": {
"type": ["boolean", "null"]
},
"auto_task": {
"type": ["boolean", "null"]
},
"context_dependent": {
"type": ["boolean", "null"]
}
}
},
"context_used": {
"type": "boolean"
},
"fast_system_pending": {
"type": ["boolean", "null"]
},
"route_override": {
"type": ["string", "null"]
},
"policy_conflict": {
"type": "boolean"
},
"conflict_refs": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^CONFLICT_[A-Z0-9_]+$"
}
},
"confidence": {
"enum": ["high", "medium", "low"]
},
"review_required": {
"type": "boolean"
},
"uncertainties": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"policy_version": {
"const": "FAST-SLOW-2026.7"
}
},
"allOf": [
{
"if": {
"properties": {
"label": {
"const": "快"
}
},
"required": ["label"]
},
"then": {
"properties": {
"default_route": {
"const": "快系统"
}
}
}
},
{
"if": {
"properties": {
"label": {
"enum": ["慢", "模糊"]
}
},
"required": ["label"]
},
"then": {
"properties": {
"default_route": {
"const": "慢系统"
},
"fast_system_pending": {
"enum": [false, null]
}
}
}
},
{
"if": {
"properties": {
"policy_conflict": {
"const": true
}
},
"required": ["policy_conflict"]
},
"then": {
"properties": {
"conflict_refs": {
"minItems": 1
}
}
}
},
{
"if": {
"properties": {
"confidence": {
"const": "low"
}
},
"required": ["confidence"]
},
"then": {
"properties": {
"review_required": {
"const": true
}
}
}
}
]
}