# Agent guidelines: Design System 2 Starter Kit This repository is a **starter template** for prototyping Salesforce-aligned UIs locally. It uses **LWC** (Lightning Web Components), **Vite**, **SLDS** (Salesforce Lightning Design System), and **lightning-base-components**, with synthetic shadow DOM and client-side routing. --- ## Project-specific guidance ### Where to put code - **Route-level views**: `src/modules/page//` → tag `page-`. Add a route in `src/routes.config.js`, then import and register the component in `src/modules/shell/app/app.js` (`ROUTE_COMPONENTS`). The router picks up new routes automatically; `src/router.js` does not need editing. - **Reusable UI / SLDS blueprints**: `src/modules/ui//` → tag `ui-`. Use inside pages, the shell, or other components. - **App shell**: `src/modules/shell//` → tag `shell-`*. Root app, layout, theme, docked panels — not route views (`page-`*) and not reusable components (`ui-*`). - **Do not** add components under `src/build/lightning-icon/shims/` except the checked-in icon overrides, or under `src/modules/lightning/`. ### SLDS linter After you change any `.html` or `.css` file, run the SLDS linter on each file you touched before considering the task complete: ```bash npx @salesforce-ux/slds-linter@latest lint ``` Fix reported issues where possible. If something cannot be fixed, say so briefly. ### Engineering habits - For ALL UI work, **read `node_modules/@salesforce/afv-skills/skills/design-systems-slds-apply/SKILL.md` first**. - **Prefer Lightning Base Components over hand-rolled SLDS markup.** When a `lightning-*` component exists for what you're building, use it instead of reconstructing the `slds-*` blueprint from memory (e.g. `lightning-card` not `slds-card`, `lightning-button` not `slds-button`, `lightning-icon` not `slds-icon`). Only hand-roll a blueprint when no base component covers the case, and say so when you do. - Prefer small, single-responsibility LWCs and readable structure. - Do not use `!important`. - Do not use inline `style` attributes; use utility classes or the component’s CSS file as appropriate. ### Modals Extend `lightning/modal`, following `**src/modules/ui/demoModal/`** as the reference (header, body, footer slots; open via `MyModal.open({ size, label })`). Do not build modals from raw `slds-modal` markup. ### Forms Use Lightning Base Component form elements (`lightning-input`, `lightning-combobox`, `lightning-radio-group`, `lightning-textarea`, `lightning-select`) for all form inputs. Do not use raw ``, `