{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://landscapearchive.org/schemas/orbits/tla-perf.required.schema.json",
  "title": "TLA-Perf required-keys smoke (Draft — not normative)",
  "description": "Required-key + enum smoke for la.archive.living-performance.v1 golden examples. Not a full normative schema; not Archive Seal.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema_id",
    "schema_version",
    "pack_id",
    "created_at",
    "kpis",
    "measurement",
    "tla185_refs"
  ],
  "properties": {
    "schema_id": { "const": "la.archive.living-performance.v1" },
    "schema_version": { "type": "integer", "const": 1 },
    "pack_id": { "type": "string", "minLength": 1 },
    "created_at": { "type": "string", "minLength": 1 },
    "kpis": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["kpi_id", "metric_class", "target", "unit"],
        "properties": {
          "kpi_id": { "type": "string", "minLength": 1 },
          "metric_class": {
            "type": "string",
            "enum": ["canopy_cover", "survival_rate", "water_use", "biodiversity_proxy", "heat_mitigation", "other"]
          },
          "target": { "type": "string", "minLength": 1 },
          "unit": { "type": "string", "minLength": 1 }
        }
      }
    },
    "measurement": {
      "type": "object",
      "required": ["method_class", "reporting_period"],
      "properties": {
        "method_class": {
          "type": "string",
          "enum": ["survey", "sensor", "model", "professional_judgement", "mixed", "other"]
        },
        "reporting_period": { "type": "string", "minLength": 1 }
      }
    },
    "tla185_refs": { "type": "object" }
  }
}
