Home › Next.js › Next.js Windsurf rules
Next.js Windsurf rules
Windsurf (Cascade) workspace rules for Next.js + shadcn/ui projects.
WindsurfNext.js
How to use
Save this as .windsurf/rules/nextjs.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.
.windsurf/rules/nextjs.mdDownload # Windsurf rules — Next.js + shadcn/ui
- Stack: Next.js App Router, TypeScript strict, Tailwind, shadcn/ui, pnpm.
- Add UI primitives with `pnpm dlx shadcn@latest add <component>`; never hand-copy shadcn source from memory.
- Compose from `components/ui/*`; app-specific components go in `components/`.
- Forms: react-hook-form + zod resolver + shadcn `<Form>`.
- Server Components by default; client components only when interactive.
- Keep accessible markup: labels on inputs, buttons are `<button>`, links are `<Link>`.
- When you change more than 3 files, list the plan first and wait for confirmation.
- After edits run `pnpm lint && pnpm build` and report the result.