{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Category Decision Card v0.1",
  "type": "object",
  "required": ["BUSINESS STATE", "PRIMARY DRIVER", "EVIDENCE", "UNKNOWN", "P&L IMPACT", "DECISION", "ACTION", "OWNER", "REVIEW", "REVERSAL CONDITION", "CONFIDENCE"],
  "additionalProperties": false,
  "properties": {
    "BUSINESS STATE": {"type": "string", "minLength": 1},
    "PRIMARY DRIVER": {"type": "string", "minLength": 1},
    "EVIDENCE": {"type": "array", "minItems": 1, "items": {"type": "object", "required": ["id", "tool", "scope", "method", "metrics", "limitations"], "properties": {"id": {"type": "string"}, "tool": {"type": "string"}, "scope": {}, "method": {"type": "string"}, "metrics": {"type": "object"}, "limitations": {"type": "array", "items": {"type": "string"}}}}},
    "UNKNOWN": {"type": "array", "minItems": 1, "items": {"type": "string"}},
    "P&L IMPACT": {"type": "object", "required": ["currency", "basis", "revenue_delta", "gross_margin_delta", "contribution_delta", "revenue_vs_budget", "gross_margin_vs_budget", "unexplained_inventory_exposure", "forecast_uplift", "forecast_status"], "properties": {"currency": {"const": "CNY"}, "basis": {"type": "string"}, "revenue_delta": {"type": ["number", "null"]}, "gross_margin_delta": {"type": ["number", "null"]}, "contribution_delta": {"type": ["number", "null"]}, "revenue_vs_budget": {"type": ["number", "null"]}, "gross_margin_vs_budget": {"type": ["number", "null"]}, "unexplained_inventory_exposure": {"type": ["number", "null"]}, "forecast_uplift": {"type": ["number", "null"]}, "forecast_status": {"type": "string"}}},
    "DECISION": {"enum": ["ACT", "INVESTIGATE", "HOLD", "ESCALATE"]},
    "ACTION": {"type": "object", "required": ["type", "description", "scope", "requires_human_approval", "execution_status"], "properties": {"type": {"type": "string"}, "description": {"type": "string"}, "scope": {"type": "object"}, "requires_human_approval": {"const": true}, "execution_status": {"const": "not_executed"}}},
    "OWNER": {"type": "array", "minItems": 1, "items": {"type": "string"}},
    "REVIEW": {"type": "object", "required": ["due", "metrics"], "properties": {"due": {"type": "string"}, "metrics": {"type": "array", "minItems": 1}}},
    "REVERSAL CONDITION": {"type": "array", "minItems": 1, "items": {"type": "string"}},
    "CONFIDENCE": {"type": "object", "required": ["level", "basis"], "properties": {"level": {"enum": ["LOW", "MEDIUM", "HIGH"]}, "basis": {"type": "string"}}},
    "_meta": {"type": "object"}
  }
}
