cd /news/developer-tools/hardcoding-llm-prompts-is-fine-until… · home topics developer-tools article
[ARTICLE · art-44477] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Hardcoding LLM prompts is fine until it isn't. Here's what we built instead.

PromptOT launched a prompt management platform that replaces monolithic system prompts with typed, independently versioned blocks. The platform, born from a costly production bug caused by a hardcoded prompt edit, allows teams to edit, toggle, and roll back prompt components separately via API or an MCP server integrated with AI assistants like Claude Desktop and Cursor.

read3 min views1 publishedJun 30, 2026

I had a bug last month that took most of a Saturday to find. A support bot we shipped started promising refund timelines that didn't match policy. Customer complaints, frantic Slack messages, the usual.

The prompt had changed three weeks earlier. Nobody could remember why. Git blame pointed to a one-line edit inside a 200-line SYSTEM_PROMPT

constant. No PR description, no diff worth reading.

That's when I knew I'd been writing prompts wrong for the last two years.

A typical system prompt for anything useful crams five things into one string:

You are a friendly support agent for Acme. Use this knowledge: {{kb}}.
Follow escalation rules. Never share internal ticket IDs. Reply in plain
text, two to four paragraphs.

That's a role, context, instructions, guardrails, and an output format all jammed together. When the PM wants to soften the tone, they're editing the same string an engineer uses to update the knowledge base. When security adds a guardrail, it lands inches from the response format. One bad edit and every reply ships broken.

We wouldn't write code this way. So why are prompts always a 200-line const

somewhere in lib/

?

PromptOT is a prompt management platform. The core idea is small: typed blocks instead of flat strings.

You break a prompt into pieces. Each piece has a type — role, context, instructions, guardrails, output_format, custom. Each one is independently editable, can be toggled on or off, and has its own version history. The compiler joins them into a single prompt string at delivery time.

Block 1 — role:          "You are a support agent for Acme..."
Block 2 — context:       "Knowledge base: {{kb}}..."
Block 3 — instructions:  "1. Acknowledge the issue..."
Block 4 — guardrails:    "Never share internal ticket IDs..."
Block 5 — output_format: "Plain text, two to four paragraphs..."

Now the PM edits one block. The security review adds a guardrail without touching anything else. Each save is a version. Publishing a version makes it immutable. If something breaks in prod, you roll back from the dashboard in two clicks.

Apps fetch the compiled prompt through a simple API. Production keys return the published version. Development keys return whatever draft is currently being iterated on. Variables resolve at fetch time:

curl https://api.promptot.com/api/v1/prompts/support-bot/compiled \
  -H "Authorization: Bearer pk_live_..." \
  -d '{"customer_name": "Maya", "kb": "..."}'

That's it. No SDK to install. No prompt strings sitting in your codebase. Updating a prompt does not require a deploy.

PromptOT ships an MCP server with 23 tools, so your AI assistant can manage prompts for you. I can be in Claude Desktop or Cursor and say:

Read my support-bot prompt and add a guardrail about not promising refund timelines.

Claude calls get_prompt

, drafts the change, and calls save_draft_version

. I review the diff and publish. The whole loop happens in chat. No tab-switching, no dashboard.

claude.ai and ChatGPT connect via OAuth, so they never see a raw key. Other clients (Claude Desktop, Cursor, Codex CLI, Windsurf, Zed) get a scoped install snippet from the dashboard.

Free tier covers most side projects — 3 projects, 5 prompts each, 1,000 API calls a month, MCP included. No credit card.

If your LLM prompts currently live as constants in a TypeScript file with a TODO from six months ago, you'll know what this fixes.

What's the worst prompt bug you've shipped to production? Curious which patterns repeat.

── more in #developer-tools 4 stories · sorted by recency
── more on @promptot 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/hardcoding-llm-promp…] indexed:0 read:3min 2026-06-30 ·