1 svelte rules available
One Windsurf rule matches svelte: a Svelte development rule covering SvelteKit and TypeScript. Windsurf's rules documentation now redirects to Devin docs, which use .devin/rules/; legacy .windsurfrules files are still imported. The glob-triggered file targets .svelte files, rune modules and route files.
Windsurf's rules documentation (docs.windsurf.com/windsurf/cascade/memories) now redirects to Devin documentation, which describes rules for the Devin Local agent in Devin Desktop. Current rules live in .devin/rules/*.md with a trigger setting, and the legacy Windsurf files (.windsurf/rules/*.md, .windsurf/global_rules.md and .windsurfrules) are still imported by default. AGENTS.md files are read as always-on rules.
.devin/rules/svelte.mdStarting point, not a tested configuration for your repository. Applied when files matching globs are involved (trigger: glob). Review the instructions, adapt the file paths and run your project's existing checks.
--- trigger: glob globs: "**/*.svelte,**/*.svelte.ts,**/*.svelte.js,src/routes/**/*.ts" --- # Svelte instructions for Windsurf ## Focus for this project - Use use:enhance on forms that post to form actions so they work without JavaScript and improve with it. - Return validation errors from actions with fail() and show them next to the fields. - Use the syntax that matches the installed Svelte major version. ## Svelte conventions - Check the svelte version in package.json. On Svelte 5 use runes ($state, $derived, $props, $effect); on Svelte 4 keep export let and $: and do not mix the two styles in one component. - Prefer $derived over $effect for values computed from state; use $effect only to synchronize with something outside Svelte. - In SvelteKit, load data in +page.server.ts or +page.ts load functions and handle form posts with form actions, not ad-hoc fetch calls in onMount. - Put reusable reactive state in .svelte.ts modules so runes are available there. ## Before you finish - Run npx svelte-check (or the project's check script) and the test script and report the actual output. If you cannot run them, say so and list the exact commands instead of saying they pass. - Summarize which of the rules above affected the change. - If a legacy .windsurfrules or .windsurf/rules file gives conflicting guidance, point out the conflict instead of silently choosing one.
Create your own Windsurf rules for Svelte and share with the community.
Ask for a small change to one matching file. Check the tool's loaded context or instruction view, inspect the diff for the requested convention, and run the relevant build or test. A well-formatted file does not guarantee the model follows every instruction.
The docs recommend keeping rules short and specific. The current docs say AGENTS.md, AGENTS.local.md and AGENT.md are read as always-on rules, including files in subdirectories. Use .devin/rules/ when you need glob, model-decision or manual triggers.
Documentation checked 2026-11-05: Devin docs: Local customizations (redirect target of Windsurf memories docs)Windsurf docs: Cascade memories (redirects)
Illustrative input and expected result. This example is a verification guide, not a recorded model run.
You use the Windsurf agent on a SvelteKit app and want progressive enhancement for forms.
Add a login form that posts to a form action.
+page.server.ts with a login action returning fail(400) on bad input, +page.svelte with use:enhance and field errors, and svelte-check output.
Content reviewed 2026-11-05. Confirm instruction activation in your installed client before relying on it.