{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://naroid.com/schemas/dreztek-task-list-v1.schema.json",
  "title": "DrezTek/Naro Task List v1",
  "description": "Portable task list interchange for Kanso, Naro, and AI-generated imports. Also called a Naro Task List — same format.",
  "type": "object",
  "required": ["version", "kind", "list", "tasks"],
  "additionalProperties": false,
  "properties": {
    "version": { "enum": ["1.0", "1.1", "1.2"] },
    "kind": { "const": "dreztek-task-list" },
    "exportedAt": { "type": "string", "format": "date-time" },
    "list": {
      "type": "object",
      "required": ["title"],
      "additionalProperties": false,
      "properties": {
        "title": { "type": "string", "minLength": 1, "maxLength": 200 },
        "categories": {
          "type": "array",
          "items": { "type": "string", "minLength": 1, "maxLength": 80 },
          "maxItems": 50
        },
        "sortMode": {
          "type": "string",
          "enum": ["title", "priority", "dueDate", "due_date", "order"]
        },
        "viewMode": { "type": "string" },
        "icon": { "type": ["string", "null"] }
      }
    },
    "tasks": {
      "type": "array",
      "maxItems": 500,
      "items": {
        "type": "object",
        "required": ["title"],
        "additionalProperties": true,
        "properties": {
          "title": { "type": "string", "minLength": 1, "maxLength": 500 },
          "note": { "type": ["string", "null"], "maxLength": 8000 },
          "priority": {
            "type": ["string", "null"],
            "enum": ["none", "low", "medium", "high", "critical", "focus", null]
          },
          "completed": { "type": "boolean", "default": false },
          "inProgress": { "type": "boolean", "default": false },
          "dueDate": { "type": ["string", "null"], "maxLength": 32 },
          "url": { "type": ["string", "null"], "maxLength": 2000 },
          "category": { "type": ["string", "null"], "maxLength": 80 },
          "tradeCategory": { "type": ["string", "null"], "maxLength": 80 },
          "position": {
            "type": ["string", "null"],
            "enum": ["focus", "quickWin", null]
          },
          "tags": {
            "type": "array",
            "items": { "type": "string", "minLength": 1, "maxLength": 80 },
            "maxItems": 20
          },
          "order": { "type": "integer", "minimum": 0 },
          "isDeadline": { "type": "boolean" },
          "isRepeat": { "type": "boolean" },
          "repeatFrequency": { "type": ["string", "null"] },
          "isFollowup": { "type": "boolean" },
          "inProgressStartedAt": { "type": ["string", "null"] },
          "attachment": {},
          "createdAt": { "type": ["string", "null"] },
          "updatedAt": { "type": ["string", "null"] }
        }
      }
    }
  }
}
