Linting a System Prompt: Conflicts, Vague Rules and Broken Variables
Why system prompts decay over time, the common faults that make models act unpredictably, and how to review and fix a prompt before it reaches production.

A system prompt starts life as a tidy paragraph. Then a customer complains that answers are too long, so someone adds be concise. Another complains that answers lack detail, so someone else adds give comprehensive explanations. A template variable is added in a different syntax, a rule is pasted twice, and a year later the prompt contradicts itself in five places. The model is not being random; it is choosing between rules you gave it.
The faults that cause trouble
Conflicting rules are the most expensive fault, because the symptom looks like flaky behaviour. Short versus detailed, formal versus casual, Markdown versus plain text, JSON only versus explain your reasoning, ask clarifying questions versus never ask questions: each pair forces the model to pick, and it may pick differently on similar inputs.
Vague words come next. Etc, relevant information, as needed, try to, good quality and concise without a number all leave the decision to the model. If a rule matters, say exactly what you want: under 100 words, three bullet points, list every fee.
A missing output format is the third. If the prompt never says what an answer looks like, length and layout drift from call to call.
Template problems cause the strangest bugs. If your code fills double-brace variables and the prompt also contains a single-brace placeholder, that placeholder reaches the model as literal text. In Python format strings and many LangChain templates, a JSON example with plain braces breaks formatting altogether unless the braces are doubled.
Finally there is safety. User text pasted between your instructions, without tags or a code block around it, is harder for the model to tell apart from your rules, which makes prompt injection easier. And anything secret in a system prompt should be assumed readable by users.
Linting a prompt step by step
Paste your prompt into the System Prompt Linter and choose the variable syntax your application uses. The report groups findings into structure, clarity, consistency, variables, safety and length, each with a line number and a suggested fix, and a line view highlights where the problems sit.
Fix errors first: unfilled placeholders such as [INSERT NAME], unbalanced braces and unescaped JSON. Then deal with warnings, especially conflicts. Read both quoted lines before changing anything; sometimes both rules are right and only the condition is missing, such as be brief in chat and detailed in email summaries.
Clarity notices are cheap wins. Replace each vague phrase with a concrete rule or an example. Cut shouted capitals down to one or two real limits and give the reason; current models follow instructions closely and over-apply emphasised rules. Rewrite a few don'ts as dos, because a positive instruction gives the model something to aim at.
Test the filled prompt
The fill tab lists every variable it found and lets you type sample values, then shows the exact text the model will receive. It is the quickest way to catch a variable that never gets filled or user input that lands outside its tags.
A score is not a test
The linter's score falls by a fixed amount for each error, warning and notice. It tells you how much cleanup is left, not how good the answers will be. Some notices are matters of taste, and you can ignore them. After cleaning a prompt, run it against real inputs and compare answers with the old version. Linting removes the obvious causes of inconsistency; testing shows whether the prompt does its job.
A good habit is to lint the prompt in every pull request that touches it. The Markdown report fits neatly into a review comment, and a reviewer can see at a glance whether a change added a new conflict or a stray placeholder before it reaches users.



