From aeaaf44ae09c9dff0906863cc1263184cc304ceb Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Sat, 25 Jul 2026 13:06:40 +0000 Subject: [PATCH] Remove unused NPC registry and identity aliases --- docs/internal/modules.md | 15 ++++++++++----- internal/modules/dnd/npcs/identity/identity.go | 3 --- internal/modules/dnd/npcs/registry/registry.go | 3 --- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/internal/modules.md b/docs/internal/modules.md index 39d99a0..9da6adb 100644 --- a/docs/internal/modules.md +++ b/docs/internal/modules.md @@ -53,8 +53,9 @@ LLM-backed extensions own their prompt definitions and response schemas under package-local embedded assets. Shared filesystem composition belongs in `internal/framework/promptfs`; reusable D&D prompt fragments, reference declarations, prompt-input assembly, and source-unit/citation helpers belong in -`internal/modules/dnd/shared`, which also owns document-aware source-reference -ordering and canonicalization plus bounded D&D diagnostics. The +`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 package-local prompt manifests for both rendering and prompt fingerprinting, so only the shared fragments each prompt actually renders participate in either @@ -117,7 +118,10 @@ preparation; generated artifacts cross it at the ordered step handoff. It owns the `npcs` slot and its bounded, content-safe validation failures. NPC source references are durable provenance and are not treated as evidence for a consuming pipeline. The NPC codec owns the strict durable `dnd/npc-list` JSON -boundary and exposes candidate versus approved encode/decode operations. +boundary and exposes candidate versus approved encode/decode operations. The +shared `internal/modules/dnd/codec/candidatejson` package supplies strict typed +candidate JSON mechanics; each artifact codec retains its own durable schema +and approved-value policy. The `internal/modules/dnd/codec/combatturns` package owns the durable `dnd/combat-turn-list` schema and candidate versus approved JSON boundary. It @@ -345,8 +349,9 @@ 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 with a spell-list append -function. +source-chunk order. The D&D registrar specializes it for all five artifact +lists; each append merger preserves collection presence and order while giving +the result independently owned nested source-reference slices. ### `internal/modules/generic/normalize/noop` diff --git a/internal/modules/dnd/npcs/identity/identity.go b/internal/modules/dnd/npcs/identity/identity.go index ccfeac3..006b07e 100644 --- a/internal/modules/dnd/npcs/identity/identity.go +++ b/internal/modules/dnd/npcs/identity/identity.go @@ -138,9 +138,6 @@ func ValidateRegistry(npcs []dnd.NPC) []Issue { // ValidateList validates the identity members of list. func ValidateList(list dnd.NPCList) []Issue { return ValidateRegistry(list.NPCs) } -// Validate is a convenience alias for ValidateList. -func Validate(list dnd.NPCList) []Issue { return ValidateList(list) } - // Error makes an issue useful in simple callers while preserving its // structured fields for aggregate diagnostics. func (i Issue) Error() string { diff --git a/internal/modules/dnd/npcs/registry/registry.go b/internal/modules/dnd/npcs/registry/registry.go index dc91f73..95e38d4 100644 --- a/internal/modules/dnd/npcs/registry/registry.go +++ b/internal/modules/dnd/npcs/registry/registry.go @@ -203,9 +203,6 @@ func Resolve(references contracts.ReferenceSet) (*Registry, error) { }, nil } -// New is an alias for Resolve for callers constructing a prepared registry. -func New(references contracts.ReferenceSet) (*Registry, error) { return Resolve(references) } - // Bound reports whether an NPC reference was supplied and validated. func (r *Registry) Bound() bool { return r != nil && r.bound }