agent-skills / accelint-design-foundation
AGENTS.md25 starsChanged 54 days agoApache-2.0View on GitHub
Note: This document is mainly for agents and LLMs to follow when styling components with @accelint/design-foundation or @accelint/design-toolkit. Humans may also find it useful, but guidance here is optimized for automation and consistency by AI-assisted workflows. Quick-reference guide for styling with Accelint's opinionated Tailwind implementation. This guide provides token catalogs, spacing scales, and variant patterns organized for progressive disclosure. Each rule includes one-line summaries with links to detailed examples in the references/ folder. Token efficiency principle: This guide assumes Claude…
We split this AGENTS.md 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
- Distinctive: line 189
Exception: Use borders only when the border must participate in layout (table cells, explicit separators).
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md 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.
Files
Accelint Design Foundation
Note: This document is mainly for agents and LLMs to follow when styling components with
@accelint/design-foundationor@accelint/design-toolkit. Humans may also find it useful, but guidance here is optimized for automation and consistency by AI-assisted workflows.
Abstract
Quick-reference guide for styling with Accelint's opinionated Tailwind implementation. This guide provides token catalogs, spacing scales, and variant patterns organized for progressive disclosure. Each rule includes one-line summaries with links to detailed examples in the references/ folder.
Token efficiency principle: This guide assumes Claude knows standard Tailwind and CSS concepts. Focus is on what's different about Design Foundation's opinionated approach: semantic tokens vs raw colors, semantic spacing vs numeric, outlines vs borders, data attributes vs arbitrary variants.
How to Use This Guide
- Start here: Scan the quick reference to identify relevant tokens and patterns
- Load references as needed: Click through to detailed catalogs only when implementing
- Progressive loading: Each reference file is self-contained with complete examples
This structure minimizes context usage while providing complete implementation guidance when needed.
Quick Reference
- 1.1 Color Tokens - Semantic tokens for backgrounds, text, icons, outlines
- 1.2 Spacing Scale - Seven-step semantic scale (xxs through xxl)
- 1.3 Variant System - Data attribute variants for component states
- 1.4 CSS Layer Structure - Layer hierarchy for custom component styles
- 1.5 Typography & Shadows - Text sizing and elevation scales
1. Core Token System
1.1 Color Tokens
Semantic tokens that adapt to light/dark themes automatically. Never use raw Tailwind colors or manual theme handling.
Token categories:
bg-* Backgrounds (surface-default, surface-raised, interactive-bold, info-muted, critical-muted)
fg-* Text (primary-bold, primary-muted, inverse-bold, accent-primary-bold, critical-bold)
icon-* Icons (inherits from fg-*, uses same token names)
outline-* Outlines/borders (interactive, static, info-bold, critical-bold, advisory-bold)
shadow-* Elevation (elevation-raised-muted, elevation-raised-bold, elevation-overlay-muted)Common patterns:
// Card
bg-surface-default outline-1 outline-interactive shadow-elevation-raised-muted
// Primary button
bg-interactive-bold fg-inverse-bold
// Body text
fg-primary-bold
// Link
fg-accent-primary-bold
// Alert
bg-info-muted outline-1 outline-info-boldView complete token catalog
1.2 Spacing Scale
Eight-step semantic scale (strongly preferred). Numeric classes available as fallback with 1:1 relationship (p-1 = 1px).
Scale: xxs → xs → s → m → l → xl → xxl → oversized
Classes:
- Padding:
p-m,px-s,py-xs,pt-l,p-oversized - Margin:
m-l,mx-m,my-s,mb-xl,m-oversized - Gap:
gap-m,gap-x-s,gap-y-l,gap-oversized - Space:
space-x-s,space-y-m,space-y-oversized
Common usage:
// ✅ Preferred - semantic scale
// Standard button: px-m py-xs
// Card padding: p-m
// Form field gaps: space-y-m
// Button group: gap-s
// ⚠️ Rare fallback - numeric (1:1 px)
// Non-conforming: p-13 (13px exactly)Numeric fallback: Design foundation implements --spacing: 1px; so p-1 = 1px (NOT 4px). Use only for non-conforming designs.
View spacing scale details
1.3 Variant System
Data attributes for component variants instead of arbitrary Tailwind variants.
Common variants:
data-color="info|success|warning|danger|primary|secondary"
data-size="small|medium|large"
data-state="active|inactive|disabled|loading|error"
data-layout="horizontal|vertical|grid|stack"
data-position="top|right|bottom|left|center"Usage:
<Button data-color="primary" data-size="large">Submit</Button>
<Alert data-color="warning" data-state="active">Warning</Alert>
<Badge data-color="success" data-size="small">New</Badge>React Aria states: Components also get data-hovered, data-pressed, data-focused, data-selected automatically.
View variant catalog
1.4 CSS Layer Structure
Custom CSS must use layer hierarchy for predictable specificity.
Layers:
@layer components.l1 { /* Base component styles */ }
@layer components.l2 { /* Variant styles */ }
@layer components.l3 { /* State styles */ }Lower numbers = lower specificity. Use l1 for base, l2 for variants, l3 for states.
1.5 Typography & Shadows
Typography scale:
text-body-xxs Tiny body text
text-body-xs Extra small body
text-body-s Small body text
text-body-m Medium body text (default)
text-body-l Large body text
text-header-xs Extra small headers
text-header-s Small headers
text-header-m Medium headers
text-header-l Large headers
text-header-xl Extra large headers
text-header-xxl Huge headers
text-button-xs Extra small button text
text-button-s Small button text
text-button-m Medium button text
text-button-l Large button textEach size includes coordinated font-size, line-height, letter-spacing, font-weight.
Shadow scale:
shadow-elevation-raised-muted Subtle raised elevation (cards)
shadow-elevation-raised-bold Prominent raised elevation
shadow-elevation-overlay-muted Subtle overlay elevation (popovers)
shadow-elevation-overlay-bold Prominent overlay elevation (modals)2. Key Patterns
Pattern: Outline vs Border
Use outlines, not borders. Outlines don't affect element dimensions, preventing layout shifts.
// ✅ Correct - outline doesn't add to size
<button className="outline-2 outline-interactive px-m py-xs">
Click
</button>
// ❌ Wrong - border adds to dimensions
<button className="border-2 border-blue-500 px-m py-xs">
Click
</button>Exception: Use borders only when the border must participate in layout (table cells, explicit separators).
Pattern: Automatic Theming
Never use manual theme handling. Semantic tokens adapt automatically.
// ✅ Correct - automatic theming
<div className="bg-surface-default fg-primary-bold">
Content
</div>
// ❌ Wrong - manual theme logic
<div className={theme === 'dark' ? 'bg-gray-900 text-white' : 'bg-white text-black'}>
Content
</div>Pattern: Semantic vs Primitive
Use semantic tokens in components, never primitives.
Primitives (--primitive-neutral-50) are for theme definitions only. Components use semantic tokens (bg-surface-default) that map to primitives.
Pattern: Overriding Design Toolkit Components
Use className or classNames props, not custom CSS files.
// ✅ Correct - use provided props
<DesignToolkitButton
className="custom-override"
classNames={{ icon: 'icon-override' }}
>
Action
</DesignToolkitButton>3. Migration from Vanilla Tailwind
Quick conversion:
| Vanilla Tailwind | Design Foundation |
bg-gray-100 | bg-surface-default |
text-gray-900 | fg-primary-bold |
p-4 | p-m |
gap-2 | gap-xs |
border-2 border-gray-300 | outline-2 outline-interactive |
dark:bg-gray-900 | Remove - automatic with tokens |
View complete migration guide
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 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 repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/accelint-eval-architect/AGENTS.mdAGENTS.md
- skills/accelint-nextjs-best-practices/AGENTS.mdAGENTS.md
- skills/accelint-prompt-manager/AGENTS.mdAGENTS.md
- skills/accelint-react-best-practices/AGENTS.mdAGENTS.md
- skills/accelint-react-testing/AGENTS.mdAGENTS.md
- skills/accelint-readme-writer/AGENTS.mdAGENTS.md
- skills/accelint-security-best-practices/AGENTS.mdAGENTS.md
- skills/accelint-skill-manager/AGENTS.mdAGENTS.md
- skills/accelint-skill-manager/references/agents.mdAGENTS.md
- skills/accelint-ts-best-practices/AGENTS.mdAGENTS.md
- skills/accelint-ts-documentation/AGENTS.mdAGENTS.md
- skills/accelint-ts-performance/AGENTS.mdAGENTS.md
- skills/accelint-ts-testing/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accelint-ac-to-playwrightSkill
- accelint-architecture-docSkill
- accelint-archive-synthesisSkill
- accelint-design-foundationSkill
- accelint-english-managerSkill
- accelint-eval-architectSkill
- accelint-nextjs-best-practicesSkill
- accelint-onboard-agentsSkill
- accelint-onboard-openspecSkill
- accelint-persona-reviewSkill
- accelint-prompt-managerSkill
- accelint-qrspi-applySkill
- accelint-qrspi-archiveSkill
- accelint-qrspi-proposeSkill
- accelint-react-best-practicesSkill
- accelint-react-testingSkill
- accelint-readme-writerSkill
- accelint-security-best-practicesSkill
- referencesSkill
- accelint-skill-managerSkill
- accelint-skill-proseSkill
- accelint-tanstack-query-best-practicesSkill
- accelint-ts-audit-allSkill
- accelint-ts-best-practicesSkill
- accelint-ts-documentationSkill
- accelint-ts-performanceSkill
- accelint-ts-testingSkill
- constraints-extractorSkill
- context-driftSkill
- epistemic-mapperSkill
- generate-docsSkill
- jargon-extractorSkill
- pr-descriptionSkill
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
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.

