{"slug": "hardcoding-llm-prompts-is-fine-until-it-isn-t-here-s-what-we-built-instead", "title": "Hardcoding LLM prompts is fine until it isn't. Here's what we built instead.", "summary": "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.", "body_md": "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.\n\nThe prompt had changed three weeks earlier. Nobody could remember why. Git blame pointed to a one-line edit inside a 200-line `SYSTEM_PROMPT`\n\nconstant. No PR description, no diff worth reading.\n\nThat's when I knew I'd been writing prompts wrong for the last two years.\n\nA typical system prompt for anything useful crams five things into one string:\n\n```\nYou are a friendly support agent for Acme. Use this knowledge: {{kb}}.\nFollow escalation rules. Never share internal ticket IDs. Reply in plain\ntext, two to four paragraphs.\n```\n\nThat'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.\n\nWe wouldn't write code this way. So why are prompts always a 200-line `const`\n\nsomewhere in `lib/`\n\n?\n\n[PromptOT](https://www.promptot.com) is a prompt management platform. The core idea is small: typed blocks instead of flat strings.\n\nYou 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.\n\n```\nBlock 1 — role:          \"You are a support agent for Acme...\"\nBlock 2 — context:       \"Knowledge base: {{kb}}...\"\nBlock 3 — instructions:  \"1. Acknowledge the issue...\"\nBlock 4 — guardrails:    \"Never share internal ticket IDs...\"\nBlock 5 — output_format: \"Plain text, two to four paragraphs...\"\n```\n\nNow 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.\n\nApps 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:\n\n```\ncurl https://api.promptot.com/api/v1/prompts/support-bot/compiled \\\n  -H \"Authorization: Bearer pk_live_...\" \\\n  -d '{\"customer_name\": \"Maya\", \"kb\": \"...\"}'\n```\n\nThat's it. No SDK to install. No prompt strings sitting in your codebase. Updating a prompt does not require a deploy.\n\nPromptOT 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:\n\nRead my support-bot prompt and add a guardrail about not promising refund timelines.\n\nClaude calls `get_prompt`\n\n, drafts the change, and calls `save_draft_version`\n\n. I review the diff and publish. The whole loop happens in chat. No tab-switching, no dashboard.\n\nclaude.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.\n\nFree tier covers most side projects — 3 projects, 5 prompts each, 1,000 API calls a month, MCP included. No credit card.\n\nIf your LLM prompts currently live as constants in a TypeScript file with a TODO from six months ago, you'll know what this fixes.\n\nWhat's the worst prompt bug you've shipped to production? Curious which patterns repeat.", "url": "https://wpnews.pro/news/hardcoding-llm-prompts-is-fine-until-it-isn-t-here-s-what-we-built-instead", "canonical_source": "https://dev.to/promptot/hardcoding-llm-prompts-is-fine-until-it-isnt-heres-what-we-built-instead-3g7b", "published_at": "2026-06-30 06:53:54+00:00", "updated_at": "2026-06-30 07:19:21.971647+00:00", "lang": "en", "topics": ["developer-tools", "large-language-models", "generative-ai", "ai-agents"], "entities": ["PromptOT", "Claude Desktop", "Cursor", "Codex CLI", "Windsurf", "Zed"], "alternates": {"html": "https://wpnews.pro/news/hardcoding-llm-prompts-is-fine-until-it-isn-t-here-s-what-we-built-instead", "markdown": "https://wpnews.pro/news/hardcoding-llm-prompts-is-fine-until-it-isn-t-here-s-what-we-built-instead.md", "text": "https://wpnews.pro/news/hardcoding-llm-prompts-is-fine-until-it-isn-t-here-s-what-we-built-instead.txt", "jsonld": "https://wpnews.pro/news/hardcoding-llm-prompts-is-fine-until-it-isn-t-here-s-what-we-built-instead.jsonld"}}