{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://wickfeed.com/schema/id-entry.v1.json",
  "title": "Wickfeed identifier registry entry",
  "type": "object",
  "additionalProperties": false,
  "required": ["wf_id", "book", "question", "resolution_criteria", "aliases", "venues", "verified", "created", "status"],
  "properties": {
    "wf_id": {
      "type": "string",
      "pattern": "^wf:[a-z0-9-]+$",
      "description": "Permanent. Never reused. No venue name in the slug."
    },
    "book": { "type": "string", "pattern": "^[a-z0-9-]+$" },
    "question": { "type": "string", "minLength": 10 },
    "resolution_criteria": {
      "type": "string",
      "minLength": 20,
      "description": "Stance is measured against this text, never as sentiment."
    },
    "resolution_source": { "type": ["string", "null"] },
    "expected_resolution": { "type": ["string", "null"], "format": "date" },
    "aliases": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
    "venues": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["venue", "venue_ref", "url"],
        "properties": {
          "venue": { "type": "string" },
          "venue_ref": { "type": ["string", "null"] },
          "url": { "type": ["string", "null"] }
        },
        "description": "Reference metadata only. No price, size, or book depth fields are permitted (REQ-WF-ID-002)."
      }
    },
    "verified": {
      "type": "boolean",
      "description": "False means venue_ref is unresolved. Must not open a subscription."
    },
    "created": { "type": "string", "format": "date" },
    "status": { "type": "string", "enum": ["open", "resolved", "void"] }
  }
}
