Repository navigation
原味记忆:一个 1,141 行的 DSH 记忆插件,以及我怎么验证它 #13348
simin-yuan
started this conversation in
Show Your Plugins!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi all — I built a memory plugin for DSH and tried hard to prove it actually works. Sharing the plugin, the measurements, and the two tests that failed.
TL;DR (English):
dsh-plain-memorykeeps memory as plain Markdown in the user's own Git repo, recalls it locally with cue words + BM25, and injects 0 tokens when nothing matches. 1,141 lines, zero runtime dependencies, no model calls inside the plugin, no timers. Multi-window state cards are experimental and off by default. Repo: https://github.com/simin-yuan/dsh-plain-memory · npm:dsh-plain-memory它是什么
cards: true才开)。我怎么验证的(以及失败的部分)
四轮测试:一次假通过、一次真通过、两次半失败。
第一轮是假通过。 10 道题看起来答得不错,但插件日志显示召回 0 次——agent 自己用工具把工作区文件翻了一遍,然后像记得一样回答。这是最有价值的一条教训:测记忆时必须禁止测试窗口读文件,否则你测到的是它的搜索能力,不是记忆。
第二轮是真通过。 种下三条文件里没有的事实,换窗口、禁止读文件、换说法问,5 道核心题过了 4 道。
第三轮半失败:桌面还在跑旧构建,修的东西没生效。
第四轮改成看日志:一句与记忆无关的技术问题没有任何注入记录,"不打扰"成立;但另一个窗口问"对方在做什么",收到的是上一轮测试遗留的回声卡,不是真正的工作卡。所以多窗口标为实验功能、默认关闭,反例写进了 README。
一条给官方的建议
这次开发里有两处是靠"约定"而不是"接口"在工作的:
agent/pre-step返回消息就能追加,但这是靠 waterflow 的语义推出来的,没有明确的"插件可以在本轮消息末尾追加一条 user message"的契约说明。$DSH_HOME/AGENTS.md的标记块里。块格式、幂等、卸载清理全靠插件自己守,没有官方接口。如果以后给这两件事一个正式接口(哪怕只是稳定下来的约定),插件会更稳,也更不容易和别的插件抢同一块地方。不催,只是把踩到的坑记下来供参考。
真实使用数据
第一周真实使用数据将在 11-21 后补充(注入次数、命中条目与提问、写入成功率)。
谢谢。
All reactions