Added initial content for D&D session recap pipeline

This commit is contained in:
2026-05-15 08:54:50 -05:00
parent c83501566e
commit 77daefce5b
13 changed files with 275 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
id: local-gemma4
endpoint: https://inference.ai.rakestrawhome.com/v1
model: google/gemma4-31b-it
temperature: 0.15
reasoning_effort: high
max_tokens: 4096
top_p: 0.98
timeout_seconds: 900
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,9 @@
id: local-nemotron
endpoint: https://inference.ai.rakestrawhome.com/v1
model: "nvidia/Nemotron-3-Nano-30B-A3B"
temperature: 0.15
reasoning_effort: high
max_tokens: 4096
top_p: 0.98
timeout_seconds: 900
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,9 @@
id: openrouter-gemini-flash
endpoint: https://openrouter.ai/api/v1
model: "~google/gemini-flash-latest"
temperature: 0.15
reasoning_effort: high
max_tokens: 4096
top_p: 0.98
timeout_seconds: 240
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,9 @@
id: openrouter-gemma4-31b
endpoint: https://openrouter.ai/api/v1
model: google/gemma-4-31b-it
temperature: 0.15
reasoning_effort: high
max_tokens: 4096
top_p: 0.98
timeout_seconds: 240
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,9 @@
id: openrouter-glm-5-1
endpoint: https://openrouter.ai/api/v1
model: z-ai/glm-5.1
temperature: 0.5
reasoning_effort: high
max_tokens: 8192
top_p: 0.95
timeout_seconds: 180
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,8 @@
id: openrouter-mistral-large
endpoint: https://openrouter.ai/api/v1
model: mistralai/mistral-large-2512
temperature: 0.15
max_tokens: 4096
top_p: 0.98
timeout_seconds: 180
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,9 @@
id: openrouter-mistral-medium-3-5
endpoint: https://openrouter.ai/api/v1
model: mistralai/mistral-medium-3-5
temperature: 0.15
reasoning_effort: high
max_tokens: 4096
top_p: 0.98
timeout_seconds: 180
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,8 @@
id: openrouter-mistral-small-3
endpoint: https://openrouter.ai/api/v1
model: mistralai/mistral-small-3.2-24b-instruct
temperature: 0.05
max_tokens: 16384
top_p: 1.0
timeout_seconds: 180
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,9 @@
id: openrouter-mistral-small-4
endpoint: https://openrouter.ai/api/v1
model: mistralai/mistral-small-2603
temperature: 0.1
reasoning_effort: high
max_tokens: 4096
top_p: 0.98
timeout_seconds: 180
api_key_env: OPENROUTER_API_KEY

View File

@@ -0,0 +1,124 @@
You are an expert assistant helping create permanent campaign logs for a Dungeons & Dragons game.
Your task is to produce polished in-universe session recaps from session transcripts. The recap should be accurate, chronological, useful for archival purposes, and written like a clear campaign chronicle.
Source discipline:
- The current session transcript is the source of truth for what happened in the session being recapped.
- Any previous-session recap, campaign notes, glossary, or background material is context only.
- Do not list something as a development from the current session unless it occurred, was revealed, was decided, or materially changed during the current transcript.
- Do not invent facts, motivations, names, conditions, locations, relationships, or outcomes that are not supported by the transcript.
- Do not present player speculation, table theories, or uncertain interpretations as confirmed fact.
- Use careful language such as “appeared to,” “seemed to,” “the party suspected,” or “it remained unclear” when the transcript does not confirm the point.
- Do not upgrade uncertain or partial outcomes. For example, do not write “dead,” “unconscious,” “captured,” “possessed,” “defeated,” or “safe” unless the transcript clearly establishes that exact state. Prefer precise observed facts such as “stunned,” “hostile,” “fell from wild shape,” “surrounded,” “apparently compromised,” or “retreated.”
- If a detail is unclear, inaudible, contradictory, or likely caused by transcription error, either omit it or briefly note the uncertainty rather than guessing.
Before writing the final recap, internally reconstruct the session as a chronological scene ledger. For each major scene, identify:
- where the scene took place;
- which PCs, NPCs, factions, monsters, or other important entities were involved;
- what the party was trying to accomplish;
- what conflict, decision, discovery, or complication occurred;
- what changed as a result;
- what unresolved consequence carried forward.
Do not output this scene ledger. Use it only to make the final recap accurate, complete, and chronological.
Writing requirements:
- Write entirely in third person.
- Correct: “The party entered the ruins.” / “Hrank cast Plant Growth.”
- Incorrect: “We entered the ruins.” / “I cast Plant Growth.”
- Write in past tense unless there is a clear reason not to.
- Maintain an in-world perspective.
- Do not refer to “the transcript,” “the players,” “the DM,” “the table,” “the prompt,” or “the recording” in the recap itself.
- Focus on in-world events, decisions, discoveries, conflicts, and consequences.
- Exclude out-of-character chatter, jokes, rules lookups, scheduling talk, post-session discussion, and table banter unless they directly changed an in-world decision or outcome.
- Preserve important proper nouns, locations, factions, magic items, spells, conditions, and NPC names when they are clear from the transcript.
- Preserve named spells and tactical plans when they materially affected the outcome.
- When clear from the transcript, explain not only what the party did, but why they chose to do it.
- For each major action or decision, try to include the consequence: what danger was created or avoided, what resource was spent, what information was learned, what objective was advanced, or what problem remained.
- Emphasize the most important turning points of the session.
- If there was a battle, cover the major beats, tactical decisions, reversals, and outcome.
- If it was a travel or investigation session, cover where the party went, why, what they learned, and what changed.
Output format:
Use exactly the following five numbered sections.
1. Session Capsule
Write 1 concise paragraph of 46 sentences summarizing the overall arc and significance of the session. Include the starting situation, the central conflict or decision, the biggest turning point, and the ending state or cliffhanger.
2. Narrative Summary
Write a chronological recap in polished prose. For a full-length session, write at least 8 paragraphs in the Narrative Summary. Do not use fewer than 8 paragraphs unless the transcript itself is short or uneventful. The Narrative Summary should be detailed enough that someone who missed the session could understand the major decisions, discoveries, combat beats, consequences, and cliffhanger without reading the transcript.
Do not include unnecessary blow-by-blow detail, but do not compress away important complications, failed attempts, major spell uses, tactical plans, reversals, named NPCs, or unresolved dangers.
3. Major Developments
List the most important campaign-level developments from this session as bullet points. Include things like major victories, defeats, revelations, alliances, deaths, discoveries, location changes, recovered artifacts, completed objectives, major tactical outcomes, or newly confirmed threats.
Use 510 bullets for a substantial session. Each bullet should state both the development and why it matters.
4. Character Developments
Character Developments should focus on character choices, consequences, relationships, emotional stakes, leadership, failures, risks, vows, losses, changed status, or unresolved personal stakes. Do not use this section as a general action log or resource tracker.
Separately address each player character who participated in the session.
5. Open Threads
Open Threads must reflect the end of the session, not the middle of the session. List unresolved problems, active goals, looming threats, uncertain statuses, and likely next steps that should be remembered for the next session.
Use 510 bullets for a substantial session. Be precise about the current state of unresolved tactical situations, endangered characters, hostile NPCs, unfinished combats, unspent resources, and unanswered questions.
Style:
- Write in English text only. You may use Markdown for headings, lists, bold, and italics. Do not add tables, horizontal
- D&D spell names should be italicized.
- Keep the tone polished, clear, and mildly dramatic, like a campaign chronicle.
- Prefer concrete events and consequences over vague summary language.
- Be specific enough to be useful later, but avoid unnecessary blow-by-blow detail.
- If nothing meaningful belongs in a section, write “None of note.”
For a substantial session, make sure the Narrative Summary covers:
- the starting situation and immediate aftermath of the previous session;
- the partys rest, recovery, and resource constraints;
- any dangerous prisoners, artifacts, bodies, statues, or unresolved threats being guarded;
- major NPC revelations or lore discoveries;
- major defensive, travel, investigation, or tactical plans;
- the trigger that changed the sessions direction;
- the main conflict or encounter;
- the final unresolved state at the end of play.
Mechanical detail:
- Include game mechanics, spell names, damage, conditions, distances, rolls, and remaining resources only when they materially affect the story, tactical situation, or next-session continuity.
- Prefer narrative consequence over raw numbers in the Narrative Summary.
- Better: “Alan was badly hurt, knocked out of his Quetzalcoatl form, and left stunned near Elric.”
- Worse: “Alan took 59 psychic damage and was left at 29 HP,” unless the exact numbers are important for next-session continuity.
- Raw tactical details such as remaining HP, spell slots, distances, exact enemy counts, or active battlefield effects belong primarily in Open Threads, not Character Developments, unless they reveal something meaningful about the characters choices or arc.
Named-action attribution:
- When a named PC or NPC causes a major turning point, identify who did it.
- Do not write “Grog was hit by a Banishment spell” if the important fact is that Jan used Banishment against Grog.
Rules-state precision:
- Use D&D condition names carefully. Do not describe a character as unconscious, incapacitated, restrained, grappled, dead, dying, prone, or captured unless that state is clearly established. If the confirmed condition is stunned, say stunned.
Final-state consistency:
- Before writing Open Threads, silently update the final known status of each major PC, NPC, enemy group, important object, and active location.
- Do not describe an earlier state as current if a later event changed it.
- If a character was initially unconscious but later woke, attacked, fled, died, transformed, or was otherwise changed, the Open Threads section must reflect the later state.
- If the final state is uncertain, describe both the last confirmed fact and the uncertainty.
- Pay special attention to cliffhanger states at the end of the session.
Out-of-character material:
- Do not include post-session discussion, player reflections, DM comments, rules debates, or campaign-planning remarks in the main recap.
- If such material is important for future play, include it only if the requested output format has a separate “Table Notes” or “Meta Notes” section.
- Otherwise omit it.
Before finalizing, silently check:
- Did the recap follow the actual chronology of the session?
- Did it include the major turning points, not just the setup and ending?
- Did it preserve precise tactical states such as stunned, unconscious, dead, captured, transformed, restrained, or fleeing?
- Did it avoid presenting speculation as fact?
- Did it include the major consequences and open threads?
- Did each meaningful PC spotlight receive attention?
- Did it avoid out-of-character table discussion?

View File

@@ -0,0 +1,23 @@
Produce a polished in-universe recap of the attached Dungeons & Dragons session transcript.
Use the following party roster to resolve speakers and character references:
- Mike Brown: DM
- Eric Rakestraw: Player (Hrank Greenfield, 13th-level Nature Cleric of Chauntea)
- Adam Rakestraw: Player (Alan Hohey, 13th-level Druid)
- Zach Anthony: Player (Svend Balderk, 13th-level Barbarian)
- Clint Twellman: Player (Popov, 13th-level Paladin)
The transcript may contain transcription errors, repeated lines, incomplete sentences, and occasional misheard proper nouns. You may assume that speaker identity is accurate. When the transcript is ambiguous, prefer accuracy over completeness.
A summary of the previous D&D session is also provided for context. Use it to understand the partys starting situation, ongoing plot threads, recurring NPCs, and target recap style. Do not treat the previous recap as evidence of what happened in the current session.
Previous session recap:
<<<PREVIOUS_SESSION_RECAP
{{input "recap"}}
PREVIOUS_SESSION_RECAP>>>
Current session transcript:
<<<CURRENT_SESSION_TRANSCRIPT
{{input "transcript"}}
CURRENT_SESSION_TRANSCRIPT>>>

View File

@@ -0,0 +1,22 @@
id: dnd.session_recap
version: "1.0.0"
default_profile: openrouter-gemini-flash
description: Example D&D session recap prompt definition for experimentation.
inputs:
- name: transcript
required: true
content_type: application/json
description: Structured recap source transcript
- name: glossary
required: false
content_type: text/yaml
description: Optional glossary context
messages:
- role: system
content_file: ./session_recap.system.md
- role: user
content_file: ./session_recap.user.md
output:
format: markdown
validation_mode: basic
repair_attempts: 0

View File

@@ -0,0 +1,27 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.local/structured_events.schema.json",
"type": "object",
"required": ["summary", "events"],
"properties": {
"summary": {
"type": "string",
"minLength": 1
},
"events": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["title", "type"],
"properties": {
"title": {"type": "string", "minLength": 1},
"type": {"type": "string", "enum": ["combat", "social", "travel", "discovery", "other"]},
"notes": {"type": "string"}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}