Memory
Memory is what makes your AI partner learn. Without it, every session starts from zero. With RaiSE memory, your AI carries forward patterns it learned, calibration data from past work, and a full session history — so it gets better the more you work together.
The Three Scopes
Section titled “The Three Scopes”Memory lives in three places, each with a different purpose:
| Scope | Location | Visibility | What goes here |
|---|---|---|---|
| Global | ~/.rai/ | All projects | Universal patterns that apply everywhere |
| Project | .raise/rai/memory/ | Shared (committed to repo) | Project-specific patterns, calibration, team knowledge |
| Personal | .raise/rai/personal/ | You only (gitignored) | Your session history, telemetry, personal learnings |
When the same concept exists in multiple scopes, personal overrides project, project overrides global. This means a team can share project patterns while each developer keeps their own session history.
The Three Types
Section titled “The Three Types”Patterns
Section titled “Patterns”Patterns are learnings captured during development. They represent what worked, what didn’t, and what to remember next time.
rai memory add-pattern "Use fixtures for database setup in tests" \ -t technical -c "pytest,testing" --from S3.5Patterns have sub-types:
- Process — workflow and collaboration patterns (e.g., “commit after each task”)
- Technical — code techniques and gotchas (e.g., “use capsys for stdout tests”)
- Architecture — design decisions and module patterns
- Codebase — project-specific conventions
Calibration
Section titled “Calibration”Calibration tracks how long stories actually take versus estimates. Over time, this builds a velocity profile that helps predict future work more accurately.
rai memory add-calibration S3.5 --name "Auth Module" -s M -a 45 -e 60This records: story S3.5 was estimated at 60 minutes (size M) but actually took 45 — a velocity of 1.33x.
Sessions
Section titled “Sessions”Sessions are a chronological record of what happened. Each session captures: what you worked on, what you accomplished, and what patterns you learned.
rai memory add-session "S3.5 Auth Module" -t story -o "JWT setup,Middleware,Tests"How Memory Compounds
Section titled “How Memory Compounds”This is the key insight: memory creates a compounding effect.
- Session 1: You discover that fixtures are better than inline setup for database tests
- Pattern captured: “Use fixtures for database setup” (technical pattern)
- Session 5: Your AI partner applies this pattern automatically — it’s in the context bundle
- Session 20: Your velocity has improved because patterns eliminate repeated discovery
The more sessions you run, the smarter the system gets. This isn’t ML or fine-tuning — it’s structured knowledge that flows into your AI’s context at session start.
The Memory Index
Section titled “The Memory Index”All memory sources merge into a single queryable index:
# Build the unified indexrai memory build
# Query itrai memory query "testing patterns" --types pattern
# List all conceptsrai memory list --memory-onlyThe index is a JSON file (.raise/rai/memory/index.json) that combines patterns, calibration, sessions, governance, work tracking, and skills into one graph. See Knowledge Graph for how this graph works.
Key Commands
Section titled “Key Commands”| Command | What it does |
|---|---|
rai memory build | Build unified index from all sources |
rai memory query | Search memory for relevant concepts |
rai memory list | List all concepts in the index |
rai memory add-pattern | Record a learned pattern |
rai memory add-calibration | Record story timing data |
rai memory add-session | Record a session |
rai memory validate | Check index integrity |
See the CLI Reference for full details on each command.