
Building a Design System Specced for Engineers and Agents
SVGR. The system lives in Figma, Storybook, and GitHub, designed to be readable by both engineers and LLMs without a designer in the loop.This week's design systems coverage centered on the intersection of AI tooling, token architecture, and governance maturity. Evil Martians built a complete design… Compiled for immediate developer deployment.

SVGR. The system lives in Figma, Storybook, and GitHub, designed to be readable by both engineers and LLMs without a designer in the loop.
-background trigger automatic generation of corresponding -foreground-aa and -foreground-aaa tokens, always choosing from black or white to guarantee AA compliance. Developers may also define a custom foreground color; the build reports its compliance ratio and marks it with a visual pass/fail indicator in the generated CSS comments. A configurable transform accepts custom backgroundTokenName and foregroundTokenName values so the system adapts to any existing naming convention. The validation action runs after the build, reports passing and failing ratios in the terminal, and exits with an error only for chosen foreground colors that fail AA — auto-generated pairs never block the build. Output is plain CSS custom properties, compatible with any browser or framework.

.mock.js file pattern uses the fn utility from @storybook/test, while API requests are intercepted with MSW using the msw parameter. Redux stores use a redux-mock-store decorator, whereas Zustand's hook-based architecture calls for the .mock.js approach instead. Browser APIs like window.matchMedia, IntersectionObserver, and localStorage are stubbed globally in preview.tsx using Object.defineProperty wrapped in fn() for assertion support. The article also covers the play function for interaction testing and closes with an anti-patterns section — shared-state leaks between stories, over-mocking that eliminates integration coverage, and testing the mock itself rather than real behavior.
Text component that accepts an as prop to render as any HTML element — span, a, time, data — while restricting props to only those valid for the chosen element. A naive intersection of {as: E} and React.ComponentProps<E> fails because TypeScript does not narrow the intersection when E is inferred. The working fix is to map over the keys of ComponentProps<E> explicitly, which forces TypeScript to materialize the concrete object type after E has been resolved. Alternatively, wrapping ComponentProps<E> in an Omit (even omitting a nonexistent key) achieves the same effect. The author acknowledges not fully understanding why the mapped type approach works, citing a parallel observation on StackOverflow.
select elements to reduce spelling errors for people whose first language is sign language. Plain language principles — short sentences, no idioms, expanded acronyms — improve comprehension for this audience. Audio notifications in games, XR, and apps should have visual or haptic equivalents, ideally enabled by default as Fortnite demonstrated in 2024. Inclusive personas and direct involvement of D/deaf people in the design process are recommended to ensure genuine coverage of their needs.
SVGR. The system lives in Figma, Storybook, and GitHub, designed to be readable by both engineers and LLMs without a designer in the loop.-background trigger automatic generation of corresponding -foreground-aa and -foreground-aaa tokens, always choosing from black or white to guarantee AA compliance. Developers may also define a custom foreground color; the build reports its compliance ratio and marks it with a visual pass/fail indicator in the generated CSS comments. A configurable transform accepts custom backgroundTokenName and foregroundTokenName values so the system adapts to any existing naming convention. The validation action runs after the build, reports passing and failing ratios in the terminal, and exits with an error only for chosen foreground colors that fail AA — auto-generated pairs never block the build. Output is plain CSS custom properties, compatible with any browser or framework..mock.js file pattern uses the fn utility from @storybook/test, while API requests are intercepted with MSW using the msw parameter. Redux stores use a redux-mock-store decorator, whereas Zustand's hook-based architecture calls for the .mock.js approach instead. Browser APIs like window.matchMedia, IntersectionObserver, and localStorage are stubbed globally in preview.tsx using Object.defineProperty wrapped in fn() for assertion support. The article also covers the play function for interaction testing and closes with an anti-patterns section — shared-state leaks between stories, over-mocking that eliminates integration coverage, and testing the mock itself rather than real behavior.Text component that accepts an as prop to render as any HTML element — span, a, time, data — while restricting props to only those valid for the chosen element. A naive intersection of {as: E} and React.ComponentProps<E> fails because TypeScript does not narrow the intersection when E is inferred. The working fix is to map over the keys of ComponentProps<E> explicitly, which forces TypeScript to materialize the concrete object type after E has been resolved. Alternatively, wrapping ComponentProps<E> in an Omit (even omitting a nonexistent key) achieves the same effect. The author acknowledges not fully understanding why the mapped type approach works, citing a parallel observation on StackOverflow.select elements to reduce spelling errors for people whose first language is sign language. Plain language principles — short sentences, no idioms, expanded acronyms — improve comprehension for this audience. Audio notifications in games, XR, and apps should have visual or haptic equivalents, ideally enabled by default as Fortnite demonstrated in 2024. Inclusive personas and direct involvement of D/deaf people in the design process are recommended to ensure genuine coverage of their needs.This week's design systems coverage centered on the intersection of AI tooling, token architecture, and governance maturity. Evil Martians built a complete design system for Currents in seven weeks by running an AI audit of 791 files, uncovering 236 unique colors with 1,413 usages, two competing font systems, and parallel icon libraries. The result collapses colors into four OKLCH-defined semantic token groups — elevation, content, UI, and border — chosen specifically because AI agents can extend OKLCH palettes predictably without color drift. Icons migrated via an AI-generated lookup table with 90% accuracy using the Figura One set wrapped with SVGR, and the entire system lives in Figma, Storybook, and GitHub, designed to be consumed by LLMs without a designer in the loop.
Governance and process received equal weight. A detailed workflow guide identified six pillars for healthy design system operations — Contribution, Review and Approval, Documentation, Communication, Iteration, and Versioning and Deprecation — with component timelines ranging from 1-2 weeks for simple changes to 8-12 weeks for complex work. A companion governance article cited that 79% of mature design systems have formal governance, delivering up to 60% better ROI by preventing design drift, and recommended RACI matrices and monthly reviews tracking component reuse versus custom variant rates as early warning metrics.
On the component testing front, Fotis Adamakis delivered a comprehensive Storybook mocking guide covering props, MSW for API interception, redux-mock-store decorators for Redux, the .mock.js pattern for Zustand and custom hooks, and Object.defineProperty stubs for browser APIs like window.matchMedia and IntersectionObserver. Accessibility for D/deaf users was covered by TetraLogical, emphasizing accurate synchronized captions near content, predefined form controls to reduce spelling errors, and default-on visual or haptic equivalents for audio notifications. Kitty Giraudel shared a compact TypeScript pattern for typed polymorphic components discovered while working on the Duna design system, leveraging mapped types to force TypeScript to materialize concrete props after the as prop is resolved.