{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/specky-space/json-schema/specky-space-coding-brief-response-schema.json",
  "title": "CodingBriefResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/specky-space-api-openapi.json#/components/schemas/CodingBriefResponse",
  "type": "object",
  "required": [
    "ok",
    "summary",
    "product",
    "principles",
    "matches"
  ],
  "properties": {
    "ok": {
      "type": "boolean",
      "const": true
    },
    "summary": {
      "type": "string",
      "description": "Human-readable result text."
    },
    "query": {
      "type": [
        "string",
        "null"
      ]
    },
    "product": {
      "type": "object",
      "description": "Confirmed product identity.",
      "additionalProperties": true
    },
    "principles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Principle"
      }
    },
    "custom_instructions": {
      "type": [
        "string",
        "null"
      ]
    },
    "product_epoch": {
      "type": "integer"
    },
    "matches": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Approved spec or evidence matching the query.",
        "additionalProperties": true
      }
    }
  },
  "$defs": {
    "Principle": {
      "type": "object",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string"
        }
      }
    }
  }
}