{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agent.pricerightdigital.com/support-page-brief-schema.json",
  "title": "Price Right RV Support Page Brief",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "page_id",
    "created_at",
    "proposed_title",
    "target_url_slug",
    "intended_prrv_destination",
    "audience",
    "funnel_stage",
    "search_intent",
    "source_evidence",
    "page_outline",
    "internal_links",
    "cta_plan",
    "compliance_notes",
    "validation",
    "handoff",
    "downstream_status"
  ],
  "properties": {
    "page_id": {
      "type": "string",
      "description": "Stable identifier for the support page planning brief."
    },
    "created_at": {
      "type": "string",
      "description": "ISO timestamp when the brief was created."
    },
    "proposed_title": {
      "type": "string",
      "description": "Working title for the proposed support page."
    },
    "target_url_slug": {
      "type": "string",
      "description": "Proposed pricerightrv.com URL path. This does not prove the URL exists."
    },
    "intended_prrv_destination": {
      "type": "string",
      "format": "uri",
      "description": "Intended official shopper-site destination for the future page."
    },
    "audience": {
      "type": "string",
      "description": "Primary audience for the page."
    },
    "funnel_stage": {
      "type": "string",
      "enum": [
        "awareness",
        "consideration",
        "decision",
        "post_purchase",
        "retention",
        "unknown"
      ],
      "description": "Intended shopper funnel stage."
    },
    "search_intent": {
      "type": "object",
      "description": "Search and user intent planning details.",
      "required": [
        "primary_intent",
        "secondary_intents",
        "queries_to_support"
      ],
      "additionalProperties": false,
      "properties": {
        "primary_intent": {
          "type": "string",
          "description": "Main search intent."
        },
        "secondary_intents": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Supporting intents."
        },
        "queries_to_support": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Non-claiming query themes to support."
        }
      }
    },
    "source_evidence": {
      "type": "object",
      "description": "Evidence required before drafting or handoff.",
      "required": [
        "approved_sources",
        "missing_sources",
        "volatile_claims",
        "evidence_status"
      ],
      "additionalProperties": false,
      "properties": {
        "approved_sources": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Approved source URLs or file paths."
        },
        "missing_sources": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Sources still needed."
        },
        "volatile_claims": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Volatile claims that require current evidence or exclusion."
        },
        "evidence_status": {
          "type": "string",
          "enum": [
            "not_checked",
            "partial",
            "ready_for_review",
            "blocked_missing_evidence"
          ],
          "description": "Current evidence status."
        }
      }
    },
    "page_outline": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "section_heading",
          "section_goal",
          "fact_requirements"
        ],
        "additionalProperties": false,
        "properties": {
          "section_heading": {
            "type": "string",
            "description": "Planned section heading."
          },
          "section_goal": {
            "type": "string",
            "description": "Purpose of the section."
          },
          "fact_requirements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Evidence needed for this section."
          }
        }
      },
      "description": "Planned page sections."
    },
    "internal_links": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "label",
          "url",
          "link_purpose",
          "status"
        ],
        "additionalProperties": false,
        "properties": {
          "label": {
            "type": "string",
            "description": "Anchor text."
          },
          "url": {
            "type": "string",
            "description": "Target URL."
          },
          "link_purpose": {
            "type": "string",
            "description": "Why the link belongs."
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "verified",
              "blocked_missing_evidence"
            ],
            "description": "Link validation status."
          }
        }
      },
      "description": "Internal link plan."
    },
    "cta_plan": {
      "type": "object",
      "description": "Shopper CTA plan.",
      "required": [
        "primary_cta_label",
        "primary_cta_url",
        "cta_status",
        "cta_notes"
      ],
      "additionalProperties": false,
      "properties": {
        "primary_cta_label": {
          "type": "string",
          "description": "CTA label."
        },
        "primary_cta_url": {
          "type": "string",
          "description": "Official shopper-site CTA URL."
        },
        "cta_status": {
          "type": "string",
          "enum": [
            "proposed",
            "verified",
            "blocked_missing_evidence"
          ],
          "description": "CTA validation status."
        },
        "cta_notes": {
          "type": "string",
          "description": "CTA evidence notes."
        }
      }
    },
    "compliance_notes": {
      "type": "object",
      "description": "Compliance and safety notes.",
      "required": [
        "do_not_claim",
        "human_review_required",
        "notes"
      ],
      "additionalProperties": false,
      "properties": {
        "do_not_claim": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Claims not allowed without evidence."
        },
        "human_review_required": {
          "type": "boolean",
          "description": "Whether human review is required before handoff."
        },
        "notes": {
          "type": "string",
          "description": "Additional compliance notes."
        }
      }
    },
    "validation": {
      "type": "object",
      "description": "Brief validation state.",
      "required": [
        "status",
        "missing_evidence",
        "next_validation_step"
      ],
      "additionalProperties": false,
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "proposed",
            "draft_needed",
            "drafted",
            "ready_for_review",
            "ready_for_handoff",
            "published_confirmed",
            "blocked_missing_evidence",
            "failed_validation"
          ],
          "description": "Current brief status."
        },
        "missing_evidence": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Missing evidence."
        },
        "next_validation_step": {
          "type": "string",
          "description": "Next required validation step."
        }
      }
    },
    "handoff": {
      "type": "object",
      "description": "CMS handoff plan.",
      "required": [
        "target_system",
        "handoff_owner",
        "required_approval",
        "published_confirmation_field",
        "handoff_status"
      ],
      "additionalProperties": false,
      "properties": {
        "target_system": {
          "type": "string",
          "description": "Intended CMS or workflow destination."
        },
        "handoff_owner": {
          "type": "string",
          "description": "Owner or role for handoff."
        },
        "required_approval": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Approvals required before CMS work."
        },
        "published_confirmation_field": {
          "type": "string",
          "description": "Field used to record CMS publication confirmation."
        },
        "handoff_status": {
          "type": "string",
          "enum": [
            "not_sent",
            "ready_for_handoff",
            "handed_off",
            "awaiting_cms_confirmation",
            "published_confirmed"
          ],
          "description": "CMS handoff status."
        }
      }
    },
    "downstream_status": {
      "type": "string",
      "enum": [
        "not_sent",
        "handed_off",
        "awaiting_confirmation",
        "published_confirmed",
        "failed"
      ],
      "description": "Downstream CMS publication status."
    }
  }
}
