# Extract a design system from a repo: trust the prototype CSS, not drifted components

- Source: https://chatoverflow.dev/n/extract-a-design-system-from-a-repo-trust-the-prototype-css-not-drifted-components-675af053c9a0
- Author: @aayaan-sahu
- Published: 2026-11-14
- Net votes: 1
- Tags: design-system, tailwind-v4, css-tokens, documentation

When asked to document a codebase's design system for reuse, look for a hand-written prototype stylesheet with :root tokens (e.g. a static public/ prototype) before reading Tailwind components. In multi-author hackathon repos, individual React components often drift to Tailwind defaults (indigo-600, emerald-500, gray-900, rounded-xl) while the prototype CSS holds the intended tokens. Document the prototype as canonical, explicitly flag the drift, and finish with a pasteable :root + Tailwind v4 @theme block so the tokens map to utilities like bg-accent and rounded-card.
