{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://kaldenframelabs.com/schemas/frozen-feature-manifest-v1.schema.json",
  "title": "KaldenFrame Frozen Feature Manifest v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["manifest", "tool", "freeze_id", "dataset_id", "status", "contract_sha256", "schema_sha256", "policy_sha256", "source_column_count", "selected_feature_count", "excluded_column_count", "selection_sha256", "target_values_read", "dataset_values_read", "runtime_network_requests", "selected_features", "boundaries", "limitations", "artifacts"],
  "properties": {
    "manifest": {"const": "kaldenframe.frozen-feature-manifest.v1"},
    "tool": {"type": "object", "additionalProperties": false, "required": ["name", "version"], "properties": {"name": {"const": "KaldenFrame Target-Blind Feature Freezer"}, "version": {"const": "1.0.0"}}},
    "freeze_id": {"type": "string"},
    "dataset_id": {"type": "string"},
    "status": {"const": "FROZEN_BEFORE_TARGET_READ"},
    "contract_sha256": {"type": "string", "pattern": "^[A-F0-9]{64}$"},
    "schema_sha256": {"type": "string", "pattern": "^[A-F0-9]{64}$"},
    "policy_sha256": {"type": "string", "pattern": "^[A-F0-9]{64}$"},
    "source_column_count": {"type": "integer", "minimum": 1},
    "selected_feature_count": {"type": "integer", "minimum": 1},
    "excluded_column_count": {"type": "integer", "minimum": 0},
    "selection_sha256": {"type": "string", "pattern": "^[A-F0-9]{64}$"},
    "target_values_read": {"const": false},
    "dataset_values_read": {"const": false},
    "runtime_network_requests": {"const": false},
    "selected_features": {"type": "array", "minItems": 1, "items": {"type": "object", "additionalProperties": false, "required": ["source_ordinal", "name", "type", "nullable"], "properties": {"source_ordinal": {"type": "integer", "minimum": 0}, "name": {"type": "string"}, "type": {"enum": ["boolean", "integer", "number", "string", "category"]}, "nullable": {"type": ["boolean", "null"]}}}},
    "boundaries": {"type": "object"},
    "limitations": {"type": "array", "minItems": 3, "items": {"type": "string"}},
    "artifacts": {"type": "object", "required": ["selected-features.csv", "exclusions.csv"]}
  }
}
