Introduction¶
The core idea of DeepSeek Harness (DSH) is “everything is a plugin”. As the plugin ecosystem expands, monitoring plugin performance, identifying performance regressions or logic issues, and safely executing iterations without interrupting workflows becomes a challenge in maintaining DSH environments. Existing manual maintenance methods are inefficient and may miss important signals. To address this problem, we need a tool that can proactively scan, monitor, and propose improvements.
Plugin Positioning¶
Harness Self-Evolution Plugin is a DSH plugin natively written in MoonBit. It is responsible for scanning and monitoring installed DSH plugins, proposing evolution plans based on benchmarks and engineering principles, and finally executing them after human review.
- Project name: Harness Self-Evolution Plugin
- Maintainer: Across2005
- Open source license: MIT
- Positioning: Workflow
Core Features¶
This plugin manages the lifecycle evolution of DSH plugins through a set of automated processes:
-
Scanning and monitoring
Scan all plugins installed on the current host under the configured scan root directory, and continuously monitor call latency, success rate, token usage, retry count, and user feedback. -
Signal recognition
The plugin identifies two types of signals to trigger evolution requests:- Strong signals: manual user override, three consecutive failures, latency regression exceeding 20%.
- Medium signals: repeated parameter misuse, detected loops, duplicate preference records.
-
Proposal and execution
- Proposal: propose evolution plans based on benchmarks; the plans must conform to Matt Pocock’s engineering principles.
- Execution state machine: the execution process follows the state transition
pending -> approved -> executing -> completed. - Safety mechanism: auto-approval is disabled by default (
auto_approve: false), and the execution stage remains fail-closed until a transactional sandbox adapter is available.
-
Sub-agent factory
Supports persistent storage of sub-agents defined in Markdown and YAML Frontmatter. Their scope is divided intoplugin(plugin data root directory) anduser(user-level skills directory).
Installation and Activation¶
Installation is performed per DSH tree. After installation is complete, the DSH process must be restarted to load the tools.
- Run the installation script. Using the
webconfiguration profile as an example:
pwsh -File scripts/install-dsh.ps1 -Profile web
- Verify that installation was successful. Check whether the plugin is included in the configuration:
dsh --profile web --dump-config | Select-String 'mcp-harness-evolution'
Typical Usage¶
After installation and restarting DSH, you can override the default data storage and configuration file locations using environment variables:
- Override storage location:
Use the$HARNESS_EVOLUTION_HOMEenvironment variable to specify the plugin data directory. - Override configuration file location:
Use the$HARNESS_EVOLUTION_CONFIGenvironment variable to specify the configuration file path.
Notes¶
- DSH-exclusive compatibility: Starting from v3.0.0, the plugin has removed MiniMax Code compatibility and supports only DSH.
- Installation isolation: Plugin installation is specific to a particular DSH tree (
$DSH_HOME), and different DSH trees do not interfere with each other.dsh plugin addwrites files to$DSH_HOME/profiles/<name>. - Startup behavior:
failOnStartupError: truedoes not abort profile startup; it only marks the plugin as optional and records a warning. - Configuration file changes: Starting from v2.7.0 (unreleased), the old
<cwd>/.zcode-plugin/plugin.jsonfallback file is no longer read. - Default configuration: Auto-approval is disabled by default, and execution failures return the
pendingstate.
Summary¶
Harness Self-Evolution Plugin provides a complete closed loop from monitoring to execution for the DSH plugin ecosystem. Through benchmark-driven proposals and strict human review mechanisms, it ensures the stability and safety of plugin evolution.
- Documentation: https://www.skillhub.cn/plugins/Across2005/harness-self-evolution-plugin
- Source repository: https://github.com/Across2005/harness-self-evolution-plugin