{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ShadowLedgerSchema",
  "type": "object",
  "properties": {
    "formula_id": { "type": "string" },
    "shadow_formulas": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "formula_id": { "type": "string" },
          "lifecycle_state": {
            "type": "string",
            "enum": ["draft", "shadow", "candidate", "active", "retired"]
          },
          "sample_n": { "type": "integer" },
          "pass_rate": { "type": "number" },
          "expectancy": { "type": "number" },
          "max_drawdown": { "type": "number" },
          "promotion_allowed": { "type": "boolean" }
        },
        "required": ["formula_id", "lifecycle_state", "sample_n", "promotion_allowed"]
      }
    }
  },
  "required": ["formula_id", "shadow_formulas"]
}
