DeepSeek Harness Machine Learning Phase Gate Plugin (dsh-plugin-ml-phase-gate)

Preface

In the development and iteration of machine learning projects, models or Agents often claim that “data processing is complete” or “the model has converged,” but objective evidence such as split checks, leakage validation, metric files, or validation scripts is frequently missing. This kind of status management based on verbal claims can easily lead to rework or quality issues.

The machine learning phase gate plugin for DeepSeek Harness divides ML projects into M0–M8 stages and shifts status management from “model self-reporting” to an evidence-driven approach. The plugin reads the current declared stage of the project, executes project-provided validation scripts, and calculates the actual stage, gaps, and next exit based on check results and artifact status. Finally, it displays the results intuitively in the DSH interface.

What Is This

This is a machine learning phase gate plugin designed for DeepSeek Harness (DSH), maintained by developer lerqian883-alt.

The core value of the plugin lies in providing a verifiable process management mechanism. It does not write ML code for users, nor does it determine stage completion arbitrarily. Instead, it relies on user-provided validation scripts and artifacts. By reading project status, executing checks, and calculating evidence, it makes “how far along the project is” traceable and verifiable.

The plugin is licensed under the MIT License.

Core Features

  1. Phase Management: Divides ML projects into M0–M8 stages for management.
  2. Status Reading: Reads the current declared stage of the project.
  3. Validation Execution: Executes project-provided validation scripts and check scripts.
  4. Evidence Calculation: Calculates the actual stage, gaps, and next exit based on evidence.
  5. Interface Display: Displays the phase track and audit information in the DSH interface.
  6. Command-Line Tools: Provides commands such as ml_phase_status, ml_phase_phases, ml_phase_advance, and ml_phase_defer.
  7. Project Bootstrapping: Supports creating a standardized project structure using bootstrap.
  8. Cross-Platform Support: Supports verify.cmd, verify.ps1, verify.mjs, and verify.sh as validation entry points.

Installation and Enablement

Before installation, ensure that Node.js 20 or a higher version is installed in the environment.

Use a DSH profile (for example, web) to link the plugin to a local directory:

dsh plugin --profile web add link:"$PWD"

After installation, you can confirm that the plugin has been registered using the following command:

dsh --profile web --dump-config

Typical Usage

  1. Initialize Project Structure
    Run the bootstrap script in the project directory to generate the standard .dsh-ml-phase, work, and outputs directories:
    node scripts/bootstrap-project.mjs --root <path> --template standard
  1. Start DSH
    Enter the project directory and start DSH:
    dsh --profile web
  1. View Current Status
    In DSH, use the command to view the current declared stage, the stage supported by evidence, gaps, and the next stage:
    ml_phase_status
  1. View Phase Definitions
    View phase definitions and evidence-based determination results:
    ml_phase_phases
  1. Advance the Phase
    When all checks and artifacts pass, use the command to advance the phase:
    ml_phase_advance
  1. Record a Deferral
    When manual deferral is needed, record the reason:
    ml_phase_defer reason="等待外部数据确认"

Applicable Scenarios and Notes

This plugin is suitable for machine learning workflows that require strict phase management and evidence tracking.

  • Dependency on User Scripts: The plugin does not write ML code; users must provide validation scripts that follow the agreed conventions.
  • Exit Code Conventions: The validation script exit codes are defined as 0=pass, 1=fail, 2=skip; other values are treated as errors.
  • Default Configuration: The default watchAutoRun setting is false. File changes do not automatically execute scripts; manual triggering is required.
  • Installation Compatibility: Different DSH versions may have differences in installation syntax; rely on the help documentation for your current version.
  • Runtime Permissions: The plugin runs with the permissions of the current DSH process. Ensure that the source code and license have been reviewed before installation.

Conclusion

By transforming phase gates from subjective descriptions into objective checks, this plugin provides a more rigorous development process guarantee for machine learning projects under DeepSeek Harness. For more implementation details and documentation, refer to the project source code.

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

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

Xiaoye