mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 14:04:41 -07:00
feat(core): Enable generalist agent (#19665)
This commit is contained in:
@@ -24,8 +24,7 @@ export const GeneralistAgent = (
|
||||
name: 'generalist',
|
||||
displayName: 'Generalist Agent',
|
||||
description:
|
||||
"A general-purpose AI agent with access to all tools. Use it for complex tasks that don't fit into other specialized agents.",
|
||||
experimental: true,
|
||||
'A general-purpose AI agent with access to all tools. Highly recommended for tasks that are turn-intensive or involve processing large amounts of data. Use this to keep the main session history lean and efficient. Excellent for: batch refactoring/error fixing across multiple files, running commands with high-volume output, and speculative investigations.',
|
||||
inputConfig: {
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
|
||||
@@ -50,6 +50,7 @@ function makeMockedConfig(params?: Partial<ConfigParameters>): Config {
|
||||
} as unknown as ToolRegistry);
|
||||
vi.spyOn(config, 'getAgentRegistry').mockReturnValue({
|
||||
getDirectoryContext: () => 'mock directory context',
|
||||
getAllDefinitions: () => [],
|
||||
} as unknown as AgentRegistry);
|
||||
return config;
|
||||
}
|
||||
@@ -262,6 +263,7 @@ describe('AgentRegistry', () => {
|
||||
overrides: {
|
||||
codebase_investigator: { enabled: false },
|
||||
cli_help: { enabled: false },
|
||||
generalist: { enabled: false },
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -299,13 +301,13 @@ describe('AgentRegistry', () => {
|
||||
expect(registry.getDefinition('cli_help')).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should NOT register generalist agent by default (because it is experimental)', async () => {
|
||||
it('should register generalist agent by default', async () => {
|
||||
const config = makeMockedConfig();
|
||||
const registry = new TestableAgentRegistry(config);
|
||||
|
||||
await registry.initialize();
|
||||
|
||||
expect(registry.getDefinition('generalist')).toBeUndefined();
|
||||
expect(registry.getDefinition('generalist')).toBeDefined();
|
||||
});
|
||||
|
||||
it('should register generalist agent if explicitly enabled via override', async () => {
|
||||
|
||||
@@ -57,6 +57,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -209,6 +221,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -480,6 +504,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -632,6 +668,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -1506,6 +1554,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -1657,6 +1717,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -1800,6 +1872,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -1943,6 +2027,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -2082,6 +2178,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -2221,6 +2329,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -2352,6 +2472,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -2490,6 +2622,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>test-agent</name>
|
||||
@@ -2870,6 +3014,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -3009,6 +3165,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -3260,6 +3428,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
@@ -3399,6 +3579,18 @@ Use the following guidelines to optimize your search and read patterns.
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
<subagent>
|
||||
<name>mock-agent</name>
|
||||
|
||||
@@ -228,6 +228,18 @@ export function renderSubAgents(subAgents?: SubAgentOptions[]): string {
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
${subAgentsXml}
|
||||
</available_subagents>
|
||||
|
||||
Reference in New Issue
Block a user