dsh-research-forge: A DeepSeek Harness Plugin for Research Workflows

Preface

DeepSeek Harness (DSH) extends its capabilities through plugins, but the plugins themselves do not directly provide persistence and structured support for research workflows. In interdisciplinary scenarios such as mechanical vibration, non-destructive testing AI, and digital life, researchers often need to carry forward goals across multiple sessions, conduct blind reviews, record negative results, and ensure that papers contain no data leakage or fabricated metrics. The printing10101/dsh-research-forge plugin addresses these workflow challenges directly on the DSH side.

Plugin Positioning

This is a DSH-native host plugin designed for research workflows, maintained by printing10101. It provides 15 research tools, system prompt specifications, and an auto-continuation guard for persistent goals, covering project initiation, blind review, auditing, analogy, experiment logging, and hypothesis evolution. It supports project-level persistent workflows and cross-directory project management.

Core Capabilities

Persistent Goals and Strict Blind-Review Autonomous Loop

The plugin implements an autonomous loop based on DSH’s agent/turn-stopping hook.

  • research_goal_start: Creates and activates a persistent research goal, with configurable budgets (e.g., token/cost) and delivery criteria (e.g., “blind review score >= 80”).
  • research_goal_review: Performs a 100-point blind review across five dimensions on deliverables; if critical flaws exist—such as data leakage, fabricated metrics, or formula-code inconsistency—the total score is automatically capped at 72.
  • research_goal_status: Queries goal status, milestones, pause, resume, or formally close the project; if criteria are not met, closure is hard-rejected.
  • research_goal_usage: Accumulates token/cost usage for the currently active goal and returns remaining budget; only active goals are eligible, and usage must be a non-negative finite number.
  • Auto-continuation guard: Before the goal is met, if the agent attempts to end the turn or stop mid-way, the plugin injects the next revision directive via agent.steer() at the agent/turn-stopping phase, continuously driving progress until the goal is achieved; the user can click Stop in the UI to manually abort.
  • Budget and failure protection: Auto-continuation is not an infinite loop. When iteration count, time, token, or cost budget is exhausted, the goal enters max_iterations_reached or a paused state with a specific reason; consecutive steer failures reaching a threshold trigger a circuit-breaker pause, and failed calls do not consume continuation rounds.

Engineering AI Paper Anti-Padding and Data Leakage Audit

  • research_audit_paper: Performs a deterministic audit based on structured enumeration and boolean values, mandating extraction of physical conditions, data splits, cross-condition validation, statistical significance, and code consistency; all findings are output as findings with verifiable evidence citations, and scores are explicitly labeled as heuristic.

Cross-Disciplinary Mathematical Skeleton Transfer

  • research_cross_analogy: Bridges structural analogies and generates retrieval terms between mechanical vibration (nonlinear dynamics/bifurcation), non-destructive testing AI (inverse problems/sparse weak signals), and digital life (complex systems/self-organized emergence); when no keyword matches, it returns status="no_match" with an empty matchedBridges, no longer defaulting to dumping all skeletons.

Local Experiment Tracking, Negative Result Repository, and Hypothesis Evolution Tree

  • research_lab_log: Automatically captures Git commit/diff snapshots, runtime environment, and artifact SHA256 hashes; records successful experiments, negative results, and unexpected emergences; no longer persists absolute working directories.
  • research_lab_query: Searches across experiments, failure databases, paper audits, hypotheses, and analogy records.
  • research_hypothesis_upsert: Tracks hypothesis evolution states (proposed → testing → supported / refuted / pivoted).

Project-Level Persistent Workflows

The plugin provides a set of project-level workflows for switching between directories and resuming sessions.

  1. Initialize (init): Creates a project in the current directory by passing title, objective, and optionally tags and milestones. The project saves project.json / PROJECT.md and registers in the global index, while also generating the first batch of deterministic action cards.
  2. Open (open): In another directory, locate the project using research_project_list, then use research_project_open to write a local reference containing only projectId. If the current directory already has a local project.json with a different ID, the open operation directly returns PROJECT_ALREADY_EXISTS without writing a project-ref; for the same ID, it only updates the global lastOpenedAt and returns the local project. Once inside the directory, tools will automatically recognize the project; the existing 9 research tools will immediately use the project’s real vault as the read/write location.
  3. Inspect (status): Use research_project_status to read a summary of actual records. The default view="overview" displays objectives, experiments, audits, budget, blockers, timeline, and next steps; view="briefing" returns a concise briefing suitable for session resumption.
  4. Continue (resume): When the user says “continue project” or “keep going,” prefer calling research_project_resume. It syncs actual research records and returns a concise briefing with up to 3 action cards; it presents the rationale, first step, expected output, and risks first, and executes only after user confirmation.
  5. Advance (next): Use research_project_next(action="select", actionId=...) to mark a selected action, then use action="complete" after completion. action="list" refreshes the nextActions generated by deterministic rules, showing only pending / selected actions by default and hiding terminal-state cards; complete still returns the just-completed card. The tool does not automatically execute research actions.
  6. Auto-sync: After successful creation of goals, blind reviews, goal status changes, paper audits, cross-disciplinary analogies, experiment logs, and hypothesis updates, the project timeline is automatically appended and nextActions are synced; research_goal_usage only refreshes budget-related actions without writing to the timeline, avoiding noise from usage records. Once a research record is successfully written, a project sync failure does not reverse the tool result but instead appends “Project sync warning: …” at the end of the return content.
  7. No-project fallback: When no associated project exists, syncProject safely returns an empty result, and the existing tools continue using the current directory vault; read-only operations on project tools return readable messages and do not implicitly create projects.

Host Lifecycle and Dynamic Context

The plugin installs three types of project experience capabilities at the DSH host boundary, while core storage and inference logic remain host-agnostic modules:

  • Dynamic systemPrompt.context: Registers research-forge:project (order 130). Each time the model request assembles context, it reads the project snapshot based on the current agent’s cwd and automatically injects a project briefing of up to 1800 characters; if no project exists or reading fails, it returns an empty string without blocking the existing conversation.
  • agent/created(source="resume"): Only when resuming a session and a project exists, it first syncs the real vault, then injects a single “resume briefing + wait for action card confirmation” directive into that agent. Injection state is deduplicated per agent instance using WeakSet; startup, no-project, or injection failure scenarios do not repeatedly disrupt the host.
  • agent/pre-step: After the host decides to proceed to the next step, it only checks whether the latest user message as a whole matches specific short commands “继续 / 继续项目 / 接着做 / 接着项目 / 恢复项目 / resume / continue” (allowing leading/trailing whitespace and trailing punctuation). Long sentences like “continue explaining the formula” or “continue reading” will not trigger, and historical messages will not re-trigger. If a project exists in the current directory, it syncs the project and appends an action card confirmation directive while preserving other fields in the host decision; the plugin only appends suggestions and does not directly modify files or launch long-running tasks. Exceptions thrown by the host’s next() still propagate upward.

Project Data Model and Directory Binding

  • project.json: Structured project record containing id, title, objective, status, currentFocus, activeGoalId, tags, milestones, blockers, nextActions, timeline, timestamps, schemaVersion, and absolute vaultDir.
  • PROJECT.md: A human-readable overview generated from the same project data, displaying objectives, focus, active goals, milestones, blockers, next action cards, and recent timeline; JSON and Markdown stay in sync via atomic writes and rollback.
  • Directory binding: The project directory directly reads .research-forge/project.json; other directories bind via .research-forge/project-ref.json, which allows only a single projectId field and rejects arbitrary vaultDir path injection.
  • Global registry: projects.json is stored in the global data directory pointed to by DSH_RESEARCH_FORGE_DATA (default ~/.dsh-research-forge/data/), recording project ID, vault path, title, and lastOpenedAt, used for cross-directory list/open.
  • Legacy tool compatibility: Goal, blind review, experiment, audit, analogy, hypothesis, and query tools uniformly select storage location via resolveProjectVaultDir(cwd); when a project exists, it writes to the project’s real vault; when no project exists, it maintains the original working directory vault behavior.

“Suggest + One-Click Execute” Boundary

nextActions are deterministic suggestions based on actual goals, reviews, experiments, blockers, and budgets—not an automatic research executor. research_project_next’s list/select/complete only refresh, select, or complete action states; the plugin does not automatically modify user files, run experiments, call external services, or launch long-running tasks because of generating action cards. When execution is needed, the agent should first present the first step, expected output, and risks to the user, and only call the corresponding tools after receiving explicit confirmation.

Installation and Enablement

The plugin requires Node.js 20 or higher and a DSH host compatible with engines.dsh.

npm install dsh-research-forge

After enabling the plugin’s bundle patch (cordis.patch.yml) in the DSH profile, the host loads the root entry dsh-research-forge and automatically registers tools, system prompts, and the agent/turn-stopping guard.

15-Tool Reference

Tool Purpose
research_goal_start Create and activate a persistent research goal with budget
research_goal_review Perform strict internal blind review and bind deliverable hash
research_goal_status Query, milestone, pause, resume, and close
research_goal_usage Accumulate token/cost and return remaining budget
research_audit_paper Anti-padding, data leakage, and reproducibility audit for papers
research_cross_analogy Cross-disciplinary mathematical skeleton transfer and retrieval term generation
research_lab_log Record experiments, negative results, Git, and artifact provenance
research_lab_query Search project vault and optional global vault
research_hypothesis_upsert Maintain hypothesis evolution and associated records
research_project_init Initialize project, register globally, and return overview
research_project_list List global projects with last-opened timestamps
research_project_open Open a global project and bind to current directory
research_project_status View project overview or concise briefing
research_project_next List, select, or complete next-step action cards
research_project_resume Resume briefing and top-3 action cards on “continue project”

Use Cases and Caveats

This plugin is suitable for research work that requires establishing long-term research goals in DSH, performing strict blind reviews, auditing papers and cross-disciplinary analogies, and recording negative results and hypothesis evolution. The plugin runs with the current DSH process permissions; inspect the source code and license (MIT) before installation.

Closing

dsh-research-forge provides structured support for interdisciplinary research in mechanical vibration, non-destructive testing AI, and digital life through persistent goals with blind-review loops, cross-disciplinary analogies, and a local negative result repository. See the catalog page and GitHub link for more details and source code.

Catalog Page
GitHub

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

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

Xiaoye