Agent memory¶
dokimi memory treats an agent's memory store as a subject (tracking issue
#728). The first reader is Claude Code auto memory,
~/.claude/projects/<project>/memory/: a MEMORY.md index whose first 200 lines or 25KB load at
every session start, and one topic file per memory with YAML frontmatter (name, description,
type: user, feedback, project or reference). Files under archive/ are read and counted, but not checked and never expected in the index. An archive/ directory that cannot be listed is an input error (exit 2), not a smaller store.
memory lint¶
dokimi memory lint ~/.claude/projects/<project>/memory
dokimi memory lint ~/.claude/projects/<project>/memory --json --fail-on warn
No model call. Each finding has a rule, a severity, a file and a line:
| rule | severity | what |
|---|---|---|
index-dead-link |
fail | the index links a file that does not exist, a directory, or a path outside the memory directory (code spans, fenced and indented code blocks and HTML comments hold no link; an escaped \[ opens none; tel: and other URI schemes are not files; a reference definition that no link uses is not checked, but its file is not an orphan; a definition-shaped line directly under a prose line is still read as a definition, though Markdown would not render it as one) |
index-over-limit |
fail | the index is past the load limit (200 lines or 25KB, as Claude Code loads it) |
index-near-limit |
warn | over 80% of the limit |
index-missing |
warn | no MEMORY.md |
index-orphan |
warn | a top-level file the index never links |
frontmatter-missing, frontmatter-invalid, frontmatter-field |
warn | no frontmatter, not YAML, no name/description/type |
type-unknown |
warn | a type other than the four |
name-duplicate |
warn | two files share a name |
relative-date |
warn | "today", "next week", "вчера" on a line with no YYYY-MM-DD date (code spans, fenced blocks and HTML comments skipped) |
wikilink-dangling |
note | [[x]] matches no file stem or name (- and _ fold) |
index-stray-separator |
note | :,, ,, or a trailing , in an index line |
Exit 0 when there is no fail (no warn either with --fail-on warn), 1 otherwise, 2 when the path is
not a memory directory or its MEMORY.md cannot be read.