前言¶
在 DeepSeek Harness(DSH)裏跑 superpowers 一類工作流時,智能體常會彈出「請批准計劃」的提問卡片。卡片上往往只有一行 path: …\plans\feature.md 和兩個按鈕,要弄清自己在批准什麼,只能自己去打開那份 Markdown。多窗口、多路徑切換,既慢也容易漏看細節。
下面介紹社區插件 @andrewhmir/dsh-plan-review:它在 Web GUI 裏接管 Composer,把完整計劃 inline 渲染出來,並在批准前支持劃詞批註。維護者爲 andrewhmir,倉庫見 GitHub,目錄頁見 SkillHub。插件分類爲客戶端,與 DSH 自帶的 plan-mode 審查(如 exit_plan_mode、architect preset)是不同入口,本插件專門對接 superpowers 的 [plan-review] 協議。
這是什麼¶
@andrewhmir/dsh-plan-review 是面向 DeepSeek Harness 的非官方社區 bundle:聲明 dsh.bundle.patch,含一條 id: plan-review 的 client+host 插件行。一句話定位:在 dsh web 裏,當提問符合 [plan-review] 協議時,用 Composer 全屏展示計劃 Markdown,頂欄提供 Accept / Revise,正文支持選中段落添加可編輯評論。
核心功能¶
觸發條件來自 harness 的 ask_user_question:單個問題的 header 以 [plan-review] 開頭,且最多兩個選項、非多選;否則仍走內置卡片。
| 能力 | 行爲(據 README) |
|---|---|
| 計劃來源 | 問題正文第一行爲 path: <絕對路徑 .md> 時,經插件 host 路由只讀讀取;無 path: 時整段問題文本即計劃 |
| 展示 | Composer 接管:固定決策欄、可滾動正文、評論側欄 |
| 批註 | 選中計劃文字 → Add comment;評論錨定在引用片段,可編輯、刪除、再次定位 |
| Accept | 使用問題裏 accept 類選項的原文標籤作答;若仍有評論或總備註,本地拒絕 Accept,避免反饋被靜默丟棄 |
| Revise | 至少一條評論或總備註後,在答案 custom 中回傳 {decision, comments, note};無反饋時本地拒絕 |
| 草稿 | 評論與總備註存在當前瀏覽器標籤的 session storage,關閉再開審查不丟;作答後清空 |
| 兜底 | 計劃不可讀或未 claim 成功時,退回內置卡片或 inline 錯誤,仍可作答 |
| 快捷鍵 | Ctrl/Cmd+Enter 接受;Escape 取消待提交的選區 |
| Close | 不答題關閉審查,等同內置卡片的 discuss 行爲 |
Host 側提供 loopback 只讀接口:GET /plan-review/file?path=… 讀 UTF-8 計劃(限制在工作區根與 sandbox 策略內);GET /plan-review/ping 作存活探測。客戶端在 conversation.composer 鏈上 priority: -20 註冊,優先於內置 question composer。面板 UI 文案爲英文;包內 locale 含 en 與 zh 元數據。
依賴與協作方:
- DSH
>= 0.2.1-rc.2,且使用 Web GUI(dsh web)。 - superpowers 工作流中的
superpowers-uiskill(位於$DSH_HOME/skills/)負責發出本插件所渲染的[plan-review]協議。 - Node.js 22+ 僅用於測試與 client 構建;插件運行時落在 harness 進程內。
安裝與啓用¶
安裝後必須重啓 dsh web,否則進程仍持有安裝前的模塊圖。
從插件市場¶
啓用 DSH 自定義插件市場,在索引中加入列出本包的社區源(倉庫帶 dsh-plugin GitHub topic 便於發現),在 Discover 中安裝 @andrewhmir/dsh-plan-review。
通過 agent / 命令行¶
指定版本安裝 bundle(README 原文):
plugin_manager install_bundle target: @andrewhmir/dsh-plan-review@0.1.0
本地目錄安裝(路徑改爲你的絕對路徑):
plugin_manager install_bundle target: /absolute/path/to/dsh-plan-review
安裝後確認¶
dsh --profile web --dump-config
期望退出碼 0,且出現 id: plan-review / name: @andrewhmir/dsh-plan-review,無 not found、unknown key、cannot resolve 等行。
可選配置¶
插件行可設一項(無獨立 Config schema):
- insert:
- id: plan-review
name: '@andrewhmir/dsh-plan-review'
config:
maxPlanBytes: 2000000 # 單文件讀取上限,默認 2 MB
典型用法與協議¶
智能體側提問示例(README 摘錄):
{
"id": "plan-review",
"header": "[plan-review]",
"question": "path: C:\\ws\\.superpowers\\plans\\feature.md\nReview the plan below.",
"options": [
{ "label": "Accept plan", "description": "Start executing the plan as written." },
{ "label": "Revise plan", "description": "Incorporate my comments and show me the updated plan." }
]
}
用戶在 Composer 中閱讀渲染後的計劃:無異議則 Accept;需修改則劃詞加 comment 或寫總備註,再 Revise。純決策時結果爲 selected: ["Accept plan"](標籤以問題 options 爲準)。帶批註時 selected: [],custom 爲 JSON 字符串,含 decision、comments(quote + note)及插件擴展的 overall note;智能體應在計劃文件中定位各 quote、應用 note 後重寫計劃並再次提問。插件只渲染與回傳答案,不修改計劃文件。
適用場景與注意¶
適合:已在 DSH Web 中使用 superpowers / superpowers-ui,且頻繁遇到 [plan-review] 批准步驟的開發者——希望在同一界面讀完計劃、批註後再決策,而不是反覆打開磁盤上的 .md。
務必知曉:
- 計劃文件必須在 profile 註冊的 workspace 根之下;路徑外的文件會被拒絕(錯誤中會給出路徑)。
- 僅服務 markdown/text 類計劃擴展名;過大或二進制等會被 host 拒絕。
- 插件以當前 DSH 進程權限運行;安裝前請閱讀 源碼與 MIT 許可證,自行評估信任邊界。社區目錄 SkillHub 與 DeepSeek / 幻方無官方從屬關係,DSH 生態強調「一切皆插件」,本包爲社區貢獻而非官方內置能力。
已知限制:不覆蓋 harness 原生 plan-mode 審查界面;只處理 [plan-review] 協議。
結尾¶
@andrewhmir/dsh-plan-review 把「批准計劃」從「看路徑、開文件」收成「Composer 內聯全文 + 劃詞評論 + Accept/Revise」。安裝 bundle、重啓 dsh web、確認 plan-review 行生效後,與 superpowers-ui 聯用即可。
- 目錄頁:https://www.skillhub.cn/plugins/andrewhmir/dsh-plan-review
- GitHub:https://github.com/andrewhmir/dsh-plan-review