{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://serpens.app/schemas/aya-disk/v1/aya-file.schema.json",
  "title": "Aya Machine-Readable File v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["$schema", "schemaVersion", "kind", "id", "owner", "createdAt", "updatedAt", "revision", "data"],
  "properties": {
    "$schema": { "type": "string", "format": "uri-reference" },
    "schemaVersion": { "const": "1.0.0" },
    "kind": { "enum": ["manifest", "profile", "preferences", "conversation", "memory", "project", "decision", "skill"] },
    "id": { "type": "string", "minLength": 1 },
    "owner": { "type": "object", "additionalProperties": false, "required": ["type", "id"], "properties": { "type": { "enum": ["user", "organization"] }, "id": { "type": "string", "minLength": 1 } } },
    "createdAt": { "type": "string", "format": "date-time" },
    "updatedAt": { "type": "string", "format": "date-time" },
    "revision": { "type": "integer", "minimum": 0 },
    "relationships": { "type": "array", "items": { "type": "object", "required": ["type", "targetKind", "targetId"], "properties": { "type": { "type": "string" }, "targetKind": { "type": "string" }, "targetId": { "type": "string" } } } },
    "extensions": { "type": "object", "additionalProperties": true },
    "data": {}
  }
}
