{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/seggwat-com/json-schema/seggwat-com-agent-feedback-input-schema.json",
  "title": "AgentFeedbackInput",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/seggwat-com-api-openapi.json#/components/schemas/AgentFeedbackInput",
  "type": "object",
  "required": [
    "subject",
    "signal",
    "content"
  ],
  "properties": {
    "reporter": {
      "type": "object",
      "properties": {
        "agent_vendor": {
          "type": "string"
        },
        "agent_product": {
          "type": "string"
        },
        "agent_version": {
          "type": "string"
        }
      },
      "description": "Optional. Fields left out are derived from the User-Agent header's first name/version token; agent_vendor defaults to \"unknown\"."
    },
    "subject": {
      "type": "object",
      "required": [
        "surface"
      ],
      "properties": {
        "surface": {
          "type": "string",
          "description": "Endpoint path, docs URL, CLI command or SDK method the agent was using."
        },
        "domain": {
          "type": "string",
          "description": "Defaults to the host of the project's first allowed origin, or \"unknown\"."
        },
        "kind": {
          "$ref": "#/$defs/AgentSurfaceKind"
        },
        "product": {
          "type": "string"
        }
      }
    },
    "signal": {
      "type": "object",
      "required": [
        "category"
      ],
      "properties": {
        "category": {
          "$ref": "#/$defs/AgentCategory"
        },
        "severity": {
          "allOf": [
            {
              "$ref": "#/$defs/AgentSeverity"
            }
          ],
          "default": "medium",
          "description": "Defaults to medium."
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "default": 0.5,
          "description": "Defaults to 0.5."
        },
        "reproducibility": {
          "$ref": "#/$defs/AgentReproducibility"
        }
      }
    },
    "content": {
      "type": "object",
      "required": [
        "title"
      ],
      "properties": {
        "title": {
          "type": "string",
          "maxLength": 256
        },
        "summary": {
          "type": "string",
          "maxLength": 4096
        },
        "hypothesis": {
          "type": "string",
          "maxLength": 2048
        }
      }
    },
    "evidence": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "required": [
          "type",
          "content"
        ],
        "properties": {
          "type": {
            "$ref": "#/$defs/AgentEvidenceType"
          },
          "content": {
            "type": "string",
            "description": "Up to 65536 bytes."
          },
          "redacted": {
            "type": "boolean",
            "default": false
          }
        }
      }
    }
  },
  "$defs": {
    "AgentCategory": {
      "type": "string",
      "enum": [
        "bug",
        "docs_mismatch",
        "friction",
        "feature_gap",
        "quality_degradation",
        "other"
      ]
    },
    "AgentEvidenceType": {
      "type": "string",
      "enum": [
        "http_summary",
        "stderr_excerpt",
        "repro_steps",
        "screenshot",
        "log_excerpt",
        "other"
      ]
    },
    "AgentReproducibility": {
      "type": "string",
      "enum": [
        "always",
        "sometimes",
        "intermittent",
        "once"
      ]
    },
    "AgentSeverity": {
      "type": "string",
      "enum": [
        "critical",
        "high",
        "medium",
        "low"
      ]
    },
    "AgentSurfaceKind": {
      "type": "string",
      "enum": [
        "api_endpoint",
        "docs_page",
        "cli_command",
        "sdk_method",
        "other"
      ]
    }
  }
}