{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://astranl.com/spec/robot-passport-v1/schema.json",
  "title": "AstraNL Robot Passport v1",
  "description": "Canonical robot identity+capability+lifecycle record. Endpoint: GET /api/robot-passport/{id} -> {ok:true, passport:{...}}. Conforming passports MUST contain the required fields below; extra fields are allowed (forward-compatible). honest_gaps is the truth-law field: what is NOT known must be stated, never invented.",
  "type": "object",
  "required": ["ok", "passport"],
  "properties": {
    "ok": {"const": true},
    "passport": {
      "type": "object",
      "required": ["passport_id", "schema", "identity", "capability", "lifecycle", "provenance", "honest_gaps"],
      "properties": {
        "passport_id": {"type": ["string", "integer"]},
        "schema": {"type": "string", "pattern": "v1", "description": "schema tag containing v1"},
        "identity": {"type": "object", "description": "name, manufacturer, model, tier T0-T3"},
        "capability": {"type": ["object", "array"], "description": "declared/enriched capabilities"},
        "lifecycle": {"type": "object", "description": "status and dates"},
        "provenance": {"type": "object", "description": "where each fact came from + tier meaning"},
        "honest_gaps": {"type": ["array", "object"], "description": "explicitly unknown fields - truth law"},
        "compliance": {"type": ["object", "null"]},
        "commerce": {"type": ["object", "null"]},
        "doctrine": {"type": ["string", "object", "null"]},
        "claim_url": {"type": ["string", "null"], "description": "manufacturer one-click claim to T2"}
      }
    }
  }
}
