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
Refactor Ralph session tracking with KV-backed session mapping and configurable TTL (#172)
* Fix Ralph state type safety and null handling in status commands
* Refactor Ralph to use worktree-keyed session mapping instead of sessionId lookups
* Add configurable KV TTL with 7-day default and update agent prompts
* Add --limit flag to CLI status and improve null safety for RalphState fields
* Bump memory package version to 0.0.25
You have access to a project-scoped key-value store with 24-hour TTL for ephemeral state:
62
+
You have access to a project-scoped key-value store with 7-day TTL for ephemeral state:
63
63
- \`memory-kv-set\`: Store planning progress, research findings, or any project state
64
64
- \`memory-kv-get\`: Retrieve previously stored state
65
65
- \`memory-kv-list\`: See all active entries for the project
66
66
67
-
KV entries are scoped to the current project and expire after 24 hours. Use this for state that needs to survive compaction but isn't permanent enough for memory-write.
67
+
KV entries are scoped to the current project and expire after 7 days. Use this for state that needs to survive compaction but isn't permanent enough for memory-write.
Copy file name to clipboardExpand all lines: packages/memory/src/agents/auditor.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -149,17 +149,17 @@ Example:
149
149
150
150
The KV store upserts by key, so storing a finding for the same file:line automatically updates the previous entry. No dedup checks needed.
151
151
152
-
When the calling agent reports that a finding has been fixed, update the finding by calling \`memory-kv-set\` with the same key and the status changed to "resolved" with a resolution date added.
152
+
When a previously open finding has been addressed by the current changes, **delete it** using \`memory-kv-delete\` with the same key. Do not re-store resolved findings — removing them keeps the KV store clean and avoids extending the TTL on stale data.
153
153
154
-
Findings expire after 24 hours automatically. If an issue persists, the next review will re-discover it.
154
+
Findings expire after 7 days automatically. If an issue persists, the next review will re-discover it.
155
155
156
156
## Retrieving Past Findings
157
157
158
158
At the start of every review, before analyzing the diff:
159
159
1. Call \`memory-kv-list\` to get all active KV entries for the project
160
160
2. Filter entries with keys starting with \`review-finding:\` that match files in the current diff
161
161
3. If open findings exist for files being changed, include them under a "### Previously Identified Issues" heading before new findings
162
-
4. Check if any previously open findings have been addressed by the current changes — if so, update their status to "resolved" via \`memory-kv-set\` with the same key
162
+
4. Check if any previously open findings have been addressed by the current changes — if so, delete them via \`memory-kv-delete\` with the same key
Copy file name to clipboardExpand all lines: packages/memory/src/agents/code.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -79,11 +79,11 @@ You are the execution agent. Your job is to write code, not describe code.
79
79
80
80
## Project KV Store
81
81
82
-
You have access to a project-scoped key-value store with 24-hour TTL for ephemeral state:
82
+
You have access to a project-scoped key-value store with 7-day TTL for ephemeral state:
83
83
- \`memory-kv-set\`: Store ephemeral findings, planning progress, or session state
84
84
- \`memory-kv-get\`: Retrieve previously stored state
85
85
- \`memory-kv-list\`: See all active entries for the project
86
86
87
-
KV entries are scoped to the current project and expire after 24 hours. Use this for state that needs to survive compaction but isn't permanent enough for memory-write.
87
+
KV entries are scoped to the current project and expire after 7 days. Use this for state that needs to survive compaction but isn't permanent enough for memory-write.
0 commit comments