agentleFS
ikan-tech1ikan-tech1/eg-design-system/.cursor/rules/design-system.mdc

eg-design-system / rules

Cursor rule0 starsChanged 6 months agoMITView on GitHub

EG Design System — OKLCH tokens, app archetypes, dashboard blocks, motion library. Always use for any UI/CSS/component work.

  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

We split this design-system.mdc into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When building or editing any UI, follow the rules in CLAUDE.md / AGENTS.md at the repo root.

    line 9
  2. Distinctive:

    Light + dark are both first-class: Use semantic tokens that flip automatically.

    line 14
  3. Very specific:

    Commit to an aesthetic direction: before writing markup (§1 Design philosophy).

    line 15
  4. Distinctive:

    Read the full rule file before any UI work.

    line 22

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
design-system.mdc
---
description: EG Design System — OKLCH tokens, app archetypes, dashboard blocks, motion library. Always use for any UI/CSS/component work.
globs: ["**/*.tsx", "**/*.jsx", "**/*.html", "**/*.css", "**/*.scss", "**/*.svelte", "**/*.vue", "tailwind.config.*", "globals.css", "app/globals.css"]
alwaysApply: true
---

# EG Design System

When building or editing any UI, follow the rules in `CLAUDE.md` / `AGENTS.md` at the repo root. The canonical token values live in `tokens.css`.

Summary of non-negotiables:

1. **Never hardcode** colors, sizes, shadows, or durations. Reference tokens (`var(--primary)`, `bg-background`, `rounded-lg`, `shadow-md`, `duration-fast`).
2. **Light + dark are both first-class.** Use semantic tokens that flip automatically; never mode-specific colors.
3. **Commit to an aesthetic direction** before writing markup (`§1 Design philosophy`). Don't default to "Inter + purple gradient + three rounded cards."
4. **WCAG 2.2 AA accessibility is mandatory** — contrast, visible `focus-visible` rings, ≥24px (44px touch) targets, semantic HTML, `prefers-reduced-motion`.
5. **Pick the right archetype** (§14): SaaS / ERP / Mission Control / PWA / Marketing. Each tells you how to configure the same tokens for that domain.
6. **Compose from named blocks** (§15) — KPI card, hero metric, chart cards, data tables, activity feed, AI insight, etc. Never invent a new card shape.
7. **Use the motion library** (`transitions-dev` patterns, §16) — `number-pop-in`, `panel-reveal`, `success-check`, etc. — instead of inventing animations.
8. **Atmosphere is not optional** (§13). Layer at least one of `--bg-mesh` / `--bg-aurora` / `--bg-dot-grid` / `--bg-blueprint` behind heroes and app shells.

Read the full rule file before any UI work.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.