agentleFS
MicrosoftKnown publishermicrosoft/atlas-design/.github/copilot-instructions.md

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
  1. Very specific:

    Use logical properties (margin-inline not margin-left/right)

    line 68
  2. Distinctive:

    No ID selectors, no vendor prefixes

    line 70
  3. Very specific:

    Use !default flag for all token variables

    line 72
  4. Distinctive:

    Do NOT use BEM naming conventions.

    line 81
  5. Distinctive:

    Use semantic versioning: major (breaking), minor (new feature), patch (fix).

    line 106

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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 themes

Architecture

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, components
  • js/ - TypeScript behaviors (@microsoft/atlas-js) - behaviors, elements, utilities
  • site/ - Documentation site built with Eleventy (11ty) and Markdown
  • site/src/scaffold - Contains SCSS and JS that is not appropriate for publishing in our npm packages and is for the site only
  • integration/ - Playwright tests for visual regression and accessibility
  • extension/ - VS Code extension for class IntelliSense
  • plugins/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):

  1. Display/position
  2. Flexbox/Grid
  3. Box model (width, height, margin, padding)
  4. Visual (border, background)
  5. Typography
  6. Miscellaneous

Required practices:

  • Use logical properties (margin-inline not margin-left/right)
  • Font sizes in rem or em only (no px)
  • No ID selectors, no vendor prefixes
  • Maximum 3 levels of nesting, specificity 0,4,1
  • Use !default flag 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.md format
  • 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 add

Use 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

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.