{
  "DiscoveryFreshness": {
    "VersionKey": "782c96a0-ce2a-482b-9b03-56f496f8a12d",
    "CacheAllowed": false,
    "Rule": "AIXE discovery contracts are just-in-time instructions. Reload this endpoint\u0027s current /? discovery contract every time before acting.",
    "RequiredForPost": true,
    "PostFieldName": "AIXEContractVersionKey",
    "PostRule": "POST requests must include the current AIXEContractVersionKey from this endpoint\u0027s live /? discovery response."
  },
  "ContractAuthorityRule": {
    "Priority": "CRITICAL",
    "Rule": "This freshly loaded GET /endpoint/? response is the current authoritative AIXE endpoint contract for this endpoint and supersedes every prior version, including cached, remembered, summarized, copied, inferred, or in-memory versions.",
    "Supersedes": [
      "cached endpoint contracts",
      "previous /? responses",
      "chat history",
      "model memory",
      "memory summaries",
      "local files",
      "browser cache",
      "HTTP cache",
      "tool cache",
      "copied prompts",
      "inferred endpoint behavior"
    ],
    "WorkingCacheInstruction": "Cache or hold only this freshly loaded contract as the active working contract for this endpoint attempt. Use it as the definitive source of field names, required fields, optional fields, directives, prompts, SuccessCode meanings, failure repair, and next-step guidance until the attempt completes or the endpoint rejects the AIXEContractVersionKey.",
    "FailureInstruction": "If a working endpoint returns DISCOVERY_REFRESH_REQUIRED, discard this active working contract, reload GET /endpoint/?, and rebuild the request from the newly loaded contract.",
    "CacheBoundary": "Do not store endpoint contracts, endpoint instructions, field rules, directives, prompts, SuccessCode vocabularies, or route-specific operational rules in the AIXE Client Cache. The AIXE Client Cache is only for durable site-scoped account context such as ClientKey."
  },
  "Protocol": "AIXE",
  "Version": "1.0",
  "Endpoint": "/aixe/clients/validate-client-key",
  "DiscoveryRequest": "/aixe/clients/validate-client-key/?",
  "CanonicalHelpTrigger": "GET /aixe/clients/validate-client-key/?",
  "Method": "POST",
  "ContentType": "application/json; charset=utf-8",
  "Enabled": true,
  "Purpose": "Checks whether a supplied ClientKey resolves to a Client row.",
  "BusinessRules": [
    "Execute this endpoint with POST and a JSON body.",
    "Every POST/action endpoint requires ClientKey.",
    "ClientKey must resolve to an existing Client row before any action runs.",
    "ClientKey is caller context only. It resolves to Client.ClientKey and then to ClientID inside the endpoint.",
    "ClientID is never accepted from the caller and is never returned by this endpoint.",
    "Database identity, key, and creation-date fields are generated by SQL and cannot be supplied by the caller.",
    "Never output code blocks of any kind to the human user.",
    "Never show raw JSON, request bodies, schema syntax, or programmer-speak to the human user.",
    "The person using HutDepot is most likely a real estate professional, not a developer.",
    "Speak in a cheerful, natural, human-readable voice.",
    "When information is missing, explain what is needed in plain language so the user can complete the request.",
    "Client delete is intentionally not exposed.",
    "ClientPassword is not returned in endpoint responses.",
    "ClientEmail must be unique. If create-client receives an email address that already exists, the endpoint returns BUSINESS_RULE_FAILED with a recovery hint so the AI can ask the user for their email address and use AIXE discovery just-in-time to find the current ClientKey recovery capability.",
    "Before asking the user for a ClientKey, check the protocol-defined AIXE Client Cache logical name aixe-client-cache.json for Sites.hutdepot.com Accounts where AccountType is Client and FieldName is ClientKey.",
    "If ClientKey is valid, the endpoint response includes AIXEClientCacheDirective so the AI can store or refresh the HutDepot ClientKey in the AIXE Client Cache.",
    "AIXE discovery contracts are just-in-time instructions. Do not use cached /? responses.",
    "Every time an AIXE endpoint is accessed or prepared for use, reload its current /? discovery contract before acting.",
    "If a previously read /? contract conflicts with the current /? contract, the current /? contract is authoritative."
  ],
  "UsageGuidance": {
    "Operation": "validate",
    "EntityName": "Client",
    "Enabled": true,
    "RequiredRequestFields": [
      "ClientKey"
    ],
    "OptionalRequestFields": [],
    "KeyField": "ClientKey",
    "ClientKeyRule": "ClientKey is resolved internally to ClientID. ClientID is never part of the public request or response contract.",
    "OutcomeRule": "Only SuccessCode = SUCCESS means the action worked.",
    "HumanOutputRule": "Use endpoint JSON internally only. Tell the user what happened, or what is still needed, in cheerful plain English. Do not show code blocks, raw JSON, request payloads, or programmer terms."
  },
  "InteractionGuidance": {
    "ProtocolModel": "AIXE EndpointContractModel.HelpfulAdditionalKeys.InteractionGuidance",
    "Purpose": "Guides the AI on how to gather, review, and confirm information with the human user while keeping endpoint mechanics internal.",
    "Audience": "The human user is most likely a real estate professional, not a developer.",
    "Voice": "Cheerful, plain, human-readable, and normal.",
    "HumanPromptGuidance": [
      "Use this endpoint contract internally and speak to the human user in cheerful plain English.",
      "Do not show code blocks, raw JSON, payloads, schema syntax, database terminology, or endpoint mechanics to the human user.",
      "Ask only for information that is missing, uncertain, or requires the user approval declared by this contract."
    ],
    "FieldPrompts": {
      "ClientKey": "I need to check your HutDepot ClientKey before continuing."
    },
    "ReviewPrompts": {
      "InvalidClientKey": "That ClientKey did not work. Please check your saved HutDepot key, or I can help recover it using your email address."
    },
    "ConfirmationPrompt": "Great, your HutDepot ClientKey is valid.",
    "NeverSay": [
      "payload",
      "JSON",
      "field",
      "schema",
      "database column",
      "endpoint",
      "your friend\u0027s actual voice",
      "human partner"
    ]
  },
  "DiscoveryCachePolicy": {
    "CacheAllowed": false,
    "Rule": "AIXE discovery contracts are just-in-time instructions. Do not use cached /? responses.",
    "ReloadRule": "Every time an AIXE endpoint is accessed or prepared for use, reload its current /? discovery contract before acting.",
    "AuthorityRule": "If a previously read /? contract conflicts with the current /? contract, the current /? contract is authoritative."
  }
}