Prompt files use YAML front matter. This page documents every supported field.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | Unique prompt identifier (e.g. support/reply) |
schema_version |
number |
Yes | Schema version — currently 1 |
description |
string |
No | Human-readable description of the prompt |
provider |
string |
No | openai, anthropic, gemini, google, openrouter, any |
model |
string |
No | Model name (e.g. gpt-5.4, claude-sonnet-4-20250514) |
fallback_models |
string[] |
No | Ordered list of fallback models |
reasoning |
object |
No | Reasoning/thinking configuration |
sampling |
object |
No | Sampling parameters |
response |
object |
No | Response format and streaming |
tools |
array |
No | Tool references (strings or inline definitions) |
mcp |
object |
No | MCP server references |
context |
object |
No | Declare expected variables and history settings |
includes |
string[] |
No | Paths to included prompt files (relative to this file) |
environments |
object |
No | Named environment overrides |
tiers |
object |
No | Named tier overrides |
metadata |
object |
No | Prompt metadata |
defaults.md files use a subset of the prompt schema. Only these fields are recognized:
| Field | Type | Description |
|---|---|---|
provider |
enum |
Default provider (openai, anthropic, google, gemini, openrouter, any) |
model |
string |
Default model identifier |
metadata |
object |
Same as the prompt metadata block (owner, tags, review_required, stable) |
# System instructions |
section | System instructions inherited by prompts in this folder |
See Prompt Format — Folder defaults for inheritance rules.
reasoning:
effort: medium # low | medium | high
budget_tokens: 4096 # positive integer| Field | Type | Description |
|---|---|---|
effort |
'low' | 'medium' | 'high' |
Reasoning effort level |
budget_tokens |
number |
Token budget for thinking (positive integer) |
Provider mapping:
- OpenAI:
effortmaps toreasoning_effort;budget_tokensis ignored. - Anthropic:
budget_tokensmaps tothinking.budget_tokens;effortis warned. - Gemini:
effortmaps tothinkingConfig.thinkingBudget(low=1024, medium=4096, high=8192).
sampling:
temperature: 0.7
top_p: 0.9
frequency_penalty: 0.5
presence_penalty: 0.3
stop:
- "\n"
- "END"
max_output_tokens: 2048| Field | Type | Range | Description |
|---|---|---|---|
temperature |
number |
0–2 | Randomness |
top_p |
number |
0–1 | Nucleus sampling threshold |
frequency_penalty |
number |
— | Frequency penalty (OpenAI only) |
presence_penalty |
number |
— | Presence penalty (OpenAI only) |
stop |
string[] |
— | Stop sequences |
max_output_tokens |
number |
>0 | Maximum output tokens |
response:
format: json # text | json | markdown
stream: true| Field | Type | Description |
|---|---|---|
format |
'text' | 'json' | 'markdown' |
Response format |
stream |
boolean |
Enable streaming |
An array of tool references. Each element is either a string name or an inline definition:
tools:
- get_account_status # string reference
- name: search_orders # inline definition
description: Search orders
input_schema:
type: object
properties:
query:
type: stringInline tool definition fields:
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | Tool name |
description |
string |
No | Tool description |
input_schema |
object |
No | JSON Schema for tool input |
mcp:
servers:
- my-server # string reference
- name: custom-server # object reference
config:
url: "https://..."context:
inputs:
- user_message
- name: account_summary
max_size: 4096
history:
max_items: 8| Field | Type | Description |
|---|---|---|
inputs |
`Array<string | { name, max_size?, trim?, allow_regex?, deny_regex?, regex? }>` |
history |
object |
History settings |
history.max_items |
number |
Maximum history items |
String-form inputs remain valid:
context:
inputs:
- user_message
- account_summaryObject-form inputs add optional controls:
max_size: checked duringrenderPrompt()and can producePOK030warnings.trim: trims incoming values to themax_sizebudget before interpolation (true/endkeeps leading bytes,startkeeps trailing bytes).allow_regex: allowlist validation before interpolation; non-matches throwPOK031.deny_regex: blocklist validation before interpolation; matches throwPOK032.regex: legacy alias ofallow_regex.
includes:
- ./shared/tone.md
- ./shared/safety.mdPaths are resolved relative to the file declaring them. See Composition.
environments:
dev:
model: gpt-5.4-mini
sampling:
temperature: 0.2
prod:
model: gpt-5.4
tiers:
free:
model: gpt-5.4-mini
pro:
model: gpt-5.4Each environment/tier key maps to an overrides object. Overridable fields: model, fallback_models, reasoning, sampling, response, tools. See Overrides.
metadata:
owner: support-platform
tags:
- customer-facing
- production
review_required: true
stable: true| Field | Type | Description |
|---|---|---|
owner |
string |
Team or person responsible |
tags |
string[] |
Categorization tags |
review_required |
boolean |
Whether changes need review |
stable |
boolean |
Whether the prompt is considered stable |
These are populated by the parser from H1 headings in the Markdown body — they are not authored in YAML:
| Section | Description |
|---|---|
system_instructions |
From # System instructions |
prompt_template |
From # Prompt template |
notes |
From # Notes |
Populated by the parser — not authored:
| Field | Type | Description |
|---|---|---|
file_path |
string |
Absolute path to the source file |
checksum |
string |
File checksum |
The schema definitions are available as Zod schemas for programmatic use:
import { PromptAssetSchema, PromptAssetOverridesSchema } from 'promptopskit';
// Validate arbitrary data
const result = PromptAssetSchema.safeParse(data);