dsh-anchored-standard
Experimental DeepSeek Harness agent presets — one base mode plus two variants — that anchor a session's first model request on the Minimal condition (real Minimal tool schema, no auto-injected context), then promote to a small resident catalog once the session is durable, unlocking heavier Standard tools on demand.
This is a community project. It is not an official DeepSeek preset and is not affiliated with or endorsed by DeepSeek.
Modes at a glance
| Mode | Directory | First model request | Anchor mechanism | Promotion signal | Cost |
|---|---|---|---|---|---|
| Anchored Standard | preset/ |
2 tools (the Minimal pair) | Minimal tool schema | first durable tool/call or assistant/message (promoteOn: either) |
none |
| Zero-Anchored Standard | zero-anchored-standard/ |
0 tools | one fixed anchor turn | the anchor reply (assistant/message) |
+1 model call |
| Whoami Standard | whoami-standard/ |
0 tools | one "你是谁" self-introduction turn | the self-introduction reply (assistant/message) |
+1 model call |
Every mode directory is self-contained and installs alone under whatever id you copy it to (see Install).
Terminology
- trajectory — the style of the model's first reasoning chain. The Minimal condition produces "We need…" first lines; the Standard condition produces "Let me…" ("standard-like") first lines.
- anchor — the first-request conditions that select the trajectory. Issue #11 isolated three levers: the tool schema, the output budget, and the injected reminders.
- bootstrap phase — request #1 of a session: the bootstrap tool pair, no auto-injected context, optional output cap.
- promotion — the durable session event that ends the bootstrap phase.
Base mode: first
tool/callorassistant/message, whichever comes first. Variants: the anchor reply. - durable — recorded in the session event log. Phase state is derived from durable events, so resume and reload preserve it.
- resident catalog — the promoted tool set: the bootstrap pair plus the discovery tools plus every tool the model explicitly unlocked.
- discovery tools —
dev_tool_search,skill_search,skill_load: the on-demand unlock surface for heavier Standard tools. - materialized copy — the committed copy of a
shared/plugin inside a mode directory, generated bynpm run sync.
How it works
The base mode in one request lifecycle (the variants change only the first turn — see their sections):
user's first message
│
▼
┌ request #1 ─ bootstrap phase ──────────────────────────────┐
│ tools : bash + str_replace_editor (Minimal's real pair) │
│ context : no AGENTS.md digest, no skill-catalog reminder │
│ budget : adapter default (`bootstrapMaxTokens` optional) │
└─────────────────────────────────────────────────────────────┘
│ first durable tool/call OR assistant/message
▼ PROMOTION — derived from durable events, resume-safe
┌ request #2+ ─ resident phase ──────────────────────────────┐
│ tools : bootstrap pair + discovery tools + unlocked │
│ context : standard injections restored │
│ budget : adapter default (a cap is stripped on promote) │
└─────────────────────────────────────────────────────────────┘
Three first-request levers decide the trajectory (issue #11):
- Tool schema — the decisive variable at the adapter-default maxTokens (256000). The real Minimal pair anchored 5/5; every standard-family schema fell standard-like 11/11.
- Output budget — a 1024 first-request cap also anchored the trajectory
(26/32), independent of the tool descriptions. The base mode leaves this
lever unset (
bootstrapMaxTokensis opt-in). - Injected reminders — the AGENTS.md/CLAUDE.md digest and the available-skills reminder. With the skill catalog present the anchor did not reproduce at all (0/9); both are stripped during bootstrap.
Why
DeepSeek V4 Pro conditions strongly on the API-visible tool catalog. In the Project2 evaluation, Standard and PTC produced scores of 91 and 92, while the official Minimal preset produced 99 and 96. Permanently staying on Minimal, however, gives up the Standard preset's broader tool set.
Anchored Standard separates initial trajectory selection from later tool use:
- Keep the Minimal complete system prompt.
- Expose the Minimal preset's REAL tool schemas — persistent
bash+str_replace_editor, byte-identical to the official Minimal composition — on the first model request (lever 1 above). - Strip the auto-injected context on that first request as well — the
AGENTS.md/CLAUDE.md workspace digest and the available-skills reminder that
true Minimal never mounts (
suppressedContextSourcesin thetool-bootstraprow; lever 3). User-initiated skill gestures are not filtered, and both injections return unchanged from request #2 on. - After the session records its first durable promotion signal — a
tool/callor the firstassistant/message, whichever comes first — promote to the RESIDENT catalog: the bootstrap pair plus the discovery tools plus whatever the model has explicitly unlocked viadev_tool_search. Dumping the full Standard catalog at promotion pulled the trajectory back to standard-like behavior (the post-promotion regression), so heavier tools —web_search,subagent,workflow, … — stay onedev_tool_searchcall away. Request #1 always sees the bootstrap catalog; request #2 always sees the resident catalog, so a text-only first reply can no longer trap the session in bootstrap. (promoteOnin thetool-bootstraprow selects the trigger:eitherdefault,tool-call, orassistant-message.) - Derive the phase from durable session events so resume and reload preserve it.
The bootstrap catalog is the same on every platform: the Minimal pair
(bash/str_replace_editor). The preset's shell is the persistent PTY bash
(the sandboxed Standard bash row is disabled — both register the bash name
into the same layer, and the tools registry rejects duplicates; Windows never
had the sandboxed bash anyway). pwsh remains available in the promoted
catalog on Windows.
Results
Project2 V4.1b, DeepSeek V4 Pro, reasoningEffort=max, Windows native:
| Run | Ability | Reasoning blocks | we |
let's |
let me |
Visible replies |
|---|---|---|---|---|---|---|
| r1 | 98 | 193 | 179 | 88 | 1 | 1 |
| r2 | 99 | 162 | 165 | 98 | 0 | 1 |
Both runs emitted exactly two tool-catalog snapshots: the two-tool Minimal bootstrap, followed by the 25-tool Standard catalog (these runs predate the post-promotion narrowing to the resident set — see How it works). The result is reproducible evidence for this task, not a claim of universal improvement across models or workloads.
Cross-version evidence (issue #11, Windows + official endpoint, first-request
trajectory only): at the adapter-default maxTokens the Minimal tool schema
anchored 5/5 (We need modify… first lines, we 1.4, let me 0.0), while
pwsh/read, pwsh-only, and sandboxed bash/read all produced standard-like
first lines 11/11 — the tool schema, not the output cap, is the decisive
first-request variable at 256000.
Full methodology and aggregate evidence are in
xiaobright/modeltest.
Configuration reference
All knobs are rows in each mode's agent.cordis.yml. Unknown keys fail at
preset mount.
tool-bootstrap (in preset/agent.cordis.yml; the row must stay FIRST —
waterfall registration order decides the first-request strip):
| Key | Default | Meaning |
|---|---|---|
bootstrapTools |
[bash, str_replace_editor] |
Tools visible on request #1. |
promoteOn |
either |
Promotion trigger: either, tool-call, or assistant-message. |
bootstrapMaxTokens |
unset | Optional output cap for request #1; stripped after promotion. |
suppressedContextSources |
[agent-instructions, skill-catalog] |
source.kind values stripped during bootstrap; [] disables the filter. |
compactionTools |
[] |
Extra tools available between a compaction boundary and re-promotion. |
zero-tool-bootstrap (in zero-anchored-standard/ and whoami-standard/):
suppressedContextSources and compactionTools have the same semantics
(promotion is always the first assistant/message), plus
includeSubagents — whether subagents also take the anchor phase (set true
in whoami-standard, false in zero-anchored-standard).
anchor-turn (in both variants): text — the synthetic first user message
(default "This round is a test. Tools are not open yet; all tools will open
next round." in zero-anchored, "你是谁" in whoami); includeSubagents —
whether subagents also take the anchor turn.
instruction-hint (all modes): promoteOn matching the mode's promotion
semantics (either in the base mode, assistant-message in the variants) —
the one-shot "instruction files exist, read them before acting" hint waits
for promotion.
Repository layout
preset/ Anchored Standard — the base mode
zero-anchored-standard/ variant: fixed zero-tool anchor turn
whoami-standard/ variant: "你是谁" anchor turn, subagents inherit
shared/ single source of truth for plugins used by 2+ modes
scripts/sync-modes.mjs materializes shared/ plugins into every mode dir
test/ zero-dependency test suite (npm test)
verify/ one-shot headless verification runner
Invariants, enforced by npm run check:
- Every mode directory is self-contained: installable by copying it alone;
agent.cordis.ymlrows may reference only./local.mjsfiles, never../. - Plugins shared by several modes live once in
shared/; the copies in mode directories are generated. Editshared/, runnpm run sync, commit both — never edit a materialized copy. - The
tool-bootstraprow stays the FIRST row ofpreset/agent.cordis.yml.
This repository deliberately ships no AGENTS.md/CLAUDE.md: the presets' whole mechanism is a clean request #1, stripping exactly those instruction-file digests from it (issue #6: 0/9 anchored with the injection present). Shipping one would only feed later rounds and contradict the mechanism being documented. Everything an assistant needs is in this README.
Compatibility
Developed and tested against:
- DeepSeek Harness
0.1.0-rc.5 - repository commit
47f9438 - Node.js 24 on Windows
On the 0.1.0-rc.5 source checkout, bootstrapMaxTokens reaches the actual
first request (the first request/header records the cap, adapterDefaults
stays empty), because llm.prepareCall only materializes a default maxTokens
when the proposed config has none. One prebuilt profile package observed in
issue #11 (CLI launcher reporting 0.1.0-rc.6) overwrote the proposed cap
with adapterDefaults.maxTokens; there the cap is a no-op. The default
composition therefore relies on the Minimal tool schema alone (which anchors
at the adapter default with no cap) and leaves bootstrapMaxTokens as an
opt-in for standard-schema bootstraps.
DeepSeek Harness is currently a developer preview and explicitly permits breaking changes. This preset is a full snapshot of the Standard composition, so review upstream changes before using it with a newer release.
Install
Clone this repository, then copy the entire preset directory into the user
preset root under the id anchored-standard. Every mode directory in this
repository is self-contained: the zero-anchored-standard/ and
whoami-standard/ variants install the same way, alone or together, with no
other directory required (see their sections below).
PowerShell:
$target = Join-Path $env:USERPROFILE '.dsh\.agent-presets\anchored-standard'
if (Test-Path -LiteralPath $target) { throw "Preset already exists: $target" }
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $target) | Out-Null
Copy-Item -Recurse -LiteralPath '.\preset' -Destination $target
Linux/macOS:
dsh_home="${DSH_HOME:-$HOME/.dsh}"
mkdir -p "$dsh_home/.agent-presets"
test ! -e "$dsh_home/.agent-presets/anchored-standard"
cp -R preset "$dsh_home/.agent-presets/anchored-standard"
Fully restart DeepSeek Harness, create a blank session, and select Anchored Standard (experimental). Do not switch an active session from a different preset.
Verify
Export the session JSONL and inspect request/header events. Reproduction
checklist (issue #11 asks for the first two explicitly, because both are the
variables that decide the anchor):
- First-request
config.maxTokensvalue: withbootstrapMaxTokensunset (the default), the first header records the adapter default (e.g. 256000 withadapterDefaults.maxTokens: true); with a cap configured it records the cap (e.g. 1024 with no maxTokens adapterDefault). - First-request tool schema source: the first header's
toolsarray must be exactly["bash", "str_replace_editor"]— the official Minimal preset's real schemas, not Standard'spwsh/read. - the first request's messages should contain no AGENTS.md/CLAUDE.md digest and no available-skills reminder — only the user message and the minimal persona system prompt;
- after the first tool call or the first assistant reply, the next changed
header should contain the promoted resident catalog: the bootstrap pair plus
dev_tool_search/skill_search/skill_loadplus any tools the model already unlocked; - subsequent requests should keep that resident set (it grows only through
explicit
dev_tool_searchunlocks) and restore the standard context injections.
Run the local zero-dependency tests with:
npm test
Important behavior
- With the default
promoteOn: either, the session promotes after its first durabletool/callOR its firstassistant/message, whichever comes first — request #1 sees the bootstrap catalog and every later request sees the resident catalog. A text-only first reply therefore still promotes at request #2; setpromoteOn: tool-callto restore the original behavior, where a first response that makes no tool call never promotes. - A failed tool execution still promotes the session because the durable
tool/callalready exists. - The first request's output budget is NOT capped by default: the Minimal tool
schema anchors at the adapter-default maxTokens, so
bootstrapMaxTokensis opt-in. When set, the first request is capped and the cap is explicitly stripped after promotion (the next request's seed proposal carries the previous header's maxTokens forward). - The promoted catalog is the RESIDENT set — the bootstrap pair plus the
discovery tools plus everything the model unlocked via
dev_tool_search— not the full Standard dump. The Standard sandboxedbashrow stays disabled in favor of the persistent shell (same tool name, same layer; see Why). When unlocked, theread/write/edittools keep the sandboxed filesystem whilestr_replace_editoruses the preset's local fs. - A missing bootstrap tool degrades to the full catalog with a one-time
warning instead of failing requests, so a composition drift cannot brick a
session; invalid
promoteOnvalues fail at preset mount instead. - Promotion decisions are memoized per session for the process lifetime; the durable event scan runs once per session per process.
- While a session is unpromoted, the pre-step filter strips messages whose
source.kindis listed insuppressedContextSources(default:agent-instructionsandskill-catalog, the two automatic injections Standard adds over Minimal). Set the list to[]to disable the context filter; add othersource.kindvalues to suppress more. A filter failure degrades to keeping every message rather than eating context. - The tool catalog changes at promotion and again whenever
dev_tool_searchunlocks a new tool; request-prefix cache continuity breaks at those points. - The preset has the same trust level as shell access. Review its files before installation.
- The plugin performs no network requests and adds no telemetry.
Zero-Anchored Standard (experimental)
An extra test mode that does not change the Anchored Standard logic above. It uses the same Minimal-aligned system prompt, but instead of exposing two tools on the first request it injects one fixed zero-tool anchor turn:
- When the user sends their first message, the
anchor-turnplugin prepends a fixed user message — "This round is a test. Tools are not open yet; all tools will open next round." — ahead of it. - The first real model request carries ZERO tools, so the session's first reasoning chain follows the zero-injection "we" trajectory.
- Once that anchor response is durable, the resident catalog is exposed and the real message proceeds with it.
Anchoring on the first message — not on session creation — keeps the blank-session preset switcher usable. Subagents always see the resident catalog.
Measured behavior (opencode-go, DeepSeek V4 Pro, reasoningEffort=max): the
anchor request is stable "we"-style with zero let me; the following
tool-bearing requests return to the "The user wants…/Let me" style. This mode
is a comparison point for whether the zero-tool first turn is worth the extra
model call — not a claim that tool rounds stay "we"-style.
Install as a separate preset id:
dsh_home="${DSH_HOME:-$HOME/.dsh}"
mkdir -p "$dsh_home/.agent-presets"
test ! -e "$dsh_home/.agent-presets/zero-anchored-standard"
cp -R zero-anchored-standard "$dsh_home/.agent-presets/zero-anchored-standard"
Restart DeepSeek Harness, create a blank session, select Zero-Anchored Standard (experimental), then send your first message.
Whoami Standard (experimental)
A usability-oriented variant of the zero-tool anchor idea: the first turn is a natural self-introduction prompt instead of a fixed test message, and the user's real first message is deferred to the next turn. Whatever the user types first, the session warms up exactly one round and everything is ready when the real message is processed:
- When the user sends their first message, the
anchor-turnplugin prepends a fixed user message — "你是谁" (who are you) — ahead of it in thenext-turninbox queue. - dsh claims exactly ONE
next-turnmessage per turn, so the first model request sees only the anchor on an EMPTY tool surface and replies with a self-introduction; that reply is the promotion signal. - The real message is claimed by the NEXT turn, with the promoted resident
catalog (shells,
str_replace_editor, the discovery tools) already unlocked — heavier Standard tools are onedev_tool_searchaway.
The anchor text is configurable via the anchor-turn row's text option
(default "你是谁"). Anchoring on the first message — not session creation —
keeps the blank-session preset switcher usable.
Full-powered subagents
Whoami Standard ships with includeSubagents: true on both the
zero-tool-bootstrap and anchor-turn rows, so subagents spawned from a
session inherit the same anchor flow as top-level sessions:
- A newly spawned subagent's first model request sees only the "你是谁" anchor on an empty tool catalog.
- The subagent's self-introduction reply is the promotion signal.
- The delegated prompt runs on the next turn with the promoted resident
catalog (shells,
str_replace_editor, and the discovery tools).
Set includeSubagents: false on both rows to restore the plain behavior,
where subagents start with the resident catalog immediately. Each subagent
costs one extra model call for its anchor turn — a delegation-heavy session
pays it per subagent.
zero-anchored-standard keeps subagents plain by default; enabling the same
flow there means setting includeSubagents: true on its zero-tool-bootstrap
and anchor-turn rows (its anchor text stays the fixed test notice).
The trade-off of the mode itself is one extra model call per session: the anchor turn is always taken, even when the first message is urgent.
The directory is self-contained; install it alone or alongside any other mode.
Install as a separate preset id:
dsh_home="${DSH_HOME:-$HOME/.dsh}"
mkdir -p "$dsh_home/.agent-presets"
test ! -e "$dsh_home/.agent-presets/whoami-standard"
cp -R whoami-standard "$dsh_home/.agent-presets/whoami-standard"
Restart DeepSeek Harness, create a blank session, select Whoami Standard (experimental), then send your first message — the self-introduction round runs first, and your message is answered with the full tooling on the next turn.
Official ecosystem guidance
DeepSeek currently asks community plugin authors to publish plugins in their own
GitHub projects and add the dsh-plugin
repository topic for discovery. The official repository does not currently
accept external pull requests and does not mandate a community repository
template. See the official
CONTRIBUTING.md.
License
MIT. preset/agent.cordis.yml is derived from the DeepSeek Harness Standard
preset; the original DeepSeek copyright and MIT notice are retained in
NOTICE.
