dsh-v4-anchor

A deliberately small DeepSeek Harness plugin for one narrow, evidence-backed behavior intervention:

  1. On a top-level standard session using a DeepSeek V4 model, the first request is anchored to the RL-shaped surface used in the published experiments:
    • system prompt: You are a helpful software engineer assistant.
    • tools: platform shell (bash, or pwsh fallback) + str_replace_editor
    • runtime contexts removed for bootstrap
    • automatic AGENTS.md / Skill-catalog user-message injections hidden for bootstrap
  2. After the first durable tool/call, the plugin restores the original Standard prompt, contexts and tool catalog.
  3. On that first promoted request, it adds one explicit capability re-routing reminder so the model re-checks the newly visible Skill catalog instead of continuing with bootstrap-era capability assumptions.

That is all. There is no task classifier, router mode, PTC/Code mode, We-Team protocol, persistent near-field guidance, subagent wrapper, UI, or hot-reload infrastructure.

Why this exists

This package intentionally preserves only a small mechanism with direct experimental evidence rather than tracking the rapidly changing router experiments.

Evidence retained

  • DeepSeek Harness minimal uses the exact one-line persona and a two-tool bash + str_replace_editor composition.
  • dsh-router-standard commit 9cacc362 reported a real-session RL-interface result of 25 steps / 24 tool calls / a 19 KB artifact versus a 101K-reasoning-char / zero-action run under the full polluted system; its API probes also reported 100% tool calls at 18–29K reasoning chars for the RL-shaped surface in that small sample.
  • dsh-router-standard PR #29 demonstrated that AGENTS.md and Skill-catalog injections can contaminate the clean bootstrap request. Its pre-step suppression restored the clean first request and allowed the catalog/loader to return after promotion.
  • A follow-up real session reported that catalog visibility alone does not always force the model to re-run Skill matching after promotion. The one-shot transition cue in this plugin is based on that observation.

Important limitation

The first-turn anchor is evidence for behavior/trajectory steering and action efficiency, not a guarantee of higher final engineering quality. Other real-task data in the upstream discussion show that similar reasoning trajectories can still produce very different artifact quality.

The one-shot promotion cue is experimental: the visibility half (#29) has direct session evidence; the explicit cue itself is a proposed fix for the remaining post-promotion re-routing miss and has not been independently benchmarked here.

Compatibility

Initial target only:

  • DeepSeek Harness 0.1.0-rc.7
  • official standard preset
  • top-level sessions
  • DeepSeek model id containing v4 (for example deepseek-v4-flash / deepseek-v4-pro)

Other presets/models are left alone. Subagent child sessions are left alone.

The bundle mounts the DSH-shipped @deepseek-ai/dsh-tool-str-replace-editor package for the bootstrap surface. It deliberately does not install a second copy: rc.7 profiles resolve in-box DSH packages through the launcher-maintained installation fallback. The plugin hides that extra tool outside the bootstrap request.

Repository metadata

Suggested GitHub repository settings:

  • Description: Minimal first-turn RL anchor for DeepSeek V4 on DeepSeek Harness Standard.
  • Topics: deepseek, deepseek-v4, deepseek-harness, dsh, dsh-plugin, cordis, llm-agent, reasoning
  • Issues: enabled
  • Initial tag after CI passes: v0.1.0

These GitHub fields are discovery metadata, not DSH runtime requirements.

Install

From GitHub after the repository exists:

dsh plugin --profile web add github:Starfie1d1272/dsh-v4-anchor

After npm publication:

dsh plugin --profile web add dsh-v4-anchor

Restart dsh web after installation.

What should be visible

Before the first durable tool call on an eligible session:

system: You are a helpful software engineer assistant.
tools:  bash (or pwsh) + str_replace_editor

agent-instructions and skill-catalog auto-injected messages are filtered from that bootstrap request.

After the first durable tool call:

  • original Standard prompt sections return;
  • original runtime contexts return;
  • original Standard tools return;
  • Skill catalog / skill loader are no longer suppressed;
  • one capability re-routing reminder is appended once.

Tests

No LLM/API calls are made.

npm test

The tests cover bootstrap prompt/tools, context stripping, Skill/AGENTS suppression, promotion restoration, one-shot cue behavior, non-V4 no-op behavior, and subagent no-op behavior.

Credits / provenance

See THIRD_PARTY_NOTICES.md for source and license provenance.

The behavior mechanism is derived from the public experiments and implementation history in:

  • yjh051108/dsh-router-standard (MIT)
  • xiaobright/dsh-anchored-standard (MIT; referenced by the upstream work)
  • DeepSeek Harness official minimal preset (MIT)
  • yjh051108/dsh-router-standard PR #29 for bootstrap AGENTS.md / Skill-catalog suppression

The post-promotion one-shot re-routing cue follows the later real-session observation contributed by Starfie1d1272 on PR #29.

This repository is intended as a small compatibility/behavior patch, not as a replacement for the upstream routing research project.