Back to home

nortejiang-tech

dsh-req-miner

Requirements-mining sidebar plugin for DeepSeek Harness: per-session interview window driven by a continuable subagent, one-click prompt return

Stars
0
Language
JavaScript
Created
Aug 15, 2026
Updated
Aug 15, 2026

Introduction

dsh-req-miner · 需求挖掘插件

English · 一个 DeepSeek Harness(DSH)社区插件:把「需求挖掘」做成侧边栏入口 + 每会话独立的浮动访谈窗口,由专用的需求挖掘子代理主持,读项目、读会话上下文,挖掘完成后一键把需求提示词回传进当前会话。

功能

  • 侧边栏入口:左侧菜单栏底部(设置项上方)常驻 ⛏️「需求挖掘」按钮,任何会话里都能点开
  • 每会话独立窗口:访谈窗口绑定当前会话/项目,切换会话后可再开各自的窗口,内容互不影响;窗口可拖动、可调大小、位置自动记忆
  • 读项目 + 读上下文:每次开窗启动一个 continuable 子代理(需求挖掘师人设),继承当前会话的工作目录与工具(可读项目文件),并把当前会话最近对话摘要作为上下文喂给它
  • 审讯式访谈:决策树 + 每轮「前沿」问题 + 每条问题给推荐答案,只问一轮等一轮;可一键「停止」中断本轮思考
  • 汇总回传:共识达成后点「📦 汇总成需求提示词」,生成可直接交给开发 Agent 的需求提示词(背景/干系人/功能需求与验收标准/NFR/明确不做什么/假设与开放问题),一键填入当前会话输入框或复制
  • 对话持久:挖掘子代理的会话持久保存,关窗重开、服务重启后接着聊

安装

仓库托管形式(本仓库自带 .dsh-plugin bundle):

dsh plugin add github:nortejiang-tech/dsh-req-miner

或手动在你的 profile 的 cordis.patch.yml 中加入:

- insert:
    - id: req-miner
      name: github:nortejiang-tech/dsh-req-miner#master&path:/.dsh-plugin

安装后重启一次 dsh web,刷新页面即可在左侧菜单栏看到 ⛏️。

DSH 处于 developer preview,若版本升级后插件报错,欢迎提 issue。

使用

  1. 打开任意会话,点侧边栏底部 ⛏️「需求挖掘」
  2. 在浮窗里描述你的想法;挖掘师会勘察项目、逐轮追问(每个问题带推荐答案,回复「同意」或改答案即可)
  3. 达成共识后点「📦 汇总成需求提示词」
  4. 点「填入当前会话输入框」(或「复制」)把提示词带回会话

工作原理

  • 纯宿主(bundle)插件:启动时注册 /req-miner/api 接口与 UI 静态资源路由,并通过 webServer.tapIndex 把无构建的原生 JS/CSS 注入页面
  • 挖掘引擎 = 宿主 subagents 服务的 continuable 子代理:以当前会话 Agent 为父、persona 注入需求挖掘师人设,子代理继承会话工作目录与工具;UI 通过 HTTP 接口驱动 open / send / interrupt / poll
  • 会话绑定:UI 从 localStorage['dsh.sessions.current'] 读取当前会话 id,窗口状态按会话隔离;子代理会话按父会话发现(label 匹配),持久可续
  • 无遥测、无外部服务:所有调用都在本地 DSH 进程内

FAQ

  • 「停止」是什么语义? 中断挖掘师本轮思考;子代理会话按设计保留(继续对话不丢历史)。关闭窗口只是隐藏窗口。
  • 为什么装完要重启一次? DSH 的组合在进程启动时加载,插件行新增需重启生效;之后改 UI 资源只需刷新页面。
  • 窗口位置存在哪? 浏览器 localStorage(reqminer.panel.v1),换浏览器/清缓存会回到默认位置。

License

MIT


dsh-req-miner · Requirements Miner for DeepSeek Harness

A community plugin for DeepSeek Harness (DSH). It turns requirement mining into a persistent sidebar entry plus a per-session floating interview window: a dedicated mining subagent interviews you round by round (decision tree, frontier questions, recommended answers), reads your project folder and the bound session's recent context, and returns a ready-to-use requirement prompt to your session composer in one click.

Features

  • Sidebar entry: a permanent ⛏️ "需求挖掘" button at the sidebar foot, available from any session
  • Per-session windows: the interview window binds to the current session/project; open independent windows per session. Draggable, resizable, position remembered
  • Reads project + context: each window starts a continuable subagent (requirements-miner persona) that inherits the session workspace, its tools, and a digest of the bound session's recent conversation
  • Interview discipline: rounds of frontier questions with recommended answers; a Stop button interrupts the current turn
  • One-click return: summarize the consensus into a developer-ready requirement prompt (background, stakeholders, FRs with acceptance criteria, NFRs, out of scope, assumptions/open questions) and fill it into the session composer or copy it
  • Durable conversations: the mining subagent session persists across window close and server restarts

Install

Repo-hosted (this repository ships a .dsh-plugin bundle):

dsh plugin add github:nortejiang-tech/dsh-req-miner

or add to your profile's cordis.patch.yml:

- insert:
    - id: req-miner
      name: github:nortejiang-tech/dsh-req-miner#master&path:/.dsh-plugin

Restart dsh web once after installing, then refresh the page.

DSH is in developer preview. If a DSH upgrade breaks the plugin, please file an issue.

How it works

  • Host-only bundle: registers /req-miner/api plus UI asset routes, and injects build-free vanilla JS/CSS into the page via webServer.tapIndex
  • Mining engine: a continuable subagent on the host subagents service — parented to the current session agent, persona-injected with the requirements-miner discipline, inheriting the session workspace and tools; the UI drives open / send / interrupt / poll over HTTP
  • Session binding: the UI reads the current session from localStorage['dsh.sessions.current'], keeps window state per session, and (re)discovers the durable child by label
  • No telemetry, no external services — everything runs inside your local DSH process

License

MIT