To version prompts for an LLM app: move each prompt out of the code into a prompt registry; publish every change as a new, permanent version instead of editing in place; fetch the prompt at runtime by name (latest, or a pinned version); fill variables at fetch time; and record the prompt name and version on each trace so you can tell which version produced an answer.
Keeping prompts out of code means non-engineers can change wording without a release. The risk is the same: a bad edit is live on the next call. Plan the way back before you need it. Pinning a version through configuration stops the bad version fastest; publishing the old text as a new version rolls everyone forward to a known good prompt.
Use drafts for work in progress so unfinished edits are never served, and handle a failed fetch explicitly: if the app cannot load its prompt, it should fall back to a safe response rather than run without its instructions.
OpenLIT Prompt Hub is open source (Apache 2.0). Each published version is permanent and numbered as a Major, Minor, or Patch bump; drafts are never served; variables such as {{company}} are filled at fetch time with openlit.get_prompt(); and download counts show which versions apps are fetching. Walkthrough: https://openlit.io/blogs/prompt-versioning-with-prompt-hub. Docs: https://docs.openlit.io/latest/openlit/prompts-experiments/prompt-hub/overview.