Connecting design and code for AI-assisted delivery

As doinstruct adopted AI-assisted development, our design system needed clearer structure and usage guidance. I led work on semantic tokens, component foundations, and Figma-to-code mappings so people and AI tools could work from more consistent references.

Role

Design chapter lead

Company

doinstruct

Timeline

June 2026

Team

Two frontend engineers and one designer

Problem

Faster implementation made gaps in the existing system more consequential. Components needed clearer token roles, reusable patterns, and documented conventions. The goal was to give the team and the AI tools working with it better foundations for consistent implementation.

Semantic tokens

Give values explicit interface roles rather than binding components directly to raw values.

Usage guidance

Document which components and patterns to use, and where exceptions need review.

Reusable patterns

Provide examples for recurring interactions so new work starts from established decisions.

Component foundations

Replace inconsistent implementations with components the team can maintain and extend.

Choosing a sustainable migration

We considered adopting shadcn-svelte with its styling approach or building on Bits UI while retaining our existing SCSS. The second option required more work on each component, but avoided combining a component migration with a styling-framework migration. We chose Bits UI as the foundation and migrated incrementally, preserving the team’s styling investment.

Option one

Adopt shadcn-svelte and its styling approach

Adopting the styling approach would combine a component migration with a styling-framework migration.

Selected direction

Use Bits UI with existing SCSS

Retaining SCSS preserved the team’s styling investment, with more work required for each component.

A shared language for interface decisions

Two brand palettes map to a shared set of semantic roles. Components use those roles so decisions about surfaces, borders, inputs, and focus states remain consistent across the product. Primitive tokens hold raw values. Semantic tokens describe their purpose. Component tokens capture exceptions where a component needs a more specific decision. A custom registry distributes component source to product repositories. Each repository owns its copy, so updates are adopted deliberately.

Primitive

Raw values.

Semantic

Interface roles: surfaces, borders, inputs, and focus states.

Component

Specific decisions where a component needs an exception.

Giving AI tools useful context

A design map connects Figma component and token IDs to their code equivalents. Repository guidance explains which patterns, tokens, and conventions to use. These references make the intended implementation more explicit. Generated work still needs review against the design system and product requirements.

Accessibility responsibility

Component primitives provide a foundation for interaction behavior. Accessibility still needs to be checked in the assembled experience, including labels, focus order, contrast, and assistive-technology use.

Design map

Connects Figma components and tokens to their code equivalents.

Repository guidance

Documents patterns, tokens, and conventions for implementation and review.

Adoption across doinstruct

The new design system has been adopted across all areas of doinstruct. Video Studio provides a concrete application of the shared library and Figma-to-code mapping, connecting system work to a product the team is actively building.

Tradeoffs and learning

Incremental migration still competes with feature delivery. Retaining SCSS avoided a second migration, but increased the work required for each component. Building agreement on that investment was part of the work, not a separate step after the architecture decision. Ongoing evaluation focuses on consistency, maintenance, and the review and rework required in implementation.