Skip to content

Design-in-code

Playground-driven design, specifying every state in code before the API hookup

The playground is a design artifact that lives inside the codebase, not next to it. Neither disposable prototyping nor generated design-to-code: design-in-code. The designer sees every screen in all its states (default, loading, empty, error, success) within seconds, without a backend, and produces the real code the developer will later hook up to the API. The value is not the prototype, it is the interface contract: every state is specified before the developer writes the integration.

An interface contract, not a prototype

The most frequent confusion is filing the playground with the prototyping tools. It is the opposite. A prototype exists to validate an intention and then be thrown away. The playground produces the real product code, the code the developer will hook up, not a representation that will need to be retranslated.

The distinction with design-to-code matters just as much. Design-to-code generates code from a mockup, with the classic risk of generated code drifting away from the codebase. Playground-driven design works directly inside the codebase: it is design-in-code. What the designer sees in the playground is exactly what will ship to production, because it is the real view rendering, not a copy.

What creates the value is therefore not prototyping speed, it is the contract: when the developer opens the screen to hook up the API, every state is already implemented and validated in the real view. The usual moment where they re-implement those states from a static mockup, and where the gap gets settled case by case with design, disappears.

The sovereignty rule

The method rests on one rule that protects both crafts: the designer never touches backend logic or API calls, the developer never rebuilds the visuals from scratch. Each one works on their own layer.

This decoupling is first of all temporal. The visuals and all their states move forward while the API does not exist yet, then the hookup lands on a structure that is already complete. This is not design taking power over engineering, it is a reorganization of the order in which things get decided. Naming this rule explicitly avoids the most expensive misunderstanding, the one that would read the method as an intrusion rather than a better-sequenced collaboration.

The conditions that make the method viable

The trap would be to promise an identical replication everywhere. The intent and the grid are portable, the implementation stays specific to each stack. Before deploying the method, better to diagnose six conditions, which come down to the squad’s practices more than to chance. They are what the diagnostic above asks you to evaluate one by one.

The first two are foundations: if front/back decoupling or the mockable layer is missing, the playground is not the first project to run. The others are accelerators. The automated preview condition is often the one that is missing, and it is not blocking: the playground runs locally without it, it only serves to make the rendering visible without pulling the branch.

Laying these six conditions out as a grid to fill in transforms the conversation. We do not promise a method that would break on a non-decoupled stack, and we do not get the method rejected when the real blocker is an infrastructure condition that can be named and budgeted.

Sell the grid, not the tool

Three principles help defend the method beyond its first application.

Auditing before asking changes the nature of the request. We do not show up demanding access, we show up with a reading of the code and an informed collaboration proposal. Then, show before arguing: a five-minute demo of the playground weighs more than a three-page document with checkboxes. The order that works goes from the demo to the leadership one-pager, then to wider circulation.

The most structuring point is the last one: what lands on the table with every new squad is the readiness grid, not the playground. The playground is the outcome when the score allows it, the grid is the entry point of the discussion. This shift protects against the two symmetrical failures, promising a replication that shatters, or getting the method rejected for a reason that had never been named.

Written with terquedad colombiana, in the south of France.

Not with love, with context and a patient agent.

Still learning.

© 2026 All rights reserved.