feat: v3.0.0 - Semantic Memory Layer + Conflict Detection#99
Merged
Conversation
Feature 3: Semantic Memory Layer - 创建 src/semantic_memory.py - notes 表存储持久性语义知识 - extract_and_store() 从对话中提取 notes - get_active_notes() 获取生效的 notes - format_for_context() 格式化为上下文注入 Feature 4: Conflict Detection & Reconsolidation - 创建 src/pipeline/conflict_detector.py - NLI 模型检测矛盾(可选) - 规则降级检测(零依赖) - reconcile() 执行记忆重巩固 Integration: - incremental_compressor.py 集成语义记忆 - 添加 llm_client 参数 - 压缩后触发 note 提取 - 新消息触发矛盾检测 Tests: 4/4 passed - test_notes_extraction - test_notes_injection - test_conflict_api - test_notes_dedup Version: v3.0.0-alpha
SonicBotMan
added a commit
that referenced
this pull request
Mar 17, 2026
Feature 3: Semantic Memory Layer - 创建 src/semantic_memory.py - notes 表存储持久性语义知识 - extract_and_store() 从对话中提取 notes - get_active_notes() 获取生效的 notes - format_for_context() 格式化为上下文注入 Feature 4: Conflict Detection & Reconsolidation - 创建 src/pipeline/conflict_detector.py - NLI 模型检测矛盾(可选) - 规则降级检测(零依赖) - reconcile() 执行记忆重巩固 Integration: - incremental_compressor.py 集成语义记忆 - 添加 llm_client 参数 - 压缩后触发 note 提取 - 新消息触发矛盾检测 Tests: 4/4 passed - test_notes_extraction - test_notes_injection - test_conflict_api - test_notes_dedup Version: v3.0.0-alpha Co-authored-by: SonicBotMan <sonicman0261@users.noreply.github.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.
v3.0.0 - 语义记忆层 + 矛盾检测
Feature 3: Semantic Memory Layer
目标: 独立于 DAG 的稳定知识库,存储从对话中提炼的持久性事实
核心功能:
notes表存储语义记忆文件:
src/semantic_memory.py关键方法:
extract_and_store(): 从对话中提取 notesget_active_notes(): 获取生效的 notesformat_for_context(): 格式化为上下文注入Feature 4: Conflict Detection & Reconsolidation
目标: 检测新消息与已有 notes 的矛盾,自动更新知识库
核心功能:
superseded_by文件:
src/pipeline/conflict_detector.py关键方法:
detect(): 检测矛盾reconcile(): 执行记忆重巩固Integration
修改文件:
src/incremental_compressor.py改动点:
llm_client参数Tests
文件:
tests/test_v300.py测试用例 (4/4 通过):
Acceptance Criteria (from Issue #97)
Version
🧠 认知科学驱动: 基于 EM-LLM、HiMem 等研究论文设计