|
| 1 | +# Memory Maintenance |
| 2 | + |
| 3 | +## Discovery Model |
| 4 | + |
| 5 | +- Core principle: progressive discovery through references, building a graph of memories. |
| 6 | +- Initially, agents are provided with the list of all memories (names only). |
| 7 | +- Agents should read `mem:core` as the top-level entry point (graph root). |
| 8 | + This memory should contain references to other memories covering major project domains. |
| 9 | + The referenced memories shall, in turn, shall contain references to even more specific memories, and so on. |
| 10 | + The depth of the graph shall depend on the project complexity. |
| 11 | +- Use topics/folders to group related memories in order to make the content structure explicit. |
| 12 | + Folders can mirror project structure (e.g. modules like frontend/backend) or topics like debugging, architecture, etc. |
| 13 | +- Memory references must use a mem: prefix inside backticks, e.g. `mem:frontend/core`. |
| 14 | + The surrounding text should clearly indicate when to read the memory/which content to expect. |
| 15 | + The text should provide more precise guidance than the memory name alone, |
| 16 | + i.e. avoid a reference like "frontend debugging: `mem:frontend/debugging` and instead make clear which aspects of frontend debugging are covered. |
| 17 | +- Memories themselves should not contain information about when to read them; this is the responsibility of the referring memory. |
| 18 | + |
| 19 | +## Style |
| 20 | + |
| 21 | +Dense agent notes, not prose docs. Prefer invariants, terse bullets. |
| 22 | +Avoid obvious context, rationale, and examples unless they prevent likely mistakes. |
| 23 | +Keep guidance durable and generalizable, not task-local. |
| 24 | + |
| 25 | +## Add/update threshold |
| 26 | + |
| 27 | +Add or update memories only with stable, non-obvious project conventions that avoid complex rediscovery in the future. |
| 28 | +Do not add: quick-read facts; generic language/framework knowledge; one-off task notes; volatile line-level details; behavior likely to change soon. |
| 29 | + |
| 30 | +## Maintenance Actions |
| 31 | + |
| 32 | +- Renaming memories: References are updated automatically if handled via Serena's memory rename tool. |
| 33 | +- Checking for stale memories (e.g. after deletion): Call `serena memories check` for a report. |
0 commit comments