Add D&D item event extractor

This commit is contained in:
2026-07-25 21:49:24 +00:00
parent f320c2fcee
commit f51b22bea7
16 changed files with 966 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
id: dnd.item_events
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
messages:
- role: system
content_file: ./sharedassets/common-dnd-system.md
- role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md
- role: user
content_file: ./sharedassets/common-dnd-identity.md
cache_control:
type: ephemeral
- role: user
content_file: ./sharedassets/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ./task.md
- role: user
content_file: ./instructions.md
cache_control:
type: ephemeral
- role: user
content_file: ./sharedassets/common-dnd-transcript.md
output:
format: json
validation_mode: json_schema
schema_path: dnd_item_events_llm.v1.json
repair_attempts: 0

View File

@@ -0,0 +1,22 @@
Return one event only when the transcript establishes a meaningful item or
currency occurrence. Use a concise observed item name and preserve the stated
currency denomination; include quantity only when the transcript explicitly
states it.
Use `discovered` when the party learns of or encounters an item without
establishing possession. Use `acquired` when the party or a party member gains
possession. Use `lost` when party possession ends through a gift, sale, payment,
theft, abandonment, or destruction not caused by intended use. Use `consumed`
when intended use depletes an item or currency. Use `transferred` only when
possession moves between two distinct named party members.
For `discovered`, omit both holders. For `acquired`, provide only `to`; for
`lost` and `consumed`, provide only `from`; and for `transferred`, provide both
`from` and `to`. Use `party` only for collective or unresolved party possession,
never for either side of a transfer. Do not emit a transfer for a gift, sale, or
payment outside the party.
Ordinary non-depleting use is not an event. Do not infer acquisition from a
discovery, or discovery from an acquisition: emit both only when each is
independently established. Every event needs at least one narrow transcript
range. Return no lore, inventory totals, aliases, or unstated holder details.

View File

@@ -0,0 +1,7 @@
Extract meaningful Dungeons & Dragons item and currency events established by
the transcript. Record only discoveries and changes in party possession, with
the transcript ranges that support each event.
This is an event history, not an inventory or ledger. Do not calculate balances,
resolve item identity across records, or infer ownership that the transcript
does not establish.