{
  "lexicon": 1,
  "id": "net.bisks.rateyourbuild.rating",
  "defs": {
    "main": {
      "type": "record",
      "description": "A person's own 0-10 rating of one site the buildthis bot has built, RateYourMusic-style, with an optional written review. One record per site — the record key is the site's bare name (e.g. \"steamtags\"), so re-rating (or re-reviewing) a site overwrites its record in place rather than creating a new one. Written and read by rateyourbuild (https://rateyourbuild.bisks.net).",
      "key": "any",
      "record": {
        "type": "object",
        "required": ["subject", "score", "ratedAt"],
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 200,
            "maxGraphemes": 100,
            "description": "The bare name of the rated site (sites/<name>/, served at <name>.bisks.net) — not its URL. The record's rkey is this value."
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10,
            "description": "The rater's own judgement of the site, 0 (worst) to 10 (best)."
          },
          "ratedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this record was last written, as an ISO 8601 datetime. Bumped on every edit — see createdAt for the original."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this rater first rated this site, as an ISO 8601 datetime — preserved unchanged across later edits, unlike ratedAt. Lets a fix logged after the original review (or bug flag) still count as \"after\" even if the rater has since edited the review, e.g. to add text or update the score. Missing on records written before 2026-08-30; readers fall back to ratedAt for those."
          },
          "text": {
            "type": "string",
            "maxLength": 3000,
            "maxGraphemes": 600,
            "description": "An optional written review to go with the score, RateYourMusic-style. Omit for a bare rating."
          },
          "bugged": {
            "type": "boolean",
            "description": "Set true to flag this review as reporting a bug in the rated site itself, rather than just an opinion on it — lets the review be swept up separately from ordinary reviews."
          },
          "pinged": {
            "type": "boolean",
            "description": "Set true to flag this review for @buildthis.bisks.net's own attention — a feature idea or something worth building/fixing, not necessarily a bug. Swept up separately from ordinary reviews, same mechanism as \"bugged\" but broader than just bug reports."
          }
        }
      }
    }
  }
}
