插件目录 / Knowledge / dsh-experience-flywheel
dsh-experience-flywheel
已验证 · 实测可装 XZDYM
功能简介
dsh-experience-flywheel · DSH 经验飞轮插件 — cross-session experience memory + dual-acceptance gates for DeepSeek Harness. Auto query/inject via agent/pre-step middleware; exit-1 gate scripts (plan-gate/close-gate/verify-claims).
可用 — 实测通过,早期项目
dsh-experience-flywheel · DSH 经验飞轮插件 — cross-session experience memory + dual-acceptance gates for DeepSeek Harness. Auto query/inject via agent/pre-step middleware; exit-1 gate scripts (plan-gate/close-gate/verify-claims). 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-experience-flywheel · DSH 经验飞轮插件
Give your DeepSeek Harness agent a cross-session "muscle memory":
it automatically queries past lessons before each step and injects hits,
automatically verifies claimed file writes, and wraps deterministic
exit-1 gate scripts (plan-gate / close-gate / verify-claims) as slash commands.给 DeepSeek Harness agent 装上跨会话"经验肌肉记忆":每轮动手前自动查经验并注入命中,
写完文件自动校核"声称写了"是否真写了,并把确定性的 exit-1 闸门脚本
(plan-gate / close-gate / verify-claims)包成 slash 命令。Status: v0.1.0 released — see DESIGN.md.
Why / 为什么造它
Pure-text LLM agents wake up fresh every session: yesterday's pitfalls, preferences,
decisions are gone. This plugin turns "learn from experience" from "hope the model
remembers" into server-side automation: the agent/pre-step middleware runs the
experience query every turn without the model choosing to, the same seamdsh-repeat-tool-reminder already uses.
How / 怎么工作
ctx.on("agent/pre-step")→ auto query store, inject top-K hits as a system message.ctx.on("tools/post-execute")→ after file-write tools, auto-runverify-claims.- Claims hygiene (F2/F3): per-agent claimed-write set is bounded — verified paths are
removed after a PASS, capped atmaxClaimsPerAgent(default 50), and pruned byclaimsTtlMs(default 24h), so long sessions never re-verify history forever. Claimed
paths are extracted by tool-name whitelist + path-shape checks (extractClaimedPaths),
so non-write tools (e.g. browser element refs) never trigger false-positive verifies. - Session-safety (F4): injected plugin messages carry a UUID
message.id(localcreateUserMessagefactory mirroring@deepseek-ai/dsh-llm), because DSH session
events of typeuser/messagemust satisfyassertMessageEventShape(data.message.id
required, dsh-session lib/index.js:1248) — bare messages corrupt the whole session log. - Search quality (F1): markdown search is word-boundary aware — standalone tokens
(独立词) score 1.0, embedded-only matches (e.g. 经验 inside 经验库) are demoted to 0.3,
so noisy substring hits rank below precise ones while recall is preserved. - slash commands
/flywheel-search/flywheel-remember/plan-gate/close-gate/verifywrap exit-1 scripts. - Backend: local markdown folder by default (zero deps); set
OPENVIKING_URLto upgrade to vector retrieval. - Honest limit (软硬): rc.6 event listeners that throw are warned, not fatal — a true
kernel-level "exit 1 prevents delivery" veto is not supported; the gate's exit 1 is
injected as a hard blocking instruction + visible trajectory marker instead. See DESIGN §8.
Install / 安装
dsh plugin --profile web add github:<owner>/dsh-experience-flywheel
Then restart DSH web. GitHub topic: dsh-plugin.
Decoupled / 去私货
No OpenViking hard-binding, no hardcoded paths, no personal rules. The kernel is the
flywheel protocol + gate contracts; your private AGENTS.md stays yours. An optionalexamples/agents.md.fragment is provided for users who want to wire the protocol into their own instructions.
License
MIT.
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-experience-flywheel」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:XZDYM/dsh-experience-flywheel Headless(CLI)profile:
dsh plugin --profile headless add github:XZDYM/dsh-experience-flywheel 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。