feat: 新增label快慢分流skill全套配置与校验脚本

This commit is contained in:
zhukai8
2026-07-23 18:09:01 +08:00
parent 017743a415
commit 9067914ecc
7 changed files with 1386 additions and 0 deletions
@@ -0,0 +1,293 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://local.skills/label-fast-slow-routing/label-record.schema.json",
"title": "快慢分流打标记录",
"type": "object",
"additionalProperties": false,
"required": [
"query",
"label",
"default_route",
"primary_reason_code",
"reason_codes",
"reason",
"evidence",
"context_used",
"fast_system_pending",
"confidence",
"review_required",
"uncertainties",
"policy_version"
],
"properties": {
"id": {
"type": ["string", "number", "null"]
},
"query": {
"type": "string",
"minLength": 1
},
"label": {
"enum": ["快", "慢", "模糊"]
},
"default_route": {
"enum": ["快系统", "慢系统"]
},
"primary_reason_code": {
"$ref": "#/$defs/reasonCode"
},
"reason_codes": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "#/$defs/reasonCode"
}
},
"reason": {
"type": "string",
"minLength": 1
},
"evidence": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"counterevidence": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"domain_label": {
"type": ["string", "null"]
},
"candidate_domain_labels": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
}
},
"structural_signals": {
"type": "object",
"additionalProperties": false,
"required": ["complex", "multi_instruction", "auto_task"],
"properties": {
"complex": {
"type": ["boolean", "null"]
},
"multi_instruction": {
"type": ["boolean", "null"]
},
"auto_task": {
"type": ["boolean", "null"]
}
}
},
"context_used": {
"type": "boolean"
},
"fast_system_pending": {
"type": ["boolean", "null"]
},
"legacy_eval_label": {
"enum": [
"FAST_DIRECT",
"SLOW_FILTER_RANK",
"SLOW_DISAMBIGUATE",
"SLOW_GOAL_STATE",
"SLOW_WORKFLOW",
"SLOW_CONTEXT_DEPENDENT",
"SLOW_UNCLEAR",
"SLOW_ADVANCED_CAPABILITY",
null
]
},
"confidence": {
"enum": ["high", "medium", "low"]
},
"review_required": {
"type": "boolean"
},
"uncertainties": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"policy_version": {
"const": "XA4.1-2026.6"
}
},
"allOf": [
{
"if": {
"properties": {
"label": {
"const": "快"
}
},
"required": ["label"]
},
"then": {
"properties": {
"default_route": {
"const": "快系统"
},
"primary_reason_code": {
"enum": [
"DIRECT_ACTION",
"DIRECT_DETERMINISTIC_QUERY",
"EXPLICIT_DEVICE_MULTI_ACTION",
"DIRECT_OPERATION_FLOW"
]
},
"reason_codes": {
"items": {
"enum": [
"DIRECT_ACTION",
"DIRECT_DETERMINISTIC_QUERY",
"EXPLICIT_DEVICE_MULTI_ACTION",
"DIRECT_OPERATION_FLOW"
]
}
}
}
}
},
{
"if": {
"properties": {
"label": {
"const": "慢"
}
},
"required": ["label"]
},
"then": {
"properties": {
"default_route": {
"const": "慢系统"
},
"fast_system_pending": {
"enum": [false, null]
},
"primary_reason_code": {
"enum": [
"INTENT_INFERENCE",
"SCENE_GOAL_MAPPING",
"MULTI_STEP_PLANNING",
"COMPLEX_REASONING",
"TRUE_DISAMBIGUATION",
"CONTEXT_REQUIRED",
"MISSING_REQUIRED_SLOT",
"AUTOMATION_SLOW_POLICY"
]
},
"reason_codes": {
"items": {
"enum": [
"INTENT_INFERENCE",
"SCENE_GOAL_MAPPING",
"MULTI_STEP_PLANNING",
"COMPLEX_REASONING",
"TRUE_DISAMBIGUATION",
"CONTEXT_REQUIRED",
"MISSING_REQUIRED_SLOT",
"AUTOMATION_SLOW_POLICY"
]
}
}
}
}
},
{
"if": {
"properties": {
"label": {
"const": "模糊"
}
},
"required": ["label"]
},
"then": {
"properties": {
"default_route": {
"const": "慢系统"
},
"fast_system_pending": {
"enum": [false, null]
},
"primary_reason_code": {
"enum": [
"OPEN_CHAT_OR_QA",
"PRODUCT_KNOWLEDGE",
"FAULT_DIAGNOSIS",
"DEVICE_OR_ENV_STATE_QUERY",
"POLICY_UNCERTAIN"
]
},
"reason_codes": {
"items": {
"enum": [
"OPEN_CHAT_OR_QA",
"PRODUCT_KNOWLEDGE",
"FAULT_DIAGNOSIS",
"DEVICE_OR_ENV_STATE_QUERY",
"POLICY_UNCERTAIN"
]
}
}
}
}
},
{
"if": {
"properties": {
"confidence": {
"const": "low"
}
},
"required": ["confidence"]
},
"then": {
"properties": {
"review_required": {
"const": true
}
},
"required": ["review_required"]
}
}
],
"$defs": {
"reasonCode": {
"enum": [
"DIRECT_ACTION",
"DIRECT_DETERMINISTIC_QUERY",
"EXPLICIT_DEVICE_MULTI_ACTION",
"DIRECT_OPERATION_FLOW",
"INTENT_INFERENCE",
"SCENE_GOAL_MAPPING",
"MULTI_STEP_PLANNING",
"COMPLEX_REASONING",
"TRUE_DISAMBIGUATION",
"CONTEXT_REQUIRED",
"MISSING_REQUIRED_SLOT",
"AUTOMATION_SLOW_POLICY",
"OPEN_CHAT_OR_QA",
"PRODUCT_KNOWLEDGE",
"FAULT_DIAGNOSIS",
"DEVICE_OR_ENV_STATE_QUERY",
"POLICY_UNCERTAIN"
]
}
}
}