feat(sisyphus): add deep parallel delegation section to prompt

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
This commit is contained in:
YeonGyu-Kim
2026-02-22 03:20:57 +09:00
parent 022a351c32
commit f7c5c0be35
2 changed files with 23 additions and 1 deletions

View File

@@ -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[],

View File

@@ -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",