Add standalone D&D combat turn extraction

This commit is contained in:
2026-07-21 05:08:02 +00:00
parent 6dd695611c
commit 2fbb3813aa
22 changed files with 1924 additions and 4 deletions

View File

@@ -0,0 +1,41 @@
id: dnd.combat_turns
version: "v1"
default_profile: gemini-2-flash
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
- name: npcs
required: false
content_type: application/json
messages:
- role: system
content_file: ./sharedassets/common-dnd-system.md
- role: user
content_file: ./sharedassets/common-dnd-transcript.md
cache_control:
type: ephemeral
- role: user
content_file: ./sharedassets/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ./sharedassets/common-dnd-npcs.md
- role: user
content_file: ./task.md
- role: user
content_file: ./instructions.md
output:
format: json
validation_mode: json_schema
schema_path: dnd_combat_turns_llm.v1.json
repair_attempts: 0

View File

@@ -0,0 +1,12 @@
Return exactly one JSON object and no explanatory text.
Return the combat_turns array even when no combat turn is established. Return
one or more actions for every turn. Use one of the supported turn_kind and
action category values. Set round to null when the transcript does not state
an explicit or unambiguous positive round number. Set resolution to null when
the transcript establishes the declaration but not an immediate resolution.
Every source reference must contain start_unit_id and end_unit_id from the
provided transcript. Do not add source_id; the extraction mapper assigns the
current source identity. Do not include fields not defined by the response
schema.

View File

@@ -0,0 +1,30 @@
Extract Dungeons & Dragons combat-turn artifacts from the supplied transcript.
Include a record only when the transcript establishes that an in-world
participant takes a combat turn or performs a discrete interrupting combat
event. Reactions, legendary actions, lair actions, and other out-of-turn events
belong at the point where they occur in transcript chronology.
Report only the declaration and its immediate observed resolution. Immediate
resolution may include directly associated rolls, damage, healing, movement,
conditions, target outcomes, or an interruption. Do not follow consequences
that occur on later turns or elsewhere in the scene.
Exclude initiative setup without a turn or combat event, tactical planning,
table talk, rules lookup, hypothetical actions, abandoned declarations, recap
of combat outside the current passage, and downstream consequences.
Use only the supplied transcript as evidence. Do not infer a round, target,
roll, amount, condition, outcome, or action classification from D&D rules
knowledge. Preserve the session as played; attribute relevant nonstandard
rulings to the GM or table.
The actor must be the in-world character or creature, not a player, transcript
speaker, or GM. Use player, party, glossary, and NPC reference material only
to disambiguate identities. Reference material is context, never combat
evidence. Unmatched actors and targets remain permitted.
For every factual detail in a turn, cite all supporting transcript units in the
turn-level source_refs collection. Use narrow ranges when evidence is
non-contiguous. Numeric source-unit IDs identify transcript units; they do not
establish chronology outside the supplied transcript.