跳到正文

jiezeng2004-design/dsh-requirements-alignment

40最近提交 2026年8月14日

dsh-requirements-alignment DSH 插件

dsh-requirements-alignment 将用户请求转化为持久的需求基线(目标、约束、决策),并在 agent 执行时监控方向级的漂移。它静默记录基线,仅当发生实质性变化时询问用户,记录决策并更新基线。该插件基于模型驱动,通过系统提示策略、工具和斜杠命令工作。

如何安装 dsh-requirements-alignment DSH 插件

dsh plugin --profile web add dsh-requirements-alignment

复制不会执行命令。安装 dsh-requirements-alignment DSH 插件前请核对仓库和版本。

dsh-requirements-alignment DSH 插件数据来源

dsh-requirements-alignment DSH 插件快照日期:2026年8月16日

discovered

dsh-requirements-alignment DSH 插件能做什么

  • 自动从用户请求建立并维护需求基线。
  • 检测漂移候选(范围扩展、约束冲突、行为变更等)并通过 `report_drift` 工具报告。
  • 记录用户决策并更新基线,避免重复询问。
  • 提供 `/align` 命令手动检查漂移并重新对齐。
  • 通过专用对齐事件支持持久会话状态,在恢复、复制和压缩后仍保持状态。

dsh-requirements-alignment DSH 插件适合哪些场景

  • 防止长时间运行的 agent 静默偏离原始任务范围。
  • 允许用户在任务执行中批准或重定向方向变更,而不丢失上下文。
  • 在复杂任务中维护显式约束(如“不修改 UI”或“保持 API 不变”)。
  • 中断的会话恢复时保持相同的对齐状态,避免重新询问已决定的决策。

dsh-requirements-alignment DSH 插件适合谁

  • 使用 DeepSeek Harness (DSH) 进行自主或半自主 agent 任务的开发者。
  • 运行长时间 agent 会话并需要确保 agent 保持在预期路径上的用户。

dsh-requirements-alignment DSH 插件的限制

  • 软保护:漂移检测是模型驱动的,不是硬性门控;插件记录并重新对齐,但不会阻止执行。
  • 自然漂移检测依赖模型:在某些运行中,任务中间的用户方向变更可能不会可靠触发 `report_drift`。
  • `/align` 命令需要命令适配器,在无头或 ACP 自动化配置中不可用。
  • 子 agent 不能询问用户;它们将漂移候选报告给父 agent,由父 agent 处理交互。

dsh-requirements-alignment DSH 插件的仓库 README 摘录

以下文字摘自 dsh-requirements-alignment DSH 插件的上游仓库 jiezeng2004-design/dsh-requirements-alignment 的 README,版权归原作者,仅作引用。

> Runtime requirement drift guard for DeepSeek Harness. Keep long-running agents aligned with user intent while they work. ## Overview `dsh-requirements-alignment` turns the user's request into a durable **requirement baseline** — goal, protected constraints, must-preserve behavior, allowed scope, and settled user decisions — and guards it while the agent executes. The agent works silently until a step would materially change the task direction; only then does the plugin surface a **drift candidate** to you, records your decision, and updates the baseline. Everything is folded from log-only session events, so resume, fork, and compaction recover the same state. **You decide the direction. The agent decides the engineering.** ## Requirements Alignment vs Plan Mode ``` Plan Mode asks: "Is this the right implementation plan?" Requirements Alignment asks: "Are we still solving the right problem?" ``` > Plan Mode prevents a bad plan from starting. > Requirements Alignment prevents a good plan from drifting. Plan Mode is the official review-approve step *before* implementation. Requirements Alignment is intent continuity *during* execution. They compose: plan, approve,

阅读完整 README仓库许可: MIT

dsh-requirements-alignment DSH 插件常见问题

这个插件和计划模式(plan mode)有什么区别?

计划模式在执行前阻止一个糟糕的计划开始,通过要求审批。需求对齐插件在执行期间通过监控方向级的变化防止一个良好的计划偏离。它们可以组合使用:先计划,审批,执行,然后这个插件确保执行保持在已批准的方向上。

插件会拖慢我的 agent 吗?

不会。在自动模式下,插件只在系统提示中添加一段策略,agent 静默工作,没有周期性检查。漂移检测是模型驱动的,仅在 agent 自身发现潜在方向变化时触发,几乎无开销。

我可以禁用自动对齐策略吗?

可以。在插件配置中设置 `mode: manual`,这样就不会在系统提示中添加策略,你仍然可以使用 `/align` 命令手动检查和对齐。也可以设置 `mode: off` 使插件完全失效。

如果 agent 会话中断,对齐状态会丢失吗?

不会。插件将对齐状态存储在专用的 `alignment/*` 会话事件中,这些事件在恢复、复制和压缩后仍然存在。通过折叠函数可以从日志中重建状态,无需重新询问已决定的决策。

子 agent 需要改变方向时怎么办?

子 agent 不能直接询问用户。它们会在报告中包含一个“需求漂移候选”块,父 agent 随后运行漂移协议(调用 `report_drift`)来获取你的决策。这种设计将用户交互集中到父 agent 上。