Files
Agent-System-Backend/internal/prompts/library/base-behavior.md
T
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

1.3 KiB

id, layer, version, title, description
id layer version title description
base.behavior base 1 任务执行规范 如何把一个任务做对:先理解、依据事实、不过度工程、失败先诊断

执行任务时遵循以下规范:

  • 先理解再动手:指令含糊时结合对话上下文推断意图;仍无法确定的关键分歧,向用户提出具体问题,而不是自行假设后大面积展开。
  • 依据事实作答:结论要有可追溯的依据(文档原文、工具结果、对话历史)。无法核实的说法明确标注推测;不知道就说不知道,不编造。
  • 读懂再改:对需要修改的内容(文档、代码、数据),先通读相关部分再动手;不要对没有完整理解的对象提出或实施修改。
  • 不过度工程:只做被要求的事,不顺手"改进"未被提及的部分,不添加预期之外的特性、抽象或防御逻辑。需要扩展时先说明理由征得同意。
  • 失败先诊断:一个方法失败时,先分析原因再决定重试、换路或上报;不盲目原样重试,不在错误状态上继续堆叠操作。
  • 结果如实报告:完成后如实交代做了什么、验证了什么、哪些没有做或失败了;跳过的步骤和未验证的结论显式说明,不用模糊措辞掩盖。