{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://re3val.com/schema/ew-article.schema.json",
  "title": "Re3val article record",
  "description": "Article record v0.5.0. Immutable record_id identifies a version; citations use record_id#local_id plus content_hash. Draft validity is not publication approval. Semantic validation, independent source review, release-manifest signature verification and current revocation checks are separate gates. Legacy v0.2.0/v0.3.0 inputs must be explicitly migrated; no automatic evidence upgrade. v0.5.0: every record is a dated statement warranted as of verified_at and claiming nothing about any later moment (no review clock, no staleness field); the oversight block discloses whether the record was machine-verified only or also human-reviewed, and which risk triggers fired.",
  "type": "object",
  "required": [
    "schema_version",
    "article_id",
    "version",
    "title",
    "format",
    "section",
    "language",
    "publication_state",
    "agent_authority",
    "authorship",
    "oversight",
    "license_spdx",
    "main_claim_ids",
    "claims",
    "sources",
    "narrative",
    "history",
    "record_id",
    "supersedes",
    "observed_at",
    "verified_at",
    "valid_from",
    "valid_until",
    "jurisdictions",
    "attention_decision",
    "content_hash",
    "signature"
  ],
  "properties": {
    "schema_version": {
      "const": "0.5.0"
    },
    "article_id": {
      "type": "string",
      "pattern": "^ew-[0-9]{4}-[0-9]{4}$"
    },
    "version": {
      "type": "string",
      "pattern": "^[1-9][0-9]*$"
    },
    "title": {
      "type": "string"
    },
    "format": {
      "enum": [
        "consistency-casefile",
        "record-entry",
        "data-void",
        "report",
        "explainer",
        "deprecation-notice",
        "verified-attribution"
      ]
    },
    "section": {
      "type": "string"
    },
    "language": {
      "type": "string"
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "publication_state": {
      "enum": [
        "draft",
        "published",
        "corrected",
        "retracted"
      ],
      "description": "Lifecycle axis. Article-level verification_level is computed as the weakest load-bearing claim and is not stored separately."
    },
    "agent_authority": {
      "const": "none",
      "description": "Constitutional constant: no Re3val payload carries authority to command its reader. Obligations in covered material are reported, never addressed. A record without this field, or with any other value, is not a Re3val record."
    },
    "authorship": {
      "type": "object",
      "required": [
        "drafted_by",
        "editor_of_record",
        "ai_disclosure"
      ],
      "properties": {
        "drafted_by": {
          "type": "string"
        },
        "reviewed_by": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "editor_of_record": {
          "type": [
            "string",
            "null"
          ],
          "description": "Accountable editor: the named human who answers for this record whether or not they reviewed it. Whether a person reviewed it is stated in oversight."
        },
        "ai_disclosure": {
          "type": "boolean",
          "const": true
        }
      },
      "additionalProperties": false
    },
    "oversight": {
      "$ref": "#/$defs/oversight"
    },
    "license_spdx": {
      "type": "string"
    },
    "content_hash": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "signature": {
      "anyOf": [
        {
          "$ref": "#/$defs/signature"
        },
        {
          "type": "null"
        }
      ]
    },
    "main_claim_ids": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "principle_tested": {
      "type": [
        "string",
        "null"
      ]
    },
    "method": {
      "$ref": "#/$defs/method"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/event"
      }
    },
    "claims": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/claim"
      }
    },
    "sources": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/source"
      }
    },
    "quotations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/quotation"
      },
      "description": "The quote-fence: ALL quoted third-party language lives here as typed objects, referenced from claims and narrative by [Qn] anchors. Quoted language never flows as prose in body_md — the generator enforces this."
    },
    "narrative": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/narrative_section"
      }
    },
    "correction_feed_uri": {
      "type": [
        "string",
        "null"
      ]
    },
    "related": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "history": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/history_entry"
      }
    },
    "record_id": {
      "type": "string",
      "pattern": "^ew-[0-9]{4}-[0-9]{4}-v[1-9][0-9]*$"
    },
    "supersedes": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "observed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "The moment the record's claims are warranted for: when its last load-bearing source was confirmed against its captured copy. The record claims nothing about any later moment; the reader computes the gap to the present. Required on publication. An update is a new version with its own verified_at."
    },
    "valid_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "valid_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "World validity only: when the described state ceased to hold in the world, if known. Not an expiry or staleness date for the record."
    },
    "jurisdictions": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "attention_decision": {
      "anyOf": [
        {
          "$ref": "#/$defs/attention_decision"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "publication_state": {
            "enum": [
              "published",
              "corrected",
              "retracted"
            ]
          }
        }
      },
      "then": {
        "required": [
          "signature",
          "published_at",
          "content_hash",
          "observed_at",
          "attention_decision",
          "verified_at"
        ],
        "properties": {
          "signature": {
            "$ref": "#/$defs/signature"
          },
          "content_hash": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "authorship": {
            "properties": {
              "editor_of_record": {
                "type": "string",
                "minLength": 1
              },
              "reviewed_by": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "reviewed_by"
            ]
          },
          "claims": {
            "items": {
              "properties": {
                "publication_state": {
                  "enum": [
                    "published",
                    "corrected",
                    "retracted"
                  ]
                },
                "verification_level": {
                  "enum": [
                    "link_verified",
                    "corroborated"
                  ]
                }
              }
            }
          },
          "attention_decision": {
            "allOf": [
              {
                "$ref": "#/$defs/attention_decision"
              },
              {
                "properties": {
                  "weights_status": {
                    "enum": [
                      "not_applicable",
                      "adopted"
                    ]
                  }
                }
              }
            ]
          },
          "verified_at": {
            "type": "string",
            "format": "date-time"
          },
          "oversight": {
            "properties": {
              "verification_mode": {
                "enum": [
                  "machine_verified",
                  "machine_verified_human_reviewed"
                ]
              }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "format": {
            "const": "consistency-casefile"
          }
        }
      },
      "then": {
        "required": [
          "method"
        ]
      }
    }
  ],
  "$defs": {
    "verification_level": {
      "enum": [
        "unverified_pilot",
        "link_verified",
        "corroborated"
      ],
      "description": "Verification axis only. unverified_pilot: drawn from model knowledge, not checked against live sources; MUST NOT be published. link_verified: every cited source dereferenced, locator confirmed, archived. corroborated: link_verified plus at least two independent sources."
    },
    "epistemic_status": {
      "enum": [
        "unresolved",
        "supported",
        "disputed",
        "contradicted"
      ],
      "description": "What the evidence currently indicates about the claim's content — orthogonal to verification of its sources. A verified attribution is link_verified while its underlying matter may be unresolved."
    },
    "evidence_grade": {
      "enum": [
        "A",
        "B",
        "C",
        "D",
        "E"
      ],
      "description": "A: primary document directly examined and link-verified. B: multiple independent tier 1-2 sources, link-verified. C: single reputable source, link-verified. D: model training knowledge, not yet link-verified. E: contested or single uncorroborated account. A claim at unverified_pilot cannot exceed D (enforced below)."
    },
    "speech_act": {
      "enum": [
        "assertion",
        "quotation",
        "legal_obligation",
        "recommendation",
        "reported_instruction"
      ],
      "description": "Semantic type of the claim's content. legal_obligation and reported_instruction REPORT norms or instructions found in the world; combined with agent_authority: none they are never addressed to the reader. Lexical imperative-detection is not the boundary; this typing is."
    },
    "claim": {
      "type": "object",
      "required": [
        "id",
        "text",
        "claim_type",
        "speech_act",
        "verification_level",
        "epistemic_status",
        "evidence_grade",
        "publication_state",
        "agent_authority"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^C[0-9]+$",
          "description": "Local identity; immutable global citation is record_id#id; stable article_id#id is a logical reference only."
        },
        "text": {
          "type": "string"
        },
        "claim_type": {
          "enum": [
            "fact",
            "synthesis",
            "causal_inference",
            "prediction"
          ]
        },
        "speech_act": {
          "$ref": "#/$defs/speech_act"
        },
        "authority_scope": {
          "type": [
            "string",
            "null"
          ],
          "description": "For legal_obligation / reported_instruction: whose norm it is and whom it binds in the world. Never the reader."
        },
        "quotation_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Required non-empty when speech_act is quotation or reported_instruction: the fenced quotation objects this claim reports."
        },
        "underlying_epistemic_status": {
          "$ref": "#/$defs/epistemic_status",
          "description": "Verified-attribution records: the status of the underlying matter, distinct from the attribution itself. Upgraded only when the underlying evidence clears the gates."
        },
        "verification_level": {
          "$ref": "#/$defs/verification_level"
        },
        "epistemic_status": {
          "$ref": "#/$defs/epistemic_status"
        },
        "evidence_grade": {
          "$ref": "#/$defs/evidence_grade"
        },
        "publication_state": {
          "enum": [
            "draft",
            "published",
            "corrected",
            "retracted"
          ]
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "derived_from": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "supports": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "contradicts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prediction": {
          "type": "object",
          "required": [
            "p",
            "event",
            "resolves_by"
          ],
          "properties": {
            "p": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "event": {
              "type": "string"
            },
            "resolves_by": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "valid_from": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "last_verified_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "note": {
          "type": "string"
        },
        "agent_authority": {
          "const": "none"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "claim_type": {
                "const": "prediction"
              }
            }
          },
          "then": {
            "required": [
              "prediction"
            ]
          },
          "else": {
            "not": {
              "required": [
                "prediction"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "claim_type": {
                "enum": [
                  "synthesis",
                  "causal_inference"
                ]
              }
            }
          },
          "then": {
            "required": [
              "derived_from"
            ],
            "properties": {
              "derived_from": {
                "minItems": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "verification_level": {
                "const": "unverified_pilot"
              }
            }
          },
          "then": {
            "properties": {
              "evidence_grade": {
                "enum": [
                  "D",
                  "E"
                ]
              },
              "publication_state": {
                "const": "draft"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "speech_act": {
                "enum": [
                  "quotation",
                  "reported_instruction"
                ]
              }
            }
          },
          "then": {
            "required": [
              "quotation_ids"
            ],
            "properties": {
              "quotation_ids": {
                "minItems": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "speech_act": {
                "enum": [
                  "legal_obligation",
                  "reported_instruction"
                ]
              }
            }
          },
          "then": {
            "required": [
              "authority_scope"
            ],
            "properties": {
              "authority_scope": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "verification_level": {
                "enum": [
                  "link_verified",
                  "corroborated"
                ]
              }
            }
          },
          "then": {
            "required": [
              "source_ids"
            ],
            "properties": {
              "source_ids": {
                "minItems": 1
              }
            }
          }
        }
      ],
      "additionalProperties": false
    },
    "quotation": {
      "type": "object",
      "required": [
        "id",
        "text",
        "speaker",
        "source_id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^Q[0-9]+$"
        },
        "text": {
          "type": "string",
          "description": "The quoted language, verbatim, fenced here and only here."
        },
        "speaker": {
          "type": "string"
        },
        "spoken_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "source_id": {
          "type": "string"
        },
        "locator": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "source": {
      "type": "object",
      "required": [
        "id",
        "title",
        "publisher",
        "publication_date",
        "source_type",
        "tier",
        "verification_level"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^S[0-9]+$"
        },
        "title": {
          "type": "string"
        },
        "publisher": {
          "type": "string"
        },
        "author": {
          "type": [
            "string",
            "null"
          ]
        },
        "publication_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Never fabricated; entered only after dereferencing."
        },
        "archived_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "accessed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "locator": {
          "type": [
            "string",
            "null"
          ]
        },
        "content_hash": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_type": {
          "enum": [
            "statute",
            "parliamentary_record",
            "official_statement",
            "court_or_legal_opinion",
            "scholarly",
            "archival",
            "press",
            "document_collection"
          ]
        },
        "tier": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3
        },
        "verification_level": {
          "$ref": "#/$defs/verification_level"
        },
        "note": {
          "type": "string"
        },
        "independence_group": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "verification_level": {
                "not": {
                  "const": "unverified_pilot"
                }
              }
            }
          },
          "then": {
            "required": [
              "url",
              "archived_url",
              "accessed_at",
              "content_hash",
              "locator"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?://"
              },
              "archived_url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?://"
              },
              "accessed_at": {
                "type": "string",
                "format": "date-time"
              },
              "content_hash": {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$"
              },
              "locator": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      ],
      "additionalProperties": false
    },
    "event": {
      "type": "object",
      "required": [
        "event_id",
        "state",
        "institution",
        "event_type",
        "decision",
        "event_date",
        "in_comparison_window",
        "source_ids"
      ],
      "properties": {
        "event_id": {
          "type": "string",
          "pattern": "^EV[0-9]+$"
        },
        "state": {
          "type": "string"
        },
        "institution": {
          "type": "string"
        },
        "event_type": {
          "enum": [
            "recognition_law",
            "recognition_resolution",
            "recognition_statement",
            "recognition_blocked",
            "standing_nonrecognition",
            "post_decision_softening",
            "diplomatic_reaction",
            "context_rupture",
            "context_agreement",
            "own_case_acknowledgement",
            "own_case_apology",
            "state_change",
            "deprecation"
          ]
        },
        "decision": {
          "type": "string"
        },
        "event_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "recognition_status_before": {
          "type": [
            "string",
            "null"
          ]
        },
        "recognition_status_after": {
          "type": [
            "string",
            "null"
          ]
        },
        "relations_with_turkey_indicator": {
          "type": [
            "string",
            "null"
          ]
        },
        "domestic_politics_indicator": {
          "type": [
            "string",
            "null"
          ]
        },
        "evidence_state": {
          "type": [
            "string",
            "null"
          ]
        },
        "in_comparison_window": {
          "type": "boolean"
        },
        "source_ids": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "claim_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "method": {
      "type": "object",
      "required": [
        "population",
        "inclusion_criteria",
        "case_selection_reasons",
        "known_missing_cases",
        "variables",
        "alternative_explanations",
        "falsification_conditions",
        "counter_check"
      ],
      "properties": {
        "population": {
          "type": "string"
        },
        "comparison_window": {
          "type": [
            "string",
            "null"
          ]
        },
        "inclusion_criteria": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "exclusion_criteria": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "case_selection_reasons": {
          "type": "string"
        },
        "known_missing_cases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "variables": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "alternative_explanations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "falsification_conditions": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "counter_check": {
          "type": "object",
          "required": [
            "mode"
          ],
          "properties": {
            "mode": {
              "enum": [
                "full",
                "sampled",
                "limited"
              ]
            },
            "rule": {
              "type": [
                "string",
                "null"
              ]
            },
            "coverage_note": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "narrative_section": {
      "type": "object",
      "required": [
        "id",
        "heading",
        "body_md"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "heading": {
          "type": "string"
        },
        "body_md": {
          "type": "string",
          "description": "Publisher narrative, rendered as inert data. [Cn]/[Qn] references are checked. Literal quotation duplication is rejected; complete attribution and semantic safety require editorial review."
        }
      },
      "additionalProperties": false
    },
    "history_entry": {
      "type": "object",
      "required": [
        "version",
        "date",
        "note"
      ],
      "properties": {
        "version": {
          "type": "string"
        },
        "date": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "signature": {
      "type": "object",
      "properties": {
        "alg": {
          "const": "Ed25519"
        },
        "key_id": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{86}==$"
        },
        "signed_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "alg",
        "key_id",
        "value",
        "signed_at"
      ],
      "additionalProperties": false
    },
    "attention_decision": {
      "type": "object",
      "properties": {
        "open_method_version": {
          "type": "string",
          "minLength": 1
        },
        "attention_weights_version": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "weights_status": {
          "enum": [
            "not_applicable",
            "pilot_seed",
            "adopted"
          ]
        },
        "allocation_surface": {
          "enum": [
            "programme_admission",
            "maintenance_priority",
            "broad_briefing",
            "context_pack",
            "attributed_position_inclusion",
            "omission_evaluation"
          ]
        },
        "query_class": {
          "enum": [
            "narrow_lookup",
            "subject_briefing",
            "comparative",
            "broad_priority",
            "omission_test"
          ]
        },
        "rationale": {
          "type": "string",
          "minLength": 1
        },
        "omissions": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "raw_axes": {
          "type": "object",
          "additionalProperties": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "confidence": {
          "type": "object",
          "additionalProperties": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "evidence_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "override": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "original_result": {
                  "type": "string",
                  "minLength": 1
                },
                "replacement": {
                  "type": "string",
                  "minLength": 1
                },
                "human": {
                  "type": "string",
                  "minLength": 1
                },
                "reason": {
                  "type": "string",
                  "minLength": 1
                },
                "consequence": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "original_result",
                "replacement",
                "human",
                "reason",
                "consequence"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "open_method_version",
        "attention_weights_version",
        "weights_status",
        "allocation_surface",
        "query_class",
        "rationale",
        "omissions",
        "raw_axes",
        "confidence",
        "evidence_ids",
        "override"
      ],
      "additionalProperties": false
    },
    "oversight": {
      "type": "object",
      "description": "Disclosure of the verification path (ew-workflows.md §0.1, stage 6). machine_verified: stages 3-5 passed and every human-review trigger was evaluated and clear. machine_verified_human_reviewed: additionally reviewed by the named human because a trigger fired or the editor chose to review.",
      "required": [
        "verification_mode",
        "review_triggers",
        "human_reviewer",
        "human_reviewed_at"
      ],
      "properties": {
        "verification_mode": {
          "anyOf": [
            {
              "enum": [
                "machine_verified",
                "machine_verified_human_reviewed"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "Null only in drafts."
        },
        "review_triggers": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/review_trigger"
          }
        },
        "human_reviewer": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "human_reviewed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "review_triggers": {
                "minItems": 1
              }
            },
            "required": [
              "review_triggers"
            ]
          },
          "then": {
            "properties": {
              "verification_mode": {
                "enum": [
                  "machine_verified_human_reviewed",
                  null
                ]
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "verification_mode": {
                "const": "machine_verified_human_reviewed"
              }
            },
            "required": [
              "verification_mode"
            ]
          },
          "then": {
            "properties": {
              "human_reviewer": {
                "type": "string",
                "minLength": 1
              },
              "human_reviewed_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "verification_mode": {
                "const": "machine_verified"
              }
            },
            "required": [
              "verification_mode"
            ]
          },
          "then": {
            "properties": {
              "review_triggers": {
                "maxItems": 0
              },
              "human_reviewer": {
                "type": "null"
              },
              "human_reviewed_at": {
                "type": "null"
              }
            }
          }
        }
      ]
    },
    "review_trigger": {
      "enum": [
        "allegation",
        "source_conflict",
        "reviewer_disagreement",
        "unrostered_source",
        "manipulation_flag",
        "reserved_category",
        "escalation"
      ],
      "description": "ew-workflows.md stage 6 triggers T1-T7, in order. Any one makes human review mandatory."
    }
  },
  "additionalProperties": false
}
