mindlink 1.2.0 → 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 +22 -12
- package/commands/index.md +11 -0
- package/commands/mcp.md +126 -0
- package/commands/profile.md +104 -0
- package/commands/prune.md +117 -0
- 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 +1162 -77
- package/dist/cli.js.map +1 -1
- package/dist/templates/agents/.clinerules +11 -2
- package/dist/templates/agents/.rules +11 -2
- package/dist/templates/agents/.windsurfrules +15 -6
- package/dist/templates/agents/AGENTS.md +11 -2
- package/dist/templates/agents/CLAUDE.md +16 -7
- package/dist/templates/agents/CONVENTIONS.md +11 -2
- package/dist/templates/agents/CURSOR.md +15 -6
- package/dist/templates/agents/GEMINI.md +11 -2
- package/dist/templates/agents/continue-rules.md +15 -6
- package/dist/templates/agents/copilot-instructions.md +15 -6
- package/dist/templates/agents/kiro-steering.md +15 -6
- package/dist/templates/agents/trae-rules.md +11 -2
- 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,7 +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)
|
|
37
|
-
- [What's New in
|
|
39
|
+
- [What's New in v2.0](#whats-new-in-v20)
|
|
38
40
|
- [Best with Claude Code](#best-with-claude-code)
|
|
39
41
|
- [License](#license)
|
|
40
42
|
- [Contributing](#contributing)
|
|
@@ -166,6 +168,9 @@ mindlink import # unzip into this project — merge or overwrite your exist
|
|
|
166
168
|
|
|
167
169
|
**Run in your terminal only — maintenance tasks:**
|
|
168
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)
|
|
169
174
|
mindlink doctor # health check — verify your setup is working correctly
|
|
170
175
|
mindlink update # check for a newer version, refreshes agent files in all projects
|
|
171
176
|
mindlink uninstall # remove MindLink from this project
|
|
@@ -179,9 +184,11 @@ Every command supports `--help`. Full CLI reference: [commands/](commands/index.
|
|
|
179
184
|
|
|
180
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.
|
|
181
186
|
|
|
182
|
-
**AI can run:** `status`, `summary`, `log`, `diff`, `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.
|
|
183
190
|
|
|
184
|
-
**
|
|
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.
|
|
185
192
|
|
|
186
193
|
The one exception: `mindlink sync` in watch mode runs continuously — keep it in a separate terminal tab.
|
|
187
194
|
|
|
@@ -207,22 +214,25 @@ Claude Code gets both the instruction file **and** an OS-level hook that fires b
|
|
|
207
214
|
| Enforced on every message | ✗ | ✓ OS-level hook |
|
|
208
215
|
| Post-response memory verification | ✗ | ✓ shell check |
|
|
209
216
|
| Context compaction recovery | ✓ instruction | ✓ instruction + hook |
|
|
217
|
+
| MCP tool integration | ✓ Cursor, Continue, Copilot, Kiro, Windsurf | ✓ Claude Code |
|
|
210
218
|
|
|
211
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.
|
|
212
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
|
+
|
|
213
223
|
---
|
|
214
224
|
|
|
215
|
-
## What's New in
|
|
225
|
+
## What's New in v2.0
|
|
216
226
|
|
|
217
|
-
|
|
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.
|
|
218
228
|
|
|
219
|
-
**
|
|
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.
|
|
220
230
|
|
|
221
|
-
**`mindlink
|
|
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.
|
|
222
232
|
|
|
223
|
-
|
|
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.
|
|
224
234
|
|
|
225
|
-
**`mindlink
|
|
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.
|
|
226
236
|
|
|
227
237
|
---
|
|
228
238
|
|
package/commands/index.md
CHANGED
|
@@ -23,6 +23,7 @@ Commands are grouped by when and how you run them.
|
|
|
23
23
|
| [summary](summary.md) | Full briefing — everything MindLink knows, in one view |
|
|
24
24
|
| [log](log.md) | View full session history |
|
|
25
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? |
|
|
26
27
|
|
|
27
28
|
### Keep running in a background terminal tab (while sessions are active)
|
|
28
29
|
|
|
@@ -32,6 +33,14 @@ Commands are grouped by when and how you run them.
|
|
|
32
33
|
|
|
33
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.
|
|
34
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
|
+
|
|
35
44
|
### Run in your terminal between sessions — not via AI
|
|
36
45
|
|
|
37
46
|
These commands are interactive, change settings, or modify files. Keep human hands on them.
|
|
@@ -53,6 +62,8 @@ These commands are interactive, change settings, or modify files. Keep human han
|
|
|
53
62
|
|
|
54
63
|
| Command | Description |
|
|
55
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 |
|
|
56
67
|
| [update](update.md) | Check for a newer version — never installs without asking |
|
|
57
68
|
| [uninstall](uninstall.md) | Remove MindLink from the current project |
|
|
58
69
|
|
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
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# mindlink verify
|
|
2
|
+
|
|
3
|
+
Check that `.brain/` memory is healthy and up to date.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Synopsis
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mindlink verify [--json] [--fix]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Runs a health check on the current project's `.brain/` directory. Answers: "is my AI's memory in good shape right now?"
|
|
18
|
+
|
|
19
|
+
Unlike `mindlink doctor` (which checks setup correctness), `mindlink verify` checks **content quality** — whether memory files are actually filled in, whether the AI is actively writing session state, and whether MEMORY.md is getting too large to be useful.
|
|
20
|
+
|
|
21
|
+
**Your AI can run this.** Ask it to run `mindlink verify` to check its own work before closing a session.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Checks
|
|
26
|
+
|
|
27
|
+
| Check | Pass | Warn | Fail |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| **Core section** | Has real content | — | Empty or placeholder only |
|
|
30
|
+
| **User Profile** | Has real content | — | Empty or placeholder only |
|
|
31
|
+
| **SESSION.md freshness** | Updated < 3 days ago | 3–7 days | > 7 days |
|
|
32
|
+
| **LOG.md present** | Exists | — | Missing |
|
|
33
|
+
| **MEMORY.md size** | < 100 real lines | 100–200 lines | > 200 lines |
|
|
34
|
+
| **Agent files** | All present | Some missing | None present |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
◉ MindLink Verify
|
|
42
|
+
/Users/you/my-project
|
|
43
|
+
|
|
44
|
+
✓ Core section — filled
|
|
45
|
+
✓ User Profile — filled
|
|
46
|
+
⚠ SESSION.md — last updated 5 days ago
|
|
47
|
+
SESSION.md is getting stale...
|
|
48
|
+
✓ LOG.md — 14 sessions logged
|
|
49
|
+
✗ MEMORY.md — 217 lines (target: under 200)
|
|
50
|
+
Run mindlink prune to consolidate stale entries.
|
|
51
|
+
✓ Agent files — all 2 present
|
|
52
|
+
|
|
53
|
+
1 error, 1 warning.
|
|
54
|
+
Run mindlink verify --fix to auto-repair 0 issues.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Options
|
|
60
|
+
|
|
61
|
+
| Flag | Description |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `--json` | Output results as JSON — useful for scripting or AI consumption |
|
|
64
|
+
| `--fix` | Auto-fix recoverable issues (regenerate missing agent files) |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## `--fix` Behavior
|
|
69
|
+
|
|
70
|
+
Auto-fix only applies to recoverable issues. It **never touches user-written memory content**.
|
|
71
|
+
|
|
72
|
+
| Check | `--fix` action |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `agent_files` missing | Re-generate from current templates |
|
|
75
|
+
| `core` / `user_profile` empty | Print actionable message — no auto-fill |
|
|
76
|
+
| `memory_size` too large | Print actionable message — run `mindlink prune` |
|
|
77
|
+
| `session_fresh` stale | No auto-fix — AI must update SESSION.md |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Examples
|
|
82
|
+
|
|
83
|
+
**Check memory health:**
|
|
84
|
+
```bash
|
|
85
|
+
mindlink verify
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Machine-readable output:**
|
|
89
|
+
```bash
|
|
90
|
+
mindlink verify --json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Auto-fix missing agent files:**
|
|
94
|
+
```bash
|
|
95
|
+
mindlink verify --fix
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## JSON Output
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"ok": false,
|
|
105
|
+
"checks": [
|
|
106
|
+
{ "id": "core", "label": "Core section — filled", "status": "pass", "message": "", "fixable": false },
|
|
107
|
+
{ "id": "user_profile", "label": "User Profile — filled", "status": "pass", "message": "", "fixable": false },
|
|
108
|
+
{ "id": "session_fresh","label": "SESSION.md — last updated 5 days ago", "status": "warn", "message": "...", "fixable": false },
|
|
109
|
+
{ "id": "log_present", "label": "LOG.md — 14 sessions logged", "status": "pass", "message": "", "fixable": false },
|
|
110
|
+
{ "id": "memory_size", "label": "MEMORY.md — 217 lines (target: under 200)", "status": "fail", "message": "Run mindlink prune...", "fixable": false },
|
|
111
|
+
{ "id": "agent_files", "label": "Agent files — all 2 present", "status": "pass", "message": "", "fixable": false }
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Related Commands
|
|
119
|
+
|
|
120
|
+
- [`mindlink prune`](prune.md) — retire stale MEMORY.md entries interactively
|
|
121
|
+
- [`mindlink doctor`](doctor.md) — check setup correctness (files, hooks, config)
|
|
122
|
+
- [`mindlink diff`](diff.md) — see what the AI wrote this session
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __export = (target, all) => {
|
|
4
|
+
for (var name in all)
|
|
5
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
__export
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=chunk-2H7UOFLK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|