{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "quilt",
  "type": "object",
  "required": ["published_at", "window_months", "rebase", "months", "components"],
  "additionalProperties": false,
  "properties": {
    "published_at": {"type": "string"},
    "window_months": {"type": ["integer", "null"]},
    "rebase": {"type": "string"},
    "months": {"type": "array",
               "items": {"type": "string", "pattern": "^\\d{4}-\\d{2}$"}},
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["code", "label", "weight", "ours_yoy_pct", "official_yoy_pct"],
        "additionalProperties": false,
        "properties": {
          "code": {"type": "string"},
          "label": {"type": "string"},
          "weight": {"type": "number", "exclusiveMinimum": 0, "maximum": 1},
          "ours_yoy_pct": {"type": "array", "items": {"type": ["number", "null"]}},
          "official_yoy_pct": {"type": "array", "items": {"type": ["number", "null"]}},
          "weights": {
            "description": "Headline weight in force at each month's sampled grid day (time-varying weights, 2026-09-28), aligned with `months`. Absent in older artifacts (consumers fall back to `weight`).",
            "type": "array", "items": {"type": "number", "minimum": 0, "maximum": 1}}
        }
      }
    }
  }
}
