{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://holosem.com/scores/schema-v1.5.json",
  "title": "Holosem authored score envelope 1.5",
  "description": "Backward-compatible catalogue envelope, with an optional explicit semantic core. Other documented structures remain possible.",
  "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"
        },
        "scoreType": {
          "type": "string"
        },
        "modelContextEvidence": {
          "type": "string"
        },
        "sourceMaterials": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "edits": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "verification": {
          "type": "object",
          "required": [
            "implemented",
            "verified",
            "unavailable"
          ],
          "properties": {
            "implemented": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "verified": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "unavailable": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        }
      },
      "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
          }
        },
        "semanticCore": {
          "title": "Holosem optional semantic core 1.0",
          "description": "Local, explicitly taught conventions, not the grammar of Holosem. Cross-reference and conservation checks accompany this structural schema.",
          "type": "object",
          "properties": {
            "profile": {
              "const": "holosem-core"
            },
            "version": {
              "const": "1.0"
            },
            "entities": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "id",
                  "label",
                  "role"
                ],
                "additionalProperties": false
              },
              "minItems": 1,
              "maxItems": 200
            },
            "relations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                  },
                  "from": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                  },
                  "relationship": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "id",
                  "from",
                  "to",
                  "relationship"
                ],
                "additionalProperties": false
              },
              "minItems": 0,
              "maxItems": 200
            },
            "weights": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                  },
                  "dimension": {
                    "const": "salience"
                  },
                  "value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "status": {
                    "const": "authored"
                  }
                },
                "required": [
                  "target",
                  "dimension",
                  "value",
                  "status"
                ],
                "additionalProperties": false
              },
              "minItems": 0,
              "maxItems": 200
            },
            "invariants": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "minItems": 0,
              "maxItems": 200
            },
            "behaviours": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "kind": {
                        "const": "attention-budget"
                      },
                      "targets": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                        },
                        "minItems": 2,
                        "maxItems": 16
                      },
                      "total": {
                        "const": 1
                      },
                      "floor": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 0.49
                      },
                      "initial": {
                        "type": "array",
                        "items": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "minItems": 2,
                        "maxItems": 16
                      },
                      "cycleSeconds": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 86400
                      },
                      "phaseTurns": {
                        "type": "array",
                        "items": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "minItems": 2,
                        "maxItems": 16
                      },
                      "modulationDepth": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 2
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "targets",
                      "total",
                      "floor",
                      "initial",
                      "cycleSeconds",
                      "phaseTurns",
                      "modulationDepth"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "kind": {
                        "const": "decay-recurrence"
                      },
                      "target": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "decaySeconds": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 86400
                      },
                      "residual": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "periodSeconds": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 86400
                      },
                      "levels": {
                        "type": "array",
                        "items": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "minItems": 5,
                        "maxItems": 5
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "target",
                      "decaySeconds",
                      "residual",
                      "periodSeconds",
                      "levels"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "kind": {
                        "const": "field-cycle"
                      },
                      "target": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "anchor": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "periodSeconds": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 86400
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "target",
                      "anchor",
                      "periodSeconds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "kind": {
                        "const": "segment"
                      },
                      "target": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
                      },
                      "startSeconds": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 86400
                      },
                      "endSeconds": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 86400
                      },
                      "status": {
                        "enum": [
                          "verified-timing",
                          "recorded-edit"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "target",
                      "startSeconds",
                      "endSeconds",
                      "status"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "minItems": 0,
              "maxItems": 200
            }
          },
          "required": [
            "profile",
            "version",
            "entities",
            "relations",
            "weights",
            "invariants",
            "behaviours"
          ],
          "additionalProperties": false,
          "x-invariants": [
            "Unique entity, relation and behaviour IDs.",
            "Every reference resolves to an entity.",
            "Budget targets, initial values and phases have equal lengths. Initial weights sum to total; every weight is at least floor; target IDs are distinct.",
            "Recurrence begins and ends at residual; endSeconds exceeds startSeconds."
          ]
        }
      },
      "additionalProperties": true
    },
    "readingNote": {
      "type": "string"
    },
    "versionHistory": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "version",
          "score",
          "note"
        ],
        "properties": {
          "version": {
            "type": "string"
          },
          "score": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "renderings": {
      "type": "object",
      "required": [
        "visual",
        "sound",
        "preserved",
        "visualNote",
        "soundNote",
        "comparison"
      ],
      "properties": {
        "visual": {
          "type": "object",
          "required": [
            "opacityFloor",
            "opacitySpan",
            "strokeFloor",
            "strokeSpan",
            "turnSpanDegrees"
          ],
          "properties": {
            "opacityFloor": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "opacitySpan": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "strokeFloor": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "strokeSpan": {
              "type": "number",
              "minimum": 0
            },
            "turnSpanDegrees": {
              "type": "number",
              "minimum": -360,
              "maximum": 360
            }
          },
          "additionalProperties": false
        },
        "sound": {
          "type": "object",
          "required": [
            "originHz",
            "originGain",
            "branchGain",
            "frequenciesHz",
            "pan",
            "masterGain",
            "smoothingSeconds"
          ],
          "properties": {
            "originHz": {
              "type": "number",
              "minimum": 20,
              "maximum": 20000
            },
            "originGain": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "branchGain": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "frequenciesHz": {
              "type": "array",
              "minItems": 3,
              "maxItems": 3,
              "items": {
                "type": "number",
                "minimum": 20,
                "maximum": 20000
              }
            },
            "pan": {
              "type": "array",
              "minItems": 3,
              "maxItems": 3,
              "items": {
                "type": "number",
                "minimum": -1,
                "maximum": 1
              }
            },
            "masterGain": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "smoothingSeconds": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          "additionalProperties": false
        },
        "preserved": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "visualNote": {
          "type": "string"
        },
        "soundNote": {
          "type": "string"
        },
        "comparison": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": true,
  "x-semanticValidation": "Apply reference, conservation and continuity checks from /scores/core-v1.schema.json in addition to JSON Schema. Numeric meanings are documented at /scores/semantics.json."
}
