Complete D&D NPC interaction integration
This commit is contained in:
@@ -24,6 +24,7 @@ The explicit-path option is defined in the [CLI reference](cli.md).
|
||||
- [D&D NPC configuration](../examples/dnd-npcs.config.yml)
|
||||
- [D&D combat-turn configuration](../examples/dnd-combat-turns.config.yml)
|
||||
- [D&D NPC-grounded spell and combat configuration](../examples/dnd-npc-grounded.config.yml)
|
||||
- [D&D NPC interaction configuration](../examples/dnd-npc-interactions.config.yml)
|
||||
|
||||
All are complete version 3 files. The fragments below illustrate individual
|
||||
fields and are not alternate complete configurations.
|
||||
@@ -355,11 +356,13 @@ 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. |
|
||||
| extract | `dnd/npc-interactions` | Extracts typed D&D NPC-interaction-list artifacts from a supplied NPC registry. |
|
||||
| merge | `appendorder` | Combines typed artifacts in chunk order. |
|
||||
| normalize | `noop` | Passes merged typed artifacts through unchanged. |
|
||||
| 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/npc-interactions` | Canonicalizes registry NPC names, orders interaction occurrences, and removes only exact duplicates. |
|
||||
| output | `json` | Produces JSON output files for normalized `application/json` lanes. |
|
||||
|
||||
## Implemented Production Validators
|
||||
@@ -382,6 +385,11 @@ 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/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 or invalid D&D interaction source references. |
|
||||
| `extract/dnd/npc-interactions/source_relatedness` | deterministic | Emits warnings when an interaction name is not found near cited source text. |
|
||||
| `normalize/dnd/npc-interactions/invariants` | deterministic | Rejects normalized interaction identity, evidence-order, and chronology violations. |
|
||||
|
||||
The production default chain for `dnd/spells` is used for both its extract and
|
||||
normalize stages:
|
||||
@@ -436,6 +444,28 @@ normalize:
|
||||
- extract/dnd/combat-turns/source_relatedness
|
||||
```
|
||||
|
||||
The production default chains for `dnd/npc-interactions` are:
|
||||
|
||||
```yaml
|
||||
extract:
|
||||
validators:
|
||||
- generic/valid_json
|
||||
- extract/dnd/npc-interactions/shape
|
||||
- extract/dnd/npc-interactions/registry
|
||||
- extract/dnd/npc-interactions/source_refs
|
||||
- generic/valid_json_schema
|
||||
- extract/dnd/npc-interactions/source_relatedness
|
||||
normalize:
|
||||
validators:
|
||||
- generic/valid_json
|
||||
- extract/dnd/npc-interactions/shape
|
||||
- extract/dnd/npc-interactions/registry
|
||||
- extract/dnd/npc-interactions/source_refs
|
||||
- generic/valid_json_schema
|
||||
- normalize/dnd/npc-interactions/invariants
|
||||
- extract/dnd/npc-interactions/source_relatedness
|
||||
```
|
||||
|
||||
Empty chains approve output by default.
|
||||
|
||||
The `generic` chunker accepts:
|
||||
@@ -516,6 +546,16 @@ identity; names, content, and paths are not recorded there. When
|
||||
absent, the combat prompt receives the exact empty registry value
|
||||
`{"npcs":[]}` with its projection digest and no registry provenance.
|
||||
|
||||
Both `dnd/npc-interactions` stages require the structured `npcs` slot. Bind one
|
||||
accepted normalized NPC artifact from an earlier ordered step; the interaction
|
||||
extractor receives only its names-only projection, while the normalizer uses
|
||||
the immutable registry for exact canonical-name lookup. A missing, rejected,
|
||||
or incompatible producer prevents the interaction step from running. Registry
|
||||
source references remain identity provenance and never supply interaction
|
||||
evidence: every interaction must cite current transcript units. The complete
|
||||
durable contract and two-step configuration are defined in the
|
||||
[D&D NPC interaction artifact contract](integrations/dnd-npc-interaction-artifacts.md).
|
||||
|
||||
## State Surfaces
|
||||
|
||||
The `output`, `cache`, and `debug` top-level fields select independent physical
|
||||
|
||||
Reference in New Issue
Block a user