atlas-design
Copilot instructions76 starsChanged 3 months agoMITView on GitHub
The Atlas Design System is a CSS-first framework powering Microsoft Learn. It's a monorepo with eight workspaces: css, js, site, integration, extension, and three plugins. CSS-first philosophy: JavaScript is added only when required for accessibility or as lightweight web components. Most UI patterns should be achievable with CSS alone. Token flow: CSS variables are defined in css/src/tokens/, exported to JSON/TS via npm run build:tokens, and consumed by other packages. Property order (enforced by Stylelint): Required practices: Required for changes to…
- Installs packages
The file
We split this copilot-instructions.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Very specific: line 68
Use logical properties (margin-inline not margin-left/right)
- Distinctive: line 70
No ID selectors, no vendor prefixes
- Very specific: line 72
Use !default flag for all token variables
- Distinctive: line 81
Do NOT use BEM naming conventions.
- Distinctive: line 106
Use semantic versioning: major (breaking), minor (new feature), patch (fix).
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
Atlas Design System - Copilot Instructions
The Atlas Design System is a CSS-first framework powering Microsoft Learn. It's a monorepo with eight workspaces: css, js, site, integration, extension, and three plugins.
Commands
# Install dependencies (from root)
npm install
# Development - start site with hot reload (port 1111)
npm run start
# Build
npm run build:css # Build CSS package
npm run build:js # Build JS package
npm run build:site # Build documentation site
# Lint
npm run lint # All packages
npm run lint:css # SCSS only
npm run lint:js # TypeScript only
npm run lint-fix # Auto-fix lint issues
# Testing (requires site running on port 1111)
npm run integration # Run Playwright integration tests
npm run integration:debug # Debug mode with browser
npx playwright test -g "test name" # Run single test (from integration folder)
# Unit testing (js package)
npm run test # Run Vitest unit tests
npm run test:cov # Run with code coverage report
# Visual regression
npm run screenshots:light # Light theme only
npm run screenshots:all # All themesArchitecture
CSS-first philosophy: JavaScript is added only when required for accessibility or as lightweight web components. Most UI patterns should be achievable with CSS alone.
Packages:
css/- SCSS framework (@microsoft/atlas-css) - tokens, mixins, atomics, componentsjs/- TypeScript behaviors (@microsoft/atlas-js) - behaviors, elements, utilitiessite/- Documentation site built with Eleventy (11ty) and Markdownsite/src/scaffold- Contains SCSS and JS that is not appropriate for publishing in our npm packages and is for the site onlyintegration/- Playwright tests for visual regression and accessibilityextension/- VS Code extension for class IntelliSenseplugins/stylelint-config-atlas/- Shared Stylelint configuration
Token flow: CSS variables are defined in css/src/tokens/, exported to JSON/TS via npm run build:tokens, and consumed by other packages.
SCSS Conventions
Property order (enforced by Stylelint):
- Display/position
- Flexbox/Grid
- Box model (width, height, margin, padding)
- Visual (border, background)
- Typography
- Miscellaneous
Required practices:
- Use logical properties (
margin-inlinenotmargin-left/right) - Font sizes in
remoremonly (nopx) - No ID selectors, no vendor prefixes
- Maximum 3 levels of nesting, specificity
0,4,1 - Use
!defaultflag for all token variables
Naming:
- Components: noun/noun-phrase, one top-level class per file
- Modifiers: include component name (
.button-primary) - State classes:
is-prefix (is-disabled,is-focused) - Sizes: t-shirt abbreviations (
xs,sm,md,lg,xl,xxl) - Atomics:
.<property>-<value>[-<screensize>](e.g.,.margin-top-lg-tablet) - Do NOT use BEM naming conventions.
TypeScript Conventions
- Strict mode enabled
- Export all public APIs from
index.ts - JSDoc comments on public functions
- Zero external dependencies
- ARIA attributes for accessibility
Documentation Site
- Markdown with YAML frontmatter (title, description, template)
- Internal links use
~/src/path/to/file.mdformat - Code examples should show both HTML and rendered output
- New CSS requires corresponding documentation updates
Changesets
Required for changes to css/ or js/, but also recommended for changes to the site.
npx changeset addUse semantic versioning: major (breaking), minor (new feature), patch (fix).
In SCSS a change is considered breaking if it changes the structure of the markup in such a way that would break a downstream consumer.
Code Style
Prettier configuration (auto-applied on commit):
- Tabs for indentation
- Single quotes
- No trailing commas
- 100 character line width
Other code path specific instructions
You can find in /.github/instructions
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.

