- Главная
- Плагины
- Безопасность и права доступа
- dsh-plan-adversarial
dsh-plan-adversarial
gendui123/dsh-plan-adversarial
Command-triggered red/blue adversarial review for ANY plan (not quant-specific). /plan-adversarial <plan>: arms a gate that requires the agent to derive two independent subagents (red=attack, blue=defend), have them converge on a consensus plan with NO th
Установка
dsh plugin --profile web add github:gendui123/dsh-plan-adversarialREADME
dsh-plan-adversarial
Command-triggered red/blue adversarial review for ANY plan (domain-agnostic), for DeepSeek Harness. Unlike dsh-adversarial-review (which is quant-specific: design/backtest/report), this plugin reviews any plan via a general-purpose red/blue debate that self-converges — no third-party referee.
Trigger
/plan-adversarial <被审plan/内容>
The command appears in the command bar (slash-menu) automatically once registered (zero UI-source changes). It arms a gate for the calling agent.
Mechanism
/plan-adversarial <brief>arms the gate and stores the brief.- The gate injects a red/blue adversarial task into the agent's next step:
- 红队 (red / attacker): find holes — unclear goal, suspicious implicit assumptions, counterexamples/boundaries/failure conditions, broken evidence chain, poor executability, missing rollback. Never defend.
- 蓝队 (blue / defender): defend the plan, rebut red point by point, and repair/harden it against every valid attack.
- The two converge directly (multi-round). No third-party referee — convergence is reached by red and blue themselves, not adjudicated by the main agent. The main agent only orchestrates (dispatches, transcribes disagreement, summarizes the consensus) and never judges win/loss.
- Gate enforcement: while pending, every non-investigative tool call is denied (investigation, subagent-spawning, and asking the user remain allowed). The gate lifts only when the reply text contains a
🛡️ 对抗结果marker that also has a结论:line. - Anti-loop:
maxRounds(default 2) caps adversarial rounds per trigger; past the cap the gate force-releases and the unresolved disagreements must be reported honestly. A user interjection resets the gate.
Install (this workspace)
Registered in dsh-home/profiles/web/package.json (file: dependency + dsh.profile.bundles). cordis.patch.yml mounts the plugin row via dsh.bundle.patch. After adding a new bundle, run pnpm install in the profile dir, then restart the backend.
Config (cordis.patch.yml)
- insert:
- id: plan-adversarial
name: dsh-plan-adversarial
config:
enabled: true
maxRounds: 2
enabled: master switchmaxRounds: adversarial-round cap per trigger (anti-loop)allowlist: extra tools allowed while pending (default includes subagent/subagent_fork/workflow/explore and all read-only investigation)conclusionPatterns: extra phrases that keep the gate armed
Fail-safe
apply wraps applyInner in try/catch, so a bug here disables only this plugin (console.error) and never prevents the harness from booting.
Relationship to dsh-adversarial-review
dsh-adversarial-review: quant-specific red-team gate (design/backtest/report), single reviewer, referee-by-protocol.dsh-plan-adversarial: generic plan review, red + blue converge with no referee, command-triggered.
Похожие плагины
api-relay-audit
toby-bridges/api-relay-audit
dsh-auto-review
perrylink/dsh-auto-review
dsh-claude-ux
eri64/dsh-claude-ux
dsh-remote
xgone/dsh-remote