Introduction to Rules, Memories, & Workflows
Learn how to use Rules, Memories, & Workflows to customize Cascade behavior
Intro to Rules, Workflows & Memories
Windsurf uses Rules, Workflows, and Memories to understand and adapt to your unique coding standards and practices.
Accessing Customization Settings:
- • Click the "Manage" button (often an open book icon) to access settings for Rules, Memories, and Workflows.
Rules: Structuring Cascade's Output
- • Purpose: Ensure Cascade's output adheres to your organization's standards.
- • Global Rules: Apply across all your Windsurf IDE instances.
- • Example: "Always use Tailwind CSS instead of regular CSS."
- • Workspace Rules: Apply only to the current workspace/project.
- • Example: Define Java best practices for files matching
*.java
using a glob pattern.
- • Example: Define Java best practices for files matching
- • (More on Rules in a future video.)
Workflows: Automating Repetitive Tasks
- • Purpose: Define a series of steps for Cascade to execute for common, repetitive tasks.
- • Example: Pushing code to GitHub, deploying a service, or reviewing a PR.
- • Trigger: Use slash commands (e.g.,
/deploy-service
). - • (More on Workflows in a future video.)
Memories: Retaining Context
- • Purpose: Allow Cascade to remember relevant context from your interactions for future prompts.
- • This includes coding conventions, architectural decisions, project details, etc.
- • Example: After explaining code in a repository, you can prompt Cascade to "remember this," and it will store that understanding as a memory for future use.
Discovering Community Contributions: windsurf.run
- • windsurf.run: A community platform to discover Rules, MCPs (Model Context Protocol items), and more.
- • You can filter by language, see what other developers are using, and adapt best practices for your own needs.
These features help tailor Windsurf to your specific development environment, making AI assistance more accurate and relevant.
Global Rules: Apply across all your projects and conversations.
Team Rules: Share rules with your team members for consistent behavior.
Best Practices
- • Review memories periodically to ensure they're still accurate
- • Write clear, specific rules rather than vague guidelines
- • Use rules for consistent code formatting and architecture decisions
- • Share important rules with your team for standardized workflows
Rule Examples
- • "Use our company's logging library for all error handling"
- • "Always include unit tests when creating new functions"
- • "Follow the MVC pattern for new backend endpoints"
Rules and Memories make Cascade more personalized and consistent with your development practices.