Leitarkkk/dsh-research-nudge

DeepSeek Harness 插件:当本地试错成本升高时,自动注入检索提示,引导 Agent 查阅文档或联网搜索。

Project Overview项目介绍

dsh-research-nudge is a native plugin built exclusively for DeepSeek Harness that acts as an advisory research-debt guard for AI coding agents. It requires DeepSeek Harness 0.1.0-rc.7 or newer, and Node.js version ^22.19.0 or >=24.0.0 to work correctly. It tracks every step of the agent’s workflow, assigning a numerical debt score for actions like reading local code, editing files, running commands, and repeating identical failures. When the accumulated score crosses a configurable threshold, it injects a clear, model-visible reminder into the agent’s next step, encouraging the agent to search external documentation instead of looping through unproductive local trial and error.

The plugin integrates with DeepSeek Harness via the tools/post-execute waterfall hook, so it can observe every tool execution and result without disrupting the existing workflow. It normalizes error text to fingerprint equivalent repeated failures, so even if line numbers change, it can correctly detect that the agent is hitting the same error again. It also recognizes common external research tool calls like web search, GitHub search, and URL fetch, and automatically resets the accumulated research debt when it detects one of these calls. This tool is ideal for DSH users who want to reduce the amount of unproductive trial and error their AI agents go through during coding tasks.

The plugin is released under the open-source MIT license, and it collects no telemetry, sends no external network requests, and does not store any user tool arguments or persistent state. All state is stored in-memory in a WeakMap keyed to the active agent, so it is automatically cleared when the agent or runtime exits. Users can install it via the DSH CLI directly from GitHub or npm, though Git-based installs require allowing the package’s build script to run. For reproducible installs, the project documentation recommends pinning the install to a specific git tag or commit hash to avoid unexpected changes.

dsh-research-nudge 是专为 DeepSeek Harness 开发的原生插件,作用是研究债务监控提醒。它会持续追踪代理的工作流程,根据代理读取文件、编辑代码、执行命令和重复失败等操作计算研究债务分数。当分数超过设定阈值时,它会在下一个模型步骤添加一段提醒,提示代理优先查询外部文档或已有问题,避免陷入无意义的本地试错循环。它不会主动调用搜索、拦截工具,仅提供提醒不改变原有工作流。

dsh-research-nudge 通过监听 DSH 的工具执行后钩子工作,会记录每次工具调用和运行结果,对重复错误进行文本归一化和指纹识别,一旦识别到代理调用了外部研究工具就会重置累计的债务分数。用户安装完成后,可以自定义各项配置参数,比如不同操作的债务权重、触发提醒的债务阈值、允许临时关闭提醒的最长时间等。它适合希望规范代理工作流程、减少无效本地试错的 DSH 开发用户使用。

它要求 DSH 版本不低于 0.1.0-rc.7,Node.js 版本需要 ^22.19.0 或 >=24.0.0,符合当前 DSH 的基线要求。可以通过 dsh 命令行从 GitHub 或 npm 安装,源码采用 MIT 许可证开放,不会收集遥测数据、发送网络请求或存储用户的工具参数。Git 安装时需要允许构建脚本运行,建议固定到特定标签或提交保证安装可复现。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
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 dsh-research-nudge

把 Leitarkkk/dsh-research-nudge 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-research-nudge

CI version license DSH

English | 简体中文

An advisory research-debt guard for DeepSeek Harness. It notices when an agent spends a long stretch reading, editing, executing, and repeating failures without consulting external evidence, then adds a short reminder to the next model step.

It does not call an LLM, perform a search, block a tool, or force the agent to browse. The reminder explicitly allows self-contained work to continue normally.

The problem

Agents sometimes fall into a local trial-and-error loop:

read → guess an unfamiliar API → edit → run → fail → edit → run → same failure

A search of the official docs, an exact error message, or an existing GitHub issue may resolve that uncertainty faster. dsh-research-nudge turns the growing cost of the local loop into a deterministic score called Research Debt.

Research Debt: a calculated example

This is a hypothetical sequence calculated from the documented default weights, not production telemetry. It shows exactly how the score would cross the threshold:

Step Signal Added debt Total
Read local code ordinary tool +1 1
Edit a file mutation +2 3
Run and fail execution + failure +1 +4 8
Edit again mutation +2 10
Run and hit the equivalent failure again execution + failure + repeated failure +1 +4 +6 21

The default threshold is 20, so the last result carries an additional model-visible context:

[Research Nudge]

Pause and reflect before continuing:

1. What problem am I trying to solve right now? Restate it precisely.
2. What approach am I currently taking, and how many attempts has it taken without success?
3. Am I fully confident this approach will work? If I am guessing at an API, an error message, a library's behavior, or platform details I have not verified, I am not fully confident.
4. If I am not fully confident: external research is cheaper than more local trial-and-error. Search the official documentation, GitHub issues, existing libraries, or the exact error message before trying again.

Do not search merely to satisfy this reminder. If the task is self-contained and external research would not help, continue normally. If you are deliberately making progress from local evidence and do not want another reminder for a while, use the research_nudge_snooze tool.

Current signals: debt=21/20, tool_calls_since_research=5,
failures=2, repeated_failures=1.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev npm-safe-forDSH 下一个 Next dsh-composer-keys →