{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "AIAudit 配置驱动场景", "description": "配置驱动审计场景(B 快捷通道)的 schema,对应 app.scenarios.config.ScenarioConfig;权威校验以后端 pydantic 为准。", "type": "object", "required": ["code", "title", "risk_domain", "label", "detector"], "additionalProperties": false, "properties": { "code": { "type": "string", "minLength": 1, "description": "场景码,全局唯一,如 R10" }, "title": { "type": "string", "minLength": 1, "description": "默认线索标题" }, "risk_domain": { "type": "string", "minLength": 1, "description": "风险域,如 收入/成本" }, "label": { "type": "string", "minLength": 1, "description": "前端展示名" }, "detector": { "type": "string", "minLength": 1, "description": "检测原语名(见 app/scenarios/primitives.py)", "examples": ["threshold_edge", "cliff_drop", "ratio_threshold"] }, "params": { "type": "object", "description": "传给检测原语的参数(键随原语而定)" }, "threshold": { "type": "number", "description": "评分阈值:草稿 score >= 阈值才生成线索", "default": 0.5 }, "rationale_template": { "type": "string", "description": "线索理由模板,支持 {summary} 及原语 metrics 中的占位符" }, "rule_version": { "type": ["string", "null"], "description": "规则版本,用于线索可追溯" } } }