Windsurf Cascade Configuration Generator
ide
Windsurf
cascade.json
scaffolding
zen
Generate a production-ready cascade.json configuration for Windsurf IDE optimized for your tech stack.
By emily_r
12/8/2025
Prompt
Generate a complete cascade.json configuration file for Windsurf IDE with the following specifications:
Project Details
- Project Type: [web application / mobile app / CLI tool / library]
- Primary Framework: [Next.js 14 / React / Vue / Angular / Python/Django / etc.]
- Styling Solution: [Tailwind CSS / CSS Modules / styled-components / etc.]
- Database: [PostgreSQL / MySQL / MongoDB / Supabase / Firebase]
- Language: TypeScript (strict mode)
Code Generation Requirements
Component Standards
- Use TypeScript with strict type checking
- Functional components only (no class components)
- Props interface naming convention:
ComponentNameProps - Export default for page components, named exports for reusable components
- Include JSDoc comments for all public APIs
File Organization Rules
- Group files by feature, not by file type
- Colocate tests with their components (e.g., Button.tsx and Button.test.tsx together)
- Place shared utilities in
lib/directory - Store type definitions in
types/or colocate with relevant files - Keep component files under 250 lines (split if larger)
Import Order Convention
Enforce this import order in all files:
- React/Framework imports (e.g., React, Next.js)
- Third-party libraries (e.g., lodash, axios)
- Local component imports
- Local utility imports
- Type/interface imports
- Style imports
Naming Conventions
Strictly enforce:
- PascalCase: Components, Types, Interfaces, Enums
- camelCase: Functions, variables, object properties
- kebab-case: File names, CSS class names
- UPPER_SNAKE_CASE: Constants, environment variables
Error Handling Patterns
- Always wrap async operations in try-catch blocks
- Use error boundaries for React component errors
- Return explicit error states from API calls
- Log errors with context for debugging
- Never silently swallow errors
Performance Optimization
- Lazy load components that are not immediately visible
- Use React.memo() for components with expensive render logic
- Implement proper loading and skeleton states
- Optimize all images using framework-specific image components
- Avoid unnecessary re-renders with proper dependency arrays
Code Style Preferences
- Prioritize code readability over clever one-liners
- Use descriptive, self-documenting variable names
- Prefer explicit over implicit behavior
- Add inline comments only for complex logic that isn't self-evident
- Keep functions focused and single-purpose (under 50 lines ideally)
Testing Requirements
- Colocate test files with source files
- Write unit tests for all utility functions
- Include integration tests for critical user flows
- Aim for 80%+ code coverage on business logic
Additional Project-Specific Rules
[Add any custom rules specific to your project here, such as:]
- API endpoint patterns
- Authentication/authorization approach
- State management preferences (e.g., Zustand, Redux, Context)
- Form handling library (e.g., React Hook Form, Formik)
Generate the complete cascade.json configuration file that Windsurf IDE will use to provide context-aware, consistent code generation and assistance.
Tags
windsurf
cascade
ai-ide
configuration
Tested Models
claude-3-5-sonnet
gpt-4