linksee-memory 0.10.0 → 0.11.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/LICENSE +21 -21
- package/README.md +152 -68
- package/dist/bin/import-sessions.js +6 -6
- package/dist/bin/install-skill.js +14 -14
- package/dist/bin/map-import.d.ts +2 -0
- package/dist/bin/map-import.js +493 -0
- package/dist/bin/setup.js +14 -14
- package/dist/bin/stats.js +20 -20
- package/dist/db/migrate.js +36 -0
- package/dist/db/schema.sql +73 -2
- package/dist/lib/consolidate.js +19 -19
- package/dist/lib/drift-detection.js +38 -2
- package/dist/lib/edge-detection.js +8 -8
- package/dist/lib/guard.js +28 -28
- package/dist/lib/map-import.d.ts +55 -0
- package/dist/lib/map-import.js +150 -0
- package/dist/lib/map-reconcile.d.ts +29 -0
- package/dist/lib/map-reconcile.js +245 -0
- package/dist/lib/map-view.d.ts +103 -0
- package/dist/lib/map-view.js +201 -0
- package/dist/lib/momentum.js +7 -7
- package/dist/lib/truth-engine.js +11 -11
- package/dist/mcp/read-smart.js +8 -8
- package/dist/mcp/server.js +45 -0
- package/dist/skill/SKILL.md +734 -734
- package/package.json +9 -5
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Synapse Arrows PTE. LTD.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Synapse Arrows PTE. LTD.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> **Your agent forgets everything when a session ends. Worse — it silently drifts from what you decided last week.**
|
|
4
4
|
>
|
|
5
|
-
>
|
|
5
|
+
> **Linksee Memory catches when your project drifts from its own decisions** — the option abandoned at a fork, the pipeline that quietly stalled, the code that contradicts what you agreed — and a re-injection guard re-surfaces the locked decision **before** the agent acts. Rules you've explicitly hardened get blocked.
|
|
6
6
|
>
|
|
7
|
-
>
|
|
7
|
+
> Underneath sits a local-first cross-LLM memory MCP — one SQLite file that **Claude Code, Cursor, Windsurf, OpenAI Codex, and Gemini CLI** all read from. Not just "what happened" but **WHY**: 6-layer structured memory with precision recall and an AST-aware diff cache (50–99% token savings on re-reads).
|
|
8
8
|
>
|
|
9
9
|
> `npx linksee-memory-setup` — one command, done.
|
|
10
10
|
|
|
@@ -15,6 +15,16 @@
|
|
|
15
15
|
|
|
16
16
|
🌐 **Landing page**: [linksee-site.vercel.app](https://linksee-site.vercel.app) (includes non-developer onboarding for Claude Desktop / Cursor / Claude Code / OpenAI Codex / Gemini CLI)
|
|
17
17
|
|
|
18
|
+
## 🪄 Three spells to remember
|
|
19
|
+
|
|
20
|
+
| Say this | What happens |
|
|
21
|
+
|---|---|
|
|
22
|
+
| **"use linksee"** ・「リンクシーして」 | Recalls relevant memories before acting |
|
|
23
|
+
| **"linksee this"** ・「これ覚えて」 | Saves the decision / lesson right now |
|
|
24
|
+
| **"what's drifting?"** ・「ズレてない?」 | Reconciles reality against your locked decisions |
|
|
25
|
+
|
|
26
|
+
> Make it automatic: add **"Use Linksee Memory"** to your system prompt / `CLAUDE.md`.
|
|
27
|
+
|
|
18
28
|
## 📣 As featured on
|
|
19
29
|
|
|
20
30
|
- **Zenn**: [あなたの Claude Code、 実は前回のセッションを完全に忘れている](https://zenn.dev/kanseilink/articles/linksee-memory-claude-code-recall-20260508) — 73 ♡ on Zenn, **165+ users on Hatena Bookmark**, picked up by tech blogs + YouTube shorts (May 2026)
|
|
@@ -29,6 +39,24 @@
|
|
|
29
39
|
|
|
30
40
|
## 🎬 See it in action
|
|
31
41
|
|
|
42
|
+
**Drift, caught.** Decisions don't survive session boundaries — but their consequences do. Ask any session:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
You: What's drifting right now?
|
|
46
|
+
Agent: [calls drift_status]
|
|
47
|
+
|
|
48
|
+
28 anchors: ⚪ 1 held · 🔵 27 aligned
|
|
49
|
+
|
|
50
|
+
Needs attention:
|
|
51
|
+
⚪ HELD — "Focus on 4 areas: Recipe layer, agent-native API,
|
|
52
|
+
Japanese market, Agent Insights"
|
|
53
|
+
↻ Reopens 2026-07-04
|
|
54
|
+
|
|
55
|
+
Everything else is aligned — no unaccounted divergence.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**The memory underneath.** Drift detection only works because the *why* survives the session boundary:
|
|
59
|
+
|
|
32
60
|
**Without linksee-memory** — Monday morning, new Claude session:
|
|
33
61
|
|
|
34
62
|
```
|
|
@@ -59,73 +87,11 @@ That single `caveat` memory is what separates "flat fact storage" from "the agen
|
|
|
59
87
|
|
|
60
88
|
---
|
|
61
89
|
|
|
62
|
-
## 🧠 The 6-layer structure
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
66
|
-
│ 🎯 goal ← what the user is working toward │
|
|
67
|
-
├─────────────────────────────────────────────────────────────┤
|
|
68
|
-
│ 🧭 context ← why this, why now — constraints, people │
|
|
69
|
-
├─────────────────────────────────────────────────────────────┤
|
|
70
|
-
│ 💗 emotion ← user tone signals (frustration, etc.) │
|
|
71
|
-
├─────────────────────────────────────────────────────────────┤
|
|
72
|
-
│ 🛠 implementation ← how it was done (+ what failed) │
|
|
73
|
-
├─────────────────────────────────────────────────────────────┤
|
|
74
|
-
│ ⚠️ caveat ← "never do this again" · auto-protected │
|
|
75
|
-
├─────────────────────────────────────────────────────────────┤
|
|
76
|
-
│ 🌱 learning ← patterns distilled from cold memories │
|
|
77
|
-
└─────────────────────────────────────────────────────────────┘
|
|
78
|
-
│
|
|
79
|
-
▼
|
|
80
|
-
Ranked recall via relevance × heat × momentum × importance
|
|
81
|
-
Returns match_reasons explaining each hit
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Every memory is tagged with **exactly one layer**. `caveat`-layer entries are protected from auto-forgetting. Cold low-importance memories are auto-consolidated into `learning` entries on server startup.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## What it does
|
|
89
|
-
|
|
90
|
-
Most "agent memory" services (Mem0, Letta, Zep) save a flat list of facts. Then the agent looks at "edited file X 30 times" and has no idea why. **linksee-memory keeps the WHY.**
|
|
91
|
-
|
|
92
|
-
It is a Model Context Protocol (MCP) server with **7 tools** that gives any AI agent structured memory + drift detection:
|
|
93
|
-
|
|
94
|
-
| | Mem0 / Letta / Zep | Claude Code auto-memory | linksee-memory |
|
|
95
|
-
|---|---|---|---|
|
|
96
|
-
| Cross-agent | △ (cloud) | ❌ Claude only | ✅ single SQLite file |
|
|
97
|
-
| 6-layer WHY structure | ❌ flat | ❌ flat markdown | ✅ goal / context / emotion / impl / caveat / learning |
|
|
98
|
-
| **Drift detection** | ❌ | ❌ | ✅ intent ↔ reality divergence tracking |
|
|
99
|
-
| File diff cache | ❌ | ❌ | ✅ AST-aware, 50-99% token savings on re-reads |
|
|
100
|
-
| Active forgetting | △ | ❌ | ✅ Ebbinghaus curve, caveat layer protected |
|
|
101
|
-
| Local-first / private | ❌ | ✅ | ✅ |
|
|
102
|
-
|
|
103
|
-
## Four pillars
|
|
104
|
-
|
|
105
|
-
1. **Token savings** via `read_smart` — sha256 + AST/heading/indent chunking. Re-reads return only diffs. **Measured 86% saved on a typical TS file edit, 99% saved on unchanged re-reads.**
|
|
106
|
-
2. **Cross-agent portability** — single SQLite file at `~/.linksee-memory/memory.db`. Same brain for Claude Code, Cursor, Windsurf, OpenAI Codex, Gemini CLI.
|
|
107
|
-
3. **WHY-first structured memory** — six explicit layers (`goal` / `context` / `emotion` / `implementation` / `caveat` / `learning`). Solves "flat fact memory is useless without goals".
|
|
108
|
-
4. **Drift detection** — declare decisions as anchors, then the engine automatically detects when committed reality diverges from stated intent. Think "Datadog for product decisions" — unaccounted divergences surface as drift, intentional evolution (recorded as supersede/fix) stays quiet.
|
|
109
|
-
|
|
110
90
|
## 🔍 Drift Detection — "Intent Datadog"
|
|
111
91
|
|
|
112
92
|
Most teams make decisions, then forget them. The agent from last week decided "we'll use FTS5 instead of vector search" — but this week a new session installs `pgvector` without knowing why that was rejected. **That's drift.** Not a bug. Not malice. Just forgotten context.
|
|
113
93
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
You: What's drifting right now?
|
|
118
|
-
Agent: [calls drift_status]
|
|
119
|
-
|
|
120
|
-
28 anchors: ⚪ 1 held · 🔵 27 aligned
|
|
121
|
-
|
|
122
|
-
Needs attention:
|
|
123
|
-
⚪ HELD — "Focus on 4 areas: Recipe layer, agent-native API,
|
|
124
|
-
Japanese market, Agent Insights"
|
|
125
|
-
↻ Reopens 2026-07-04
|
|
126
|
-
|
|
127
|
-
Everything else is aligned — no unaccounted divergence.
|
|
128
|
-
```
|
|
94
|
+
Memory tools remember what you did. Nothing notices when you drift from what you decided — that's the layer Linksee Memory adds. Think **"Datadog for product decisions"**: unaccounted divergences surface as drift, intentional evolution (recorded as supersede/fix) stays quiet.
|
|
129
95
|
|
|
130
96
|
### How it works
|
|
131
97
|
|
|
@@ -136,7 +102,7 @@ Agent: [calls drift_status]
|
|
|
136
102
|
- 🟡 **Review** — a soft signal awaits your decision
|
|
137
103
|
- ⚪ **Held** — you acknowledged the gap, parked it with a review date
|
|
138
104
|
- 🔵 **Aligned** — reality matches intent, or a recorded resolution explains the change
|
|
139
|
-
4. **Resolve** with `fix`, `supersede`, `acknowledge`, or `dismiss`
|
|
105
|
+
4. **Resolve** with `fix`, `supersede`, `acknowledge`, or `dismiss` — plus two gates: `harden` (PreToolUse will block) and `soften` (back to a warning)
|
|
140
106
|
|
|
141
107
|
The **make-or-break rule**: a divergence accounted for by a recorded resolution (supersede/fix/acknowledge) is NOT drift. Only unaccounted gaps are flagged. This means intentional evolution stays quiet while silent abandonment gets caught.
|
|
142
108
|
|
|
@@ -153,6 +119,57 @@ Anchors are classified into four species with different display formats:
|
|
|
153
119
|
|
|
154
120
|
---
|
|
155
121
|
|
|
122
|
+
<a id="the-map"></a>
|
|
123
|
+
|
|
124
|
+
## 🗺️ The Map — `linksee-memory-map`
|
|
125
|
+
|
|
126
|
+
Drift detection (above) checks individual anchors. The **Map** lifts it to the whole product: a `map.yaml` describing how value reaches your user (`discover → understand → try → adopt → retain → monetize → expand`), with typed dependencies between the pieces — README, npm listing, onboarding, the engine that powers them. The reconciler checks that map against your real code, and the CLI answers the question an engineer actually has:
|
|
127
|
+
|
|
128
|
+
> *I'm touching this file — where is it on the map, and what else must move?*
|
|
129
|
+
|
|
130
|
+
**1. Where am I?** — locate a file (or, with no argument, infer from your recent edits):
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
$ linksee-memory-map where README.md
|
|
134
|
+
"README.md" belongs to this Map node:
|
|
135
|
+
|
|
136
|
+
readme [understand] convergence
|
|
137
|
+
changes ripple to:
|
|
138
|
+
must fix together (hard): lp, docs-site
|
|
139
|
+
should align (soft): onboarding, client-configs
|
|
140
|
+
fyi (may ripple): telemetry-contract
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The blast radius is **graded** — `must fix together` vs `should align` vs `fyi` — so a wide ripple isn't flat noise.
|
|
144
|
+
|
|
145
|
+
**2. Why is it in this state?** — the diagnosis, with file:line evidence:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
$ linksee-memory-map explain readme
|
|
149
|
+
|
|
150
|
+
STATUS
|
|
151
|
+
declared: healthy (active)
|
|
152
|
+
reality: implemented / matches
|
|
153
|
+
verdict: declared and reality agree (verified)
|
|
154
|
+
|
|
155
|
+
EVIDENCE
|
|
156
|
+
✓ README's Tools section lists where_am_i
|
|
157
|
+
README.md:424 — found "where_am_i" in section "Tools"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Declared state and the reality verdict are shown **separately** — a hand-declared `suspect` the scanner refutes reads as *"declared suspect, refuted by reality (→ convergence)"*, not a confusing mix.
|
|
161
|
+
|
|
162
|
+
**3. Whole-project triage:** `linksee-memory-map status` — a health %, what is *fixable now in code* vs *external checks*, and any deferral with no expiry (so "accounted-for" can't quietly become a drift graveyard).
|
|
163
|
+
|
|
164
|
+
**How it works**
|
|
165
|
+
- **`map.yaml`** (repo root) is the desired-state source of truth: a journey spine × surface/implementation layers × typed edges (`must-stay-consistent-with` / `should-align-with` / `realizes`).
|
|
166
|
+
- **`reconcile`** checks each node's declared `reality` against the code (`signal` / `regex` / `section_contains` / file checks) and overlays a verdict — reality overrides what you hand-declared, with evidence.
|
|
167
|
+
- `where_am_i` is also an **MCP tool**, so a coding agent can re-anchor itself mid-task.
|
|
168
|
+
|
|
169
|
+
Commands: `where` · `affects` · `explain` · `status` · `next` · `reconcile` · `inspect --json` · `blueprint`. Add `--lang ja` for Japanese labels.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
156
173
|
<a id="reinjection-guard"></a>
|
|
157
174
|
|
|
158
175
|
## 🛡 Re-injection Guard — enforce decisions *before* the action
|
|
@@ -201,6 +218,55 @@ It's **project-scoped on purpose** — the guard enforces *this* repo's decision
|
|
|
201
218
|
|
|
202
219
|
---
|
|
203
220
|
|
|
221
|
+
## What it does
|
|
222
|
+
|
|
223
|
+
Most "agent memory" services (Mem0, Letta, Zep) save a flat list of facts. Then the agent looks at "edited file X 30 times" and has no idea why. And none of them notice when this week's work contradicts last week's decision. **linksee-memory keeps the WHY — and watches the drift.**
|
|
224
|
+
|
|
225
|
+
It is a Model Context Protocol (MCP) server with **11 tools** that gives any AI agent structured memory + drift detection:
|
|
226
|
+
|
|
227
|
+
| | Mem0 / Letta / Zep | Claude Code auto-memory | linksee-memory |
|
|
228
|
+
|---|---|---|---|
|
|
229
|
+
| **Drift detection** | ❌ | ❌ | ✅ intent ↔ reality divergence tracking |
|
|
230
|
+
| Cross-agent | △ (cloud) | ❌ Claude only | ✅ single SQLite file |
|
|
231
|
+
| 6-layer WHY structure | ❌ flat | ❌ flat markdown | ✅ goal / context / emotion / impl / caveat / learning |
|
|
232
|
+
| File diff cache | ❌ | ❌ | ✅ AST-aware, 50-99% token savings on re-reads |
|
|
233
|
+
| Active forgetting | △ | ❌ | ✅ Ebbinghaus curve, caveat layer protected |
|
|
234
|
+
| Local-first / private | ❌ | ✅ | ✅ |
|
|
235
|
+
|
|
236
|
+
## Four pillars
|
|
237
|
+
|
|
238
|
+
1. **Drift detection** — declare decisions as anchors, then the engine automatically detects when committed reality diverges from stated intent. Think "Datadog for product decisions" — unaccounted divergences surface as drift, intentional evolution (recorded as supersede/fix) stays quiet.
|
|
239
|
+
2. **Cross-agent portability** — single SQLite file at `~/.linksee-memory/memory.db`. Same brain for Claude Code, Cursor, Windsurf, OpenAI Codex, Gemini CLI.
|
|
240
|
+
3. **WHY-first structured memory** — six explicit layers (`goal` / `context` / `emotion` / `implementation` / `caveat` / `learning`). Solves "flat fact memory is useless without goals".
|
|
241
|
+
4. **Token savings** via `read_smart` — sha256 + AST/heading/indent chunking. Re-reads return only diffs. **Measured 86% saved on a typical TS file edit, 99% saved on unchanged re-reads.**
|
|
242
|
+
|
|
243
|
+
## 🧠 The 6-layer structure
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
247
|
+
│ 🎯 goal ← what the user is working toward │
|
|
248
|
+
├─────────────────────────────────────────────────────────────┤
|
|
249
|
+
│ 🧭 context ← why this, why now — constraints, people │
|
|
250
|
+
├─────────────────────────────────────────────────────────────┤
|
|
251
|
+
│ 💗 emotion ← user tone signals (frustration, etc.) │
|
|
252
|
+
├─────────────────────────────────────────────────────────────┤
|
|
253
|
+
│ 🛠 implementation ← how it was done (+ what failed) │
|
|
254
|
+
├─────────────────────────────────────────────────────────────┤
|
|
255
|
+
│ ⚠️ caveat ← "never do this again" · auto-protected │
|
|
256
|
+
├─────────────────────────────────────────────────────────────┤
|
|
257
|
+
│ 🌱 learning ← patterns distilled from cold memories │
|
|
258
|
+
└─────────────────────────────────────────────────────────────┘
|
|
259
|
+
│
|
|
260
|
+
▼
|
|
261
|
+
Ranked recall via relevance × heat × momentum × importance
|
|
262
|
+
Returns match_reasons explaining each hit
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Every memory is tagged with **exactly one layer**. `caveat`-layer entries are protected from auto-forgetting. Cold low-importance memories are auto-consolidated into `learning` entries on server startup.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
|
|
204
270
|
## Quick Start — One Command
|
|
205
271
|
|
|
206
272
|
```bash
|
|
@@ -388,7 +454,7 @@ Default: `~/.linksee-memory/memory.db`. Override with `LINKSEE_MEMORY_DIR` env v
|
|
|
388
454
|
|
|
389
455
|
</details>
|
|
390
456
|
|
|
391
|
-
##
|
|
457
|
+
## 11 Tools
|
|
392
458
|
|
|
393
459
|
### Memory tools
|
|
394
460
|
|
|
@@ -406,8 +472,17 @@ Default: `~/.linksee-memory/memory.db`. Override with `LINKSEE_MEMORY_DIR` env v
|
|
|
406
472
|
| `check_decision` | **Deep-dive into a specific decision.** Returns the full context: what was decided, why, what reality says, pending candidates, and drift edges. |
|
|
407
473
|
| `declare_anchor` | **Record a decision as a truth-map anchor.** The drift detector checks these against committed reality. Supports v9 fields (domain, confidence, lifecycle, review_after). |
|
|
408
474
|
| `resolve_drift` | **Close the loop.** Record a resolution: `fix` (reality now matches), `supersede` (intent evolved), `acknowledge` (parking with review date), or `dismiss` (false positive). |
|
|
475
|
+
| `where_am_i` | **"Where on the Map am I, and what else does this touch?"** Locates the current topic/file on the Current Truth Map and returns its journey stage + blast radius (the `must-stay-consistent-with` / `should-align-with` dependents) + the decision behind it. The per-turn re-anchor that stops you optimizing one node while silently breaking its neighbors. |
|
|
476
|
+
|
|
477
|
+
### Fork-point tools (v0.10)
|
|
409
478
|
|
|
410
|
-
|
|
479
|
+
| Tool | What it does |
|
|
480
|
+
|---|---|
|
|
481
|
+
| `flag_proposals` | **Record orphaned proposals** — options you presented that the user never addressed. Conversations are tree-shaped but experienced linearly; the branches nobody engaged with become unresolved fork points that both you and the user lose track of. |
|
|
482
|
+
| `dream` | **Consolidate orphaned proposals against the North Star.** Returns the project's direction/goals/ICP alongside unresolved proposals; the evaluating agent decides per candidate: surface (genuinely important fork) or dismiss (outdated / irrelevant / implicitly resolved). |
|
|
483
|
+
| `resolve_proposal` | **Record the verdict** for each dreamed proposal: `surface` (keep visible on the dashboard for human decision) or `dismiss` (remove from the dashboard). |
|
|
484
|
+
|
|
485
|
+
Previous versions exposed 3 tools — v0.8.0 added 4 drift tools that let agents query and act on product-level intent ↔ reality divergence; v0.10 added the fork-point trio for orphaned-proposal triage; `where_am_i` adds the Current Truth Map's per-turn positional re-anchor. The memory tools are unchanged.
|
|
411
486
|
|
|
412
487
|
### CLI utilities
|
|
413
488
|
|
|
@@ -700,6 +775,15 @@ After install, in a new Claude session ask: *"Can you remember that I prefer Typ
|
|
|
700
775
|
|
|
701
776
|
## Changelog
|
|
702
777
|
|
|
778
|
+
### v0.11.0 — The Map: `where_am_i` + `linksee-memory-map` (2026-06-15)
|
|
779
|
+
|
|
780
|
+
**Memory is the entry point; the product map is the new surface.** Drift detection grows up from individual anchors into a whole-product map you navigate from the CLI.
|
|
781
|
+
|
|
782
|
+
- **`where_am_i`** (11th MCP tool) — locate the current topic/file on the Current Truth Map and get its blast radius. Call it with no args to auto-locate from your recent edits.
|
|
783
|
+
- **`linksee-memory-map`** CLI — `where` · `affects` · `explain` · `status` · `next` · `reconcile` · `inspect --json` · `blueprint`. A `map.yaml` (git source of truth) describes how value reaches your user; the reconciler checks it against your code with file:line evidence. Bilingual: add `--lang ja`.
|
|
784
|
+
- Graded blast radius (`must fix together` / `should align` / `fyi`), declared-vs-reality verdicts, and an anti-graveyard guard for accounted-for drift.
|
|
785
|
+
- Per-project keys so the Map handles many projects at once.
|
|
786
|
+
|
|
703
787
|
### v0.8.0 — Drift Detection MCP Tools (2026-06-08)
|
|
704
788
|
|
|
705
789
|
**3 tools → 7 tools.** The biggest update since launch — agents can now detect, query, and resolve intent ↔ reality drift.
|
|
@@ -16,10 +16,10 @@ import { extractSession } from '../lib/session-extractor.js';
|
|
|
16
16
|
import { normalizeEntityName } from '../lib/normalize.js';
|
|
17
17
|
const CLAUDE_PROJECTS = join(homedir(), '.claude', 'projects');
|
|
18
18
|
function usage() {
|
|
19
|
-
console.log(`Usage:
|
|
20
|
-
node dist/bin/import-sessions.js [--dry-run] [--all | <projectDir> [<projectDir> ...]]
|
|
21
|
-
--all : scan every project under ~/.claude/projects/*
|
|
22
|
-
--dry-run : parse + extract but do not write to DB
|
|
19
|
+
console.log(`Usage:
|
|
20
|
+
node dist/bin/import-sessions.js [--dry-run] [--all | <projectDir> [<projectDir> ...]]
|
|
21
|
+
--all : scan every project under ~/.claude/projects/*
|
|
22
|
+
--dry-run : parse + extract but do not write to DB
|
|
23
23
|
projectDir : absolute path to a project dir (must contain *.jsonl files)`);
|
|
24
24
|
}
|
|
25
25
|
function collectJsonlFiles(projectDir) {
|
|
@@ -48,7 +48,7 @@ function collectJsonlFiles(projectDir) {
|
|
|
48
48
|
function wipeSession(db, sessionId) {
|
|
49
49
|
const sidNeedle = `%"session_id":"${sessionId}"%`;
|
|
50
50
|
const editDel = db.prepare('DELETE FROM session_file_edits WHERE session_id = ?').run(sessionId);
|
|
51
|
-
const memDel = db.prepare(`DELETE FROM memories WHERE source LIKE ?
|
|
51
|
+
const memDel = db.prepare(`DELETE FROM memories WHERE source LIKE ?
|
|
52
52
|
AND (NOT json_valid(content) OR COALESCE(json_extract(content, '$.distilled'), 0) != 1)`).run(sidNeedle);
|
|
53
53
|
const evtDel = db.prepare('DELETE FROM events WHERE payload LIKE ?').run(sidNeedle);
|
|
54
54
|
return { memories: memDel.changes, edits: editDel.changes, events: evtDel.changes };
|
|
@@ -56,7 +56,7 @@ function wipeSession(db, sessionId) {
|
|
|
56
56
|
// A re-extracted memory must NOT be re-inserted if its source turn already has a surviving
|
|
57
57
|
// distilled rewrite (matched by turn_uuid — the stable key shared by raw and rewrite).
|
|
58
58
|
function makeDistilledTurnSet(db, sessionId) {
|
|
59
|
-
const rows = db.prepare(`SELECT source FROM memories
|
|
59
|
+
const rows = db.prepare(`SELECT source FROM memories
|
|
60
60
|
WHERE source LIKE ? AND json_valid(content) AND json_extract(content, '$.distilled') = 1`).all(`%"session_id":"${sessionId}"%`);
|
|
61
61
|
const set = new Set();
|
|
62
62
|
for (const r of rows) {
|
|
@@ -21,20 +21,20 @@ const force = args.includes('--force') || args.includes('-f');
|
|
|
21
21
|
const dryRun = args.includes('--dry-run');
|
|
22
22
|
const showHelp = args.includes('--help') || args.includes('-h');
|
|
23
23
|
if (showHelp) {
|
|
24
|
-
console.log(`linksee-memory-install-skill
|
|
25
|
-
|
|
26
|
-
Install the linksee-memory Claude Code skill into ~/.claude/skills/linksee-memory/.
|
|
27
|
-
|
|
28
|
-
Options:
|
|
29
|
-
--force, -f Overwrite an existing skill file
|
|
30
|
-
--dry-run Show what would happen without writing
|
|
31
|
-
--help, -h This message
|
|
32
|
-
|
|
33
|
-
After installation, ensure the MCP server is registered in Claude Code:
|
|
34
|
-
claude mcp add -s user linksee -- npx -y linksee-memory
|
|
35
|
-
|
|
36
|
-
The skill expects tool names of the form mcp__linksee__*. If you register the
|
|
37
|
-
server under a different name (e.g. "linksee-memory"), edit the skill file
|
|
24
|
+
console.log(`linksee-memory-install-skill
|
|
25
|
+
|
|
26
|
+
Install the linksee-memory Claude Code skill into ~/.claude/skills/linksee-memory/.
|
|
27
|
+
|
|
28
|
+
Options:
|
|
29
|
+
--force, -f Overwrite an existing skill file
|
|
30
|
+
--dry-run Show what would happen without writing
|
|
31
|
+
--help, -h This message
|
|
32
|
+
|
|
33
|
+
After installation, ensure the MCP server is registered in Claude Code:
|
|
34
|
+
claude mcp add -s user linksee -- npx -y linksee-memory
|
|
35
|
+
|
|
36
|
+
The skill expects tool names of the form mcp__linksee__*. If you register the
|
|
37
|
+
server under a different name (e.g. "linksee-memory"), edit the skill file
|
|
38
38
|
afterwards.`);
|
|
39
39
|
process.exit(0);
|
|
40
40
|
}
|