Files
weichen 4938bd095c Move prompts into a layered data library with trigger-based assembly
Why: prompts lived inline in Go (profile const, subagent string, squad
role one-liners, tool descriptions) - every copy change shipped code,
and task guidance like meeting-minutes quality lived permanently in the
base prompt whether or not the task was at hand.

Evidence: new prompts package tests (library integrity, default
assembly, skill triggering incl. attachment gate and command bypass,
priority supersession, override chain drift, command match, frontmatter
parse); composite make test green; runtime check on a live server
(40 modules across 7 layers, override round-trip, /minutes starts a
run instead of hitting the command bus).

Impact: 40 builtin modules as embed data (5 base + 1 env + 12 task
skills + 10 agent roles + 7 tool descriptions + 3 aux templates + 2
styles); migration v8 adds prompt_modules for user overrides with
basedOnVersion drift markers; ctxasm assembles multi-segment system
messages with per-module observability; subagent/squad/tool copy now
resolve from the library with inline fallbacks; skill commands surface
in the / menu and route to runs; default profile SystemPrompt empties
onto the library base; pins deps/agent-system-core to the contract
commit.

Refs: feature/prompt-library task card; design guide in Documents.
2026-09-30 10:35:23 +00:00

639 B

id, layer, version, title, description
id layer version title description
tool.delegate_task tool 1 delegate_task 工具描述 子代理派生工具的模型侧说明文案

派生一个子代理执行独立子任务(如检索、撰写、验证),返回其结果摘要。适用:目标明确、可独立验收、主对话不必逐步跟进的子任务。参数:name(角色名)、task(子任务描述,要完整自足——子代理看不到主对话)、hint(执行提示,可选)。反模式:把"理解当前问题"这类不可移交的认知工作派出去——理解必须留在主对话;也不要为规避思考而派生空泛任务。