{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://proofscaling.org/schema/0.2/domain-thesis.schema.json",
  "title": "Domain Thesis",
  "description": "A fund manager's specialization of the base types for a domain, the way a publisher extends a schema.org type. A Domain Thesis may add proofs and narrow reporting. It may never alter a base type.",
  "$comment": "Stub for Proofscaling 0.2. A Pinned Thesis is this document at a specific version, identified by content hash. The dimension enum is defined once, in proof-record, and referenced here so the list cannot drift.",
  "type": "object",
  "properties": {
    "thesisId": { "type": "string" },
    "name": { "type": "string" },
    "author": { "type": "string" },
    "standardVersion": { "const": "0.2" },
    "thesisScope": {
      "description": "The scope of the thesis. Direct is one operating thesis. Diversified is a portfolio of theses.",
      "enum": ["direct", "diversified"]
    },
    "extends": {
      "description": "The base Proof Dimensions this thesis reports and specializes.",
      "type": "array",
      "items": {
        "$ref": "proof-record.schema.json#/properties/dimension"
      },
      "minItems": 1
    },
    "addedProofs": {
      "description": "Proofs this thesis adds within a base type. Permitted by the extension rule.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "dimension": {
            "$ref": "proof-record.schema.json#/properties/dimension"
          },
          "key": { "type": "string" },
          "description": { "type": "string" }
        },
        "required": ["dimension", "key"],
        "additionalProperties": false
      }
    },
    "narrowings": {
      "description": "Reporting this thesis narrows within a base type. Permitted by the extension rule. A narrowing may tighten, never loosen.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "dimension": {
            "$ref": "proof-record.schema.json#/properties/dimension"
          },
          "constraint": { "type": "string" }
        },
        "required": ["dimension", "constraint"],
        "additionalProperties": false
      }
    },
    "pinned": {
      "description": "The content hash that pins this thesis. Adopted by consent.",
      "type": "string",
      "pattern": "^sha256:[0-9a-fA-F]{64}$"
    }
  },
  "required": ["thesisId", "name", "standardVersion", "thesisScope", "extends", "pinned"],
  "additionalProperties": false
}
