diff --git a/packages/team/tool-agent-team/README.md b/packages/team/tool-agent-team/README.md index 4f07156a0e..17c3751fac 100644 --- a/packages/team/tool-agent-team/README.md +++ b/packages/team/tool-agent-team/README.md @@ -126,7 +126,7 @@ Every Team member's system prompt carries one `team:policy` section; the Lead an ```markdown Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer. diff --git a/packages/team/tool-agent-team/README.zh.md b/packages/team/tool-agent-team/README.zh.md index e459a6a512..2cda197ded 100644 --- a/packages/team/tool-agent-team/README.zh.md +++ b/packages/team/tool-agent-team/README.zh.md @@ -126,7 +126,7 @@ kind: "package-reference" ```markdown Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer. diff --git a/packages/team/tool-agent-team/src/index.ts b/packages/team/tool-agent-team/src/index.ts index b007e7bf6a..141841f1e4 100644 --- a/packages/team/tool-agent-team/src/index.ts +++ b/packages/team/tool-agent-team/src/index.ts @@ -26,7 +26,7 @@ const REMOVED_CONFIG_KEYS = ['interrupt', 'freshProvider', 'forkProvider'] as co /** Model-facing collaboration guidance shared by Lead and teammates. */ const TEAM_POLICY = `Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer. diff --git a/packages/team/tool-agent-team/tests/tool-team.spec.ts b/packages/team/tool-agent-team/tests/tool-team.spec.ts index 879015eb64..4ccafc6d92 100644 --- a/packages/team/tool-agent-team/tests/tool-team.spec.ts +++ b/packages/team/tool-agent-team/tests/tool-team.spec.ts @@ -878,7 +878,7 @@ describe('dsh-tool-team', () => { const system = request.messages.find(message => message.role === 'system') const prompt = system?.content.flatMap(block => block.type === 'text' ? [block.text] : []).join('\n') expect(prompt?.includes('Agent Teams is available')).toBe(enabled) - expect(prompt?.includes('Record expected write scopes on shared tasks')).toBe(enabled) + expect(prompt?.includes('record expected write scopes on shared tasks')).toBe(enabled) expect(runtimeContextText(request)).toContain(leadIdentity(lead)) const contexts = request.messages.findLast(message => message.source?.kind === 'runtime-context')?.source const initial = adapter.requests[0]!.messages.findLast(message => message.source?.kind === 'runtime-context')?.source diff --git a/snapshots/sdk/team-default-enabled/system-prompt.1.expected.md b/snapshots/sdk/team-default-enabled/system-prompt.1.expected.md index 05dc468460..6bc005a47c 100644 --- a/snapshots/sdk/team-default-enabled/system-prompt.1.expected.md +++ b/snapshots/sdk/team-default-enabled/system-prompt.1.expected.md @@ -4,7 +4,7 @@ You are a coding agent powered by the deepseek-v4-flash model. Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer. diff --git a/snapshots/sdk/team-default-enabled/system-prompt.expected.md b/snapshots/sdk/team-default-enabled/system-prompt.expected.md index 05dc468460..6bc005a47c 100644 --- a/snapshots/sdk/team-default-enabled/system-prompt.expected.md +++ b/snapshots/sdk/team-default-enabled/system-prompt.expected.md @@ -4,7 +4,7 @@ You are a coding agent powered by the deepseek-v4-flash model. Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer. diff --git a/snapshots/sdk/team-session-mode/system-prompt.expected.md b/snapshots/sdk/team-session-mode/system-prompt.expected.md index e68dad9cc3..95ecd38121 100644 --- a/snapshots/sdk/team-session-mode/system-prompt.expected.md +++ b/snapshots/sdk/team-session-mode/system-prompt.expected.md @@ -18,7 +18,7 @@ You are a coding agent powered by the deepseek-v4-flash model. Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer. diff --git a/snapshots/session/team-session-mode/system-prompt.expected.md b/snapshots/session/team-session-mode/system-prompt.expected.md index 68747cdffd..e6a93d402f 100644 --- a/snapshots/session/team-session-mode/system-prompt.expected.md +++ b/snapshots/session/team-session-mode/system-prompt.expected.md @@ -24,7 +24,7 @@ Verify your work by running the code or tests. Keep answers brief and factual. Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer. diff --git a/snapshots/session/team-targets/system-prompt.expected.md b/snapshots/session/team-targets/system-prompt.expected.md index 197e56b936..f6ad8f54b0 100644 --- a/snapshots/session/team-targets/system-prompt.expected.md +++ b/snapshots/session/team-targets/system-prompt.expected.md @@ -7,7 +7,7 @@ Verify your work by running the code or tests. Keep answers brief and factual. Agent Teams is available in this session. -Record expected write scopes on shared tasks and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. +Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. The root agent must wait for required teammates before giving the final answer.