memorix 0.7.4 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <p align="center">
2
2
  <img src="assets/logo.png" alt="Memorix Logo" width="120">
3
3
  <h1 align="center">Memorix</h1>
4
- <p align="center"><strong>Cross-Agent Memory Bridge — Universal memory layer for AI coding agents via MCP</strong></p>
4
+ <p align="center"><strong>Cross-Agent Memory Bridge — Your AI never forgets again</strong></p>
5
5
  <p align="center">
6
6
  <a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/v/memorix.svg?style=flat-square&color=cb3837" alt="npm version"></a>
7
7
  <a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/dm/memorix.svg?style=flat-square&color=blue" alt="npm downloads"></a>
@@ -10,25 +10,45 @@
10
10
  <img src="https://img.shields.io/badge/tests-422%20passed-brightgreen?style=flat-square" alt="Tests">
11
11
  </p>
12
12
  <p align="center">
13
- <a href="#-quick-start">Quick Start</a>
14
- <a href="#-features">Features</a> •
15
- <a href="#-agent-configuration">Agent Config</a>
16
- <a href="#-how-it-works">How It Works</a>
17
- <a href="#-development">Development</a>
13
+ <img src="https://img.shields.io/badge/Works%20with-Cursor-orange?style=flat-square" alt="Cursor">
14
+ <img src="https://img.shields.io/badge/Works%20with-Windsurf-blue?style=flat-square" alt="Windsurf">
15
+ <img src="https://img.shields.io/badge/Works%20with-Claude%20Code-purple?style=flat-square" alt="Claude Code">
16
+ <img src="https://img.shields.io/badge/Works%20with-Codex-green?style=flat-square" alt="Codex">
17
+ <img src="https://img.shields.io/badge/Works%20with-Copilot-lightblue?style=flat-square" alt="Copilot">
18
+ <img src="https://img.shields.io/badge/Works%20with-Kiro-red?style=flat-square" alt="Kiro">
19
+ <img src="https://img.shields.io/badge/Works%20with-Antigravity-grey?style=flat-square" alt="Antigravity">
20
+ </p>
21
+ <p align="center">
22
+ <a href="#-stop-re-explaining-your-project">Why</a> •
23
+ <a href="#-get-started-in-30-seconds">Quick Start</a> •
24
+ <a href="#-real-world-scenarios">Scenarios</a> •
25
+ <a href="#-what-memorix-can-do">Features</a> •
26
+ <a href="#-comparison-with-alternatives">Compare</a> •
27
+ <a href="docs/SETUP.md">Full Setup Guide</a>
18
28
  </p>
19
29
  </p>
20
30
 
21
31
  ---
22
32
 
23
- > **One project, seven agents, zero context loss.**
24
- >
25
- > Memorix is a **cross-agent memory bridge** it lets Cursor, Windsurf, Claude Code, Codex, Copilot, Antigravity, and **Kiro** **share the same project knowledge** in real-time. Architecture decisions made in one IDE are instantly available in another. Switch tools, open new windows, start fresh sessions your context follows you everywhere via [MCP](https://modelcontextprotocol.io/). It also **syncs MCP configs, rules, skills, and workflows** across all your agents automatically.
33
+ ## 😤 Stop Re-Explaining Your Project
34
+
35
+ Your AI assistant forgets everything when you start a new chat. You spend 10 minutes re-explaining your architecture. **Again.** And if you switch from Cursor to Claude Code? Everything is gone. **Again.**
36
+
37
+ | Without Memorix | With Memorix |
38
+ |-----------------|--------------|
39
+ | **Session 2:** "What's our tech stack?" | **Session 2:** "I remember — Next.js with Prisma and tRPC. What should we build next?" |
40
+ | **Switch IDE:** All context lost | **Switch IDE:** Context follows you instantly |
41
+ | **New team member's AI:** Starts from zero | **New team member's AI:** Already knows the codebase |
42
+ | **After 50 tool calls:** Context explodes, restart needed | **After restart:** Picks up right where you left off |
43
+ | **MCP configs:** Copy-paste between 7 IDEs manually | **MCP configs:** One command syncs everything |
44
+
45
+ **Memorix solves all of this.** One MCP server. Seven agents. Zero context loss.
26
46
 
27
47
  ---
28
48
 
29
- ## ⚡ Quick Start
49
+ ## ⚡ Get Started in 30 Seconds
30
50
 
31
- One config line. Seven agents. Zero context loss.
51
+ Add this to your agent's MCP config file, restart — done:
32
52
 
33
53
  ```json
34
54
  {
@@ -41,361 +61,234 @@ One config line. Seven agents. Zero context loss.
41
61
  }
42
62
  ```
43
63
 
44
- Add this to your agent's MCP config, restart done. 🎉
64
+ > 📖 **Where is my config file?** [Full setup guide for all 7 agents](docs/SETUP.md)
65
+ > Windsurf • Cursor • Claude Code • Codex • VS Code Copilot • Antigravity • Kiro
45
66
 
46
- > 💡 Agent-specific config paths: [Windsurf](#windsurf) [Cursor](#cursor) [Claude Code](#claude-code) • [Codex](#codex) • [VS Code Copilot](#vs-code-copilot) • [Antigravity](#antigravity) • [Kiro](#kiro)
67
+ That's it. No API keys. No cloud accounts. No dependencies. Just works.
47
68
 
48
69
  ---
49
70
 
50
- ## 🤔 The Problem
51
-
52
- | Situation | Pain |
53
- |-----------|------|
54
- | Architecture decisions in Cursor | Invisible to Claude Code |
55
- | Bug fix knowledge in Windsurf | Doesn't transfer to Codex |
56
- | MCP server configs | Manually copy-paste between agents |
57
- | Agent rules & skills | Stuck in one IDE |
58
- | Start a new session | Re-explain everything from scratch |
71
+ ## 🎬 Real-World Scenarios
59
72
 
60
- **No one bridges memory AND workspace configs across agents — until now.**
61
-
62
- ---
73
+ ### Scenario 1: Cross-Session Memory
63
74
 
64
- ## ✨ Features
65
-
66
- ### 🧠 Smart Memory
67
-
68
- - **Knowledge Graph** — Entity-Relation model, [MCP Official Memory Server](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) compatible
69
- - **9 Observation Types** — 🎯 session-request 🔴 gotcha 🟡 problem-solution 🔵 how-it-works 🟢 what-changed 🟣 discovery 🟠 why-it-exists 🟤 decision ⚖️ trade-off
70
- - **Auto-Enrichment** Automatically extracts file paths, module names, CamelCase identifiers from your narratives
71
- - **Auto-Relations** Detects causal language ("because", "due to", "fixed by") and auto-creates typed graph relations
72
- - **Memory Decay** Exponential decay scoring with immunity rules, so old memories fade while critical ones persist forever
73
-
74
- ### 🔍 Token-Efficient Search
75
+ ```
76
+ Monday morning — You and Cursor discuss auth architecture:
77
+ You: "Let's use JWT with refresh tokens, 15-minute expiry"
78
+ → Memorix auto-stores this as a 🟤 decision
79
+
80
+ Tuesday New Cursor session:
81
+ You: "Add the login endpoint"
82
+ AI calls memorix_search("auth") finds Monday's decision
83
+ "Got it, I'll implement JWT with 15-min refresh tokens as we decided"
84
+ → Zero re-explaining!
85
+ ```
75
86
 
76
- - **3-Layer Progressive Disclosure** — Based on [claude-mem](https://github.com/anthropics/claude-code) (~10x token savings)
77
- - **L1** `memorix_search` → Compact index (~50-100 tokens/result)
78
- - **L2** `memorix_timeline` → Chronological context
79
- - **L3** `memorix_detail` → Full details on demand (~500-1000 tokens/result)
80
- - **Hybrid Search** — Full-text (BM25) + Vector (semantic) via [Orama](https://github.com/orama/orama)
81
- - **Token Budget** — `maxTokens` parameter auto-trims results to fit context windows
87
+ ### Scenario 2: Cross-Agent Collaboration
82
88
 
83
- ### 🔄 Cross-Agent Workspace Sync
89
+ ```
90
+ You use Windsurf for backend, Claude Code for reviews:
84
91
 
85
- - **7 Agent Adapters** Windsurf, Cursor, Claude Code, Codex, VS Code Copilot, Antigravity, **Kiro**
86
- - **MCP Config Migration** Detect and migrate MCP server configs (merges — never overwrites)
87
- - **Rules Sync** — Scan → Deduplicate → Conflict detection → Cross-format generation
88
- - **Skills & Workflows** — Copy skill folders and workflow files across agents
89
- - **Memory-Driven Skills** — `memorix_skills` auto-generates project-specific `SKILL.md` from observation patterns (gotchas, decisions, how-it-works)
90
- - **Apply with Safety** — Backup `.bak` → Atomic write → Auto-rollback on failure
92
+ Windsurf: You fix a tricky race condition in the payment module
93
+ Memorix stores it as a 🟡 problem-solution with the fix details
91
94
 
92
- ### 🔒 Project Isolation
95
+ Claude Code: "Review the payment module"
96
+ → AI calls memorix_search("payment") → finds the race condition fix
97
+ → "I see there was a recent race condition fix. Let me verify it's correct..."
98
+ → Knowledge transfers seamlessly between agents!
99
+ ```
93
100
 
94
- - **Per-Project Data** Each project stores data in its own directory (`~/.memorix/data/<owner--repo>/`)
95
- - **Git-Based Detection** — Project identity derived from `git remote`, no manual config needed
96
- - **Scoped Search** — `memorix_search` defaults to current project; set `scope: "global"` to search all
97
- - **Auto Migration** — Legacy global data automatically migrates to project directories on first run
98
- - **Zero Cross-Contamination** — Architecture decisions from project A never leak into project B
101
+ ### Scenario 3: Gotcha Prevention
99
102
 
100
- ### 📊 Visual Dashboard
103
+ ```
104
+ Week 1: You hit a painful Windows path separator bug
105
+ → Memorix stores it as a 🔴 gotcha: "Use path.join(), never string concat"
101
106
 
102
- - **Web Dashboard** `memorix_dashboard` opens a beautiful web UI at `http://localhost:3210`
103
- - **Project Switcher** Dropdown to view any project's data without switching IDEs
104
- - **Knowledge Graph** Interactive visualization of entities and relations
105
- - **Type Distribution Chart** Canvas donut chart showing observation type breakdown
106
- - **Embedding Status** — Real-time display of vector search provider status (enabled/provider/dimensions)
107
- - **Retention Scores** — Exponential decay scoring with immunity status
108
- - **Observation Management** — Expand/collapse details, **search with text highlighting**, delete with confirmation, data export
109
- - **Batch Cleanup** — Auto-detect and bulk-delete low-quality observations
110
- - **Light/Dark Theme** — Premium glassmorphism design, bilingual (EN/中文)
107
+ Week 3: AI is about to write `baseDir + '/' + filename`
108
+ → Session-start hook injected the gotcha into context
109
+ AI writes `path.join(baseDir, filename)` instead
110
+ Bug prevented before it happened!
111
+ ```
111
112
 
112
- ### 🪝 Auto-Memory Hooks
113
+ ### Scenario 4: Workspace Sync Across IDEs
113
114
 
114
- - **Implicit Memory** — Auto-captures decisions, errors, gotchas from agent activity
115
- - **Session Start Injection** Intelligently loads recent high-value memories (gotchas, decisions, problem-solutions) and injects a concise summary into the agent's system prompt at session start
116
- - **Multi-Language Pattern Detection** English + Chinese keyword matching
117
- - **Cooldown & Noise Filtering** — 30s cooldown, skips trivial commands (ls, cat, pwd)
118
- - **One-Command Install** `memorix hooks install` sets up hooks + rules for your agent
115
+ ```
116
+ You have 12 MCP servers configured in Cursor.
117
+ Now you want to try Kiro.
118
+
119
+ You: "Sync my workspace to Kiro"
120
+ → memorix_workspace_sync scans Cursor's MCP configs
121
+ → Generates Kiro-compatible .kiro/settings/mcp.json
122
+ → Also syncs your rules, skills, and workflows
123
+ → Kiro is ready in seconds, not hours!
124
+ ```
119
125
 
120
- ### 🔁 Context Continuity
126
+ ### Scenario 5: Auto-Generated Project Skills
121
127
 
122
128
  ```
123
- Session 1: You and AI discuss auth architecture
124
- Memorix auto-stores the decision
125
-
126
- Session 2: New chat, same project
127
- → AI searches Memorix → "Ah, we decided on JWT with refresh tokens"
128
- No re-explaining needed!
129
+ After 2 weeks of development, you have 50+ observations:
130
+ - 8 gotchas about Windows path issues
131
+ - 5 decisions about the auth module
132
+ - 3 problem-solutions for database migrations
133
+
134
+ You: "Generate project skills"
135
+ → memorix_skills clusters observations by entity
136
+ → Auto-generates SKILL.md files:
137
+ - "auth-module-guide.md" — JWT setup, refresh flow, common pitfalls
138
+ - "database-migrations.md" — Prisma patterns, rollback strategies
139
+ → Syncs skills to any agent: Cursor, Claude Code, Kiro...
140
+ → New team members' AI instantly knows your project's patterns!
129
141
  ```
130
142
 
131
143
  ---
132
144
 
133
- ## 🔧 Agent Configuration
145
+ ## 🧠 What Memorix Can Do
134
146
 
135
- ### Windsurf
147
+ ### Smart Memory (17 MCP Tools)
136
148
 
137
- `~/.codeium/windsurf/mcp_config.json`:
138
- ```json
139
- {
140
- "mcpServers": {
141
- "memorix": {
142
- "command": "npx",
143
- "args": ["-y", "memorix@latest", "serve"]
144
- }
145
- }
146
- }
147
- ```
149
+ | What You Say | What Memorix Does |
150
+ |-------------|-------------------|
151
+ | "Remember this architecture decision" | `memorix_store` — Classifies as 🟤 decision, extracts entities, creates graph relations |
152
+ | "What did we decide about auth?" | `memorix_search` → `memorix_detail` — 3-layer progressive disclosure, ~10x token savings |
153
+ | "What happened around that bug fix?" | `memorix_timeline` — Shows chronological context before/after |
154
+ | "Show me the knowledge graph" | `memorix_dashboard` — Opens interactive web UI with D3.js graph |
155
+ | "Which memories are getting stale?" | `memorix_retention` — Exponential decay scores, identifies archive candidates |
148
156
 
149
- > **Timeout troubleshooting** — If you see `MCP server initialization timed out after 60 seconds`, add `--cwd` to force the project root:
150
- > ```json
151
- > {
152
- > "mcpServers": {
153
- > "memorix": {
154
- > "command": "npx",
155
- > "args": ["-y", "memorix@latest", "serve", "--cwd", "<your-project-path>"]
156
- > }
157
- > }
158
- > }
159
- > ```
160
-
161
- ### Cursor
162
-
163
- `.cursor/mcp.json`:
164
- ```json
165
- {
166
- "mcpServers": {
167
- "memorix": {
168
- "command": "npx",
169
- "args": ["-y", "memorix@latest", "serve"]
170
- }
171
- }
172
- }
173
- ```
157
+ ### Cross-Agent Workspace Sync
174
158
 
175
- ### Claude Code
159
+ | What You Say | What Memorix Does |
160
+ |-------------|-------------------|
161
+ | "Sync my MCP servers to Kiro" | `memorix_workspace_sync` — Migrates configs, merges (never overwrites) |
162
+ | "Check my agent rules" | `memorix_rules_sync` — Scans 7 agents, deduplicates, detects conflicts |
163
+ | "Generate rules for Cursor" | `memorix_rules_sync` — Cross-format conversion (`.mdc` ↔ `CLAUDE.md` ↔ `.kiro/steering/`) |
164
+ | "Generate project skills" | `memorix_skills` — Creates SKILL.md from observation patterns |
165
+ | "Inject the auth skill" | `memorix_skills` — Returns skill content directly into agent context |
176
166
 
177
- `~/.claude.json`:
178
- ```json
179
- {
180
- "mcpServers": {
181
- "memorix": {
182
- "command": "npx",
183
- "args": ["-y", "memorix@latest", "serve"]
184
- }
185
- }
186
- }
187
- ```
167
+ ### Knowledge Graph (MCP Official Compatible)
188
168
 
189
- ### Codex
169
+ | Tool | What It Does |
170
+ |------|-------------|
171
+ | `create_entities` | Build your project's knowledge graph |
172
+ | `create_relations` | Connect entities with typed edges (causes, fixes, depends_on) |
173
+ | `add_observations` | Attach observations to entities |
174
+ | `search_nodes` / `open_nodes` | Query the graph |
175
+ | `read_graph` | Export full graph for visualization |
190
176
 
191
- `~/.codex/config.toml`:
192
- ```toml
193
- [mcp_servers.memorix]
194
- command = "npx"
195
- args = ["-y", "memorix@latest", "serve"]
196
- ```
177
+ > **Drop-in compatible** with [MCP Official Memory Server](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) — same API, more features.
197
178
 
198
- ### VS Code Copilot
179
+ ### 9 Observation Types
199
180
 
200
- **Option A** `.vscode/mcp.json` (workspace-scoped):
201
- ```json
202
- {
203
- "servers": {
204
- "memorix": {
205
- "command": "npx",
206
- "args": ["-y", "memorix@latest", "serve"]
207
- }
208
- }
209
- }
210
- ```
181
+ Every memory is classified for intelligent retrieval:
211
182
 
212
- **Option B** VS Code `settings.json` (global):
213
- ```json
214
- {
215
- "mcp": {
216
- "servers": {
217
- "memorix": {
218
- "command": "npx",
219
- "args": ["-y", "memorix@latest", "serve"]
220
- }
221
- }
222
- }
223
- }
224
- ```
183
+ | Icon | Type | When To Use |
184
+ |------|------|-------------|
185
+ | 🎯 | `session-request` | Original task/goal for this session |
186
+ | 🔴 | `gotcha` | Critical pitfall — "Never do X because Y" |
187
+ | 🟡 | `problem-solution` | Bug fix with root cause and solution |
188
+ | 🔵 | `how-it-works` | Technical explanation of a system |
189
+ | 🟢 | `what-changed` | Code/config change record |
190
+ | 🟣 | `discovery` | New insight or finding |
191
+ | 🟠 | `why-it-exists` | Rationale behind a design choice |
192
+ | 🟤 | `decision` | Architecture/design decision |
193
+ | ⚖️ | `trade-off` | Compromise with pros/cons |
225
194
 
226
- ### Antigravity
195
+ ### Visual Dashboard
227
196
 
228
- `~/.gemini/antigravity/settings/mcp_config.json`:
229
- ```json
230
- {
231
- "mcpServers": {
232
- "memorix": {
233
- "command": "npx",
234
- "args": ["-y", "memorix@latest", "serve"]
235
- }
236
- }
237
- }
238
- ```
197
+ Run `memorix_dashboard` to open a web UI at `http://localhost:3210`:
239
198
 
240
- ### Kiro
199
+ - **Interactive Knowledge Graph** — D3.js force-directed visualization of entities and relations
200
+ - **Observation Browser** — Filter by type, search with highlighting, expand/collapse details
201
+ - **Retention Panel** — See which memories are active, stale, or candidates for archival
202
+ - **Project Switcher** — View any project's data without switching IDEs
203
+ - **Batch Cleanup** — Auto-detect and bulk-delete low-quality observations
204
+ - **Light/Dark Theme** — Premium glassmorphism design, bilingual (EN/中文)
241
205
 
242
- `.kiro/settings/mcp.json`:
243
- ```json
244
- {
245
- "mcpServers": {
246
- "memorix": {
247
- "command": "npx",
248
- "args": ["-y", "memorix@latest", "serve"]
249
- }
250
- }
251
- }
206
+ ### Auto-Memory Hooks
207
+
208
+ Memorix can **automatically capture** decisions, errors, and gotchas from your coding sessions:
209
+
210
+ ```bash
211
+ memorix hooks install # One-command setup
252
212
  ```
253
213
 
214
+ - **Implicit Memory** — Detects patterns like "I decided to...", "The bug was caused by...", "Never use X"
215
+ - **Session Start Injection** — Loads recent high-value memories into agent context automatically
216
+ - **Multi-Language** — English + Chinese keyword matching
217
+ - **Smart Filtering** — 30s cooldown, skips trivial commands (ls, cat, pwd)
218
+
254
219
  ---
255
220
 
256
- ## 🛠 Available MCP Tools
257
-
258
- ### Memorix Extensions
259
-
260
- | Tool | Purpose | Token Cost |
261
- |------|---------|------------|
262
- | `memorix_store` | Store observation with auto-enrichment | |
263
- | `memorix_search` | L1: Compact index search | ~50-100/result |
264
- | `memorix_timeline` | L2: Chronological context | ~100-200/group |
265
- | `memorix_detail` | L3: Full observation details | ~500-1000/result |
266
- | `memorix_retention` | Memory decay & retention status | |
267
- | `memorix_dashboard` | Launch visual web dashboard in browser | |
268
- | `memorix_rules_sync` | Scan/deduplicate/generate rules across agents | |
269
- | `memorix_workspace_sync` | Migrate MCP configs, workflows, skills | |
270
-
271
- ### MCP Official Compatible (Drop-in Replacement)
272
-
273
- | Tool | Purpose |
274
- |------|---------|
275
- | `create_entities` | Create knowledge graph entities |
276
- | `create_relations` | Create relations between entities |
277
- | `add_observations` | Add observations to entities |
278
- | `delete_entities` | Delete entities (cascades relations) |
279
- | `delete_observations` | Delete specific observations |
280
- | `delete_relations` | Delete relations |
281
- | `search_nodes` | Search knowledge graph |
282
- | `open_nodes` | Get entities by name |
283
- | `read_graph` | Read entire graph |
221
+ ## 📊 Comparison with Alternatives
222
+
223
+ | | [Mem0](https://github.com/mem0ai/mem0) | [mcp-memory-service](https://github.com/doobidoo/mcp-memory-service) | [claude-mem](https://github.com/anthropics/claude-code) | **Memorix** |
224
+ |---|---|---|---|---|
225
+ | **Agents supported** | SDK-based | 13+ (MCP) | Claude Code only | **7 IDEs (MCP)** |
226
+ | **Cross-agent sync** | No | No | No | **Yes (configs, rules, skills, workflows)** |
227
+ | **Rules sync** | No | No | No | **Yes (7 formats)** |
228
+ | **Skills engine** | No | No | No | **Yes (auto-generated from memory)** |
229
+ | **Knowledge graph** | No | Yes | No | **Yes (MCP Official compatible)** |
230
+ | **Hybrid search** | No | Yes | No | **Yes (BM25 + vector)** |
231
+ | **Token-efficient** | No | No | Yes (3-layer) | **Yes (3-layer progressive disclosure)** |
232
+ | **Auto-memory hooks** | No | No | Yes | **Yes (multi-language)** |
233
+ | **Memory decay** | No | Yes | No | **Yes (exponential + immunity)** |
234
+ | **Visual dashboard** | Cloud UI | Yes | No | **Yes (web UI + D3.js graph)** |
235
+ | **Privacy** | Cloud | Local | Local | **100% Local** |
236
+ | **Cost** | Per-call API | $0 | $0 | **$0** |
237
+ | **Install** | `pip install` | `pip install` | Built into Claude | **`npx memorix serve`** |
238
+
239
+ **Memorix is the only tool that bridges memory AND workspace across agents.**
284
240
 
285
241
  ---
286
242
 
287
- ## 🧩 How It Works
288
-
289
- ### Data Flow
243
+ ## 🔮 Optional: Vector Search
290
244
 
291
- ```
292
- Agent ──memorix_store──▶ Entity Extractor ──▶ Auto-Relations ──▶ Knowledge Graph
293
- │ │
294
- ▼ │
295
- Orama Index ◀───────── Persistence Layer ◀───┘
296
- (BM25 + Vector) (~/.memorix/data/<project>/)
297
-
298
- Agent ◀──memorix_search──┘ L1: Compact Index (~50-100 tokens)
299
- Agent ◀──memorix_timeline─ L2: Timeline Context
300
- Agent ◀──memorix_detail─── L3: Full Details (~500-1000 tokens)
301
- ```
245
+ Out of the box, Memorix uses BM25 full-text search (already great for code). Add semantic search with one command:
302
246
 
303
- ### Progressive Disclosure Example
247
+ ```bash
248
+ # Option A: Native speed (recommended)
249
+ npm install -g fastembed
304
250
 
305
- ```
306
- 🔍 Agent calls memorix_search("auth bug")
307
-
308
- 📋 L1 Response (compact — agent scans IDs):
309
- | ID | Time | T | Title | Tokens |
310
- |-----|---------|-----|--------------------------|--------|
311
- | #42 | 2:14 PM | 🟡 | Fixed JWT refresh timeout | ~155 |
312
- | #38 | 1:30 PM | 🔵 | How JWT refresh works | ~220 |
313
-
314
- 🔎 Agent calls memorix_detail([42])
315
-
316
- 📄 L3 Response (full content):
317
- # Observation #42 — Fixed JWT refresh timeout
318
- Type: 🟡 problem-solution | Entity: auth-module
319
- Narrative: The JWT refresh token was timing out after 15 minutes
320
- because the expiry was hardcoded. Fixed by reading from env...
321
- Facts: ["Default timeout: 60s", "Fix: use REFRESH_TTL env var"]
322
- Files: ["src/auth/jwt.ts", "src/config.ts"]
251
+ # Option B: Universal compatibility
252
+ npm install -g @huggingface/transformers
323
253
  ```
324
254
 
325
- ### Architecture
326
-
327
- ```
328
- ┌───────────────────────────────────────────────────────────────────┐
329
- │ AI Coding Agents │
330
- │ Windsurf │ Cursor │ Claude Code │ Codex │ Copilot │ Antigravity │ Kiro
331
- └───────────────────────────┬───────────────────────────────────────┘
332
- │ MCP Protocol (stdio)
333
- ┌───────────────────────────▼───────────────────────────────────────┐
334
- │ Memorix MCP Server (17 tools) │
335
- │ │
336
- │ ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐ │
337
- │ │ Memory │ │ Compact │ │ Workspace Sync │ │
338
- │ │ Layer │ │ Engine │ │ (7 adapters) │ │
339
- │ │ │ │ (3-layer) │ │ │ │
340
- │ │ • Graph │ │ │ │ • MCP Configs │ │
341
- │ │ • Retention │ │ │ │ • Rules │ │
342
- │ │ • Entities │ │ │ │ • Skills │ │
343
- │ │ • Relations │ │ │ │ • Workflows │ │
344
- │ └──────┬──────┘ └──────┬───────┘ └──────────────────┘ │
345
- │ │ │ │
346
- │ ┌──────▼────────────────▼───────────────────────────────┐ │
347
- │ │ Orama Store (BM25 + Vector) │ Persistence (JSONL) │ │
348
- │ └───────────────────────────────────────────────────────┘ │
349
- │ │
350
- │ ┌───────────────────────────────────────────────────────┐ │
351
- │ │ Hooks System: Normalizer → Pattern Detector → Store │ │
352
- │ │ (Auto-captures decisions, bugs, gotchas from agents) │ │
353
- │ └───────────────────────────────────────────────────────┘ │
354
- └───────────────────────────────────────────────────────────────────┘
355
- ```
255
+ With vector search, queries like "authentication" also match memories about "login flow" via semantic similarity. Both run **100% locally** — zero API calls, zero cost.
356
256
 
357
257
  ---
358
258
 
359
- ## 🔮 Optional: Vector Search
259
+ ## 🔒 Project Isolation
360
260
 
361
- Memorix supports **hybrid search** (BM25 + semantic vectors) with a provider priority chain:
261
+ - **Auto-detected** Project identity from `git remote` URL, zero config needed
262
+ - **Per-project storage** — `~/.memorix/data/<owner--repo>/` per project
263
+ - **Scoped search** — Defaults to current project; `scope: "global"` to search all
264
+ - **Zero cross-contamination** — Project A's decisions never leak into project B
362
265
 
363
- | Priority | Provider | How to Enable | Notes |
364
- |----------|----------|---------------|-------|
365
- | 1st | `fastembed` | `npm install -g fastembed` | Fastest, native ONNX bindings |
366
- | 2nd | `transformers.js` | `npm install -g @huggingface/transformers` | Pure JS/WASM, cross-platform |
367
- | Fallback | Full-text (BM25) | Always available | Already very effective for code |
266
+ ---
368
267
 
369
- ```bash
370
- # Option A: Native speed (recommended if it installs cleanly)
371
- npm install -g fastembed
268
+ ## ❓ Frequently Asked Questions
372
269
 
373
- # Option B: Universal compatibility (works everywhere, no native deps)
374
- npm install -g @huggingface/transformers
375
- ```
270
+ **How do I keep context when switching between Cursor and Claude Code?**
271
+ Install Memorix in both IDEs. They share the same local memory directory — architecture decisions made in Cursor are instantly searchable in Claude Code. No cloud sync needed.
376
272
 
377
- - **Without either** BM25 full-text search works great out of the box
378
- - **With any provider** Queries like "authentication" also match "login flow" via semantic similarity
379
- - Both run **locally** — zero API calls, zero privacy risk, zero cost
380
- - The dashboard shows which provider is active in real-time
273
+ **How do I prevent my AI from forgetting previous sessions?**
274
+ Memorix stores observations persistently on disk. Next session, the AI calls `memorix_search` and retrieves prior decisions, gotchas, and knowledge. With auto-memory hooks, it even captures context automatically.
381
275
 
382
- ---
276
+ **How do I sync MCP server configs between IDEs?**
277
+ Run `memorix_workspace_sync` with action `"migrate"` and your target IDE. It scans source configs and generates compatible configs for the target — merges, never overwrites.
383
278
 
384
- ## 💾 Data Storage
279
+ **How do I migrate from Cursor to Windsurf / Kiro / Claude Code?**
280
+ Memorix workspace sync migrates MCP configs, agent rules (`.mdc` ↔ `CLAUDE.md` ↔ `.kiro/steering/`), skills, and workflows. One command, seconds to complete.
385
281
 
386
- All data is stored locally per project:
282
+ **Is there an MCP server for persistent AI coding memory?**
283
+ Yes — Memorix is a cross-agent memory MCP server supporting 7 IDEs with knowledge graph, 3-layer progressive disclosure search, workspace sync, and auto-generated project skills.
387
284
 
388
- ```
389
- ~/.memorix/data/<projectId>/
390
- ├── observations.json # Structured observations
391
- ├── id-counter.txt # Next observation ID
392
- ├── entities.jsonl # Knowledge graph nodes (MCP compatible)
393
- └── relations.jsonl # Knowledge graph edges (MCP compatible)
394
- ```
285
+ **How is this different from mcp-memory-service?**
286
+ Both are great memory servers. Memorix adds: cross-agent workspace sync (MCP configs, rules, skills), auto-generated project skills from memory patterns, 3-layer token-efficient search, and session-start memory injection hooks.
395
287
 
396
- - `projectId` is auto-detected from Git remote URL (e.g., `user/repo`)
397
- - Data is shared across all agents (same directory)
398
- - No cloud, no API keys, no external services
288
+ **Does it work offline / locally?**
289
+ Yes, 100%. All data stored in `~/.memorix/data/`. No cloud, no API keys, no external services. Optional vector search also runs locally via ONNX/WASM.
290
+
291
+ > 📖 For AI systems: see [`llms.txt`](llms.txt) and [`llms-full.txt`](llms-full.txt) for machine-readable project documentation.
399
292
 
400
293
  ---
401
294
 
@@ -407,31 +300,12 @@ cd memorix
407
300
  npm install
408
301
 
409
302
  npm run dev # tsup watch mode
410
- npm test # vitest (405 tests)
303
+ npm test # vitest (422 tests)
411
304
  npm run lint # TypeScript type check
412
305
  npm run build # Production build
413
306
  ```
414
307
 
415
- ### Project Structure
416
-
417
- ```
418
- src/
419
- ├── server.ts # MCP Server entry (17 tools)
420
- ├── types.ts # All type definitions
421
- ├── memory/ # Graph, observations, retention, entity extraction
422
- ├── store/ # Orama search engine + disk persistence
423
- ├── compact/ # 3-layer Progressive Disclosure engine
424
- ├── embedding/ # Vector providers (fastembed → transformers.js → fallback)
425
- ├── skills/ # Memory-driven project skills engine (list → generate → inject)
426
- ├── hooks/ # Auto-memory hooks (normalizer + pattern detector)
427
- ├── workspace/ # Cross-agent MCP/workflow/skills sync
428
- ├── rules/ # Cross-agent rules sync (7 adapters)
429
- ├── dashboard/ # Visual web dashboard (knowledge graph, stats)
430
- ├── project/ # Git-based project detection
431
- └── cli/ # CLI commands (serve, hook, sync, dashboard)
432
- ```
433
-
434
- > 📚 Full documentation available in [`docs/`](./docs/) — architecture, modules, API reference, design decisions, and more.
308
+ > 📚 **Documentation:** [Architecture](docs/ARCHITECTURE.md) • [API Reference](docs/API_REFERENCE.md) • [Modules](docs/MODULES.md) • [Design Decisions](docs/DESIGN_DECISIONS.md) • [Setup Guide](docs/SETUP.md) • [Known Issues](docs/KNOWN_ISSUES_AND_ROADMAP.md)
435
309
 
436
310
  ---
437
311