dsh-pstack: pstack Runtime Guardrails for DeepSeek Harness

Introduction

The philosophy behind DeepSeek Harness (DSH) is “everything is a plugin.” Developers want to transform certain rules from prompt text into runtime capabilities that models cannot bypass. pstack is a rule set for poteto-mode, containing 58 skills, 5 sub-agent presets, and a visual system—but it was originally just text prompts. dsh-pstack wires these rules into DSH’s tool guards, session event stream, sub-agent and scheduled patrol pipelines, enabling rules to be enforced at runtime.

What Is This

dsh-pstack is a workflow plugin for DeepSeek Harness, maintained by qybaihe. It extends the rules and skills of poteto-mode into executable DSH plugin rows, providing command guardrails, a Playbook engine, TDD write gates, a decision ledger, a multi-model panel, a Hillclimb experiment bench, unattended self-evolution, and the Potato visual UI.

Core Features

  • Root Row & UI Host: Registers 5 Agent Presets (poteto-agent, comment-sicko, pstack-adversary, pstack-judge, pstack-worker), pstack session projections, DSH tool name adaptation prompts, the /pstack RPC channel, and the ./client browser package.
  • Skill Catalog: Provides all 58 pstack skills, 22 Playbooks, and 24 engineering principles. Retains the disable-model-invocation policy. Simply type /poteto-mode to activate.
  • Command Guardrails: Intercepts bash/pwsh, rejects git add -A, git commit -a, and draft PRs (suggesting correct alternatives), triggers approval before force-push, publish, or deploy. Supports babysit force-push escalation rejection and /correct online hot-reload.
  • Playbook Engine: Detects active Playbooks and synchronously writes to native todo_write with step progress. Provides the pstack_step tool and /playbook command. Locks down write tools during investigation; forbids all force-pushes during babysit.
  • TDD Write Gate: Controlled solely by user-initiated /tdd on|off|status and the sidebar toggle. Rejects production code writes until a failing test is observed (allows test files, documentation, and .audit/). Listens to test runs and automatically progresses red-pending → red-observed → green.
  • Decision Ledger & Audit: pstack_log dual-writes to storageDomain and .audit/decisions.tsv. pstack_no_comments (Comment Sicko) performs annotation auditing. agent/turn-stopping intercepts “cite-before-read” principle violations and unevidenced decision rows before the turn ends.
  • Multi-Model Panel: Concurrent queue with independent git worktree lifecycle. pstack_arena (cross-vendor judge verification and pstack_arena_adopt), pstack_interrogate (host-machine command reproduction, eliminating fabricated defects), pstack_swarm (single re-dispatch on missing SHA/approach and gap flagging).
  • Hillclimb Experiment Bench: SHA-256 frozen baselines and gate files with tamper-write rejection (PSTACK_BENCH_FROZEN). pstack_bench and pstack_attempt perform multi-round sampling to compute median and scaled MAD. Commits by path only if a significant improvement is observed and all gates are green; otherwise performs a clean rollback.
  • Unattended Operation & Self-Evolution: pstack_autopilot and /autopilot (integrates with ctx.goals and ctx.schedule; stuck sub-agent detection, interruption, and handoff replacement; consecutive verified PR stack checks; checkpoint recovery). pstack_ketchup catches up on decision cards. pstack_correct and /correct enable rule hot-reload and persistence.
  • Potato Web/Desktop UI: Covers all 8 UI slot categories: fries progress bar above the input box, left-side poteto badge, new-session Playbook shortcut capsules, right sidebar with four tabs (Playbook / Panel / Bench / Log), session list tail badges with hover previews, 7 dedicated tool cards, a Plugins row configuration form (including command dry-run simulator and seat preview) and an enable-welcome card. Supports dark/light themes and bilingual (Chinese/English) display.

Installation & Activation

Requires Node 24.9+ and DeepSeek Harness >=0.2.2-rc.0 <0.3.0.

git clone https://github.com/qybaihe/dsh-pstack.git
cd dsh-pstack
pnpm install && pnpm run build

Install into DeepSeek Harness Desktop configuration (or replace “desktop” with “web”):

dsh plugin --profile desktop add -w ./dsh-pstack

If using the built-in CLI on the macOS desktop app, you can invoke it directly:

"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" plugin --profile desktop add -w /path/to/dsh-pstack

Once installed, you can individually enable/disable all 9 plugin rows in Settings → Plugins, and visually configure pstack-guard (command guardrails + real-time dry-run simulator) and pstack-panel (multi-model seat pool + cross-vendor judge preview). Start a new session and type /poteto-mode to begin, or simply click the Playbook capsule on the welcome page.

To override row-level configuration in your own cordis.patch.yml:

- id: pstack-guard
  name: '@qybaihe/dsh-pstack/guard'
  config:
    protectedBranches: [main, release]
    askPatterns: ['^make deploy\b']

Typical Usage

  • Enable poteto-mode: Start a new session and type /poteto-mode.
  • Check current TDD status: Type /tdd status.
  • View current Playbook progress: Type /playbook.
  • Run a multi-model experiment: Select pstack_arena or pstack_interrogate in the panel.
  • Hot-reload rules: Type /correct to trigger a rule update.

Use Cases & Notes

Suitable for developers who need to convert poteto-mode rules from prompts into runtime capabilities, require command guardrails and TDD gates, or wish to perform multi-model experiments and Hillclimb optimization. The plugin runs with the current DSH process permissions—review the source code and license before installing. Licensed under MIT. Upstream skills originate from backnotprop/pstack (MIT licensed).

Short Closing

dsh-pstack brings poteto-mode rules into DSH’s runtime pipeline, providing command guardrails, TDD gates, a Playbook engine, a decision ledger, a multi-model panel, a Hillclimb experiment bench, unattended self-evolution, and the Potato UI. For more details, see the catalog page and the GitHub repository.

Catalog Page

https://www.skillhub.cn/plugins/qybaihe/dsh-pstack

GitHub

https://github.com/qybaihe/dsh-pstack

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

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

Xiaoye