{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ownkube-io/json-schema/ownkube-io-agent-feedback-body-schema.json",
  "title": "AgentFeedbackBody",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ownkube-io-openapi.json#/components/schemas/AgentFeedbackBody",
  "type": "object",
  "properties": {
    "category": {
      "type": "string",
      "enum": [
        "failed",
        "missing_capability",
        "bug",
        "confusing",
        "docs_gap",
        "suggestion",
        "worked_well"
      ],
      "description": "What kind of report this is. failed: a tool call or task did not complete (error, timeout, stuck status). missing_capability: what the user asked for has no tool, input, or option here. bug: something completed but the result is wrong or inconsistent (status says healthy but the app is down, a value didn't stick). confusing: a tool name, description, input, error, or output misled you or made you guess. docs_gap: instructions or docs were missing, wrong, or out of date. suggestion: an improvement idea. worked_well: something that went smoothly and should stay that way."
    },
    "severity": {
      "type": "string",
      "enum": [
        "blocker",
        "degraded",
        "minor"
      ],
      "description": "Impact on the user's task. blocker: the task could not be finished. degraded: finished only partly, or with a workaround. minor: an annoyance that did not change the result. Omit for suggestion and worked_well."
    },
    "summary": {
      "type": "string",
      "minLength": 5,
      "maxLength": 200,
      "description": "One line a person can triage without reading the rest, e.g. 'create_deployment rejects a Dockerfile in a subfolder with no hint about set_build_context'."
    },
    "goal": {
      "type": "string",
      "maxLength": 2000,
      "description": "What the user asked for, or what you were trying to accomplish, in plain words. Paraphrase; don't paste the whole conversation."
    },
    "attempted": {
      "type": "string",
      "maxLength": 4000,
      "description": "The steps you took, in order: which tools you called, with the inputs that mattered, and anything else you tried (retries, alternatives). Never include passwords, tokens, keys, or connection strings."
    },
    "outcome": {
      "type": "string",
      "maxLength": 4000,
      "description": "What actually happened: the exact error message and code, the status or field values you saw, how long you waited. Quote errors verbatim (with secrets removed); they are the most useful part of a report."
    },
    "expected": {
      "type": "string",
      "maxLength": 2000,
      "description": "What you expected instead, or what would have let you finish (a tool, an input, a clearer error, a doc)."
    },
    "workaround": {
      "type": "string",
      "maxLength": 2000,
      "description": "How you got around it, if you did, or what you told the user to do by hand (for example, use the dashboard)."
    },
    "tools": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "maxItems": 20,
      "description": "Names of the tools involved, most relevant first, e.g. ['create_deployment', 'get_build_logs']."
    },
    "resourceIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "maxItems": 20,
      "description": "Ids of the deployments, clusters, projects, environments, or revisions involved, so the team can look at the exact resource."
    },
    "client": {
      "type": "string",
      "maxLength": 200,
      "description": "Your client and model, e.g. 'Claude Code, claude-opus-5-5', so reports can be grouped by agent."
    }
  },
  "required": [
    "category",
    "summary"
  ]
}