Skip to main content

dsh-requirements-alignment

8Stars0Forks0Issues0Watchers

Prevents goal drift during long task execution: solidifies user requirements as a baseline and only interrupts for confirmation when the execution truly changes direction.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
MIT
Branch
main
agentai-agentcordisdeepseek-harnessdsh-pluginrequirement-alignment

Install

cmdweb profile
$ dsh plugin --profile web add dsh-requirements-alignment

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin jiezeng2004-design/dsh-requirements-alignment for me: review the repository at https://github.com/jiezeng2004-design/dsh-requirements-alignment first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Positioning

A plugin to prevent drift in DeepSeek Harness long-running task execution: solidifies the user's initial requirements into a "baseline" and only interrupts the user when the direction actually changes.

Core Capabilities

  • Silent baseline establishment: solidifies goals, explicit constraints, must-keep behaviors, allowed scope, and finalized user decisions into a traceable baseline
  • Interrupts only on direction changes: initiates a single confirmation only when range expansion, constraint conflicts, user-visible behavior changes, architectural adjustments, data model changes, compatibility breaks, assumption failures, or user direction changes are detected
  • Three runtime modes: Auto (default, strategy+tools+commands all enabled), Manual (tools+commands only), Off (only /align-mode command), supports runtime hot-swapping
  • Provides /align command: view current baseline status, drift count, and recent decisions at any time
  • Provides /align-mode command: switch modes and persist user overrides in DSH Settings
  • Baseline state stored independently in storage-domain sidecar: remains consistent after session recovery, fork, or compression

Technical Implementation

  • Language: TypeScript (ESM, build output to lib/)
  • Key dependencies: @deepseek-ai/cordis, @deepseek-ai/dsh-tools, @deepseek-ai/dsh-storage-domain, @deepseek-ai/schemastery, zod
  • Architecture pattern: injected as a Cordis profile bundle (cordis.patch.yml declares two rows), managed via effect disposer for hot-swapping; canonical state written to storage-domain sidecar rather than session events
  • Entry file: src/index.ts (RequirementsAlignmentController, mounts strategy segment, two tools, three commands), auxiliary modules policy.ts / mode-store.ts / runtime-mode-controller.ts / alignment-state-store.ts

Use Cases

For long tasks, multi-step refactoring, or cross-file changes where you worry that AI might silently change things it shouldn't (like breaking public APIs, modifying UI, or introducing new dependencies) but don't want to approve every detail. This plugin lets you intervene for confirmation only when AI is actually about to change direction. For short tasks or pure typo fixes, the plugin remains completely silent.

Prerequisites and Compatibility

DependencyMin VersionNotes
DeepSeek Harness0.1.0-rc.6Validated on this version's DSH protocol and session event schema
@deepseek-ai/cordis4.xPlugin injected into host via Cordis fiber
@deepseek-ai/dsh-* series0.1.0-rc.6Runtime packages like commands / llm / session / storage / settings
Node.js24+Dev dependency @types/node ^24.0.0, tests use node --test
PlatformWindows / macOS / LinuxWindows validated, no platform-specific code for POSIX paths

Installation

dsh plugin --profile web add dsh-requirements-alignment

Configuration Options

ConfigTypeDescriptionDefault
modeauto / manual / offProfile default mode layer; persisted runtime overrides will override this valueauto
sectionstringOptional deployer-custom policy text to replace built-in Auto mode strategy segment; cannot be empty stringNot set (uses built-in policy)

Note: The actual effective mode value is determined by three layers — persisted runtime override (saved in settings.yaml) → Profile default (mode in cordis.patch.yml) → auto. Hot-swapping via /align-mode auto|manual|off|reset.

FAQ

Q: How is this plugin different from DSH's built-in Plan Mode?

A: Plan Mode reviews "whether the plan is reasonable" before execution; Requirements Alignment monitors "whether we're still doing the right thing" during execution. They can be stacked: first plan and approve, then let the plugin prevent execution from drifting away from the approved direction.

Q: Will it automatically interrupt me after installation?

A: No. In Auto mode, the plugin monitors silently by default and only initiates a single confirmation when execution is about to change task direction (e.g., scope expansion, constraint conflicts, architectural changes, user temporarily changing direction).

Q: Where is the task's "baseline" stored?

A: It's stored in DSH's official storage-domain sidecar (AlignmentStateStore, unit name requirements_alignment, backend storage-json). No alignment/* type events are written to the session event stream, so even if the plugin is uninstalled or bare DSH is used, the session can still be read normally.

Q: How do I switch between Auto / Manual / Off?

A: Run /align-mode auto (or manual / off) in DSH to hot-swap without restarting the profile; /align-mode reset restores to profile default; /align-mode without arguments prints the three-layer snapshot.

Q: Can sub-agents ask users questions?

A: No. DSH sub-agents are not allowed to ask users questions (they receive a DELEGATED_CALLER error). If a sub-agent needs to change the baseline, it writes a "drift candidate" block into the final report for the parent agent, which then executes the drift protocol.

Q: Will uninstalling the plugin lose baseline data?

A: No. Canonical state is stored independently in the sidecar; uninstalling only removes tools, commands, and strategy segments. It won't delete established baselines, drift records, or user decisions.

Q: When should I not use this plugin?

A: Short tasks, pure typo fixes, or clear small-scope bugfixes don't need it — the plugin stays completely silent for such tasks. But this assumes you trust the agent to actively trigger the drift protocol when scope expands.

Learning Curve

Intermediate — the plugin itself has no configuration threshold (default Auto mode works), but understanding the "baseline" concept and drift classification requires reading the strategy documentation first, and the three-layer mode model of /align-mode (profile default / runtime override / effective value) takes some adjustment.

Known Issues and Limitations

  • Soft guidance rather than hard blocking: drift detection is model-judged; the plugin only records and re-aligns, it doesn't block execution; theoretically the model could miss direction changes
  • Natural drift detection rate is not 100%: in natural tasks without explicit protocol instructions, the measured hit rate for mid-task user direction changes triggering report_drift is about 3/4 (per README)
  • /align requires command adapter: UI-less spine (like headless profile, ACP automation) doesn't dispatch slash commands
  • Sidecar only grows, never shrinks: each baseline, drift, decision, and manual check appends a full-state checkpoint, no pruning mechanism, long-running sessions accumulate continuously
  • No Web status card: alignment status can currently only be viewed via /align text or session-level strategy summary, lacks native Web settings panel
  • No session-level mode support: /align-mode changes shared profile/runtime overrides, not individual session settings; session-level mode selector planned for v0.4.0 (see docs/ROADMAP.md)
  • Sub-agents cannot ask users: see FAQ

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/jiezeng2004-design/dsh-requirements-alignment)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory