feat: v2.6 Cognitive Retrieval milestone (phases 39-44)#22
Merged
RichardHightower merged 23 commits intomainfrom Mar 12, 2026
Merged
feat: v2.6 Cognitive Retrieval milestone (phases 39-44)#22RichardHightower merged 23 commits intomainfrom
RichardHightower merged 23 commits intomainfrom
Conversation
Synthesized research across STACK, FEATURES, ARCHITECTURE, and PITFALLS for Agent Memory v2.6 (Episodic Memory, Ranking Quality, Lifecycle & Observability). SUMMARY.md consolidates findings into phase implications (Phases 39-42) with confidence assessment and roadmap flags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 39: BM25 Hybrid Wiring (2 plans) Phase 40: Salience + Usage Decay (3 plans) Phase 41: Lifecycle Automation (2 plans) Phase 42: Observability RPCs (2 plans) Phase 43: Episodic Schema & Storage (1 plan) Phase 44: Episodic gRPC & Retrieval (3 plans) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Episode struct with ULID id, task, plan, actions, status, scoring - Action struct with type, input, result, timestamp - ActionResult enum: Success, Failure, Pending - EpisodeStatus enum: InProgress, Completed, Failed - Value scoring formula for retrieval prioritization - Serialize/Deserialize with serde(default) for backward compat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add CF_EPISODES constant and include in ALL_CF_NAMES - Add ColumnFamilyDescriptor with default Options in build_cf_descriptors - Export CF_EPISODES from crate root Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- store_episode, get_episode, list_episodes, update_episode, delete_episode - list_episodes returns newest first via reverse ULID iteration - Uses CF_EPISODES column family with JSON serialization - 7 unit tests for round-trip, CRUD, ordering, and complex actions - Made Storage.db field pub(crate) for cross-module CF access Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- EpisodicConfig: enabled, value_threshold, midpoint_target, max_episodes - Wired into Settings with [episodic] TOML section - Disabled by default (explicit opt-in like dedup) - Validation for all fields - Backward compatible with serde(default) for pre-phase-43 configs - 6 unit tests for defaults, validation, serialization, backward compat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- SUMMARY.md with all commits, deviations, decisions - STATE.md updated with progress (1/13 plans, 8%) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bridge Storage salience/access_count data into search result metadata so the combined ranking formula (salience boost + usage decay) takes effect. Add enrich_with_salience() that lookups TocNode/Grip per result. Update StaleFilter with improved kind exemptions and configurable decay. Add usage tracking fields to TocNode (access_count, last_accessed_ms). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add access_count and last_accessed_ms to TocNode (type + proto) - Add salience and usage config sections to Settings - Implement combined ranking formula: similarity * salience_factor * usage_penalty - Add 50% score floor to prevent collapse - Enrich search results with salience/usage metadata from Storage lookups - Wire combined ranking into retrieval pipeline after stale filter - Add ranking E2E tests (salience order, usage decay, score floor) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 3 E2E tests exercising the full route_query pipeline: - Salience enrichment from Storage affects ranking order (RANK-09) - Access count enrichment flows through pipeline (RANK-10) - Ranking composes with StaleFilter (constraint exemption + salience) Plus 4 unit-level tests for the ranking formula. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Re-apply Phase 39 changes that were accidentally reverted: - TeleportSearcher field in HybridSearchHandler - Real bm25_available() and bm25_search() implementations - Constructor wiring in with_all_services/with_all_services_and_topics - E2E hybrid search test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add LifecycleConfig with VectorLifecycleSettings and Bm25LifecycleSettings - Add PruneVectors admin CLI command with --age-days, --dry-run flags - Add RebuildBm25 admin CLI command with --min-level filter - Implement handle_prune_vectors using VectorIndexPipeline per-level pruning - Implement handle_rebuild_bm25 using SearchIndexer level-based filtering - Create Bm25RebuildJob scheduler job with cron, cancellation, rebuild callback - Register both prune jobs on daemon startup via register_prune_jobs - Vector pruning enabled by default; BM25 lifecycle disabled (opt-in) - Default retention: segment=30d, grip=30d, day=365d, week=1825d Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… status - Fix GetDedupStatus to return real buffer_size via NoveltyChecker::buffer_len() - Add ranking metrics to GetRankingStatusResponse proto (field numbers >200): avg_salience_score, high_salience_count, total_access_count, avg_usage_decay - Compute ranking metrics from recent day-level TOC nodes (30-day window) - Wire live novelty counters into GetRankingStatus response - Add get_dedup_status and get_ranking_status methods to MemoryClient - Add verbose status CLI: `memory-daemon status --verbose` shows dedup, ranking, vector - Add SearchIndexer::rebuild_with_filter for level-based BM25 rebuild Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve conflicts in config.rs and lib.rs to combine Phase 41 lifecycle settings and Phase 43 episodic config. Both feature sets coexist in Settings struct with serde defaults. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ests - Add proto definitions: StartEpisode, RecordAction, CompleteEpisode, GetSimilarEpisodes RPCs - Add EpisodeAction, EpisodeSummary, EpisodeStatusProto proto messages - Implement EpisodeHandler with Arc<Storage> and EpisodicConfig - Wire episode RPCs into MemoryServiceImpl via set_episode_handler() - Implement value-based retention pruning (lowest value_score pruned at max_episodes) - Implement brute-force cosine similarity search for episodes - Generate episode embeddings on completion (task + lessons text) - Add 6 E2E tests: lifecycle, value-based pruning, disabled config, error cases - Add 15 unit tests in EpisodeHandler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All 6 phases executed: - Phase 39: BM25 hybrid wiring - Phase 40: Salience scoring + usage decay - Phase 41: Lifecycle automation (vector prune + BM25 rebuild) - Phase 42: Observability RPCs (dedup buffer, ranking metrics) - Phase 43: Episodic schema & storage - Phase 44: Episodic gRPC, similarity search, value retention Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Delivers the complete v2.6 Cognitive Retrieval milestone — 6 phases, 13 plans, all implemented and verified.
similarity * salience_factor * usage_penalty) with 50% score floor, enrichment pipeline, E2E testsprune-vectors --age-days N --dry-run), BM25 rebuild command, Bm25RebuildJob scheduler, configurable retention per levelbuffer_sizein GetDedupStatus, ranking metrics (avg salience, usage decay) in GetRankingStatus,status --verboseCLIKey Changes
original * salience_factor * usage_penaltywith configurable score floorprune-vectorsandrebuild-bm25commandsmemory-daemon status --verboseshows dedup, ranking, vector healthTest plan
cargo fmt --all -- --checkpassescargo clippy --workspace --all-targets --all-features -- -D warningscleancargo test --workspace --all-features— 47 suites, 0 failures🤖 Generated with Claude Code