All posts
    AI

    Your AI Prompts Are Undocumented Code

    The prompts running your AI features are business logic with no version control, no tests, and no owner. That is a problem you will eventually pay for.

    Somewhere in your codebase there's a string. It's forty lines long, it lives in a config file or hardcoded in a function, and it quietly decides how your AI feature behaves. Nobody wrote a test for it. Nobody reviewed the last change to it. Half the team doesn't even know it exists.

    That string is your business logic now. Treat it like one of your sticky notes and it will eventually bite you.

    Prompts are not copywriting

    Early on, prompts feel like content. Someone tweaks the wording, the output looks better, they ship it. That instinct is understandable and also wrong. A prompt that tells your support bot how to handle a refund request, or your sales assistant how to qualify a lead, is a decision tree written in English instead of code. It has branches, edge cases, and failure modes, same as any function. The difference is that most teams never give it the scrutiny they'd give a function.

    We've watched clients change a single sentence in a system prompt to fix one complaint, only to have it quietly break a completely unrelated behavior three weeks later. Nobody noticed until a customer did. There was no changelog, no diff, no way to know which version was live when the complaint came in.

    What actually needs to happen

    Prompts need the same discipline as any other production code, just adapted to what they are:

    • Version control, for real. Not a Notion doc someone updates by hand. The prompt lives in the repo, changes go through a pull request, and you can see exactly what changed and when.
    • Regression tests. A small set of inputs with expected behavior, run before every prompt change ships. This won't catch everything an LLM might do, but it catches the obvious regressions, which are the ones that actually happen.
    • An owner. Someone whose job includes knowing what the prompt says and why. Not "whoever touched it last."
    • Staged rollout. Change the prompt in staging first. Watch it against real-shaped inputs before it touches customers.

    None of this is exotic. It's the same rigor you already apply to a payment flow or an auth check. The only reason prompts get skipped is that they don't look like code, they look like a paragraph you typed into a text box.

    The cost of skipping it

    The failure mode isn't dramatic. It's not a headline-worthy AI disaster. It's smaller and more corrosive: a support bot that starts giving wrong return windows, a lead-qualification prompt that quietly starts disqualifying the wrong people, an internal tool whose behavior nobody can explain when a manager asks why it did what it did. Each incident is small. They compound.

    If your product has an AI feature that customers actually interact with, the prompt behind it deserves the same engineering discipline as everything else you ship. That's true whether you built it in-house or it came out of a pilot that never got a second look.

    This is exactly the kind of gap we find when we audit a product for a client, the AI layer that got bolted on fast and never revisited. If you're weighing whether to build something new with this baked in from day one, our free MVP offer is a low-risk way to start it right. And if you already have a system that needs a second set of eyes, get in touch and we'll take a look.

    Want to build something like this?

    Cedrix ships production-grade software fast — and even offers a free7-day MVP so you can see your idea working before you commit.