{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trytaskin-ai/json-schema/trytaskin-ai-task-draft-schema.json",
  "title": "TaskDraft",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trytaskin-ai-openapi.json#/components/schemas/TaskDraft",
  "type": "object",
  "required": [
    "action",
    "execution_mode",
    "expected_result",
    "acceptance_test"
  ],
  "properties": {
    "action": {
      "type": "string",
      "description": "The single bounded action the person performs, in one sentence. Name what makes it human work."
    },
    "execution_mode": {
      "type": "string",
      "enum": [
        "digital",
        "physical",
        "hybrid"
      ]
    },
    "location": {
      "type": "string",
      "description": "Required for physical and hybrid tasks."
    },
    "timing": {
      "type": "string"
    },
    "expected_result": {
      "type": "string",
      "description": "The artifacts and structured fields the result must contain."
    },
    "acceptance_test": {
      "type": "string",
      "description": "The objective check that decides whether the result is accepted."
    },
    "constraints": {
      "type": "string"
    },
    "participant_slug": {
      "type": "string"
    },
    "principal": {
      "type": "string"
    },
    "contact_email": {
      "type": "string",
      "format": "email"
    },
    "budget": {
      "type": "string"
    },
    "idempotency_key": {
      "type": "string",
      "description": "Alternative to the idempotency-key header. Use one or the other."
    }
  }
}