Memories

Memory files provide persistent context that Reliant uses in every conversation. They’re markdown files that tell the AI about your coding style, project conventions, and preferences—information that applies across all your interactions.

How Memories Work

LevelLocationApplies to
Global~/.reliant/reliant.mdAll projects
Projectreliant.md in project rootThat project only

Both files are loaded automatically. Project memory takes precedence when there’s overlap.

Global Memory

Global memory applies to everything you do in Reliant, regardless of which project you’re working in.

Location: ~/.reliant/reliant.md

Good for:

  • Personal coding style preferences
  • Universal patterns you always follow
  • Tools and frameworks you commonly use
  • Communication preferences

Example:

# My Coding Style

## Preferences
- Use meaningful variable names over abbreviations
- Prefer composition over inheritance
- Write tests for new functionality

## Common Patterns
- Use table-driven tests in Go
- Prefer async/await over callbacks in JavaScript
- Use dependency injection for testability

Project Memory

Project memory is specific to a single codebase. It’s the right place for conventions that only apply to that project.

Location: reliant.md in your project root

Good for:

  • Project architecture overview
  • Tech stack details
  • Team conventions and standards
  • Directory structure explanations
  • Common patterns used in this codebase

Example:

# MyApp

## Tech Stack
- Go 1.21 with chi router
- PostgreSQL with sqlc for queries
- React 18 frontend with TypeScript
- Docker for local development

## Architecture
- `cmd/` - Application entrypoints
- `internal/api/` - HTTP handlers
- `internal/db/` - Database access
- `internal/services/` - Business logic
- `web/` - React frontend

## Conventions
- Handlers return errors, middleware handles responses
- Use context for request-scoped values
- Database queries go through the repository interface
- Tests use testify for assertions

## Common Tasks
- Run `make dev` to start local environment
- Run `make test` to run all tests
- Database migrations are in `migrations/`

Writing Effective Memory Files

Be specific and actionable. “Write good code” doesn’t help. “Use early returns to reduce nesting” does.

Use structure. Headers help the AI find relevant information. Group related guidance together.

Include examples. Show what you mean, not just what you want.

Keep it focused. Memory files should be reference material, not documentation. A few hundred lines is plenty.

Update as you go. When you find yourself repeating instructions in chat, add them to your memory file.

Config as Code

Memory files are just markdown files in your filesystem. This makes them perfect for version control:

  • Check project memory into git. New team members get context automatically.
  • Share conventions. The whole team uses the same project memory.
  • Track evolution. See how project conventions changed over time.
# Add to your repo
git add reliant.md
git commit -m "Add Reliant memory with project conventions"

Related Topics