Document D&D prompt conventions and verification

This commit is contained in:
2026-08-05 15:05:24 +00:00
parent 39563f3ea0
commit 4093ff2e8b
16 changed files with 92 additions and 167 deletions

View File

@@ -185,13 +185,11 @@ func TestAssetRegistryFallbackProfileDigestTracksContentWithoutLeakingIt(t *test
func TestAssetRegistryCombinesNamespacedPromptSources(t *testing.T) {
registry := NewAssetRegistry()
mustRegisterPromptFS(t, registry, fstest.MapFS{
"dnd.spells/dnd.spells.yaml": {Data: []byte(validPromptYAML("schema.json"))},
"dnd.spells/task.md": {Data: []byte("spell task")},
"dnd.spells/prompt.yaml": {Data: []byte(validPromptYAML("schema.json"))},
"dnd.spells/instructions.md": {Data: []byte("spell instructions")},
}, ".")
mustRegisterPromptFS(t, registry, fstest.MapFS{
"dnd.scenes/dnd.scenes.yaml": {Data: []byte(validPromptYAML("schema.json"))},
"dnd.scenes/task.md": {Data: []byte("scene task")},
"dnd.scenes/prompt.yaml": {Data: []byte(validPromptYAML("schema.json"))},
"dnd.scenes/instructions.md": {Data: []byte("scene instructions")},
}, ".")
@@ -200,11 +198,9 @@ func TestAssetRegistryCombinesNamespacedPromptSources(t *testing.T) {
t.Fatalf("PromptFS() error = %v, want nil", err)
}
for _, name := range []string{
"dnd.spells/dnd.spells.yaml",
"dnd.spells/task.md",
"dnd.spells/prompt.yaml",
"dnd.spells/instructions.md",
"dnd.scenes/dnd.scenes.yaml",
"dnd.scenes/task.md",
"dnd.scenes/prompt.yaml",
"dnd.scenes/instructions.md",
} {
if _, err := fsys.Open(name); err != nil {