DeepSeek Harness 插件:SuperPowers for DSH

前言

DeepSeek Harness(DSH)採用插件化架構,支持按需擴展能力。obra/superpowers 提供了一套成熟的工程工作流,包含需求分析、代碼審查、Git 交付等環節。Meteor-system/superpowers-for-dsh 旨在將這套工作流帶入 DSH 環境,通過獨立的 bundle 和 preset 提供自動 session bootstrap、原生協作工具集成以及 Windows sandbox 兼容層。

核心功能

該插件提供以下能力:

  • 14 個可按需加載的 skills:覆蓋需求與設計、執行與協作、質量與調試、代碼審查、Git 與交付、Skill 維護等場景。
  • 自動 session bootstrap:會話啓動時自動加載適用 skill,而非將所有內容塞入上下文。
  • DSH 原生計劃與協作工具:集成 plan mode、goal、subagent、workflow、Ralph、todo、background jobs、filesystem、PowerShell 和 Web search。
  • Windows sandbox 兼容層:處理 danger-full-access 模式下的權限字段,確保普通 pwsh、write、edit 調用無需手動添加 sandbox_permissions 或 justification。
  • 可選的 UI/UX Pro Max:提供 domain search、stack search 和確定性的 design-system 生成能力。

安裝與啓用

安裝分爲 bundle 安裝和 preset 安裝兩步。

1. 安裝 Bundle

在終端中運行以下命令,將 bundle 安裝到 DSH profile:

npx @deepseek-ai/dsh plugin --profile web add github:Meteor-system/superpowers-for-dsh

安裝完成後,通過 dsh --profile web --dump-config 確認輸出中包含 superpowers-for-dsh。

2. 安裝 Base Preset

進入倉庫根目錄,運行安裝腳本。默認安裝路徑爲 %USERPROFILE%\.dsh\.agent-presets\superpowers-dsh。

node scripts/install-preset.mjs

升級時使用 --force 參數,安裝器會自動備份舊目錄。

3. 可選:安裝 UI/UX Pro Max Preset

如需使用 UI/UX Pro Max 功能,需額外安裝 variant preset:

node scripts/install-preset.mjs --variant uiux

4. 啓用與重啓

安裝或更新後,必須停止並重新啓動 DSH profile,刷新 Web 頁面,創建新會話,並選擇 SuperPowers for DSH 或 SuperPowers for DSH + UI/UX Pro Max preset。舊會話保留創建時的配置,無法自動驗證新的 bootstrap 或 tool catalog。

典型用法

Base Preset 工作流

新會話啓動後,模型應按照預設流程操作:

  • 新功能開發:brainstorming -> writing-plans -> executing-plans / subagents
  • Bug 調試:systematic-debugging -> test-driven-development -> verification-before-completion
  • Git 交付:requesting-code-review -> finishing-a-development-branch

PowerShell 調用

在 Base preset 下,普通 pwsh 調用無需手動構造 sandbox_permissions 字段,直接調用即可:

{
  "command": "Get-Location",
  "description": "確認當前項目目錄",
  "timeoutMs": 30000,
  "workdir": "D:\\Code\\project",
  "run_in_background": false
}

UI/UX Pro Max 使用

使用 UI/UX 功能需先通過 brainstorming 明確產品定義,再調用搜索和生成工具。

{
  "query": "keyboard focus modal",
  "domain": "ux",
  "max_results": 3,
  "diagnostics": true
}

Stack search 必須單獨調用,不能與 domain 參數混用:

{
  "query": "accessible responsive analytics dashboard",
  "stack": "react",
  "max_results": 3,
  "diagnostics": true
}

3. Generate

需求穩定後生成設計系統:

{
  "query": "SaaS analytics dashboard for business operators",
  "project_name": "Metrics",
  "format": "markdown",
  "variance": 5,
  "motion": 4,
  "density": 5,
  "persist": false
}

Model-facing Schema 約束

ui_ux_search 和 ui_ux_generate 工具的 schema 嚴格限制參數,使用 additionalProperties: false。例如,ui_ux_generate 在非持久化模式下不能包含 page 或 force 字段。

注意事項

  • 獨立實現:這是一個獨立的 DSH bundle,並非 obra/superpowers 或 LayneChai/superpowers-dsh 的 fork。
  • 前置條件:
    • Base preset 需要 DSH Web profile、可運行 Node.js 腳本的環境以及 Git。
    • UI/UX preset 額外需要 Python 3(無需安裝第三方包,環境變量 UI_UX_PRO_MAX_PYTHON 可用於指定路徑)。
  • 工具禁用:當前 preset 中明確禁用了 subagent_codex 和 subagent_claude_code。
  • 返回值規範:工具返回結果必須原樣保留 upstream(含 repository、revision、skillVersion)、sourceIds 和 warnings 字段。
  • Schema 驗證:即使模型參數合法,core 層仍會執行二次輸入規範化和範圍檢查。

總結

SuperPowers for DSH 爲 DeepSeek Harness 提供了一套完整的工程化工作流。它通過 lazy loading skills 和 DSH 原生工具集成,減少了人工干預,並通過 Windows sandbox 兼容層簡化了本地操作。配合可選的 UI/UX Pro Max,開發者可以在本地完成從需求到設計的全流程。

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜