← Murat Çetin Essay 04 · Feb 2026 · 4 min read

A Design System is Not a UI Kit: Building Systems That Enforce Their Own Rules

A design system is a control system. It exists to make incorrect UI impossible to build. Measuring design value in decisions removed from the table eliminates operational risk before runtime.

The False Metric of Component Volume

Publishing dozens of unconstrained button variants or permissive layout parameters expands the surface area for UI regressions. Every optional margin property and arbitrary override invites developer subjectivity and long-term maintenance debt.

In mission-critical enterprise platforms, delivering permutations is an architectural liability. Visual discipline requires strict constraints.

“Design value is measured in decisions removed from the table, not components delivered. A design system makes failure modes impossible to build rather than policing pixels after the fact.”

The Hard-Deny Invariant Specification

A resilient design system operates as an enforceable control mechanism. Boundaries are declared as non-negotiable acceptance criteria:

System Acceptance Criteria: Hard Deny Architectural Invariants
[HARD DENY SPECIFICATION]
1. Typography Invariant:
   - Font weights are strictly BINARY: 400 (Regular) and 600 (Semi-bold).
   - Weights 500 (Medium) and 700 (Bold) are PROHIBITED across all viewports.
2. Styling Invariants:
   - ZERO raw hex codes outside :root / core.json tokens.
   - ZERO !important rules in production CSS.
   - ZERO linear or radial gradients (flat surfaces only).
   - ZERO fill-weight icons (Phosphor line weight only).
3. Overlay & Navigation Invariants:
   - Double-overlays (modal on drawer, modal on modal) are PROHIBITED.
   - Entities containing 1-5 fields: 520px centered modal.
   - Entities containing 6-15 fields: 592px slide-over drawer.
   - Entities exceeding 15 fields MUST promote to Level 3 Canvas Sub-Pages.
   - Level 1 & Level 2 views MUST use back button links; breadcrumbs reserved for Level 4+.

Compile-Time Proof: AST Invariant Enforcement

Documentation does not prevent architectural entropy; static analysis does. To enforce these Hard-Deny invariants before runtime, the design platform deploys custom ESLint Abstract Syntax Tree (AST) rules in the continuous integration pipeline:

Static Analysis: ESLint AST Rule (agito/enforce-design-invariants)
// eslint-plugin-agito/rules/enforce-design-invariants.js
module.exports = {
  meta: {
    type: 'problem',
    docs: {
      description: 'Enforce binary typography weights and prohibit raw visual overrides outside DTCG tokens',
      category: 'Design System Invariants'
    },
    schema: []
  },
  create(context) {
    const ALLOWED_WEIGHTS = new Set([400, 600, '400', '600']);
    const HEX_REGEX = /^#(?:[0-9a-fA-F]{3}){1,2}$/;

    return {
      JSXAttribute(node) {
        // Invariant 01: Enforce Binary Font-Weights (Hard-Deny 500/700)
        if (node.name.name === 'fontWeight' || node.name.name === 'weight') {
          const val = node.value?.value || node.value?.expression?.value;
          if (val && !ALLOWED_WEIGHTS.has(val)) {
            context.report({
              node,
              message: `[Hard-Deny Invariant]: Font weight '${val}' is prohibited. Only 400 (Regular) and 600 (Semi-bold) are allowed.`
            });
          }
        }

        // Invariant 02: Prohibit Raw Hex Overrides in JSX Style Props
        if (node.name.name === 'style' && node.value?.expression?.type === 'ObjectExpression') {
          node.value.expression.properties.forEach(prop => {
            const val = prop.value?.value;
            if (typeof val === 'string' && HEX_REGEX.test(val)) {
              context.report({
                node: prop,
                message: `[Hard-Deny Invariant]: Raw hex color '${val}' is prohibited in runtime code. Bind to semantic DTCG token (core.json).`
              });
            }
          });
        }
      }
    };
  }
};

Enforcement operates across two coordinated layers: ESLint AST rules for JSX/TSX component properties, and Stylelint checks across CSS and SCSS modules to catch raw color declarations and unauthorized z-index layering.

In an engineering organization of 250+ developers, absolute rules require realistic governance. When legacy migrations or external integrations demand a temporary exception, arbitrary inline linter suppressions (such as eslint-disable) are barred. Exceptions require a declared data-design-exception="DEBT-TICKET-ID" attribute with a mandatory architectural expiration date tracked in the quarterly debt backlog.

Business Invariant Enforcement: Underwriting Authority & Endorsement Gating

Systemic control extends beyond visual styling directly into core business rules:

1. Underwriting Authority Delegation (Three Insurance): In commercial underwriting for Berkshire Hathaway, external brokers operate within strict schedule rating bounds (maximum 15% discretionary credit). Rather than relying on backend validation errors after submission, the design system enforces authority boundaries at the UI layer, disabling unauthorized inputs and routing cases to an Underwriting Referral Worklist automatically.

2. Mid-Term Endorsement Mode Defense: Modifying an in-force commercial policy mid-term introduces accidental alteration risk if all modules remain open. The platform enforces an Endorsement Mode: only the requested module becomes editable, while all other policy sections remain locked with diff badges.

Operational Return of Control

Treating design as an enforceable control system yields concrete results:

1. Zero Visual QA Overhead: Because styling errors, unauthorized margins, and illegal font weights fail pre-commit automated checks, designers stop policing pixels in sprint reviews.

2. Prevention of Operational Leakage: Embedding authority bounds and compliance masking into component contracts eliminates multimillion-dollar underwriting errors before deployment.