Register D&D scene chunker
This commit is contained in:
@@ -117,7 +117,7 @@ go run ./cmd/notarius pipelines list \
|
||||
The production CLI currently registers these module keys:
|
||||
|
||||
- input: `seriatim`
|
||||
- chunk: `generic`
|
||||
- chunk: `generic`, `dnd/scenes`
|
||||
- extract: `dnd/spells`
|
||||
- merge: `appendorder`
|
||||
- normalize: `noop`
|
||||
|
||||
@@ -167,6 +167,7 @@ one configured profile.
|
||||
| --- | --- | --- |
|
||||
| input | `seriatim` | Reads Seriatim transcript JSON. |
|
||||
| chunk | `generic` | Splits source units into ordered chunks. |
|
||||
| chunk | `dnd/scenes` | Uses an LLM to split transcript source units into D&D scenes. |
|
||||
| extract | `dnd/spells` | Extracts `dnd.spell_cast` artifacts. |
|
||||
| merge | `appendorder` | Keeps candidates in append order. |
|
||||
| normalize | `noop` | Passes merged artifacts through unchanged. |
|
||||
@@ -178,6 +179,9 @@ The `generic` chunker accepts:
|
||||
- `overlap_units`: non-negative integer, default `0`, and must be less than
|
||||
`max_units`.
|
||||
|
||||
The `dnd/scenes` chunker requires transcript source capabilities, calls the
|
||||
configured structured LLM provider, and does not accept module options.
|
||||
|
||||
## Diagnostics
|
||||
|
||||
`diagnostics` fields:
|
||||
|
||||
@@ -59,6 +59,37 @@ Provides:
|
||||
|
||||
- `chunks`
|
||||
|
||||
## `dnd/scenes` Chunker
|
||||
|
||||
Package: `internal/modules/chunk/dnd/scenes`
|
||||
|
||||
The `dnd/scenes` chunker uses the structured LLM client to divide transcript
|
||||
source units into coherent D&D scenes. It renders embedded prompts, loads the
|
||||
embedded structured response schema, validates model-authored source-unit
|
||||
boundaries, and converts each scene into a deterministic source chunk.
|
||||
|
||||
Requires:
|
||||
|
||||
- `source.transcript`
|
||||
|
||||
Provides:
|
||||
|
||||
- `chunks`
|
||||
- `chunks.scenes`
|
||||
|
||||
Options: none. Non-empty options are rejected.
|
||||
|
||||
The chunker enforces full source-unit coverage from the first source unit to the
|
||||
last, exact source-unit IDs, sequential contiguous scenes, and no overlap. It
|
||||
assigns chunk IDs such as `scene-000001` and stores scene metadata including
|
||||
title, primary mode, participants, summary, boundary note, confidence, boundary
|
||||
unit IDs, and unit count. Boundary caveats become warnings with reason code
|
||||
`scene_boundary_caveat`.
|
||||
|
||||
Malformed model output fails explicitly rather than falling back to another
|
||||
chunker. The chunker exposes prompt and response-schema provenance through its
|
||||
metadata provider without raw prompts, raw schemas, source text, or secrets.
|
||||
|
||||
## `dnd/spells` Extractor
|
||||
|
||||
Package: `internal/modules/extract/dnd/spells`
|
||||
|
||||
@@ -177,6 +177,31 @@ Fix:
|
||||
|
||||
Provider error messages are redacted for configured API key values.
|
||||
|
||||
## Scene Chunking Failure
|
||||
|
||||
Symptoms include:
|
||||
|
||||
- `dnd scenes chunker`
|
||||
- `malformed structured output`
|
||||
- `start_unit_id`
|
||||
- `end_unit_id`
|
||||
- `gap`
|
||||
- `overlap`
|
||||
- `final scene`
|
||||
- `complete structured output`
|
||||
|
||||
Fix:
|
||||
|
||||
- Validate the pipeline configuration and confirm the input module provides a
|
||||
transcript source when using `chunk: dnd/scenes`.
|
||||
- Confirm the LLM profile has a working OpenAI-compatible `base_url`, `model`,
|
||||
and credentials.
|
||||
- Inspect retained diagnostics for the run error and resolved pipeline.
|
||||
- If the error names malformed structured output, retry with a model that
|
||||
follows structured response schemas reliably.
|
||||
- Scene boundaries must use exact source-unit IDs, cover the full source
|
||||
document, be contiguous, and not overlap.
|
||||
|
||||
## Output Write Failure
|
||||
|
||||
Symptoms include:
|
||||
|
||||
Reference in New Issue
Block a user