Most engineering teams that write design principles do it once. Somebody at the founding of the codebase (or somebody who joined and cared enough) sits down and writes a document. "We prefer X to Y." "Avoid Z." "Always do W." The doc goes into the repo. Nobody looks at it again unless something goes very wrong.
That's not a principles doc. That's decoration.
A useful principles doc is one that gets consulted, applied, and (this is the part most teams miss) revised when the code teaches you a rule was wrong. Treat the doc as a working hypothesis about how to build good software, not as a founding charter. The discipline isn't "follow the rules." The discipline is "notice when the rules are wrong and amend them."
Here's a story about that happening for real.
What happened
I'd just shipped a feature phase. A user-facing modal that added tone, audience, and content-source controls to a generation workflow. It worked. It shipped. Tests passed.
Then, as a routine follow-up, I asked Claude to evaluate the change against docs/DESIGN-PRINCIPLES.md. No specific concern. Just a check.
Claude came back with three violations:
- The design used a modal, but the principles doc said "Heavy modals. Prefer inline editing, slide-outs, and progressive disclosure over dialog boxes."
- The Generate buttons had Sparkles icons on them, but the principles doc said "No Sparkles icons on every button."
- The form had custom radio markup instead of using the shared
RadioCardcomponent.
I looked at the modal violation and pushed back. The modal call-out was wrong. Modals ARE the right choice for the generation forms. They're multi-input, they need focused attention, and progressive disclosure would fragment the mental model the user needs. The principle as written was too strict.
So I amended the principle.
The doc used to say:
Heavy modals. Prefer inline editing, slide-outs, and progressive disclosure over dialog boxes.
After the amendment, it says:
Heavy modals for incidental UX. Modals are fine, sometimes preferred, for multi-input forms and bounded choices where a focused workspace helps the user concentrate. The anti-pattern is reaching for a modal when an inline edit, slide-out, or progressive disclosure would do the same job with less interruption. Evaluate per surface.
Then I fixed the other two violations. The sparkles icons came off eighteen buttons across the app. The custom radio markup got replaced with RadioCard in the two modals that had it. The whole thing shipped as one PR: "Chore: Design-principles sweep." The doc edit and the code cleanup lived together in the same diff.
Three things worth noticing
The principle vs. the application. Most "follow the rules" frameworks treat the rules as fixed and the code as the variable. The amendment framing inverts this. Code is the empirical evidence. Rules are the hypothesis. When they conflict, both are candidates for change. The judgment is figuring out which.
In this case: the modal rule was too strict; the sparkles rule was right. The judgment was distinguishing which was which, and that judgment is the thing you can't fully delegate.
AI as the consistent applier. The principles doc had been aspirational before. I'd written it once. I'd applied it sporadically. Nobody was mechanically checking every commit against it.
The sweep happened because I asked Claude to evaluate against the doc, and Claude actually did the evaluation. Surfaced every violation, not just the dramatic ones. The eighteen-button sparkles cleanup would never have happened in a one-off code review, nobody has the attention budget to hunt for eighteen small violations of an old rule. But an AI that can mechanically scan the codebase for the pattern the rule describes will find all of them in seconds.
That's a real shift. A principles doc that can't be applied consistently is decoration. A principles doc that an AI can apply consistently becomes load-bearing.
The amendment as a designed action. Updating the doc wasn't a side effect of the sweep. It was the first action. I changed the rule, then fixed the code to match the new rule. The PR description called this out explicitly. That made the doc edit visible, intentional, and reviewable, and it created an artifact I can point to later when someone asks why the rule reads the way it does.
Compare that to the more common patterns: the rule slowly drifts and nobody notices. Or the rule is quietly ignored until it fades from memory. Or someone comes along years later and deletes the rule entirely because "we don't actually do this." All of those are the same failure. The principle went away without a decision being made about it.
An explicit amendment is honest. It says: here's what we used to believe, here's what we believe now, and here's what forced the update. That documentation is worth having.
This isn't the first time
Looking back at the code and my working notes, I can see the codification-then-amendment pattern showing up over and over. A few examples from the last year of my own work:
The PR-required workflow. I established a rule that all changes go through PR review. Later, when dependabot PRs started piling up, I refined the rule with a specific carve-out for auto-mergeable dependency updates. The refinement was driven by watching what I was actually doing (auto-merging dependabot PRs) diverge from what the rule said (all changes go through review). The rule became: "all substantive changes go through review; dependency-only updates from dependabot may auto-merge under specific conditions." The refinement made the rule accurately describe what I was actually doing, and closed the honest-versus-actual gap.
Docker for all Rails commands. I established a rule after a local-versus-Docker database confusion bit me. The initial rule was blunt: "always run Rails commands through Docker." A few months later, a specific class of commands (Rails console for read-only debugging) turned out to be almost always safer to run locally against a snapshot of the database. The rule got refined: "run migrations and destructive commands through Docker; read-only inspection can happen locally." Same shape: the code taught me the rule was too broad, and the rule got tightened to fit reality.
CI checkbox verbatim strings. I established a rule after the auto-check workflow stopped matching non-canonical strings in PR descriptions. The original rule was: "always use the standard PR template." Turned out this was too strict, some PRs had legitimate reasons to deviate from the template. The rule got refined to: "always use the standard PR template for feature and refactor PRs; small chore PRs may use a shorter form as long as the continuous integration checkbox strings match verbatim." The rule got more specific and also more precise.
Every user-facing string goes through i18n. I established this early and have applied it consistently since. Rare example of a principle that hasn't needed amendment. Not every principle is a hypothesis. Some are just right the first time. But the ones that are stay stable, and the ones that aren't reveal themselves through the code sooner than you'd expect.
Shared partials over helpers for view logic. I established a rule to try shared partials in the view layer, with a built-in revision trigger: "watch for mess; refactor to helpers or ViewComponent if the assignment preambles at the top of the partial exceed six lines."
That last one is the most interesting. It's a principle that includes its own deprecation condition. The rule says: we're doing this for now; here's when to stop. The "for now" framing is honest about uncertainty. It also removes the amendment cost, the rule tells you exactly when to change it. When the deprecation condition triggers, you don't need to argue about whether to change the rule. You just apply the rule's own instructions and change it.
I'd argue the best principles include their own revision triggers. Not all of them can, some rules are genuinely stable, but when they can, they should. It's a cheap way to make the amendment discipline explicit rather than aspirational.
The workflow for running an amendment session
The specific workflow I use for running a principles-sweep amendment session:
Step 1: Pick a scope. Either a specific feature that just shipped, a specific pull request, or the whole codebase. Feature-scoped sweeps are the most common, after a phase lands, sweep against the design principles doc.
Step 2: Ask the AI to evaluate against the doc. The prompt looks like: "Read docs/DESIGN-PRINCIPLES.md. Then scan <scope> and identify every place where the code doesn't match the principles. For each violation, give me the principle it violates, the specific location in the code, and a short description of the mismatch."
Step 3: Read the findings. Every finding is a candidate. Some will be genuine violations (the code is wrong). Some will be false positives (the code is right; the principle doesn't apply here). Some will reveal that the principle is wrong.
Step 4: For each finding, choose one of three actions. Either (a) fix the code to match the principle, (b) update the principle to match reality, or (c) accept the exception and add a note to the principle about when it applies.
Step 5: Ship the amendments and fixes together. Every doc edit lives in the same PR as the code cleanup it enables. The PR description explains what was amended and why.
Step 6: Add tests where possible. If a principle is amenable to automated enforcement (linter rules, style guides, structural tests), add that enforcement now. The principle graduates from aspirational to enforced.
Step 7: Note what didn't get amended. If a principle survived a sweep without amendment, that's evidence for the principle. Note it. Future sweeps have less reason to revisit it.
This workflow takes about two hours for a feature-scoped sweep, longer for a whole-codebase pass. The two-hour cost is small enough that I run it after every substantial feature, not just when something goes wrong.
Why AI-paired development matters here
Two mechanisms.
The application cost drops. Applying a small rule consistently across a large codebase used to be a big-batch task that only happened in dedicated cleanup sprints. When the AI can do the sweep, the bar for "is this rule worth having" drops, which means more rules become enforceable, which means more candidates for the codification step. The doc grows, and it grows in a way that's actually useful because every rule in it can be checked.
The neutrality helps. When I ask Claude to evaluate the code against the doc, Claude doesn't care about my ego. It'll point out the violation without sugar-coating. I get to decide whether the rule was wrong or the code was wrong. That's a healthier split of responsibilities than the one where the person who wrote the rule also gets to look the other way about violations.
Neither of those mechanisms is transformative on its own. Together they change the character of what a principles doc can be for.
Anti-patterns from teams that get this wrong
The write-once doc. Somebody wrote the principles doc two years ago. Nobody has touched it since. It has rules that nobody follows and doesn't have rules for practices everybody does. This is the failure mode where the doc is decoration.
The doc as post-facto justification. The team makes a decision, then writes it up as a principle. Sometimes this is fine, the team is codifying a real emergent practice. Sometimes it's rationalization, the team made a bad decision and is protecting it by writing it into the rules. The difference is whether the principle would survive if the code disagreed with it. If you'd amend the principle when the code teaches you it was wrong, you're doing it right. If you'd force the code to match the principle no matter what, you're rationalizing.
The amendment as apology. Some teams treat amendments as failures, "we couldn't hold to the original rule." That's the wrong frame. An amendment is evidence the team is paying attention. The team that never amends its principles is the team that's either not consulting them or lying to itself about following them.
The doc as competition. Some teams treat the principles doc as a place to write down rules for other people to follow. This dies fast. Principles docs work when the people who write them are also the people who apply them. Otherwise it becomes a rule-book written by managers for developers, which never lands.
The rule that predicts too much. Some principles try to cover every possible future case. "Never do X unless one of these seven conditions applies, in which case follow this specific procedure." These read as legislation, not principles. They're too long to remember, too specific to apply beyond their exact conditions, and too brittle when reality doesn't match the enumerated conditions. Better to write a shorter principle with a broader intent, and let judgment fill in the specifics.
Objections worth naming
"Isn't this just refactoring?" No. Refactoring changes code without changing behavior. Amendment changes the specification. The two often happen in the same PR, but they're conceptually different. Naming the distinction explicitly keeps you honest about what you're actually doing.
"How do you know when the principle is wrong versus when the code is wrong?" The same way you know in any design question. Judgment trained on enough cases. The modal rule got amended because the reasoning that had originally supported it (avoid interruption) turned out not to apply to the modals in question (they're the primary work surface, not an interruption). The sparkles rule stayed because the reasoning still applied. You get better at this distinction the more times you make it.
"This depends on having a principles doc in the first place." Yes. The prerequisite is real. If you don't have a doc, start one, even small. Ten bullet points is fine. The doc grows through the codification-amendment cycle, and it's easier to grow it than to start it from cold.
"What if my team doesn't have anyone who wants to maintain this?" Then the doc will decay. Principles docs need an owner. The owner doesn't need to be the only person allowed to amend the doc, plural ownership is healthy, but there does need to be at least one person who feels responsible for whether the doc still describes what the team is doing. If nobody feels that responsibility, the doc is going to drift.
The bigger point
Design principles that stay static are wrong in a subtle way. They stop matching what the code is actually doing, or what the team actually believes, or what the domain actually needs. They stop being consulted. They become the kind of document you inherit from a founder who left, honored in the breach.
Living principles, ones that get amended when the code teaches you something new, are different. They stay useful because they stay accurate. The doc reflects the team's actual working beliefs. The gap between the doc and the code is small enough that the doc is worth reading before you make a decision.
Getting there requires two things. One: the discipline to consult the doc regularly, which AI-assisted development makes much cheaper than it used to be. Two: the willingness to amend the doc when the consultation reveals a mismatch. That's the harder half. It requires the humility to say "the rule I wrote was wrong" out loud, in a PR, where the next person will see it.
Do both, and the principles doc becomes something you actually want to open. Skip either, and it's back to decoration.
The team that treats its principles as a living document, one that gets amended, one that includes deprecation conditions, one that gets checked against the code regularly, is the team whose code and principles evolve together. That's the health signal. That's what it looks like when the doc is doing its job.
If you're building a codebase you want to still be legible in five years, principles docs are part of the answer, and they're the kind of tooling Rock Agile pays a lot of attention to. If you want to talk through how to build one that stays alive, get in touch.