mindlink 1.1.5 → 2.0.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/README.md +37 -7
- package/commands/diff.md +115 -0
- package/commands/index.md +12 -0
- package/commands/init.md +26 -1
- package/commands/mcp.md +126 -0
- package/commands/profile.md +104 -0
- package/commands/prune.md +117 -0
- package/commands/update.md +23 -5
- package/commands/verify.md +122 -0
- package/dist/chunk-2H7UOFLK.js +11 -0
- package/dist/chunk-2H7UOFLK.js.map +1 -0
- package/dist/cli.js +1566 -118
- package/dist/cli.js.map +1 -1
- package/dist/templates/agents/.clinerules +13 -2
- package/dist/templates/agents/.rules +84 -0
- package/dist/templates/agents/.windsurfrules +17 -6
- package/dist/templates/agents/AGENTS.md +13 -2
- package/dist/templates/agents/CLAUDE.md +18 -7
- package/dist/templates/agents/CONVENTIONS.md +13 -2
- package/dist/templates/agents/CURSOR.md +17 -6
- package/dist/templates/agents/GEMINI.md +13 -2
- package/dist/templates/agents/continue-rules.md +89 -0
- package/dist/templates/agents/copilot-instructions.md +17 -6
- package/dist/templates/agents/kiro-steering.md +88 -0
- package/dist/templates/agents/trae-rules.md +89 -0
- package/dist/templates/hooks/claude-settings.json +6 -0
- package/dist/zod-FDOV7Y2P.js +14016 -0
- package/dist/zod-FDOV7Y2P.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -18,11 +18,13 @@ Git gave every developer a shared version history. MindLink gives your AI team a
|
|
|
18
18
|
[](LICENSE)
|
|
19
19
|
[](#installation)
|
|
20
20
|
|
|
21
|
+

|
|
22
|
+
|
|
21
23
|
---
|
|
22
24
|
|
|
23
|
-
> ### ◉ Latest —
|
|
24
|
-
> **
|
|
25
|
-
> [→ Full release notes](https://github.com/404-not-found/mindlink/releases/tag/
|
|
25
|
+
> ### ◉ Latest — v2.0.0
|
|
26
|
+
> **MCP integration for 6 agents · Smart loading · `mindlink verify` · `mindlink profile` · `mindlink prune`**
|
|
27
|
+
> [→ Full release notes](https://github.com/404-not-found/mindlink/releases/tag/v2.0.0)
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
|
@@ -34,6 +36,7 @@ Git gave every developer a shared version history. MindLink gives your AI team a
|
|
|
34
36
|
- [Supported Agents](#supported-agents)
|
|
35
37
|
- [Commands](#commands)
|
|
36
38
|
- [Can My AI Run These Commands?](#can-my-ai-run-these-commands-itself)
|
|
39
|
+
- [What's New in v2.0](#whats-new-in-v20)
|
|
37
40
|
- [Best with Claude Code](#best-with-claude-code)
|
|
38
41
|
- [License](#license)
|
|
39
42
|
- [Contributing](#contributing)
|
|
@@ -118,6 +121,10 @@ MindLink works with any version of:
|
|
|
118
121
|
| Windsurf | `.windsurfrules` |
|
|
119
122
|
| Cline | `.clinerules` |
|
|
120
123
|
| Aider | `CONVENTIONS.md` |
|
|
124
|
+
| Zed | `.rules` |
|
|
125
|
+
| Kiro | `.kiro/steering/mindlink.md` |
|
|
126
|
+
| Continue.dev | `.continue/rules/mindlink.md` |
|
|
127
|
+
| Trae | `.trae/rules/mindlink.md` |
|
|
121
128
|
|
|
122
129
|
MindLink works by writing instruction files that agents read at startup — no API calls, no SDKs, no version pinning. It works with whatever version you have today and any version released tomorrow. If your agent isn't listed, `mindlink init` lets you add a custom one.
|
|
123
130
|
|
|
@@ -128,7 +135,7 @@ MindLink works by writing instruction files that agents read at startup — no A
|
|
|
128
135
|
**Run once per project — in your terminal, inside the project directory:**
|
|
129
136
|
```bash
|
|
130
137
|
cd my-project
|
|
131
|
-
mindlink init # creates .brain/ here —
|
|
138
|
+
mindlink init # creates .brain/ here — pre-filled from your project on day 1
|
|
132
139
|
```
|
|
133
140
|
|
|
134
141
|
**Ask your AI to run these, or run them yourself in any terminal:**
|
|
@@ -136,6 +143,7 @@ mindlink init # creates .brain/ here — this is where your AI's memory l
|
|
|
136
143
|
mindlink status # what happened last session, what's next
|
|
137
144
|
mindlink summary # full briefing — everything your AI knows, in one view
|
|
138
145
|
mindlink log # complete session history
|
|
146
|
+
mindlink diff # what changed in .brain/ since last session
|
|
139
147
|
mindlink sync --once # check what other sessions have shared
|
|
140
148
|
```
|
|
141
149
|
|
|
@@ -160,8 +168,11 @@ mindlink import # unzip into this project — merge or overwrite your exist
|
|
|
160
168
|
|
|
161
169
|
**Run in your terminal only — maintenance tasks:**
|
|
162
170
|
```bash
|
|
171
|
+
mindlink verify # check that .brain/ memory is healthy and up to date
|
|
172
|
+
mindlink prune # review and retire stale MEMORY.md entries
|
|
173
|
+
mindlink profile # manage your global user profile (imported into every new project)
|
|
163
174
|
mindlink doctor # health check — verify your setup is working correctly
|
|
164
|
-
mindlink update # check for a newer version,
|
|
175
|
+
mindlink update # check for a newer version, refreshes agent files in all projects
|
|
165
176
|
mindlink uninstall # remove MindLink from this project
|
|
166
177
|
```
|
|
167
178
|
|
|
@@ -173,9 +184,11 @@ Every command supports `--help`. Full CLI reference: [commands/](commands/index.
|
|
|
173
184
|
|
|
174
185
|
Yes — and it should, for the read-only ones. Your AI has a terminal. Tell it to run `mindlink summary` or `mindlink status` and it reads the output directly. This is the cleanest way to brief a mid-session agent without copying files around.
|
|
175
186
|
|
|
176
|
-
**AI can run:** `status`, `summary`, `log`, `sync --once`
|
|
187
|
+
**AI can run:** `status`, `summary`, `log`, `diff`, `sync --once`, `verify`
|
|
188
|
+
|
|
189
|
+
**Run yourself:** `init`, `clear`, `reset`, `config`, `profile`, `prune`, `export`, `import`, `update`, `uninstall` — these are interactive, change settings, or modify files. Keep human hands on them.
|
|
177
190
|
|
|
178
|
-
**
|
|
191
|
+
**Launched automatically (not by hand):** `mcp` — started by Claude Code, Cursor, and other MCP-capable agents as a background process. Never run this yourself.
|
|
179
192
|
|
|
180
193
|
The one exception: `mindlink sync` in watch mode runs continuously — keep it in a separate terminal tab.
|
|
181
194
|
|
|
@@ -201,9 +214,26 @@ Claude Code gets both the instruction file **and** an OS-level hook that fires b
|
|
|
201
214
|
| Enforced on every message | ✗ | ✓ OS-level hook |
|
|
202
215
|
| Post-response memory verification | ✗ | ✓ shell check |
|
|
203
216
|
| Context compaction recovery | ✓ instruction | ✓ instruction + hook |
|
|
217
|
+
| MCP tool integration | ✓ Cursor, Continue, Copilot, Kiro, Windsurf | ✓ Claude Code |
|
|
204
218
|
|
|
205
219
|
If you're choosing an agent specifically to use with MindLink, Claude Code gives you the most reliable memory behavior. Other agents work well — Claude Code works harder.
|
|
206
220
|
|
|
221
|
+
**v2.0: MCP support for more agents.** Cursor, Continue.dev, GitHub Copilot, Kiro, and Windsurf now also get an MCP server configured automatically on `mindlink init`. This gives those agents structured, schema-validated reads and writes instead of raw file operations — the same feedback loop Claude Code users have had since v1.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## What's New in v2.0
|
|
226
|
+
|
|
227
|
+
**MCP integration — structured, auditable memory operations.** `mindlink mcp` is a stdio MCP server. `mindlink init` configures it automatically for Claude Code, Cursor, Continue.dev, GitHub Copilot, Kiro, and Windsurf. Agents call `mindlink_read_memory()`, `mindlink_write_memory()`, and `mindlink_session_update()` as proper tool calls — with structured inputs, structured results, and a verify loop to confirm writes actually landed.
|
|
228
|
+
|
|
229
|
+
**Smart loading — only load what you need.** Agent templates now load Core + User Profile only by default. Architecture, Decisions, Conventions, and Important Context sections are loaded on demand, based on what the agent is about to do. Less context used per session; faster session starts.
|
|
230
|
+
|
|
231
|
+
**`mindlink verify` — memory health check.** Scans `.brain/` and reports: is Core filled? Is SESSION.md fresh? Is MEMORY.md under the size limit? Is every agent file present? Flags errors and warnings. `--fix` auto-regenerates missing agent files.
|
|
232
|
+
|
|
233
|
+
**`mindlink profile` — global user profile.** Write once in `~/.mindlink/USER.md`, automatically imported into every new project. Tells your AI who you are, how you like to work, and what your preferences are — without re-explaining it in every project.
|
|
234
|
+
|
|
235
|
+
**`mindlink prune` — retire stale memory.** Reviews every timestamped entry in MEMORY.md and asks: keep, archive, or delete? Entries past their freshness threshold are surfaced first. `--dry-run` shows what would be flagged without touching anything.
|
|
236
|
+
|
|
207
237
|
---
|
|
208
238
|
|
|
209
239
|
## License
|
package/commands/diff.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# mindlink diff
|
|
2
|
+
|
|
3
|
+
Show what changed in `.brain/` since the current session started.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Synopsis
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mindlink diff [--since <ref>] [--json]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Shows a per-file summary of `.brain/` changes since the session began — which files were modified, how many lines they contain, and when they were last touched.
|
|
18
|
+
|
|
19
|
+
If `.brain/` is committed to git, `mindlink diff` also shows line-level additions and removals so you can see exactly what the AI wrote.
|
|
20
|
+
|
|
21
|
+
This command is useful for:
|
|
22
|
+
- Verifying that your AI actually wrote to MEMORY.md during the session (not just claimed to)
|
|
23
|
+
- Reviewing what context was captured before closing a session
|
|
24
|
+
- Debugging why a follow-up session is missing context
|
|
25
|
+
|
|
26
|
+
**Your AI can run this.** Ask it to run `mindlink diff` to check its own work.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Output
|
|
31
|
+
|
|
32
|
+
**Without git tracking:**
|
|
33
|
+
```
|
|
34
|
+
.brain/ changes
|
|
35
|
+
Session started 12m ago
|
|
36
|
+
.brain/ is not git-tracked — showing modification times only
|
|
37
|
+
|
|
38
|
+
● MEMORY.md 94 lines · modified 3m ago
|
|
39
|
+
○ SESSION.md 32 lines · modified 12m ago
|
|
40
|
+
○ LOG.md 24 lines · modified 12m ago
|
|
41
|
+
○ SHARED.md 21 lines · modified 12m ago
|
|
42
|
+
|
|
43
|
+
✓ 1 file updated this session.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`●` = modified this session · `○` = not modified this session
|
|
47
|
+
|
|
48
|
+
**With git tracking (`.brain/` committed):**
|
|
49
|
+
```
|
|
50
|
+
.brain/ changes
|
|
51
|
+
Session started 12m ago
|
|
52
|
+
Git diff against: HEAD~1
|
|
53
|
+
|
|
54
|
+
● MEMORY.md 97 lines · modified 3m ago
|
|
55
|
+
+ TypeScript + Node.js <!-- added: 2026-04-12 -->
|
|
56
|
+
+ Use mtime-based session verification for Stop hook
|
|
57
|
+
|
|
58
|
+
○ SESSION.md 32 lines · modified 12m ago
|
|
59
|
+
no changes since last commit
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Options
|
|
65
|
+
|
|
66
|
+
| Flag | Description |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `--since <ref>` | Git ref or date to diff against. Default: `HEAD~1`. Examples: `HEAD~3`, `"2026-04-10"` |
|
|
69
|
+
| `--json` | Output as JSON — useful for scripting or AI consumption |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Examples
|
|
74
|
+
|
|
75
|
+
**Check what changed this session:**
|
|
76
|
+
```bash
|
|
77
|
+
mindlink diff
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Diff against 3 commits ago:**
|
|
81
|
+
```bash
|
|
82
|
+
mindlink diff --since HEAD~3
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Machine-readable output:**
|
|
86
|
+
```bash
|
|
87
|
+
mindlink diff --json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## JSON Output
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"MEMORY.md": {
|
|
97
|
+
"exists": true,
|
|
98
|
+
"mtime": 1776041234567,
|
|
99
|
+
"sizeLines": 97,
|
|
100
|
+
"added": ["TypeScript + Node.js"],
|
|
101
|
+
"removed": []
|
|
102
|
+
},
|
|
103
|
+
"SESSION.md": { "exists": true, "mtime": 1776041117345, "sizeLines": 32, "added": [], "removed": [] },
|
|
104
|
+
"LOG.md": { "exists": true, "mtime": 1776041117346, "sizeLines": 24, "added": [], "removed": [] },
|
|
105
|
+
"SHARED.md": { "exists": true, "mtime": 1776041117346, "sizeLines": 21, "added": [], "removed": [] }
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Related Commands
|
|
112
|
+
|
|
113
|
+
- [`mindlink status`](status.md) — high-level view of current session state
|
|
114
|
+
- [`mindlink summary`](summary.md) — full contents of all `.brain/` files in one view
|
|
115
|
+
- [`mindlink clear`](clear.md) — reset SESSION.md for a fresh start
|
package/commands/index.md
CHANGED
|
@@ -22,6 +22,8 @@ Commands are grouped by when and how you run them.
|
|
|
22
22
|
| [status](status.md) | Show last session summary and what's next |
|
|
23
23
|
| [summary](summary.md) | Full briefing — everything MindLink knows, in one view |
|
|
24
24
|
| [log](log.md) | View full session history |
|
|
25
|
+
| [diff](diff.md) | Show what changed in `.brain/` since the current session started |
|
|
26
|
+
| [verify](verify.md) | Health check — are memory files filled in and up to date? |
|
|
25
27
|
|
|
26
28
|
### Keep running in a background terminal tab (while sessions are active)
|
|
27
29
|
|
|
@@ -31,6 +33,14 @@ Commands are grouped by when and how you run them.
|
|
|
31
33
|
|
|
32
34
|
`mindlink sync` runs in **watch mode by default** — it stays alive and prints a notification whenever another session appends to `.brain/SHARED.md`. Use `--once` to check a single time and exit.
|
|
33
35
|
|
|
36
|
+
### Launched automatically by Claude Code — not by hand
|
|
37
|
+
|
|
38
|
+
| Command | Description |
|
|
39
|
+
|---|---|
|
|
40
|
+
| [mcp](mcp.md) | Start the MindLink MCP server (stdio transport for AI tool integration) |
|
|
41
|
+
|
|
42
|
+
`mindlink mcp` is started automatically when Claude Code launches a session. It exposes 4 MCP tools (`mindlink_read_memory`, `mindlink_write_memory`, `mindlink_session_update`, `mindlink_verify`) for schema-validated memory reads and writes.
|
|
43
|
+
|
|
34
44
|
### Run in your terminal between sessions — not via AI
|
|
35
45
|
|
|
36
46
|
These commands are interactive, change settings, or modify files. Keep human hands on them.
|
|
@@ -52,6 +62,8 @@ These commands are interactive, change settings, or modify files. Keep human han
|
|
|
52
62
|
|
|
53
63
|
| Command | Description |
|
|
54
64
|
|---|---|
|
|
65
|
+
| [profile](profile.md) | Manage your global user profile (auto-imported into every new project) |
|
|
66
|
+
| [prune](prune.md) | Review and retire stale MEMORY.md entries interactively |
|
|
55
67
|
| [update](update.md) | Check for a newer version — never installs without asking |
|
|
56
68
|
| [uninstall](uninstall.md) | Remove MindLink from the current project |
|
|
57
69
|
|
package/commands/init.md
CHANGED
|
@@ -18,6 +18,8 @@ Creates a `.brain/` folder in the current directory and generates agent instruct
|
|
|
18
18
|
|
|
19
19
|
**Run this before starting your AI session.** The agent reads the instruction files on startup. If you init after a session has already started, the current session won't see it — the next one will.
|
|
20
20
|
|
|
21
|
+
**MEMORY.md is pre-filled on day 1.** `mindlink init` scans your project and auto-populates the Core section with what it finds: project name and description from `package.json`, detected tech stack, top-level directory structure, and recent git commits. Your first AI session starts already briefed — no manual setup required.
|
|
22
|
+
|
|
21
23
|
---
|
|
22
24
|
|
|
23
25
|
## What Gets Created
|
|
@@ -56,6 +58,10 @@ Select the agents you use in this project. MindLink generates the right instruct
|
|
|
56
58
|
| Windsurf | `.windsurfrules` |
|
|
57
59
|
| Cline | `.clinerules` |
|
|
58
60
|
| Aider | `CONVENTIONS.md` |
|
|
61
|
+
| Zed | `.rules` |
|
|
62
|
+
| Kiro | `.kiro/steering/mindlink.md` |
|
|
63
|
+
| Continue.dev | `.continue/rules/mindlink.md` |
|
|
64
|
+
| Trae | `.trae/rules/mindlink.md` |
|
|
59
65
|
| Add custom agent | file name of your choice |
|
|
60
66
|
|
|
61
67
|
**To change this later:** `mindlink config` → Agent instruction files
|
|
@@ -105,7 +111,7 @@ mindlink init --yes
|
|
|
105
111
|
|
|
106
112
|
## Already Initialized
|
|
107
113
|
|
|
108
|
-
If `.brain/` already exists
|
|
114
|
+
If `.brain/` already exists **and agent files are present**, `mindlink init` shows a recovery menu:
|
|
109
115
|
|
|
110
116
|
```
|
|
111
117
|
.brain/ already exists at this path. What would you like to do?
|
|
@@ -118,6 +124,25 @@ With `--yes`, exits immediately and tells you to run `mindlink config` to change
|
|
|
118
124
|
|
|
119
125
|
---
|
|
120
126
|
|
|
127
|
+
## Team Onboarding Mode
|
|
128
|
+
|
|
129
|
+
If `.brain/` exists with real memory content **but no agent instruction files** — the typical state after `git pull` on a team project — `mindlink init` detects this automatically and offers a lighter flow:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
◉ MindLink memory found in this project.
|
|
133
|
+
MEMORY.md has content — this looks like a team project.
|
|
134
|
+
|
|
135
|
+
❯ Set up agent files recommended for new team members
|
|
136
|
+
Full re-init recreate everything, reconfigure settings
|
|
137
|
+
Cancel
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**"Set up agent files"** skips all configuration prompts and writes only the instruction files (CLAUDE.md, .cursorrules, etc.) for the agents you select. The existing `.brain/` memory, session state, and config are untouched. Your AI is immediately briefed from the team's shared memory.
|
|
141
|
+
|
|
142
|
+
This is the intended workflow for new team members joining a project that already uses MindLink.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
121
146
|
## Related Commands
|
|
122
147
|
|
|
123
148
|
- [`mindlink config`](config.md) — change any setting made during init
|
package/commands/mcp.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# mindlink mcp
|
|
2
|
+
|
|
3
|
+
Start the MindLink MCP server for AI tool integration.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Synopsis
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mindlink mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
`mindlink mcp` starts a local [Model Context Protocol](https://modelcontextprotocol.io) server over stdio. It exposes 4 tools that AI agents (like Claude Code) can call to read and write memory with schema validation and structured responses.
|
|
18
|
+
|
|
19
|
+
This command is **launched automatically** by Claude Code — you do not need to run it yourself. When you run `mindlink init` and select Claude Code, MindLink adds the MCP server entry to `.claude/settings.json` so Claude Code starts it on every session.
|
|
20
|
+
|
|
21
|
+
**Why MCP?**
|
|
22
|
+
- **Schema-validated writes** — the AI can't accidentally overwrite the wrong section
|
|
23
|
+
- **Structured reads** — returns only the sections needed for the current task (token-efficient)
|
|
24
|
+
- **Verify loop** — the AI can call `mindlink_verify()` after writing to confirm the write succeeded
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Tools
|
|
29
|
+
|
|
30
|
+
### `mindlink_read_memory(section?)`
|
|
31
|
+
|
|
32
|
+
Read a section of this project's `MEMORY.md`.
|
|
33
|
+
|
|
34
|
+
- **No argument**: returns Core + User Profile only (the recommended default at session start)
|
|
35
|
+
- **With section**: returns just that section
|
|
36
|
+
|
|
37
|
+
| Section value | Content |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `Core` | Project identity, stack, top decisions |
|
|
40
|
+
| `Architecture` | System design decisions |
|
|
41
|
+
| `Decisions` | Key choices made and why |
|
|
42
|
+
| `Conventions` | Team patterns and coding standards |
|
|
43
|
+
| `User Profile` | Personal facts about the user |
|
|
44
|
+
| `Important Context` | Business context, deadlines, preferences |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### `mindlink_write_memory(section, content)`
|
|
49
|
+
|
|
50
|
+
Append a fact or decision to a section of `MEMORY.md`.
|
|
51
|
+
|
|
52
|
+
Never overwrites existing content — always appends. Always include a `<!-- added: YYYY-MM-DD -->` timestamp in the content.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### `mindlink_session_update(summary)`
|
|
57
|
+
|
|
58
|
+
Overwrite `SESSION.md` with a summary of the current session.
|
|
59
|
+
|
|
60
|
+
Call this as the **last action** of every response. SESSION.md is temporary; it gets cleared between sessions. MEMORY.md is permanent.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### `mindlink_verify()`
|
|
65
|
+
|
|
66
|
+
Run a health check on `.brain/`. Returns the same JSON as `mindlink verify --json`.
|
|
67
|
+
|
|
68
|
+
Use this after writing to confirm the write succeeded and memory is in good shape.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Configuration
|
|
73
|
+
|
|
74
|
+
`mindlink init` (with Claude Code selected) writes this to `.claude/settings.json`:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"mindlink": {
|
|
80
|
+
"command": "mindlink",
|
|
81
|
+
"args": ["mcp"],
|
|
82
|
+
"env": {
|
|
83
|
+
"MINDLINK_PROJECT_PATH": "/absolute/path/to/your/project"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The `MINDLINK_PROJECT_PATH` env var tells the MCP server which project's `.brain/` to use. If not set, the server walks up from the working directory looking for a `.brain/` folder.
|
|
91
|
+
|
|
92
|
+
`mindlink update` refreshes this entry in all registered projects whenever you update MindLink.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Project Resolution
|
|
97
|
+
|
|
98
|
+
The MCP server resolves the project root in this order:
|
|
99
|
+
|
|
100
|
+
1. `MINDLINK_PROJECT_PATH` environment variable (set by Claude Code via `settings.json`)
|
|
101
|
+
2. Walk up from the current working directory, looking for a `.brain/` folder (up to 10 levels)
|
|
102
|
+
|
|
103
|
+
If no project is found, all tool calls return an error with instructions to run `mindlink init`.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Examples
|
|
108
|
+
|
|
109
|
+
**See all available tools:**
|
|
110
|
+
```bash
|
|
111
|
+
mindlink mcp --help
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Ask your AI to run a memory health check:**
|
|
115
|
+
> "Run mindlink_verify and tell me if anything needs attention."
|
|
116
|
+
|
|
117
|
+
**Ask your AI to read a specific section:**
|
|
118
|
+
> "Call mindlink_read_memory with section 'Decisions' and summarize what decisions we've made."
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Related Commands
|
|
123
|
+
|
|
124
|
+
- [`mindlink init`](init.md) — sets up `.brain/` and writes the MCP server entry
|
|
125
|
+
- [`mindlink update`](update.md) — refreshes the MCP entry in all registered projects
|
|
126
|
+
- [`mindlink verify`](verify.md) — same health checks, available as a CLI command
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# mindlink profile
|
|
2
|
+
|
|
3
|
+
Manage your global user profile — imported into every new project automatically.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Synopsis
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mindlink profile [--show] [--path]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Your global user profile lives at `~/.mindlink/USER.md`. It stores personal facts about you — role, experience, preferences, communication style — that are true regardless of which project you're working in.
|
|
18
|
+
|
|
19
|
+
When you run `mindlink init` on a new project, your profile is automatically imported into the `## User Profile` section of `.brain/MEMORY.md`. Your AI starts the first session already knowing who you are.
|
|
20
|
+
|
|
21
|
+
When you run `mindlink update`, the profile is synced to all registered projects — any changes you make are propagated everywhere.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
**Open profile in your `$EDITOR`:**
|
|
28
|
+
```bash
|
|
29
|
+
mindlink profile
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Print profile to stdout:**
|
|
33
|
+
```bash
|
|
34
|
+
mindlink profile --show
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Print profile file path:**
|
|
38
|
+
```bash
|
|
39
|
+
mindlink profile --path
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Profile Format
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# MindLink — Global User Profile
|
|
48
|
+
|
|
49
|
+
> This file is imported into every new project's MEMORY.md on `mindlink init`.
|
|
50
|
+
> Edit it with `mindlink profile`. Run `mindlink update` to sync changes to all projects.
|
|
51
|
+
|
|
52
|
+
Senior full-stack engineer, 8 years. Primary: TypeScript, Python.
|
|
53
|
+
Prefers functional patterns, minimal abstraction.
|
|
54
|
+
Direct communication — skip preamble, lead with the answer.
|
|
55
|
+
macOS + zsh. Editor: VS Code + Claude Code.
|
|
56
|
+
<!-- added: 2026-04-13 -->
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Write anything your AI should know about you in plain Markdown. The more specific, the better — role, experience level, communication preferences, tools, and how you like problems explained.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## How It Works
|
|
64
|
+
|
|
65
|
+
1. **On `mindlink init`:** if `~/.mindlink/USER.md` exists with real content, it is injected into the `## User Profile` section of the new project's `MEMORY.md`.
|
|
66
|
+
2. **On `mindlink update`:** the current profile replaces the `## User Profile` section in all registered projects — keeping them in sync as your profile evolves.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Options
|
|
71
|
+
|
|
72
|
+
| Flag | Description |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `--show` | Print current profile to stdout instead of opening editor |
|
|
75
|
+
| `--path` | Print `~/.mindlink/USER.md` path only (for scripting) |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Examples
|
|
80
|
+
|
|
81
|
+
**Set up your profile for the first time:**
|
|
82
|
+
```bash
|
|
83
|
+
mindlink profile
|
|
84
|
+
# Opens $EDITOR (nano, vim, code, etc.) — write your facts, save and exit
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Sync changes to all registered projects:**
|
|
88
|
+
```bash
|
|
89
|
+
mindlink profile # edit and save
|
|
90
|
+
mindlink update # propagate to all projects
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Read profile in a script:**
|
|
94
|
+
```bash
|
|
95
|
+
cat "$(mindlink profile --path)"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Related Commands
|
|
101
|
+
|
|
102
|
+
- [`mindlink update`](update.md) — sync profile (and agent files) to all registered projects
|
|
103
|
+
- [`mindlink verify`](verify.md) — check that User Profile is filled in across projects
|
|
104
|
+
- [`mindlink init`](init.md) — sets up memory for a new project (imports profile)
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# mindlink prune
|
|
2
|
+
|
|
3
|
+
Review and retire stale MEMORY.md entries interactively.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Synopsis
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mindlink prune [--dry-run] [--all]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
MEMORY.md entries accumulate over time. A decision made six months ago that was later reversed, a "current focus" entry that describes work completed three months ago — these entries linger and degrade the quality of your AI's context.
|
|
18
|
+
|
|
19
|
+
`mindlink prune` surfaces entries by age and lets you decide what to do with each one. Entries can be kept, moved to an `## Archive` section, or permanently deleted.
|
|
20
|
+
|
|
21
|
+
**MindLink never auto-deletes content.** Archived entries are moved to `## Archive` at the bottom of MEMORY.md — they are always kept for reference unless you explicitly delete them.
|
|
22
|
+
|
|
23
|
+
Entries are identified by `<!-- added: YYYY-MM-DD -->` timestamps, which your AI appends to every new entry it writes.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Staleness Thresholds
|
|
28
|
+
|
|
29
|
+
| Section | Warn after |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `## Current Focus` | 14 days |
|
|
32
|
+
| `## Decisions` | 180 days |
|
|
33
|
+
| `## Conventions` | 180 days |
|
|
34
|
+
| `## Architecture` | 365 days |
|
|
35
|
+
| `## User Profile` | Never |
|
|
36
|
+
| `## Important Context` | Never |
|
|
37
|
+
|
|
38
|
+
Entries without a timestamp are not flagged (no reference date to compare against).
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Interactive Flow
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
◉ MindLink Prune
|
|
46
|
+
/Users/you/my-project/.brain/MEMORY.md
|
|
47
|
+
|
|
48
|
+
Scanning MEMORY.md for stale entries...
|
|
49
|
+
Found 2 entries to review.
|
|
50
|
+
|
|
51
|
+
───────────────────────────────────────────────────────
|
|
52
|
+
Section: Current Focus
|
|
53
|
+
Entry:
|
|
54
|
+
Building billing integration in src/api/billing.ts
|
|
55
|
+
Added: 2026-01-15 (87 days ago) — threshold: 14 days
|
|
56
|
+
|
|
57
|
+
❯ Keep (leave as-is)
|
|
58
|
+
Archive (move to ## Archive section)
|
|
59
|
+
Delete (remove permanently)
|
|
60
|
+
Skip remaining
|
|
61
|
+
|
|
62
|
+
───────────────────────────────────────────────────────
|
|
63
|
+
|
|
64
|
+
✓ 1 entry archived
|
|
65
|
+
· 1 entry kept
|
|
66
|
+
✓ MEMORY.md updated.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Options
|
|
72
|
+
|
|
73
|
+
| Flag | Description |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `--dry-run` | Show what would be flagged without making any changes |
|
|
76
|
+
| `--all` | Show all timestamped entries regardless of age |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Archive Section
|
|
81
|
+
|
|
82
|
+
Archived entries are appended to `## Archive` at the bottom of MEMORY.md:
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
## Archive
|
|
86
|
+
|
|
87
|
+
<!-- Entries moved here by mindlink prune — kept for reference -->
|
|
88
|
+
|
|
89
|
+
Building billing integration in src/api/billing.ts <!-- added: 2026-01-15 --> <!-- archived: 2026-04-13 -->
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
**Interactive review of stale entries:**
|
|
97
|
+
```bash
|
|
98
|
+
mindlink prune
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**See what would be flagged without changing anything:**
|
|
102
|
+
```bash
|
|
103
|
+
mindlink prune --dry-run
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Review all timestamped entries (not just stale ones):**
|
|
107
|
+
```bash
|
|
108
|
+
mindlink prune --all
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Related Commands
|
|
114
|
+
|
|
115
|
+
- [`mindlink verify`](verify.md) — check if MEMORY.md is getting too large
|
|
116
|
+
- [`mindlink diff`](diff.md) — see what the AI wrote this session
|
|
117
|
+
- [`mindlink summary`](summary.md) — view full contents of all `.brain/` files
|