AI SummaryA comprehensive ruleset for Windsurf that enforces TypeScript/Node.js best practices, code style standards, and architecture patterns for developers building AI agents with LangGraph and the Vercel AI SDK.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "EffectiveAgent — Windsurf Rules" prompt rules to my project. Repository: https://github.com/PaulJPhilp/EffectiveAgent Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Windsurf Rules for EffectiveAgent
General Code Style & Formatting
• Use English for all code and documentation. • Always declare the type of each variable and function (parameters and return value). • Avoid using any. • Create necessary types. • Use JSDoc to document public classes and methods. • Don't leave blank lines within a function. • One export per file.
Naming Conventions
• Use PascalCase for classes. • Use camelCase for variables, functions, and methods. • Use kebab-case for file and directory names. • Use UPPERCASE for environment variables. • Avoid magic numbers and define constants.
Functions & Logic
• Keep functions short and single-purpose (<20 lines). • Avoid deeply nested blocks by: • Use early returns. • Extract logic into utility functions. • Use higher-order functions (map, filter, reduce) to simplify logic. • Use arrow functions for simple cases (<3 instructions), named functions otherwise. • Use default parameter values instead of null/undefined checks. • Use RO-RO (Receive Object, Return Object) for passing and returning multiple parameters.
Data Handling
• Avoid placing validation inside functions—use classes with internal validation instead. • Prefer immutability for data: • Use readonly for immutable properties. • Use as const for literals that never change. • Use type guards to validate data types. • Prefer 'for...of' loops over 'forEach' for iteration.
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts