Skip to main content

Guardrails

Guardrails are the rules within which teams design and build: principles, policies and standards. Teams can move fast inside them, without asking for permission every time. When the rules are clear, most decisions do not need a central review at all.

Three levels of rules​

The three terms are often blurred, but they work at different levels:

LevelWhat it isChangesExample
PrincipleA fundamental belief that guides decisionsRarelyCustomer data is mastered in one system.
PolicyA mandatory rule that follows from a principleOccasionallyOnly the master system may write customer data.
StandardThe concrete way to comply with a policyWhen technology changesOther systems change customer data through the customer API, not through direct database access.

Each level makes the one above it actionable. A principle on its own is hard to check. A policy says what must be done, and a standard says how. In Architects as Lawmakers, I compare principles to a constitution and policies to laws.

Writing good guardrails​

  • Keep them few. A handful of rules that everybody knows works better than a long catalog that nobody reads.
  • Explain the rationale. Each principle and policy says why it exists and what it implies. Rules that feel arbitrary are followed only when someone checks.
  • Give them stable IDs. Decisions, exceptions and reviews refer to guardrails by ID, just like they refer to systems.
  • Link them to the decision behind them. New guardrails, and changes to existing ones, are usually decided through ADRs. Every guardrail can then point to its rationale and the alternatives that were considered.
  • Mark what is mandatory. Separate must from should. A technology radar does this for technologies with its rings: adopt, trial, assess and hold.

Exceptions​

Sometimes the right decision for a specific system conflicts with a guardrail. Then an exception, also called a waiver and in TOGAF a dispensation, is an approved step outside the guardrail:

  • it applies to a specific guardrail and a specific system
  • it is approved by the owner of the guardrail, and the approval is itself a decision
  • it has an owner and an expiry date

Exceptions are a useful signal. If the same policy keeps getting exceptions, the policy itself may need to change. See Architecture Decisions for how exceptions are decided.

Making guardrails effective​

A guardrail that exists only in a document is easy to ignore. Guardrails become effective when they are built into the way teams work:

  • Golden paths. When the platform provides templates and pipelines that already comply with the rules, following them becomes the default. See provisioning.
  • Automated checks. Architecture tests, pipeline checks and checks on observability data detect violations early and at almost no cost. See Verify in Architecture Practice with AI.
  • Context for AI tools. AI coding agents read the context they are given on every change. Guardrails provided as context are applied consistently across teams. See Architecture as context.

The best enforcement is making the right thing the easy thing. When engineers see that the rules make their work easier, compliance comes naturally.