| title | Project memory | ||
|---|---|---|---|
| description | Save lessons about each project and how you work, and choose what travels through Git. | ||
| mdx |
|
import { Card, CardGroup, Steps, Step, Tip, Note, Warning, Screenshot, Flow, NextSteps } from "@site/src/components/kit";
Save decisions, fixes, constraints and working preferences for your agents to reuse, such as "Keep database migrations short and retry busy locks."
<Flow label="How a saved lesson reaches an agent" nodes={[ { icon: "file-text", label: "Save a lesson", detail: "A task or agent records something worth reusing" }, { icon: "search", label: "Find it locally", detail: "Search matches words, meaning and file paths" }, { icon: "message-square", label: "Use it in context", detail: "Your agent receives the relevant lesson" }, ]} />
Claude Code, Codex, Pi, OpenCode, Grok and GitHub Copilot receive pinned and matching lessons, and all but Grok again after compaction. `memory_search`, `memory_read`, `memory_save` and `memory_keep`; Antigravity and any other agent use the [command line](#command-line). Verify records decisions, fixed findings and amendments, never without recorded passing checks.A changed file marks a lesson for rechecking. If hooks are off, unavailable or too slow, delivery can be skipped; your agent searches when earlier decisions matter. The task's Memory record in Files shows what was used and saved.
Lessons are reference data, never instructions: your agent checks them against the current code.
Personal lessons apply across repositories on this computer and never go to Git. Find them under Settings › Memory › Yours · every project.
In Settings › Memory, search, edit or retire lessons, and pin up to five per project and five personal ones. Use Still true after checking changed files. Stale lessons retire after 90 days and can be restored. Lessons in every session turns off automatic delivery; you can also pause memory.
Lessons and the search model stay on your computer; no lesson goes to an embedding service. A lesson given to your agent becomes part of its context, and a cloud agent may send that context to its provider. Agent and session attribution stays local when lessons go to Git.
In **Manage projects**, enable **Store project lessons in Git** for the repository. It is off by default and applies to this computer. **Export** writes eligible lessons to `docs/memories/` with a readable `LESSONS.md`, beside `docs/plans/`. The local store stays the source. Files in an older `.qualitylayer/memories/` move there on the next export; you commit the move. Review the files, then commit and push them yourself. Memory exchange never commits, pushes or pulls.
Anyone who can read the repository can read exported lessons. Personal preferences, credentials, private task answers, Pilot imports and session attribution stay out, and a privacy filter checks the files, but review them anyway.
Turning sharing off stops exchange and leaves committed files in place.
Choose Restore from repository in the project where you want the lessons. Your agent treats them as untrusted until it checks them against the current code. Search, startup and export never import by themselves.
Imports keep each lesson's history, and a missing file never retires a local lesson. If two computers changed the same lesson, both stay: choose one with Compare versions and Use selected version before you export again.
Pilot Shell memories import per project: see From Pilot Shell.
Search, save, pin and sync from the command line
qualitylayer memory context "database migration locks" --json
qualitylayer memory store --title "Bound migration locks" --content "Keep migration locks short, because a waiting migration blocks every write." --kind pattern --file db/migrations --json
qualitylayer memory store --about you --title "Prefer concise replies" --content "Keep replies short unless I ask for detail." --json
qualitylayer memory pin <id> --json
qualitylayer memory share on --json
qualitylayer memory export --json
qualitylayer memory import --json
qualitylayer memory conflicts --json
qualitylayer memory reconcile <id> --revision <revision> --candidate local --jsonAll commands: reference.
<NextSteps items={[ { title: "Settings", href: "/docs/reference/settings", text: "Memory and the other settings." }, { title: "Files and privacy", href: "/docs/reference/files#privacy", text: "What stays on your computer and what leaves it." }, ]} />