{
  "lexicon": 1,
  "id": "net.bisks.fellowshipcast.ballot",
  "defs": {
    "main": {
      "type": "record",
      "description": "A person's own casting picks: which LLM model they'd assign to play each of the Fellowship of the Ring's nine walkers. One record per voter — the record key is always \"self\", so re-casting overwrites the previous ballot in place rather than creating a new one. Written and read by fellowshipcast (https://fellowshipcast.bisks.net).",
      "key": "any",
      "record": {
        "type": "object",
        "required": ["casting", "updatedAt"],
        "properties": {
          "casting": {
            "type": "array",
            "maxLength": 9,
            "items": { "type": "ref", "ref": "#pick" },
            "description": "One entry per character this ballot has cast, at most one per character."
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this ballot was last written, as an ISO 8601 datetime."
          }
        }
      }
    },
    "pick": {
      "type": "object",
      "required": ["character", "model"],
      "properties": {
        "character": {
          "type": "string",
          "maxLength": 40,
          "description": "The Fellowship member's id, e.g. \"gandalf\" or \"frodo\" — see fellowshipcast's CHARACTERS constant for the fixed list of nine."
        },
        "model": {
          "type": "string",
          "maxLength": 60,
          "description": "The id of the LLM model cast in that role, e.g. \"claude-opus\" — see fellowshipcast's MODELS constant for the fixed list of options."
        }
      }
    }
  }
}
