Skip to content
Article Hardik Pandya Aug 2026

Hardik Pandya: exposing your design system to LLMs

Hardik Pandya’s article identifies a structural problem with using LLMs for design work: without explicit design system context, models fabricate plausible-looking values, forget decisions between sessions, and cannot extract design intent from source code. By the tenth session working on the same product, Pandya writes, the output “looks like three different products built by three different teams.” The article then describes a four-part method to fix this by making the design system machine-readable before any coding session begins.

The first part is spec files — structured markdown documents organized into three tiers (foundations and tokens, components, and patterns) that an LLM reads at session start instead of inferring from code. Pandya demonstrates this with 64 spec files covering the full Atlassian design system. The second part is a three-layer CSS token architecture: upstream design system primitives, project-level aliases with fallbacks, and component-level references that only touch aliases rather than raw values. This prevents fabrication by giving the model a complete, authoritative token vocabulary. The third part is an audit script that scans CSS files for hardcoded values and fails CI builds when violations appear, treating token compliance as a quality gate rather than a convention. The fourth part is drift detection — monitoring upstream library releases and flagging spec files that reference changed components.

Pandya provides a single prompt for Claude Code that executes all six setup steps: auditing existing CSS, generating a token file with 230+ named variables, creating the spec file hierarchy, wiring the audit scripts, replacing all hardcoded values with tokens, and configuring upstream tracking. Applied to his own project, this eliminated 418 hardcoded values across 28 files and brought the count to zero.

The practical value here is not AI-specific — the spec file approach is essentially structured documentation that also happens to be LLM-readable. Teams that document their design systems this way benefit from clearer onboarding and more consistent AI output simultaneously. The article is most useful for designers or front-end engineers who are already using AI coding tools regularly and have started noticing consistency degrading across longer projects.