Guidance for AI coding agents. See agents.md spec.
pnpm install # Install dependencies (root package)
pnpm test # Run unit tests (Vitest)
pnpm lint # Lint source (ESLint)
pnpm build # Build package (svelte-package)
pnpm --dir demo install # Install demo app deps
pnpm --dir demo dev # Start demo dev server (Vite)| Layer | Tech |
|---|---|
| Framework | Svelte 5 + SvelteKit (demo app) |
| Language | TypeScript (strict) |
| Build | svelte-package + Vite |
| Testing | Vitest |
| Lint/Format | ESLint (@stylistic, simple-import-sort) |
- ESLint-only formatting - @stylistic rules, no Prettier
- Tabs for indentation
- Single quotes for strings (avoid escape)
- No semicolons
- No trailing commas
- Spaces inside
{ foo },[ foo ], and${ foo } - Arrow parens only when needed (
x => x) - No space before function parens (
function()/foo()) - Blank line before line comments (except at block start)
- Import sorting via eslint-plugin-simple-import-sort
- ES Modules - import/export syntax with
.jsextensions
- No defensive programming except for external user input
- No lazy getters for circular deps
- Types colocate by default; centralize only when shared
- Classes use
#privatefields (noprivatekeyword) - File naming:
PascalCase.tsfor classes,_underscoreCamelCase.tsfor internal modules,camelCase.tsfor everything else - CSS uses modern nested BEM in
.cssfiles - EditorConfig: utf-8, tabs, final newline, trim trailing whitespace
- Prefer
$derived/$derived.byover$effect
const { data, children } = $props()
{@render children?.()}- Minimal changes - only what's requested
- Read before edit - open files before modifying
- Lint before commit - run
pnpm lintwhen changes are made
- Shared macOS/Linux checkouts should use
core.filemode=false; chmod-only changes will not be noticed reliably. - When a script must be executable, run
git update-index --chmod=+x path/to/script.shand include that in the commit.