Skip to main content
The Knowledge section allows you to provide Leo with project-specific context through instructions and memories. This helps Leo make better decisions and follow your preferences consistently.

Instructions & Guidelines

Instructions are saved in a LEO_RULES.md file at the root of your project. Leo reads this file at the start of each conversation to understand your project’s requirements.

What to Include

  • Project-specific rules - “Always use TypeScript strict mode”
  • Coding style preferences - “Use 2-space indentation”, “Prefer arrow functions”
  • Naming conventions - “Use camelCase for variables, PascalCase for components”
  • External documentation - Links to design systems or API docs
  • Business logic - Key rules Leo should always follow

How to Use

  1. Go to SettingsKnowledge
  2. Enter your instructions in the text area
  3. Click Save
Leo will automatically read these instructions at the start of each conversation.

Example Instructions

## Project Guidelines

### Tech Stack
- Framework: React with TypeScript
- Styling: Tailwind CSS
- State: React Query for server state

### Coding Style
- Use arrow functions for components
- Always add proper TypeScript types
- Use 2-space indentation
- Prefer named exports

### UI/UX
- Default to dark mode
- Use blue (#0066CC) as primary color
- Show loading spinners for async operations
- Display error messages below form fields

### Business Rules
- All prices in EUR
- Date format: DD/MM/YYYY
- Language: French for user-facing text

Project Memories

Memories are pieces of information that Leo remembers across all conversations. They’re perfect for context that should always be applied. Learn more about Project Memories

When to Use Each

Use CaseInstructionsMemories
Coding standardsYes-
Business rulesYesYes
Company info-Yes
Design preferencesYesYes
Technical requirementsYes-
Quick facts-Yes

Instructions vs Memories

  • Instructions - Detailed guidelines and rules (technical, structured)
  • Memories - Quick facts and preferences (simple, contextual)

Best Practices

  1. Be specific - Vague instructions lead to inconsistent results
  2. Keep it concise - Focus on what matters most
  3. Update regularly - Adjust as your project evolves
  4. Use examples - Show Leo what good output looks like
  5. Organize with sections - Use markdown headers for clarity

Inspiration

Need ideas for your instructions? Check out the Aider Conventions Repository for community-contributed examples.