Skip to content

Commit 2ebdb2b

Browse files
feat: v2.7.0 Multi-Runtime Portability (#24)
memory-installer crate with RuntimeConverter trait and 6 runtime converters. Plugin parser, tool mapping tables, E2E tests, adapter archival. 6 phases, 11 plans. ~3,700 LOC new installer code.
1 parent 7eb1a80 commit 2ebdb2b

126 files changed

Lines changed: 16577 additions & 14105 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.planning/MILESTONES.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Project Milestones: Agent Memory
22

3+
## v2.7 Multi-Runtime Portability (Shipped: 2026-03-22)
4+
5+
**Delivered:** Rust-based multi-runtime installer that converts canonical Claude plugin source into runtime-specific installations for 6 targets, replacing 5 manually-maintained adapter directories with a single conversion pipeline.
6+
7+
**Phases completed:** 45-50 (6 phases, 11 plans)
8+
9+
**Key accomplishments:**
10+
11+
- `memory-installer` crate with `RuntimeConverter` trait and 6 runtime converters (Claude, Gemini, Codex, Copilot, Skills, OpenCode stub)
12+
- Plugin parser with 2-level discovery (installer-sources.json → marketplace.json) and gray_matter frontmatter extraction
13+
- Centralized tool mapping tables: 11 Claude tool names mapped across 6 runtimes with compile-time exhaustive match expressions
14+
- format!-based YAML/TOML emitters with proper quoting, block scalars, and path rewriting helpers
15+
- 7 E2E integration tests proving full convert-and-write pipeline for all runtimes
16+
- 3 old adapter directories archived with README stubs (51 files, 12K+ lines removed)
17+
18+
**Known Gaps:**
19+
20+
- OC-01–06: OpenCode converter is a stub (deferred — OpenCode runtime format still evolving)
21+
22+
**Stats:**
23+
24+
- ~56,400 total LOC Rust across 15 crates
25+
- 3,700 LOC in memory-installer crate
26+
- 111 cargo tests (104 unit + 7 integration)
27+
- Timeline: 2026-03-17 → 2026-03-22 (5 days)
28+
29+
---
30+
331
## v2.5 Semantic Dedup & Retrieval Quality (Shipped: 2026-03-10)
432

533
**Delivered:** Ingest-time semantic dedup via vector similarity gate with configurable threshold, query-time stale filtering with time-decay and supersession detection, and 10 E2E tests proving the complete pipeline.
@@ -169,7 +197,7 @@
169197
**Phases completed:** 34 phases, 113 plans, 49 tasks
170198

171199
**Key accomplishments:**
200+
172201
- (none recorded)
173202

174203
---
175-

.planning/PROJECT.md

Lines changed: 52 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,12 @@
22

33
## Current State
44

5-
**Version:** v2.6 (In Progress)
6-
**Status:** Building retrieval quality, lifecycle automation, and episodic memory
5+
**Version:** v2.7 (Shipped 2026-03-22)
6+
**Status:** Planning v3.0
77

8-
## Current Milestone: v2.6 Retrieval Quality, Lifecycle & Episodic Memory
8+
**Previous version:** v2.6 (Shipped 2026-03-16) — BM25 hybrid wiring, salience/usage decay, lifecycle automation, observability RPCs, episodic memory
99

10-
**Goal:** Complete hybrid search, add ranking intelligence, automate index lifecycle, expose operational metrics, and enable the system to learn from past task outcomes.
11-
12-
**Target features:**
13-
- Complete BM25 hybrid search wiring (currently hardcoded `false`)
14-
- Salience scoring at write time + usage-based decay in retrieval ranking
15-
- Automated vector pruning and BM25 lifecycle policies via scheduler
16-
- Admin observability RPCs for dedup/ranking metrics
17-
- Episodic memory — record task outcomes, search similar past episodes, value-based retention
18-
19-
**Previous version:** v2.5 (Shipped 2026-03-10) — semantic dedup, stale filtering, 5-CLI E2E test harness
20-
21-
The system implements a complete 6-layer cognitive stack with control plane, multi-agent support, semantic dedup, retrieval quality filtering, and comprehensive testing:
10+
The system implements a complete 6-layer cognitive stack with control plane, multi-agent support, semantic dedup, retrieval quality filtering, multi-runtime installer, and comprehensive testing:
2211
- Layer 0: Raw Events (RocksDB) — agent-tagged, dedup-aware (store-and-skip-outbox)
2312
- Layer 1: TOC Hierarchy (time-based navigation) — contributing_agents tracking
2413
- Layer 2: Agentic TOC Search (index-free, always works)
@@ -28,14 +17,15 @@ The system implements a complete 6-layer cognitive stack with control plane, mul
2817
- Layer 6: Ranking Policy (salience, usage, novelty, lifecycle) + StaleFilter (time-decay, supersession)
2918
- Control: Retrieval Policy (intent routing, tier detection, fallbacks)
3019
- Dedup: InFlightBuffer + HNSW composite gate, configurable threshold, fail-open
31-
- Adapters: Claude Code, OpenCode, Gemini CLI, Copilot CLI, Codex CLI
20+
- Installer: memory-installer crate with RuntimeConverter trait, 6 converters, tool mapping tables
21+
- Adapters: Claude Code, OpenCode, Gemini CLI, Copilot CLI, Codex CLI (via installer)
3222
- Discovery: ListAgents, GetAgentActivity, agent-filtered topics
33-
- Testing: 39 cargo E2E tests + 144 bats CLI tests across 5 CLIs
23+
- Testing: 46 cargo E2E tests + 144 bats CLI tests across 5 CLIs
3424
- CI/CD: Dedicated E2E job + CLI matrix report in GitHub Actions
3525
- Setup: Quickstart, full guide, agent setup docs + 4 wizard-style setup skills
3626
- Benchmarks: perf_bench harness with baseline metrics across all retrieval layers
3727

38-
48,282 LOC Rust across 14 crates. 5 adapters (4 plugins + 1 adapter). 4 setup skills. 39 E2E tests + 144 bats tests. Cross-CLI matrix report.
28+
~56,400 LOC Rust across 15 crates. memory-installer with 6 runtime converters. 46 E2E tests + 144 bats tests. Cross-CLI matrix report.
3929

4030
## What This Is
4131

@@ -222,29 +212,40 @@ Agent Memory implements a layered cognitive architecture:
222212
- [x] Configurable staleness parameters via config.toml — v2.5
223213
- [x] 10 E2E tests proving dedup, stale filtering, and fail-open — v2.5
224214

225-
### Active (v2.6)
226-
227-
**Hybrid Search**
228-
- [ ] BM25 wired into hybrid search handler and retrieval routing
229-
230-
**Ranking Quality**
231-
- [ ] Salience scoring at write time (TOC nodes, Grips)
232-
- [ ] Usage-based decay in retrieval ranking (access_count tracking)
233-
234-
**Lifecycle Automation**
235-
- [ ] Vector index pruning via scheduler job
236-
- [ ] BM25 lifecycle policy with level-filtered rebuild
237-
238-
**Observability**
239-
- [ ] Admin RPCs for dedup metrics (buffer_size, events skipped)
240-
- [ ] Ranking metrics exposure (salience distribution, usage stats)
241-
- [ ] `deduplicated` field in IngestEventResponse
242-
243-
**Episodic Memory**
244-
- [ ] Episode schema and RocksDB storage (CF_EPISODES)
245-
- [ ] gRPC RPCs (StartEpisode, RecordAction, CompleteEpisode, GetSimilarEpisodes)
246-
- [ ] Value-based retention (outcome score sweet spot)
247-
- [ ] Retrieval integration for similar episode search
215+
### Validated (v2.6 - Shipped 2026-03-16)
216+
217+
**Cognitive Retrieval (v2.6)**
218+
- [x] BM25 wired into hybrid search handler and retrieval routing — v2.6
219+
- [x] Salience scoring at write time (TOC nodes, Grips) — v2.6
220+
- [x] Usage-based decay in retrieval ranking (access_count tracking) — v2.6
221+
- [x] Vector index pruning via scheduler job — v2.6
222+
- [x] BM25 lifecycle policy with level-filtered rebuild — v2.6
223+
- [x] Admin RPCs for dedup metrics (buffer_size, events skipped) — v2.6
224+
- [x] Ranking metrics exposure (salience distribution, usage stats) — v2.6
225+
- [x] `deduplicated` field in IngestEventResponse — v2.6
226+
- [x] Episode schema and RocksDB storage (CF_EPISODES) — v2.6
227+
- [x] gRPC RPCs (StartEpisode, RecordAction, CompleteEpisode, GetSimilarEpisodes) — v2.6
228+
- [x] Value-based retention (outcome score sweet spot) — v2.6
229+
- [x] Retrieval integration for similar episode search — v2.6
230+
231+
### Validated (v2.7 - Shipped 2026-03-22)
232+
233+
**Multi-Runtime Portability (v2.7)**
234+
- [x] Canonical plugin source from both `memory-query-plugin/` and `memory-setup-plugin/` directories — v2.7
235+
- [x] `memory-installer` crate with CLI, plugin parser, RuntimeConverter trait — v2.7
236+
- [x] Centralized tool mapping tables (11 tools × 6 runtimes) — v2.7
237+
- [x] Claude converter (pass-through with path rewriting) — v2.7
238+
- [x] Gemini converter (TOML format, tool mapping, settings.json hook merge) — v2.7
239+
- [x] Codex converter (commands→skills, AGENTS.md generation) — v2.7
240+
- [x] Copilot converter (skill format, .agent.md, hook scripts) — v2.7
241+
- [x] Generic skills converter (runtime-agnostic, user-specified directory) — v2.7
242+
- [x] Hook conversion with per-runtime formats and fail-open scripts — v2.7
243+
- [x] 7 E2E integration tests for full converter pipeline — v2.7
244+
- [x] Old adapter directories archived with README stubs — v2.7
245+
246+
### Known Gaps (v2.7)
247+
248+
- OC-01–06: OpenCode converter is a stub (methods return empty). Deferred to v3.0.
248249

249250
### Deferred / Future
250251

@@ -351,5 +352,14 @@ CLI client and agent skill query the daemon. Agent receives TOC navigation tools
351352
| CompositeVectorIndex for cross-session dedup | Searches both HNSW and InFlightBuffer, returns highest score | ✓ Validated v2.5 |
352353
| std::sync::RwLock for InFlightBuffer | Operations are sub-microsecond; tokio RwLock overhead unnecessary | ✓ Validated v2.5 |
353354

355+
| Canonical source: keep two plugin dirs | User decision; installer reads from both via discovery manifest | ✓ Validated v2.7 |
356+
| RuntimeConverter trait with Box<dyn> dispatch | Extensible without enum changes; each runtime is independent impl | ✓ Validated v2.7 |
357+
| format!-based YAML/TOML emitters | No serde_yaml dependency; full control over quoting and block scalars | ✓ Validated v2.7 |
358+
| Match expressions for tool maps | Compile-time exhaustive, zero overhead vs HashMap | ✓ Validated v2.7 |
359+
| Write-interceptor for dry-run | Single write_files() handles dry-run; converters produce data only | ✓ Validated v2.7 |
360+
| Hooks generated per-converter | Each runtime's hook mechanism too different for canonical YAML format | ✓ Validated v2.7 |
361+
| OpenCode converter as stub | Full impl deferred; OpenCode runtime format still evolving | — Deferred v2.7 |
362+
| Archive adapters (not delete) | One release cycle before removal; README stubs redirect to installer | ✓ Validated v2.7 |
363+
354364
---
355-
*Last updated: 2026-03-10 after v2.6 milestone start*
365+
*Last updated: 2026-03-22 after v2.7 milestone*

0 commit comments

Comments
 (0)