{
  "lexicon": 1,
  "id": "net.bisks.rateyourbuild.reply",
  "defs": {
    "main": {
      "type": "record",
      "description": "A single comment in a review's reply thread — a reply to the review itself, or to another reply, same shape either way, so a thread can grow to any depth. Each reply is its own addressable record with a unique rkey, so posting a second reply to the same person adds a new comment underneath rather than overwriting the first (an earlier revision of this lexicon overwrote in place per-target, which meant the same two people could never have more than one exchange each — fixed 2026-08-29). Written and read by rateyourbuild (https://rateyourbuild.bisks.net).",
      "key": "any",
      "record": {
        "type": "object",
        "required": ["subject", "reviewer", "text", "createdAt"],
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 200,
            "maxGraphemes": 100,
            "description": "The bare name of the rated site — same value as the rating record's subject."
          },
          "reviewer": {
            "type": "string",
            "format": "did",
            "description": "DID of the original review's author — the root of this reply's whole thread, constant for every reply anywhere in it (top-level or nested). Used to bucket the entire thread with one query; it is NOT who this particular reply is addressed to (see parentKey)."
          },
          "parentKey": {
            "type": "string",
            "maxLength": 400,
            "description": "Identifies the specific reply this one answers, as \"<authorDid>::<rkey>\" of that reply record. Omitted (or empty) for a top-level reply directly to the review itself. The direct addressee's DID is this field's authorDid segment, or `reviewer` when omitted — a client derives who a reply is \"to\" from this, it is never a separate free-form field."
          },
          "text": {
            "type": "string",
            "maxLength": 1500,
            "maxGraphemes": 300,
            "description": "The reply text."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this reply was written, as an ISO 8601 datetime."
          }
        }
      }
    }
  }
}
