Roarpeng/GraphFlow
Local-first code knowledge graph and context harness for coding agents. MCP + DeepSeek Harness (dsh) plugin.
Project Overview项目介绍
GraphFlow is a local-first memory and context harness for coding agents that builds an AST-based code knowledge graph and offers bounded context compression and a cross-session learning flywheel. It is exposed to agents through the Model Context Protocol (MCP), and works with over 15 different coding agent platforms including DeepSeek Harness, Cursor, Claude Code, and Kimi Code CLI. It ships as a portable npm package that can be installed via npm install @roarpeng/graphflow, and also includes a standalone CLI and an official VS Code extension. It can run fully offline with no external API key required to work.
GraphFlow solves key problems with existing memory solutions for long-lived coding projects that change over time. Static rule injection wastes tokens every session and grows until it is ignored entirely, while plain RAG never accumulates task experience from past work. GraphFlow uses layered L0-L3 compression to fit within a fixed token budget, only pulling the exact context needed for the current task. It automatically captures outcomes from agent runs and writes learned skills and experience back to memory, so it improves over repeated use on the same project. It also includes built-in memory poisoning protection that treats externally imported skills as unproven until validation.
The project is fully open source under the permissive Apache-2.0 license, and includes a complete, reproducible benchmark suite with all results pinned to specific code commits. It requires Node.js 20 or higher and npm 10 or higher to run locally, and includes 961 passing tests to confirm core functionality works as expected. Users can install it via the npm command npm install @roarpeng/graphflow, and run the proof of concept learning flywheel with npm run proof:flywheel. All benchmarks can be re-run independently by public third parties to verify the published results.
GraphFlow 是一个面向编程代理的本地优先记忆与上下文引擎,核心功能是为项目构建支持12种语言的AST代码知识图谱,实现分层上下文压缩,提供带自动验证的技能学习飞轮。它通过MCP协议对外暴露能力,支持包括DeepSeek Harness、Cursor、Claude Code在内的15种以上代理平台,同时提供独立命令行工具和VS Code扩展。
开发者在长期迭代的项目中使用GraphFlow,可以避免静态规则注入或普通RAG方案带来的token浪费和无经验积累问题。它会自动捕获代理执行结果,把学到的技能、经验自动写回存储,每次请求仅检索当前任务需要的内容,在固定token预算内提供最相关的上下文,帮助代理随着项目推进持续提升表现。
它使用纯TypeScript/Node开发,要求Node.js版本不低于20,npm不低于10,完全离线运行,不需要外部API密钥。项目遵循Apache-2.0开源协议,包含完整可复现的基准测试,所有结果都绑定到具体代码提交,支持第三方独立复现验证。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:GraphFlow(Roarpeng/GraphFlow)
仓库:https://github.com/Roarpeng/GraphFlow
本站详情页:https://www.yhbd.top/plugins/roarpeng-graphflow/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 Apache-2.0 · ⭐ 15 · 最近提交 2026-10-03 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 15 stars - an early-stage project星标 15,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add @roarpeng/graphflow
把 Roarpeng/GraphFlow 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
GraphFlow
English | 中文
The memory & context harness for coding agents. Local-first code knowledge graph · bounded context compression (truly bounded responses: the package plus history echoes, which ship as short previews only; 95.6% fewer tokens than reading the top-10 files in full — a token ratio, not an answer-quality measure, see both baseline arms) · cross-session learning flywheel.
The community is converging on an "agent harness" vocabulary: memory + hooks + skills are the harness primitives that turn a stateless model into a reliable long-running agent. GraphFlow implements all three for coding agents and ships them through a portable MCP surface (Cursor, Claude Code, 15+ agents):
| Harness primitive | GraphFlow implementation |
|---|---|
| Memory | Code graph (10 tree-sitter grammar languages incl. C/C++; TypeScript/JavaScript via the TypeScript compiler — optional dependency, falls back to regex extraction with reduced symbol detail when absent; plus regex-based Markdown) + Episodic / Skill / Decision nodes — project knowledge and project experience persist across sessions |
| Hooks | Outcome auto-capture (on by default) + Claude Code SessionEnd / Stop and DeepSeek Harness agent/disposed glue close the learning loop automatically — no manual outcome reporting required |
| Skills | A four-class flywheel (proven / correctable / anti-pattern / noise) with canary validation — skills are promoted by evidence, not by assertion |
Pure TypeScript/Node. CLI + MCP + VS Code extension. Local-first: indexing, compression and recall need no API key; the default semantic-embedding backend downloads its model from huggingface.co once (on failure it degrades to a fully offline hash backend; set embeddingProvider: "fnv" to never touch the network).
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ouli-1242/dsh-plugin-tool-management
stas130286-blip/dsh-brainagent
i1j/context-assembler-DSH