{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scopeai-cc/json-schema/scopeai-cc-project-schema.json",
  "title": "Project",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scopeai-cc-openapi.json#/components/schemas/Project",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "site": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "industry": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "market": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "aliases": {
      "default": [],
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 80
      }
    },
    "competitors": {
      "default": [],
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "site": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              },
              {
                "type": "string",
                "const": ""
              }
            ]
          },
          "aliases": {
            "default": [],
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 80
            }
          }
        },
        "required": [
          "name",
          "site",
          "aliases"
        ],
        "additionalProperties": false
      }
    },
    "facts": {
      "default": "",
      "type": "string",
      "maxLength": 8000
    },
    "questionLibrary": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "question": {
            "type": "string",
            "minLength": 4,
            "maxLength": 500
          },
          "scene": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "origin": {
            "type": "string",
            "enum": [
              "preset",
              "public_question",
              "social",
              "shared_ai",
              "customer_support",
              "site_search",
              "manual",
              "generated"
            ]
          },
          "sourceName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "sourceUrl": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri"
          },
          "excerpt": {
            "default": "",
            "type": "string",
            "maxLength": 1000
          },
          "collectedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "question",
          "scene",
          "origin",
          "sourceName",
          "excerpt",
          "collectedAt",
          "enabled"
        ],
        "additionalProperties": false
      }
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "archived": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "name",
    "revision",
    "archived"
  ],
  "additionalProperties": true
}