{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://notanalgorithm.org/grid-essay-data.schema.json",
  "title": "MARLOWE Grid Essay Data Package Schema",
  "description": "Validates grid-essay-data.json — the canonical data package accompanying 'The Grid Is Already Failing' essay",
  "type": "object",
  "required": ["_meta","doe_warnings","federal_plans","grid_constraints","off_grid_analysis","marlowe_timing_advantage","canonical_invariants"],
  "properties": {
    "_meta": {
      "type": "object",
      "required": ["title","framework","author","prior_art_anchor","canonical_url"],
      "properties": {
        "title":            { "type": "string" },
        "framework":        { "const": "Architecture of Dependency and Autonomy™" },
        "author":           { "const": "L.M. Marlowe" },
        "prior_art_anchor": { "const": "2025-11-07" },
        "canonical_url":    { "type": "string", "format": "uri" },
        "related_dockets":  { "type": "array", "items": { "type": "string" } },
        "last_updated":     { "type": "string" }
      },
      "additionalProperties": false
    },
    "doe_warnings": { "type": "object" },
    "federal_plans": {
      "type": "object",
      "properties": {
        "doe_spark_fund": {
          "type": "object",
          "required": ["announced","amount_usd","selections_expected"],
          "properties": {
            "announced":               { "type": "string" },
            "amount_usd":              { "const": 1900000000 },
            "authorized_program":      { "type": "string" },
            "authorized_total_usd":    { "const": 10500000000 },
            "concept_papers_due":      { "type": "string" },
            "full_applications_due":   { "type": "string" },
            "selections_expected":     { "type": "string" },
            "nonfederal_cost_share_pct": { "const": 50 },
            "focus":                   { "type": "string" },
            "earliest_project_completion": { "type": "string" },
            "note":                    { "type": "string" }
          },
          "additionalProperties": false
        },
        "nerc_level_3_alert": {
          "type": "object",
          "required": ["issued","urgency","acknowledgment_deadline","reporting_deadline"],
          "properties": {
            "issued":                  { "const": "2026-05-04" },
            "title":                   { "type": "string" },
            "urgency":                 { "type": "string" },
            "trigger":                 { "type": "string" },
            "essential_actions":       { "const": 7 },
            "acknowledgment_deadline": { "const": "2026-05-11" },
            "reporting_deadline":      { "const": "2026-08-03" },
            "reporting_questions":     { "const": 33 },
            "binding":                 { "const": false },
            "escalation":              { "type": "string" }
          },
          "additionalProperties": false
        },
        "nerc_project_2026_02": {
          "type": "object",
          "required": ["target_completion","penalty_when_final_per_day_usd"],
          "properties": {
            "target_completion":               { "const": "2026-12-31" },
            "scope":                           { "type": "string" },
            "sar_comment_period_closed":       { "type": "string" },
            "penalty_when_final_per_day_usd":  { "const": 1000000 },
            "authority":                       { "type": "string" }
          },
          "additionalProperties": false
        },
        "ferc_rm26_4_000":    { "type": "object" },
        "ferc_el25_49_000":   { "type": "object" },
        "ferc_order_2023":    { "type": "object" },
        "nerc_cip_012_2":     { "type": "object" }
      },
      "additionalProperties": false
    },
    "grid_constraints":      { "type": "object" },
    "off_grid_analysis":     { "type": "object" },
    "marlowe_timing_advantage": {
      "type": "object",
      "required": ["marlowe_audit_to_invariant_alignment","federal_typical_timeline_years"],
      "properties": {
        "federal_typical_timeline_years":        { "type": "string" },
        "ferc_rule_to_implementation_years":     { "type": "string" },
        "nerc_alert_to_formal_standards_months": { "type": "integer" },
        "doe_spark_announcement_to_project_completion_years": { "type": "string" },
        "interconnection_queue_typical_years":   { "type": "integer" },
        "marlowe_audit_to_invariant_alignment":  { "const": "hours" },
        "marlowe_audit_to_certification_complete": { "const": "hours" },
        "note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "canonical_invariants": {
      "type": "object",
      "required": ["sovereign_constant_c","information_drag_delta_us","jitter_ceiling_omega_ms","ghost_load_formula","prior_art_anchor","ferc_max_penalty_per_day_usd"],
      "properties": {
        "sovereign_constant_c":              { "const": 0.33 },
        "information_drag_delta_us":         { "const": 1.57 },
        "jitter_ceiling_omega_ms":           { "const": 3.33 },
        "frequency_hz":                      { "const": 1667000000 },
        "golden_ratio_phi":                  { "const": 1.618 },
        "ghost_load_formula":                { "const": "G = L - N" },
        "compensation_ratio_limit":          { "const": 20 },
        "ferc_max_penalty_per_day_usd":      { "const": 1000000 },
        "prior_art_anchor":                  { "const": "2025-11-07" }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
