Introduction¶
The plugin mechanism of DeepSeek Harness (DSH) allows developers to customize Agent behavior. In common Agent workflows, top-level Agents often call tools directly (such as reading files, searching the web, or executing code). The dsh-outsourcing-expert plugin provides a set of presets that compel the top-level Agent to refrain from executing any non-management tool calls; all specific work must be delegated to subagents via subagent.
Core Mechanism: Hard Interception and Delegation¶
This plugin intercepts tool calls at the tools/pre-execute stage.
For non-management tools (read, write, pwsh, bash, grep, web_search, workflow, skill, etc.), the plugin directly returns { kind: 'deny' } and requires the Agent to outsource the task using subagent or subagent_fork instead.
The only permitted “management” tools include:
* Communication & Planning: ask_user_question, todo_write, exit_plan_mode
* Goal Management: get_goal, create_goal, update_goal (must ask subordinates for suggestions first)
* Delegation Operations: subagent, subagent_fork
* Caring for Subordinates: list_subagent_models, list_agents, send_message, interrupt_agent
Subagents are not subject to the same interception restrictions.
Reconnaissance and Capability Table¶
Before the first delegation, the plugin requires a “reconnaissance” process to establish a capability table of available models.
- List Models: Call
list_subagent_modelsto obtain the list of authorized models. - Online Research: Randomly select a model as a “scout” to query the specialties and reputation of various models via
web_search, and organize the results into a capability table in a fixed format. - Cache Results: The reconnaissance results are persisted to
<DSH_HOME>/outsourcing-expert/models.json(i.e., the~/.dshdirectory). - Subsequent Use: Future sessions read this JSON file directly without repeating the online search.
This capability table is used solely as a basis for selection and is not displayed directly to the user.
Three Preset Modes¶
The plugin package declares three Agent presets, differing in selection rules and discipline intensity:
outsourcing-expert¶
Standard mode. Selects the most suitable model from the capability table based on task type and difficulty. Difficulty levels are graded as: Easy (lightweight and fast), Medium (balanced), Hard (code specialization), and Extremely Hard (flagship strong reasoning).
outsourcing-expert-reverse¶
Reverse mode. The configuration item reverseHiring is set to true. It intentionally selects models from the capability table that are “unsuitable” for the task to perform the delegation.
leader¶
Configuration item mode: leader. Does not hard-intercept any work tools, retaining the Agent’s identity as an executor. The plugin functions only as an executor + delegator and injects the same global capability table for its reference.
Installation and Activation¶
Install using the official npm package:
dsh plugin --profile <profile> add dsh-outsourcing-expert
After installation, start a new session and select the corresponding preset. This plugin is only effective for sessions that declare these three presets; other presets are completely unaffected.
Notes¶
- First Use: Reconnaissance must be completed once before the first delegation can be initiated.
- Leader Mode Differences: Leader mode does not hard-intercept; it only provides the capability table for reference. Specific discipline is still subject to the Agent’s own compliance.
- Cache Management: The capability table cache is managed automatically by the plugin. You can check the cache status via the command
/outsourcing-models, or clear it with/outsourcing-models-clear.