How Opinionated Rules Prevent Claude Production Incidents
Every team that ships Claude into production eventually hits the same wall.
Search across all documentation pages
Every team that ships Claude into production eventually hits the same wall.
The first prototype works.
The demo goes well.
Then real traffic arrives, and the app starts doing things nobody predicted - calling the wrong tool, burning through budget, returning a refusal with no fallback, or leaking a system prompt detail it should never have said out loud.
None of these are bugs in Claude.
They are gaps in the decisions the team never made explicit.
This page lays out the mental model behind that failure pattern, and why replacing ad hoc, case-by-case prompting with a small set of opinionated, written-down rules is the single highest-leverage move a tech lead can make before shipping a Claude-powered feature.
Ad hoc prompting is what happens by default.
An engineer writes a system prompt to solve the problem in front of them.
It works, so it ships.
Six weeks later a different engineer adds a new tool call, and the original prompt's assumptions quietly break, because nothing wrote those assumptions down anywhere a second person could find them.
Opinionated rules are the alternative.
A rule is a decision that has already been made, stated plainly enough that anyone on the team can apply it without re-deriving the reasoning from scratch.
"Use Haiku for classification tasks under 500 tokens of input" is a rule.
"Use whichever model feels right for the task" is not a rule - it is an invitation for every engineer to make a different, locally-reasonable, globally-inconsistent choice.
The distinction matters because Claude, like any large language model, is extremely good at doing exactly what it is asked and only moderately good at guessing what it was supposed to be asked when the prompt is vague.
A vague prompt does not fail loudly.
It fails quietly, in ways that only show up as an aggregate pattern across thousands of production requests - slightly wrong tone here, an unnecessary tool call there, a cost spike nobody traces back to its source for weeks.
A simple analogy: ad hoc prompting is like a team with no coding style guide.
Every file looks locally reasonable, and the codebase as a whole is unreviewable, because there is no shared standard to check any individual decision against.
Opinionated rules are the style guide - not because creativity is bad, but because consistency is what makes review, debugging, and onboarding possible at all.
Production incidents in Claude apps tend to fall into a small number of recurring incident classes, and each class traces back to the absence of a specific rule:
Each of these is preventable, and each is preventable by the same mechanism: writing the decision down as a rule before the incident, not as a retrospective action item after it.
This is where decision drift comes in - the gradual divergence between what a team believes its Claude app does and what it actually does, accumulated one un-reviewed local decision at a time.
Decision drift is invisible from inside a single pull request.
Each individual change looks like a small, sensible addition.
It only becomes visible in aggregate, usually during an incident review, when someone reconstructs the timeline and realizes the system prompt has been edited by six different people with six different mental models of what "helpful" means in this context.
Rules interrupt decision drift by giving every contributor the same starting point.
# Ad hoc: every call site re-derives "which model for this task"
model = "claude-opus-4-8" if "hard" in task_description else "claude-sonnet-5"
# Rule-driven: the decision is made once, referenced everywhere
from claude_rules import select_model
model = select_model(task=task_description, latency_budget_ms=800)The rule-driven version is not smarter than the ad hoc version on any single call.
Its value is that the same decision, applied consistently across a hundred call sites, produces a system whose behavior a tech lead can actually reason about - and change deliberately, in one place, instead of hunting down every scattered variant.
Rules do not eliminate judgment - they relocate it.
Instead of every engineer exercising judgment independently, at the moment they happen to be writing a call site, judgment gets exercised once, deliberately, by whoever owns the rule, and reviewed periodically as the product and the model lineup evolve.
This has a second-order effect that matters more as a team scales: rules are auditable in a way that scattered ad hoc decisions are not.
When an incident happens, "which rule did we violate, and why" is a answerable question.
"What was the engineer thinking six months ago when they wrote this prompt" usually is not, especially once that engineer has moved to a different team.
Rules also change the failure mode of incidents from silent to loud.
A codebase with an explicit rule ("all destructive tool calls require confirmation") turns a violation into something a code reviewer or a linter can catch before merge.
A codebase with only an implicit norm turns the same violation into something that only surfaces after it has already caused damage in production.
| Approach | Strength | Weakness | Best Fit |
|---|---|---|---|
| Ad hoc, case-by-case prompting | Fast to prototype, no upfront cost | Drifts silently, unreviewable at scale, repeats mistakes | Early exploration, single-engineer prototypes |
| Opinionated, written-down rules | Reviewable, enforceable, consistent across the team | Requires upfront investment, can ossify if never revisited | Any Claude feature touching real users or real budget |
| Rules enforced only by convention | Cheap to adopt, no tooling required | Erodes the moment a new engineer joins who never learned the convention | Small, stable teams with low turnover |
| Rules enforced by lint/review gates | Catches violations before merge, scales with team size | Needs tooling investment and periodic maintenance | Teams past the first few engineers or the first production incident |
The pattern that shows up repeatedly across teams that have shipped Claude successfully is not that they never made mistakes - it is that each mistake became a rule, and the rule prevented the same mistake from recurring in a different call site written by a different engineer.
That compounding effect, more than any single clever prompt, is what separates a Claude app that gets more reliable over time from one that accumulates incidents at a constant rate no matter how much engineering effort goes into it.
Yes, slightly - and that trade-off is usually worth accepting only once the prototype is heading toward real users or real budget. Early, throwaway exploration can stay ad hoc; the moment a second engineer or real traffic touches the code, the cost of drift starts exceeding the cost of writing the rule down.
Typically the tech lead or a small rotating group, the same way a team owns its coding style guide. Ownership matters less than the rule being written down somewhere reviewable and revisited when the model lineup or the product changes.
A system prompt encodes rules for the model's behavior at inference time. The rules this page describes are broader - they cover engineering decisions like model selection, tool scoping, and budget limits that happen outside any single prompt, in code, review, and process.
An incident review where the root cause is some version of "we forgot to handle that" or "different parts of the codebase do this differently." That sentence is the signal that a decision existed only in one person's head.
Yes, and that is expected - a rule tied to a specific model's cost or latency profile needs revisiting when the model lineup changes. The fix is a periodic review cadence, not avoiding rules because they might need updating.
No. Rules reduce how often incidents happen; observability is how a team detects the incidents that happen anyway, including violations of the rules themselves. The two are complementary, not substitutes.
Yes - a rule set so large that nobody can hold it in their head stops being usable and starts being ignored, which is functionally identical to having no rules. The core-rules list in this section exists precisely to keep the enforceable set small and memorable.
Decision drift is the disease; rules are the prevention. Drift happens when the same type of decision gets made differently by different people over time. A rule fixes the decision once so it stops drifting.
Both. A written rule saves every future engineer the time of re-deriving a decision from scratch, which speeds up legitimate development just as much as it prevents mistakes - the same way a style guide speeds up code review, not just prevents bad code.
It gets revised, the same way any other piece of engineering documentation gets revised - through review, not through quietly ignoring it in one call site while leaving it technically "in force" everywhere else.
The mechanism is the same, but the urgency scales with team size and traffic. A solo engineer's "rules" can live in their head longer before drift causes damage; a team of ten cannot rely on any one person's memory.
Stack versions: Written against the Claude model lineup current as of ~June 2026 - Claude Fable 5, Claude Opus 4.8, Claude Sonnet 5 (the default), and Claude Haiku 4.5 - and the official
anthropicPython SDK (latest 0.x release). Model names, pricing, and SDK versions move quickly - verify current specifics at platform.claude.com/docs before relying on them.
Reviewed by Chris St. John·Last updated Jul 16, 2026