specVersion: 1
uuid: 8d5b6a30-9b3e-4f4c-9b8b-1f3d2a1e5c4f
id: support_welcome
name: support_welcome
group: support
version: 1.0
revision: 1
description: Sample Chat
authors:
- fabapp2
purpose: Test
repositoryUrl: some-store
status: ACTIVE
request: !<chat/completion>
vendor: OpenAI
model: gpt-3.5-turbo
url: https://openai.url
messages:
- content: You are a happy assistant.
role: system
- content: How are you?
role: user
placeholders: null
response: !<chat/completion>
content: |
I'm happy.
extensions:
x-evaluation:
spec:
evaluations: []
results:
evaluations: []
status: NOT_CONFIGURED
path: support/support_welcome.yaml
CORE / PROMPT SPECS
Prompt specs
A PromptSpec is the on-disk representation of a single prompt — one
YAML file persisted in the prompt store. Every prompt the CLI, Studio,
REST API, and client SDKs work with is one of these specs.
The Java type is dev.promptlm.domain.promptspec.PromptSpec. This page
documents the fields end-users actually author or read; the Builder
APIs are an implementation detail of the domain module.
Where they live
Each spec is serialised as YAML on disk under the active repository’s
working tree. The path field of the spec captures the relative
filesystem path within the repo, e.g. prompts/support/welcome.yaml.
Fields
| Field | Type | Purpose |
|---|---|---|
|
string |
Format version of the spec schema. Stamped by the writer. |
|
UUID |
Stable identity of the prompt, independent of name or group. |
|
string (required) |
Human-facing identifier. Example: |
|
string (required) |
Prompt name. Pattern: |
|
string (required) |
Logical grouping of related prompts. Same pattern as |
|
string |
Semantic version of the prompt, e.g. |
|
integer |
Revision counter inside a draft. Defaults to |
|
string |
Human-readable description. |
|
list<string> |
Author identifiers. |
|
string |
Business intent of the prompt. |
|
string |
Source repository URL for this prompt. |
|
enum |
Publication status. Defaults to |
|
timestamp |
When the spec was first persisted. |
|
timestamp |
Last write timestamp. |
|
timestamp |
When the spec was retired ( |
|
string |
Optional explanation for retirement. |
|
LLM invocation payload — chat, image, or audio. |
|
|
Placeholder metadata and default values. |
|
|
Response |
Most recent captured response from execution. |
|
map<string, json> |
Custom payloads keyed by |
|
string |
Filesystem path of the spec within the repo. |
|
list<Execution> |
Recent executions of the prompt. |
|
string |
SHA-256 over the semantic prompt fields — stable across non-meaningful edits. |
|
Note
|
|
Request types
The request field is polymorphic — Jackson picks a concrete type from
the type discriminator inside the YAML.
type |
Concrete class |
|---|---|
|
|
|
|
|
|
When the YAML is written using Jackson’s !<> tag syntax, the type
appears as a YAML tag on the request: node — for example
request: !<chat/completion>. Both forms round-trip through the
deserializer.
Placeholders
placeholders declares the template variables a prompt expects.
| Field | Purpose |
|---|---|
|
Opening delimiter for placeholders in the prompt body (e.g. |
|
Closing delimiter (e.g. |
|
Ordered list of |
getDefaults() returns the placeholder name → default map, and rejects
duplicate names with IllegalStateException("Duplicate placeholder
name: …"). Keep each placeholder unique per spec.
Extensions (x-*)
The extensions map carries arbitrary JSON payloads keyed by names
that must start with x-. This is how evaluation specs, evaluation
results, and release metadata are attached to a prompt without
expanding the core schema.
|
Important
|
Extension keys must start with |
Two extension keys are managed by the core today:
-
x-evaluation— evaluation spec and results, seeEvaluationExtensions. -
x-release— release metadata attached when a prompt is released, seeReleaseExtensions.
Legacy specs with top-level evaluationSpec / evaluationResults
fields are migrated into x-evaluation at deserialisation time, so
older files still load — but newly written specs use the extension
form.
Example
A minimal chat-completion spec as it appears on disk:
Equality and the semantic hash
Two specs compare equal when their name, group, version, and
revision match — that’s the identity tuple at the persistence layer.
For change detection across edits, use semanticHash: a SHA-256
fingerprint of the semantic fields. hasSemanticChangesComparedTo()
returns true when two specs differ in any of those fields, regardless
of whether timestamps or hashes were rewritten.