...

/

Advanced Flow Awareness: Memories and Rules

Advanced Flow Awareness: Memories and Rules

Learn about two powerful features of Windsurf: Memories and rules.

Have you ever felt like you’re explaining the same thing to your AI assistant over and over? You start a new chat session, and suddenly the AI has no idea that your project is written in TypeScript, uses the React framework, or that you have a strict policy about not using default exports. It’s like onboarding a new junior developer every single morning, one with severe short-term memory loss.

This amnesiac AI problem is one of the biggest sources of friction in AI-assisted development. Constant re-explanation breaks your flow and undermines the promise of a seamless partnership.

This lesson introduces the cure. We’re going to explore two of Windsurf’s most powerful features, Memories and Rules. These systems allow you to give your AI co-pilot a permanent brain for your project, transforming it from a brilliant but forgetful tool into a true, long-term, project-aware collaborator.

Giving the AI a brain with Memories

First, let’s tackle the problem of factual recall. Memories are Cascade’s long-term knowledge base for your project. Think of them as a collection of crucial facts, a project-specific cheat sheet that the AI can reference at any time, so you don’t have to constantly repeat yourself.

Cascade is smart enough to create some of these on its own. As you work, you might observe patterns and automatically generate a memory like Project Language: JavaScript or Primary Dependency: React.

The real power, however, comes when you take control. You can manually create memories to encode critical, high-level information about your project’s architecture or key technologies. Let’s test it out.

Imagine we are working on a game that uses three.js as its rendering engine.

  1. Let’s add a crucial fact about our game’s rendering engine. In the Cascade input box, type: “Remember this: The game’s core rendering logic is built using the Three.js library.”

  2. Cascade will auto-generate a memory for us.

  3. In the Cascade panel, click the “Customizations” icon (it looks like a book) in the top right menu.

  4. Navigate to the Memories tab.

  5. This is where we can view and delete the saved memories.

Press + to interact
Cascade auto-generating a memory
1 / 2
Cascade auto-generating a memory

What did we just accomplish? We’ve given the AI a permanent piece of high-level context. Now, let’s see the payoff.

Imagine asking this vague question before creating the memory:

“How would I change the background color in my project?”

The AI, lacking specific context, would likely give a generic CSS answer, like body { background-color: #somecolor; }, which is useless for our Three.js canvas.

Now, ask the same question after the memory is active: ...