Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 2.27 KB

CLAUDE.md

File metadata and controls

71 lines (53 loc) · 2.27 KB

AGENTS.md

Guidance for AI coding agents. See agents.md spec.

Quick Reference

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)

Tech Stack

Layer Tech
Framework Svelte 5 + SvelteKit (demo app)
Language TypeScript (strict)
Build svelte-package + Vite
Testing Vitest
Lint/Format ESLint (@stylistic, simple-import-sort)

Code Style

  • 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 .js extensions

Project Conventions

  • No defensive programming except for external user input
  • No lazy getters for circular deps
  • Types colocate by default; centralize only when shared
  • Classes use #private fields (no private keyword)
  • File naming: PascalCase.ts for classes, _underscoreCamelCase.ts for internal modules, camelCase.ts for everything else
  • CSS uses modern nested BEM in .css files
  • EditorConfig: utf-8, tabs, final newline, trim trailing whitespace

Svelte

  • Prefer $derived/$derived.by over $effect

Svelte 5 Runes

const { data, children } = $props()
{@render children?.()}

Agent Behavior

  • Minimal changes - only what's requested
  • Read before edit - open files before modifying
  • Lint before commit - run pnpm lint when changes are made

Shared-Folder Git

  • 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.sh and include that in the commit.