-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemory.jsonl
More file actions
159 lines (159 loc) · 55.7 KB
/
memory.jsonl
File metadata and controls
159 lines (159 loc) · 55.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{"name":"Alice","entityType":"Person","observations":["Software Engineer","Lives in NYC","Loves coding","Age 28"]}
{"name":"Bob","entityType":"Person","observations":["Doctor","Works at hospital","Age 32"]}
{"name":"Memory Graph MCP Server","entityType":"Project","observations":["Dự án giúp AI Agent quản lý dự án phần mềm tốt hơn","Chống ảo giác (fact anchoring) bằng knowledge graph","Đảm bảo độ chính xác qua thời gian","Sử dụng Rust làm ngôn ngữ chính","Lưu trữ dữ liệu bằng JSONL format","Tuân thủ giao thức MCP (Model Context Protocol)","Có 9 memory tools: create_entities, create_relations, add_observations, delete_entities, delete_observations, delete_relations, read_graph, search_nodes, open_nodes","Total tools: 13 (9 memory + 3 query + 1 time)","New tools added: get_related, traverse, summarize","EXISTING CAPABILITIES (pre-reasoning):","1. Structural reasoning - graph traversal via get_related, traverse, path_pattern","2. Temporal reasoning - time-aware via created_at, validFrom/validTo, get_relations_at_time","3. Causal tracing - edges: affects, threatens, depends_on (gần đủ, chưa có formal semantics)","MISSING FOR TRUE REASONING:","1. Semantic grounding - relationType là string, thiếu: strength, transitivity rules","2. Inference rules - không tự kết luận, chỉ trả lời câu hỏi được hỏi","3. Uncertainty - thiếu confidence, probability, competing hypotheses","EVOLUTION PATH: Rules (Layer 1) → Typed Relations (Layer 2) → Embeddings (Layer 3) → Hybrid Neuro-Symbolic (Layer 4)","=== Event Sourcing Architecture COMPLETED (2026-01-11) ===","New module: src/event_store/ với 6 files","Phases completed: 0-8 (Preparation → Enhancements)","Tests: 73 total (57 unit + 7 E2E + 8 integration)","Enable: MEMORY_EVENT_SOURCING=true","Features: Append-only event log, Snapshots, Migration, Log rotation, Stats collection","MCP SSE transport implemented (2026-01-13)","SSE endpoint: /mcp/sse accepts GET (stream) + POST (messages)","REST API: 6 endpoints for client recovery","All 16 tools registered via get_all_tools()"],"updatedBy":"Mai Thành Duy An","updatedAt":1768313916}
{"name":"tiach","entityType":"Developer","observations":["Là developer chính của dự án Memory Graph","Mục tiêu: xây dựng hệ thống giúp AI không quên thông tin quan trọng"]}
{"name":"Feature: Create Entities","entityType":"Feature","observations":["Mô tả: Tạo mới entities trong knowledge graph","Status: Completed","Priority: High","File: memory.rs - function create_entities"]}
{"name":"Feature: Create Relations","entityType":"Feature","observations":["Mô tả: Tạo quan hệ giữa các entities","Status: Completed","Priority: High","File: memory.rs - function create_relations"]}
{"name":"Feature: Search Nodes","entityType":"Feature","observations":["Mô tả: Tìm kiếm entities theo query text","Status: Completed","Priority: High","File: memory.rs - function search_nodes","Depends on: src/search/synonyms.rs for matches_with_synonyms()","Used by: knowledge_base/query.rs - search_nodes function"],"updatedBy":"Mai Thành Duy An","updatedAt":1768107430}
{"name":"Feature: Persistent Storage","entityType":"Feature","observations":["Mô tả: Lưu trữ dữ liệu vào file JSONL","Status: Completed","Priority: Critical","File: memory.jsonl"]}
{"name":"Decision: Use JSONL Format","entityType":"Decision","observations":["Quyết định: Sử dụng JSONL thay vì SQLite","Lý do: Đơn giản, human-readable, dễ debug","Trade-offs: Query chậm hơn với dataset lớn (>100K entities)","Ngày: 2026-01-10","Quyết định bởi: tiach"]}
{"name":"Decision: Use Rust","entityType":"Decision","observations":["Quyết định: Sử dụng Rust làm ngôn ngữ chính","Lý do: Performance cao, memory safety, single binary deployment","Trade-offs: Learning curve cao hơn Python/Node.js","Ngày: 2026-01-10","Quyết định bởi: tiach"]}
{"name":"Milestone: MVP Release","entityType":"Milestone","observations":["Mô tả: Release phiên bản MVP với 9 tools cơ bản","Target date: 2026-01-15","Deliverables: Binary, Documentation, Basic Tests","Status: In Progress"]}
{"name":"Milestone: Production Ready","entityType":"Milestone","observations":["Mô tả: Phiên bản ổn định cho production","Target date: 2026-02-01","Deliverables: Full test coverage, Performance benchmarks, User guide","Status: Planned"]}
{"name":"Requirement: Unicode Support","entityType":"Requirement","observations":["Mô tả: Hỗ trợ Unicode trong entity name và observations","Type: Functional","Priority: High","Status: Implemented"]}
{"name":"Requirement: MCP Compliance","entityType":"Requirement","observations":["Mô tả: Tuân thủ Model Context Protocol specification","Type: Functional","Priority: Critical","Status: Implemented"]}
{"name":"Risk: JSONL Scalability","entityType":"Risk","observations":["Mô tả: Performance degradation với >100K entities","Impact: Medium","Probability: Low (most use cases < 10K entities)","Mitigation: Implement indexing hoặc optional SQLite backend","Status: Accepted"]}
{"name":"Risk: Memory Usage","entityType":"Risk","observations":["Mô tả: RAM usage cao khi load toàn bộ graph vào memory","Impact: Medium","Probability: Low","Mitigation: Implement lazy loading hoặc streaming","Status: Monitoring"]}
{"name":"Feature: GNN Integration","entityType":"Feature","observations":["Mô tả: Tích hợp Graph Neural Network để nâng cao khả năng AI Agent","Status: Planned","Priority: Medium","Target Milestone: Post-Production","Capability 1: Semantic Search - tìm nodes tương tự về ý nghĩa sử dụng node embeddings","Capability 2: Link Prediction - đề xuất relations mới dựa trên graph structure","Capability 3: Node Embeddings - encode context từ neighboring nodes","Capability 4: Multi-hop Reasoning - suy luận qua nhiều relations","Tech Options: PyTorch Geometric, DGL, hoặc custom Rust implementation","Dependencies: Requires embedding infrastructure first"]}
{"name":"Feature: Semantic Search","entityType":"Feature","observations":["Mô tả: Tìm kiếm entities bằng semantic similarity thay vì text matching","Status: Planned","Priority: High","Target Milestone: Production Ready","Approach: Embed entity text (name + type + observations) thành vectors","Storage: Separate vector file (memory.vec) hoặc extend JSONL","Tech Options: Ollama API (short-term), ONNX Runtime (long-term)","Prerequisite for: Feature: GNN Integration"]}
{"name":"EntityType: Module","entityType":"EntityType","observations":["Mô tả: Đại diện cho một module/package trong dự án","Required fields: name, path","Observations nên có: Purpose, Dependencies, Public API, Key files","Example: Module: Payment - backend/src/payment/","Relations: belongs_to Project, contains File, depends_on Module"]}
{"name":"EntityType: File","entityType":"EntityType","observations":["Mô tả: File quan trọng trong dự án","Required fields: name (với path), language","Observations nên có: Purpose, Key functions, Exports, Line count","Example: File: order_service.rs - backend/src/order/","Relations: belongs_to Module, contains Function, imports File"]}
{"name":"EntityType: Function","entityType":"EntityType","observations":["Mô tả: Function/method phức tạp cần nhớ","Required fields: name, signature","Observations nên có: Purpose, Parameters, Return type, Side effects, Complexity notes","Example: Function: create_order(user_id, items) -> Result<Order>","Relations: defined_in File, calls Function, uses Schema"]}
{"name":"EntityType: Schema","entityType":"EntityType","observations":["Mô tả: Database table, API schema, data structure","Required fields: name, type (table/api/struct)","Observations nên có: Fields, Types, Indexes, Constraints, Relationships","Example: Schema: orders - PostgreSQL table","Relations: used_by Function, relates_to Schema"]}
{"name":"EntityType: BusinessRule","entityType":"EntityType","observations":["Mô tả: Business logic và quy tắc nghiệp vụ","Required fields: name, domain","Observations nên có: Rule description, Conditions, Edge cases, Exceptions","Example: BusinessRule: Free Shipping >= 500k VND","Relations: implemented_by Function, affects Feature"]}
{"name":"EntityType: Convention","entityType":"EntityType","observations":["Mô tả: Coding conventions và patterns của dự án","Required fields: name, scope (project/module/language)","Observations nên có: Rule, Examples, Exceptions, Reasoning","Example: Convention: Error Handling - dùng Result<T, AppError>","Relations: applies_to Project/Module, enforced_by Linter"]}
{"name":"EntityType: Dependency","entityType":"EntityType","observations":["Mô tả: External dependencies (crates, npm packages, etc)","Required fields: name, version, package manager","Observations nên có: Purpose, Key APIs used, Alternatives, Security notes","Example: Dependency: tokio 1.35 - async runtime","Relations: used_by Module, replaces Dependency"]}
{"name":"Feature: Get Related Tool","entityType":"Feature","observations":["Mô tả: Tool mới lấy các entities có relation với entity cho trước","Status: Proposed","Priority: High","Input: entity_name, relation_type (optional), direction (in/out/both)","Output: List of related entities với relation info","Use case: Tìm tất cả files trong module, tìm dependencies của function","Status: Completed","Implemented: 2026-01-11","File: memory.rs - GetRelatedTool struct","Structs added: RelatedEntity, RelatedEntities"]}
{"name":"Feature: Traverse Tool","entityType":"Feature","observations":["Mô tả: Tool mới cho multi-hop graph traversal","Status: Proposed","Priority: Medium","Input: start_node, path_pattern (e.g., 'depends_on->uses->*')","Output: All nodes matching the path pattern","Use case: Tìm transitive dependencies, impact analysis","Status: Completed","Implemented: 2026-01-11","File: memory.rs - TraverseTool struct","Structs added: PathStep, TraversalPath, TraversalResult"]}
{"name":"Feature: Summarize Tool","entityType":"Feature","observations":["Mô tả: Tool mới tóm tắt subset của graph","Status: Proposed","Priority: Low","Input: entity_names hoặc filter criteria","Output: Condensed summary của selected entities","Use case: Quick overview của module, project status","Status: Completed","Implemented: 2026-01-11","File: memory.rs - SummarizeTool struct","Structs added: Summary, EntityBrief","Formats: brief, detailed, stats"]}
{"name":"Feature: Timestamp Tracking","entityType":"Feature","observations":["Option D Hybrid implementation - stores Unix timestamp in seconds","created_at and updated_at fields on Entity","created_at field on Relation","Backward compatible with skip_serializing_if = is_zero","All 4 unit tests passing","Release build successful"],"createdAt":1768061136,"updatedAt":1768061141}
{"name":"Bug: Update Paradox","entityType":"Bug","observations":["JSONL lưu static snapshot, không phải event sourcing","Khi update: hoặc có 2 dòng mâu thuẫn, hoặc mất immutable history","Priority: Medium","Solution: Thêm Temporal Edges với valid_from/valid_to","FIXED: Added validFrom/validTo fields to Relation struct","FIXED: New tool get_relations_at_time - query relations valid at specific timestamp","FIXED: New tool get_relation_history - view all relations including expired ones","Total tools now: 16 (9 memory + 3 query + 2 temporal + 1 time + 1 summarize)","Status: Resolved"],"createdAt":1768062649,"updatedAt":1768063434}
{"name":"Bug: Context Window Killer","entityType":"Bug","observations":["read_graph dump toàn bộ graph","Với 10000 nodes sẽ tràn context window của LLM","Priority: High","Solution: Implement Graph RAG, chỉ lấy relevant nodes + 1-hop neighbors","FIXED: Added limit/offset to read_graph for pagination","FIXED: Added limit/includeRelations to search_nodes","AI agents can now control context size when querying large graphs","Status: Resolved"],"createdAt":1768062649,"updatedAt":1768063183}
{"name":"Bug: Semantic Blindness","entityType":"Bug","observations":["search_nodes chỉ dùng text matching đơn thuần","Search 'Coder' không tìm được 'Software Engineer'","Priority: High","Solution: Tích hợp Vector Search với embeddings","FIXED: Implemented synonym dictionary with 15+ groups","Covers: developer roles, bug/issue, feature/task, status, priority, project mgmt, docs, testing, architecture","Search 'coder' now matches 'programmer', 'developer', 'engineer', 'dev'","Zero dependencies - pure Rust, no AI models needed","Status: Resolved"],"createdAt":1768062649,"updatedAt":1768063937}
{"name":"Refactoring: Memory Graph Modularization","entityType":"Decision","observations":["Quyết định tái cấu trúc memory.rs (2505 dòng) thành multi-file architecture","Mục tiêu: Dễ maintain, test, và mở rộng tính năng mới","Giữ nguyên hiệu suất với zero-cost abstractions","5 Phases: Types → Protocol → KnowledgeBase → Tools → Cleanup","✅ Refactoring hoàn thành thành công - 2026-01-11","Từ 1 file memory.rs (2505 dòng) → 35+ files trong src/","All 16 tests passed (7 unit + 8 integration + 1 doc)","Build release thành công với LTO optimization","Cấu trúc mới: types/, protocol/, knowledge_base/, tools/, search/, validation/, utils/, server/"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768095691,"updatedAt":1768096450}
{"name":"Module: src/types","entityType":"Module","observations":["Chứa tất cả data models: Entity, Relation, KnowledgeGraph","Files: mod.rs, entity.rs, relation.rs, graph.rs, observation.rs, traversal.rs, summary.rs"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768095691,"updatedAt":1768095691}
{"name":"Module: src/protocol","entityType":"Module","observations":["Chứa JSON-RPC và MCP protocol types","Files: mod.rs, jsonrpc.rs, mcp.rs","Includes Tool trait definition"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768095691,"updatedAt":1768095691}
{"name":"Module: src/knowledge_base","entityType":"Module","observations":["Core engine với thread-safe operations","Files: mod.rs, crud.rs, query.rs, traversal.rs, temporal.rs, summarize.rs","🔄 RwLock Migration - 2026-01-11","Chuyển từ std::sync::Mutex sang std::sync::RwLock","Lý do: Hệ thống read-heavy (60% read vs 40% write)","Thay đổi mod.rs: Mutex<KnowledgeGraph> → RwLock<KnowledgeGraph>","Thay đổi mod.rs: .lock() → .read() cho load_graph()","Thay đổi crud.rs: 6x .lock() → .write() cho CRUD operations","Performance benefit: Cho phép multiple concurrent readers","Test result: 16/16 tests passed including concurrent access tests","Documentation: docs/Proposed-RwLock.md"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768095691,"updatedAt":1768098901}
{"name":"Module: src/tools","entityType":"Module","observations":["15 MCP tools organized by category","Submodules: memory/ (9 tools), query/ (3 tools), temporal/ (3 tools)"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768095691,"updatedAt":1768095691}
{"name":"Decision: Mutex to RwLock Migration","entityType":"Decision","observations":["Date: 2026-01-11","Status: Completed","Risk Level: LOW","Affected files: src/knowledge_base/mod.rs, src/knowledge_base/crud.rs","Rationale: System is read-heavy (search, traverse, get_related = 60% of operations)","Before: Mutex blocks all threads even for read-only operations","After: RwLock allows multiple concurrent readers, only write blocks","Pattern: Write lock held during entire CRUD + persist_to_file()","Validation: All 16 tests passed including test_concurrent_access and test_concurrent_read_write","Rollback: Simple - change RwLock back to Mutex if issues arise"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768098901,"updatedAt":1768098901}
{"name":"Research: Graph Reasoning Capability Analysis","entityType":"Research","observations":["Date: 2026-01-11","Topic: Ranh giới giữa 'lưu trữ tri thức' và 'trí tuệ'","Conclusion: Graph đã có nền tảng suy luận, chưa có inference engine","Key insight: Đây không phải memory cho AI, đây là hạt nhân của trí tuệ có thể kiểm chứng"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768108015,"updatedAt":1768108015}
{"name":"Feature: Rule-based Inference Engine","entityType":"Feature","observations":["Mô tả: Layer 1 - Logic programming trên graph","Status: Proposed","Priority: High","Cost: Low (không cần ML)","Example rule: IF A depends_on B AND B depends_on C THEN A transitively_depends_on C","Example rule: IF Risk threatens Milestone AND Milestone includes Feature THEN Risk threatens Feature","Implementation: rules/*.rs - match trên graph snapshot, sinh derived relations (inferred=true)","Capability: Suy luận chủ động, không chỉ trả lời câu hỏi được hỏi"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768108015,"updatedAt":1768108015}
{"name":"Feature: Typed Relations with Semantics","entityType":"Feature","observations":["Mô tả: Layer 2 - Chuẩn hóa relationType thành enum + metadata","Status: Proposed","Priority: Medium","Schema: RelationType { transitive: bool, strength: f32, category: Category }","Capability: Reasoning có trọng số, conflict resolution, ranking kết luận","Enables: Graph 'hiểu' ý nghĩa quan hệ, không chỉ string matching"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768108015,"updatedAt":1768108015}
{"name":"Feature: Hybrid Neuro-Symbolic Reasoning","entityType":"Feature","observations":["Mô tả: Layer 4 - Kết hợp symbolic (rules) + GNN (probabilistic)","Status: Future Vision","Priority: Low (5-20 năm)","Pipeline: Graph snapshot → Symbolic inference → GNN scoring → Confidence-weighted conclusions","Capability: Suy luận vượt dữ liệu gốc mà không hallucinate"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768108015,"updatedAt":1768108015}
{"name":"Feature: Self-Extending Knowledge Graph","entityType":"Feature","observations":["Mô tả: Graph tự đề xuất relations mới, rules mới","Status: Future Vision","Risk: High-risk, high-reward","Human role: Approve/Reject proposals","Capability: Trí tuệ tăng theo thời gian, không cần retrain"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768108015,"updatedAt":1768108015}
{"name":"Feature: Temporal Counterfactual Reasoning","entityType":"Feature","observations":["Mô tả: Trả lời câu hỏi 'what-if' theo thời gian","Status: Future Vision","Example: 'Nếu Decision X không được đưa ra, Milestone Y có trễ không?'","Requirements: Temporal graph, alternative timelines, simulation trên graph"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768108015,"updatedAt":1768108015}
{"name":"Insight: Graph as Prefrontal Cortex for AI","entityType":"Insight","observations":["Concept: LLM = trực giác, Graph = trí nhớ + logic + kiểm chứng","Agent capability: Lập luận, phản biện, tự kiểm tra","Vision: AI Agent không chỉ trả lời mà suy luận có căn cứ","Differentiator: Vượt xa RAG truyền thống"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768108015,"updatedAt":1768108015}
{"name":"Feature: Inference Engine v1.2.0","entityType":"Feature","observations":["Implemented TransitiveDependencyRule with BFS traversal","Uses VecDeque for shortest-path-first (Occam's Razor)","Cycle detection via HashSet prevents infinite loops","Configurable max depth (1-5, default 3)","Confidence decay per relation type (0.95-0.60)","16th MCP tool: infer","31 tests passing (22 unit + 8 integration + 1 doc)","Runtime only - inferred relations NOT persisted (Option A design)"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768112140,"updatedAt":1768112140}
{"name":"Bug: Git Stash Data Loss","entityType":"Bug","observations":["Ngày phát hiện: 2026-01-11","Context: Đang stash code inference engine (16 tools, 14 file changes)","Root cause: git stash push -m chỉ stash tracked files, untracked files bị bỏ qua","Lỗi tiếp theo: git stash drop xóa stash cũ TRƯỚC KHI tạo stash mới với -u flag","Hậu quả: Mất 8 file modified (CHANGELOG.md, Cargo.toml, lib.rs, mod.rs files)","Triệu chứng: Sau khi hoàn tất quy trình còn 15 tools thay vì 16 tools"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768113844,"updatedAt":1768113844}
{"name":"Lesson: Git Stash Best Practices","entityType":"Convention","observations":["LUÔN dùng git stash push -u để bao gồm untracked files","KHÔNG BAO GIỜ dùng git stash drop trước khi verify stash mới đã capture đầy đủ","Nếu cần thay đổi stash: dùng git stash pop → sửa → git stash push lại","Recovery: git fsck --lost-found tìm dangling commits từ dropped stash","Recovery: git stash apply <commit-hash> để khôi phục stash đã drop","Dangling commits tồn tại ~2 tuần trước khi bị git gc xóa"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768113844,"updatedAt":1768113844}
{"name":"Proposed: Team Collaboration Architecture","entityType":"Proposal","observations":["Status: Proposed (2026-01-11), Priority: Future Enhancement, Complexity: High","Mục tiêu: Chuyển Memory Graph từ 'Công cụ cá nhân' sang 'Hệ điều hành Team' - PM, BA, Dev, Tester cùng làm việc trên 1 Knowledge Graph","Kiến trúc đề xuất: Memory Hub với Hybrid Protocol Strategy","Protocol 1 - MCP SSE (P0): Cho AI Agents (Cursor, Claude) kết nối qua HTTP thay vì stdio","Protocol 2 - GraphQL (P1): Cho PM/BA/Frontend Dashboard với query linh hoạt","Protocol 3 - REST API (P2): Cho CI/CD, Scripts, 3rd party integrations","Tech Stack: Axum (web framework), async-graphql (GraphQL), tokio (async runtime)","Phase 1 (1-2 weeks): MCP SSE Transport + API Key Auth + Single Instance","Phase 2 (2-3 weeks): GraphQL API + Event Sourcing + SQLite Storage","Phase 3 (2 weeks): Authentication (API Key + RBAC) + Database Migration (PostgreSQL)","Risks: Race Conditions (mitigate: RwLock → DB locking), Context Overflow (mitigate: Pagination + Vector search), Data Conflicts (mitigate: Event Sourcing + CRDT)","Open Questions: Conflict Resolution Strategy? Offline Support? Authorization Granularity? Deployment Model?","Roadmap: Month 1-2 (MVP 5 devs) → Month 3-4 (Team 10-20) → Month 5+ (Enterprise ready)","Document: docs/Proposed-Team-Collaboration.md"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768118779,"updatedAt":1768118779}
{"name":"Module: ui","entityType":"Module","observations":["Path: ui/","Purpose: Web-based visualization và Inference Lab cho Memory Graph","Tech Stack: Vanilla JS + Sigma.js (graph viz) + Graphology (graph data structure)","No build step - pure HTML/CSS/JS, works with Live Server","Features: Graph visualization, Node detail panel, Inference testing, CRUD entities/relations","Created: 2026-01-11","[Sigma.js Demo Reference] Source: https://github.com/jacomyal/sigma.js/tree/main/packages/demo","[Pattern: Search & Focus] SearchField.tsx: Dùng sigma.getNodeDisplayData(nodeId) để lấy display coordinates, sau đó camera.animate({ ...nodeDisplayData, ratio: 0.05 }, { duration: 600 }). Lưu ý: ratio 0.05 rất nhỏ nhưng họ dùng với spread operator lấy x, y từ displayData.","[Pattern: Highlight Neighborhood] GraphSettingsController.tsx: Dùng nodeReducer và edgeReducer để fade nodes/edges không liên quan. NODE_FADE_COLOR = '#bbb', EDGE_FADE_COLOR = '#eee'. Nodes không connected sẽ có color fade, label = '', highlighted = false.","[Pattern: Debounce Hover] useDebounce(hoveredNode, 40) để tránh render quá nhiều khi di chuột nhanh.","[Pattern: Custom Hover Renderer] canvas-utils.ts: drawHover() vẽ nền trắng (#fff) với shadow, sau đó vẽ text màu đen (#000). Dùng drawRoundRect để vẽ background bo góc.","[Pattern: Custom Label Renderer] canvas-utils.ts: drawLabel() vẽ background semi-transparent (#ffffffcc) rồi vẽ text đen (#000) - đảm bảo đọc được trên mọi nền.","[Pattern: Filtering] GraphDataController.tsx: Set graph.setNodeAttribute(node, 'hidden', true/false) để hide/show nodes. Hidden nodes không hiển thị và bị exclude khỏi search.","[Pattern: setSetting vs attributes] Dùng sigma.setSetting('nodeReducer', fn) để modify display data on-the-fly, không modify actual graph data. Return null để reset reducer.","[Bug Fix Applied] focusOnNode(): Thay ratio: 0.3 bằng Math.min(currentRatio, 1.5) để tránh zoom quá sâu gây màn hình đen.","[UI Design Lesson] Layout 3-column: Left sidebar (filters/controls) + Center (graph) + Right sidebar (details). Inspired by Sigma.js official demo.","[UI Design Lesson] Collapsible sidebars cần width tối thiểu (50px) để hiện toggle button, không dùng width: 0.","[UI Design Lesson] Toggle button nên nằm BÊN TRONG sidebar (left: 6px) thay vì ngoài (left: -14px) để không bị cắt khi collapsed.","[UI Design Lesson] Search autocomplete: Dùng custom dropdown với highlight text match thay vì native <datalist>. Hỗ trợ keyboard navigation (↑↓ + Enter + Escape).","[UI Design Lesson] Filter pattern: Checkbox cho từng type, dùng graph.setNodeAttribute(node, 'hidden', true/false) để ẩn/hiện realtime.","[UI Design Lesson] Custom label/hover renderer: Nền tối (#0f172a) + text sáng (#e5e7eb) cho dark theme. Sigma.js dùng defaultDrawNodeLabel và defaultDrawNodeHover.","[UI Design Lesson] Edge arrows: defaultEdgeType: 'arrow', edgeArrowPosition: 'target', edgeArrowSize: 4 (nhỏ, subtle).","[UI Design Lesson] focusOnNode(): Dùng renderer.getNodeDisplayData(nodeId) thay vì graph.getNodeAttributes() để lấy screen coordinates. Tránh ratio quá nhỏ (0.3) gây màn hình đen.","[UI Design Lesson] Highlight pattern: Dùng nodeReducer và edgeReducer để fade nodes/edges không liên quan. Reset bằng setSetting('nodeReducer', null).","[UI Design Lesson] CSS Variables: Tập trung colors, spacing, transitions vào :root để dễ maintain và consistent."],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768128254}
{"name":"File: ui/index.html","entityType":"File","observations":["Main HTML entry point","Contains: Sidebar với 3 tabs (Inference, Entities, Relations)","Contains: Graph container với Sigma.js renderer","Contains: Modals cho Add/Edit Entity và Add Relation","Contains: Node Detail Panel (persistent on click)","External deps: Sigma.js 2.4.0, Graphology 0.25.4 (CDN)","~280 lines"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768123521}
{"name":"File: ui/css/styles.css","entityType":"File","observations":["All CSS styles for the UI","Dark theme với color palette từ Tailwind (slate, blue, green)","Components: Sidebar, Tabs, Panels (collapsible), Stats, Legend, Forms, Buttons, Modals","Node Detail Panel styles với connection items","Responsive scrolling cho tab content và inference results","~900 lines"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768123521}
{"name":"File: ui/js/app.js","entityType":"File","observations":["Main application logic","Functions: init(), rebuildGraph(), setupGraphEvents(), updateStats(), buildLegend()","Node interaction: showNodeDetail(), closeNodeDetail(), focusOnNode(), highlightConnections()","CRUD handlers: showAddEntityModal(), editEntity(), saveEntity(), deleteEntity()","Relation handlers: showAddRelationModal(), saveRelation(), deleteRelation()","Event listeners: tabs, panels collapse, toolbar buttons, inference controls","~760 lines","Bug: focusOnNode() - Camera animate nhưng graph không hiển thị (màn hình đen), phải nhấn Reset mới thấy. Nguyên nhân: ratio: 0.3 quá nhỏ khiến zoom quá sâu vào node.","[Reference] Sigma.js demo pattern cho search: getNodeDisplayData() trả về screen coordinates, dùng làm target cho camera.animate()","[Reference] Sigma.js official demo dùng ratio: 0.05 với displayData spread, khác với graph attributes x/y"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768125887}
{"name":"File: ui/js/graph.js","entityType":"File","observations":["Graph visualization module","Exports: GraphModule object","Functions: colorByType(), buildGraph(), calculateStats()","typeColors: 20+ entity type color mappings","Layout: Radial layout grouped by entity type","~150 lines"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768123521}
{"name":"File: ui/js/inference.js","entityType":"File","observations":["Inference engine for UI (client-side simulation)","Exports: InferenceModule object","Functions: runInference() - BFS traversal với confidence decay","Functions: formatPath(), getConfidenceColor(), deriveInferredType()","relationConfidence: confidence values per relation type (0.60-0.95)","Special rules: transitively_depends_on, contributes_to, indirectly_threatens","~180 lines"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768123521}
{"name":"File: ui/js/editor.js","entityType":"File","observations":["DataEditor class for CRUD operations","Methods: loadFromURL(), addEntity(), updateEntity(), deleteEntity()","Methods: addRelation(), deleteRelation(), addObservation(), removeObservation()","Export: exportToJSONL(), downloadJSONL()","Query: searchEntities(), getRelationsForEntity(), getEntityTypes(), getRelationTypes()","Utility: showToast() for notifications","~200 lines"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768123521}
{"name":"File: ui/favicon.svg","entityType":"File","observations":["Custom SVG favicon","Design: Brain outline với gradient (purple → blue → cyan)","Contains: 5 graph nodes với connections bên trong","Symbolizes: Knowledge graph inside a brain (AI memory)"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768123521,"updatedAt":1768123521}
{"name":"Feature: Event Sourcing Architecture","entityType":"Feature","observations":["Mô tả: Kiến trúc Event Sourcing cho Memory Graph - append-only event log + snapshots","Status: COMPLETED (2026-01-11)","Priority: High","Document: docs/Proposed-Event-Sourcing.md","Env Variable: MEMORY_EVENT_SOURCING=true để enable","=== PHASE 0: Preparation ===","Tạo data/ directory structure: data/events.jsonl, data/snapshots/, data/archive/","Backup memory.jsonl thành memory.jsonl.backup","=== PHASE 1: Event Types (6 tests) ===","File: src/types/event.rs - EventType enum với 6 variants: EntityCreated, EntityDeleted, RelationCreated, RelationDeleted, ObservationAdded, ObservationDeleted","Event struct với id, event_type, timestamp, payload","Serde serialization support","=== PHASE 2: Event Store Core (8 tests) ===","File: src/event_store/mod.rs - EventStore struct với append(), replay(), get_events_since()","File: src/event_store/config.rs - EventStoreConfig với paths, snapshot_threshold, archive_old_events","File locking với fs2 crate để prevent concurrent writes","=== PHASE 3: Snapshots (11 tests) ===","File: src/event_store/snapshot.rs - SnapshotManager với create_snapshot(), load_latest_snapshot()","Snapshot format: snapshot_{timestamp}_{event_id}.json","Auto-snapshot khi events vượt threshold (default 100)","=== PHASE 4: Integration ===","Modified src/knowledge_base/crud.rs - tất cả CRUD operations emit events","create_entities(), delete_entities(), create_relations(), delete_relations(), add_observations(), delete_observations()","maybe_create_snapshot() check sau mỗi operation","=== PHASE 5: Graceful Shutdown ===","Integrated ctrlc handler trong main.rs","Tạo final snapshot trước khi shutdown","=== PHASE 6: Migration (4 tests) ===","File: src/event_store/migration.rs - migrate_from_legacy()","Đọc memory.jsonl, convert thành events, write vào events.jsonl","Rename memory.jsonl thành memory.jsonl.migrated","=== PHASE 7: E2E Testing (7 tests) ===","test_full_event_sourcing_lifecycle","test_recovery_from_events_only","test_recovery_from_snapshot_plus_events","test_multiple_snapshots","test_event_ordering","test_concurrent_operations","test_legacy_migration_e2e","=== PHASE 8: Enhancements (6 tests) ===","File: src/event_store/rotation.rs - LogRotation cho archive management","Functions: rotate_after_snapshot(), list_archives(), cleanup_old_archives()","Archive path: data/archive/events_{start}_to_{end}.jsonl","File: src/event_store/stats.rs - EventStoreStats, StatsCollector, ReplayBenchmark","Metrics: active_event_count, archived_event_count, events_by_type HashMap, events_per_second","Auto-rotation: Khi config.archive_old_events=true, tự động archive sau snapshot","=== TOTAL ===","73 tests passing (57 unit + 7 E2E + 8 integration)","Release build successful","New files: 7 (event.rs, mod.rs, config.rs, snapshot.rs, migration.rs, rotation.rs, stats.rs)","Modified files: lib.rs, main.rs, knowledge_base/mod.rs, knowledge_base/crud.rs","UI Update (2026-01-11): Thêm stats panel cho Event Sourcing metrics","Stats panel hiển thị: Total events, Last snapshot, Event rate, File sizes","Files updated: ui/index.html, ui/js/app.js, ui/css/styles.css","API endpoint: get_stats tool đã có sẵn trong event_store/stats.rs"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768139202,"updatedAt":1768139741}
{"name":"Module: src/event_store","entityType":"Module","observations":["Path: src/event_store/","Purpose: Event Sourcing implementation cho Memory Graph","Files: mod.rs, config.rs, snapshot.rs, migration.rs, rotation.rs, stats.rs","Exports: EventStore, EventStoreConfig, SnapshotManager, LogRotation, ArchiveInfo, EventStoreStats, StatsCollector, ReplayBenchmark","Tests: 42 unit tests (events 6 + store 8 + snapshot 11 + migration 4 + rotation 3 + stats 3 + misc 7)","Created: 2026-01-11"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768139202,"updatedAt":1768139202}
{"name":"Proposed: WebSocket Real-time UI","entityType":"Proposal","observations":["Status: Proposed (2026-01-11)","Priority: P1 - After Inference Engine","Complexity: Medium","Estimated Effort: ~8 hours","File: docs/proposal/Proposed-WebSocket-UI.md","Mục tiêu: UI tự động cập nhật khi có thay đổi entities/relations từ bất kỳ client nào","Approach: WebSocket + Tokio Broadcast Channel (tiêu chuẩn vàng Rust Async)","Architecture: stdio(MCP) + REST(CRUD) + WS(/ws) → Event Batcher → broadcast::Sender → KnowledgeBase","Message Protocol: sequence_id tracking, batch_update support","Reconnection Strategy: 'Snapshot then Subscribe' - full refresh nếu gap > 100 events","Authentication: Query Param Token (?token=xxx) do browser WS không hỗ trợ custom headers","Flow Control: Event Batcher debounce 50ms, max 100 events per batch","Dependencies: axum 0.7 (ws), tokio, tokio-tungstenite 0.21, tower-http 0.5","Phase 1: Basic WS endpoint + broadcast (2h)","Phase 2: Integrate with mutation tools (2h)","Phase 3: Event Batcher (1h)","Phase 4: Sequence ID tracking (1h)","Phase 5: UI JavaScript client - MemoryGraphWS class (1.5h)","Phase 6: Reconnection + error handling (0.5h)","Integration: Event Sourcing là Source of Truth, WebSocket là Live Projection","B3K Review: Đạt điểm tuyệt đối, không có lỗ hổng lớn","[2026-01-11] IMPLEMENTATION COMPLETE - All 8 phases done","Phase 7: CLI --mode flag (stdio|http|both) + --help","Phase 8: 82 tests pass, version bumped to 1.3.0","New files: src/api/ (6 files), ui/js/websocket.js","HTTP server: port 3030, /ws endpoint, /health check","Build verified: cargo build --release success"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768142834,"updatedAt":1768144693}
{"name":"Test SSE Entity","entityType":"Test","observations":["Created via SSE transport"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768313592,"updatedAt":1768313592}
{"name":"Session: 2026-01-14 Copilot Memory Q&A","entityType":"ConversationSummary","observations":["Duration: ~5 minutes","Goal: Hiểu cơ chế hoạt động của VS Code Copilot Agent về memory/history","Questions asked: 3 câu hỏi về chat history, embeddings, và long-term memory","Q1: Chat history có embedding không? → Không, lưu dạng plain text","Q2: History dài ảnh hưởng context không? → Có, sẽ bị summarize khi quá dài","Q3: Làm sao lưu lịch sử lâu dài? → Dùng Memory Graph MCP Server","Key insight: Memory Graph MCP là giải pháp để AI nhớ lâu dài, vượt qua giới hạn context window","Workspace: memory-graph project","File đang mở: memory.jsonl","Test: Đang test workflow lưu conversation summary vào memory-graph","Next: Verify entity được tạo thành công trong memory.jsonl"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768349418,"updatedAt":1768349418}
{"name":"Bug: Dual KnowledgeBase Instances","entityType":"Bug","observations":["CRITICAL: main.rs:199-202 tạo 2 KnowledgeBase độc lập","kb_sync = Arc::new(KnowledgeBase::new()) - dùng cho SSE/MCP tools","kb_async = Arc::new(RwLock::new(KnowledgeBase::new())) - dùng cho REST/WebSocket","Hậu quả: Data divergence - 2 graph hoàn toàn không sync với nhau","Hậu quả: MCP tools ghi vào kb_sync, REST API đọc từ kb_async -> không thấy data","Hậu quả: Snapshot chỉ lưu 1 trong 2 graph","Priority: P0 - BLOCKING RELEASE","Discovered by: ChatGPT Code Review","Discovered date: 2026-01-14","Status: Open","=== FIX PLAN ===","Phase 1: Single Source of Truth","- Loại bỏ kb_async, chỉ giữ kb_sync","- Sửa AppState để nhận Arc<KnowledgeBase> thay vì Arc<RwLock<KB>>","- REST/WebSocket endpoints gọi trực tiếp vào kb_sync","Phase 2: Refactor REST handlers","- Thay state.kb.read().await bằng state.kb.method() (sync call)","- KnowledgeBase đã có internal RwLock, không cần outer lock","Phase 3: WebSocket sync","- Broadcaster vẫn hoạt động bình thường","- Khi MCP tool mutate -> emit event -> WebSocket broadcast","Files cần sửa:","- src/main.rs: run_http_server()","- src/api/websocket/state.rs: AppState struct","- src/api/rest/*.rs: Tất cả handlers","- src/api/http.rs: create_router_with_auth()","Estimated effort: 2-3 hours","Risk: Medium - cần test kỹ concurrent access","=== FIX COMPLETED: 2026-01-14 ===","Status: RESOLVED","Changes made:","- src/api/websocket/state.rs: AppState.kb changed from Arc<RwLock<KB>> to Arc<KB>","- src/main.rs: Removed kb_async, use single kb instance for both SSE and REST/WS","- src/api/rest/entities.rs: Removed async RwLock access, use sync graph.read()","- src/api/rest/graph.rs: Removed async RwLock access, use sync graph.read()","- src/api/rest/relations.rs: Removed async RwLock access, use sync graph.read()","- src/api/rest/search.rs: Direct sync call to kb.search_nodes()","- src/api/http.rs: Updated tests to use single KB instance","Test result: 95 tests passed, 0 failed","Build: cargo build --release SUCCESS"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768351570,"updatedAt":1768352794}
{"name":"Bug: Nested RwLock Pattern","entityType":"Bug","observations":["AppState.kb sử dụng tokio::RwLock<KnowledgeBase>","KnowledgeBase.graph sử dụng std::sync::RwLock<KnowledgeGraph>","Pattern: state.kb.read().await -> kb.graph.read().unwrap()","Risk: Async task giữ outer lock quá lâu có thể gây blocking","Risk: Potential deadlock khi inference/snapshot/event replay","Priority: P1 - Medium","Discovered by: ChatGPT Code Review","Discovered date: 2026-01-14","Status: Open","=== FIX PLAN ===","Option A (Simple - Recommended):","- Sau khi fix Bug: Dual KnowledgeBase, outer lock sẽ bị loại bỏ","- Chỉ còn KnowledgeBase.graph internal RwLock","- Problem tự giải quyết","Option B (Advanced - Future):","- Dùng ArcSwap cho lock-free read","- Dùng im::HashMap cho immutable data structures","- Chỉ cần khi scale >100k entities","Recommendation: Fix Bug: Dual KnowledgeBase trước, sau đó re-evaluate","Dependency: Bug: Dual KnowledgeBase phải fix trước","=== AUTO-RESOLVED: 2026-01-14 ===","Status: RESOLVED (by fixing Bug: Dual KnowledgeBase Instances)","Outer tokio::RwLock removed from AppState","Now only internal std::sync::RwLock in KnowledgeBase.graph remains","No more nested lock pattern"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768351570,"updatedAt":1768352794}
{"name":"Bug: Inference O(N) Scan","entityType":"Bug","observations":["Vấn đề: TransitiveDependencyRule scan toàn bộ relations list trong vòng lặp BFS","Code: graph.relations.iter().filter(|r| r.from == current) - O(N) trong mỗi iteration","Hậu quả: O(Nodes × Relations) complexity, chậm với graph lớn (>10k relations)","Priority: P1 - Medium","Solution: Build Adjacency Map (HashMap<String, Vec<&Relation>>) trước khi BFS","Discovered by: B3K Code Review","Discovered date: 2026-01-14","Status: Open","=== FIX COMPLETED: 2026-01-14 ===","Status: RESOLVED","Solution: Thêm function build_adjacency_map() tạo HashMap<&str, Vec<&Relation>>","Location: src/knowledge_base/inference/rules.rs","Before: O(N) filter trong mỗi BFS iteration - graph.relations.iter().filter()","After: O(1) lookup via adjacency_map.get(current.as_str())","Complexity change: O(Nodes × Relations) → O(Nodes + Relations)","Adjacency map được build 1 lần trước khi BFS, reuse cho tất cả nodes","Test result: 15 inference tests passed","Build: cargo build --release SUCCESS"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768354854,"updatedAt":1768355653}
{"name":"Bug: Relation Key Separator","entityType":"Bug","observations":["Vấn đề: create_relations check trùng bằng format!(\"{}|{}|{}\", from, to, type)","Rủi ro: Nếu entity name chứa ký tự '|', logic check trùng sẽ sai","Example: 'A|B' + 'C' + 'type' = 'A|B|C|type' - không phân biệt được","Priority: P2 - Low","Solution: Dùng Tuple (from, to, type) trong HashSet thay vì String concatenation","Discovered by: B3K Code Review","Discovered date: 2026-01-14","Status: Open","Status: RESOLVED","Fixed: 2026-01-14","Solution: Changed HashSet<String> with format!(\"{}|{}|{}\") to HashSet<(String, String, String)> tuple","Files modified: src/knowledge_base/crud.rs","Benefit: Entity names containing | character no longer cause false duplicate detection"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768354854,"updatedAt":1768357587}
{"name":"Bug: JWT Secret Auto-Generate","entityType":"Bug","observations":["Vấn đề: JwtAuth::from_env() tự generate random secret nếu không set env var","Code: format!(\"dev-secret-{}\", chrono::Utc::now().timestamp_nanos())","Hậu quả: Restart server → tất cả tokens cũ invalid → clients bị logout","Priority: P1 - Medium","Solution: Lưu auto-generated secret vào file .jwt_secret, hoặc log warning to","Discovered by: B3K Code Review","Discovered date: 2026-01-14","Status: Open","=== FIX COMPLETED: 2026-01-14 ===","Status: RESOLVED","Solution: Thêm file-based secret persistence với .jwt_secret file","Location: src/api/sse/auth.rs","New functions:","- load_or_create_secret_file(): Load từ file hoặc generate mới và save","- generate_secure_secret(): Tạo 64-char hex secret (256 bits) từ multiple entropy sources","Behavior:","1. Nếu MEMORY_JWT_SECRET được set → dùng env var (ưu tiên cao nhất)","2. Nếu .jwt_secret file tồn tại → load từ file (persist across restarts)","3. Nếu không có → generate mới và save vào .jwt_secret","Warnings: Log rõ ràng khi dùng auto-generated secret","Test result: 8 auth tests passed","Build: cargo build --release SUCCESS"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768354854,"updatedAt":1768356742}
{"name":"Bug: SSE Missing Event Replay","entityType":"Bug","observations":["Vấn đề: Client reconnect sau disconnect không thể replay missed events","Hiện tại: Client reconnect → mất tất cả events trong thời gian disconnect","Priority: P1 - Medium","Solution: Client gửi last_sequence_id, Server replay từ event log","Cần: Index events theo sequence_id, endpoint GET /mcp/events?since=<seq>","Discovered by: ChatGPT Code Review","Discovered date: 2026-01-14","Status: Open","Status: RESOLVED","Fixed: 2026-01-14","Solution: Added event history buffer with circular VecDeque (1000 events) and REST replay endpoint","Files modified: src/api/websocket/broadcaster.rs, src/api/rest/graph.rs, src/api/http.rs","New endpoint: GET /api/events/replay?since=<seq_id>","New methods: get_events_since(), oldest_sequence_id(), history_len()","Tests added: test_event_history_storage, test_get_events_since, test_history_circular_buffer"],"createdBy":"Mai Thành Duy An","updatedBy":"Mai Thành Duy An","createdAt":1768354854,"updatedAt":1768357587}
{"from":"tiach","to":"Memory Graph MCP Server","relationType":"develops"}
{"from":"Memory Graph MCP Server","to":"Feature: Create Entities","relationType":"implements"}
{"from":"Memory Graph MCP Server","to":"Feature: Create Relations","relationType":"implements"}
{"from":"Memory Graph MCP Server","to":"Feature: Search Nodes","relationType":"implements"}
{"from":"Memory Graph MCP Server","to":"Feature: Persistent Storage","relationType":"implements"}
{"from":"tiach","to":"Feature: Create Entities","relationType":"owns"}
{"from":"tiach","to":"Feature: Create Relations","relationType":"owns"}
{"from":"tiach","to":"Feature: Search Nodes","relationType":"owns"}
{"from":"tiach","to":"Feature: Persistent Storage","relationType":"owns"}
{"from":"tiach","to":"Decision: Use JSONL Format","relationType":"made"}
{"from":"tiach","to":"Decision: Use Rust","relationType":"made"}
{"from":"Decision: Use JSONL Format","to":"Feature: Persistent Storage","relationType":"affects"}
{"from":"Decision: Use Rust","to":"Memory Graph MCP Server","relationType":"affects"}
{"from":"Milestone: MVP Release","to":"Feature: Create Entities","relationType":"includes"}
{"from":"Milestone: MVP Release","to":"Feature: Create Relations","relationType":"includes"}
{"from":"Milestone: MVP Release","to":"Feature: Search Nodes","relationType":"includes"}
{"from":"Milestone: MVP Release","to":"Feature: Persistent Storage","relationType":"includes"}
{"from":"Requirement: Unicode Support","to":"Feature: Create Entities","relationType":"satisfied_by"}
{"from":"Requirement: MCP Compliance","to":"Memory Graph MCP Server","relationType":"satisfied_by"}
{"from":"Risk: JSONL Scalability","to":"Milestone: Production Ready","relationType":"threatens"}
{"from":"Risk: Memory Usage","to":"Milestone: Production Ready","relationType":"threatens"}
{"from":"Risk: JSONL Scalability","to":"Decision: Use JSONL Format","relationType":"related_to"}
{"from":"Memory Graph MCP Server","to":"Feature: GNN Integration","relationType":"will_implement"}
{"from":"Memory Graph MCP Server","to":"Feature: Semantic Search","relationType":"will_implement"}
{"from":"Feature: GNN Integration","to":"Feature: Semantic Search","relationType":"depends_on"}
{"from":"Feature: GNN Integration","to":"Milestone: Production Ready","relationType":"planned_for"}
{"from":"Feature: Semantic Search","to":"Milestone: Production Ready","relationType":"planned_for"}
{"from":"tiach","to":"Feature: GNN Integration","relationType":"owns"}
{"from":"tiach","to":"Feature: Semantic Search","relationType":"owns"}
{"from":"Memory Graph MCP Server","to":"EntityType: Module","relationType":"supports"}
{"from":"Memory Graph MCP Server","to":"EntityType: File","relationType":"supports"}
{"from":"Memory Graph MCP Server","to":"EntityType: Function","relationType":"supports"}
{"from":"Memory Graph MCP Server","to":"EntityType: Schema","relationType":"supports"}
{"from":"Memory Graph MCP Server","to":"EntityType: BusinessRule","relationType":"supports"}
{"from":"Memory Graph MCP Server","to":"EntityType: Convention","relationType":"supports"}
{"from":"Memory Graph MCP Server","to":"EntityType: Dependency","relationType":"supports"}
{"from":"Memory Graph MCP Server","to":"Feature: Get Related Tool","relationType":"will_implement"}
{"from":"Memory Graph MCP Server","to":"Feature: Traverse Tool","relationType":"will_implement"}
{"from":"Memory Graph MCP Server","to":"Feature: Summarize Tool","relationType":"will_implement"}
{"from":"Feature: Traverse Tool","to":"Feature: Get Related Tool","relationType":"depends_on"}
{"from":"tiach","to":"Feature: Get Related Tool","relationType":"owns"}
{"from":"tiach","to":"Feature: Traverse Tool","relationType":"owns"}
{"from":"tiach","to":"Feature: Summarize Tool","relationType":"owns"}
{"from":"Bug: Update Paradox","to":"Memory Graph MCP Server","relationType":"affects","createdAt":1768062654}
{"from":"Bug: Context Window Killer","to":"Memory Graph MCP Server","relationType":"affects","createdAt":1768062654}
{"from":"Bug: Semantic Blindness","to":"Memory Graph MCP Server","relationType":"affects","createdAt":1768062654}
{"from":"Decision: Mutex to RwLock Migration","to":"Module: src/knowledge_base","relationType":"affects","createdBy":"Mai Thành Duy An","createdAt":1768098907}
{"from":"Memory Graph MCP Server","to":"Decision: Mutex to RwLock Migration","relationType":"implements","createdBy":"Mai Thành Duy An","createdAt":1768098907}
{"from":"Memory Graph MCP Server","to":"Feature: Rule-based Inference Engine","relationType":"will_implement","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Memory Graph MCP Server","to":"Feature: Typed Relations with Semantics","relationType":"will_implement","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Memory Graph MCP Server","to":"Feature: Hybrid Neuro-Symbolic Reasoning","relationType":"will_implement","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Feature: Typed Relations with Semantics","to":"Feature: Rule-based Inference Engine","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Feature: Hybrid Neuro-Symbolic Reasoning","to":"Feature: GNN Integration","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Feature: Hybrid Neuro-Symbolic Reasoning","to":"Feature: Rule-based Inference Engine","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Feature: Self-Extending Knowledge Graph","to":"Feature: Hybrid Neuro-Symbolic Reasoning","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Feature: Temporal Counterfactual Reasoning","to":"Feature: Typed Relations with Semantics","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Research: Graph Reasoning Capability Analysis","to":"Feature: Rule-based Inference Engine","relationType":"proposes","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Research: Graph Reasoning Capability Analysis","to":"Feature: Typed Relations with Semantics","relationType":"proposes","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"tiach","to":"Feature: Rule-based Inference Engine","relationType":"owns","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"tiach","to":"Feature: Typed Relations with Semantics","relationType":"owns","createdBy":"Mai Thành Duy An","createdAt":1768108033}
{"from":"Feature: Inference Engine v1.2.0","to":"Module: src/knowledge_base","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768112140}
{"from":"Feature: Inference Engine v1.2.0","to":"Decision: Mutex to RwLock Migration","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768112140}
{"from":"Bug: Git Stash Data Loss","to":"Feature: Inference Engine v1.2.0","relationType":"caused_by","createdBy":"Mai Thành Duy An","createdAt":1768113849}
{"from":"Lesson: Git Stash Best Practices","to":"Bug: Git Stash Data Loss","relationType":"fixes","createdBy":"Mai Thành Duy An","createdAt":1768113849}
{"from":"Proposed: Team Collaboration Architecture","to":"Memory Graph MCP Server","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768118783}
{"from":"File: ui/index.html","to":"Module: ui","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/css/styles.css","to":"Module: ui","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/js/app.js","to":"Module: ui","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/js/graph.js","to":"Module: ui","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/js/inference.js","to":"Module: ui","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/js/editor.js","to":"Module: ui","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/favicon.svg","to":"Module: ui","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/js/app.js","to":"File: ui/js/graph.js","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/js/app.js","to":"File: ui/js/inference.js","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/js/app.js","to":"File: ui/js/editor.js","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/index.html","to":"File: ui/css/styles.css","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"File: ui/index.html","to":"File: ui/js/app.js","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768123594}
{"from":"Feature: Event Sourcing Architecture","to":"Memory Graph MCP Server","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768139208}
{"from":"Module: src/event_store","to":"Feature: Event Sourcing Architecture","relationType":"implements","createdBy":"Mai Thành Duy An","createdAt":1768139208}
{"from":"Module: src/event_store","to":"Module: src/knowledge_base","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768139208}
{"from":"Feature: Event Sourcing Architecture","to":"Bug: Update Paradox","relationType":"fixes","createdBy":"Mai Thành Duy An","createdAt":1768139208}
{"from":"Proposed: WebSocket Real-time UI","to":"Memory Graph MCP Server","relationType":"part_of","createdBy":"Mai Thành Duy An","createdAt":1768142841}
{"from":"Proposed: WebSocket Real-time UI","to":"Feature: Event Sourcing Architecture","relationType":"depends_on","createdBy":"Mai Thành Duy An","createdAt":1768142841}
{"from":"Proposed: WebSocket Real-time UI","to":"Proposed: Team Collaboration Architecture","relationType":"relates_to","createdBy":"Mai Thành Duy An","createdAt":1768142841}
{"from":"Bug: Dual KnowledgeBase Instances","to":"Memory Graph MCP Server","relationType":"affects","createdBy":"Mai Thành Duy An","createdAt":1768351587}
{"from":"Bug: Nested RwLock Pattern","to":"Memory Graph MCP Server","relationType":"affects","createdBy":"Mai Thành Duy An","createdAt":1768351587}
{"from":"Bug: Nested RwLock Pattern","to":"Bug: Dual KnowledgeBase Instances","relationType":"related_to","createdBy":"Mai Thành Duy An","createdAt":1768351587}
{"from":"Bug: Inference O(N) Scan","to":"Memory Graph MCP Server","relationType":"affects","createdBy":"Mai Thành Duy An","createdAt":1768354862}
{"from":"Bug: Relation Key Separator","to":"Memory Graph MCP Server","relationType":"affects","createdBy":"Mai Thành Duy An","createdAt":1768354862}
{"from":"Bug: JWT Secret Auto-Generate","to":"Memory Graph MCP Server","relationType":"affects","createdBy":"Mai Thành Duy An","createdAt":1768354862}
{"from":"Bug: SSE Missing Event Replay","to":"Memory Graph MCP Server","relationType":"affects","createdBy":"Mai Thành Duy An","createdAt":1768354862}