moda CLI syncs them to a versioned registry. Use it to keep an immutable history of every prompt change, mark which version is released where, and see how each version behaves in production.
How it works
- Prompt files (
.prompt.mdor.prompt.json) live in your repo. A manifest at.moda/prompts.ymldeclares where to find them. moda prompts syncuploads them to the registry. Each unique content gets an immutable, content-addressed version.- Release labels (
dev,staging,prod) point at versions. Promoting moves a label; it never changes content. - At runtime, your application stamps prompt identifiers on its LLM calls so Moda can attribute traces to versions. See Prompt attribution.
The Moda SDKs do not include a prompt fetch, render, or templating API. Your application loads prompt content the same way it does today — from source files, constants, or your own loader. Moda versions the files and attributes runtime calls; it is not in the request path.
Versions are content-addressed and immutable
A version’s identity is a hash of the prompt’s key and content: the prompt text, system prompt, messages, variables, variables schema, model config, tool references, and response schema. This means:- Syncing unchanged content is a no-op that returns the same version ID. Retries and repeated CI runs never create duplicate versions.
- Any content change creates a new version. Existing versions are never modified.
- Changing only
name,description, orcategorydoes not create a new version. - There is no delete or archive operation. Deleting a local file removes it from your lockfile on the next sync, but the prompt and its versions remain in the registry.
pver_0f31c2ab9d4e8877a1b2c3d4e5f60718; prompt IDs look like prompt_7d1a9c0b3e5f24681357ace9. Both are recorded in .moda/prompts.lock.json after a sync.
Release labels
A label points at exactly one version of a prompt. Promoting moves the label from whichever version held it to the target version.Release labels are release pointers in the prompt registry. They are unrelated to the
environment field (development / staging / production) on ingested traces.Prompts in the dashboard
Open Dashboard → Prompts (in the Improve group). The library page lists repository-synced prompts with their versions, release labels, call counts, and candidates awaiting review. Filter tabs narrow the list by label: All, Prod, Staging, Dev, Unlabeled. Each prompt’s detail page shows the key, its labels, the source path, source commit, and manifest hash, plus two tabs:- Versions — every synced version with its content, buttons to promote a version to
stagingorprod, a release-label panel showing which version each label points at, and a runtime usage table (calls, traces, input and output tokens per version). Usage rows appear only for calls that carry prompt attribution. - Optimize — candidates awaiting review (unlabeled versions generated by
moda prompts propose, plus proposals saved from the Playground), a history of comparison runs, and links into the Playground. Nothing on this tab deploys automatically: merging a candidate creates an unlabeled version that you promote explicitly.
Next steps
- Prompt workflow — set up the manifest, file formats, sync, and promote.
- Prompt attribution — link runtime LLM calls to prompt versions.
- Prompt experiments — compare versions with replayed scenarios before promoting.
- CLI reference — full command and flag listing for the
modaCLI.