Files
deepseek-harness/packages/subagent
Tianyi Cui 3f83a4ee96 review: the persona becomes the system-prompt plugin's deployment config
Review round 2 (tianyicui inline comments):

- dsh-system-prompt itself registers the harness:identity (-100) and
  deployment:persona (0) sections — they must survive a swapped loop
  plugin, so they leave dsh-agent-loop; the persona text is the plugin's
  own validated 'persona' config. The model/cwd variables STAY on the
  loop: runtime facts of the agents it drives.
- AgentOptions.systemPrompt is deleted with all its forwarding plumbing:
  the app configs' systemPrompt keys become 'persona' routed through
  dsh-agent-core (schema = z.intersect of the owners'), the ACP bridge
  and tool-subagent stop carrying persona configuration, and subagent
  children now render the deployment persona like every other agent.
- Example personas drop transport/interface trivia (ACP, CLI) — facts
  irrelevant to the model.
- Root CONTEXT.md removed (not idiomatic); its persona definition was
  wrong under the new ownership anyway.
- Docs, READMEs, the prompt-variables RFC, and generated catalogs
  updated; new loop test pins the assemble-waterfall escape valve
  (an emptied assembly sends NO system field).
2026-07-05 23:23:46 +08:00
..

subagent/ — subagent capability family

The subagent seam: an agent delegating work to a child agent. Like the bash and llm families this is a capability seam (see capability seams) — but with one defining difference: multiple provider implementations coexist in one context, registered by name, rather than the single-implementation bash shape. The registry mirrors the LLM adapter registry.

Package Role ctx key
subagent/ Abstract subagent seam: named-provider registry + vocabulary ctx.subagents
subagent-inprocess/ Shared in-process run driver (pure lib; registers nothing)
subagent-spawn/ In-process backend: a fresh child agent (registers on ctx.subagents)
subagent-fork/ In-process backend: a child seeded with the parent's completed-turn prefix (registers on ctx.subagents)
subagent-acp/ Out-of-process backend: a child agent in a spawned subprocess, driven over ACP (registers on ctx.subagents)
tool-subagent/ Model-facing subagent delegation tool over ctx.subagents (registers on ctx.tools)

The interface lives at subagent/subagent/. The in-process subagent-spawn / subagent-fork backends share the subagent-inprocess driver (a pure library — both depend on it, neither on the other), and the out-of-process subagent-acp backend ships alongside them here; the test-only dsh-subagent-mock (in support) is separate. All product packages except the mock.

The proposal and design rationale: docs/rfc/implemented/feature/2026-06-21-subagent-capability-seam.md.