Context
Right now prompts are TypeScript modules. That's great for developers but bad for two use cases:
- Sharing — you can't easily drop a prompt into someone else's project without matching deps.
- Non-developers — prompt engineers who don't write TS can't author prompts.
Proposal (RFC)
Define a portable prompt-pack format: a single YAML or JSON file describing one or more prompts, their inputs, templates, and eval cases.
# sentiment.promptkit.yaml
pack: 1
prompts:
- name: classify-sentiment
version: 1.1.0
description: Classify sentiment into N labels.
input:
text: { type: string, required: true }
labels:
type: array
items: { type: string }
default: [positive, negative, neutral]
template: |
Classify the sentiment of: "{{text}}"
Labels: {{labels}}
->
Then:
promptkit load sentiment.promptkit.yaml → returns PromptDefinition[].
promptkit run sentiment.promptkit.yaml#classify-sentiment ….
- Export from TS:
import { loadPack } from 'promptkit/pack'.
Open questions
- YAML or JSON only? (YAML is nicer for multi-line templates; adds a dep.)
- How to express
validate declaratively? Limited subset, or validate: { minLength: 1 } style?
- Versioning of the pack format itself.
- Should packs be installable from a registry URL?
Acceptance
Looking for feedback on the format before implementation. Please comment with use cases!
/label "enhancement" "area:loader" "help wanted"
Context
Right now prompts are TypeScript modules. That's great for developers but bad for two use cases:
Proposal (RFC)
Define a portable prompt-pack format: a single YAML or JSON file describing one or more prompts, their inputs, templates, and eval cases.
Then:
promptkit load sentiment.promptkit.yaml→ returnsPromptDefinition[].promptkit run sentiment.promptkit.yaml#classify-sentiment ….import { loadPack } from 'promptkit/pack'.Open questions
validatedeclaratively? Limited subset, orvalidate: { minLength: 1 }style?Acceptance
docs/pack-format.md.loadPack()loader + tests.promptkit loadcommand.Looking for feedback on the format before implementation. Please comment with use cases!
/label "enhancement" "area:loader" "help wanted"