{
  "$schema": "https://json-schema.org/draft/2020-12/schema#",
  "$id": "https://responsible-america.local/schemas/official-contact.schema.json",
  "title": "Responsible America Official Contact Record (interface contract only)",
  "description": "Phase 2 defines this schema as the future data contract for the Citizen Action Center's representative/official lookup — see docs/citizen-action-policy.md and responsible-america/action.html's 'Planned' module list. No data/officials/ directory or records exist yet; this file describes the shape a future verified-official-contact dataset or API response must satisfy. Do not populate this with scraped or unverified data — see the 'no private contact info' rule in docs/security-and-privacy.md and the 'lawful-use only' rule in docs/citizen-action-policy.md.",
  "type": "object",
  "additionalProperties": false,
  "required": ["official_id", "name", "office", "level", "jurisdiction", "verified_date", "source_id"],
  "properties": {
    "official_id": { "type": "string", "pattern": "^official-[a-z0-9-]+$" },
    "name": { "type": "string" },
    "office": { "type": "string", "description": "e.g. 'U.S. Senator', 'U.S. Representative', 'Governor', 'State Senator', 'Mayor'." },
    "level": { "type": "string", "enum": ["federal", "state", "local", "tribal"] },
    "jurisdiction": { "type": "string", "description": "e.g. state postal code, congressional district ('CA-12'), county, or municipality." },
    "party": { "type": ["string", "null"] },
    "committees": { "type": "array", "items": { "type": "string" }, "default": [] },
    "official_contact_form_url": { "type": ["string", "null"] },
    "official_office_phone": { "type": ["string", "null"], "description": "Public office line only — never a private/personal number." },
    "official_public_email": { "type": ["string", "null"], "description": "Publicly listed official office email only — never a personal address." },
    "district_offices": {
      "type": "array",
      "default": [],
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "city": { "type": "string" },
          "state": { "type": "string" },
          "phone": { "type": ["string", "null"] },
          "address": { "type": ["string", "null"], "description": "Public office address only." }
        },
        "required": ["city", "state"]
      }
    },
    "term_start": { "type": ["string", "null"], "format": "date" },
    "term_end": { "type": ["string", "null"], "format": "date" },
    "verified_date": { "type": "string", "format": "date", "description": "When this record was last checked against an official government source. Stale records must be re-verified before use, not assumed current." },
    "source_id": { "type": "string", "description": "Must reference an official government source (e.g. congress.gov, the official's .gov office page) per docs/source-policy.md's hierarchy — never a scraped third-party aggregator without independent verification." }
  }
}
