This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository
This project is developed inside a Docker container called devcontainer.
The commands below assume you are running inside the devcontainer.
From the host, run them inside it with
docker compose exec -T devcontainer <command> (start it first with
docker compose up -d). The other service containers (node, playwright,
docs) are implementation details — do not call them directly.
If file /.dockerenv is present, you are in a Docker container.
For details, see the Contributing Guide.
Run these inside the devcontainer (from the host, prefix with
docker compose exec -T devcontainer). For details, see the
Contributing Guide.
| Task | Command |
|---|---|
| Install JS | npm ci |
| Build library | npm run build |
| Run static checks | npm run lint |
| Run unit tests | npm run test:jest |
| Run a single unit test file | npm run test:jest:ts -- <file> / npm run test:jest:js -- <file> |
| Run component tests | npm run test:playwright-ct:all |
| Component tests for one component | npm run test:playwright-ct:all -- -- src/components/Button |
| Update component snapshots | npm run test:playwright-ct:all-with-update |
| Start build watcher | npm start |
| Build documentation | mkdocs build |
| Serve documentation | mkdocs serve |
Notes:
- Commands like
npm,playwrightrun in specific Docker containers. Normally, when you run those commands, they are executed within dedicated containers. If you need to communicate directly with specific Docker container, usesudo docker compose .... It can be useful when stopping server that is running withinnodecontainer even though it is started fromdevcontainer. - See the
scriptssection inpackage.jsonfor the full list of commands.
Project rules live in .claude/rules/. There are two kinds.
Always-on (no frontmatter) — apply to every change:
- code.md — scope discipline, minimal changes.
- git.md — branches, commits, PRs.
- safety-guards.md — hard guard rails.
Path-scoped — each carries a paths: glob declaring the files it governs;
consult it when touching those files:
- frontend.md —
src/**/*.js,src/**/*.jsx: stack, component structure, implementation pattern. - styling.md —
src/**/*.scss,src/**/*.css: CSS Modules, class naming, theming. - testing.md —
*.spec.tsx,*.story.tsx,__tests__/**,tests/**: Jest and table-driven Playwright tests. - docs.md —
src/docs/**, componentREADME.md.
Specialized agents live in .claude/agents/.
code-reviewer— review a change against this repo's rules (uncommitted work, or a whole branch vs its base).
MCP-capable assistants in the devcontainer can drive host Chrome to verify the
docs site and rendered components. See
AI Integration and
scripts/mcps/chrome-host/README.md.