Shared code is only worth its upkeep when it carries a decision. A wrapper that carries none is just another thing to learn.
A studio with several products faces the choice constantly: duplicate a useful pattern, or turn it into a shared abstraction.
Neither answer is always right. Copying a policy into every app invites drift. Wrapping a well-understood library without adding a decision creates a new thing to learn and maintain.
Our current repository policy draws the line at shared value. Use upstream libraries directly when they already do the job. Add a shared layer when it carries common policy, cross-app consistency, or logic several products would otherwise repeat.
Share a decision with consequences
Consider a design system. A token is more useful than a copied color because it gives a decision a single home. A shared focus treatment gives that decision a visible consequence. A mobile layout check gives it a way to fail.
The repository has shared UI surfaces for its React apps and server-rendered dashboards. Its design guidance calls for mobile-first layouts, visible focus, readable contrast and reduced-motion support. Those are documented requirements. Their existence does not prove every page already meets them.
That distinction is important when writing about a system still changing. A design rule is intent. A component is an implementation. A checked page is evidence for that page.
Leave room for the product
Consistency does not require every product to look identical. Our design approach allows an accent choice while keeping typography, spacing and interaction expectations shared.
A useful shared layer makes a good default cheap. It should not make a product-specific exception impossible. The hard part is deciding which differences carry meaning and which are accidental copies slowly drifting apart.
The wrapper test
Before adding an abstraction, we ask:
- What decision does this layer own?
- Which callers benefit from that decision being shared?
- What would go wrong if each caller made the choice separately?
- Can we test the behavior this layer adds?
If the answer is only "the name is shorter," using the original library may be clearer. If the answer is a common accessibility behavior or a policy used by multiple products, the layer has a reason to exist.
What we are still learning
Centralizing a decision increases its reach. That is the benefit and the risk. A shared fix can help several products; a shared regression can reach the same products.
We are not claiming a measured reduction in defects or development time. The current claim is narrower: our policy favors shared decisions over empty wrappers, and the repository contains shared design tokens and UI surfaces that support that approach. The next step is checking adoption and regressions across actual product pages.
Further reading
Anthropic's context engineering essay is a useful example of separating a technique from the situations where it helps. OpenAI's storage scaling account shows how engineering choices can be explained through constraints rather than a list of tools. These are editorial references, not evidence about our implementation.