mnemo-dev 0.1.0__tar.gz → 0.3.0__tar.gz
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.
- mnemo_dev-0.3.0/PKG-INFO +702 -0
- mnemo_dev-0.3.0/README.md +656 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/__init__.py +1 -1
- mnemo_dev-0.3.0/mnemo/breaking/__init__.py +163 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/chunking.py +26 -4
- mnemo_dev-0.3.0/mnemo/cli.py +368 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/clients.py +16 -2
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/code_review/__init__.py +11 -5
- mnemo_dev-0.3.0/mnemo/commit_gen/__init__.py +163 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/config.py +21 -0
- mnemo_dev-0.3.0/mnemo/corrections/__init__.py +80 -0
- mnemo_dev-0.3.0/mnemo/dead_code/__init__.py +118 -0
- mnemo_dev-0.3.0/mnemo/drift/__init__.py +88 -0
- mnemo_dev-0.3.0/mnemo/embeddings/__init__.py +73 -0
- mnemo_dev-0.3.0/mnemo/enrichment.py +111 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/errors/__init__.py +2 -1
- mnemo_dev-0.3.0/mnemo/graph/__init__.py +46 -0
- mnemo_dev-0.3.0/mnemo/graph/builder.py +281 -0
- mnemo_dev-0.3.0/mnemo/graph/local.py +171 -0
- mnemo_dev-0.3.0/mnemo/graph/query.py +194 -0
- mnemo_dev-0.3.0/mnemo/graph/relationships.py +132 -0
- mnemo_dev-0.3.0/mnemo/graph/workspace.py +125 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/health/__init__.py +48 -23
- mnemo_dev-0.3.0/mnemo/hooks/__init__.py +63 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/incidents/__init__.py +11 -5
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/init.py +23 -14
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/intelligence/__init__.py +22 -18
- mnemo_dev-0.3.0/mnemo/mcp_server.py +145 -0
- mnemo_dev-0.3.0/mnemo/memory.py +634 -0
- mnemo_dev-0.3.0/mnemo/plan/__init__.py +374 -0
- mnemo_dev-0.3.0/mnemo/pr_gen/__init__.py +139 -0
- mnemo_dev-0.3.0/mnemo/regressions/__init__.py +83 -0
- mnemo_dev-0.3.0/mnemo/repo_map.py +759 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/retrieval.py +6 -3
- mnemo_dev-0.3.0/mnemo/security/__init__.py +180 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/storage.py +22 -1
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/team_graph/__init__.py +5 -3
- mnemo_dev-0.3.0/mnemo/tool_registry.py +601 -0
- mnemo_dev-0.3.0/mnemo/ui/__init__.py +259 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/vector_index/__init__.py +24 -8
- mnemo_dev-0.3.0/mnemo/velocity/__init__.py +104 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/workspace/__init__.py +5 -3
- mnemo_dev-0.3.0/mnemo_dev.egg-info/PKG-INFO +702 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo_dev.egg-info/SOURCES.txt +20 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo_dev.egg-info/requires.txt +12 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/pyproject.toml +13 -1
- mnemo_dev-0.1.0/PKG-INFO +0 -644
- mnemo_dev-0.1.0/README.md +0 -609
- mnemo_dev-0.1.0/mnemo/cli.py +0 -186
- mnemo_dev-0.1.0/mnemo/embeddings/__init__.py +0 -47
- mnemo_dev-0.1.0/mnemo/mcp_server.py +0 -458
- mnemo_dev-0.1.0/mnemo/memory.py +0 -250
- mnemo_dev-0.1.0/mnemo/repo_map.py +0 -357
- mnemo_dev-0.1.0/mnemo_dev.egg-info/PKG-INFO +0 -644
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/analyzers/__init__.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/api_discovery/__init__.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/dependency_graph/__init__.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/doctor.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/knowledge/__init__.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/onboarding/__init__.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/sprint/__init__.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo/test_intel/__init__.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo_dev.egg-info/dependency_links.txt +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo_dev.egg-info/entry_points.txt +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/mnemo_dev.egg-info/top_level.txt +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/setup.cfg +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_chunking_semantic.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_clients.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_doctor.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_init.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_intelligence_advanced.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_mcp_semantic_tools.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_memory.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_repo_map_storage.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_secondary_collections.py +0 -0
- {mnemo_dev-0.1.0 → mnemo_dev-0.3.0}/tests/test_storage.py +0 -0
mnemo_dev-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mnemo-dev
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Persistent memory and repo map for AI coding assistants
|
|
5
|
+
Author: Mnemo Contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mnemo-ai/mnemo
|
|
8
|
+
Project-URL: Repository, https://github.com/mnemo-ai/mnemo
|
|
9
|
+
Project-URL: Issues, https://github.com/mnemo-ai/mnemo/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: click>=8.1
|
|
20
|
+
Requires-Dist: tree-sitter>=0.21
|
|
21
|
+
Requires-Dist: tree-sitter-python>=0.21
|
|
22
|
+
Requires-Dist: tree-sitter-javascript>=0.21
|
|
23
|
+
Requires-Dist: tree-sitter-typescript>=0.21
|
|
24
|
+
Requires-Dist: tree-sitter-c-sharp>=0.21
|
|
25
|
+
Requires-Dist: tree-sitter-go>=0.21
|
|
26
|
+
Requires-Dist: tree-sitter-java>=0.21
|
|
27
|
+
Requires-Dist: tree-sitter-rust>=0.21
|
|
28
|
+
Requires-Dist: gitpython>=3.1
|
|
29
|
+
Requires-Dist: networkx>=3.0
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
33
|
+
Requires-Dist: ruff>=0.5; extra == "dev"
|
|
34
|
+
Provides-Extra: semantic
|
|
35
|
+
Requires-Dist: chromadb>=0.5; extra == "semantic"
|
|
36
|
+
Provides-Extra: binary
|
|
37
|
+
Requires-Dist: pyinstaller>=6.0; extra == "binary"
|
|
38
|
+
Provides-Extra: all-languages
|
|
39
|
+
Requires-Dist: tree-sitter-ruby>=0.21; extra == "all-languages"
|
|
40
|
+
Requires-Dist: tree-sitter-php>=0.22; extra == "all-languages"
|
|
41
|
+
Requires-Dist: tree-sitter-c>=0.21; extra == "all-languages"
|
|
42
|
+
Requires-Dist: tree-sitter-cpp>=0.21; extra == "all-languages"
|
|
43
|
+
Requires-Dist: tree-sitter-kotlin>=0.21; extra == "all-languages"
|
|
44
|
+
Requires-Dist: tree-sitter-swift>=0.21; extra == "all-languages"
|
|
45
|
+
Requires-Dist: tree-sitter-scala>=0.21; extra == "all-languages"
|
|
46
|
+
|
|
47
|
+
# Mnemo
|
|
48
|
+
|
|
49
|
+
Persistent memory, knowledge graph, and code intelligence for AI coding assistants. One command gives Amazon Q, Cursor, Claude Code, and other MCP clients project context across chat sessions — no re-reading files, no lost context.
|
|
50
|
+
|
|
51
|
+
## Mnemo in Simple Words
|
|
52
|
+
|
|
53
|
+
Mnemo is your AI agent's project brain.
|
|
54
|
+
|
|
55
|
+
- It remembers important decisions and past fixes.
|
|
56
|
+
- It builds a knowledge graph of your codebase (classes, services, relationships).
|
|
57
|
+
- It helps the agent answer questions about architecture, APIs, tests, and patterns.
|
|
58
|
+
- It works across chats, so you do not repeat project context every time.
|
|
59
|
+
- It searches across multiple repos so the agent knows your full platform.
|
|
60
|
+
- It tracks plans and auto-updates progress as work happens.
|
|
61
|
+
- It proactively surfaces warnings, decisions, and next steps in every response.
|
|
62
|
+
|
|
63
|
+
## Mnemo in Technical Terms
|
|
64
|
+
|
|
65
|
+
Mnemo is a local-first MCP server (`mnemo-mcp`) plus repo-side data/indexing.
|
|
66
|
+
|
|
67
|
+
- It exposes 48 MCP tools for memory, knowledge graph, retrieval, architecture analysis, API discovery, plan tracking, task context, incidents, reviews, and diagnostics.
|
|
68
|
+
- It builds a knowledge graph (NetworkX) with structural relationships (implements, inherits, calls, depends_on, owns).
|
|
69
|
+
- It supports semantic retrieval (ChromaDB auto-installed on first use) with keyword fallback.
|
|
70
|
+
- It supports multi-repo workspaces with cross-repo graph queries and impact analysis.
|
|
71
|
+
- It enriches every tool response with proactive context (plan status, regression warnings, related decisions).
|
|
72
|
+
- It auto-detects plans from memories/decisions and auto-marks tasks done.
|
|
73
|
+
|
|
74
|
+
## What it does
|
|
75
|
+
|
|
76
|
+
- **Knowledge Graph** — Builds a graph of services, classes, interfaces, methods, packages, and people with structural relationships (886 nodes, 1459 edges on a typical microservices repo)
|
|
77
|
+
- **Persistent Memory** — Stores decisions, patterns, preferences, and chat summaries across sessions with tiered retrieval (never loses context, never overloads it)
|
|
78
|
+
- **Plan Mode** — Auto-creates trackable plans from memories/decisions, auto-marks tasks done, syncs to TASKS.md
|
|
79
|
+
- **Response Enrichment** — Every tool response includes proactive hints (next plan task, regression warnings, related decisions)
|
|
80
|
+
- **Repo Map** — Compact tree showing all services equally, with key classes per module
|
|
81
|
+
- **Code Intelligence** — Detects architecture, dependencies, patterns, ownership, and similar implementations
|
|
82
|
+
- **Semantic Search** — Finds code by meaning, not just filename (powered by ChromaDB)
|
|
83
|
+
- **Multi-Repo Workspace** — Federated graph queries across linked repos, cross-repo impact analysis
|
|
84
|
+
- **Knowledge Base** — Searchable team knowledge from markdown files (runbooks, standards, gotchas)
|
|
85
|
+
- **API Discovery** — Parses OpenAPI/Swagger specs and controller annotations to build a complete API catalog
|
|
86
|
+
- **Auto-Remember** — Automatically saves meaningful findings to memory for future chats
|
|
87
|
+
- **Auto-refresh** — Detects file changes (via mtime), renames (via git), and deletions
|
|
88
|
+
- **Zero friction** — One `mnemo init` and it works forever
|
|
89
|
+
- **Dashboard UI** — Visual web dashboard showing knowledge graph, memory, repos, health, and more (`mnemo ui`)
|
|
90
|
+
|
|
91
|
+
## How Smooth Is It?
|
|
92
|
+
|
|
93
|
+
For day-to-day work, it is designed to feel close to "install once, forget forever":
|
|
94
|
+
|
|
95
|
+
1. Run `mnemo init` once in a repo.
|
|
96
|
+
2. Restart your AI client.
|
|
97
|
+
3. Ask normal questions in plain language.
|
|
98
|
+
4. Mnemo tools are called automatically when needed.
|
|
99
|
+
|
|
100
|
+
In practice, the experience is smooth when:
|
|
101
|
+
- Python and `mnemo-mcp` are on PATH.
|
|
102
|
+
- Your client MCP config is present.
|
|
103
|
+
- You run `mnemo map` after large refactors (or let normal recall refresh run).
|
|
104
|
+
|
|
105
|
+
If anything is off, `mnemo doctor --client all` gives actionable diagnostics.
|
|
106
|
+
|
|
107
|
+
## Installation
|
|
108
|
+
|
|
109
|
+
### Option A: VS Code Extension (easiest)
|
|
110
|
+
|
|
111
|
+
1. Install the **Mnemo** extension from the VS Code Marketplace
|
|
112
|
+
2. Open a project → extension prompts "Initialize Mnemo?"
|
|
113
|
+
3. Click Yes → done
|
|
114
|
+
|
|
115
|
+
The extension auto-downloads the binary, initializes the repo, and configures MCP. No Python needed.
|
|
116
|
+
|
|
117
|
+
### Option B: Homebrew (macOS/Linux)
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
brew tap Mnemo-mcp/tap
|
|
121
|
+
brew install mnemo
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Then in your repo:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
cd your-project
|
|
128
|
+
mnemo init
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Option C: pip (all platforms)
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pip install mnemo
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Or from source:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git clone https://github.com/Mnemo-mcp/Mnemo.git
|
|
141
|
+
cd Mnemo
|
|
142
|
+
pip install -e .
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Then in your repo:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
cd your-project
|
|
149
|
+
mnemo init
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
> **Note (macOS):** If you get a warning about scripts not being on PATH:
|
|
153
|
+
> ```bash
|
|
154
|
+
> echo 'export PATH="$HOME/Library/Python/3.12/bin:$PATH"' >> ~/.zshrc
|
|
155
|
+
> source ~/.zshrc
|
|
156
|
+
> ```
|
|
157
|
+
|
|
158
|
+
> **Note (Linux):** If installed with `--user`:
|
|
159
|
+
> ```bash
|
|
160
|
+
> echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
161
|
+
> source ~/.bashrc
|
|
162
|
+
> ```
|
|
163
|
+
|
|
164
|
+
> **Note (Windows):** If `mnemo` is not found after install, add your Python Scripts directory to PATH.
|
|
165
|
+
|
|
166
|
+
### Option D: Standalone binary (no Python needed)
|
|
167
|
+
|
|
168
|
+
Download from [GitHub Releases](https://github.com/Mnemo-mcp/Mnemo/releases):
|
|
169
|
+
|
|
170
|
+
| Platform | Download |
|
|
171
|
+
|----------|----------|
|
|
172
|
+
| macOS (Apple Silicon) | `mnemo-macos-arm64` |
|
|
173
|
+
| macOS (Intel) | `mnemo-macos-x64` |
|
|
174
|
+
| Linux | `mnemo-linux-x64` |
|
|
175
|
+
| Windows | `mnemo-windows-x64.exe` |
|
|
176
|
+
|
|
177
|
+
Or use the install script:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# macOS/Linux
|
|
181
|
+
curl -fsSL https://raw.githubusercontent.com/Mnemo-mcp/Mnemo/main/scripts/install.sh | sh
|
|
182
|
+
|
|
183
|
+
# Windows (PowerShell)
|
|
184
|
+
irm https://raw.githubusercontent.com/Mnemo-mcp/Mnemo/main/scripts/install.ps1 | iex
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Then:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
cd your-project
|
|
191
|
+
mnemo init
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Initialize your repo
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
cd your-project
|
|
198
|
+
mnemo init
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
By default this configures Amazon Q. Target another client or all:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
mnemo init --client cursor
|
|
205
|
+
mnemo init --client claude-code
|
|
206
|
+
mnemo init --client all
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Supported: `amazonq`, `cursor`, `claude-code`, `kiro`, `copilot`, `generic`, `all`.
|
|
210
|
+
|
|
211
|
+
This command:
|
|
212
|
+
1. Creates `.mnemo/` folder (added to `.gitignore` automatically)
|
|
213
|
+
2. Generates a compact repo map + knowledge graph
|
|
214
|
+
3. Indexes code into semantic search (ChromaDB auto-installs on first use)
|
|
215
|
+
4. Detects code patterns and conventions
|
|
216
|
+
5. Creates a knowledge base directory
|
|
217
|
+
6. Installs the right client context file
|
|
218
|
+
7. Configures the MCP server in the selected client's MCP config
|
|
219
|
+
|
|
220
|
+
### Restart your IDE
|
|
221
|
+
|
|
222
|
+
Restart your IDE or reload your AI client extension to pick up the new MCP server.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
mnemo doctor --client all # if setup doesn't look right
|
|
226
|
+
mnemo status # quick check
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Knowledge Graph
|
|
232
|
+
|
|
233
|
+
Mnemo builds a knowledge graph of your codebase during `mnemo init` / `mnemo map`.
|
|
234
|
+
|
|
235
|
+
### What it captures
|
|
236
|
+
|
|
237
|
+
| Node Type | Examples |
|
|
238
|
+
|-----------|----------|
|
|
239
|
+
| service | isAuthRequiredService, providerSearchService |
|
|
240
|
+
| class | AetnaHandler, CosmosDbService |
|
|
241
|
+
| interface | IPayerHandler, ICacheService |
|
|
242
|
+
| method | AetnaHandler.BuildResponse |
|
|
243
|
+
| file | Services/PayerHandlers/AetnaHandler.cs |
|
|
244
|
+
| package | Azure.Cosmos, Moq |
|
|
245
|
+
| person | Nikhil, Ayushy (from git) |
|
|
246
|
+
| decision | "Use Redis for caching" |
|
|
247
|
+
| memory | Stored context from chats |
|
|
248
|
+
| incident | Production issues |
|
|
249
|
+
|
|
250
|
+
### Relationships (edges)
|
|
251
|
+
|
|
252
|
+
| Edge | Meaning |
|
|
253
|
+
|------|---------|
|
|
254
|
+
| contains | service → file |
|
|
255
|
+
| defines | file → class/interface |
|
|
256
|
+
| implements | class → interface |
|
|
257
|
+
| inherits | class → base class |
|
|
258
|
+
| calls | file → class (usage) |
|
|
259
|
+
| has_method | class → method |
|
|
260
|
+
| depends_on | service → package |
|
|
261
|
+
| owns | person → service |
|
|
262
|
+
| references | decision/memory → code entity |
|
|
263
|
+
| affects | incident → service |
|
|
264
|
+
|
|
265
|
+
### Query examples
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
"What implements IPayerHandler?" → graph traverse
|
|
269
|
+
"What depends on CosmosDbService?" → graph neighbors incoming
|
|
270
|
+
"Path from AetnaHandler to CosmosDB" → graph path
|
|
271
|
+
"Most connected code in the repo" → graph hubs
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Architecture: Local → Workspace → Enterprise
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
┌─────────────────────────────────────────────────┐
|
|
278
|
+
│ Tier 3: Organization (future — mnemo serve) │
|
|
279
|
+
│ ┌───────────────────────────────────────────┐ │
|
|
280
|
+
│ │ Tier 2: Workspace (federated) │ │
|
|
281
|
+
│ │ ┌─────────────────────────────────────┐ │ │
|
|
282
|
+
│ │ │ Tier 1: Local (per repo) │ │ │
|
|
283
|
+
│ │ │ NetworkX graph → .mnemo/graph.json │ │ │
|
|
284
|
+
│ │ └─────────────────────────────────────┘ │ │
|
|
285
|
+
│ │ Queries fan out to all linked repos │ │
|
|
286
|
+
│ └───────────────────────────────────────────┘ │
|
|
287
|
+
│ Same GraphStore protocol — just wraps lower │
|
|
288
|
+
└─────────────────────────────────────────────────┘
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Plan Mode
|
|
294
|
+
|
|
295
|
+
Mnemo automatically tracks plans and progress.
|
|
296
|
+
|
|
297
|
+
### How it works
|
|
298
|
+
|
|
299
|
+
You don't need to explicitly create plans. When you tell the AI about work to do:
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
User: "We need to migrate Service Review and Eligibility to SOAP APIs.
|
|
303
|
+
Steps: convert controllers, add WSDL, update models, update tests"
|
|
304
|
+
|
|
305
|
+
AI calls mnemo_remember or mnemo_decide with this content
|
|
306
|
+
|
|
307
|
+
Mnemo auto-detects it's a plan → creates tracked tasks:
|
|
308
|
+
📋 Auto-created plan:
|
|
309
|
+
- [ ] MNO-001 Convert controllers to SOAP endpoints
|
|
310
|
+
- [ ] MNO-002 Add WSDL definitions for each service
|
|
311
|
+
- [ ] MNO-003 Update models with XML serialization
|
|
312
|
+
- [ ] MNO-004 Update tests with XML payloads
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Auto-completion
|
|
316
|
+
|
|
317
|
+
When the AI later remembers completing work that matches a task:
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
AI calls mnemo_remember "Implemented WSDL definitions for eligibility and service review"
|
|
321
|
+
|
|
322
|
+
Mnemo auto-detects match → marks MNO-002 done
|
|
323
|
+
Response includes: "✅ Auto-completed MNO-002: Add WSDL definitions"
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Proactive hints
|
|
327
|
+
|
|
328
|
+
Every tool response includes the next task:
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
📋 Plan 'SOAP Migration' (2/4) — next: MNO-003 Update models with XML serialization
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Plans sync to `TASKS.md` automatically.
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Response Enrichment
|
|
339
|
+
|
|
340
|
+
Every tool response is enriched with proactive context. The AI doesn't need to call extra tools — Mnemo injects relevant information automatically.
|
|
341
|
+
|
|
342
|
+
| When you call... | Mnemo also shows... |
|
|
343
|
+
|---|---|
|
|
344
|
+
| `mnemo_lookup "PayerHandler"` | ⚠️ Regression risk + 📌 Related decision + 📋 Next plan task |
|
|
345
|
+
| `mnemo_remember "fixed the bug"` | ✅ Auto-completed matching plan task |
|
|
346
|
+
| `mnemo_similar "Handler"` | 📋 Next plan task |
|
|
347
|
+
| `mnemo_health` | 📋 Next plan task |
|
|
348
|
+
|
|
349
|
+
This means the AI always has context about what's important right now, without needing to remember to check.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Multi-Repo Workspace
|
|
354
|
+
|
|
355
|
+
Mnemo searches across multiple repositories with federated graph queries.
|
|
356
|
+
|
|
357
|
+
### Link repos
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
mnemo link ../auth-service
|
|
361
|
+
mnemo link --discover ~/CodeRepo
|
|
362
|
+
mnemo link --discover ~/CodeRepo --init
|
|
363
|
+
mnemo unlink auth-service
|
|
364
|
+
mnemo links
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### What it enables
|
|
368
|
+
|
|
369
|
+
| What you ask | What happens |
|
|
370
|
+
|---|---|
|
|
371
|
+
| "Find authentication code across all services" | Cross-repo graph + semantic search |
|
|
372
|
+
| "What breaks if I change the token format?" | Federated graph traversal |
|
|
373
|
+
| "What APIs does the auth service expose?" | Searches linked repo's API index |
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Semantic Search
|
|
378
|
+
|
|
379
|
+
ChromaDB-powered search by meaning, not just filename.
|
|
380
|
+
|
|
381
|
+
| Query | Finds |
|
|
382
|
+
|---|---|
|
|
383
|
+
| "token refresh" | `getToken()`, `acquireTokenSilent()`, `ClientCredentialTokenService` |
|
|
384
|
+
| "error handling" | retry pipelines, DelegatingHandlers, catch blocks |
|
|
385
|
+
| "database access" | CosmosDbService, repositories, connection code |
|
|
386
|
+
|
|
387
|
+
Falls back to keyword matching if ChromaDB is unavailable.
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## MCP Tools (48 total)
|
|
392
|
+
|
|
393
|
+
### Memory & Context
|
|
394
|
+
|
|
395
|
+
| Tool | Description |
|
|
396
|
+
|------|-------------|
|
|
397
|
+
| `mnemo_recall` | Load decisions, preferences, active task, graph summary, and recent memories |
|
|
398
|
+
| `mnemo_remember` | Save information (auto-categorized, auto-creates plans if plan-like) |
|
|
399
|
+
| `mnemo_search_memory` | Search all memories semantically |
|
|
400
|
+
| `mnemo_decide` | Record a decision (auto-creates plan if reasoning has steps) |
|
|
401
|
+
| `mnemo_context` | Save/update project metadata |
|
|
402
|
+
| `mnemo_forget` | Delete a memory by ID |
|
|
403
|
+
|
|
404
|
+
### Knowledge Graph
|
|
405
|
+
|
|
406
|
+
| Tool | Description |
|
|
407
|
+
|------|-------------|
|
|
408
|
+
| `mnemo_graph` | Query the knowledge graph (stats, neighbors, traverse, path, find, hubs) |
|
|
409
|
+
|
|
410
|
+
### Plan Mode
|
|
411
|
+
|
|
412
|
+
| Tool | Description |
|
|
413
|
+
|------|-------------|
|
|
414
|
+
| `mnemo_plan` | Create/track/update plans (create, done, add, remove, status) |
|
|
415
|
+
|
|
416
|
+
### Code Understanding
|
|
417
|
+
|
|
418
|
+
| Tool | Description |
|
|
419
|
+
|------|-------------|
|
|
420
|
+
| `mnemo_lookup` | Get method-level details for a file or folder |
|
|
421
|
+
| `mnemo_map` | Regenerate repo map + knowledge graph |
|
|
422
|
+
| `mnemo_intelligence` | Full code intelligence report |
|
|
423
|
+
| `mnemo_similar` | Find similar implementations |
|
|
424
|
+
| `mnemo_context_for_task` | Retrieve context scoped to active task |
|
|
425
|
+
|
|
426
|
+
### Multi-Repo
|
|
427
|
+
|
|
428
|
+
| Tool | Description |
|
|
429
|
+
|------|-------------|
|
|
430
|
+
| `mnemo_links` | Show linked repos |
|
|
431
|
+
| `mnemo_cross_search` | Search across all linked repos |
|
|
432
|
+
| `mnemo_cross_impact` | Cross-repo impact analysis |
|
|
433
|
+
|
|
434
|
+
### Safety & Quality
|
|
435
|
+
|
|
436
|
+
| Tool | Description |
|
|
437
|
+
|------|-------------|
|
|
438
|
+
| `mnemo_check_security` | Scan for security issues |
|
|
439
|
+
| `mnemo_add_security_pattern` | Add custom security pattern |
|
|
440
|
+
| `mnemo_breaking_changes` | Detect breaking changes against baseline |
|
|
441
|
+
| `mnemo_add_regression` | Record regression risk for a file |
|
|
442
|
+
| `mnemo_check_regressions` | Check file regression risks |
|
|
443
|
+
| `mnemo_drift` | Detect architecture drift |
|
|
444
|
+
| `mnemo_dead_code` | Detect unused code (in-memory scan, <0.3s) |
|
|
445
|
+
| `mnemo_health` | Code health report |
|
|
446
|
+
|
|
447
|
+
### Git & Workflow
|
|
448
|
+
|
|
449
|
+
| Tool | Description |
|
|
450
|
+
|------|-------------|
|
|
451
|
+
| `mnemo_commit_message` | Generate commit message from staged changes |
|
|
452
|
+
| `mnemo_pr_description` | Generate PR description |
|
|
453
|
+
| `mnemo_hooks_install` | Install pre-commit hooks |
|
|
454
|
+
| `mnemo_check` | Run pre-commit validations |
|
|
455
|
+
| `mnemo_add_correction` | Store AI correction for learning |
|
|
456
|
+
| `mnemo_corrections` | Show stored corrections |
|
|
457
|
+
| `mnemo_velocity` | Development velocity metrics |
|
|
458
|
+
|
|
459
|
+
### Knowledge & APIs
|
|
460
|
+
|
|
461
|
+
| Tool | Description |
|
|
462
|
+
|------|-------------|
|
|
463
|
+
| `mnemo_knowledge` | Search team knowledge base |
|
|
464
|
+
| `mnemo_discover_apis` | Discover all API endpoints |
|
|
465
|
+
| `mnemo_search_api` | Search for specific endpoint |
|
|
466
|
+
|
|
467
|
+
### Team & Operations
|
|
468
|
+
|
|
469
|
+
| Tool | Description |
|
|
470
|
+
|------|-------------|
|
|
471
|
+
| `mnemo_team` | Team expertise map |
|
|
472
|
+
| `mnemo_who_touched` | Who last modified a file |
|
|
473
|
+
| `mnemo_add_error` | Store error → cause → fix |
|
|
474
|
+
| `mnemo_search_errors` | Search known errors |
|
|
475
|
+
| `mnemo_add_incident` | Record production incident |
|
|
476
|
+
| `mnemo_incidents` | Search/list incidents |
|
|
477
|
+
| `mnemo_add_review` | Store code review |
|
|
478
|
+
| `mnemo_reviews` | Show review history |
|
|
479
|
+
| `mnemo_dependencies` | Service dependency graph |
|
|
480
|
+
| `mnemo_impact` | Impact analysis |
|
|
481
|
+
| `mnemo_onboarding` | Generate onboarding guide |
|
|
482
|
+
| `mnemo_task` | Set/get current task |
|
|
483
|
+
| `mnemo_task_done` | Mark task complete |
|
|
484
|
+
| `mnemo_tests` | Test coverage info |
|
|
485
|
+
|
|
486
|
+
---
|
|
487
|
+
|
|
488
|
+
## How to Use in Chat
|
|
489
|
+
|
|
490
|
+
Just ask naturally:
|
|
491
|
+
|
|
492
|
+
| What you want | What to ask |
|
|
493
|
+
|---------------|-------------|
|
|
494
|
+
| Project overview | "What do you know about this project?" |
|
|
495
|
+
| Code relationships | "What implements IPayerHandler?" |
|
|
496
|
+
| Impact analysis | "What breaks if I change CosmosDbService?" |
|
|
497
|
+
| Plan work | "We need to migrate to SOAP — here are the steps..." |
|
|
498
|
+
| Plan status | "What's the plan status?" |
|
|
499
|
+
| Code details | "Show me the AuthorizationService methods" |
|
|
500
|
+
| Follow patterns | "I need to add a new payer handler" |
|
|
501
|
+
| Architecture | "What's the architecture?" |
|
|
502
|
+
| Dead code | "Find unused code" |
|
|
503
|
+
| Security | "Run a security scan" |
|
|
504
|
+
| Cross-repo | "Find auth code across all services" |
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## CLI Commands
|
|
509
|
+
|
|
510
|
+
| Command | Description |
|
|
511
|
+
|---------|-------------|
|
|
512
|
+
| `mnemo init` | Initialize Mnemo in current directory |
|
|
513
|
+
| `mnemo init --client all` | Initialize for all AI clients |
|
|
514
|
+
| `mnemo ui` | Open the Mnemo dashboard in your browser |
|
|
515
|
+
| `mnemo doctor` | Diagnose setup |
|
|
516
|
+
| `mnemo status` | Quick health check |
|
|
517
|
+
| `mnemo recall` | Show stored memory |
|
|
518
|
+
| `mnemo map` | Refresh repo map + knowledge graph |
|
|
519
|
+
| `mnemo remember "text"` | Store a note |
|
|
520
|
+
| `mnemo update` | Update to latest version |
|
|
521
|
+
| `mnemo reset` | Wipe all Mnemo data |
|
|
522
|
+
| `mnemo link <path>` | Link a sibling repo |
|
|
523
|
+
| `mnemo link --discover <dir>` | Auto-discover and link repos |
|
|
524
|
+
| `mnemo unlink <name>` | Remove a linked repo |
|
|
525
|
+
| `mnemo links` | Show linked repos |
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Architecture
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
┌─────────────────────────────────────────────────────┐
|
|
533
|
+
│ MCP Tools (48 tools via tool_registry.py) │
|
|
534
|
+
├─────────────────────────────────────────────────────┤
|
|
535
|
+
│ Response Enrichment (enrichment.py) │
|
|
536
|
+
│ → plan hints, regression warnings, decision refs │
|
|
537
|
+
├─────────────────────────────────────────────────────┤
|
|
538
|
+
│ Knowledge Graph (graph/) │
|
|
539
|
+
│ → LocalGraph (NetworkX) + WorkspaceGraph │
|
|
540
|
+
├─────────────────────────────────────────────────────┤
|
|
541
|
+
│ Plan Mode (plan/) │
|
|
542
|
+
│ → auto-create, auto-complete, TASKS.md sync │
|
|
543
|
+
├─────────────────────────────────────────────────────┤
|
|
544
|
+
│ Semantic Search (vector_index/ + ChromaDB) │
|
|
545
|
+
├─────────────────────────────────────────────────────┤
|
|
546
|
+
│ Code Parsing (repo_map.py + analyzers/) │
|
|
547
|
+
│ → tree-sitter (14 languages) + Roslyn │
|
|
548
|
+
├─────────────────────────────────────────────────────┤
|
|
549
|
+
│ Storage (storage.py → .mnemo/*.json) │
|
|
550
|
+
└─────────────────────────────────────────────────────┘
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
**Storage layout:**
|
|
554
|
+
```
|
|
555
|
+
.mnemo/
|
|
556
|
+
├── summary.md ← detailed code map (for lookup)
|
|
557
|
+
├── tree.md ← compact tree (for recall)
|
|
558
|
+
├── graph.json ← knowledge graph (NetworkX)
|
|
559
|
+
├── graph_meta.json ← graph stats
|
|
560
|
+
├── hashes.json ← change detection
|
|
561
|
+
├── memory.json ← memories
|
|
562
|
+
├── decisions.json ← decisions
|
|
563
|
+
├── context.json ← project metadata
|
|
564
|
+
├── plans.json ← tracked plans
|
|
565
|
+
├── links.json ← linked repos
|
|
566
|
+
├── index/chroma/ ← semantic search index
|
|
567
|
+
└── knowledge/ ← team docs
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
## Tech Stack
|
|
573
|
+
|
|
574
|
+
| Component | Technology |
|
|
575
|
+
|-----------|------------|
|
|
576
|
+
| Core | Python 3.10+ |
|
|
577
|
+
| MCP Server | JSON-RPC over stdin/stdout |
|
|
578
|
+
| Knowledge Graph | NetworkX (serialized to JSON) |
|
|
579
|
+
| Code Parsing | tree-sitter (14 languages) + Roslyn (.NET 8 for C#) |
|
|
580
|
+
| Semantic Search | ChromaDB + all-MiniLM-L6-v2 (ONNX) |
|
|
581
|
+
| Keyword Fallback | Custom sparse embedding (IDF-weighted token overlap) |
|
|
582
|
+
| Storage | JSON files in `.mnemo/` |
|
|
583
|
+
| Change Detection | mtime-based + git rename tracking |
|
|
584
|
+
| Team Graph | GitPython (git log analysis) |
|
|
585
|
+
| CLI | Click |
|
|
586
|
+
| Binary Distribution | PyInstaller |
|
|
587
|
+
| VS Code Extension | TypeScript |
|
|
588
|
+
| CI/CD | GitHub Actions |
|
|
589
|
+
|
|
590
|
+
### Dependencies
|
|
591
|
+
|
|
592
|
+
**Required:**
|
|
593
|
+
- `click` — CLI framework
|
|
594
|
+
- `tree-sitter` + language grammars (Python, JS, TS, Go, C#, Java, Rust)
|
|
595
|
+
- `gitpython` — git history analysis
|
|
596
|
+
- `networkx` — knowledge graph
|
|
597
|
+
|
|
598
|
+
**Auto-installed on first use:**
|
|
599
|
+
- `chromadb` — vector database for semantic search
|
|
600
|
+
|
|
601
|
+
**Optional (`pip install mnemo[all-languages]`):**
|
|
602
|
+
- `tree-sitter-ruby`, `tree-sitter-php`, `tree-sitter-c`, `tree-sitter-cpp`, `tree-sitter-kotlin`, `tree-sitter-swift`, `tree-sitter-scala`
|
|
603
|
+
|
|
604
|
+
**Optional (detected at runtime):**
|
|
605
|
+
- .NET SDK 8+ — enables Roslyn analyzer for richer C# analysis
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
## Supported Languages
|
|
610
|
+
|
|
611
|
+
### Core (included with `pip install mnemo`)
|
|
612
|
+
|
|
613
|
+
| Language | Extensions |
|
|
614
|
+
|----------|------------|
|
|
615
|
+
| Python | `.py` |
|
|
616
|
+
| JavaScript | `.js`, `.jsx` |
|
|
617
|
+
| TypeScript | `.ts`, `.tsx` |
|
|
618
|
+
| Go | `.go` |
|
|
619
|
+
| C# | `.cs` (+ Roslyn enhanced analysis) |
|
|
620
|
+
| Java | `.java` |
|
|
621
|
+
| Rust | `.rs` |
|
|
622
|
+
|
|
623
|
+
### Optional (install with `pip install mnemo[all-languages]`)
|
|
624
|
+
|
|
625
|
+
| Language | Extensions |
|
|
626
|
+
|----------|------------|
|
|
627
|
+
| Ruby | `.rb` |
|
|
628
|
+
| PHP | `.php` |
|
|
629
|
+
| C | `.c`, `.h` |
|
|
630
|
+
| C++ | `.cpp`, `.cc`, `.hpp` |
|
|
631
|
+
| Kotlin | `.kt`, `.kts` |
|
|
632
|
+
| Swift | `.swift` |
|
|
633
|
+
| Scala | `.scala`, `.sc` |
|
|
634
|
+
|
|
635
|
+
Optional languages are gracefully skipped if their grammar is not installed — no errors, no crashes.
|
|
636
|
+
|
|
637
|
+
---
|
|
638
|
+
|
|
639
|
+
## Requirements
|
|
640
|
+
|
|
641
|
+
- Python 3.10+
|
|
642
|
+
- Git (for rename/delete detection and team graph)
|
|
643
|
+
- Any AI client with MCP support (Amazon Q, Cursor, Claude Code, Kiro, Copilot, or generic)
|
|
644
|
+
|
|
645
|
+
---
|
|
646
|
+
|
|
647
|
+
## Dashboard UI
|
|
648
|
+
|
|
649
|
+
Mnemo includes a built-in web dashboard to visualize your project's knowledge graph, memory, linked repos, and more.
|
|
650
|
+
|
|
651
|
+
```bash
|
|
652
|
+
mnemo ui # opens http://localhost:7890
|
|
653
|
+
mnemo ui --port 9000 # custom port
|
|
654
|
+
mnemo ui --no-open # don't auto-open browser
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
### What the dashboard shows
|
|
658
|
+
|
|
659
|
+
| Section | Content |
|
|
660
|
+
|---------|--------|
|
|
661
|
+
| Overview | Stat cards (memories, graph nodes, linked repos, tasks, decisions) + activity timeline |
|
|
662
|
+
| Knowledge Graph | Interactive force-directed visualization with search and type filter |
|
|
663
|
+
| Memory | All memories with category filter badges + decisions log |
|
|
664
|
+
| Linked Repos | Cards showing each repo's name, path, indexed/exists status |
|
|
665
|
+
| Tasks | Active/completed tasks with status indicators |
|
|
666
|
+
| Health | Code complexity hotspots, large files, god classes |
|
|
667
|
+
| APIs | Discovered API endpoints |
|
|
668
|
+
| Team | Git-based expertise map |
|
|
669
|
+
| Incidents & Errors | Operational memory with severity badges |
|
|
670
|
+
| Knowledge Base | Rendered markdown from `.mnemo/knowledge/` |
|
|
671
|
+
|
|
672
|
+
Dark theme, glassmorphism design, zero dependencies (Tailwind + vis-network from CDN).
|
|
673
|
+
|
|
674
|
+
---
|
|
675
|
+
|
|
676
|
+
## Dashboard UI
|
|
677
|
+
|
|
678
|
+
Mnemo includes a built-in web dashboard to visualize your project's knowledge graph, memory, linked repos, and more.
|
|
679
|
+
|
|
680
|
+
```bash
|
|
681
|
+
mnemo ui # opens http://localhost:7890
|
|
682
|
+
mnemo ui --port 9000 # custom port
|
|
683
|
+
mnemo ui --no-open # don't auto-open browser
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
Dark theme, glassmorphism design, zero dependencies (Tailwind + vis-network from CDN).
|
|
687
|
+
|
|
688
|
+
---
|
|
689
|
+
|
|
690
|
+
## Roadmap
|
|
691
|
+
|
|
692
|
+
| Feature | Status |
|
|
693
|
+
|---------|--------|
|
|
694
|
+
| Knowledge Graph (Local + Workspace) | ✅ Done |
|
|
695
|
+
| Plan Mode (auto-create, auto-complete) | ✅ Done |
|
|
696
|
+
| Response Enrichment | ✅ Done |
|
|
697
|
+
| Multi-Language Support (14 languages) | ✅ Done |
|
|
698
|
+
| Dashboard UI (`mnemo ui`) | ✅ Done |
|
|
699
|
+
| Team Server (`mnemo serve`) | 🔲 Next |
|
|
700
|
+
| Convention Enforcer | 🔲 Planned |
|
|
701
|
+
| Smart Code Review | 🔲 Planned |
|
|
702
|
+
| Enterprise (Auth, Audit, Neo4j) | 🔲 Future |
|