跳到主内容

dsh-requirements-alignment 使用指南

防止长任务执行中方向漂移:将用户需求固化为基线,仅在执行真正改变方向时才打断用户确认。

本文为派生内容(基于 wiki / faq / compatibility_json 自动组装),非 AI 即时创作。

本文由本站基于该插件已收录的字段自动派生(wiki / faq / compatibility_json / readme),非 AI 即时创作。每节末尾标源字段。

快速上手

dsh-requirements-alignment

— 源: plugin_wiki.wiki_content

安装与验证

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

复制以上命令在 DSH Web Profile 内运行。安装完成后在「插件列表」启用即可。

— 源: plugins.install

关键要点

  • requirements-alignment — the controller (policy section, /align, /align-mode, both tools);
  • requirements-alignment-ask-user — the model-facing question tool.
  • id: requirements-alignment
  • Profile Default — the composition layer. It is the fallback when no override exists. Changing it (or the override) never rewrites the other; switching modes never edits the profile YAML.
  • Manual — no automatic policy. The agent works normally until you run /align, which reports status and steers a fresh inspection.

— 源: plugin_wiki.readme_zh (fallback readme_raw)

常见问题

这个插件和 DSH 自带的 Plan Mode 有什么区别?

Plan Mode 在执行前审查"方案是否合理";Requirements Alignment 在执行过程中监督"是否还在做正确的事"。两者互补:先规划审批,再让插件防止执行偏离。

安装后会自动打断我吗?

不会。Auto 模式下插件默认静默,仅在执行即将改变任务方向(范围扩大、约束冲突、架构变更等)时才向你发起一次确认。

任务的"基线"存放在哪里?

存放在 DSH 官方的 storage-domain 边车(AlignmentStateStore),以 storage-json 为后端。即使卸载插件或裸 DSH 也能读会话。

如何切换 Auto / Manual / Off?

运行 /align-mode auto|manual|off 立即热切换;/align-mode reset 回到 profile 默认值;运行 /align-mode 不带参数查看当前三层模式快照。

子代理可以问用户吗?

不可以。DSH 子代理不允许向用户提问,会收到 DELEGATED_CALLER 错误。子代理把 drift 候选写到最终报告里交给父代理处理。

卸载插件会丢失基线数据吗?

不会。canonical 状态独立存放在边车里,卸载只移除工具、命令和策略,不会删除基线、drift 记录或决策。

— 源: plugin_wiki.faq_json

兼容性

  • DSH: 0.1.0-rc.6+
  • Node: 未声明
  • Platforms: Windows, macOS, Linux

— 源: plugin_wiki.compatibility_json

踩坑提醒

安装前请审阅上游仓库;本指南基于已收录字段自动派生,可能滞后于最新版本。如发现与官方文档冲突,请以上游为准。

— 来源:通用规则

dsh-requirements-alignment 使用指南