Refactor: load execution profiles from YAML and split prompt definitions into promptdef repository

This commit is contained in:
2026-05-05 10:18:28 -05:00
parent a633c67538
commit 7fffdaede3
25 changed files with 567 additions and 183 deletions

View File

@@ -0,0 +1,5 @@
id: invalid-yaml
version: 1.0.0
templates:
- role: system
content: [unclosed bracket

View File

@@ -0,0 +1,11 @@
id: json-schema-missing-path
version: "1.0.0"
inputs:
- name: transcript
required: true
templates:
- role: user
content: "Return JSON"
output_format: json
validation:
validation_mode: json_schema

View File

@@ -0,0 +1,11 @@
version: 1.0.0
description: Missing ID
inputs:
- name: transcript
required: true
templates:
- role: system
content: Hello
output_format: text
validation:
validation_mode: none

View File

@@ -0,0 +1,11 @@
id: negative-timeout
version: "1.0.0"
inputs:
- name: transcript
required: true
templates:
- role: user
content: "Say hi"
output_format: text
validation:
validation_mode: none

View File

@@ -0,0 +1,9 @@
id: no-templates
version: 1.0.0
inputs:
- name: transcript
required: true
templates: []
output_format: text
validation:
validation_mode: none

19
internal/promptdef/testdata/valid.yaml vendored Normal file
View File

@@ -0,0 +1,19 @@
id: test-profile
version: "1.0.0"
default_profile: test-exec
description: A valid test prompt definition
inputs:
- name: transcript
required: true
content_type: text/markdown
- name: glossary
required: false
content_type: text/yaml
templates:
- role: system
content: "You are a helpful assistant."
- role: user
content: 'Analyze this: {{input "transcript"}}'
output_format: markdown
validation:
validation_mode: basic