{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://upstage.ai/design-system/schemas/agent-request/0.1.0",
  "title": "Lift Agent Request",
  "description": "agent에게 작업을 요청할 때 입력으로 고정할 구조. lightweight schema — Stage 1 (2026-05).",
  "type": "object",
  "required": [
    "context",
    "role",
    "taskType",
    "target",
    "inputs",
    "requirements",
    "outputFormat"
  ],
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string",
      "enum": ["product", "website", "marketing"],
      "description": "작업 context. context-routing.json 기준."
    },
    "role": {
      "type": "string",
      "enum": ["planner-designer", "developer", "vendor"],
      "description": "요청자 역할. prompt guide 선택에 영향."
    },
    "taskType": {
      "type": "string",
      "enum": [
        "page",
        "component",
        "section",
        "copy",
        "review",
        "patch",
        "skill-call"
      ],
      "description": "작업 유형."
    },
    "target": {
      "type": "string",
      "minLength": 1,
      "description": "만들거나 검토할 대상 (예: \"Console API Key settings page\")."
    },
    "inputs": {
      "type": "object",
      "description": "agent가 참고해야 하는 Starter Kit 파일 path.",
      "properties": {
        "designContext": {
          "type": "string",
          "description": "예: context/DESIGN.product.md"
        },
        "tokens": {
          "type": "array",
          "items": { "type": "string" },
          "description": "예: [\"tokens/tokens.product.css\", \"tokens/token-intents.json\"]"
        },
        "tokenIntentMap": {
          "type": "string",
          "description": "예: tokens/token-intents.json"
        },
        "forbiddenRules": {
          "type": "string",
          "description": "예: rules/forbidden-rules.json"
        },
        "contextRouting": {
          "type": "string",
          "description": "예: rules/context-routing.json"
        },
        "promptGuide": {
          "type": "string",
          "description": "예: prompts/developer-prompt-guide.md"
        },
        "websiteTokenPolicy": {
          "type": "string",
          "description": "예: tokens/website-token-policy.md (Website context 한정)"
        }
      },
      "additionalProperties": true
    },
    "requirements": {
      "type": "array",
      "items": { "type": "string" },
      "minItems": 1,
      "description": "작업 조건 목록 (예: \"Use token intents\", \"Avoid raw hex\", \"Include design self-check\")."
    },
    "constraints": {
      "type": "object",
      "description": "Optional 구현 제약 (개발자 요청 시).",
      "properties": {
        "framework": {
          "type": "string",
          "description": "예: \"Next.js 14 App Router\""
        },
        "styling": { "type": "string", "description": "예: \"Tailwind 3\"" },
        "react": { "type": "string", "description": "예: \"18\"" },
        "uiPackage": {
          "type": "string",
          "description": "예: \"@upstageai/ui@1.1.12\""
        },
        "noRawHex": { "type": "boolean", "default": true },
        "noFallbackHex": { "type": "boolean", "default": true },
        "noMagicZIndex": { "type": "boolean", "default": true },
        "noTextGradient": { "type": "boolean", "default": true }
      },
      "additionalProperties": true
    },
    "outputFormat": {
      "type": "string",
      "enum": [
        "structure-copy-code-self-check",
        "structure-only",
        "code-only",
        "patch-only",
        "review-report"
      ],
      "description": "결과물 형식. agent-response.schema.json과 짝."
    },
    "humanReviewer": {
      "type": "string",
      "description": "샘플별 사람 reviewer 1명 (Stage 1.5 정책)."
    }
  },
  "examples": [
    {
      "context": "product",
      "role": "developer",
      "taskType": "page",
      "target": "Console API Key settings page",
      "inputs": {
        "designContext": "context/DESIGN.product.md",
        "tokens": ["tokens/tokens.product.css", "tokens/token-intents.json"],
        "forbiddenRules": "rules/forbidden-rules.json",
        "promptGuide": "prompts/developer-prompt-guide.md"
      },
      "requirements": [
        "Use token intents",
        "Avoid raw hex",
        "Avoid fallback hex",
        "Avoid magic z-index",
        "Include empty/loading/error/success states",
        "Include design self-check"
      ],
      "constraints": {
        "framework": "Next.js 14 App Router",
        "styling": "Tailwind 3",
        "react": "18",
        "uiPackage": "@upstageai/ui@1.1.12"
      },
      "outputFormat": "structure-copy-code-self-check",
      "humanReviewer": "dhongshim"
    }
  ]
}
