{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Phase8Config",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "phase",
    "flags",
    "registry",
    "rollout",
    "fallbacks"
  ],
  "properties": {
    "phase": {
      "type": "string",
      "const": "phase8"
    },
    "flags": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "enable_short_engine": {
          "type": "boolean"
        },
        "enable_meta_model": {
          "type": "boolean"
        },
        "enable_horizon_selector": {
          "type": "boolean"
        },
        "enable_execution_optimization": {
          "type": "boolean"
        },
        "enable_research_automation": {
          "type": "boolean"
        }
      },
      "required": [
        "enable_short_engine",
        "enable_meta_model",
        "enable_horizon_selector",
        "enable_execution_optimization",
        "enable_research_automation"
      ]
    },
    "registry": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "strategy_registry_path",
        "model_registry_path",
        "prompt_registry_path"
      ],
      "properties": {
        "strategy_registry_path": {
          "type": "string"
        },
        "model_registry_path": {
          "type": "string"
        },
        "prompt_registry_path": {
          "type": "string"
        }
      }
    },
    "rollout": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "max_capital_fraction",
        "require_shadow_pass"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "paper",
            "live_limited",
            "live_full"
          ]
        },
        "max_capital_fraction": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "require_shadow_pass": {
          "type": "boolean"
        }
      }
    },
    "fallbacks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "baseline_model_id",
        "baseline_execution_policy_id",
        "phase7_safe_mode_profile"
      ],
      "properties": {
        "baseline_model_id": {
          "type": "string"
        },
        "baseline_execution_policy_id": {
          "type": "string"
        },
        "phase7_safe_mode_profile": {
          "type": "string"
        }
      }
    }
  }
}