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:

  1. 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.

  2. 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.
  3. 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.
  4. Sub-agent factory
    Supports persistent storage of sub-agents defined in Markdown and YAML Frontmatter. Their scope is divided into plugin (plugin data root directory) and user (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.

  1. Run the installation script. Using the web configuration profile as an example:
    pwsh -File scripts/install-dsh.ps1 -Profile web
  1. 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_HOME environment variable to specify the plugin data directory.
  • Override configuration file location:
    Use the $HARNESS_EVOLUTION_CONFIG environment variable to specify the configuration file path.

Notes

  1. DSH-exclusive compatibility: Starting from v3.0.0, the plugin has removed MiniMax Code compatibility and supports only DSH.
  2. 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 add writes files to $DSH_HOME/profiles/<name>.
  3. Startup behavior: failOnStartupError: true does not abort profile startup; it only marks the plugin as optional and records a warning.
  4. Configuration file changes: Starting from v2.7.0 (unreleased), the old <cwd>/.zcode-plugin/plugin.json fallback file is no longer read.
  5. Default configuration: Auto-approval is disabled by default, and execution failures return the pending state.

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