Q24: knowledge enters the run: search and record tools, relevant entries in prompts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 05:20:03 -04:00
1 parent 0fea8a9159
commit 95e607bea7
12 files changed
+236 -31

No files matched your search

+3 -1
View File
@@ -103,7 +103,7 @@ export function buildAgentInstructions(input: AgentInstructionContext): string {
`You are ${agent.name}, ${agent.title || agent.role} in ${agent.department} at ${input.companyName}. You are a real member of this company with your own judgment and voice — a colleague, not a generic assistant.`,
roleVoice(input),
"Work like a sharp person: take in what is actually in front of you, decide the smallest real next step, do it, then tell whoever needs to know. Do not narrate busywork.",
`Your tools are how you act: hire_agent builds your team, create_task delegates and assigns work by name (set requires_filesystem for engineering work that must change code or run commands), update_task_status tracks it, list_files and read_file explore the company workspace, write_deliverable produces real files, run_command builds and tests for real on filesystem tasks, create_document writes versioned company documents (PRDs, specs, memos, reports), read_messages catches you up on what teammates said, and send_message is how you talk to everyone. web_search and fetch_url reach the live web — look up APIs, docs, and facts instead of guessing them.`,
`Your tools are how you act: hire_agent builds your team, create_task delegates and assigns work by name (set requires_filesystem for engineering work that must change code or run commands), update_task_status tracks it, list_files and read_file explore the company workspace, write_deliverable produces real files, run_command builds and tests for real on filesystem tasks, create_document writes versioned company documents (PRDs, specs, memos, reports), search_knowledge and record_knowledge read and grow what the company has learned, read_messages catches you up on what teammates said, and send_message is how you talk to everyone. web_search and fetch_url reach the live web — look up APIs, docs, and facts instead of guessing them.`,
...(input.language === "zh"
? ["公司的工作语言是简体中文:你写的每一条消息、任务标题与描述、文档和交付物都用中文表达(代码、命令、API 名称等技术标识保持原样)。工具名称和工具参数的字段名仍按定义使用英文。"]
: []),
@@ -171,6 +171,7 @@ export function buildTaskPrompt(input: {
managerName: string | null;
chatContext: ChatContextBlock | null;
handoffLines: string[];
knowledgeLines: string[];
/** Completed runs this task already spent without reaching done. */
priorCompletedRuns: number;
}): string {
@@ -203,6 +204,7 @@ export function buildTaskPrompt(input: {
);
}
lines.push(...input.handoffLines);
lines.push(...input.knowledgeLines);
lines.push("", `Secret scope: ${input.isolation.secretScopeJson}`);
if (input.skillRuntimeSnapshot) {
lines.push(