{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://deeprank.org/schema/deeprank-profile.schema.json",
  "title": "Deeprank Selection Profile",
  "description": "The atomic unit of AI-readable business identity. A structured declaration containing six mandatory layers: Identity, Problem Declaration, Capability, Fit Conditions, Non-Fit/Exclusions, and Stability/Confidence.",
  "type": "object",
  "required": [
    "identity",
    "problem_declaration",
    "capability",
    "fit_conditions",
    "non_fit",
    "stability"
  ],
  "properties": {
    "identity": {
      "type": "object",
      "description": "Establishes who the business is",
      "required": ["name", "entity_type"],
      "properties": {
        "name": {
          "type": "string",
          "description": "Legal or operating name of the business"
        },
        "entity_type": {
          "type": "string",
          "description": "Standardized business type classification from controlled vocabulary"
        },
        "domain": {
          "type": "string",
          "format": "hostname",
          "description": "Primary web domain for cross-reference verification"
        }
      }
    },
    "problem_declaration": {
      "type": "object",
      "description": "States what category of problems the business solves",
      "required": ["problem_class", "description"],
      "properties": {
        "problem_class": {
          "type": "string",
          "description": "Standardized problem category from controlled vocabulary"
        },
        "description": {
          "type": "string",
          "maxLength": 500,
          "description": "Human-readable summary of the problem space addressed"
        }
      }
    },
    "capability": {
      "type": "object",
      "description": "Declares specific things the business can do",
      "required": ["labels"],
      "properties": {
        "labels": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Standardized capability labels from controlled vocabulary"
        },
        "methods": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Specific approaches, tools, or processes used"
        }
      }
    },
    "fit_conditions": {
      "type": "object",
      "description": "Declares what constraints the business can satisfy",
      "properties": {
        "geographic": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Locations served"
        },
        "customer_type": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Types of customers served"
        },
        "constraints": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Other conditions the business can satisfy"
        }
      }
    },
    "non_fit": {
      "type": "object",
      "description": "Declares explicit exclusions",
      "required": ["exclusions"],
      "properties": {
        "exclusions": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Explicit declarations of what the business does not handle"
        }
      }
    },
    "stability": {
      "type": "object",
      "description": "Provides metadata about information reliability",
      "required": ["confidence"],
      "properties": {
        "confidence": {
          "type": "string",
          "enum": ["high", "medium", "low"],
          "description": "Self-assessed confidence level"
        },
        "last_verified": {
          "type": "string",
          "format": "date",
          "description": "Date when the profile was last reviewed for accuracy"
        }
      }
    }
  }
}
