Correct prompt definition selection and decoding
This commit is contained in:
@@ -9,9 +9,10 @@ explains how to select these sources and invoke the engine. The
|
||||
owns the resulting outbound wire behavior.
|
||||
|
||||
Prompt and profile sources recursively discover files ending in `.yaml` or
|
||||
`.yml`. YAML decoding is strict: unknown fields are errors for the selected
|
||||
definition. Definitions are selected by their YAML `id`, not their file name
|
||||
or directory.
|
||||
`.yml`. Each prompt-definition file contains exactly one YAML document;
|
||||
comments and trailing whitespace are allowed. YAML decoding is strict: unknown
|
||||
fields are errors for the selected definition. Definitions are selected by
|
||||
their YAML `id`, not their file name or directory.
|
||||
|
||||
## Prompt Definitions
|
||||
|
||||
|
||||
@@ -12,9 +12,12 @@ validation modes, built-in catalog, and source precedence.
|
||||
|
||||
## Prompt Definitions
|
||||
|
||||
`internal/promptdef` discovers YAML deterministically, decodes and validates
|
||||
definitions, selects an ID and optional version, and resolves file-backed
|
||||
message content through an explicit source-root abstraction. Operating-system
|
||||
`internal/promptdef` discovers YAML deterministically, requires one strictly
|
||||
decoded document per file, and scans normalized ID and version metadata before
|
||||
validating the selected definition. It retains the point-in-time metadata scan
|
||||
needed for duplicate detection while opening file-backed message content only
|
||||
for one exact selected candidate. Content resolution uses an explicit
|
||||
source-root abstraction. Operating-system
|
||||
sources enforce containment against canonical roots and targets so symlinks
|
||||
cannot escape. Injected `fs.FS` sources enforce containment in their clean
|
||||
relative path namespace. A single-file source uses the selected prompt file's
|
||||
|
||||
Reference in New Issue
Block a user