{ "$comment": "AI 味案例卡合同(专题-09 §4.0 / §8.1)。案例卡是证据层 Shadow,不是故事实体卡,也不是已生效规则;字段与 capture_cases.validate_card 保持一致。", "type": "object", "required": [ "schema_version", "id", "card_type", "state", "label", "layer", "carrier", "capture_mode", "source", "observation" ], "properties": { "schema_version": {"type": "string", "enum": ["ai-flavor-case-v1"]}, "id": {"type": "string", "minLength": 2}, "card_type": {"type": "string", "enum": ["ai_flavor_case"]}, "state": {"type": "string", "enum": ["shadow", "canonical", "rejected", "archived"]}, "label": {"type": "string", "enum": ["sf", "snf", "boundary", "regression", "unclassified"]}, "layer": {"type": "string", "enum": ["mechanical", "lexical", "structural", "density", "semantic", "unknown"]}, "carrier": {"type": "string", "enum": ["narration", "dialogue", "monologue", "in_text_carrier", "mixed", "unknown"]}, "capture_mode": {"type": "string", "enum": ["backfill", "live_feedback", "synthetic", "review_import"]}, "excerpt": {"type": "string"}, "context": {"type": "string"}, "source": { "type": "object", "required": ["kind", "license", "source_sha256", "excerpt_sha256", "location"], "properties": { "kind": {"type": "string", "enum": ["existing_work", "creation_feedback", "synthetic", "public_domain"]}, "license": {"type": "string", "enum": ["owned", "licensed", "public_domain", "synthetic", "research_only", "unauthorized"]}, "work_ref": {"type": "string"}, "source_ref": {"type": "string"}, "source_sha256": {"type": "string", "minLength": 64}, "excerpt_sha256": {"type": "string", "minLength": 64}, "location": {"type": ["object", "string"]}, "surface_location": {"type": "object"} } }, "observation": { "type": "object", "required": ["pattern_key", "surface", "diagnosis", "function_check", "risk_if_changed", "suggested_action"], "properties": { "pattern_key": {"type": "string", "minLength": 2}, "surface": {"type": "string", "minLength": 1}, "diagnosis": {"type": "string", "minLength": 2}, "pattern": {"type": "string"}, "rationale": {"type": "string"}, "function_check": {"type": "array", "minItems": 1, "items": {"type": "string"}}, "risk_if_changed": {"type": "string", "minLength": 2}, "suggested_action": {"type": "string", "minLength": 2} } }, "feedback": {"type": "object"}, "review": {"type": "object"}, "rule_candidate_ids": {"type": "array", "items": {"type": "string"}} } }