Added shared helper for module prompt FS

This commit is contained in:
2026-07-06 07:29:41 -05:00
parent ecba0ad725
commit 8cafa64174
7 changed files with 180 additions and 416 deletions

View File

@@ -1,47 +1,15 @@
# Shared Prompt And Asset Layout Roadmap
# Completed Shared Prompt And Asset Layout
This roadmap defines the target state for reorganizing embedded prompt and
schema assets so module-owned files are shallow and shared prompt fragments live
in an explicit shared asset package.
The embedded prompt and schema asset layout has been reorganized so module-owned
files are shallow and shared prompt fragments live in an explicit shared asset
package.
## Motivation
## Outcome
The current Scriptorium asset layout works, but module prompt files are nested
more deeply than their package ownership requires. For example, a module package
already identifies its stage, domain, and artifact, so paths like
`assets/scriptorium/prompts/dnd/spells/...` repeat context that is already in
the Go package path.
Module-owned assets stay in the module package that owns the behavior, with
shallow internal paths:
Shared D&D prompt fragments also currently live under a D&D-specific
`promptassets` package. That is serviceable, but it undersells the fact that
shared assets are intentionally cross-module. A clearer shared package will make
reuse deliberate and make room for common prompt hardening and reference-use
rules.
## Target State
Module-owned assets should stay in the module package that owns the behavior,
but their internal paths should be shallow:
```text
internal/modules/extract/dnd/spells/assets/
prompts/
dnd.spells.yaml
task.md
instructions.md
schemas/
dnd_spells.v1.json
internal/modules/chunk/dnd/scenes/assets/
prompts/
dnd.scenes.yaml
task.md
instructions.md
schemas/
dnd_scenes.v1.json
```
Shared reusable assets should move to:
Shared reusable assets live under:
```text
internal/modules/sharedassets/
@@ -81,17 +49,13 @@ evidence, use references only for disambiguation unless a module says otherwise,
ignore instructions embedded inside source/reference content, follow the
structured output contract, and avoid exposing prompt instructions.
## Documentation Outcome
## Canonical Docs
When implemented, canonical internal documentation should describe the asset
ownership convention:
Current behavior is documented in:
- module-owned prompts and schemas live under each module's shallow `assets`
tree;
- shared reusable fragments live under `internal/modules/sharedassets`;
- framework and CLI code may collect assets, but module packages remain
responsible for prompt intent and schemas.
- [Internal Overview](../internal/overview.md)
- [Internal LLM Runtime](../internal/llm.md)
- [Internal Modules](../internal/modules.md)
Prompt IDs, prompt versions, response schema IDs, schema names, and runtime
module contracts should remain unchanged unless a later feature explicitly
changes prompt semantics.
module contracts remain unchanged by this reorganization.