Capture prompt requirement metadata and templates

This commit is contained in:
2026-10-08 20:17:34 +00:00
parent a6e0ffea8f
commit bf472dad8a
6 changed files with 261 additions and 24 deletions

View File

@@ -9,6 +9,22 @@ type CompiledTemplates struct {
Messages []*template.Template
}
// InputMetadata is the captured declaration metadata for one prompt input.
// Nil metadata pointers mean the corresponding field was absent or null.
type InputMetadata struct {
Name string
Required bool
ContentType *string
Description *string
}
// RequirementSnapshot provides the captured syntax and declarations needed
// for requirement inspection without reopening prompt resources.
type RequirementSnapshot struct {
Templates CompiledTemplates
Inputs []InputMetadata
}
// TemplateLookup provides parsed templates for a captured prompt identity.
type TemplateLookup interface {
GetCompiledTemplates(id, version string) (CompiledTemplates, bool)