memobank-cli 0.2.0 → 0.6.0
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/CHANGELOG.md +24 -0
- package/README.md +330 -83
- package/dist/cli.js +180 -13
- package/dist/cli.js.map +1 -1
- package/dist/commands/capture.d.ts +1 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +38 -15
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +94 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/install.d.ts +1 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +56 -4
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/lifecycle.d.ts +2 -0
- package/dist/commands/lifecycle.d.ts.map +1 -1
- package/dist/commands/lifecycle.js +10 -0
- package/dist/commands/lifecycle.js.map +1 -1
- package/dist/commands/migrate.d.ts +22 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +130 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/onboarding.d.ts +8 -7
- package/dist/commands/onboarding.d.ts.map +1 -1
- package/dist/commands/onboarding.js +411 -343
- package/dist/commands/onboarding.js.map +1 -1
- package/dist/commands/recall.d.ts +4 -2
- package/dist/commands/recall.d.ts.map +1 -1
- package/dist/commands/recall.js +27 -30
- package/dist/commands/recall.js.map +1 -1
- package/dist/commands/scan.d.ts +27 -0
- package/dist/commands/scan.d.ts.map +1 -0
- package/dist/commands/scan.js +147 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +7 -2
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/setup.js +2 -2
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/team.d.ts +18 -0
- package/dist/commands/team.d.ts.map +1 -0
- package/dist/commands/team.js +215 -0
- package/dist/commands/team.js.map +1 -0
- package/dist/commands/workspace.d.ts +12 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +189 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/commands/write.d.ts.map +1 -1
- package/dist/commands/write.js +4 -0
- package/dist/commands/write.js.map +1 -1
- package/dist/components/MultiSelect.d.ts +17 -0
- package/dist/components/MultiSelect.d.ts.map +1 -0
- package/dist/components/MultiSelect.js +7 -0
- package/dist/components/MultiSelect.js.map +1 -0
- package/dist/config.d.ts +3 -15
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +28 -61
- package/dist/config.js.map +1 -1
- package/dist/core/decay-engine.d.ts +11 -0
- package/dist/core/decay-engine.d.ts.map +1 -1
- package/dist/core/decay-engine.js +11 -0
- package/dist/core/decay-engine.js.map +1 -1
- package/dist/core/embedding.d.ts +1 -1
- package/dist/core/embedding.d.ts.map +1 -1
- package/dist/core/embedding.js +13 -0
- package/dist/core/embedding.js.map +1 -1
- package/dist/core/lifecycle-manager.d.ts +16 -0
- package/dist/core/lifecycle-manager.d.ts.map +1 -1
- package/dist/core/lifecycle-manager.js +86 -0
- package/dist/core/lifecycle-manager.js.map +1 -1
- package/dist/core/reranker.d.ts +14 -0
- package/dist/core/reranker.d.ts.map +1 -0
- package/dist/core/reranker.js +64 -0
- package/dist/core/reranker.js.map +1 -0
- package/dist/core/retriever.d.ts +2 -5
- package/dist/core/retriever.d.ts.map +1 -1
- package/dist/core/retriever.js +96 -16
- package/dist/core/retriever.js.map +1 -1
- package/dist/core/sanitizer.d.ts +10 -0
- package/dist/core/sanitizer.d.ts.map +1 -1
- package/dist/core/sanitizer.js +57 -39
- package/dist/core/sanitizer.js.map +1 -1
- package/dist/core/store.d.ts +16 -30
- package/dist/core/store.d.ts.map +1 -1
- package/dist/core/store.js +121 -71
- package/dist/core/store.js.map +1 -1
- package/dist/engines/lancedb-engine.d.ts.map +1 -1
- package/dist/engines/lancedb-engine.js +2 -1
- package/dist/engines/lancedb-engine.js.map +1 -1
- package/dist/platforms/claude-code.d.ts +2 -1
- package/dist/platforms/claude-code.d.ts.map +1 -1
- package/dist/platforms/claude-code.js +21 -3
- package/dist/platforms/claude-code.js.map +1 -1
- package/dist/platforms/gemini.d.ts +7 -0
- package/dist/platforms/gemini.d.ts.map +1 -0
- package/dist/platforms/gemini.js +109 -0
- package/dist/platforms/gemini.js.map +1 -0
- package/dist/platforms/qwen.d.ts +7 -0
- package/dist/platforms/qwen.d.ts.map +1 -0
- package/dist/platforms/qwen.js +109 -0
- package/dist/platforms/qwen.js.map +1 -0
- package/dist/types.d.ts +32 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
14
|
- Advanced search filters
|
|
15
15
|
- Memory export formats (PDF, HTML)
|
|
16
16
|
|
|
17
|
+
## [0.6.0] - 2026-03-20
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **Three-Tier Memory Model** — Personal (`~/.memobank/<project>/`), Project (`.memobank/`), Workspace (`~/.memobank/_workspace/`) tiers with distinct scopes and recall priority
|
|
22
|
+
- **Custom project memory directory** — onboarding now prompts for the project tier directory name (default `.memobank`); any name is supported
|
|
23
|
+
- **`findGitRoot` helper** — correctly resolves the git repo root independently of the memory directory name
|
|
24
|
+
- **Auto-memory check step** — onboarding detects if Claude Code has `autoMemoryEnabled: false` and offers to re-enable it
|
|
25
|
+
- **Workspace remote renamed from `team`** — `config.workspace` replaces `config.team`; backward-compatible alias in `loadConfig`
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- `MEMORY.md` now lives at `<repoRoot>/MEMORY.md` (flat, not `memory/MEMORY.md`)
|
|
30
|
+
- `autoMemoryDirectory` in Claude Code settings points to the project tier root (not a subdirectory)
|
|
31
|
+
- `findRepoRoot` scans all immediate subdirectories to support custom directory names
|
|
32
|
+
- `memo onboarding` is the canonical setup command; `memo init` and `memo setup` remain as aliases
|
|
33
|
+
- Deprecated `memo team` commands fully removed; use `memo workspace`
|
|
34
|
+
- `--scope team` option removed; use `--scope project`
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Dead imports (`isNoise`, `hasHighValueIndicators`, `filterAndRank`) removed from `capture.ts`
|
|
39
|
+
- Removed Stop hook install from Claude Code platform adapter (Claude Code native auto-memory handles writes)
|
|
40
|
+
|
|
17
41
|
## [0.1.0] - 2026-03-19
|
|
18
42
|
|
|
19
43
|
### Added
|
package/README.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
> Persistent memory for AI coding sessions
|
|
1
|
+
# memobank
|
|
4
2
|
|
|
5
3
|
[](https://www.npmjs.com/package/memobank-cli)
|
|
6
4
|
[](https://www.npmjs.com/package/memobank-cli)
|
|
@@ -8,34 +6,215 @@
|
|
|
8
6
|
[](https://www.typescriptlang.org/)
|
|
9
7
|
[](https://nodejs.org/)
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
AI agents forget everything between sessions.
|
|
10
|
+
Static files like CLAUDE.md go stale and require manual upkeep.
|
|
11
|
+
Cloud memory APIs add external services your team doesn't own or control.
|
|
12
|
+
|
|
13
|
+
**memobank gives AI agents persistent, structured memory that lives in your Git repo** —
|
|
14
|
+
versioned alongside code, reviewed as PRs, and loaded automatically at session start.
|
|
15
|
+
|
|
16
|
+
- **Personal** — private lessons and preferences, never committed
|
|
17
|
+
- **Team** — shared knowledge that travels with the codebase
|
|
18
|
+
- **Workspace** — cross-repo patterns, synced via a separate Git remote
|
|
19
|
+
|
|
20
|
+
Works with Claude Code, Cursor, Codex, Gemini CLI, and Qwen Code.
|
|
21
|
+
Zero external services required.
|
|
12
22
|
|
|
13
|
-
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Get started
|
|
14
26
|
|
|
15
27
|
```bash
|
|
16
|
-
# Install globally
|
|
17
28
|
npm install -g memobank-cli
|
|
29
|
+
cd your-project
|
|
30
|
+
memo onboarding # creates .memobank/ and configures Claude Code
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**For individuals** — memories stay on your machine, load automatically into every Claude Code session:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
memo write decision # interactive: name, description, content
|
|
37
|
+
memo recall "package manager"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**For teams** — commit `.memobank/` like source code. Teammates get the same memories on clone:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git add .memobank/
|
|
44
|
+
git commit -m "init team memory"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Claude Code loads the first 200 lines of `.memobank/MEMORY.md` at every session start — no plugins, no configuration beyond `memo onboarding`.
|
|
18
48
|
|
|
19
|
-
|
|
20
|
-
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## How it works
|
|
52
|
+
|
|
53
|
+
memobank uses three memory tiers — like `git config` levels, each with a different scope:
|
|
54
|
+
|
|
55
|
+
| Tier | Location | Committed? | Scope |
|
|
56
|
+
|------|----------|-----------|-------|
|
|
57
|
+
| Personal | `~/.memobank/<project>/` | No | Your machine only |
|
|
58
|
+
| Project | `<repo>/<dir>/` (default: `.memobank/`) | Yes | Everyone who clones |
|
|
59
|
+
| Workspace | `~/.memobank/_workspace/` | Separate remote | Across multiple repos |
|
|
21
60
|
|
|
22
|
-
|
|
23
|
-
memo
|
|
61
|
+
Most teams only ever need **Personal + Project**. Workspace is opt-in.
|
|
62
|
+
The project directory name (default `.memobank`) can be customized during `memo onboarding`.
|
|
63
|
+
|
|
64
|
+
When you run `memo recall`, memobank searches all active tiers and writes the top results to `.memobank/MEMORY.md`. Claude Code loads that file at the start of every session.
|
|
65
|
+
|
|
66
|
+
Memories are plain markdown with a small YAML header — readable, diffable, and reviewable in PRs:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
---
|
|
70
|
+
name: prefer-pnpm
|
|
71
|
+
type: decision
|
|
72
|
+
status: active
|
|
73
|
+
tags: [tooling, packages]
|
|
74
|
+
---
|
|
75
|
+
We switched from npm to pnpm in March 2026. Faster installs, better monorepo support.
|
|
24
76
|
```
|
|
25
77
|
|
|
26
|
-
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Why not just use CLAUDE.md?
|
|
81
|
+
|
|
82
|
+
CLAUDE.md is great for static rules you write once. memobank handles knowledge that accumulates over time — lessons learned, decisions made, patterns discovered. The two are complementary: CLAUDE.md for "always do X", memobank for "we learned Y".
|
|
83
|
+
|
|
84
|
+
## Why not a cloud memory API?
|
|
85
|
+
|
|
86
|
+
Tools like mem0 or Zep store memories in external services. memobank stores them in your Git repo — no API keys, no vendor lock-in, no data leaving your machine. Memory health is visible in `git diff`. Reviews happen in PRs.
|
|
87
|
+
|
|
88
|
+
## Why not Claude Code's built-in auto-memory?
|
|
89
|
+
|
|
90
|
+
Claude Code's auto-memory is personal and machine-local by default. memobank adds the team layer: `.memobank/` is committed alongside your code, so every teammate and every CI run starts with the same shared knowledge. memobank also works with Cursor, Codex, Gemini CLI, and Qwen Code.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Features
|
|
95
|
+
|
|
96
|
+
**Memory management**
|
|
97
|
+
- Four types: `lesson`, `decision`, `workflow`, `architecture`
|
|
98
|
+
- Status lifecycle: `experimental → active → needs-review → deprecated`
|
|
99
|
+
- Automatic stale memory detection via `memo review`
|
|
100
|
+
|
|
101
|
+
**Search**
|
|
102
|
+
- Default: keyword + tag + recency scoring, zero external dependencies
|
|
103
|
+
- Optional: vector search via LanceDB (Ollama, OpenAI, Azure, Jina)
|
|
104
|
+
|
|
105
|
+
**Safety**
|
|
106
|
+
- Automatic secret redaction before every write (API keys, tokens, credentials)
|
|
107
|
+
- `memo scan` blocks workspace publish if secrets are detected
|
|
108
|
+
|
|
109
|
+
**Integrations**
|
|
110
|
+
- Claude Code — `autoMemoryDirectory` points to `.memobank/`, loads at session start
|
|
111
|
+
- Cursor, Codex, Gemini CLI, Qwen Code — hooks installed via `memo onboarding`
|
|
112
|
+
- Import from Claude Code, Gemini, and Qwen: `memo import --claude`
|
|
113
|
+
|
|
114
|
+
**Team workflows**
|
|
115
|
+
- Workspace tier: cross-repo knowledge synced via separate Git remote
|
|
116
|
+
- Epoch-aware scoring: team knowledge naturally fades during handoffs
|
|
117
|
+
- `memo map` for memory statistics, `memo lifecycle` for health scans
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 🗂️ Three-Tier Memory Model
|
|
122
|
+
|
|
123
|
+
Memobank organizes memory into three tiers, each with a distinct scope and use case. The tier determines where files are stored and who can access them — not how they are structured (all tiers share the same file format).
|
|
124
|
+
|
|
125
|
+
### Tier 1 — Personal (Private)
|
|
126
|
+
|
|
127
|
+
| | |
|
|
128
|
+
|---|---|
|
|
129
|
+
| **Location** | `~/.memobank/<project-name>/` |
|
|
130
|
+
| **Committed to Git** | Never |
|
|
131
|
+
| **Who sees it** | Only you, on this machine |
|
|
132
|
+
| **Activate** | `memo init --global` |
|
|
133
|
+
|
|
134
|
+
**Use when:** You want to keep private notes about a project — experiments that didn't pan out, personal shortcuts, machine-specific env quirks. This tier never touches the repo and is never shared.
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
~/.memobank/my-project/
|
|
138
|
+
├── lesson/
|
|
139
|
+
├── decision/
|
|
140
|
+
├── workflow/
|
|
141
|
+
└── architecture/
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### Tier 2 — Project (Team)
|
|
147
|
+
|
|
148
|
+
| | |
|
|
149
|
+
|---|---|
|
|
150
|
+
| **Location** | `<repo-root>/.memobank/` |
|
|
151
|
+
| **Committed to Git** | Yes — like any other source file |
|
|
152
|
+
| **Who sees it** | Everyone who clones the repo |
|
|
153
|
+
| **Activate** | `memo init` (default) |
|
|
154
|
+
|
|
155
|
+
**Use when:** You want the team to share knowledge about this repo. Adding a memory = opening a PR. Reviewing a memory = code review. History = `git log`. No extra commands needed — standard Git workflow handles everything.
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
your-project/
|
|
159
|
+
├── src/
|
|
160
|
+
├── .memobank/ ← committed alongside code
|
|
161
|
+
│ ├── lesson/
|
|
162
|
+
│ ├── decision/
|
|
163
|
+
│ ├── workflow/
|
|
164
|
+
│ └── architecture/
|
|
165
|
+
└── package.json
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Differentiated use cases vs. personal:**
|
|
169
|
+
- Bug post-mortems the whole team should know about → **project**
|
|
170
|
+
- "I personally keep forgetting to run `npm run generate` before building" → **personal**
|
|
171
|
+
- Architecture decision records (ADRs) → **project**
|
|
172
|
+
- Your local dev environment gotcha → **personal**
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Tier 3 — Workspace (Organization, Optional)
|
|
27
177
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
178
|
+
| | |
|
|
179
|
+
|---|---|
|
|
180
|
+
| **Location** | `~/.memobank/_workspace/<workspace-name>/` (local clone) |
|
|
181
|
+
| **Committed to Git** | To a designated remote repo (infra, platform-docs, etc.) |
|
|
182
|
+
| **Who sees it** | Entire organization, across all repos |
|
|
183
|
+
| **Activate** | `memo workspace init <remote-url>` |
|
|
184
|
+
|
|
185
|
+
**Use when:** You have knowledge that spans multiple repos or services — inter-service contracts, company-wide architecture patterns, platform team decisions. Any existing Git repo can serve as the workspace remote; updates flow through standard PRs.
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
Organization knowledge (cross-repo):
|
|
189
|
+
git@github.com:mycompany/platform-docs.git
|
|
190
|
+
└── .memobank/
|
|
191
|
+
├── lesson/ ← "all services must handle 429s with exponential backoff"
|
|
192
|
+
├── decision/ ← "we use gRPC for internal, REST for external"
|
|
193
|
+
└── architecture/ ← "auth service owns all JWT validation"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Differentiated use cases vs. project:**
|
|
197
|
+
- "Redis connection pooling pattern for this service" → **project**
|
|
198
|
+
- "Redis connection pooling pattern for all services" → **workspace**
|
|
199
|
+
- "We switched to Postgres in this repo" → **project**
|
|
200
|
+
- "Our data platform team maintains Postgres, contact @data-infra for schema changes" → **workspace**
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### Recall Priority
|
|
205
|
+
|
|
206
|
+
When `memo recall` runs, all configured tiers are searched and merged into a single ranked list:
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
Priority (highest → lowest):
|
|
210
|
+
1. Project — most specific to current context
|
|
211
|
+
2. Personal — your individual experience
|
|
212
|
+
3. Workspace — broad organizational knowledge
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
If the same filename exists in multiple tiers, the higher-priority tier's version wins. Each result shows its source tier so you always know where a memory came from.
|
|
216
|
+
|
|
217
|
+
---
|
|
39
218
|
|
|
40
219
|
## 📋 Commands
|
|
41
220
|
|
|
@@ -45,18 +224,30 @@ memo install --all
|
|
|
45
224
|
|---------|-------------|
|
|
46
225
|
| `memo onboarding` | Interactive setup wizard (recommended) |
|
|
47
226
|
| `memo init` | Alias for onboarding |
|
|
48
|
-
| `memo
|
|
227
|
+
| `memo init --global` | Set up personal (private) tier only |
|
|
228
|
+
| `memo install` | Set up directory structure and platform hooks |
|
|
49
229
|
| `memo import` | Import memories from other AI tools |
|
|
230
|
+
| `memo migrate` | Migrate from old `personal/`+`team/` layout to three-tier |
|
|
50
231
|
|
|
51
232
|
### Memory Operations
|
|
52
233
|
|
|
53
234
|
| Command | Description |
|
|
54
235
|
|---------|-------------|
|
|
55
|
-
| `memo recall <query>` | Search and
|
|
236
|
+
| `memo recall <query>` | Search all tiers and write results to MEMORY.md |
|
|
56
237
|
| `memo search <query>` | Debug search without modifying MEMORY.md |
|
|
57
238
|
| `memo write <type>` | Create a new memory (interactive or non-interactive) |
|
|
58
239
|
| `memo capture` | Extract learnings from session text |
|
|
59
240
|
|
|
241
|
+
### Workspace Commands
|
|
242
|
+
|
|
243
|
+
| Command | Description |
|
|
244
|
+
|---------|-------------|
|
|
245
|
+
| `memo workspace init <url>` | Configure workspace remote, clone to `~/.memobank/_workspace/` |
|
|
246
|
+
| `memo workspace sync` | Pull latest workspace memories from remote |
|
|
247
|
+
| `memo workspace sync --push` | Push local workspace changes to remote |
|
|
248
|
+
| `memo workspace publish <file>` | Copy a project memory to workspace (+ secret scan) |
|
|
249
|
+
| `memo workspace status` | Show git status of local workspace clone |
|
|
250
|
+
|
|
60
251
|
### Management
|
|
61
252
|
|
|
62
253
|
| Command | Description |
|
|
@@ -65,7 +256,12 @@ memo install --all
|
|
|
65
256
|
| `memo review` | List memories due for review |
|
|
66
257
|
| `memo map` | Show memory statistics |
|
|
67
258
|
| `memo lifecycle` | View memory lifecycle report |
|
|
259
|
+
| `memo lifecycle --scan` | Run full status sweep (downgrades stale memories) |
|
|
260
|
+
| `memo lifecycle --reset-epoch` | Reset epoch for team handoff (new team starts fresh decay) |
|
|
68
261
|
| `memo correct <path>` | Record a memory correction |
|
|
262
|
+
| `memo scan` | Scan for secrets before pushing |
|
|
263
|
+
|
|
264
|
+
---
|
|
69
265
|
|
|
70
266
|
## 🎯 Usage Examples
|
|
71
267
|
|
|
@@ -73,14 +269,16 @@ memo install --all
|
|
|
73
269
|
|
|
74
270
|
```bash
|
|
75
271
|
# Interactive setup with menu navigation
|
|
76
|
-
memo onboarding
|
|
272
|
+
memo onboarding # or: memo init
|
|
273
|
+
|
|
274
|
+
# Project tier only (commits to repo)
|
|
275
|
+
memo init
|
|
77
276
|
|
|
78
|
-
#
|
|
79
|
-
memo
|
|
277
|
+
# Personal tier only (private, never committed)
|
|
278
|
+
memo init --global
|
|
80
279
|
|
|
81
|
-
#
|
|
82
|
-
memo
|
|
83
|
-
memo install --cursor
|
|
280
|
+
# Set up workspace for org-wide knowledge
|
|
281
|
+
memo workspace init git@github.com:mycompany/platform-docs.git
|
|
84
282
|
```
|
|
85
283
|
|
|
86
284
|
### Create Memories
|
|
@@ -89,70 +287,83 @@ memo install --cursor
|
|
|
89
287
|
# Interactive (opens editor)
|
|
90
288
|
memo write lesson
|
|
91
289
|
|
|
92
|
-
# Non-interactive
|
|
290
|
+
# Non-interactive — project tier (default)
|
|
93
291
|
memo write lesson \
|
|
94
292
|
--name="redis-pooling" \
|
|
95
293
|
--description="Use connection pooling for Redis" \
|
|
96
294
|
--tags="redis,database" \
|
|
97
295
|
--content="## Problem\n\nHigh concurrency exhausts connections.\n\n## Solution\n\nUse connection pool with max=10."
|
|
296
|
+
|
|
297
|
+
# Write to personal tier explicitly
|
|
298
|
+
memo write lesson --scope personal \
|
|
299
|
+
--name="local-dev-trick" \
|
|
300
|
+
--description="Run port 3001 on this machine to avoid conflicts"
|
|
98
301
|
```
|
|
99
302
|
|
|
100
303
|
### Search Memories
|
|
101
304
|
|
|
102
305
|
```bash
|
|
103
|
-
#
|
|
306
|
+
# Search all tiers (default)
|
|
104
307
|
memo recall "redis connection"
|
|
105
308
|
|
|
309
|
+
# Search specific tier
|
|
310
|
+
memo recall "redis connection" --scope project
|
|
311
|
+
memo recall "redis connection" --scope personal
|
|
312
|
+
memo recall "redis connection" --scope workspace
|
|
313
|
+
|
|
106
314
|
# Vector search (if configured)
|
|
107
315
|
memo recall "database pooling" --engine=lancedb
|
|
108
316
|
|
|
109
|
-
# Filter by tag
|
|
317
|
+
# Filter by tag or type
|
|
110
318
|
memo search "redis" --tag=database
|
|
111
|
-
|
|
112
|
-
# Filter by type
|
|
113
319
|
memo search "pool" --type=lesson
|
|
320
|
+
|
|
321
|
+
# Show score breakdown
|
|
322
|
+
memo recall "redis" --explain
|
|
114
323
|
```
|
|
115
324
|
|
|
116
|
-
###
|
|
325
|
+
### Share Memories with the Team
|
|
117
326
|
|
|
118
327
|
```bash
|
|
119
|
-
#
|
|
120
|
-
|
|
328
|
+
# Promote a personal note to project-level (committed with code)
|
|
329
|
+
# Just move the file and commit it — no special command needed
|
|
330
|
+
git add .memobank/lesson/redis-pooling.md
|
|
331
|
+
git commit -m "mem: add Redis pooling lesson"
|
|
121
332
|
|
|
122
|
-
#
|
|
123
|
-
memo
|
|
124
|
-
memo lifecycle --tier peripheral
|
|
333
|
+
# Promote a project memory to org-wide workspace
|
|
334
|
+
memo workspace publish .memobank/lesson/redis-pooling.md
|
|
125
335
|
|
|
126
|
-
#
|
|
127
|
-
memo
|
|
128
|
-
|
|
129
|
-
# View flagged memories (multiple corrections)
|
|
130
|
-
memo lifecycle flagged
|
|
336
|
+
# Pull latest org knowledge
|
|
337
|
+
memo workspace sync
|
|
131
338
|
```
|
|
132
339
|
|
|
133
|
-
###
|
|
340
|
+
### Team Handoff
|
|
134
341
|
|
|
135
342
|
```bash
|
|
136
|
-
#
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
#
|
|
140
|
-
|
|
343
|
+
# New team takes over the project
|
|
344
|
+
git clone git@github.com:myorg/my-project.git # project memories arrive automatically
|
|
345
|
+
memo workspace sync # pull latest org knowledge
|
|
346
|
+
memo lifecycle --reset-epoch # start fresh decay tracking
|
|
347
|
+
```
|
|
141
348
|
|
|
142
|
-
|
|
143
|
-
memo import --qwen
|
|
349
|
+
### Import from Other Tools
|
|
144
350
|
|
|
145
|
-
|
|
146
|
-
memo import --
|
|
351
|
+
```bash
|
|
352
|
+
memo import --claude # Import from Claude Code
|
|
353
|
+
memo import --gemini # Import from Gemini CLI
|
|
354
|
+
memo import --qwen # Import from Qwen Code
|
|
355
|
+
memo import --all # Import from all available tools
|
|
147
356
|
```
|
|
148
357
|
|
|
358
|
+
---
|
|
359
|
+
|
|
149
360
|
## 📁 Memory Types
|
|
150
361
|
|
|
151
362
|
| Type | Directory | Purpose |
|
|
152
363
|
|------|-----------|---------|
|
|
153
|
-
| **Lesson** | `
|
|
154
|
-
| **Decision** | `
|
|
155
|
-
| **Workflow** | `
|
|
364
|
+
| **Lesson** | `lesson/` | Post-mortems, bugs fixed, gotchas |
|
|
365
|
+
| **Decision** | `decision/` | ADRs: context, options, decision, consequences |
|
|
366
|
+
| **Workflow** | `workflow/` | Runbooks, deploy flows, onboarding |
|
|
156
367
|
| **Architecture** | `architecture/` | System diagrams, component descriptions |
|
|
157
368
|
|
|
158
369
|
### Memory File Format
|
|
@@ -164,7 +375,7 @@ type: lesson
|
|
|
164
375
|
description: "Use async job queue to prevent API timeout"
|
|
165
376
|
tags: [api, reliability, async]
|
|
166
377
|
created: 2026-03-17
|
|
167
|
-
|
|
378
|
+
status: active
|
|
168
379
|
confidence: medium
|
|
169
380
|
---
|
|
170
381
|
|
|
@@ -182,31 +393,75 @@ confidence: medium
|
|
|
182
393
|
- [Key insight 2]
|
|
183
394
|
```
|
|
184
395
|
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## 📈 Status Lifecycle
|
|
399
|
+
|
|
400
|
+
Every memory has a `status` field that evolves based on how often it is recalled:
|
|
401
|
+
|
|
402
|
+
| Status | Meaning | Transition |
|
|
403
|
+
|--------|---------|-----------|
|
|
404
|
+
| `experimental` | Newly written, unverified | Default on creation |
|
|
405
|
+
| `active` | Recalled at least once; trusted | Promoted on first recall |
|
|
406
|
+
| `needs-review` | Not recalled in 90 days; may be stale | Downgraded by `memo lifecycle --scan` |
|
|
407
|
+
| `deprecated` | Not recalled in 90 days after `needs-review` | Excluded from default recall |
|
|
408
|
+
|
|
409
|
+
**Rules:**
|
|
410
|
+
- `experimental → active`: recalled ≥ 1 time
|
|
411
|
+
- `needs-review → active`: recalled ≥ 3 times (deliberate re-validation required)
|
|
412
|
+
- `deprecated` memories remain searchable via `memo search --include-deprecated` but are excluded from `memo recall`
|
|
413
|
+
- The Git diff on `.memobank/` shows which memories are gaining or losing relevance — your team's ambient health signal
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
# Manual lifecycle scan (or run in CI)
|
|
417
|
+
memo lifecycle --scan
|
|
418
|
+
|
|
419
|
+
# Configure thresholds in meta/config.yaml
|
|
420
|
+
lifecycle:
|
|
421
|
+
experimental_ttl_days: 30
|
|
422
|
+
active_to_review_days: 90
|
|
423
|
+
review_to_deprecated_days: 90
|
|
424
|
+
review_recall_threshold: 3
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
185
429
|
## ⚙️ Configuration
|
|
186
430
|
|
|
187
|
-
Configuration lives in `meta/config.yaml
|
|
431
|
+
Configuration lives in `meta/config.yaml` (inside each tier's root):
|
|
188
432
|
|
|
189
433
|
```yaml
|
|
190
434
|
project:
|
|
191
435
|
name: "my-project"
|
|
192
436
|
description: "Optional description"
|
|
437
|
+
|
|
193
438
|
memory:
|
|
194
439
|
token_budget: 2000
|
|
195
440
|
top_k: 5
|
|
441
|
+
|
|
196
442
|
embedding:
|
|
197
|
-
engine: text
|
|
198
|
-
provider: ollama
|
|
443
|
+
engine: text # or 'lancedb'
|
|
444
|
+
provider: ollama # or 'openai', 'azure'
|
|
199
445
|
model: mxbai-embed-large
|
|
200
446
|
dimensions: 1024
|
|
447
|
+
|
|
201
448
|
search:
|
|
202
449
|
use_tags: true
|
|
203
450
|
use_summary: true
|
|
204
|
-
|
|
205
|
-
enabled: true
|
|
451
|
+
|
|
206
452
|
lifecycle:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
453
|
+
experimental_ttl_days: 30
|
|
454
|
+
active_to_review_days: 90
|
|
455
|
+
review_to_deprecated_days: 90
|
|
456
|
+
review_recall_threshold: 3
|
|
457
|
+
decay_window_days: 180
|
|
458
|
+
|
|
459
|
+
workspace:
|
|
460
|
+
enabled: true
|
|
461
|
+
remote: git@github.com:mycompany/platform-docs.git
|
|
462
|
+
path: .memobank # subdirectory within remote repo (optional)
|
|
463
|
+
branch: main
|
|
464
|
+
auto_sync: false # manual sync by default; no network on every recall
|
|
210
465
|
```
|
|
211
466
|
|
|
212
467
|
### Embedding Providers
|
|
@@ -217,6 +472,8 @@ lifecycle:
|
|
|
217
472
|
| **OpenAI** | text-embedding-3-small | 1536 | Required |
|
|
218
473
|
| **Azure** | text-embedding-ada-002 | 1536 | Required |
|
|
219
474
|
|
|
475
|
+
---
|
|
476
|
+
|
|
220
477
|
## 🔌 Platform Integrations
|
|
221
478
|
|
|
222
479
|
After running `memo install --all`:
|
|
@@ -230,9 +487,11 @@ Appends memory protocol to `AGENTS.md`
|
|
|
230
487
|
### Cursor
|
|
231
488
|
Creates `.cursor/rules/memobank.mdc` with `alwaysApply: true`
|
|
232
489
|
|
|
490
|
+
---
|
|
491
|
+
|
|
233
492
|
## 🛡️ Security
|
|
234
493
|
|
|
235
|
-
Memobank automatically sanitizes:
|
|
494
|
+
Memobank automatically sanitizes secrets before publishing to workspace:
|
|
236
495
|
- ✅ API keys and tokens
|
|
237
496
|
- ✅ Passwords and secrets
|
|
238
497
|
- ✅ IP addresses and hostnames
|
|
@@ -243,21 +502,9 @@ Memobank automatically sanitizes:
|
|
|
243
502
|
- ✅ AWS credentials
|
|
244
503
|
- ✅ GitHub/GitLab tokens
|
|
245
504
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
Memories are automatically categorized:
|
|
505
|
+
`memo workspace publish` runs the same scanner and aborts if secrets are found — no automatic stripping, you must redact manually.
|
|
249
506
|
|
|
250
|
-
|
|
251
|
-
|------|-----------|----------|
|
|
252
|
-
| **Core** 🔴 | Access ≥10 times | Priority retrieval |
|
|
253
|
-
| **Working** 🟡 | Normal access | Normal retrieval |
|
|
254
|
-
| **Peripheral** ⚪ | 90 days no access | Lower priority, archive suggestion |
|
|
255
|
-
|
|
256
|
-
## 📖 Documentation
|
|
257
|
-
|
|
258
|
-
- [Onboarding Guide](docs/ONBOARDING-GUIDE.md) - Interactive setup walkthrough
|
|
259
|
-
- [Memory Value Guide](docs/MEMORY-VALUE-GUIDE.md) - What to remember
|
|
260
|
-
- [Lifecycle Management](docs/LIFECYCLE-MANAGEMENT.md) - Memory optimization
|
|
507
|
+
---
|
|
261
508
|
|
|
262
509
|
## 🔧 Development
|
|
263
510
|
|