Skip to content

Commit d5c33fd

Browse files
Update memory README and fix normalizeConfig bug
1 parent 5c04eee commit d5c33fd

2 files changed

Lines changed: 51 additions & 10 deletions

File tree

packages/memory/README.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The local embedding model downloads automatically on install. For API-based embe
3535
- **Automatic Memory Injection** - Injects relevant project memories into user messages via semantic search with distance filtering and caching
3636
- **Project KV Store** - Ephemeral key-value storage with TTL management for project state
3737
- **Bundled Agents** - Ships with Code, Architect, and Librarian agents preconfigured for memory-aware workflows
38-
- **CLI Tools** - Export, import, list, stats, and cleanup commands via `ocm-mem` binary
38+
- **CLI Tools** - Export, import, list, stats, cleanup, upgrade, status, and cancel commands via `ocm-mem` binary
3939
- **Dimension Mismatch Detection** - Detects embedding model changes and guides recovery via reindex
4040

4141
## Agents
@@ -72,19 +72,20 @@ Ephemeral key-value storage for project state with automatic TTL-based expiratio
7272

7373
| Tool | Description |
7474
|------|-------------|
75-
| `memory-kv-set` | Store a value with optional TTL (default 24 hours) |
75+
| `memory-kv-set` | Store a value with optional TTL (default 7 days) |
7676
| `memory-kv-get` | Retrieve a value by key |
77-
| `memory-kv-list` | List all active KV entries for the project |
77+
| `memory-kv-list` | List all active KV entries for the project. Optionally filter by key prefix. |
78+
| `memory-kv-delete` | Delete a key-value pair by key |
7879

7980
### Ralph Loop Tools
8081

8182
Iterative development loops with automatic auditing. Runs in an isolated git worktree by default, or in the current directory with `inPlace`.
8283

8384
| Tool | Description |
8485
|------|-------------|
85-
| `ralph-cancel` | Cancel an active Ralph loop and clean up the worktree |
86-
| `ralph-status` | Check status of active Ralph loops |
87-
| `memory-plan-ralph` | Execute an architect plan using a Ralph iterative loop |
86+
| `ralph-cancel` | Cancel an active Ralph loop by worktree name |
87+
| `ralph-status` | Check status of Ralph loops. Supports `restart` to resume inactive loops. |
88+
| `memory-plan-ralph` | Execute an architect plan using a Ralph iterative loop. Supports `inPlace` parameter. |
8889

8990
## Slash Commands
9091

@@ -182,6 +183,40 @@ ocm-mem cleanup --all --project my-project
182183
| `--dry-run` | Preview what would be deleted without deleting |
183184
| `--force` | Skip confirmation prompt |
184185

186+
#### upgrade
187+
188+
Check for plugin updates and install the latest version.
189+
190+
```bash
191+
ocm-mem upgrade
192+
```
193+
194+
#### status
195+
196+
Show Ralph loop status for the current project.
197+
198+
```bash
199+
ocm-mem status
200+
ocm-mem status --project my-project
201+
```
202+
203+
| Flag | Description |
204+
|------|-------------|
205+
| `--project, -p <name>` | Project name or SHA (auto-detected from git) |
206+
207+
#### cancel
208+
209+
Cancel a Ralph loop by worktree name.
210+
211+
```bash
212+
ocm-mem cancel my-worktree-name
213+
ocm-mem cancel --project my-project my-worktree-name
214+
```
215+
216+
| Flag | Description |
217+
|------|-------------|
218+
| `--project, -p <name>` | Project name or SHA (auto-detected from git) |
219+
185220
## Configuration
186221

187222
On first run, the plugin automatically copies the bundled config to your config directory:
@@ -298,20 +333,25 @@ When enabled, logs are written to the specified file with timestamps. The log fi
298333
- `ralph.cleanupWorktree` - Auto-remove worktree on cancel (default: `false`)
299334
- `ralph.defaultAudit` - Run auditor after each coding iteration by default (default: `true`)
300335
- `ralph.model` - Model override for Ralph sessions (`provider/model`), falls back to `executionModel` (default: `""`)
336+
- `ralph.stallTimeoutMs` - Watchdog stall detection timeout in milliseconds (default: `60000`)
301337
- `ralph.minAudits` - Minimum audit iterations required before completion (default: `1`)
302338

339+
#### Top-level
340+
- `defaultKvTtlMs` - Default TTL for KV store entries in milliseconds (default: `604800000` / 7 days)
341+
303342
#### Auditor
304343
- `auditorModel` - Model override for the auditor agent (`provider/model`). When set, overrides the auditor agent's default model. When not set, uses platform default (default: `""`)
305344

306345
## architect → code Workflow
307346

308347
Plan with a smart model, execute with a fast model. The architect agent researches and designs; the code agent implements.
309348

310-
After the architect presents a plan, the user approves via one of three execution modes:
349+
After the architect presents a plan, the user approves via one of four execution modes:
311350

312-
- **Approve plan** — Creates a new Code session via `memory-plan-execute`
313-
- **Execute with Ralph loop** — Runs the plan in an isolated worktree with iterative coding/auditing via `memory-plan-ralph`
314-
- **Ralph in place** — Same as Ralph loop but runs in the current directory (no worktree isolation)
351+
- **New session** — Creates a new Code session via `memory-plan-execute`
352+
- **Execute here** — Executes the plan in the current session (code agent takes over immediately)
353+
- **Ralph (worktree)** — Runs the plan in an isolated git worktree with iterative coding/auditing via `memory-plan-ralph`
354+
- **Ralph (in place)** — Same as Ralph worktree but runs in the current directory (no worktree isolation)
315355

316356
Set `executionModel` in your config to a fast model (e.g., Haiku) and use a smart model (e.g., Opus) for the architect session.
317357

packages/memory/src/setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export function loadPluginConfig(): PluginConfig {
129129
function normalizeConfig(config: PluginConfig): PluginConfig {
130130
const normalized: PluginConfig = {
131131
dataDir: config.dataDir,
132+
defaultKvTtlMs: config.defaultKvTtlMs,
132133
embedding: config.embedding,
133134
dedupThreshold: config.dedupThreshold,
134135
logging: config.logging,

0 commit comments

Comments
 (0)