{
  "$schema": "https://json-schema.org/draft-07/schema",
  "$id": "https://agent-schema.com/schemas/fcs/4.0/exposure-graph.schema.json",
  "title": "Semantic Exposure Graph",
  "description": "Topology visualization of competitive ad landscape (FCS 4.0 Component 2)",
  "type": "object",
  "required": [
    "graph_id",
    "query_cluster",
    "nodes",
    "edges"
  ],
  "properties": {
    "graph_id": {
      "type": "string",
      "format": "uuid"
    },
    "query_cluster": {
      "type": "string",
      "description": "Semantic cluster this graph represents"
    },
    "nodes": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["node_id", "product_id", "semantic_position"],
        "properties": {
          "node_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "semantic_position": {
            "type": "object",
            "required": ["x", "y"],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "description": "2D embedding coordinates"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "category": {
                "type": "string"
              },
              "exposure_frequency": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "edges": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["source", "target", "weight"],
        "properties": {
          "source": {
            "type": "string",
            "description": "Source node_id"
          },
          "target": {
            "type": "string",
            "description": "Target node_id"
          },
          "weight": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Semantic similarity"
          }
        }
      }
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    }
  }
}
