Document D&D item event support
This commit is contained in:
@@ -22,7 +22,7 @@ The explicit-path option is defined in the [CLI reference](cli.md).
|
||||
- [Minimal D&D configuration](../examples/dnd-minimal.config.yml) shows the
|
||||
shortest useful single-step, single-lane pipeline.
|
||||
- [Complete D&D configuration](../examples/dnd-complete.config.yml) shows scene
|
||||
chunking, ordered steps, all five D&D artifact lanes, generated NPC and
|
||||
chunking, ordered steps, all six D&D artifact lanes, generated NPC and
|
||||
scene-description handoffs, campaign and spell-catalog references, checkpoint
|
||||
storage, and chunk-map output.
|
||||
|
||||
@@ -382,6 +382,7 @@ production validators do not call the LLM and must not set `llm_profile`.
|
||||
| extract | `dnd/spells` | Extracts typed D&D spell-list artifacts. |
|
||||
| extract | `dnd/npcs` | Extracts typed D&D NPC-list artifacts. |
|
||||
| extract | `dnd/combat-turns` | Extracts typed D&D combat-turn-list artifacts only for exact combat scene matches. |
|
||||
| extract | `dnd/item-events` | Extracts typed, source-grounded D&D item-event-list artifacts. |
|
||||
| extract | `dnd/npc-interactions` | Extracts typed D&D NPC-interaction-list artifacts from a supplied NPC registry. |
|
||||
| extract | `dnd/scene-descriptions` | Extracts one typed D&D scene description for each accepted chunk. |
|
||||
| merge | `appendorder` | Combines typed artifacts in chunk order. |
|
||||
@@ -389,6 +390,7 @@ production validators do not call the LLM and must not set `llm_profile`.
|
||||
| normalize | `dnd/spells` | Deterministically canonicalizes and de-duplicates typed D&D spell-list artifacts. |
|
||||
| normalize | `dnd/npcs` | Deterministically consolidates typed D&D NPC-list artifacts by canonical name and unions exact evidence. |
|
||||
| normalize | `dnd/combat-turns` | Deterministically canonicalizes, orders, and de-duplicates typed D&D combat-turn artifacts. |
|
||||
| normalize | `dnd/item-events` | Deterministically trims, source-orders, and removes only exact D&D item-event duplicates. |
|
||||
| normalize | `dnd/npc-interactions` | Canonicalizes registry NPC names, orders interaction occurrences, and removes only exact duplicates. |
|
||||
| normalize | `dnd/scene-descriptions` | Validates, orders, trims, and de-duplicates typed D&D scene-description artifacts. |
|
||||
| output | `json` | Produces JSON output files for normalized `application/json` lanes and can opt in to an accepted chunk map. |
|
||||
@@ -413,6 +415,10 @@ production validators do not call the LLM and must not set `llm_profile`.
|
||||
| `extract/dnd/combat-turns/source_refs` | deterministic | Rejects missing or invalid D&D combat-turn source references. |
|
||||
| `extract/dnd/combat-turns/source_relatedness` | deterministic | Emits warnings when an actor is not found near cited source text. |
|
||||
| `normalize/dnd/combat-turns/invariants` | deterministic | Rejects normalized combat-turn identity, evidence-order, and chronology violations. |
|
||||
| `extract/dnd/item-events/shape` | deterministic | Rejects malformed D&D item-event-list artifacts and invalid category, holder, or quantity combinations. |
|
||||
| `extract/dnd/item-events/source_refs` | deterministic | Rejects missing, invalid, or extract-chunk-external D&D item-event source references. |
|
||||
| `extract/dnd/item-events/source_relatedness` | deterministic | Emits bounded warnings when an item-event name is not found in cited source text. |
|
||||
| `normalize/dnd/item-events/invariants` | deterministic | Rejects non-normalized D&D item-event order, source references, or exact duplicates. |
|
||||
| `extract/dnd/npc-interactions/shape` | deterministic | Rejects malformed D&D NPC-interaction-list artifacts. |
|
||||
| `extract/dnd/npc-interactions/registry` | deterministic | Rejects interaction names absent from the supplied NPC registry. |
|
||||
| `extract/dnd/npc-interactions/source_refs` | deterministic | Rejects missing, invalid, or extract-chunk-external D&D interaction source references. |
|
||||
@@ -476,6 +482,26 @@ normalize:
|
||||
- extract/dnd/combat-turns/source_relatedness
|
||||
```
|
||||
|
||||
The production default chains for `dnd/item-events` are:
|
||||
|
||||
```yaml
|
||||
extract:
|
||||
validators:
|
||||
- generic/valid_json
|
||||
- extract/dnd/item-events/shape
|
||||
- extract/dnd/item-events/source_refs
|
||||
- generic/valid_json_schema
|
||||
- extract/dnd/item-events/source_relatedness
|
||||
normalize:
|
||||
validators:
|
||||
- generic/valid_json
|
||||
- extract/dnd/item-events/shape
|
||||
- normalize/dnd/item-events/invariants
|
||||
- extract/dnd/item-events/source_refs
|
||||
- generic/valid_json_schema
|
||||
- extract/dnd/item-events/source_relatedness
|
||||
```
|
||||
|
||||
The production default chains for `dnd/npc-interactions` are:
|
||||
|
||||
```yaml
|
||||
@@ -574,6 +600,13 @@ accepts no references. The
|
||||
normalized output to later spell, combat-turn, and NPC-interaction targets
|
||||
through an explicit ordered step.
|
||||
|
||||
The `dnd/item-events` extractor accepts optional `glossary`, `party`, `players`,
|
||||
and deprecated `roster` campaign slots for disambiguation only. It requires no
|
||||
generated artifact and its normalizer accepts no references, so the complete
|
||||
example keeps this independent lane in the first step. Current transcript
|
||||
references remain the only item-event evidence. Its complete durable behavior
|
||||
is defined in the [D&D item-event artifact contract](integrations/dnd-item-event-artifacts.md).
|
||||
|
||||
The `dnd/scene-descriptions` extractor accepts only the optional `players`,
|
||||
`party`, and `glossary` campaign slots. They can disambiguate terms in the
|
||||
model-facing title and summary but are never source evidence. Its normalizer
|
||||
|
||||
131
docs/integrations/dnd-item-event-artifacts.md
Normal file
131
docs/integrations/dnd-item-event-artifacts.md
Normal file
@@ -0,0 +1,131 @@
|
||||
# D&D Item-Event Artifact Contract
|
||||
|
||||
This document defines the durable D&D item-event artifact and its production
|
||||
boundaries. It records source-grounded discoveries and possession changes; it
|
||||
does not maintain an inventory or ledger.
|
||||
|
||||
## Artifact Identity
|
||||
|
||||
| Property | Value |
|
||||
| --- | --- |
|
||||
| Extractor key | `dnd/item-events` |
|
||||
| Extract capability | `dnd.item_events` |
|
||||
| Artifact kind | `dnd/item-event-list` |
|
||||
| Schema ID | `notarius.dnd.item_events` |
|
||||
| Schema name | `notarius_dnd_item_events_v1` |
|
||||
| Schema version | `v1` |
|
||||
| Media type | `application/json` |
|
||||
| Normalizer key | `dnd/item-events` |
|
||||
|
||||
The payload is one strict JSON object containing a required `events` array,
|
||||
which may be empty. Objects reject unknown fields.
|
||||
|
||||
## Event Shape And Categories
|
||||
|
||||
Every event has `name`, `kind`, and a non-empty `source_refs` array. `quantity`
|
||||
is optional and, when present, is a positive integer. `from` and `to` are
|
||||
optional display values whose presence depends on `kind`.
|
||||
|
||||
| Field | Rule |
|
||||
| --- | --- |
|
||||
| `name` | Non-empty, transcript-supported display value. |
|
||||
| `kind` | One of the categories below. |
|
||||
| `quantity` | Optional positive integer; omitted when the source does not establish a count. |
|
||||
| `from` | Holder that loses possession when the category permits it. |
|
||||
| `to` | Holder that gains possession when the category permits it. |
|
||||
| `source_refs` | One or more current-source references. |
|
||||
|
||||
| Kind | Meaning and holder rule |
|
||||
| --- | --- |
|
||||
| `discovered` | The party learns of or encounters an item without established possession; neither holder is present. |
|
||||
| `acquired` | A party member or `party` gains possession; `to` is required and `from` is absent. |
|
||||
| `lost` | A party member or `party` ceases to possess an item without consuming it; `from` is required and `to` is absent. |
|
||||
| `consumed` | Use depletes, expends, or destroys an item; `from` is required and `to` is absent. |
|
||||
| `transferred` | Possession moves between distinct party members; both holders are required and neither may be `party`. |
|
||||
|
||||
`party` is the reserved display holder for collective party possession when an
|
||||
individual holder is not established. Its comparison is case- and
|
||||
Unicode-insensitive. Transfers require distinct normalized holder values.
|
||||
Giving an item to an NPC, spending currency, selling an item, or another move
|
||||
outside party possession is `lost`, not `transferred`. Ordinary non-depleting
|
||||
use is not an event.
|
||||
|
||||
Currency is represented as an ordinary event name plus an explicit quantity
|
||||
when the transcript supplies one. Each denomination remains separate. The
|
||||
artifact never converts denominations, infers a missing count, calculates a
|
||||
balance, or sums nearby events.
|
||||
|
||||
## Source Evidence And Normalization
|
||||
|
||||
Each source reference contains `source_id`, `start_unit_id`, and `end_unit_id`.
|
||||
It must identify an ordered range in the current source document. During
|
||||
extraction, every cited range must also be wholly contained in the current
|
||||
accepted chunk. Campaign references may disambiguate names, but never provide
|
||||
event evidence.
|
||||
|
||||
The deterministic normalizer trims only display-edge whitespace in names and
|
||||
holders, canonicalizes source-reference order and exact duplicate references,
|
||||
then orders events by earliest valid source position and stable tie-breakers
|
||||
over name, kind, holders, quantity, and complete evidence. It removes only
|
||||
events with the same normalized fields and complete valid evidence sequence.
|
||||
Invalid evidence is never collapsed. It does not rename, singularize, resolve
|
||||
aliases, infer holders or quantities, or merge nearby events.
|
||||
|
||||
The default extraction validation chain is JSON syntax, item-event shape,
|
||||
source references, durable JSON Schema, then advisory source relatedness. The
|
||||
normalization chain adds normalized invariants after shape validation and before
|
||||
source references and schema validation. Relatedness warnings are advisory so
|
||||
contextual names and currency notation do not reject otherwise valid evidence.
|
||||
|
||||
## Representative JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"events": [
|
||||
{
|
||||
"name": "Hidden Cache",
|
||||
"kind": "discovered",
|
||||
"source_refs": [{"source_id": "session-7", "start_unit_id": 1, "end_unit_id": 1}]
|
||||
},
|
||||
{
|
||||
"name": "Silver Pieces",
|
||||
"kind": "acquired",
|
||||
"quantity": 20,
|
||||
"to": "party",
|
||||
"source_refs": [{"source_id": "session-7", "start_unit_id": 2, "end_unit_id": 2}]
|
||||
},
|
||||
{
|
||||
"name": "Torch",
|
||||
"kind": "lost",
|
||||
"from": "party",
|
||||
"source_refs": [{"source_id": "session-7", "start_unit_id": 3, "end_unit_id": 3}]
|
||||
},
|
||||
{
|
||||
"name": "Healing Potion",
|
||||
"kind": "consumed",
|
||||
"from": "Aria",
|
||||
"source_refs": [{"source_id": "session-7", "start_unit_id": 4, "end_unit_id": 4}]
|
||||
},
|
||||
{
|
||||
"name": "Moonblade",
|
||||
"kind": "transferred",
|
||||
"from": "Aria",
|
||||
"to": "Borin",
|
||||
"source_refs": [{"source_id": "session-7", "start_unit_id": 5, "end_unit_id": 5}]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Production Boundary
|
||||
|
||||
The extractor requires `chunks` and `source.transcript`, and accepts optional
|
||||
`glossary`, `party`, `players`, and deprecated `roster` campaign references for
|
||||
disambiguation only. It has no generated NPC, scene-description, or item-registry
|
||||
dependency. The append-order merger preserves chunk order, and the normalizer
|
||||
has no reference slots.
|
||||
|
||||
The normalized lane is emitted as `lanes/<lane-id>.json` by the JSON output
|
||||
module. See [Configuration](../config.md#implemented-production-modules) for
|
||||
the selectable keys and default chains, and the
|
||||
[JSON output contract](json-output.md) for bundle paths.
|
||||
@@ -39,7 +39,7 @@ without exposing Scriptorium types through stage contracts.
|
||||
7. injecting that one shared client into complete pipeline preparation before
|
||||
the source file is read or the runner is invoked.
|
||||
|
||||
The D&D scene chunker and spell, NPC, combat-turn, NPC-interaction, and
|
||||
The D&D scene chunker and spell, NPC, combat-turn, item-event, NPC-interaction, and
|
||||
scene-description extractors retain this
|
||||
injected client and use it for every structured completion. Operation requests
|
||||
do not carry an LLM client.
|
||||
@@ -99,7 +99,7 @@ D&D prompt content. `internal/framework/promptfs` provides the domain-neutral
|
||||
filesystem composition helper used to combine module-owned files with shared
|
||||
domain prompt fragments.
|
||||
|
||||
The D&D scene chunker and spell, NPC, combat-turn, NPC-interaction, and
|
||||
The D&D scene chunker and spell, NPC, combat-turn, item-event, NPC-interaction, and
|
||||
scene-description extractors each declare an
|
||||
ordered prompt asset manifest. The manifest lists the package-owned YAML and
|
||||
Markdown files, then the exact shared fragments rendered by that prompt; the
|
||||
@@ -134,12 +134,13 @@ prompt places its final boundary on its lane-specific instructions, immediately
|
||||
before the transcript. The transcript does not carry cache control because no
|
||||
reusable content follows it.
|
||||
|
||||
Accordingly, the common prefix of the spell, NPC, combat, and interaction
|
||||
Accordingly, the common prefix of the spell, NPC, combat, item-event, and interaction
|
||||
extraction prompts is system,
|
||||
extraction evidence, identity, and campaign references. The NPC prompt then
|
||||
renders task, instructions, and transcript. Spell renders the NPC registry,
|
||||
catalog, task, instructions, and transcript. Combat renders the NPC registry,
|
||||
task, instructions, and transcript. NPC interaction renders the names-only NPC
|
||||
task, instructions, and transcript. Item-event renders task, instructions, and
|
||||
transcript without a generated-artifact input. NPC interaction renders the names-only NPC
|
||||
registry, task, instructions, and transcript. The
|
||||
scene chunker is not an extraction lane: it retains its separate system,
|
||||
transcript, campaign-reference, task, and instruction order and marks its
|
||||
@@ -166,7 +167,7 @@ return defensive copies, and expose a diagnostics map that omits schema bytes.
|
||||
The small framework registry contains only generic test schemas; production
|
||||
schemas remain package-owned.
|
||||
|
||||
The spell, NPC, combat, NPC-interaction, and scene-description extractors'
|
||||
The spell, NPC, combat, item-event, NPC-interaction, and scene-description extractors'
|
||||
package-owned prompts declare their
|
||||
structured JSON inputs and private response schemas. Each private response
|
||||
schema remains separate from its durable artifact codec schema; this work does
|
||||
|
||||
@@ -17,16 +17,16 @@ validator registry. Package-family registrars compose those leaf registrations
|
||||
into the production catalog and own family-level policy such as default
|
||||
validator chains and prompt asset collection.
|
||||
|
||||
Production input, chunk, output, and D&D spell-, NPC-, combat-, interaction-, and scene-description-extract packages
|
||||
Production input, chunk, output, and D&D spell-, NPC-, combat-, item-event-, interaction-, and scene-description-extract packages
|
||||
register strict option decoders and run-local builders. Preparation decodes their options into
|
||||
implementation-owned values and injects dependencies plus the materialized
|
||||
reference set for the selected target. Each builder receives an isolated clone
|
||||
of that set; input and output builders receive no references. The spell, NPC,
|
||||
combat, interaction, and scene-description extractors are typed over the canonical D&D model. D&D validators, merge,
|
||||
combat, item-event, interaction, and scene-description extractors are typed over the canonical D&D model. D&D validators, merge,
|
||||
and normalize use typed variants; JSON representation validators use serialized
|
||||
requests; and unconditional validators expose separate chunk and typed
|
||||
variants. The D&D production registrar registers the canonical typed spell,
|
||||
NPC, combat, interaction, and scene-description implementations, including their kind-specific merge and
|
||||
NPC, combat, item-event, interaction, and scene-description implementations, including their kind-specific merge and
|
||||
normalize behavior.
|
||||
|
||||
For D&D artifact defaults, generic JSON syntax validation runs first. Rejecting
|
||||
@@ -56,7 +56,7 @@ declarations, prompt-input assembly, and source-unit/citation helpers belong in
|
||||
`internal/modules/dnd/shared`, which owns operation-scoped indexed
|
||||
source-reference validation, citation traversal, ordering and canonicalization,
|
||||
plus bounded D&D diagnostics. The
|
||||
D&D scene chunker and spell, NPC, combat-turn, NPC-interaction, and scene-description extractors use ordered
|
||||
D&D scene chunker and spell, NPC, combat-turn, item-event, NPC-interaction, and scene-description extractors use ordered
|
||||
package-local prompt manifests for both rendering and prompt fingerprinting, so
|
||||
only the shared fragments each prompt actually renders participate in either
|
||||
operation. Extraction prompts place stable shared and lane-specific context
|
||||
@@ -67,7 +67,7 @@ contracts expose only Notarius structured-completion types, not Scriptorium
|
||||
public types.
|
||||
|
||||
The shared `PrepareChunkExtraction` helper owns common extraction preflight and
|
||||
transcript material preparation for the spell, NPC, combat-turn,
|
||||
transcript material preparation for the spell, NPC, combat-turn, item-event,
|
||||
NPC-interaction, and scene-description extractors. It validates common request
|
||||
state, clones supplied source metadata, falls back to the materialized chunk
|
||||
when content is absent, checks that content remains chunk-identical, and fills
|
||||
@@ -150,6 +150,11 @@ The `internal/modules/dnd/codec/combatturns` package owns the durable
|
||||
is registered by the production D&D family registrar for the selectable combat
|
||||
lane.
|
||||
|
||||
The `internal/modules/dnd/codec/itemevents` package owns the durable
|
||||
`dnd/item-event-list` schema and candidate versus approved JSON boundary. It is
|
||||
registered by the production D&D family registrar. Its external contract is
|
||||
defined in the [D&D item-event artifact contract](../integrations/dnd-item-event-artifacts.md).
|
||||
|
||||
The `internal/modules/dnd/codec/npcinteractions` package owns the durable
|
||||
`dnd/npc-interaction-list` schema and candidate versus approved JSON boundary.
|
||||
It is registered by the production D&D family registrar for the selectable
|
||||
@@ -348,6 +353,23 @@ The combat normalizer accepts only the optional structured NPC registry.
|
||||
Campaign references remain extractor-only LLM context and are not materialized
|
||||
for deterministic normalization.
|
||||
|
||||
### `internal/modules/dnd/extract/itemevents`
|
||||
|
||||
The item-event extractor prepares one structured request from the accepted
|
||||
chunk and optional campaign references, then maps private records to
|
||||
`dnd.ItemEventList` with the current source identity. It declares only optional
|
||||
`glossary`, `party`, `players`, and deprecated `roster` reference slots; these
|
||||
can disambiguate names but never supply evidence. It has no NPC,
|
||||
scene-description, or item-registry dependency.
|
||||
|
||||
The private response schema owns structural transport validation. The extractor
|
||||
preserves candidate category, holder, quantity, and source-range values for the
|
||||
deterministic validators, removes exact duplicate ranges, and source-orders
|
||||
events. The source-reference validator requires citations to fit the current
|
||||
accepted chunk. Prompt, response-schema, and mapping identities participate in
|
||||
checkpoint identity. The durable schema is owned separately by
|
||||
`internal/modules/dnd/codec/itemevents`.
|
||||
|
||||
### `internal/modules/dnd/extract/npcinteractions`
|
||||
|
||||
The NPC interaction extractor requires the structured `npcs` registry slot. It
|
||||
@@ -384,7 +406,7 @@ normalization warnings.
|
||||
### `internal/modules/generic/merge/appendorder`
|
||||
|
||||
The merger passes typed values to an injected combine function in framework
|
||||
source-chunk order. The D&D registrar specializes it for all five artifact
|
||||
source-chunk order. The D&D registrar specializes it for all six artifact
|
||||
lists; each append merger preserves collection presence and order while giving
|
||||
the result independently owned nested source-reference slices.
|
||||
|
||||
@@ -432,6 +454,16 @@ digest/count metadata; generated identity is retained in framework provenance
|
||||
and dependency fingerprints. The normalizer is included in the production D&D
|
||||
registrar with the default combat normalization chain.
|
||||
|
||||
### `internal/modules/dnd/normalize/itemevents`
|
||||
|
||||
The item-event normalizer accepts no options or references and makes no LLM
|
||||
calls. It trims display-edge whitespace in names and holders, canonicalizes
|
||||
source references, source-orders events, and collapses only exact duplicates
|
||||
with complete valid evidence. It does not create a ledger, calculate balances,
|
||||
resolve aliases, infer quantities or holders, or reconcile nearby events. Its
|
||||
policy fingerprint and bounded warnings identify deterministic normalization;
|
||||
the matching invariant validator checks the resulting order and duplicate rule.
|
||||
|
||||
### `internal/modules/dnd/normalize/npcinteractions`
|
||||
|
||||
The interaction normalizer requires the same immutable NPC registry. It
|
||||
@@ -541,6 +573,21 @@ expose local policy fingerprints. In the registered defaults, JSON syntax runs
|
||||
first; combat shape, normalized invariants when applicable, and source-reference
|
||||
validation precede JSON Schema validation; warning-only relatedness runs last.
|
||||
|
||||
## D&D Item-Event Validators
|
||||
|
||||
Item-event shape validation owns the required list, non-empty name, supported
|
||||
category, category-and-holder combination, positive optional quantity, and
|
||||
non-empty source-reference collection. Source-reference validation defers
|
||||
malformed shapes, checks current-source identity and ordered ranges, and during
|
||||
extraction requires every citation to fit the accepted chunk. Relatedness is
|
||||
advisory and warning-only: it checks the event name against cited transcript
|
||||
text while deferring malformed candidates and invalid ranges to their blocking
|
||||
owners. The normalized-invariants validator owns display normalization,
|
||||
canonical source-reference order, chronology, and exact duplicate identity.
|
||||
All four validators are deterministic and expose policy fingerprints. The
|
||||
registered chains run syntax and blocking checks before durable JSON Schema;
|
||||
relatedness remains last.
|
||||
|
||||
## D&D NPC Interaction Validators
|
||||
|
||||
Interaction shape validation owns the required list, registry name, supported
|
||||
@@ -573,7 +620,7 @@ complete framework registry set and one LLM asset registry. It invokes
|
||||
`internal/modules/seriatim/register`, and `internal/modules/dnd/register` in
|
||||
that order, then exposes the matching catalog for resolution. The generic and
|
||||
Seriatim registrars own their production leaf registrations. The D&D registrar
|
||||
owns D&D leaf registrations, typed spell, NPC, combat, interaction, and scene-description default-validator
|
||||
owns D&D leaf registrations, typed spell, NPC, combat, item-event, interaction, and scene-description default-validator
|
||||
chains, typed append-order specializations, and D&D prompt/schema asset
|
||||
collection. Its registration helpers group module, validator, prompt-asset, and
|
||||
chain composition while retaining artifact-specific merge and clone behavior in
|
||||
|
||||
@@ -69,9 +69,9 @@ constructs input, chunk, validators, ordered lanes, and output before source
|
||||
parsing. Production modules use strict construction-time option decoding, and
|
||||
LLM-backed modules retain the injected shared client. The D&D family registers
|
||||
the canonical `dnd/spell-list`, `dnd/npc-list`, `dnd/combat-turn-list`,
|
||||
`dnd/npc-interaction-list`, and `dnd/scene-description-list` codecs, typed
|
||||
spell, NPC, combat, interaction, and scene-description extractors and
|
||||
normalizers, validators,
|
||||
`dnd/item-event-list`, `dnd/npc-interaction-list`, and
|
||||
`dnd/scene-description-list` codecs, typed spell, NPC, combat, item-event,
|
||||
interaction, and scene-description extractors and normalizers, validators,
|
||||
plus kind-specific generic merge strategies; generic JSON validators use the
|
||||
serialized-validation contract. The runner executes lanes through
|
||||
private exact-type-checked closures, coordinates extract results independently
|
||||
@@ -90,22 +90,26 @@ Configuration. The implemented module packages are:
|
||||
| `internal/modules/seriatim/input/transcript` | Parses the supported Seriatim transcript format into the generic source model. |
|
||||
| `internal/modules/generic/chunk/units` | Splits ordered source units by unit count and overlap. |
|
||||
| `internal/modules/dnd/chunk/scenes` | Produces contiguous D&D scene chunks from structured model output. |
|
||||
| `internal/modules/dnd` | Owns the canonical D&D spell-list, spell-cast, NPC-list, NPC, combat-turn-list, combat-turn, NPC-interaction-list, and scene-description-list artifact types. |
|
||||
| `internal/modules/dnd` | Owns the canonical D&D spell-list, spell-cast, NPC-list, NPC, combat-turn-list, combat-turn, item-event-list, item-event, NPC-interaction-list, and scene-description-list artifact types. |
|
||||
| `internal/modules/dnd/codec/spells` | Strictly decodes and stably encodes the durable D&D spell-list representation. |
|
||||
| `internal/modules/dnd/codec/npcs` | Strictly decodes and stably encodes the durable D&D NPC-list representation. |
|
||||
| `internal/modules/dnd/codec/combatturns` | Strictly decodes and stably encodes the durable D&D combat-turn-list representation. |
|
||||
| `internal/modules/dnd/codec/itemevents` | Strictly decodes and stably encodes the durable D&D item-event-list representation. |
|
||||
| `internal/modules/dnd/codec/npcinteractions` | Strictly decodes and stably encodes the durable D&D NPC-interaction-list representation. |
|
||||
| `internal/modules/dnd/codec/scenedescriptions` | Strictly decodes and stably encodes the durable D&D scene-description-list representation. |
|
||||
| `internal/modules/dnd/extract/spells` | Maps private structured model output to canonical source-grounded D&D spell lists. |
|
||||
| `internal/modules/dnd/extract/npcs` | Maps private structured model output to canonical source-grounded D&D NPC lists. |
|
||||
| `internal/modules/dnd/extract/combatturns` | Uses exact scene eligibility to select combat chunks, then maps private structured model output to source-grounded D&D combat-turn candidates. |
|
||||
| `internal/modules/dnd/extract/itemevents` | Maps private structured model output to source-grounded D&D item-event candidates. |
|
||||
| `internal/modules/dnd/extract/npcinteractions` | Maps private structured model output to current-source NPC interaction candidates grounded by a required registry. |
|
||||
| `internal/modules/dnd/extract/scenedescriptions` | Maps one private scene description to the current accepted chunk's ID and exact range. |
|
||||
| `internal/modules/dnd/npcinteractions` | Owns interaction occurrence ordering, valid-evidence checks, and exact interaction identity shared by normalization and invariant validation. |
|
||||
| `internal/modules/dnd/normalize/combatturns` | Canonicalizes and orders merged combat turns, applies exact NPC identity matches, and collapses only exact valid-evidence duplicates. |
|
||||
| `internal/modules/dnd/normalize/itemevents` | Trims, source-orders, and removes only exact valid-evidence item-event duplicates. |
|
||||
| `internal/modules/dnd/normalize/npcinteractions` | Canonicalizes required-registry names, orders interaction occurrences, and collapses only exact valid-evidence duplicates. |
|
||||
| `internal/modules/dnd/normalize/scenedescriptions` | Trims, source-orders, and removes only exactly identical scene descriptions while rejecting ID and range conflicts. |
|
||||
| `internal/modules/dnd/validate/combatturns` | Provides deterministic shape, source-reference, source-relatedness, and normalized-invariant validation for the production combat chains. |
|
||||
| `internal/modules/dnd/validate/itemevents` | Provides deterministic shape, source-reference, source-relatedness, and normalized-invariant validation for item-event chains. |
|
||||
| `internal/modules/dnd/validate/npcinteractions` | Provides deterministic shape, registry, source-reference, source-relatedness, and normalized-invariant validation for interaction chains. |
|
||||
| `internal/modules/dnd/validate/scenedescriptions` | Provides deterministic shape, exact extraction attachment, source-relatedness, and normalized-invariant validation for scene-description chains. |
|
||||
| `internal/modules/dnd/npcs/registry` | Resolves validated normalized NPC references into immutable grounding data and exact identity lookup. |
|
||||
|
||||
@@ -50,11 +50,13 @@ needed. This is data deletion, not cache cleanup.
|
||||
|
||||
The maintained [complete D&D configuration](../examples/dnd-complete.config.yml)
|
||||
contains one pipeline with two ordered steps. The first step extracts and
|
||||
normalizes NPCs and scene descriptions. Only after those lanes reach accepted
|
||||
terminal results does the second step begin; its generated NPC reference is
|
||||
normalizes independent item events, NPCs, and scene descriptions. Only after
|
||||
the NPC and scene-description lanes reach accepted terminal results does the
|
||||
second step begin; its generated NPC reference is
|
||||
supplied in memory to spell, combat-turn, and NPC-interaction extraction and
|
||||
the applicable normalizers, while its generated scene-description reference is
|
||||
supplied to combat-turn extraction.
|
||||
supplied to combat-turn extraction. The item-event lane has no generated
|
||||
reference dependency and retains only current-transcript evidence.
|
||||
|
||||
```sh
|
||||
go run ./cmd/notarius run dnd-session \
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
## Status
|
||||
|
||||
Ready for implementation. This document defines the desired artifact and
|
||||
pipeline contract; the concrete work is specified in
|
||||
[the implementation plan](implementation.md).
|
||||
Implemented. This document retains the original intent record; current
|
||||
behavior is defined by the
|
||||
[D&D item-event artifact contract](../integrations/dnd-item-event-artifacts.md)
|
||||
and [Configuration](../config.md#implemented-production-modules).
|
||||
|
||||
## Purpose
|
||||
|
||||
|
||||
@@ -7,14 +7,6 @@ not as committed release dates.
|
||||
|
||||
## Near-Term D&D Pipeline
|
||||
|
||||
### Add D&D Item Events
|
||||
|
||||
- Implement the selected
|
||||
[D&D item-event contract](dnd-item-events.md) as the next near-term feature.
|
||||
Track source-grounded discoveries, acquisitions, losses, consumption,
|
||||
intra-party transfers, and explicit currency quantities without inferring an
|
||||
inventory ledger or introducing a preliminary item registry.
|
||||
|
||||
### Evaluate Spell Extraction And Normalization
|
||||
|
||||
- Evaluate ordinary extraction retries and the completed normalization path
|
||||
|
||||
Reference in New Issue
Block a user