From 824da626d7a836080d6e671ac7199e4aeb1b1bfc Mon Sep 17 00:00:00 2001 From: justsisyphus Date: Tue, 20 Jan 2026 18:15:58 +0900 Subject: [PATCH] fix(agents): pass categories and skills to Sisyphus/Atlas prompts Sisyphus and Atlas prompts were missing delegation guide because availableCategories and availableSkills were not being passed to createSisyphusAgent() and createAtlasAgent() in utils.ts. This caused buildCategorySkillsDelegationGuide() to return empty string, resulting in agents not knowing when/how to delegate to explore, librarian, or use category+skills based delegation. --- src/agents/utils.ts | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/agents/utils.ts b/src/agents/utils.ts index daf6fcbe4..bb691b59e 100644 --- a/src/agents/utils.ts +++ b/src/agents/utils.ts @@ -9,10 +9,11 @@ import { createMultimodalLookerAgent, MULTIMODAL_LOOKER_PROMPT_METADATA } from " import { createMetisAgent } from "./metis" import { createAtlasAgent } from "./atlas" import { createMomusAgent } from "./momus" -import type { AvailableAgent } from "./dynamic-agent-prompt-builder" +import type { AvailableAgent, AvailableCategory, AvailableSkill } from "./dynamic-agent-prompt-builder" import { deepMerge } from "../shared" -import { DEFAULT_CATEGORIES } from "../tools/delegate-task/constants" +import { DEFAULT_CATEGORIES, CATEGORY_DESCRIPTIONS } from "../tools/delegate-task/constants" import { resolveMultipleSkills } from "../features/opencode-skill-loader/skill-content" +import { createBuiltinSkills } from "../features/builtin-skills" type AgentSource = AgentFactory | AgentConfig @@ -149,6 +150,18 @@ export function createBuiltinAgents( ? { ...DEFAULT_CATEGORIES, ...categories } : DEFAULT_CATEGORIES + const availableCategories: AvailableCategory[] = Object.entries(mergedCategories).map(([name]) => ({ + name, + description: CATEGORY_DESCRIPTIONS[name] ?? "General tasks", + })) + + const builtinSkills = createBuiltinSkills() + const availableSkills: AvailableSkill[] = builtinSkills.map((skill) => ({ + name: skill.name, + description: skill.description, + location: "plugin" as const, + })) + for (const [name, source] of Object.entries(agentSources)) { const agentName = name as BuiltinAgentName @@ -186,7 +199,13 @@ export function createBuiltinAgents( const sisyphusOverride = agentOverrides["Sisyphus"] const sisyphusModel = sisyphusOverride?.model ?? systemDefaultModel - let sisyphusConfig = createSisyphusAgent(sisyphusModel, availableAgents) + let sisyphusConfig = createSisyphusAgent( + sisyphusModel, + availableAgents, + undefined, + availableSkills, + availableCategories + ) if (directory && sisyphusConfig.prompt) { const envContext = createEnvContext() @@ -206,6 +225,8 @@ export function createBuiltinAgents( let orchestratorConfig = createAtlasAgent({ model: orchestratorModel, availableAgents, + availableSkills, + userCategories: categories, }) if (orchestratorOverride) {