The Hidden System Behind Cavities, Beautiful Websites, and Preventable Decay

john ke

Hatched by john ke

Sep 02, 2026

10 min read

93%

0

What if a cavity and a broken website are the same kind of problem?

One appears in a tooth. The other appears in a landing page whose pricing section suddenly feels like it belongs to a different company. One looks biological. The other looks visual. Yet both can be understood as local failures produced by an invisible system.

A cavity is not created in the instant someone notices it. It is the visible endpoint of repeated conditions: microbial activity, available sugars, acidity, saliva, time, and insufficient repair. Likewise, a design system rarely collapses in one dramatic moment. It fragments through dozens of small decisions: a slightly different type scale, an improvised border, a new animation timing, a page generated without the original visual rules.

The deeper lesson is not that websites should resemble teeth. It is that surface quality is often a delayed report on system health. By the time the defect is visible, the important decisions have already happened upstream.

The defect is late, but the cause is early

A useful mistake is to treat visible problems as isolated events. You see a cavity and ask how to fill it. You see an ugly page and ask how to redesign it. Those responses may be necessary, but they are incomplete. They repair the evidence without necessarily changing the conditions that produced it.

Dental health makes the timing obvious. A cavity is not simply a hole. It is the result of an environment in which damage repeatedly outpaces restoration. Acid attacks the enamel. Saliva attempts to remineralize it. The balance shifts over time. The hole becomes noticeable only after the underlying process has been running for a while.

The same pattern appears in creative and technical work. Imagine an AI assisted website project that begins with a compelling hero section. It has a black background, large expressive typography, a translucent glass navigation bar, carefully staged entrance animations, and a cinematic video. The result feels coherent because many choices reinforce one another.

Then someone asks for a testimonials page. A prompt produces a competent layout, but the type is too loose, the buttons are too bright, the animation arrives at the wrong moment, and the spacing rhythm has changed. A dashboard follows. Its cards use a different radius. A pricing page introduces a new gray. The site still contains attractive pieces, but the whole has begun to decay.

No single decision caused the failure. Each decision was locally reasonable. The problem is that the project had no durable mechanism for preserving its identity.

A visible defect is often a lagging indicator. The real design problem happened before the defect appeared.

This distinction changes how we work. Instead of asking only, “How do I fix this page?” we ask, “What missing rule made this page easy to get wrong?”

Prompt quality is not system quality

The modern design workflow creates a tempting illusion. If a model can generate a beautiful section from a detailed prompt, it seems that the prompt contains the design. Usually, it contains only a temporary performance of the design.

A prompt can specify a hero: full screen video, white type, dark palette, glass panel, scroll driven motion. But a site is not a hero. It is a sequence of decisions made under variation. The real test begins when the content changes, when the viewport narrows, when another designer joins, or when a new page is requested three weeks later.

This is the difference between an example and a generative system.

An example says: make this page look like this.

A generative system says: these are the rules that should continue producing the same character when the page changes.

In software, the distinction is familiar. A screenshot is not a codebase. A successful output is not an architecture. In biology, one healthy tooth does not prove that the whole oral environment is healthy. In both cases, the question is whether the conditions can reproduce health, not whether health appeared once.

A DESIGN.md file matters for precisely this reason. Its value is not that it gives an AI more words to read. Its value is that it externalizes the hidden constraints that would otherwise remain in the original designer’s head.

It can define the font, palette, spacing rhythm, type scale, button hierarchy, animation timeline, glass surface treatment, and composition rules. More importantly, it can state what those elements are for. Solid white is reserved for primary actions because attention should remain scarce. Floating surfaces use translucent glass because they must feel layered over the environment. Display type uses tight tracking because the brand should feel compressed and dramatic.

These rules transform taste into infrastructure.

Without them, every new prompt forces a model or teammate to reconstruct the aesthetic from memory. Reconstruction introduces drift. Drift accumulates. Accumulated drift eventually becomes a visible inconsistency that someone labels a redesign problem.

Design systems are preventive health, not decorative consistency

Most people think of design systems as collections of reusable components. Buttons, cards, navigation bars, and form fields are important, but they are only the anatomy of the system. The deeper function is environmental: a design system regulates the conditions under which decisions are made.

Consider two teams building the same pricing page.

The first team has no explicit system. One person chooses a 16 pixel gap because it feels balanced. Another uses 24 pixels because the page needs more air. A third picks a serif heading because the section feels editorial. Each choice may work in isolation. Together, they create a site whose visual language changes from room to room.

The second team has a compact set of rules. Layout padding follows a known rhythm. Display type uses a defined scale. Secondary actions use a glass treatment. Animation follows a sequence: heading first, supporting copy next, actions after that. The team still makes judgments, but judgment operates inside a stable environment.

This does not eliminate creativity. It relocates creativity. Instead of repeatedly deciding whether every surface should have a border, the designer spends attention on the message, the interaction, and the unusual opportunity.

That is what prevention does in any complex system. It reduces the number of situations in which repair is required.

A useful model is:

System health = preservation mechanisms minus accumulated drift

Preservation mechanisms include documentation, tokens, reusable components, visual tests, naming conventions, and review rituals. Drift includes one off overrides, copied code, unexamined defaults, inconsistent prompts, and exceptions that never get removed.

The model is not mathematical in a strict sense, but it is operationally useful. A team can ask:

  1. Which rules are currently preserved automatically?
  2. Which rules must be remembered manually?
  3. Where does drift enter the workflow?
  4. How long does it take to detect a violation?
  5. Does fixing one violation prevent the next one?

The last question is the crucial one. If a designer corrects a page but does not update the system, the correction remains a one time intervention. If the rule is captured and made reusable, the correction compounds.

The best abstractions are executable memory

A system document is often mistaken for administrative overhead. In reality, it can function as executable memory: a durable record of decisions that can guide future creation.

Human memory is contextual and expensive. A designer may remember that a brand uses muted text, but not whether the opacity is 60 percent or 70 percent. They may remember that animations feel slow, but not that the heading begins at 200 milliseconds and each character follows at a fixed interval. They may know that a translucent panel should float, but not which combination of blur, border, blend mode, and shadow creates the effect.

When these details remain implicit, every new page becomes an act of archaeology. The builder studies old work, guesses at the principles, and produces a plausible imitation. An explicit file turns archaeology into application.

The same principle applies to reusable components. An AnimatedHeading component does more than save code. It preserves a particular theory of emphasis: words do not merely appear; they arrive in sequence, with timing that gives the reader’s attention an order. A FadeIn component preserves another theory: supporting content should enter without competing with the primary message.

The code carries design reasoning forward.

This is why the most valuable abstraction is not always the most generic one. A completely generic animation utility may be reusable, but it may preserve little identity. A narrowly defined component can be more powerful if it encodes a meaningful relationship between content and attention.

The goal is not to abstract everything. It is to abstract what should remain stable.

A good system therefore has three layers:

  1. Principles: what the experience is trying to feel and communicate.
  2. Rules: the concrete constraints that produce that feeling.
  3. Primitives: the components, tokens, and files that make the rules easy to apply.

If the principles are missing, rules become arbitrary. If the rules are missing, primitives become a random kit. If the primitives are missing, rules remain difficult to follow under pressure.

Diagnose upstream, then design for repair

The analogy to health becomes most useful when it changes behavior. We should not use it to moralize about individual discipline. Cavities are influenced by biology, access to care, diet, saliva, medication, and many other factors. Likewise, design inconsistency is not simply a failure of a careless person. It can emerge from rushed timelines, unclear ownership, changing requirements, weak tooling, or a process that rewards novelty over continuity.

The practical question is therefore not, “Who caused the defect?” It is, “Which conditions made the defect likely, and how can the system make the healthy choice easier?”

For a website, upstream diagnosis might reveal that:

  1. The visual language exists only in screenshots.
  2. The AI receives page specific prompts but no durable context.
  3. Components are copied instead of imported.
  4. Motion behavior is described vaguely, using words like smooth or engaging.
  5. There is no comparison page showing how the system behaves across contexts.
  6. Exceptions are added faster than they are reviewed.

Each finding points toward a different intervention. Screenshots need to become rules. Prompts need a shared design context. Repeated patterns need components. Vague motion needs timelines and interaction states. Exceptions need an expiration date.

A particularly effective practice is to create a drift budget. Before building a new page, decide which elements may vary and which may not.

Content, imagery, and narrative emphasis may vary widely. Typography, spacing rhythm, surface language, action hierarchy, and motion principles may have a narrower range. This makes variation intentional rather than accidental.

You can also create a five minute system check before shipping:

  1. Does the page use the approved type families and scale?
  2. Are primary and secondary actions visually differentiated?
  3. Do surfaces follow the established material language?
  4. Does motion reveal hierarchy rather than merely add activity?
  5. Does the page still feel like the same product with the content removed?

That final test is surprisingly powerful. Strip away the words and images. Look only at the rhythm of space, type, contrast, layering, and movement. If the skeleton feels like a different organism, the system has already begun to fail.

Key Takeaways

  1. Treat visible inconsistency as evidence, not the entire problem. When a page feels wrong, investigate the missing rule or weak workflow that allowed it.

  2. Separate examples from systems. A beautiful hero demonstrates a possibility. A design document, component library, and token set make that possibility repeatable.

  3. Externalize tacit knowledge. Record typography, spacing, color roles, material treatments, animation timing, and composition principles in a portable format that both people and tools can use.

  4. Abstract stable reasoning, not every visual detail. Reusable components should preserve meaningful decisions about hierarchy, attention, and interaction, rather than merely reduce code duplication.

  5. Set a drift budget. Decide what is allowed to change from page to page, and protect the elements that carry the identity of the whole experience.

The real product is the environment that produces the output

A cavity teaches an uncomfortable lesson: damage can be gradual, distributed, and easy to ignore until it becomes expensive. An inconsistent website teaches the same lesson in a different medium. The polished surface is not the system. It is the system’s current report.

This reframes the promise of AI assisted design. The breakthrough is not that a model can produce a striking page from a clever prompt. That is the equivalent of producing one healthy tooth. The breakthrough comes when a small set of encoded principles can generate many pages while preserving identity, accessibility, hierarchy, and intent.

The future advantage will belong less to people who can ask for impressive outputs and more to people who can build healthy environments for output. They will know which decisions deserve freedom, which deserve constraints, and how to turn a one time success into a repeatable condition.

Do not optimize only for the beauty of the next artifact. Optimize for the health of the system that will produce the next hundred.

That is the difference between patching decay and preventing it. It is also the difference between generating pages and building a living design language.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣