You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Provider adapters for OpenAI, Anthropic, Gemini, and OpenRouter produce a ready-
15
15
-**Centralized, not scattered** — each prompt is a single Markdown file that captures prompt text, model config, tool bindings, and context rules together.
16
16
-**Operational, not just templated** — model name, temperature, reasoning effort, tools, and response format are declared alongside the prompt they govern.
17
17
-**Reusable, not duplicated** — `includes` lets you define shared tone, policy, or safety instructions once and compose them into any prompt.
18
-
-**Layered defaults, not repetition** — `defaults.md` in any folder sets shared `metadata` and `# System instructions` for that subtree, with nearest-folder override behavior.
18
+
-**Layered defaults, not repetition** — `defaults.md` in any folder sets shared `provider`, `model`, `metadata`, and `# System instructions` for that subtree, with nearest-folder override behavior.
19
19
-**Release-aware, not ad hoc** — environment and tier overrides swap models and parameters without forking prompt files.
20
20
-**Provider-portable** — write once, render for OpenAI, Anthropic, Gemini, or OpenRouter with correct body shapes.
21
21
-**Validate early** — Zod schema validation, Levenshtein-based "did you mean?" suggestions for typos, and variable usage checks catch mistakes before runtime.
@@ -40,6 +40,7 @@ This creates:
40
40
41
41
```
42
42
prompts/
43
+
├── defaults.md # Folder-level defaults (provider, model, metadata, system instructions)
43
44
├── hello.md # Sample prompt with variables
44
45
├── hello.test.yaml # Test sidecar with sample inputs
Copy file name to clipboardExpand all lines: docs/prompt-format.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,14 +52,18 @@ You can define shared defaults for an entire prompt tree by adding a `defaults.m
52
52
53
53
Supported default fields:
54
54
55
-
-`metadata` (front matter)
56
-
-`# System instructions` (body section)
55
+
-`provider` (front matter) — default provider for the folder
56
+
-`model` (front matter) — default model for the folder
57
+
-`metadata` (front matter) — merged with prompt-local metadata
58
+
-`# System instructions` (body section) — used when the prompt has none
59
+
60
+
This lets you configure app-wide settings like `provider` and `model` in a single place. Individual prompts only need to declare what's unique to them.
57
61
58
62
Example:
59
63
60
64
```text
61
65
prompts/
62
-
├── defaults.md # global metadata + system instructions
66
+
├── defaults.md # global settings, metadata + system instructions
63
67
└── support/
64
68
├── defaults.md # overrides for support/*
65
69
└── reply.md # inherits from support/defaults.md
@@ -69,6 +73,8 @@ prompts/
69
73
70
74
```markdown
71
75
---
76
+
provider: openai
77
+
model: gpt-5.4
72
78
metadata:
73
79
owner: platform
74
80
review_required: true
@@ -93,6 +99,8 @@ Use support tone and escalation policy.
93
99
```
94
100
95
101
`prompts/support/reply.md` (no local `metadata.owner` and no local system section) will use:
102
+
-`provider: openai` (inherited from root defaults)
103
+
-`model: gpt-5.4` (inherited from root defaults)
96
104
-`metadata.owner: support` (nearest override)
97
105
-`metadata.review_required: true` (inherited from parent defaults)
"system_instructions": "Always be polite, professional, and concise. Avoid jargon unless the user uses it first.\n\nYou are a careful support assistant. Follow refund policy exactly.\nCurrent app context: {{ app_context }}.",
0 commit comments