DSH Project Workbench · DSH 项目工作台
A project runtime inside your DeepSeek Harness workspace — you talk to a PM, an AI expert team delivers, and progress stays visible.
工作区里的项目运行时 —— 你只对 PM 提需求,AI 专家团负责交付,进度全程可视化。
English · 中文 · Installation & Demo / 安装与演示 · Architecture / 架构
English
What is this?
DSH Project Workbench (@local/dsh-project-workbench) is a local bundle plugin for
DeepSeek Harness (DSH). It turns a plain workspace into a
project runtime:
- 🗄️ One SQLite database as the single source of truth — documents, tasks, sessions,
decisions, evidence and the timeline all live in
.project/project.db. Markdown files underdocs/are export snapshots only (write-only, never read back). - 🧑💼 You only talk to the PM — a single PM session (preset
project-office) understands your request, slices the work, and spawns task sessions (presetproject-task, namedrole-slice-action, e.g.产品-refund-PRD). Roles: product / UX / architecture / dev / QA / release / retrospective. - 📊 A tree-shaped cockpit — project panel with stage badges, pending-decision counters, and tabs for overview / sessions / documents / decisions / timeline. Live updates via SSE (revision push, no polling).
- 🚦 Human-only gates — gates and irreversible decisions can only be approved by a human through the panel/HTTP. Agents have no tool to self-approve; irreversible actions require a second confirmation.
- 🪶 ≤2k context budget per session — layered loading (L0 400 / L1 300 / L2 900, hard cap
- with graceful degradation and on-demand querying instead of dumping everything.
How it works
You ──▶ PM session (project-office)
│ understands request · slices work · spawns tasks
▼
Task sessions (project-task) ── 产品-refund-PRD / 码农-refund-API / 测试-refund-e2e ...
│ read & write project facts through project_* tools
▼
.project/project.db ◀── single source of truth
│
├─▶ Cockpit panel (tree + tabs, SSE live refresh)
├─▶ Decision cards & gates ──▶ HUMAN approval only (2-step for irreversible)
└─▶ docs/ export snapshots (generated header, write-only)
Quick start
Requirements: DSH Desktop >= 0.2.2-rc.1, Node.js >= 20.
Option A — Install into DSH Desktop
Open DeepSeek Harness → Settings → Plugins (plugin manager).
Choose Add local plugin / install local bundle, and point it at the
workbench/directory of this repo:<path-to-this-repo>/workbenchFully quit DSH (including the tray icon) and relaunch — host code and the preload list are assembled at startup.
Open the Project Workbench sidebar in your target workspace → click Initialize project.
Click Enter PM conversation and start talking.
desktopis a reserved Electron profile: the external CLI (dsh plugin --profile desktop) is rejected, so installation must happen inside the app. Read-only self-check (does not touch~/.dsh):node workbench/scripts/dev-install.mjs check --home "%USERPROFILE%\.dsh" --profile desktop
Option B — Isolated dev instance (recommended for trying it out)
Runs against its own DSH_HOME so your real profile is untouched:
node workbench/scripts/dev-instance.mjs start # DSH_HOME=<workspace>/.devhome, port 52999
node workbench/scripts/dev-instance.mjs status --json
node workbench/scripts/dev-instance.mjs restart # required after host/client code changes
node workbench/scripts/dev-instance.mjs stop
The isolated instance has no model routing by default. To exercise real PM/task sessions, start it
with the model overlay (see workbench/tests/e2e/devhome-model.patch.yml; start accepts
--patch). Keys are read from credential refs — never hard-coded.
Uninstall: remove the bundle in the plugin manager → fully quit and relaunch. Project data stays
in the workspace's .project/; delete it for a complete cleanup (back up project.db first).
A 10-minute demo
- Panel — sidebar Project Workbench: project header shows name / stage badge / pending
decisions; left tree
S1 product → slices; right tabs overview / sessions / documents / decisions / timeline. - Make a request — click Enter PM conversation and tell the PM:
"Payments need refunds — write the PRD first."
The PM slices the work (
refund), creates tasks, and spawns the产品-refund-PRDtask session. - Watch the task session work — a row appears in the Sessions tab (role / slice / model / status / read-only hint); PRD v1 shows up in Documents (DB-rendered preview, version switcher).
- Decisions & gates — after the PM submits gate G1, a card appears in Decisions (question /
options / recommendation / cost of not reworking + an irreversible marker). Click Approve →
second confirmation → the timeline records
gate/approve,doc/export,stage/change, the stage badge moves S1→S2, anddocs/product/prd-refund.mdis generated. - Timeline — filter by type/role; every entry traces back to a session, slice, document version, decision and evidence.
- Live refresh — send a new request in the PM session; the sidebar tree's pending-decision and task states update automatically (SSE pushes revisions, no polling).
What's in this repo
| Path | Contents |
|---|---|
workbench/ |
The plugin — host runtime (29 modules), client bundle (client.js, ~3.7k lines), cordis.patch.yml, 2 presets, 7 skill templates, en/zh locales, scripts, tests |
docs/ |
Design proposals, architecture blueprints, delivery/acceptance notes, plugin development & publishing guide, research |
research/ |
Background research material |
templates/ |
Plugin skeletons: host-bundle/ (host-only) and ui-decoration/ (with Web UI) |
poc/ |
Small platform capability probes |
Key documents
- 📦 Installation, demo & acceptance — start here
- 🏗️ Architecture blueprint v1 · UI architecture
- 📐 Module interface contracts · Implementation notes
- 🧩 DSH plugin development & publishing guide — bundle rules, local debugging, npm/tarball/GitHub/market-index publishing
- 💡 Design proposal · Kickoff prompt
- 🔍 UI extension audit · Platform PoC
- 🧠 Layered/sharded memory research · Git/CI postmortem
Most design documents are written in Chinese; the plugin UI ships both
enandzhlocales.
🧪 Testing
| Suite | Command | Result |
|---|---|---|
| Unit (58 cases across 4 files) | node --test workbench/tests/unit/ |
58/58 |
| 14-step business replay | node workbench/tests/e2e/replay-14-steps.mjs --strict |
17/17 |
| Negative / security | node workbench/tests/e2e/negative.test.mjs |
10/10 |
| UI contract | node workbench/tests/e2e/ui-client.test.mjs |
3/3 |
| Instance scripts | node workbench/tests/e2e/dev-instance.test.mjs |
7/7 |
| Real instance HTTP/SSE | node workbench/tests/e2e/instance-http.mjs |
10/10 |
| Real model end-to-end | node workbench/tests/e2e/live-e2e.mjs |
4/4 |
All executed with the official commands. See implementation notes for evidence and deviations.
Publishing your own DSH plugin
This repo doubles as a working reference. The short version (full details in the guide):
- Copy a skeleton from
templates/→ change package name / patch row ids / locale / icon. - Install into DSH and iterate (
dev-instance.mjs restartafter host/client changes). - Distribute via npm (
pnpm publish), tarball (pnpm pack→ GitHub Release asset), or Git (dsh plugin add github:you/repo, needs a self-containedpreparebuild). - Add the
dsh-plugintopic to your repo, and optionally host a staticindex.jsonmarket index (e.g. GitHub Pages) so users can discover and one-click install it.
Status & roadmap
The plugin is feature-complete for v1 and verified end-to-end (see Testing). Design material is kept as-is to serve as the blueprint and background. Not yet published to npm or a market index — this repository currently distributes source plus a local bundle.
License
MIT © 2026 li pf
中文
这是什么?
DSH 项目工作台(@local/dsh-project-workbench)是 DeepSeek Harness(DSH)
的一个本地 bundle 插件。它把普通工作区变成项目运行时:
- 🗄️ 一个 SQLite 项目库作为唯一事实源 —— 文档、任务、会话、决策、证据、时间线全部存在
.project/project.db;docs/下的 Markdown 只是导出快照(只写不回读)。 - 🧑💼 你只和 PM 对话 —— 唯一的 PM 会话(preset
project-office)理解需求、拆切片,并拉起 任务会话(presetproject-task,命名角色-切片-动作,如产品-refund-PRD)。 角色词表:产品 / UX / 架构 / 码农 / 测试 / 发布 / 复盘。 - 📊 树状驾驶舱 —— 项目面板带阶段徽章、待决策计数,以及概览 / 会话 / 文档 / 决策 / 时间线分页; 通过 SSE 推送 revision 实时刷新(不轮询)。
- 🚦 门禁只能人批准 —— 门禁与不可逆决策只能由人通过面板/HTTP 落定,agent 没有任何代批工具; 不可逆操作需要二次确认。
- 🪶 每会话 ≤2k 上下文预算 —— 分层装载(L0 400 / L1 300 / L2 900,硬上限 2000),超限自动降级并 提示按需查询,而不是一股脑塞满。
工作方式
你 ──▶ PM 会话(project-office)
│ 理解需求 · 拆切片 · 拉起任务
▼
任务会话(project-task) ── 产品-refund-PRD / 码农-refund-API / 测试-refund-e2e ...
│ 通过 project_* 工具读写项目事实
▼
.project/project.db ◀── 唯一事实源
│
├─▶ 驾驶舱面板(树 + 分页,SSE 实时刷新)
├─▶ 决策卡与门禁 ──▶ 只能人批准(不可逆需二次确认)
└─▶ docs/ 导出快照(带 generated 头,只写)
快速开始
环境要求: DSH Desktop >= 0.2.2-rc.1、Node.js >= 20。
方式 A —— 装进 DSH Desktop
打开 DeepSeek Harness → 设置 → 插件(插件管理器);
选择「添加本地插件 / 安装本地 bundle」,路径填本仓库的
workbench/目录:<本仓库路径>/workbench完全退出 DSH(含托盘)后重新打开 —— Host 代码与 preload 列表都在启动时装配;
在目标工作区打开右侧栏「项目工作台」→ 点「初始化项目」;
点「进入 PM 对话」开始对话。
desktop是 Electron 保留 profile,外部 CLI(dsh plugin --profile desktop)会被拒绝, 安装必须在 app 内完成。只读自检(不改~/.dsh):node workbench/scripts/dev-install.mjs check --home "%USERPROFILE%\.dsh" --profile desktop
方式 B —— 隔离实例(推荐先用这个试)
使用独立的 DSH_HOME,不动你的真实 profile:
node workbench/scripts/dev-instance.mjs start # DSH_HOME=<workspace>/.devhome,端口 52999
node workbench/scripts/dev-instance.mjs status --json
node workbench/scripts/dev-instance.mjs restart # 改 host/client 代码后必须重启
node workbench/scripts/dev-instance.mjs stop
隔离实例默认没有模型路由。要验证真实 PM/任务会话,启动时加模型 overlay
(见 workbench/tests/e2e/devhome-model.patch.yml,start 支持 --patch)。
key 从 credentials refs 读取,绝不硬编码。
卸载: 插件管理器移除该 bundle → 完全退出并重启。项目数据留在工作区的 .project/,
删除即彻底清理(建议先备份 project.db)。
10 分钟演示
- 面板 —— 侧栏「项目工作台」:项目头显示项目名 / 阶段徽章 / 待决策数;左树
S1 产品 → 切片; 右侧分页:概览 / 会话 / 文档 / 决策 / 时间线。 - 提需求 —— 点「进入 PM 对话」,对 PM 说:「支付要能退款,先出 PRD」。
PM 会拆切片(
refund)、建任务,并拉起「产品-refund-PRD」任务会话。 - 看任务会话干活 —— 「会话」分页出现行(角色 / 切片 / 模型 / 状态 / 只读提示); 「文档」分页出现 PRD v1(DB 渲染的预览,可切版本)。
- 决策 / 门禁 —— PM 提交 G1 门禁后,「决策」分页出现卡(问题 / 选项 / 推荐 / 不返工后果 +
不可逆标记)。点「批准」→ 二次确认 → 时间线出现
gate/approve、doc/export、stage/change,阶段徽章 S1→S2,并生成docs/product/prd-refund.md。 - 时间线 —— 按类型 / 角色过滤;每条都能追到会话、切片、文档版本、决策、证据。
- 实时刷新 —— 在 PM 会话里发一句新需求,侧栏树的待决策 / 任务状态自动刷新(SSE 推 revision,不轮询)。
仓库结构
| 路径 | 内容 |
|---|---|
workbench/ |
插件本体 —— Host 运行时(29 个模块)、Client bundle(client.js,约 3.7k 行)、cordis.patch.yml、2 个 preset、7 个技能模板、中英 locale、脚本、测试 |
docs/ |
设计提案、架构施工图、交付/验收说明、插件开发与发布指南、研究资料 |
research/ |
背景研究材料 |
templates/ |
插件骨架:host-bundle/(纯 Host)与 ui-decoration/(带 Web UI) |
poc/ |
平台能力小探针 |
关键文档
- 📦 安装 / 演示 / 验收对照 —— 从这里开始
- 🏗️ 架构施工图 v1 · UI 架构
- 📐 模块接口契约 · 实现笔记
- 🧩 DSH 插件开发与发布指南 —— bundle 规则、本地调试、npm/tarball/GitHub/市场索引发布
- 💡 设计提案 · 实现启动提示词
- 🔍 UI 扩展能力审计 · 平台 PoC
- 🧠 分层分片记忆调研 · Git/CI 治理复盘
设计文档以中文为主;插件 UI 同时提供
en与zh两套 locale。
🧪 测试
| 套件 | 命令 | 结果 |
|---|---|---|
| 单测(4 个文件 58 例) | node --test workbench/tests/unit/ |
58/58 |
| 14 步业务预演回放 | node workbench/tests/e2e/replay-14-steps.mjs --strict |
17/17 |
| 负向 / 安全 | node workbench/tests/e2e/negative.test.mjs |
10/10 |
| UI 契约 | node workbench/tests/e2e/ui-client.test.mjs |
3/3 |
| 实例脚本 | node workbench/tests/e2e/dev-instance.test.mjs |
7/7 |
| 真实实例 HTTP/SSE | node workbench/tests/e2e/instance-http.mjs |
10/10 |
| 真实模型端到端 | node workbench/tests/e2e/live-e2e.mjs |
4/4 |
全部以官方命令实跑通过。证据与偏差见实现笔记。
发布你自己的 DSH 插件
本仓库也是一份可运行的参考。简版流程(完整细节见指南):
- 从
templates/复制骨架 → 改包名 / patch 行 id / locale / 图标; - 装进 DSH 迭代(改 host/client 后
dev-instance.mjs restart); - 分发渠道:npm(
pnpm publish)、tarball(pnpm pack→ GitHub Release 附件)、 Git 直装(dsh plugin add github:you/repo,需要自包含的prepare构建); - 给仓库加
dsh-plugintopic;可选再托管一份静态index.json市场索引(如 GitHub Pages), 用户添加索引源后即可搜索 / 一键安装。
现状与后续
插件 v1 功能已实现完毕并端到端验证通过(见测试)。设计资料保持原样,作为施工图与背景。 目前尚未发布到 npm 或市场索引 —— 本仓库当前分发源码 + 本地 bundle。
许可
MIT © 2026 li pf
No comments yet. Be the first to write one.