---
title: "Version a prompt"
deprecated: true
description: "Create immutable prompt commits and move deployment tags between verified versions."
sidebar:
  label: "Version a prompt"
  hidden: true
seo:
  title: "Version a Prompt | Judgment How-to"
  description: "Create a prompt commit, inspect its history, promote a tag, and verify the version application code will retrieve."
---

> **Prompt management is deprecated**
>
> Prompt management is not recommended for new projects. This guide remains
> available for teams maintaining an existing Judgment prompt workflow.

Version a prompt when you need to change its text without overwriting the
version already used by an application. You will append a commit, inspect the
history, and point a stable tag at the verified version.

## Prerequisites

- An existing prompt with at least one commit
- A proposed template change
- A tag such as `staging` or `production` when code should follow promotion
  instead of the latest commit

## Create and promote a version

1. ### Choose the source commit

    Open **Prompts** and select the prompt. In **Commits**, select the version
    whose content should seed the new draft.

    Previous commits are read-only. Selecting one lets you inspect it without
    changing its content or commit ID.

2. ### Start a new commit

    Select **New Commit**. The editor becomes writable and starts with the
    selected commit's text. Edit the template and confirm that any added or
    removed `{{variables}}` are reflected in the **Variables** section.

3. ### Label the candidate

    Select **Add Tags**, add `staging`, then select **Done** in the tag dialog.
    Select **Commit** after the dialog closes.

    Judgment appends a new immutable snapshot with its own commit ID. Existing
    commits and their IDs remain available.

4. ### Promote the verified commit

    After testing the candidate, select its commit card, choose **Add Tags**,
    add `production`, then select **Submit** in the tag dialog.

    A tag can point to only one commit within a prompt. If another commit
    already has `production`, Judgment moves the tag to this commit. Code that
    retrieves by that tag will resolve the newly promoted version on its next
    fetch.

> **Warning**
>
> Removing a tag or moving it changes what tag-based retrieval resolves. If no
> commit carries a requested tag, SDK retrieval returns no prompt and the
> application must handle that failure.

## Retrieve an earlier version

Select any commit card to inspect its prompt text, author, creation time, tags,
and commit ID. To reproduce that exact version in code, copy its commit ID and
use commit-ID retrieval. To restore its content as the new latest version,
select it, choose **New Commit**, and commit the resulting draft.

## Troubleshooting

- If **Commit** remains disabled, change the prompt text. Adding a tag to an
  in-progress commit does not by itself create a new content version.
- If a tag disappears from an older commit, check the newer cards. Reusing a
  tag moves it; it does not copy the tag across versions.
- If the editor is read-only, you are inspecting a saved commit. Select **New
  Commit** before editing.

## Next step

[Use prompts in code](/documentation/prompts/usage) and choose whether the
application should follow `production` or pin the commit ID you inspected.

## Verify the version

The detail page should show at least two commit cards. Select each card and
confirm that its prompt text and commit ID differ, then confirm that the
`production` badge appears only on the intended commit. This is the version a
`tag="production"` lookup will retrieve.
