
projectmind
io.github.Nodemint-dev由 GitHub 账号 Nodemint-dev 发布v0.6.0更新于 Oct 24, 2026
Persistent project memory for AI coding agents: one compact digest instead of re-reading the repo.
概览
为 AI 编程助手提供持久且精简的项目记忆,使其每次会话只需读取一份小摘要,而不必重新扫描代码库。
- 可以做什么
- 维护结构化的项目地图(.projectmind/map.json),记录模块、依赖、架构决策、约定和术语表,并向助手提供约 400 token 的摘要。工具包括 mind_digest 读取精简地图、mind_context 获取任务相关模块、mind_query 与 mind_search 查询细节、mind_update 记录变更、mind_handoff 留下会话续接备注,以及 mind_stats 查看地图大小和本地节省账本。git 钩子和可选的 watch 模式无需调用大模型即可保持文件与模块的新鲜度。
- 适用场景
- 当 AI 编程助手反复重读代码库或要求你重新解释既有决策时适用,可让上下文跨会话、跨机器和跨不同 AI 工具延续。也适合在会话之间交接工作状态。
- 运行要求
- 通过 npx 运行 npm 包 @nodemint/projectmind 的本地进程;需要 Node.js 18、20 或 22。未声明账户、API 密钥、环境变量或请求头。仅限桌面端,无需网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 projectmind,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
projectmind
Persistent, compact project memory for AI coding agents. Your agent reads one small digest instead of re-scanning the codebase every session — and a local ledger shows you exactly how many tokens (and dollars) that saved.
[CI] [tests] [platforms] [node] [runtime deps] [network calls] [license]
[Benchmark: reading the codebase ~1,953 tokens vs projectmind digest ~412 tokens, −78.9%]
Every AI coding session starts the same way: the agent has no memory of your project, so it re-reads files, re-derives your architecture, or asks you to re-explain decisions you made months ago. You pay for that in tokens, time, and wrong guesses — every single session, on every machine, for every teammate.
projectmind fixes this with a structured, persistent project map
(.projectmind/map.json): your modules, their dependencies, your architectural
decisions, your conventions, your domain glossary. The agent reads a ~400-token
digest first, drills into single nodes only when needed, and writes back what it
learns — so the next session (yours, a teammate's, or a different AI tool's)
starts already knowing the project.
The digest scales with your project's conceptual size (modules, decisions), not its byte size — so the savings grow with the repo.
Quick start — one command
That single init does everything: scaffolds the map, seeds it from your
repo layout, detects which AI agents are installed on your machine and
wires each one (MCP server + a rules file carrying the live map), adds
.projectmind/ to your .gitignore (the map stays local — nothing to push),
and installs the git hook that keeps the map fresh on every commit.
Then the one step no tool can do for you: restart your agent (or start a
new chat session). AI agents load their config and rules files at session
start — a chat that was already open keeps its old context, and every session
after that has the map automatically. Using the VS Code savings extension?
Cmd+Shift+P → "Developer: Reload Window" once.
Want it available in every future project without even running init?
(projectmind init --bare scaffolds only, and projectmind setup re-wires
agents on demand, if you prefer the pieces separately.)
See what it saves you — measured, not promised
The MCP server keeps a local savings ledger: every time your agent reads the map instead of scanning files, it records the tokens actually served vs. the estimated tokens of the files the agent would have read instead.
Check it anytime:
The dollar figure needs zero configuration: it defaults to Sonnet-tier input
pricing from a built-in table of published rates (Haiku $1 / Sonnet $3 / Opus $5
/ Fable $10 per MTok input, as of June 2026), and says exactly which assumption
it used. If you run a different model, set savings.model (or an exact
savings.inputPricePerMTok) in .projectmind/config.json — but nobody has to.
(Real output from a scripted day of agent work on the sample project in
test/fixtures/ — 12 session starts, 6 module drill-ins, 4 task-context reads.
Reproduce the per-session number with npm run benchmark.)
VS Code status bar: the integrations/vscode extension
shows a live ✦ ~20.5k tokens saved counter that reads the same local ledger.
Zero dependencies, zero network.
The ledger is honest by design: every number is labelled an estimate
(ceil(bytes ÷ 4), the rough English+code average), savings are floored at zero,
and the file is gitignored — it's your private data, on your machine, deletable
at any time.
One deliberate gap, stated plainly: the ledger only counts tool calls
(mind_digest, mind_query, mind_context). The embedded digest described
below never requires a tool call — that's the whole point — so its savings
don't show up as a number here. projectmind savings names which rules files
carry it instead of inventing a token count we can't actually observe.
Session handoff — pick up exactly where you left off
The thing every agent session loses is working state: what you were in the middle of, what's next, the gotcha you just discovered. Code graphs can't capture it; chat history dies with the session. projectmind carries it over:
Your agent calls mind_handoff before the session ends (or before its context
gets compacted); the note leads the very next digest, so the next session —
tonight on your laptop, tomorrow on your desktop, or a different AI tool
entirely — resumes in one read instead of re-deriving the task. Notes live in
your gitignored local overlay: personal working state, never committed, cleared
with mind_handoff({clear: true}) when done. Humans can use it too:
projectmind handoff "note".
Works everywhere your team works
No language assumptions, no platform assumptions: the full test suite (85 tests, including the git-hook end-to-end and offline-guarantee tests) runs in CI on Linux, macOS, and Windows × Node 18/20/22. Paths, globs, atomic renames, and the installed git hook are exercised on all three. The map format is plain JSON — nothing OS-specific is ever written to your repo.
Verified against real open-source repos (fresh clone → projectmind init --seed,
2026-07-02):
That's the core scaling property in the wild: the digest tracks a project's conceptual size, staying ~100 tokens whether the repo is 150k or 500k tokens. (A freshly seeded digest is a starter skeleton — a curated map with decisions and conventions lands around 400 tokens, like the benchmark fixture. We quote the honest per-session savings number — 78.9% — from the benchmark, not from these whole-repo ratios.)
How it works
Two update paths keep the map current without burning tokens:
- Deterministic: the git hook (and optional
projectmind watch) map changed files to modules via globs and bump freshness. Pure local computation, zero LLM. - Agent-recorded: when the agent makes an architectural decision or learns a
convention, it calls
mind_update— a few tokens once, instead of re-discovery every session.
There is deliberately no background LLM summarization — that would burn the tokens this tool exists to save.
What the agent actually reads
~412 tokens for the whole thing. The long fields (notes, rationale, file
lists) are excluded from the digest and only surface through mind_query —
cheap by default, detail on demand.
MCP tools
One-command agent wiring — and it doesn't depend on the model choosing to read it
projectmind setup idempotently writes the MCP config and a workflow
rules block for each agent — merging into existing configs, never clobbering
(an unparseable config is backed up and skipped).
Here's the part that matters: MCP tools are a nudge — no server can force a
model to call one, so an agent can (and sometimes will) skip mind_digest on
a plain "explain this project" question, especially mid-task. But rules files
(CLAUDE.md, .cursorrules, .windsurfrules, GEMINI.md, AGENTS.md,
.github/copilot-instructions.md) are loaded into every agent's context
unconditionally, with zero model choice involved — that's the actual
mechanism, not a coincidence. So setup doesn't just write instructions to
call mind_digest; it embeds the live digest itself between
<!-- projectmind:digest:begin/end --> markers, and every subsequent
mind_update, CLI edit, git-commit hook run, or watch save re-syncs it
automatically. The project map is present in context from message one, on
every agent, with no tool call required at all — the same reliability
class as a context-injecting hook, without needing one.
(Only the repo-committed map is ever embedded — never your gitignored local overlay or handoff notes, so nothing personal leaks into a file you commit.)
Target one with projectmind setup --agent cursor. Manual wiring is one line
everywhere:
Install once, use everywhere — global setup
projectmind setup above is per-project. Run projectmind setup --global
instead to register the MCP server once, so it's available in every
project you open from then on — no per-repo .mcp.json, no re-running setup.
Supported: Claude Code, Cursor, Windsurf, Gemini CLI.
For Claude Code this shells out to its own claude mcp add --scope user
(the same mechanism tools like codegraph use for global registration) rather
than hand-editing its internal config file. For the others it merges into
their global config (~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json,
~/.gemini/settings.json) the same idempotent way the per-project setup does.
Two things this can't do, by design:
- Rules files stay per-project.
CLAUDE.md/.cursorrules/ etc. are checked-in project conventions — there's no sane "global" version of them, so--globalonly registers the MCP server, not the nudge-text. Without a project's.projectmind/map,mind_digestjust returns an empty-but-valid digest — harmless, but the agent won't be as strongly reminded to call it. - A chat session already open won't see it. Every MCP client (Claude Code,
Cursor, etc.) loads its server list once at session start — that's an MCP
client behavior, not something any server can override. Global scope means
every new session in every future project has it automatically; it does
not retroactively add it to a conversation already in progress. Restart the
agent once after running
--global, and you're done for good.
Where projectmind fits (and what it deliberately isn't)
You can't parse "money is always integer cents" or "we chose JWT for horizontal scaling" out of source code. That's the layer projectmind owns.
So it complements structural tools instead of cloning them: if a
.codegraph/ index exists in your repo, mind_digest, mind_query, and
mind_context automatically point the agent to codegraph for symbol-level
detail. No dependency, no duplication — projectmind is the why, codegraph is
the how.
Keeping the map honest
projectmind doctor— drift detection: dangling file globs, stale nodes.projectmind validate— schema integrity + drift warnings.projectmind watch— live freshness on save (fs.watch, debounced, local).- Corrupt
map.json? It's backed up tomap.json.corrupt-<ts>and the session continues with an empty valid map — the agent never crashes on a bad file. - Every write is schema-validated and atomic (temp file +
fsync+ rename), so a racing agent and git hook can't corrupt the map.
The benchmark (reproduce it yourself)
Methodology, stated plainly: the baseline is the concatenated content of the
files an agent would plausibly read to orient itself (README + package.json +
all src/ files of the committed fixture project); tokens are estimated at
ceil(chars ÷ 4). These are estimates, not exact counts — the fixture and
the script are in test/, so the number is auditable and reproducible. Savings
on a real repo are typically much larger, because real repos have far more than
8 files while the digest stays roughly constant-size.
CLI reference
The map, in 20 seconds
Local-first by default: init gitignores the whole .projectmind/
directory — the raw map, your personal overlay ("mid-refactor on X",
handoffs), and the savings ledger all stay on your machine. Nothing to push,
nothing to review. The shareable knowledge still travels with the repo,
because the digest is embedded in your committed rules files (CLAUDE.md
etc.) and auto-synced on every change.
Team mode (opt-in): want the full raw map in git so teammates and CI share
one source of truth? Delete the .projectmind/ line from .gitignore —
that's the whole switch. Every write is deterministic (sorted keys, atomic),
so map.json and digest.md produce clean, reviewable PR diffs. init never
overrides this choice once you've made it.
Trust FAQ
Does it send my code anywhere? No — and you don't have to take our word for
it. A CI test (test/offline.test.js) scans the entire source tree and fails if
any network API (http, net, fetch, sockets, …) appears. Two runtime
dependencies (@modelcontextprotocol/sdk, picomatch), no telemetry, no LLM
calls, no accounts.
What gets committed? By default, nothing under .projectmind/ — the map is
local-first and gitignored at init. What is committed: the digest embedded
in your rules files (CLAUDE.md, .cursorrules, …), which is exactly the
part meant to be shared — and it never includes your personal overlay or
handoff notes (regression-tested). Teams can opt into committing the full map
by removing one .gitignore line.
Are the savings numbers real? They're honest estimates, clearly labelled, with the methodology printed next to every number and a reproducible benchmark in the repo. We'd rather under-claim than exaggerate.
Does it work in a chat session that's already open? Partially, and we'd
rather tell you exactly where the line is: every MCP client loads servers and
rules files at session start, so a conversation that was open before init
ran keeps its old context — no tool (ours or anyone's) can inject into it.
From the very next session on, everything is automatic. If the MCP server was
already registered globally (setup --global), the mind_* tools work even
mid-session in a brand-new project — only the embedded rules-file digest
waits for the next session.
Can the map rot? The git hook (installed by init) and watch mode keep
file↔module freshness current for free; doctor flags dangling and stale
nodes; validate checks integrity; and the embedded digest re-syncs on every
map write, so what agents see never lags what's recorded.
Does it lock me into one AI tool? No. Any MCP-capable agent can use it, the rules files cover the rest, and the map itself is plain JSON any tool can read.
Development
MIT © contributors. See CHANGELOG.md.
来源:README.md,提交 0326a87
工具
0版本历史
1- v0.6.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分