{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/giljo-ai/json-schema/giljo-ai-task-create-schema.json",
  "title": "TaskCreate",
  "description": "Schema for creating a task (POST /tasks/).\n\nTasks are tenant-scoped with auto-assigned TSK-NNNN serials.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amh-openapi.json#/components/schemas/TaskCreate",
  "properties": {
    "title": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Title",
      "description": "Task title"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ],
      "title": "Description",
      "description": "Task description"
    },
    "status": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "pending",
            "in_progress",
            "completed",
            "blocked",
            "cancelled"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Status",
      "description": "Task status: pending, in_progress, completed, blocked, cancelled"
    },
    "priority": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Priority",
      "description": "Task priority: low, medium, high, critical"
    },
    "task_type": {
      "type": "string",
      "enum": [
        "TSK",
        "HND"
      ],
      "title": "Task Type",
      "description": "'TSK' (default) or 'HND' (agent session handover). An 'HND' description must carry '## Verify before trusting', '## Waiting on the operator' and '## Cannot testify', each with content.",
      "default": "TSK"
    },
    "parent_task_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Parent Task Id",
      "description": "Parent task ID for hierarchy"
    },
    "due_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Due Date",
      "description": "Task due date"
    },
    "estimated_effort": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Estimated Effort",
      "description": "Estimated effort in hours"
    },
    "actual_effort": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Actual Effort",
      "description": "Actual effort in hours"
    }
  },
  "type": "object",
  "required": [
    "title"
  ]
}