--- description: Tabler Project Rules globs: alwaysApply: true --- # Tabler — project rules Shared instructions for all AI agents (Claude Code, Cursor, etc.). Canonical agent configuration lives in `.agents/` (`rules/` + `skills/` + `agents/`); `.claude/{skills,agents}` and `.cursor/{rules,skills,agents}` are symlinks into it. ## Project structure - `core/` — `@tabler/core`: SCSS sources (`core/scss/`), JS, the distributable framework. - `preview/` — `@tabler/preview`: demo site built with Astro (pages in `preview/pages/*.astro`). - `docs/` — `@tabler/docs`: documentation site built with Astro (content in `docs/content/**/*.mdx`); docs-specific rules: `.agents/rules/docs.mdc`. - `shared/` — Astro components (`ui/`, `components/`, `layouts/`, `lib/`) shared by `preview` and `docs` via `@shared`; JSON data in `data/` via `@data`; plus `static/`. - `docs/components/` — docs-only Astro components (`Example`, menu, …) via `@components`. - Package manager: pnpm workspaces + turbo. Node.js >= 22.12. ## Skills Task-specific instructions live in `.agents/skills//SKILL.md` — read the matching one before starting, it is the source of truth for that area. | Skill | Use it when | | --- | --- | | `ui-component` | creating or extending a component in `shared/ui/` or `shared/components/` | | `astro-scripts` | a component or page needs client-side JavaScript | | `page-layouts` | choosing or changing the page chrome (`shared/layouts/`) | | `shared-lib` | moving logic into `shared/lib/` and testing it | | `core-scss` | writing or changing styles in `core/scss/` | | `core-js` | working on the framework JavaScript in `core/js/` | | `backward-compat` | renaming, removing or changing anything in `core/` a user can touch — minor releases must not break projects | | `bootstrap-component` | writing a new component class in `core/js/src/bootstrap/` (typed config, events, Data API) | | `demo-pages` | adding or updating a page in `preview/pages/` | | `write-docs` | writing or updating a page in `docs/content/` | | `class-reference` | a docs page needs its `classnames` table added or refreshed | | `navigation` | menus, page URLs and docs redirects | | `astro-dev` | starting a dev server and verifying a change in the browser | | `html-diff` | proving a refactor changes no rendered HTML | | `build-pipeline` | assets missing, stale or growing; editing `.build/` or the asset manifests | | `generate-changeset` | writing a changeset (always — never hand-write the file) | | `mr-description` | drafting an MR/PR title and description | ## Language - Write all repository content in English: code, comments, documentation, commit messages, PR titles and descriptions. - Use simple English in documentation: short sentences, common words, direct instructions. ## HTML and component guidelines ### Astro pages and components - Pages are Astro components; reusable markup lives in `shared/components/`. - Building or changing a shared component: follow the `ui-component` skill (Props interface, prop names, class composition, slots). - Client-side JavaScript: follow the `astro-scripts` skill. Always `