Ghostlight/schemas/projected-local-context.schema.json
2026-05-02 11:08:43 +01:00

343 lines
7.8 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/GameCult/Ghostlight/schemas/projected-local-context.schema.json",
"title": "Ghostlight Projected Local Context Schema",
"description": "Character-local operating context compiled from canonical state before response-model prompting.",
"type": "object",
"required": [
"schema_version",
"projection_id",
"input",
"context",
"audit"
],
"additionalProperties": false,
"properties": {
"schema_version": {
"const": "ghostlight.projected_local_context.v0"
},
"projection_id": {
"type": "string"
},
"input": {
"type": "object",
"required": [
"fixture_ref",
"annotation_ref",
"scene_id",
"local_agent_id",
"listener_ids",
"projection_mode"
],
"additionalProperties": false,
"properties": {
"fixture_ref": {
"type": "string"
},
"annotation_ref": {
"type": "string"
},
"scene_id": {
"type": "string"
},
"local_agent_id": {
"type": "string"
},
"listener_ids": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"projection_mode": {
"type": "string"
}
}
},
"context": {
"type": "object",
"required": [
"local_agent_id",
"identity",
"setting",
"known_facts",
"current_stakes",
"embodiment_and_interface",
"active_inner_pressures",
"relationship_read",
"tensions",
"runtime_retrieval_requirements",
"latent_pressure_requirements",
"retrieved_lore_prompt_blocks",
"latent_pressure_prompt_blocks",
"action_affordances",
"projection_controls",
"voice_surface",
"likely_response_moves",
"do_not_invent",
"prompt_text"
],
"additionalProperties": false,
"properties": {
"local_agent_id": {
"type": "string"
},
"identity": {
"type": "string",
"minLength": 1
},
"setting": {
"type": "string",
"minLength": 1
},
"known_facts": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"current_stakes": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"embodiment_and_interface": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"active_inner_pressures": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"relationship_read": {
"type": "array",
"items": {
"$ref": "#/$defs/text_block"
}
},
"tensions": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"runtime_retrieval_requirements": {
"type": "array",
"items": {
"$ref": "#/$defs/retrieval_requirement"
}
},
"latent_pressure_requirements": {
"type": "array",
"items": {
"$ref": "#/$defs/latent_pressure_requirement"
}
},
"retrieved_lore_prompt_blocks": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"latent_pressure_prompt_blocks": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"action_affordances": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"projection_controls": {
"type": "object"
},
"voice_surface": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"likely_response_moves": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"do_not_invent": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/text_block"
}
},
"observed_event": {
"type": "object"
},
"prompt_text": {
"type": "string",
"minLength": 1
}
}
},
"audit": {
"type": "object",
"required": [
"projector",
"raw_state_hidden_from_prompt",
"character_local_context_only",
"omitted_private_context",
"review_status"
],
"additionalProperties": false,
"properties": {
"projector": {
"type": "string"
},
"raw_state_hidden_from_prompt": {
"type": "boolean",
"const": true
},
"character_local_context_only": {
"type": "boolean",
"const": true
},
"omitted_private_context": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"review_status": {
"enum": [
"draft",
"accepted",
"needs_revision",
"rejected"
]
}
}
}
},
"$defs": {
"text_block": {
"type": "object",
"required": [
"text",
"source_refs"
],
"additionalProperties": false,
"properties": {
"text": {
"type": "string",
"minLength": 1
},
"source_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
}
}
},
"retrieval_requirement": {
"type": "object",
"required": [
"requirement_id",
"trigger",
"compact_fact",
"source_refs",
"prompt_role"
],
"additionalProperties": false,
"properties": {
"requirement_id": {
"type": "string",
"minLength": 1
},
"trigger": {
"type": "string",
"minLength": 1
},
"compact_fact": {
"type": "string",
"minLength": 1
},
"source_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"prompt_role": {
"enum": [
"source_excerpt",
"setting_constraint",
"action_affordance",
"do_not_invent"
]
}
}
},
"latent_pressure_requirement": {
"type": "object",
"required": [
"pressure_id",
"text",
"source_refs",
"projection_rule",
"review_rule"
],
"additionalProperties": false,
"properties": {
"pressure_id": {
"type": "string",
"minLength": 1
},
"text": {
"type": "string",
"minLength": 1
},
"source_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"projection_rule": {
"type": "string",
"minLength": 1
},
"review_rule": {
"type": "string",
"minLength": 1
}
}
}
}
}