Ghostlight/schemas/projection-example.schema.json
2026-05-01 22:32:51 +01:00

348 lines
7.8 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/GameCult/Ghostlight/schemas/projection-example.schema.json",
"title": "Ghostlight Projection Example Schema",
"description": "Reviewed training artifact for compiling structured agent state into speaker-local prompt projection.",
"type": "object",
"required": [
"schema_version",
"example_id",
"input",
"output",
"audit"
],
"additionalProperties": false,
"properties": {
"schema_version": {
"const": "ghostlight.projection_example.v0"
},
"example_id": {
"type": "string"
},
"input": {
"$ref": "#/$defs/input_ref"
},
"output": {
"$ref": "#/$defs/projection_output"
},
"audit": {
"$ref": "#/$defs/audit"
}
},
"$defs": {
"input_ref": {
"type": "object",
"required": [
"fixture_ref",
"scene_id",
"speaker_agent_id",
"listener_ids",
"projection_mode"
],
"additionalProperties": false,
"properties": {
"fixture_ref": {
"type": "string"
},
"scene_id": {
"type": "string"
},
"speaker_agent_id": {
"type": "string"
},
"listener_ids": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"projection_mode": {
"enum": [
"dialogue_turn",
"response_turn",
"action_turn",
"scene_beat",
"drama_scaffold"
]
}
}
},
"sourced_text": {
"type": "object",
"required": [
"text",
"source_refs"
],
"additionalProperties": false,
"properties": {
"text": {
"type": "string",
"minLength": 1
},
"source_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
}
},
"active_pressure": {
"type": "object",
"required": [
"pressure_id",
"summary",
"intensity",
"source_refs"
],
"additionalProperties": false,
"properties": {
"pressure_id": {
"type": "string"
},
"summary": {
"type": "string",
"minLength": 1
},
"intensity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"source_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
}
},
"tension": {
"type": "object",
"required": [
"tension_id",
"summary",
"source_refs"
],
"additionalProperties": false,
"properties": {
"tension_id": {
"type": "string"
},
"summary": {
"type": "string",
"minLength": 1
},
"source_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
}
},
"response_affordance": {
"type": "object",
"required": [
"affordance_id",
"behavior",
"pressure_basis",
"source_refs"
],
"additionalProperties": false,
"properties": {
"affordance_id": {
"type": "string"
},
"behavior": {
"type": "string",
"minLength": 1
},
"response_kind": {
"enum": [
"speech",
"action",
"silence",
"withdrawal",
"violence",
"mixed"
]
},
"pressure_basis": {
"type": "string",
"minLength": 1
},
"source_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
}
},
"projection_output": {
"type": "object",
"required": [
"known_facts",
"active_pressures",
"tensions",
"response_affordances",
"voice_surface",
"prompt_text"
],
"additionalProperties": false,
"properties": {
"known_facts": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"active_pressures": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/active_pressure"
}
},
"tensions": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/tension"
}
},
"response_affordances": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/response_affordance"
}
},
"voice_surface": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"projection_controls": {
"$ref": "#/$defs/projection_controls"
},
"prompt_text": {
"type": "string",
"minLength": 1
}
}
},
"projection_controls": {
"type": "object",
"description": "Compiled control surfaces the renderer should preserve before prompt prose exists.",
"additionalProperties": false,
"properties": {
"frame_controls": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"authority_boundaries": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"object_custody": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"required_semantics": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"forbidden_resolutions": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
}
}
},
"audit": {
"type": "object",
"required": [
"teacher_model",
"reviewer",
"review_status",
"review_notes",
"target_emergent_behaviors",
"checks"
],
"additionalProperties": false,
"properties": {
"teacher_model": {
"type": "string"
},
"reviewer": {
"type": "string"
},
"review_status": {
"enum": [
"accepted",
"rejected",
"needs_revision"
]
},
"review_notes": {
"type": "array",
"items": {
"type": "string"
}
},
"target_emergent_behaviors": {
"type": "array",
"items": {
"type": "string"
}
},
"checks": {
"type": "object",
"required": [
"speaker_local_context_only",
"state_interactions_cited",
"voice_separate_from_defense",
"secrets_as_pressure_not_forbidden_context",
"compact_runtime_surface"
],
"additionalProperties": false,
"properties": {
"speaker_local_context_only": {
"type": "boolean"
},
"state_interactions_cited": {
"type": "boolean"
},
"voice_separate_from_defense": {
"type": "boolean"
},
"secrets_as_pressure_not_forbidden_context": {
"type": "boolean"
},
"compact_runtime_surface": {
"type": "boolean"
}
}
}
}
}
}
}