{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/prompt-set-output.schema.json",
  "title": "GEO Prompt Set Output",
  "description": "Structured output for topic-first GEO prompt generation.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "client_summary",
    "topic_map",
    "strategy",
    "prompts"
  ],
  "properties": {
    "client_summary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "brand_name",
        "business_model",
        "target_markets"
      ],
      "properties": {
        "brand_name": {
          "type": "string"
        },
        "business_model": {
          "type": "string"
        },
        "target_markets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "input_product_lines": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "input_topics": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "key_inferences": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "topic_map": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "topic",
          "topic_source",
          "topic_type",
          "priority",
          "why_this_topic_exists"
        ],
        "properties": {
          "topic": {
            "type": "string"
          },
          "topic_source": {
            "type": "string",
            "enum": [
              "provided",
              "derived-from-product-line",
              "inferred"
            ]
          },
          "topic_type": {
            "type": "string",
            "enum": [
              "product-category",
              "use-case",
              "audience-segment",
              "competitor-alternative",
              "trust-evaluation",
              "channel-marketplace",
              "seasonal-trend",
              "other"
            ]
          },
          "related_product_lines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "why_this_topic_exists": {
            "type": "string"
          }
        }
      }
    },
    "strategy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "layer_mix",
        "funnel_notes"
      ],
      "properties": {
        "layer_mix": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "non_brand_discovery",
            "competitor_comparison",
            "brand_defense"
          ],
          "properties": {
            "non_brand_discovery": {
              "type": "string"
            },
            "competitor_comparison": {
              "type": "string"
            },
            "brand_defense": {
              "type": "string"
            }
          }
        },
        "funnel_notes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "recommended_assets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "prompts": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "prompt",
          "topic",
          "topic_source",
          "layer",
          "funnel_stage",
          "category",
          "business_value",
          "geo_priority",
          "monitoring_value",
          "answer_entry_mode",
          "why_it_matters"
        ],
        "properties": {
          "prompt": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          },
          "topic_source": {
            "type": "string",
            "enum": [
              "provided",
              "derived-from-product-line",
              "inferred"
            ]
          },
          "topic_type": {
            "type": "string"
          },
          "layer": {
            "type": "string",
            "enum": [
              "non-brand-discovery",
              "competitor-comparison",
              "brand-defense"
            ]
          },
          "funnel_stage": {
            "type": "string",
            "enum": [
              "TOFU",
              "MOFU",
              "BOFU"
            ]
          },
          "category": {
            "type": "string"
          },
          "product_line": {
            "type": "string"
          },
          "target_customer": {
            "type": "string"
          },
          "business_value": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "geo_priority": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "monitoring_value": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "answer_entry_mode": {
            "type": "string"
          },
          "recommended_asset_type": {
            "type": "string"
          },
          "why_it_matters": {
            "type": "string"
          }
        }
      }
    },
    "priority_lists": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "top_topics": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "top_non_brand_discovery": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "top_competitor_comparison": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "top_brand_defense": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}
