From f7c5c0be35cfdbcbe6005b7cec003e281057c037 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sun, 22 Feb 2026 03:20:57 +0900 Subject: [PATCH] feat(sisyphus): add deep parallel delegation section to prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add buildDeepParallelSection() function that injects guidance for non-Claude models on parallel deep agent delegation: - Detect when model is non-Claude and 'deep' category is available - Inject instructions to decompose tasks and delegate to deep agents in parallel - Give goals, not step-by-step instructions to deep agents - Update Sisyphus prompt builder to pass model and call new function This helps GPT-based Sisyphus instances leverage deep agents more effectively for complex implementation tasks. 🤖 Generated with assistance of OhMyOpenCode --- src/agents/dynamic-agent-prompt-builder.ts | 16 ++++++++++++++++ src/agents/sisyphus.ts | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/agents/dynamic-agent-prompt-builder.ts b/src/agents/dynamic-agent-prompt-builder.ts index ad44bc712..5685431b2 100644 --- a/src/agents/dynamic-agent-prompt-builder.ts +++ b/src/agents/dynamic-agent-prompt-builder.ts @@ -317,6 +317,22 @@ export function buildAntiPatternsSection(): string { ${patterns.join("\n")}` } +export function buildDeepParallelSection(model: string, categories: AvailableCategory[]): string { + const isNonClaude = !model.toLowerCase().includes('claude') + const hasDeepCategory = categories.some(c => c.name === 'deep') + + if (!isNonClaude || !hasDeepCategory) return "" + + return `### Deep Parallel Delegation + +For implementation tasks, actively decompose and delegate to \`deep\` category agents in parallel. + +1. Break the implementation into independent work units +2. Maximize parallel deep agents — spawn one per independent unit (\`run_in_background=true\`) +3. Give each agent a GOAL, not step-by-step instructions — deep agents explore and solve autonomously +4. Collect results, integrate, verify coherence` +} + export function buildUltraworkSection( agents: AvailableAgent[], categories: AvailableCategory[], diff --git a/src/agents/sisyphus.ts b/src/agents/sisyphus.ts index 47b2118de..dc035d998 100644 --- a/src/agents/sisyphus.ts +++ b/src/agents/sisyphus.ts @@ -25,6 +25,7 @@ import { buildOracleSection, buildHardBlocksSection, buildAntiPatternsSection, + buildDeepParallelSection, categorizeTools, } from "./dynamic-agent-prompt-builder"; @@ -139,6 +140,7 @@ Should I proceed with [recommendation], or would you prefer differently? } function buildDynamicSisyphusPrompt( + model: string, availableAgents: AvailableAgent[], availableTools: AvailableTool[] = [], availableSkills: AvailableSkill[] = [], @@ -161,6 +163,7 @@ function buildDynamicSisyphusPrompt( const oracleSection = buildOracleSection(availableAgents); const hardBlocks = buildHardBlocksSection(); const antiPatterns = buildAntiPatternsSection(); + const deepParallelSection = buildDeepParallelSection(model, availableCategories); const taskManagementSection = buildTaskManagementSection(useTaskSystem); const todoHookNote = useTaskSystem ? "YOUR TASK CREATION WOULD BE TRACKED BY HOOK([SYSTEM REMINDER - TASK CONTINUATION])" @@ -356,6 +359,8 @@ STOP searching when: ${categorySkillsGuide} +${deepParallelSection} + ${delegationTable} ### Delegation Prompt Structure (MANDATORY - ALL 6 sections): @@ -545,13 +550,14 @@ export function createSisyphusAgent( const categories = availableCategories ?? []; const prompt = availableAgents ? buildDynamicSisyphusPrompt( + model, availableAgents, tools, skills, categories, useTaskSystem, ) - : buildDynamicSisyphusPrompt([], tools, skills, categories, useTaskSystem); + : buildDynamicSisyphusPrompt(model, [], tools, skills, categories, useTaskSystem); const permission = { question: "allow",