Skip to content

dsh-reqm-plugin

Verified

@xt230/dsh-reqm-plugin · v1.1.0 · MIT · Web UI

需求管理插件(reqm):工作区外的需求库 + 输入框下拉选择器 + 右侧 Sidebar 需求页(点击文件走内置预览)+ req_* 模型工具

Install

dsh plugin add @xt230/dsh-reqm-plugin

Confirm the layer applied with dsh --profile default --dump-config — see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Creators

Readme

@xt230/dsh-reqm-plugin(reqm)

DeepSeek Harness(dsh)的需求管理插件:把每个工作区的需求集中放在项目工作区之外的需求库里,并同时提供输入框选择器、右侧边栏需求页和一组 req_* 模型工具。

功能

  • 输入框需求选择器:会话输入框左侧的下拉,列出当前工作区需求,选中后本会话即绑定该需求。
  • 右侧边栏「需求」页:只有一个入口,已选择的需求带「当前」标记(左侧强调条 + 加粗标题)。打开即是当前工作区的需求列表(新建 / 归档 / 删除 / 改状态);点某条需求在同一页签内进入详情(状态、描述、文件树),页头左侧的「← 返回」退回列表;详情状态按会话记忆,刷新整页后仍停在详情。点击文件用产品内置文档预览打开(Markdown / 代码 / 图片 / PDF 由产品渲染器负责)。
  • 需求库在工作区之外:$DSH_HOME/requirements/<编码后的工作区路径>/,与代码仓库解耦,不会污染项目目录;删除为软删除(移入 _trash/ 可手动找回)。
  • System prompt 注入:当前会话选中需求时,把标题、状态、说明与需求目录注入系统提示,约束「需求文档只写需求目录,代码改动正常写工作区」。
  • 模型工具:req_create、req_list、req_select、req_unselect、req_show、req_update、req_file_list、req_file_read、req_file_edit。
  • 变更推送:Host 侧通过 /reqm/events(SSE)推送变更,页面自动静默同步,模型工具改需求库后无需手动刷新。

安装

dsh plugin --profile web add @xt230/dsh-reqm-plugin

安装成功后,dsh 会把该包追加到 profile 的 dsh.profile.bundles,因此它是一个组合层(bundle),其 cordis.patch.yml 会插入插件行:

- insert:
    - id: reqm
      name: "@xt230/dsh-reqm-plugin"

Host 侧新增的插件行一般可经 HMR 生效;若页面没有出现选择器或需求页签,刷新页面;仍不生效则重启 dsh web(替换已安装包时也需要重启才能载入新的 JS 模块代)。

用 profile 自己的 patch 覆盖行配置(可选):

# $DSH_HOME/profiles/web/cordis.patch.yml
- id: reqm
  disabled: false

卸载

dsh plugin --profile web remove @xt230/dsh-reqm-plugin

需求数据位于 $DSH_HOME/requirements/,卸载插件不会删除它。

数据布局

$DSH_HOME/requirements/<工作区路径的编码段>/
├── index.json        # 需求索引(id / 标题 / 状态 / 时间)
├── selections.json   # sessionId -> 已选需求 id
├── req-1/
│   ├── req.md        # 需求说明
│   ├── todo.md       # 实施清单(可选)
│   └── ...           # 其它需求文档(接口变更、sql 等)
└── _trash/           # 软删除的需求目录

发布新版本(维护者)

# 1. 改版本号(例如 patch)
npm version patch --no-git-tag-version
# 2. 检查将要发布的文件清单
npm pack --dry-run
# 3. 发布
npm publish
# 4. 升级到本机 profile
dsh plugin --profile web add @xt230/dsh-reqm-plugin@<新版本>

注意:pnpm 有供应链「发布时长」策略,刚发布的版本可能被拦或提示;此时按提示回答,或临时用 --config.minimumReleaseAge=0 安装。

兼容性

peerDependencies 声明为 @deepseek-ai/dsh: >=0.2.0-rc.2 <0.3.0-0(optional)。在 dsh 0.2.x 之外安装会被安装前预检拒绝;确需强行安装时用:

dsh plugin --profile web allow-version @xt230/dsh-reqm-plugin@<版本> --dsh-version <dsh 版本> --accept-risk

License

MIT