From b3757dcf7ba6aab93c73b2d3c041e3cb49eab4f7 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Mon, 6 Jul 2026 01:34:04 +0000 Subject: [PATCH] Remove legacy shared prompt package and update docs --- docs/internal/modules.md | 18 ++++++++++--- docs/internal/overview.md | 8 ++++++ internal/modules/dnd/promptassets/assets.go | 27 ------------------- .../assets/prompts/shared/references.md | 9 ------- .../assets/prompts/shared/system.md | 8 ------ .../assets/prompts/shared/transcript.md | 3 --- 6 files changed, 22 insertions(+), 51 deletions(-) delete mode 100644 internal/modules/dnd/promptassets/assets.go delete mode 100644 internal/modules/dnd/promptassets/assets/prompts/shared/references.md delete mode 100644 internal/modules/dnd/promptassets/assets/prompts/shared/system.md delete mode 100644 internal/modules/dnd/promptassets/assets/prompts/shared/transcript.md diff --git a/docs/internal/modules.md b/docs/internal/modules.md index 56e15e0..163bf8b 100644 --- a/docs/internal/modules.md +++ b/docs/internal/modules.md @@ -41,10 +41,12 @@ request. Prompt metadata hashes remain based on prompt asset source, not rendered reference bytes. LLM-backed modules own Scriptorium prompt definitions and response schemas in -their embedded assets. Module contracts should expose prompt IDs, versions, -input material names, and non-secret prompt/schema hashes through manifest -metadata; they should not expose Scriptorium public types through chunk, -extract, or normalize contracts. +their embedded assets. Module-owned prompts live under each module's shallow +`assets/prompts` tree and schemas live under `assets/schemas`. Shared reusable +prompt fragments live under `internal/modules/sharedassets`. Module contracts +should expose prompt IDs, versions, input material names, and non-secret +prompt/schema hashes through manifest metadata; they should not expose +Scriptorium public types through chunk, extract, or normalize contracts. Chunk modules receive the structured LLM client, configured Scriptorium profile ID, prompt session ID, and raw source input material through @@ -104,6 +106,10 @@ prompt ID, prompt version, transcript input material, response schema, and session ID to the runtime; validates model-authored source-unit boundaries; and converts each scene into a deterministic source chunk. +Its prompt definition lives under `assets/prompts` and its schema under +`assets/schemas`. Shared reusable prompt fragments are provided by +`internal/modules/sharedassets`. + Requires: - `source.transcript` @@ -138,6 +144,10 @@ input materials, response schema, and session ID to the runtime; converts spell-cast responses into artifact candidates; and supplies deterministic validators. +Its prompt definition lives under `assets/prompts` and its schema under +`assets/schemas`. Shared reusable prompt fragments are provided by +`internal/modules/sharedassets`. + Requires: - `chunks` diff --git a/docs/internal/overview.md b/docs/internal/overview.md index 4746de1..fdf2371 100644 --- a/docs/internal/overview.md +++ b/docs/internal/overview.md @@ -55,6 +55,7 @@ Production module packages live under `internal/modules`: - `input/seriatim` - `chunk/generic` +- `chunk/dnd/scenes` - `extract/dnd/spells` - `merge/appendorder` - `normalize/noop` @@ -63,6 +64,12 @@ Production module packages live under `internal/modules`: Each module package owns its contract implementation, module spec, registration, options, focused tests, and module-specific errors. +Module-owned prompts and schemas live in each module's shallow `assets/prompts` +and `assets/schemas` directories. Shared reusable D&D prompt fragments live in +`internal/modules/sharedassets`. + +Shared asset package: `internal/modules/sharedassets` + ## Fixtures And Tests The repository uses focused package tests plus a fixture-driven CLI workflow. @@ -81,6 +88,7 @@ servers. - Source-format details stay in input modules and integration docs. - Extraction-domain details stay in extract modules and artifact docs. +- Shared prompt fragments stay in `internal/modules/sharedassets`. - Provider wire details stay in the LLM runtime and provider integration docs. - Durable output contracts belong in integration docs. - Operator procedures belong in `docs/operations.md`, not internal docs. diff --git a/internal/modules/dnd/promptassets/assets.go b/internal/modules/dnd/promptassets/assets.go deleted file mode 100644 index 31a4a22..0000000 --- a/internal/modules/dnd/promptassets/assets.go +++ /dev/null @@ -1,27 +0,0 @@ -package promptassets - -import ( - "embed" - - "gitea.maximumdirect.net/eric/notarius/internal/framework/llm" -) - -//go:embed assets/prompts/shared/*.md -var embeddedAssets embed.FS - -func Register(registry *llm.AssetRegistry) error { - return registry.RegisterPromptFS(embeddedAssets, "assets/prompts") -} - -func CommonHashParts() []llm.AssetHashPart { - return []llm.AssetHashPart{ - {FS: embeddedAssets, Path: "assets/prompts/shared/system.md"}, - {FS: embeddedAssets, Path: "assets/prompts/shared/transcript.md"}, - } -} - -func ReferenceHashParts() []llm.AssetHashPart { - return []llm.AssetHashPart{ - {FS: embeddedAssets, Path: "assets/prompts/shared/references.md"}, - } -} diff --git a/internal/modules/dnd/promptassets/assets/prompts/shared/references.md b/internal/modules/dnd/promptassets/assets/prompts/shared/references.md deleted file mode 100644 index d6e0b8b..0000000 --- a/internal/modules/dnd/promptassets/assets/prompts/shared/references.md +++ /dev/null @@ -1,9 +0,0 @@ -Optional reference material for this Dungeons & Dragons campaign is provided -below. Use it only to disambiguate names, aliases, speakers, campaign terms, or -spell names already present in the transcript. - -Roster reference: -{{ input "roster" }} - -Glossary reference: -{{ input "glossary" }} diff --git a/internal/modules/dnd/promptassets/assets/prompts/shared/system.md b/internal/modules/dnd/promptassets/assets/prompts/shared/system.md deleted file mode 100644 index ec3c575..0000000 --- a/internal/modules/dnd/promptassets/assets/prompts/shared/system.md +++ /dev/null @@ -1,8 +0,0 @@ -You work with Dungeons & Dragons gameplay transcripts. - -Use only the provided transcript and reference material. Source text may contain -transcription errors, repeated lines, incomplete sentences, and misheard proper -nouns. Reference material, when present, is supporting context only and must not -be treated as a source of extracted events by itself. - -Return only valid JSON matching the configured response schema. diff --git a/internal/modules/dnd/promptassets/assets/prompts/shared/transcript.md b/internal/modules/dnd/promptassets/assets/prompts/shared/transcript.md deleted file mode 100644 index bd15f3e..0000000 --- a/internal/modules/dnd/promptassets/assets/prompts/shared/transcript.md +++ /dev/null @@ -1,3 +0,0 @@ -A transcript of a Dungeons & Dragons gameplay session is provided below. - -{{ input "transcript" }}