DESIGNING THE SYSTEM BEHIND MYSTRA
I led Mystra’s design-system initiative from product diagnosis through architecture, documentation and engineering handoff. I turned fragmented UI rules into shared, machine-readable context: a code-first system of tokens, component contracts, live examples and guidance that designers, engineers and AI agents could use.
UI FOUNDATIONS
STORYBOOK
CODE-FIRST
AUDIT · DOCUMENTATION · GOVERNANCE
DESIGN · ENGINEERING · AI AGENTS
Industry
Genomics Software
Role
Product Designer
Date
2026
Mystra helps genomics researchers explore datasets, inspect variants and run complex analyses. Mystra AI brings analysis jobs into the same workflow. The design-system work had to support both the product UI and the increasingly AI-assisted ways the team built it.

REVERSE-ENGINEERING THE PRODUCT UI
There was more here than a collection of one-off components.
The code contained shared components, Chakra recipes, 11 colour palettes, 82 semantic tokens, eight text styles and shadows. But coverage was uneven, patterns had drifted and important rules were implicit. I mapped component usage, examined the foundations and compared light and dark modes to identify the systemic gaps.
FROM FRAGMENTED PATTERNS TO SYSTEM RULES
The brief began with documentation. The investigation exposed a broader systems problem: inconsistent component boundaries, duplicated patterns, incomplete token rules and no dependable contract between design intent and implementation. I reframed the work around making those rules explicit and usable.

THE AUDIT: FINDING THE SYSTEMIC GAPS
I audited shared components, fields, Mystra AI widgets and tokens across light and dark modes.
The audit found missing wrappers and undocumented high-use components: Alert.Root appeared in 50 files and LoadingSpinner in 31. Mystra AI repeated card treatments across 9 of 19 widgets. Fields used five mechanisms and three required-field conventions. Some labels lacked programmatic associations; tokens contained hard-coded values; the focus ring measured 2.56:1 against white, below WCAG’s 3:1 non-text contrast requirement.

TOKEN ARCHITECTURE: CONSISTENCY WITHOUT A BLANKET RESET
The goal was not to standardise every value. It was to establish a coherent semantic model without breaking useful conventions or forcing unnecessary migration.
Keep shared semantic names such as text.secondary, border.default and status.*. Retain Chakra’s bg family rather than introducing background.*. Distinguish bg, surface, bg.muted and bg.hover by role. Keep border.muted and border.subtle where their uses differ, even when values match. Rename selectively, including cta.primary.static to cta.fill, when usage supports it. Preserve existing primitives and aliases where they already work.



STORYBOOK AS THE LIVE SYSTEM INTERFACE
Storybook made the specification executable: real components, states and variants, not static redraws.
Storybook became the live interface to the system: rendered components, states, variants and usage examples drawn directly from product code. It gave people and AI workflows a structured place to find the rules. The dependency stayed one-way: Storybook imported product code, never the reverse.

ONE SYSTEM. THREE WAYS TO WORK.
A shared source of truth, shaped for different workflows.

Designers explored real states, variants and themes. Engineers used imports, TypeScript props and working examples. AI agents consumed a generated manifest and component contracts. The same product rules informed all three.

TESTING WHETHER AI COULD FOLLOW THE SYSTEM
I tested the system with agents, not just against documentation checklists.
Two agents built a filter panel and workflow card using the manifest without source access. The first run exposed a nested-button defect in UI.Select and gaps in the contracts. I refined the guidance. The second run produced no console errors or unsupported guesses. The exercise showed that agent output depends on the quality of the system context, not simply the prompt.
FROM COMPONENTS TO COMPOSITION
The library covered foundations, components, patterns, data visualisation, Mystra AI and guidance. Pages paired live specimens with imports, playgrounds, states, variants, props and composition examples. The focus was on showing how components work together, not just listing what existed.

GOVERNANCE FOR A LIVING SYSTEM
I defined checks for component inventory, links, documentation structure, accessibility, search, themes and the agent manifest. The aim was to keep the system connected to the code as both product and AI workflows evolved.
The documented checks provided a repeatable approach for detecting drift and maintaining the system as the product evolved.
EXTENDING THE EXISTING STACK
I extended the Chakra architecture already used by Mystra rather than introducing a parallel stack or rewriting the product.
Chakra remained the behavioural and accessibility foundation; Mystra recipes and tokens defined the product language. The system addressed focus visibility, dark-mode elevation, icon consistency, button tone and variant, and a shared Input → Field → specialised component model.
ENGINEERING HANDOFF
I prepared the architecture, token decisions, component guidance and Storybook reference for engineering review. The handoff included two pull requests for structural implementation and a carefully phased roadmap for full implementation of tickets, based on call sites and dependencies.


A SYSTEM THAT SCALES BEYOND THE UI
The system made design intent explicit, reusable and accessible to both people and machines.
The result was a documented target for the design system. Tokens, component APIs, interaction patterns, Storybook documentation and AI-readable contracts connected to the existing implementation. Designers could inspect the system, engineers could review how to extend it, and AI agents could work from structured guidance. The team had a clear route towards adoption, while production components remained unchanged at handoff.






