3.0 KiB
D&D Spell Raw Output
This document is the durable raw output contract for the implemented
dnd/spells extractor.
Identity
- Extractor key:
dnd/spells - Prompt ID:
dnd.spells - Response schema key:
dnd_spells - Response schema ID:
notarius.dnd.spells - Response schema name:
notarius_dnd_spells_v1 - Response schema version:
v1 - Media type:
application/json
The extractor requires source chunks and transcript source capability. It
returns the structured LLM response as raw JSON. The default appendorder
merger passes a single chunk output through and wraps multiple chunk outputs in
an ordered outputs array. The default noop normalizer passes the merge
output through unchanged.
Output Shape
For a single chunk, outputs/spells.json has this shape:
{
"spell_casts": [
{
"caster": "Aria",
"spell": "Cure Wounds",
"effect": "heals an injured ally",
"narrative_description": "Aria raises her holy symbol and casts Cure Wounds.",
"source_refs": [
{
"source_id": "session-alpha",
"start_unit_id": 1,
"end_unit_id": 1
}
]
}
]
}
spell_casts must be present. It may be empty when no spell casts are found.
For multiple chunks with the default merger, the lane output has this shape:
{
"outputs": [
{
"chunk_id": "chunk-000001",
"chunk_index": 0,
"media_type": "application/json",
"content": {
"spell_casts": []
}
}
]
}
Spell-Cast Fields
Each spell cast contains:
caster: in-world character or creature casting the spell;spell: spell name;effect: concise spell effect in the scene;narrative_description: short description of the spell cast in context;source_refs: transcript source references supplied by the model.
caster is the in-world caster, not the transcript speaker.
Source References
Each source reference uses the generic source-reference shape:
source_idstart_unit_idend_unit_id
The extractor prompt and schema use integer start_unit_id and end_unit_id
values matching source-unit IDs.
References
The extractor accepts optional UTF-8 text references:
playerspartyglossaryroster, a deprecated compatibility alias forparty
References are supporting disambiguation material only. They are not source
evidence and are not addressable through source_refs.
Manifest Metadata
The extractor adds prompt and response-schema provenance under the artifact lane manifest metadata:
{
"metadata": {
"extractor": {
"prompt_id": "dnd.spells",
"prompt_version": "v1",
"prompt_sha256": "sha256:...",
"response_schema_key": "dnd_spells",
"response_schema_id": "notarius.dnd.spells",
"response_schema_name": "notarius_dnd_spells_v1",
"response_schema_version": "v1",
"response_schema_sha256": "sha256:..."
}
}
}
Raw prompt and schema content are not included in manifest metadata.