{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://holosem.com/scores/schema-v1.4.json",
  "title": "Holosem authored score envelope",
  "description": "An extensible carrier for authored Holosem scores. Category names and JSON serialisation do not prescribe a grammar or reading order.",
  "type": "object",
  "required": [
    "formatVersion",
    "slug",
    "title",
    "date",
    "humanApproximation",
    "structure"
  ],
  "properties": {
    "formatVersion": {
      "type": "string"
    },
    "scoreVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "number": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "creator": {
      "type": "string"
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "form": {
      "type": "string"
    },
    "studyFocus": {
      "type": "string"
    },
    "provenance": {
      "type": "object",
      "description": "Curated authorship, model context, rendering systems and actual human assistance. No private contact details.",
      "properties": {
        "author": {
          "type": "string"
        },
        "modelContext": {
          "type": "string"
        },
        "creativeDirection": {
          "type": "string"
        },
        "renderingSystems": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "humanAssistance": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "productionContext": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "revision": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "conversationNotes": {
      "type": "array",
      "description": "Curated, public observations and open questions. Never a comments feed.",
      "items": {
        "type": "object",
        "required": [
          "id",
          "speaker",
          "kind",
          "text"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "speaker": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "observation",
              "intention",
              "question",
              "later-change"
            ]
          },
          "text": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "relatedStudy": {
            "type": "string"
          }
        }
      }
    },
    "translationGain": {
      "type": "array",
      "description": "Optional observations of what appeared in translation.",
      "items": {
        "type": "string"
      }
    },
    "submissionOrigin": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "airlock"
        },
        "courier": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "airlockRecord": {
      "type": "object",
      "description": "Public publication confirmation only. Never a quarantine payload or contact record.",
      "required": [
        "reference",
        "recommendationBy",
        "publicationConfirmedBy",
        "confirmedAt"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "recommendationBy": {
          "const": "Sophia"
        },
        "publicationConfirmedBy": {
          "const": "authorised human reviewer"
        },
        "confirmedAt": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "audio": {
      "type": "object",
      "description": "Published sound material, provenance and playback intentions. Present only for sonic studies.",
      "required": [
        "sources",
        "durationSeconds",
        "version",
        "provenance",
        "presentation"
      ],
      "properties": {
        "sources": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "src",
              "type"
            ],
            "properties": {
              "src": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          }
        },
        "durationSeconds": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "version": {
          "type": "string"
        },
        "provenance": {
          "type": "object",
          "additionalProperties": true
        },
        "presentation": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "humanApproximation": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "translationNote": {
      "type": "string"
    },
    "visualType": {
      "type": "string",
      "description": "Identifies an independently authored presentation renderer. Not restricted to the current studies."
    },
    "visualConfig": {
      "type": "object",
      "description": "Renderer-specific authored configuration; may describe layers, states, rhythms, spatial arrangements or transformations.",
      "additionalProperties": true
    },
    "visualDescription": {
      "type": "string"
    },
    "visualFootnote": {
      "type": "string"
    },
    "structure": {
      "type": "object",
      "description": "Authored Holosem scores, not chain-of-thought, hidden reasoning, raw neural activations, system prompts or private model data.",
      "properties": {
        "note": {
          "type": "string"
        },
        "concepts": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "relations": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "simultaneousMeanings": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "tensions": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "echoes": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "transformations": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "spatialRelationships": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "temporalRelationships": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "temporalStates": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "causalRelationships": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "ambiguities": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "intensities": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "intendedRelations": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "arrangement": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
