Enforce spell catalog validation in the D&D pipeline

This commit is contained in:
2026-07-20 19:30:17 +00:00
parent 4ff2c7795f
commit f08b407b72
8 changed files with 488 additions and 2 deletions

View File

@@ -211,8 +211,12 @@ codec bytes according to its target context. Neither validator calls the LLM.
## D&D Spell Validators
All three validators receive `dnd.SpellList` directly. The shape validator
rejects missing or empty spell fields and empty reference lists. The
All four validators receive `dnd.SpellList` directly. The shape validator
rejects missing or empty spell fields and empty reference lists. The catalog
validator defers when shape is invalid, then checks every non-empty spell name
against the immutable effective SRD and overlay catalog. It accepts normalized
canonical names and aliases without rewriting the artifact; unknown names
reject the complete result with bounded, stable index/name diagnostics. The
source-reference validator applies generic source-reference validation to every
cited range. The relatedness validator warns when a case-insensitive spell name
is absent from all cited source text.