Migrate maintained PromptKit definitions and examples

This commit is contained in:
2026-10-04 11:41:00 +00:00
parent 0df2aad3a8
commit 2027b80311
23 changed files with 244 additions and 221 deletions

View File

@@ -276,7 +276,16 @@ removed constructor API or backend schema remains in production code.
## Stage 4: Migrate Maintained Definitions, Application Examples, And Testdata ## Stage 4: Migrate Maintained Definitions, Application Examples, And Testdata
Status: Pending. Depends on Stage 3. Status: Complete. Maintained and fixture prompt/profile definitions now use
PromptKit's keyed format, and application examples select ordered native
sources with framework backend data in separate files. The two fixture
versions sharing one prompt ID are in one document so their directory remains
a strict composition group. The old imported backend fragment contained no
application defaults; it was removed after its framework data moved rather
than introducing an unrelated defaults fragment. All four application configs
validate; both maintained render scripts, the composed-overlay render, the
inheritance render without credentials, and offline renders for each maintained
and fixture prompt/version pass.
Files: maintained prompt/profile YAML under `examples/` and Files: maintained prompt/profile YAML under `examples/` and
`testdata/promptkit-v0.9/`; their application configs and scripts; new `testdata/promptkit-v0.9/`; their application configs and scripts; new

View File

@@ -1,3 +1,5 @@
prompt_dir: ./examples/prompts promptkit_sources:
profile_dir: ./examples/profiles - directory: ./examples/prompts
- directory: ./examples/profiles
- file: ./examples/framework/backends.yml
schema_dir: ./examples/schemas schema_dir: ./examples/schemas

View File

@@ -2,7 +2,6 @@
configkit: configkit:
imports: imports:
- path: config-fragments/sources.yml - path: config-fragments/sources.yml
- path: config-fragments/backend.yml
server: server:
addr: :8080 addr: :8080

View File

@@ -1,16 +1,9 @@
prompt_dir: ./examples/prompts promptkit_sources:
profile_dir: ./examples/profiles - directory: ./examples/prompts
- directory: ./examples/profiles
- file: ./examples/framework/backends.yml
schema_dir: ./examples/schemas schema_dir: ./examples/schemas
backends:
local-gpu:
endpoint: http://localhost:11434/v1
api_key_env: LOCAL_GPU_API_KEY
extra_params:
provider_option: enabled
concurrency_limit: 2
queue_capacity: 0
server: server:
addr: 127.0.0.1:8080 addr: 127.0.0.1:8080
artifact_root: . artifact_root: .

View File

@@ -1,18 +1,6 @@
# Application paths are relative to the repository invocation directory. # Application paths are relative to the repository invocation directory.
prompt_dir: ./examples/prompts promptkit_sources:
profile_dir: ./examples/profiles - directory: ./examples/prompts
- directory: ./examples/profiles
- file: ./examples/framework/inheritance.yml
schema_dir: ./examples/schemas schema_dir: ./examples/schemas
backends:
local-base:
endpoint: http://localhost:11434/v1
api_key_env: LOCAL_GPU_API_KEY
concurrency_limit: 2
queue_capacity: 4
extra_params:
provider_option: true
local-gpu:
extends: local-base
queue_capacity: 0
extra_params:
provider_option: false

View File

@@ -1,5 +1,7 @@
prompt_dir: ./examples/prompts promptkit_sources:
profile_dir: ./examples/profiles - directory: ./examples/prompts
- directory: ./examples/profiles
- file: ./examples/framework/backends.yml
schema_dir: ./examples/schemas schema_dir: ./examples/schemas
server: server:

View File

@@ -2,3 +2,7 @@ backends:
local-gpu: local-gpu:
endpoint: http://localhost:11434/v1 endpoint: http://localhost:11434/v1
api_key_env: LOCAL_GPU_API_KEY api_key_env: LOCAL_GPU_API_KEY
extra_params:
provider_option: enabled
concurrency_limit: 2
queue_capacity: 0

View File

@@ -0,0 +1,13 @@
backends:
local-base:
endpoint: http://localhost:11434/v1
api_key_env: LOCAL_GPU_API_KEY
concurrency_limit: 2
queue_capacity: 4
extra_params:
provider_option: true
local-gpu:
extends: local-base
queue_capacity: 0
extra_params:
provider_option: false

View File

@@ -1,4 +1,5 @@
id: local-fast profiles:
local-fast:
endpoint: http://localhost:8000/v1 endpoint: http://localhost:8000/v1
model: gpt-4o-mini model: gpt-4o-mini
temperature: 0.2 temperature: 0.2

View File

@@ -1,4 +1,5 @@
id: local-gpu profiles:
local-gpu:
backend: local-gpu backend: local-gpu
model: local-model model: local-model
reasoning_effort: low reasoning_effort: low

View File

@@ -1,4 +1,5 @@
id: local-quality profiles:
local-quality:
endpoint: http://localhost:8000/v1 endpoint: http://localhost:8000/v1
model: gpt-4.1 model: gpt-4.1
temperature: 0.0 temperature: 0.0

View File

@@ -1,5 +1,6 @@
id: dnd.session_recap prompts:
version: "1.0.0" dnd.session_recap:
"1.0.0":
default_profile: local-quality default_profile: local-quality
description: Example D&D session recap prompt definition for demonstration only. description: Example D&D session recap prompt definition for demonstration only.
inputs: inputs:

View File

@@ -1,5 +1,6 @@
id: generic.markdown_summary prompts:
version: "1.0.0" generic.markdown_summary:
"1.0.0":
default_profile: local-fast default_profile: local-fast
description: Generic markdown summary from transcript and glossary. description: Generic markdown summary from transcript and glossary.
inputs: inputs:

View File

@@ -1,5 +1,6 @@
id: generic.structured_events prompts:
version: "1.0.0" generic.structured_events:
"1.0.0":
default_profile: local-quality default_profile: local-quality
description: Produce structured event JSON from a transcript. description: Produce structured event JSON from a transcript.
inputs: inputs:

View File

@@ -1,12 +1,5 @@
prompt_dir: ./testdata/promptkit-v0.9/prompts promptkit_sources:
profile_dir: ./testdata/promptkit-v0.9/profiles - directory: ./testdata/promptkit-v0.9/prompts
- directory: ./testdata/promptkit-v0.9/profiles
- file: ./testdata/promptkit-v0.9/framework/backends.yml
schema_dir: ./testdata/promptkit-v0.9/schemas schema_dir: ./testdata/promptkit-v0.9/schemas
backends:
fixture-custom:
endpoint: http://127.0.0.1:11434/v1
api_key_env: FIXTURE_BACKEND_API_KEY
extra_params:
backend_option:
enabled: true
concurrency_limit: 2
queue_capacity: 0

View File

@@ -0,0 +1,9 @@
backends:
fixture-custom:
endpoint: http://127.0.0.1:11434/v1
api_key_env: FIXTURE_BACKEND_API_KEY
extra_params:
backend_option:
enabled: true
concurrency_limit: 2
queue_capacity: 0

View File

@@ -1,4 +1,5 @@
id: custom-base profiles:
custom-base:
backend: fixture-custom backend: fixture-custom
model: fixture-base-model model: fixture-base-model
temperature: 0.25 temperature: 0.25

View File

@@ -1,4 +1,5 @@
id: custom-derived profiles:
base_profile: custom-base custom-derived:
extends: custom-base
model: fixture-derived-model model: fixture-derived-model
reasoning_effort: high reasoning_effort: high

View File

@@ -1,4 +1,5 @@
id: endpoint-only profiles:
endpoint-only:
endpoint: http://127.0.0.1:8000/v1 endpoint: http://127.0.0.1:8000/v1
model: fixture-endpoint-model model: fixture-endpoint-model
temperature: 0.1 temperature: 0.1

View File

@@ -1,5 +1,6 @@
id: compat.complete prompts:
version: "1.0.0" compat.complete:
"1.0.0":
description: Exercise the complete Promptkit v0.9 prompt-definition surface. description: Exercise the complete Promptkit v0.9 prompt-definition surface.
default_profile: custom-derived default_profile: custom-derived
session_id: 'fixture-{{.topic}}' session_id: 'fixture-{{.topic}}'
@@ -29,3 +30,12 @@ output:
validation_mode: json_schema validation_mode: json_schema
schema_path: complete.schema.json schema_path: complete.schema.json
repair_attempts: 2 repair_attempts: 2
"2.0.0":
default_profile: endpoint-only
messages:
- role: user
content: Version two has no declared inputs.
output:
format: text
validation_mode: basic
repair_attempts: 1

View File

@@ -1,10 +0,0 @@
id: compat.complete
version: "2.0.0"
default_profile: endpoint-only
messages:
- role: user
content: Version two has no declared inputs.
output:
format: text
validation_mode: basic
repair_attempts: 1

View File

@@ -1,5 +1,6 @@
id: compat.json prompts:
version: "1.0.0" compat.json:
"1.0.0":
default_profile: endpoint-only default_profile: endpoint-only
messages: messages:
- role: user - role: user

View File

@@ -1,5 +1,6 @@
id: compat.none prompts:
version: "1.0.0" compat.none:
"1.0.0":
default_profile: endpoint-only default_profile: endpoint-only
messages: messages:
- role: user - role: user