agentleFS
joaoguimaraesprojoaoguimaraespro/personal-finance/.cursor/rules/design-design-system.mdc

personal-finance / rules

Cursor rule1 starsChanged todayMITView on GitHub

UI code follows the repo's design system: tokens only, shared components, every state designed, WCAG 2.2 AA

The file

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

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No new UI library without an ADR.

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 6,809 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-design-system.mdc
---
description: "UI code follows the repo's design system: tokens only, shared components, every state designed, WCAG 2.2 AA"
globs: **/*.tsx,**/*.jsx,**/*.css,**/*.scss,**/*.html,**/components/**/*.ts,**/src/app/**/*.ts,**/DESIGN.md
alwaysApply: false
---
<!-- Generated by armature from design/rules/design/design-system.md. Edit the source rule, not this file. -->
# Design system

**Sources, in order of authority:** the product rules (`docs/design-system.md` or what `AGENTS.md` names), then
`DESIGN.md` (tokens and patterns as built), then the token values in the theme CSS. A design skill never overrides them.

## Tokens only

- Colours, spacing, radius, shadows, type sizes and motion durations come from tokens (CSS variables exposed as
  utilities). No raw hex/rgb/hsl/oklch, no arbitrary utility values, no inline `style` colours.
- Semantic colours (success, warning, critical) are separate from the accent; meaning never relies on colour alone.
- Light and dark themes come from the same tokens.
- A new token is added to the theme and to `DESIGN.md` in the same change, never invented inside a component.

## Components

- Reuse the shared UI package before adding anything; extend a shared component instead of copying it.
- No new UI library without an ADR.
- Components accept `className` and merge classes with the repo's `cn()` helper.

## Every state is designed

Empty, loading, partial, error, no permission and stale. Long text, huge lists and narrow widths do not break the
layout (check with the `break-ui` skill when installed).

## Accessibility: WCAG 2.2 AA

Full keyboard use with visible focus, labelled controls, accessible names on icon buttons, contrast AA, focus trapped
in dialogs and returned on close, `prefers-reduced-motion` respected.

## Done means looked at

A visual change is finished only after it was viewed in a browser at a phone and a desktop width, light and dark
(the `visual-check` skill when installed), and `DESIGN.md` was refreshed if tokens or patterns changed.

<!-- Sources: the owner's conventions from ordo-frontend .claude/agents/design-system-guard.md and the AI-89 "Design work" rules (design system outranks skills, every state a deliverable, WCAG 2.2 AA, tokens never hard-coded, DESIGN.md refreshed with visual changes); affaan-m/ECC rules/web/coding-style.md (CSS custom properties, MIT) at d2ef268. -->

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.