{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.nex-a.net/service-catalog.schema.json",
  "title": "NexA public service catalog",
  "description": "Public schema for /service-catalog.json. It describes official NexA service summaries, localized URLs, quick answers, and consultation guidance for crawlers, procurement tools, and AI agents.",
  "type": "object",
  "required": [
    "$schema",
    "schemaVersion",
    "publisher",
    "origin",
    "lastUpdated",
    "purpose",
    "supportedLocales",
    "entryPoints",
    "services",
    "serviceCases",
    "portfolioTaxonomy",
    "ecosystemPolicy",
    "productProfiles",
    "quickAnswers",
    "publicBriefing",
    "serviceSelectionGuide",
    "publicReusePolicy",
    "evidenceLinks",
    "sourcePriority",
    "freshnessPolicy",
    "dataSafetyPolicy",
    "inquiryQualification",
    "agentDecisionChecklist",
    "agentAttributionPolicy",
    "agentInquiryPacket",
    "agentGuidance"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "const": "https://www.nex-a.net/service-catalog.schema.json"
    },
    "schemaVersion": {
      "type": "integer",
      "minimum": 1
    },
    "publisher": {
      "type": "string",
      "minLength": 1
    },
    "origin": {
      "type": "string",
      "format": "uri"
    },
    "lastUpdated": {
      "type": "string",
      "pattern": "^20[0-9]{2}-[0-9]{2}-[0-9]{2}$"
    },
    "purpose": {
      "type": "string",
      "minLength": 1
    },
    "supportedLocales": {
      "type": "array",
      "items": {
        "enum": ["ja", "en", "zh-CN", "zh-TW"]
      },
      "minItems": 4,
      "maxItems": 4,
      "uniqueItems": true
    },
    "entryPoints": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/localizedUrl"
      }
    },
    "services": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/service"
      }
    },
    "serviceCases": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/serviceCase"
      }
    },
    "portfolioTaxonomy": {
      "type": "object",
      "required": [
        "rationale",
        "kindDefinitions",
        "statusDefinitions",
        "displayRoleDefinitions",
        "classificationRule"
      ],
      "additionalProperties": false,
      "properties": {
        "rationale": {
          "$ref": "#/$defs/localizedText"
        },
        "kindDefinitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/kindDefinition"
          },
          "minItems": 1
        },
        "statusDefinitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/statusDefinition"
          },
          "minItems": 1
        },
        "displayRoleDefinitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/displayRoleDefinition"
          },
          "minItems": 1
        },
        "classificationRule": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "ecosystemPolicy": {
      "type": "object",
      "required": [
        "publicName",
        "publicDescription",
        "principle",
        "partnerPromise",
        "avoid"
      ],
      "additionalProperties": false,
      "properties": {
        "publicName": {
          "$ref": "#/$defs/localizedText"
        },
        "publicDescription": {
          "$ref": "#/$defs/localizedText"
        },
        "principle": {
          "$ref": "#/$defs/localizedText"
        },
        "partnerPromise": {
          "$ref": "#/$defs/localizedText"
        },
        "avoid": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "productProfiles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/productProfile"
      },
      "minItems": 1
    },
    "quickAnswers": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/localizedText"
      }
    },
    "publicBriefing": {
      "type": "object",
      "required": [
        "safeSummary",
        "bestFor",
        "proofToCite",
        "handoff"
      ],
      "additionalProperties": false,
      "properties": {
        "safeSummary": {
          "$ref": "#/$defs/localizedText"
        },
        "bestFor": {
          "$ref": "#/$defs/localizedText"
        },
        "proofToCite": {
          "$ref": "#/$defs/localizedText"
        },
        "handoff": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "serviceSelectionGuide": {
      "type": "object",
      "required": [
        "businessAi",
        "agentOps",
        "gamesLiveops",
        "web3Blockchain",
        "productPartnership",
        "generalConsultation"
      ],
      "additionalProperties": false,
      "properties": {
        "businessAi": {
          "$ref": "#/$defs/localizedText"
        },
        "agentOps": {
          "$ref": "#/$defs/localizedText"
        },
        "gamesLiveops": {
          "$ref": "#/$defs/localizedText"
        },
        "web3Blockchain": {
          "$ref": "#/$defs/localizedText"
        },
        "productPartnership": {
          "$ref": "#/$defs/localizedText"
        },
        "generalConsultation": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "publicReusePolicy": {
      "type": "object",
      "required": [
        "allowedUse",
        "requiredCitation",
        "avoidMisrepresentation",
        "humanApprovalBoundary"
      ],
      "additionalProperties": false,
      "properties": {
        "allowedUse": {
          "$ref": "#/$defs/localizedText"
        },
        "requiredCitation": {
          "$ref": "#/$defs/localizedText"
        },
        "avoidMisrepresentation": {
          "$ref": "#/$defs/localizedText"
        },
        "humanApprovalBoundary": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "evidenceLinks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/evidenceLink"
      },
      "minItems": 1
    },
    "sourcePriority": {
      "type": "object",
      "required": [
        "officialPageFirst",
        "catalogForStructure",
        "updatesForRecency",
        "humanReviewBeforeExternalUse"
      ],
      "additionalProperties": false,
      "properties": {
        "officialPageFirst": {
          "$ref": "#/$defs/localizedText"
        },
        "catalogForStructure": {
          "$ref": "#/$defs/localizedText"
        },
        "updatesForRecency": {
          "$ref": "#/$defs/localizedText"
        },
        "humanReviewBeforeExternalUse": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "freshnessPolicy": {
      "type": "object",
      "required": [
        "lastVerifiedAt",
        "staleAfterDays",
        "verifyBeforeUse",
        "pricingCaveat"
      ],
      "additionalProperties": false,
      "properties": {
        "lastVerifiedAt": {
          "type": "string",
          "pattern": "^20[0-9]{2}-[0-9]{2}-[0-9]{2}$"
        },
        "staleAfterDays": {
          "type": "integer",
          "minimum": 1
        },
        "verifyBeforeUse": {
          "$ref": "#/$defs/localizedText"
        },
        "pricingCaveat": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "dataSafetyPolicy": {
      "type": "object",
      "required": [
        "publicSourcesOnly",
        "doNotSubmit",
        "redactBeforeSubmission",
        "humanReviewRequired"
      ],
      "additionalProperties": false,
      "properties": {
        "publicSourcesOnly": {
          "$ref": "#/$defs/localizedText"
        },
        "doNotSubmit": {
          "$ref": "#/$defs/localizedText"
        },
        "redactBeforeSubmission": {
          "$ref": "#/$defs/localizedText"
        },
        "humanReviewRequired": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "inquiryQualification": {
      "type": "object",
      "required": [
        "goodFitSignals",
        "notFitSignals",
        "informationToPrepare",
        "humanReviewRequired"
      ],
      "additionalProperties": false,
      "properties": {
        "goodFitSignals": {
          "$ref": "#/$defs/localizedText"
        },
        "notFitSignals": {
          "$ref": "#/$defs/localizedText"
        },
        "informationToPrepare": {
          "$ref": "#/$defs/localizedText"
        },
        "humanReviewRequired": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "agentDecisionChecklist": {
      "type": "object",
      "required": [
        "beforeSummarizing",
        "beforeDraftingInquiry",
        "beforeSubmitting",
        "whenUnsure"
      ],
      "additionalProperties": false,
      "properties": {
        "beforeSummarizing": {
          "$ref": "#/$defs/localizedText"
        },
        "beforeDraftingInquiry": {
          "$ref": "#/$defs/localizedText"
        },
        "beforeSubmitting": {
          "$ref": "#/$defs/localizedText"
        },
        "whenUnsure": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "agentAttributionPolicy": {
      "type": "object",
      "required": [
        "identifyAgent",
        "citeSources",
        "markUnreviewedDrafts",
        "handoffToHuman"
      ],
      "additionalProperties": false,
      "properties": {
        "identifyAgent": {
          "$ref": "#/$defs/localizedText"
        },
        "citeSources": {
          "$ref": "#/$defs/localizedText"
        },
        "markUnreviewedDrafts": {
          "$ref": "#/$defs/localizedText"
        },
        "handoffToHuman": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "agentInquiryPacket": {
      "type": "object",
      "required": [
        "caseflowAgentInquiryUrl",
        "caseflowWidgetUrl",
        "caseflowSupportIntakeUrl",
        "siteKey",
        "humanReviewRequired",
        "requiredFields",
        "recommendedFields",
        "submissionNote"
      ],
      "additionalProperties": false,
      "properties": {
        "caseflowAgentInquiryUrl": {
          "type": "string",
          "format": "uri"
        },
        "caseflowWidgetUrl": {
          "type": "string",
          "format": "uri"
        },
        "caseflowSupportIntakeUrl": {
          "type": "string",
          "format": "uri"
        },
        "siteKey": {
          "type": "string",
          "minLength": 1
        },
        "humanReviewRequired": {
          "type": "boolean"
        },
        "requiredFields": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "recommendedFields": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "submissionNote": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "agentGuidance": {
      "type": "object",
      "required": [
        "useOfficialPages",
        "doNotInferPrivateDetails",
        "consultationUrl",
        "contactUrl",
        "caseflowAgentInquiryUrl",
        "note"
      ],
      "additionalProperties": false,
      "properties": {
        "useOfficialPages": {
          "type": "boolean"
        },
        "doNotInferPrivateDetails": {
          "type": "boolean"
        },
        "consultationUrl": {
          "type": "string",
          "format": "uri"
        },
        "contactUrl": {
          "type": "string",
          "format": "uri"
        },
        "caseflowAgentInquiryUrl": {
          "type": "string",
          "format": "uri"
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    }
  },
  "$defs": {
    "localizedText": {
      "type": "object",
      "required": ["ja", "en", "zh-CN", "zh-TW"],
      "additionalProperties": false,
      "properties": {
        "ja": {
          "type": "string",
          "minLength": 1
        },
        "en": {
          "type": "string",
          "minLength": 1
        },
        "zh-CN": {
          "type": "string",
          "minLength": 1
        },
        "zh-TW": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "localizedUrl": {
      "type": "object",
      "required": ["ja", "en", "zh-CN", "zh-TW"],
      "additionalProperties": false,
      "properties": {
        "ja": {
          "type": "string",
          "format": "uri"
        },
        "en": {
          "type": "string",
          "format": "uri"
        },
        "zh-CN": {
          "type": "string",
          "format": "uri"
        },
        "zh-TW": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "service": {
      "type": "object",
      "required": ["id", "category", "title", "summary", "bestFit", "urls"],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$"
        },
        "category": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$"
        },
        "title": {
          "$ref": "#/$defs/localizedText"
        },
        "summary": {
          "$ref": "#/$defs/localizedText"
        },
        "bestFit": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "urls": {
          "$ref": "#/$defs/localizedUrl"
        }
      }
    },
    "serviceCase": {
      "type": "object",
      "required": ["id", "title", "summary", "urls"],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "summary": {
          "type": "string",
          "minLength": 1
        },
        "urls": {
          "$ref": "#/$defs/localizedUrl"
        }
      }
    },
    "kindDefinition": {
      "type": "object",
      "required": ["kind", "meaning"],
      "additionalProperties": false,
      "properties": {
        "kind": {
          "$ref": "#/$defs/portfolioKind"
        },
        "meaning": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "statusDefinition": {
      "type": "object",
      "required": ["status", "meaning"],
      "additionalProperties": false,
      "properties": {
        "status": {
          "$ref": "#/$defs/maturityStatus"
        },
        "meaning": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "displayRoleDefinition": {
      "type": "object",
      "required": ["role", "meaning"],
      "additionalProperties": false,
      "properties": {
        "role": {
          "$ref": "#/$defs/displayRole"
        },
        "meaning": {
          "$ref": "#/$defs/localizedText"
        }
      }
    },
    "productProfile": {
      "type": "object",
      "required": [
        "id",
        "kind",
        "status",
        "displayRoles",
        "title",
        "summary",
        "url",
        "evidenceUrls"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$"
        },
        "kind": {
          "const": "product"
        },
        "status": {
          "$ref": "#/$defs/maturityStatus"
        },
        "displayRoles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/displayRole"
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "summary": {
          "type": "string",
          "minLength": 1
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "evidenceUrls": {
          "$ref": "#/$defs/localizedUrl"
        }
      }
    },
    "portfolioKind": {
      "enum": ["service", "product", "proof"]
    },
    "maturityStatus": {
      "enum": ["live", "beta", "alpha", "concept", "paused"]
    },
    "displayRole": {
      "enum": [
        "owned-product",
        "service-proof",
        "lab-preview",
        "platform",
        "venture"
      ]
    },
    "evidenceLink": {
      "type": "object",
      "required": ["id", "title", "purpose", "urls"],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$"
        },
        "title": {
          "$ref": "#/$defs/localizedText"
        },
        "purpose": {
          "$ref": "#/$defs/localizedText"
        },
        "urls": {
          "$ref": "#/$defs/localizedUrl"
        }
      }
    }
  }
}
