From d30f8216b8ea1a123bf0628810a34664db6b63f6 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Wed, 25 Mar 2026 08:23:52 -0500 Subject: [PATCH 1/2] fix: orchestrator prompt minimizes worker fan-out for single tasks The orchestrator prompt previously led with 'Assign ALL workers that have relevant work' which caused models to invent micro-tasks to fill all workers even for single-item requests (e.g., one PR review dispatched to 5 workers doing commit checks, builds, file greps separately). Flip the emphasis so the default is ONE worker and fan-out is the exception: - 'Assign the MINIMUM number of workers needed' - 'Do NOT split a single task into micro-tasks across workers' - Only fan out for genuinely independent tasks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- PolyPilot/Services/CopilotService.Organization.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PolyPilot/Services/CopilotService.Organization.cs b/PolyPilot/Services/CopilotService.Organization.cs index 9a480b04ff..b553c6d640 100644 --- a/PolyPilot/Services/CopilotService.Organization.cs +++ b/PolyPilot/Services/CopilotService.Organization.cs @@ -1912,8 +1912,10 @@ private string BuildOrchestratorPlanningPrompt(string userPrompt, List w sb.AppendLine("Detailed task description for this worker."); sb.AppendLine("@end"); sb.AppendLine(); - sb.AppendLine($"IMPORTANT: Assign ALL workers that have relevant work IN THIS SINGLE RESPONSE — produce multiple @worker blocks now, not one at a time."); - sb.AppendLine("However, only assign workers that have RELEVANT work to do. If the task only needs one worker (e.g., a follow-up on a specific PR), assign just that one worker — the one with the right context."); + sb.AppendLine("Assign the MINIMUM number of workers needed. For single-item requests (one PR, one bug, one question), prefer assigning just ONE worker — the one with the best context from previous turns."); + sb.AppendLine("Only fan out to multiple workers when the request genuinely contains multiple INDEPENDENT tasks (e.g., 'review PR #100 and PR #200' = 2 workers)."); + sb.AppendLine("Do NOT split a single task into micro-tasks across workers (e.g., one worker to check commits, another to build, another to grep — that's all one worker's job)."); + sb.AppendLine("If you assign multiple workers, produce all @worker blocks in THIS SINGLE RESPONSE — not one at a time."); sb.AppendLine("Each worker retains conversation history from previous turns, so prefer the worker who already worked on the relevant topic."); sb.AppendLine("You may include brief analysis before the @worker blocks, but every response MUST contain @worker blocks for all workers you intend to use."); sb.AppendLine("NEVER attempt to do the work yourself. ALWAYS delegate via @worker blocks."); From e03206f7bffc839d390c62bd0701476b504fee03 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Wed, 25 Mar 2026 14:35:43 -0500 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20address=20PR=20review=20=E2=80=94=20?= =?UTF-8?q?nudge=20prompt=20and=20single-response=20emphasis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit F1: BuildDelegationNudgePrompt() still said 'for ALL workers' which contradicts the minimum-workers fix on the recovery path. Changed to 'for the workers you need'. F2: Restored unconditional emphasis on single-response requirement. Changed conditional 'If you assign multiple workers, produce all...' back to unconditional 'IMPORTANT: Produce all @worker blocks in THIS SINGLE RESPONSE'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- PolyPilot/Services/CopilotService.Organization.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PolyPilot/Services/CopilotService.Organization.cs b/PolyPilot/Services/CopilotService.Organization.cs index b553c6d640..e8e0c69b98 100644 --- a/PolyPilot/Services/CopilotService.Organization.cs +++ b/PolyPilot/Services/CopilotService.Organization.cs @@ -1915,7 +1915,7 @@ private string BuildOrchestratorPlanningPrompt(string userPrompt, List w sb.AppendLine("Assign the MINIMUM number of workers needed. For single-item requests (one PR, one bug, one question), prefer assigning just ONE worker — the one with the best context from previous turns."); sb.AppendLine("Only fan out to multiple workers when the request genuinely contains multiple INDEPENDENT tasks (e.g., 'review PR #100 and PR #200' = 2 workers)."); sb.AppendLine("Do NOT split a single task into micro-tasks across workers (e.g., one worker to check commits, another to build, another to grep — that's all one worker's job)."); - sb.AppendLine("If you assign multiple workers, produce all @worker blocks in THIS SINGLE RESPONSE — not one at a time."); + sb.AppendLine("IMPORTANT: Produce all @worker blocks in THIS SINGLE RESPONSE — not one at a time."); sb.AppendLine("Each worker retains conversation history from previous turns, so prefer the worker who already worked on the relevant topic."); sb.AppendLine("You may include brief analysis before the @worker blocks, but every response MUST contain @worker blocks for all workers you intend to use."); sb.AppendLine("NEVER attempt to do the work yourself. ALWAYS delegate via @worker blocks."); @@ -1958,7 +1958,7 @@ internal static string BuildDelegationNudgePrompt(List workerNames) sb.AppendLine("Describe the task here on a separate line."); sb.AppendLine("@end"); sb.AppendLine(); - sb.AppendLine("Produce @worker blocks for ALL workers now. Do NOT explain, do NOT summarize previous work, ONLY output @worker blocks."); + sb.AppendLine("Produce @worker blocks for the workers you need. Do NOT explain, do NOT summarize previous work, ONLY output @worker blocks."); return sb.ToString(); }