docs(agent): state the persona's template contract in its JSDoc
The AgentOptions.systemPrompt doc said the persona 'may reference'
variables without saying that every complete {{...}} group IS interpreted,
strictly, and that literal {{...}} prose has no escape syntax yet (the
RFC's recorded deferral). A persona author reads this line first; it now
carries the contract. (ds-review-bot inline finding: the escape mechanism
itself stays deferred per the RFC — pre-release, no external consumers,
and the failure is loud with the fix in the message.)
This commit is contained in:
@@ -78,11 +78,14 @@ export interface AgentOptions {
|
||||
/** Model name (must have a registered adapter at call time). */
|
||||
model?: string
|
||||
/**
|
||||
* The agent's persona: a deployment-authored prompt-template fragment,
|
||||
* The agent's persona: a deployment-authored prompt-TEMPLATE fragment,
|
||||
* rendered as the order-0 section of the assembled system prompt (before
|
||||
* all tool guidance). It may reference registered `{{variables}}` (e.g.
|
||||
* `{{model}}`, `{{cwd}}`); it is one section of the full prompt, never the
|
||||
* whole.
|
||||
* whole. Template, not free-form text: every complete `{{…}}` group IS
|
||||
* interpreted, strictly — an unknown or malformed reference fails the turn
|
||||
* loudly — and there is no escape syntax for literal `{{…}}` prose yet (a
|
||||
* deliberate deferral; see the prompt-variables RFC).
|
||||
*/
|
||||
systemPrompt?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user