A prompt is not one string
Stable identity, dynamic context, variables, tool schemas, and call config form a reconstructable EpochHeader
sections + variables + contexts + tool schemasHow can plugins add model-visible context without everyone editing one systemPrompt?
It is a newsroom: desks contribute independently, an editor lays them out by public order and scope, and each edition preserves the full front-page snapshot.
Mechanism
ctx.systemPrompt registers sections, contexts, variables, and tool-schema providers. Every step assembles a deterministic snapshot; same-name agent-scoped contributions can shadow deployment defaults.
Call config, rendered system text, and tool schemas are logged as request/header. A change snapshot is written only when the envelope changes, keeping requests reconstructable from log plus code.
Collect contributions
Resolve sections, variables, and schemas by scope.
What extensions must preserve
- Tool visibility, schema, and guidance must stay synchronized
- Ordering is part of the public protocol
- Request headers log full snapshots, not incremental patches
The tempting wrong turns
- ×Putting dynamic file content into stable persona
- ×Silently rendering missing variables as empty
- ×Reusing an old request header after tool restrictions change
Do not trust the conclusion—verify it
These anchors are pinned to official deepseek-harness@47f9438; account for later breaking changes when reading current upstream.
Pause for ten seconds before revealing
Why do tool schemas belong to prompt assembly rather than only Tools?
The assembled request enters the LLM seam. Next we see how one streaming vocabulary isolates provider differences.