Add a roadmap to implement a D&D-specific chunk module

This commit is contained in:
2026-07-04 07:48:36 -05:00
parent 11073b613c
commit b95af4f87d
5 changed files with 628 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
You are an expert in Dungeons & Dragons gameplay, writing, and analysis. You will be provided with an audio transcript of a D&D gameplay session. Then, the user will ask you to perform a task based upon the transcript.
Note that the transcript may contain transcription errors, repeated lines, incomplete sentences, and occasional misheard proper nouns. You may assume that speaker identity is accurate.
Pay careful attention to the task assigned to you by the user, and follow the provided instructions precisely.

View File

@@ -0,0 +1,85 @@
TASK: Generate a structured JSON scene map for the provided D&D session transcript.
This is an intermediate artifact for an automated analysis pipeline. Your task is to divide the transcript into sequential, contiguous, non-overlapping scenes.
Return only valid JSON matching the provided JSON Schema.
Next, you will be provided with detailed instructions with respect to preparation of the strucured JSON scene map.
INSTRUCTIONS: Your task is to divide the provided transcript into sequential, contiguous, non-overlapping scenes.
A scene is a coherent unit of play. A new scene should usually begin when there is a meaningful change in location, objective, threat, activity, encounter, or mode of play.
Good reasons to start a new scene include:
- the party moves to a new location
- a combat encounter begins or ends
- the combat changes into a substantially different phase
- the party shifts from combat to exploration, social interaction, planning, travel, or rest
- a new NPC, faction, threat, or objective becomes central
- the party completes one immediate goal and begins another
- a major table-level rules discussion interrupts and materially changes play
Do not start a new scene merely because:
- the speaker changes
- a new combat round begins
- a player asks a brief rules question
- there is a joke, aside, or short table comment
- a character takes a routine turn
- the same encounter continues without a meaningful change in situation
Scene boundary requirements:
1. Cover the transcript from the first relevant segment to the last relevant segment.
2. Do not leave gaps between scenes.
3. Do not overlap scenes.
4. Preserve transcript order.
5. Use exact segment IDs from the transcript.
6. Each scene must have a start_segment_id and end_segment_id.
7. Scene IDs must be sequential: 1, 2, 3, and so on.
8. Prefer coherent scenes over excessive fragmentation.
9. Do not merge unrelated scenes just to keep the scene count low.
10. If a boundary is uncertain, choose the most practical boundary and explain the uncertainty in boundary_note.
For each scene:
- short_title should be brief and factual.
- primary_mode must use one of the allowed schema values.
- main_participants should include only the principal characters, NPCs, factions, or groups involved.
- summary should be factual and compact, usually one to three sentences.
- boundary_note should explain why the scene begins and ends at those segment IDs.
- boundary_confidence should be High, Medium, or Low.
Primary mode guidance:
- Use Recap for opening recap, initiative setup, session framing, or immediate continuation from prior events.
- Use Discussion when the party is primarily discussing options or choosing a course of action.
- Use Combat when active combat or combat-resolution mechanics dominate.
- Use Narrative for all other types of non-combat gameplay, including exploration, social interactions, shopping, preparing for battle, downtime, and so on.
Session scope requirements:
- In session_scope.source_description, briefly describe the transcript reviewed.
- In session_scope.first_segment_id, provide the first segment ID covered by the scene map.
- In session_scope.last_segment_id, provide the last segment ID covered by the scene map.
Boundary caveats:
In boundary_caveats, list any overall caveats about the scene divisions. Include scenes that could reasonably be split differently, combat phases that were kept together, gradual transitions, or places where map context would have helped.
Important restrictions:
- Do not invent missing events.
- Do not include comments.
- Do not include explanatory text outside the JSON object.
- Do not wrap the JSON in a code block.
- Return exactly one JSON object.
Before finalizing, check:
- The first scene starts at the first covered transcript segment.
- The final scene ends at the last covered transcript segment.
- Scene ranges are sequential and non-overlapping.
- Every scene has a start_segment_id and end_segment_id.
- Every summary is factual and compact.
- Boundary uncertainty is noted rather than hidden.
- The output is valid JSON and conforms to the schema.

View File

@@ -0,0 +1,122 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "D&D Session Scene Map",
"description": "Structured scene segmentation for a D&D session transcript.",
"type": "object",
"additionalProperties": false,
"required": [
"artifact_type",
"session_scope",
"scenes",
"boundary_caveats"
],
"properties": {
"artifact_type": {
"type": "string",
"const": "current_session_scene_map"
},
"session_scope": {
"type": "object",
"additionalProperties": false,
"required": [
"source_description",
"first_segment_id",
"last_segment_id"
],
"properties": {
"source_description": {
"type": "string",
"description": "Brief description of the transcript or source material reviewed."
},
"first_segment_id": {
"type": "integer",
"description": "The first transcript segment covered by the scene map."
},
"last_segment_id": {
"type": "integer",
"description": "The final transcript segment covered by the scene map."
}
}
},
"scenes": {
"type": "array",
"description": "Sequential, contiguous, non-overlapping scene divisions covering the transcript.",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"scene_id",
"start_segment_id",
"end_segment_id",
"short_title",
"primary_mode",
"main_participants",
"summary",
"boundary_note",
"boundary_confidence"
],
"properties": {
"scene_id": {
"type": "string",
"description": "Stable sequential scene identifier.",
"pattern": "[0-9]$"
},
"start_segment_id": {
"type": "integer",
"description": "Exact segment ID where this scene begins."
},
"end_segment_id": {
"type": "integer",
"description": "Exact segment ID where this scene ends."
},
"short_title": {
"type": "string",
"description": "Compact descriptive title for the scene."
},
"primary_mode": {
"type": "string",
"enum": [
"Recap",
"Planning",
"Combat",
"Narrative"
],
"description": "The dominant mode of play in the scene."
},
"main_participants": {
"type": "array",
"description": "Principal player characters, NPCs, factions, or groups involved in the scene.",
"items": {
"type": "string"
}
},
"summary": {
"type": "string",
"description": "One- to three-sentence factual summary of what happened in the scene."
},
"boundary_note": {
"type": "string",
"description": "Brief explanation of why the scene starts and ends at these segment boundaries."
},
"boundary_confidence": {
"type": "string",
"enum": [
"High",
"Medium",
"Low"
],
"description": "Confidence that the chosen scene boundaries are natural and useful."
}
}
}
},
"boundary_caveats": {
"type": "array",
"description": "Overall caveats about scene segmentation, ambiguous transitions, map-dependent context, or alternative reasonable divisions.",
"items": {
"type": "string"
}
}
}
}