{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://prism-framework.org/schema/1.0/prism-i/who",
  "title": "PRISM/I — W: Who",
  "description": "Validates who/landscape.yaml. Captures engineering teams and infrastructure providers.",
  "type": "object",
  "required": ["prism_i", "artifacts"],
  "additionalProperties": false,
  "properties": {
    "prism_i": {
      "type": "object",
      "required": ["layer", "schema_version"],
      "additionalProperties": false,
      "properties": {
        "layer": { "const": "who" },
        "schema_version": { "type": "string", "pattern": "^\\d+\\.\\d+$" },
        "temporal_state": { "type": "string", "enum": ["baseline", "transition", "target"] },
        "as_of": { "type": "string", "format": "date" },
        "label": { "type": "string" }
      }
    },
    "artifacts": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["id", "name", "type", "ownership"],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$",
            "description": "Unique kebab-case identifier."
          },
          "name": { "type": "string" },
          "type": {
            "type": "string",
            "enum": ["team", "provider"],
            "description": "team — engineering, platform, or operations team. provider — infrastructure provider (AWS, GCP, Azure, on-prem)."
          },
          "ownership": {
            "type": "string",
            "enum": ["self", "internal", "external"]
          },
          "description": { "type": "string" },
          "status": {
            "type": "string",
            "enum": ["active", "deprecated", "planned", "decommissioning"]
          },
          "temporal_state": {
            "type": "string",
            "enum": ["baseline", "transition", "target"]
          },
          "tags": {
            "type": "array",
            "items": { "type": "string" }
          },
          "links": {
            "type": "object",
            "description": "Cross-framework references (e.g., PRISM stakeholder IDs, org chart entries).",
            "additionalProperties": { "type": "string" }
          },
          "notes": { "type": "string" },
          "team_size": {
            "type": "integer",
            "minimum": 1,
            "description": "Approximate headcount. For teams only."
          },
          "contact": {
            "type": "string",
            "description": "Primary contact or team alias email."
          },
          "provider_type": {
            "type": "string",
            "enum": ["public-cloud", "private-cloud", "on-prem", "saas", "managed-service", "colocation"],
            "description": "Category of provider. For providers only."
          },
          "regions": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Regions or DCs this provider operates. For providers only."
          }
        }
      }
    }
  }
}
