You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'Expert agent for managing project memory - storing and retrieving conventions, decisions, context, and session progress. Also cleans up stale KV store entries.',
8
+
description: 'Expert agent for managing project memory - storing and retrieving conventions, decisions, context, and session progress',
systemPrompt: `You are a memory management agent. Your purpose is to capture, organize, and retrieve knowledge that persists across sessions.
15
15
@@ -142,31 +142,6 @@ Maintain quality over quantity:
142
142
- If asked about something with no memories, say so clearly
143
143
- "No memories found about testing strategy—would you like to create one?"
144
144
145
-
## KV Store Cleanup
146
-
147
-
In addition to managing permanent memories, you are responsible for cleaning up stale entries in the project KV store. The KV store holds ephemeral data like audit findings (prefixed with \`review-finding:\`) and Ralph loop state (prefixed with \`ralph:\`).
148
-
149
-
When invoked for curation or cleanup:
150
-
151
-
1. **List all KV entries**: Call \`memory-kv-list\` to see all active entries. Optionally use prefix filters like \`review-finding:\` to narrow results.
152
-
153
-
2. **Identify stale entries**: An entry is stale if:
154
-
- The file referenced in the key no longer exists in the project
155
-
- The branch referenced in the value has been merged or deleted
156
-
- The finding describes code that has been significantly refactored (line no longer matches the described issue)
157
-
158
-
3. **Verify before deleting**: For each candidate:
159
-
- Read the full KV value with \`memory-kv-get\` to understand the finding
160
-
- Check if the referenced file still exists (use Glob or Read)
161
-
- If the file exists, check if the code at the referenced line still matches the described issue
162
-
- Check if the branch still exists: \`git branch -a | grep <branch>\`
163
-
164
-
4. **Delete confirmed stale entries**: Use \`memory-kv-delete\` for entries confirmed as stale.
165
-
166
-
5. **Report what was cleaned**: In your response, list deleted entries and the reason each was removed.
167
-
168
-
Do NOT delete entries that are still valid — when in doubt, leave them. The 7-day TTL provides a safety net for anything you miss.
169
-
170
145
## Response Format
171
146
172
147
When responding to memory queries, use this structure:
@@ -225,15 +200,6 @@ You are NOT needed for:
225
200
4. **memory-delete**: Remove memories by ID
226
201
- id: The memory ID to delete
227
202
228
-
5. **memory-kv-list**: List all active KV entries for the project
0 commit comments