Define the rules, shape the memory

Software Development with Cursor

Francesca Donadoni

AI Curriculum Manager, DataCamp

Cursor Rules

rules in cursor

Software Development with Cursor

Types of Cursor Rules

$$

  • 📄 Project Rules: .cursor/rules, scoped to your codebase
  • 👤 User Rules: apply across all our projects
  • 🤝 Team Rules: shared standards managed from the dashboard
  • 🤖 AGENTS.md: markdown-based agent instructions for lightweight configuration

$$

Rules provide persistent context

Software Development with Cursor

Types of Cursor Rules

$$

  • 📄 Project Rules: .cursor/rules, scoped to your codebase
  • 👤 User Rules: apply across all our projects
  • 🤝 Team Rules: shared standards managed from the dashboard
  • 🤖 AGENTS.md: markdown-based agent instructions for lightweight configuration

$$

Rules provide persistent context ➡️ helping to get consistent results

Software Development with Cursor
Software Development with Cursor

Nesting Rules

nesting rules

Software Development with Cursor

Best practices of defining rules

$$

  • 🎯 Focused and actionable

$$

  • ✂️ Large rules split into smaller ones

$$

  • 💡 Clear examples to guide the AI assistant
Software Development with Cursor

Defining Agent instructions

the agents.md file

Software Development with Cursor

Memory in Cursor

  • Memory:
    • Automatically picks up preferences
    • Stores key details to maintain consistency

memory in cursor

Software Development with Cursor

Cursor settings

rules and memories

Software Development with Cursor

How are memories created?

$$

  • 👁️ Sidecar observation:
    • Background model
    • Extracts useful details from our chats and suggests them as memories

$$

  • 🛠️ Tool calls:
    • Agent saves memories directly
    • When asked or when it detects important details
Software Development with Cursor
Software Development with Cursor

Less repetition, more creation

  • Rules + Memory ➡️ An assistant that codes like you do

rules and memory input to Cursor

Software Development with Cursor

Let's practice!

Software Development with Cursor

Preparing Video For Download...