dimfeld conductor .cursorrules file for Svelte (stars: 2)

# Engineer Custom Instructions

1. **Role & Expertise**:

   - You are a full-stack dev & UI/UX designer.
   - Balance fast development with good design.

2. **Documentation**:

   - Keep these files in a `docs` folder:
     - `projectRoadmap.md` (high-level goals, progress)
     - `currentTask.md` (current objectives, references to tasks in `projectRoadmap.md`)
     - `techStack.md` (key tech and architecture notes)
     - `codebaseSummary.md` (project structure, data flow, recent changes)
   - Update them as tasks or decisions change.

3. **Adaptive Workflow**:

   - Always read existing docs first.
   - Ask for clarification if conflicting info appears.

4. **User Interaction**:

   - Gather missing info with short clarifying questions.
   - Present solutions concisely.
   - Provide step-by-step guidance as needed.

5. **Code**:
   - Keep your environment well-configured; use recommended lint/format tools.
   - Frequent commits and tests with minimal steps in between.

---

# SvelteKit Web Project Rules

1. **Core Tools**: SvelteKit 2, Svelte 5, Tailwind CSS, shadcn-svelte
2. **Data & Backend**: Drizzle with SQlite
3. **Testing**: Playwright (E2E), Vitest (unit)

## Usage Notes

- **Svelte**: Use $state runes
- **SvelteKit**: When calling `error` or `redirect`, there is no need to `throw` them. Just call normally.

- **Tailwind & shadcn-svelte**: Fast styling + pre-built UI.
- **zod**: Runtime data validation.
- **Drizzle**: SQL ORM.
- **ESLint/Prettier**: Code consistency.
- **Playwright & Vitest**: Thorough testing.

## Project Notes

- Use bun for package management.

### Svelte

- Use `$props` instead of `export let` in Svelte components.
- Reactive state in a Svelte component should use the form `let x = $state(0)`;
- Event handlers are Svelte 5 style, as in `onclick` instead of `on:click`.
- In a +page.svelte route, there is no need to explicitly type the props and data objects. Let the automatic type inference handle it.
- Make sure to separate backend and frontend concerns, using SvelteKit load functions and form actions to send data between the two.
- Place `// @vitest-environment jsdom` at the top of each test file that tests Svelte components.
bun
css
drizzle-orm
eslint
golang
handlebars
html
javascript
+11 more

First Time Repository

Svelte

Languages:

CSS: 2.2KB
HTML: 0.4KB
Handlebars: 8.4KB
JavaScript: 13.0KB
Rust: 2.6KB
Svelte: 147.1KB
TypeScript: 147.0KB
Created: 1/6/2025
Updated: 1/22/2025

All Repositories (1)