{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/giljo-ai/json-schema/giljo-ai-task-update-schema.json",
  "title": "TaskUpdate",
  "description": "Schema for updating a task (PATCH /tasks/{id}).",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amh-openapi.json#/components/schemas/TaskUpdate",
  "properties": {
    "title": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "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": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "TSK",
            "HND"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Type",
      "description": "Fixed at creation. Omit to leave unchanged; a value different from the task's current type is refused and writes nothing."
    },
    "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"
    },
    "due_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Due Date",
      "description": "Task due date"
    },
    "parent_task_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Parent Task Id",
      "description": "Parent task ID for hierarchy changes"
    },
    "hidden": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hidden",
      "description": "Toggle the per-row UI declutter flag. Does NOT affect default list visibility for agents."
    },
    "completion_notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ],
      "title": "Completion Notes",
      "description": "Audit-trail notes appended to the task description when status transitions to 'completed'. Silently ignored for any other status."
    },
    "completed_revision": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed Revision",
      "description": "The task revision the completed work covers. Only accepted with status='completed'; a value other than the task's current revision is refused and nothing is written."
    }
  },
  "type": "object"
}