Brand & code

Code your brand to give marketing more autonomy

Every adaptation sent back to a designer uses time already invested in the original campaign. Coding your brand gives marketing a way to handle routine variations through rules that tools can apply. At Defacto, I translated the identity created by Klimb into a production system versioned in GitHub.

Defacto — a production system built from the brand identity.
Defacto — a production system built from the brand identity. Explore the case ↗
In this article

Identify the decisions you repeat with every brief

An announcement is approved. The team now needs a square version, a story and a slide for a sales presentation. The message stays the same, yet a designer must adjust proportions, line breaks and image placement. This recurring work is a useful candidate for automation.

Figma records visual decisions. Making them usable by another team means specifying when and how they apply: acceptable headline length, logo variants, contrast and what happens when an image is missing. While those decisions remain in the designer’s head, each adaptation depends on their availability.

I recommend starting with an approved campaign. Its decisions are known and its deliverables provide a reference for checking the output. That gives you an initial scope specific enough to code and frequent enough to justify maintaining.

What Defacto makes tangible

For Defacto, my work involved translating the identity created by Klimb into production rules and templates. Typography, colours, proportions and components become reusable resources in a GitHub repository. Working instructions live alongside the files instead of depending entirely on verbal handovers.

The designer also shapes the system: identifying what should remain stable, what can vary and what requires a new decision. Compositions become resources the team can reuse. The aim is to preserve the identity’s decisions in everyday adaptations and make subsequent changes traceable.

Translate the brand into four layers

I recommend four layers because they evolve at different speeds. The separation supports maintenance as much as creation.

LayerContentsPurpose
FoundationsColours, typography, spacing, radiiApply approved values
ComponentsButtons, headings, cards, labels, product blocksAssemble elements already designed
CompositionsHierarchies, grids and format templatesAdapt a message to a channel
InstructionsVoice, sources, limits and review criteriaDecide whether a result is usable

Tokens describe values and roles. They do not contain an entire creative direction. The correct colour does not automatically produce the right composition. The library also needs annotated examples, density limits and situations where a template should be set aside.

Build a repository people can understand

For your own repository, I recommend separating foundations, components, templates, examples and exports. Its entry document should explain the workflow: choose a template, provide content, generate a preview, request review and export.

Each template deserves a short contract covering expected inputs, required fields, supported formats and errors. A product announcement might require an approved claim, a benefit, supporting evidence and a call to action. If the evidence is missing, the system should flag it rather than inventing a number.

Versioning connects a piece of work to the rules used to create it. When typography changes, the team can identify affected templates and compare their output. Useful history explains why a rule changed, not merely which file was edited. Someone should own the decision to release that change and the ability to return to the previous version.

Serve the same reference across tools

Access depends on the environment. Developers can import a library; a composition tool can load templates; an agent can read rules and call a creation function. MCP is one connection option, not a prerequisite for coding a brand.

Figma offers a Variables API for working with reusable values. Check its access requirements before building a synchronisation process. Exporting variables still leaves important decisions: which system is authoritative, how conflicts are resolved and how users discover updates.

Test autonomy on a real campaign

Give a complete brief to someone in marketing who did not build the templates. They should be able to choose a composition, adapt the content and retrieve an editable source. Record every point that still needs a designer: an unfamiliar visual decision, missing information, a layout problem or a usability issue.

Then test a long headline, a translation and a narrow format. Change a shared rule, such as a heading size, to check how the update reaches each asset. A library that is difficult to maintain soon becomes a collection of competing versions.

Compare time to approval and designer rework with previous campaigns of the same kind. Expand the library once the team can produce and revise that first family of assets. New creative directions remain with design; proven adaptations can move into the autonomous workflow.