Memory commands
memory
Check, list, locate, and repair shared memory for the project the working directory is in. Every subcommand finds the project from any folder below its root: the nearest folder, from the working directory up, with a config or a memory folder. The search stops at the root of the Git checkout, which is the project when nothing is found. From a subfolder, lint and index print paths from the working directory, or in full when the working directory is reached through a link. The command checks project memory in .agnostic-ai/memory/ before personal memory in .agnostic-ai/local/memory/. With memory.personal: repo, it uses the shared personal folder. Missing folders are skipped. When neither folder exists, lint, list, and index print No memory store found and exit 0; --quiet hides that line for list and index.
agnostic-ai memory lint # run only the memory checks
agnostic-ai memory index # rebuild each MEMORY.md from its fact files
agnostic-ai memory list # print each fact's scope, type, and title
agnostic-ai memory path # print each memory folder's absolute path
agnostic-ai memory import --from claude # copy facts from another memory store
memory lintreports LINT039 to LINT044 and LINT067, the memory findingslintanddoctoralso report. It exits 1 on an error, or on a warning with--strict, and exits 0 when no memory folder exists.--jsonprints thelint --jsonformat withcommandset tomemory lint.memory indexdrops merge conflict markers, links to missing files, and repeated links, keeping every other line. It then adds a- [name](file.md): descriptionline, from the fact's YAML fields, for each fact without one. With thememorybuilt-in on, it creates a missing project index, empty when there are no facts (LINT067). It prints one status line per index, which--quietdrops.memory listprints facts in index order, titled by the index line's link text, or the fact'snamewhen no line links it. The type comes frommetadata.type, or a top-leveltypeas Claude Code's auto memory writes it. With no fact it printsNo facts..memory pathprints onescope folderline per memory folder, project first, as absolute paths, even for a folder not created yet. It works from any folder in the project and from a linked worktree; withmemory.personal: repo, every worktree gets the same personal folder. Tools without a session-start hook run it, as theshared-memory-policyrule asks.memory importcopies fact files into personal memory, which every tool reads, and adds their index lines.--from claudereads Claude Code's store from before sync pointed it at personal memory;--from checkoutand--from reporead the other personal folder after amemory.personalswitch;--pathreads any folder with aMEMORY.mdand one file per fact.
How memory import copies, skips, and records facts
The source stays unchanged, and so does an existing destination file. Source index lines that link no fact become a fact of their own (claude-index-notes.md for --from claude). Symlinks and files with a line that looks like a secret are skipped and named. An identical fact without an index line gets its line back, so a rerun finishes an interrupted import.
Import refuses a personal folder holding tracked files, and first adds the checkout folder to Git's exclude list if Git would track it. It records handled facts in .imported there, so LINT043 stops counting facts you later delete or merge.
To leave a fact behind, decline it. --skip <file> declines one fact and --skip-rest declines every fact not imported yet. Without --only, they copy nothing. Import records each decline in .declined in personal memory, with a checksum of the fact. LINT043 stops counting a declined fact, and a plain import or sync leaves it out. If the fact changes in the source, it counts again. A file import cannot read is declined by name only, so a change does not bring it back. To import a declined fact, name it with --only.
| Flag | Description |
|---|---|
--strict | With memory lint, exit 1 on warnings too. |
--json | With memory lint, print {version, command, findings}. |
--from | With memory import, the store to copy from: claude, checkout, or repo. |
--path | With memory import, a folder to copy from instead of --from. |
--only | With memory import, copy only this fact file; repeat the flag for more. |
--skip | With memory import, decline this fact file so LINT043 stops counting it; repeat the flag for more. |
--skip-rest | With memory import, decline every fact not imported yet, after copying the --only picks. |
--dry-run | With memory import, list which facts are already imported, declined, and pending, and write nothing. |