dsh-router-sci: A DeepSeek Harness Agent Preset for Powder/Multiphase Flow Simulation in Nuclear Engineering

DeepSeek Harness (DSH) champions an “everything is a plugin” philosophy. When handling mixed workflows such as nuclear engineering powder or multiphase flow simulation, developers often face issues including environment splitting (WSL and Windows path confusion), loss of numerical provenance, loose writing discipline, and cross-session fragmentation. dsh-router-sci is an agent preset customized for these scenarios. It bakes environment routing rules, scientific writing discipline, and cross-session continuation mechanisms into the system prompt, enabling the agent to strictly follow project conventions in LAMMPS / Fluent DPM / LaTeX hybrid workflows.

Core Capabilities

Built on top of router-standard from dsh-routing-suite, this preset mainly consists of the following four core modules:

Dual-Environment Tool Routing

The preset defines clear tool routing logic, preventing the agent from executing operations on the wrong environment side or using inefficient 9P paths (UNC paths) for heavy IO operations.

  • WSL side: handles LAMMPS molecular dynamics simulation, Python script execution, and LaTeX compilation. Executed by invoking wsl -d <DISTRO> via git bash.
  • Windows side: handles Fluent batch processing scripts.
  • Heavy IO files: dump files, .trn files, etc. must be read and written within the WSL native directory.
  • Lightweight interaction: 9P paths (UNC / symbolic links) are only used for lightweight interaction between dsh and the environment.

Domain Background Injection

The preset injects domain knowledge of nuclear engineering powder and multiphase flow simulation through persona.config.prefix, requiring the agent to follow physical laws when handling parameters:

  • Microscopic level: involves LAMMPS molecular dynamics simulation, with attention to the restitution coefficient e(v), adhesion/rebound criteria, and the adhesion critical velocity power law model v_crit = A·d_p^B.
  • Macroscopic level: involves Fluent DPM gas-solid two-phase flow deposition, with attention to UDF wall boundary conditions and P2P/P2W restitution coefficient profiles.
  • Simulation-theory correspondence: physical property parameters must be taken from literature or reported values, and conclusions must be cross-validated with simulation results.

Scientific Writing Discipline

The preset enforces a unified seven-section structure for output reports: timeline / problem discovery / parameter space / sensitivity analysis / physical mechanism / engineering significance / follow-up plan. Meanwhile, figure and table styles must be unified (STIX math fonts, 300 dpi, 11pt).

Cross-Session Continuation

Through standardized file naming, state synchronization of the agent across different sessions is achieved. Before starting work, task_plan.md, findings.md, and progress.md must be read, and updates must be written back after completion.

Installation and Activation

This plugin is distributed as plain files and does not require npm installation. Installation steps are as follows:

Prerequisites

  • DeepSeek Harness (dsh) is installed, with a version satisfying 0.1.5-rc.1.
  • dsh only scans the first-level subdirectories under the .dsh/.agent-presets directory, so the installation directory must be named router-sci.

Installation Steps

# 1. Clone the repository
git clone https://github.com/<your-account>/dsh-router-sci.git
cd dsh-router-sci

# 2. Copy to dsh's agent-presets directory
# Windows system
xcopy /E /I . "%USERPROFILE%\.dsh\.agent-presets\router-sci"

# Linux / macOS / WSL system
cp -r . ~/.dsh/.agent-presets/router-sci

# 3. Fill in the configuration (see "Required Placeholders" below)
# 4. Mount and take effect in a new session

Required Placeholders

agent.cordis.yml is a template file containing machine-related path placeholders. It must be replaced with your real environment paths before use.

Placeholder Meaning Example
<PROJECT_NAME> Project name MyThesis
<WSL_DISTRO> WSL distribution name Ubuntu
<WSL_PROJECT_ROOT> Project root directory on the WSL side (absolute path) /home/you/MyThesis
<WIN_PROJECT_LINK> Symbolic link path on the Windows side C:\MyThesis
<ANSYS_INSTALL> ANSYS installation path D:\ANSYS2024R2

{{model}} and {{cwd}} are automatically resolved by dsh at runtime. Please leave them unchanged.

Customization and Maintenance

Customizing the Persona

To adjust the agent’s behavior or writing style, simply edit the persona.config.prefix field in agent.cordis.yml. The stage division and tool unlock order are defined in the STAGES constant of router-bootstrap.mjs.

Version Updates and Caching

dsh uses the ESM module cache mechanism. After modifying the code, new sessions may not load the latest logic. You need to increment the version number N in router-bootstrap-v34.mjs?v=N in agent.cordis.yml, then restart the session for it to take effect.

Relationship with Upstream

This plugin depends on some core files from the upstream project dsh-routing-suite (such as router-core.mjs, gitbash-executor.mjs, etc.). These files are referenced via relative paths and are not installed via npm. If the upstream releases updates, please refer to the NOTICE file to handle version drift.

Known Limitations

  • Skill directory not visible: A deliberate design trade-off of the router series presets is to exclude the skill tool (control-plane tool) to avoid perturbing the reasoning trajectory. Therefore, skills under ~/.agents/skills are not available in the session.
  • POSIX Bash support: agent.cordis.yml already includes the tool-bash-posix line, supporting direct execution on the Linux/macOS/WSL side. The Windows side requires the gitbash-shell group.
  • Version dependency: This preset is adapted to the dsh 0.1.5-rc.1 schema. If the dsh version is too low or too high, persona loading may fail.

License

MIT License. See the LICENSE file.

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

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

Xiaoye