{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pencil-ink/json-schema/pencil-ink-task-schema.json",
  "title": "Task",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pencil-ink-openapi.yml#/components/schemas/Task",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "displayId": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "$ref": "#/$defs/TaskStatus"
    },
    "baseStatus": {
      "$ref": "#/$defs/TaskBaseStatus"
    },
    "statusId": {
      "type": [
        "string",
        "null"
      ]
    },
    "priority": {
      "$ref": "#/$defs/Priority"
    },
    "taskType": {
      "type": "string",
      "description": "Defaults to `task`."
    },
    "projectId": {
      "type": [
        "string",
        "null"
      ]
    },
    "epicId": {
      "type": [
        "string",
        "null"
      ]
    },
    "phaseId": {
      "type": [
        "string",
        "null"
      ]
    },
    "customerId": {
      "type": [
        "string",
        "null"
      ]
    },
    "agentId": {
      "type": [
        "string",
        "null"
      ]
    },
    "assigneeId": {
      "type": [
        "string",
        "null"
      ]
    },
    "humanAssigneeId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Canonical Pencil user id for the task's human owner. Distinct from agentId."
    },
    "autoPickupDisabled": {
      "type": "boolean",
      "description": "When true, unassigned inbox tasks are kept manual and skipped by automatic AI pickup."
    },
    "dueAt": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Epoch ms."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "checklistSummary": {
      "$ref": "#/$defs/TaskChecklistSummary"
    },
    "createdAt": {
      "type": "integer",
      "description": "Epoch ms."
    },
    "updatedAt": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Epoch ms."
    }
  },
  "$defs": {
    "Priority": {
      "type": "string",
      "description": "Stable configured priority key. Defaults: urgent, high, medium, low. Display names may be customized at workspace or organization scope."
    },
    "TaskBaseStatus": {
      "type": "string",
      "enum": [
        "backlog",
        "todo",
        "in_progress",
        "blocked",
        "verifying",
        "done"
      ]
    },
    "TaskChecklistSummary": {
      "type": "object",
      "properties": {
        "subjectCount": {
          "type": "integer"
        },
        "stepCount": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        },
        "completed": {
          "type": "integer"
        },
        "requiredTotal": {
          "type": "integer"
        },
        "requiredCompleted": {
          "type": "integer"
        },
        "incompleteRequired": {
          "type": "integer"
        },
        "complete": {
          "type": "boolean"
        },
        "percent": {
          "type": "integer"
        }
      }
    },
    "TaskStatus": {
      "type": "string",
      "enum": [
        "backlog",
        "inbox",
        "in_progress",
        "blocked",
        "review",
        "done"
      ]
    }
  }
}