{
 "$id": "ipvv:person:v1",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "description": "CANONICAL bio record for masters and scholars alike. One shape, two roles (kind). Dates are honesty-flagged: exact | approximate | traditional | unknown. Nothing here asserts what the sources don't support.",
 "required": [
  "dates",
  "id",
  "kind",
  "name",
  "status",
  "summary",
  "section"
 ],
 "properties": {
  "affiliation": {
   "description": "scholars: institution/school; masters: pitha/lineage seat if known",
   "type": "string"
  },
  "bio": {
   "description": "paragraph: who, what they did, why they matter here, what is NOT known",
   "type": "string"
  },
  "dates": {
   "properties": {
    "flourished": {
     "type": "string"
    },
    "note": {
     "description": "REQUIRED: basis + uncertainty (e.g. Saptarsi calc, Rajatarangini association, traditional)",
     "type": "string"
    },
    "birth": {
     "description": "estimated birth year CE, or null when undocumented — never invented; null sorts last",
     "type": [
      "integer",
      "null"
     ]
    },
    "approx": {
     "type": "boolean"
    }
   },
   "required": [
    "flourished",
    "note"
   ],
   "type": "object"
  },
  "holdings": {
   "description": "where their texts/papers live that we hold: volume paths, R2 prefixes, in-repo paths",
   "items": {
    "type": "string"
   },
   "type": "array"
  },
  "id": {
   "description": "lowercase slug, immutable, e.g. abhinavagupta, ratie",
   "pattern": "^[a-z0-9-]+$",
   "type": "string"
  },
  "kind": {
   "enum": [
    "master",
    "scholar",
    "teacher",
    "lineage"
   ],
   "type": "string"
  },
  "lineage": {
   "description": "masters: pupil-of/teacher-of links (the transmission graph)",
   "items": {
    "properties": {
     "relation": {
      "type": "string"
     },
     "who": {
      "type": "string"
     }
    },
    "required": [
     "relation",
     "who"
    ],
    "type": "object"
   },
   "type": "array"
  },
  "image": {
   "description": "hero image. RULE: no invented likenesses of historical persons — use manuscript folios, lineage diagrams, or context art with an honest caption saying exactly that",
   "properties": {
    "caption": {
     "description": "must state what is shown and that it is not a portrait where no portrait exists",
     "type": "string"
    },
    "credit": {
     "type": "string"
    },
    "credit_url": {
     "type": "string"
    },
    "licence": {
     "type": "string"
    },
    "licence_url": {
     "type": "string"
    },
    "src": {
     "type": "string"
    }
   },
   "type": [
    "object",
    "null"
   ]
  },
  "name": {
   "type": "string"
  },
  "name_iast": {
   "type": "string"
  },
  "place": {
   "type": "string"
  },
  "status": {
   "description": "living | active | historical | lineage | traditional | disputed — active=publishing now; historical=deceased with record; lineage=known through transmission; traditional=dates by tradition",
   "type": "string"
  },
  "summary": {
   "description": "one line: who + why they matter to this site",
   "maxLength": 300,
   "type": "string"
  },
  "section": {
   "description": "nav section: masters (premodern, ordered by birth year) or modern (living scholars + lineage teachers, alphabetical)",
   "enum": [
    "masters",
    "modern"
   ]
  }
 },
 "title": "ipvv person (canonical bio, masters and scholars alike)",
 "type": "object"
}