Sisyphus Agent Family - Routing Analysis
- Agent Overview
┌──────────────────────────────────────────────────────────────────────────────┐ │ SISYPHUS AGENT FAMILY │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────────────────────┐│ │ │ Sisyphus (Main) ││ │ │ src/agents/sisyphus.ts ││ │ ├─────────────────────────────────────────────────────────────────────────┤│ │ │ Mode: PRIMARY ││ │ │ Model: anthropic/claude-opus-4-5 (default) ││ │ │ Role: 全能型编排器 - 可以直接执行也可以委派 ││ │ │ Can: Execute tasks directly + Delegate to subagents ││ │ │ Tools: ALL available (including sisyphus_task, call_omo_agent) ││ │ └─────────────────────────────────────────────────────────────────────────┘│ │ │ │ │ ┌───────────────┴───────────────┐ │ │ ▼ ▼ │ │ ┌─────────────────────────────┐ ┌─────────────────────────────────────┐ │ │ │ Sisyphus-Junior │ │ orchestrator-sisyphus │ │ │ │ src/agents/sisyphus-junior │ │ src/agents/orchestrator-sisyphus │ │ │ ├─────────────────────────────┤ ├─────────────────────────────────────┤ │ │ │ Mode: SUBAGENT │ │ Mode: PRIMARY │ │ │ │ Model: Configurable │ │ Model: anthropic/claude-sonnet-4-5 │ │ │ │ Role: 专注执行器 │ │ Role: 纯编排器 │ │ │ │ (无委派能力) │ │ (只委派不执行) │ │ │ │ │ │ │ │ │ │ ❌ BLOCKED: │ │ ❌ BLOCKED: │ │ │ │ - task │ │ - task │ │ │ │ - sisyphus_task │ │ - call_omo_agent │ │ │ │ - call_omo_agent │ │ │ │ │ │ │ │ ✅ CAN USE: │ │ │ │ ✅ CAN DO: │ │ - sisyphus_task (for delegation) │ │ │ │ - Direct code execution │ │ - Read/Bash (for verification) │ │ │ │ - File read/write/edit │ │ │ │ │ │ - All other tools │ │ ❌ MUST NOT: │ │ │ └─────────────────────────────┘ │ - Write/Edit files directly │ │ │ │ - Execute implementation code │ │ │ └─────────────────────────────────────┘ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
- Routing Mechanism
┌──────────────────────────────────────────────────────────────────────────────┐ │ ROUTING DECISION FLOW │ │ (sisyphus_task tool call) │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ sisyphus_task(args) called │ │ │ │ │ ▼ │ │ ┌───────────────────────────────┐ │ │ │ args.category && args.agent? │ │ │ └───────────────┬───────────────┘ │ │ │ │ │ ┌───────────────┼───────────────┐ │ │ ▼ ▼ ▼ │ │ BOTH category subagent_type │ │ provided ONLY ONLY │ │ │ │ │ │ │ ▼ ▼ ▼ │ │ ❌ ERROR ┌──────────────┐ ┌──────────────┐ │ │ "Mutually │ Route to: │ │ Route to: │ │ │ exclusive" │ Sisyphus- │ │ Named Agent │ │ │ │ Junior │ │ directly │ │ │ └──────┬───────┘ └──────┬───────┘ │ │ │ │ │ │ ▼ ▼ │ │ ┌────────────────────┐ ┌────────────────────┐ │ │ │ Model determined │ │ Agent must exist │ │ │ │ by category config │ │ and be callable │ │ │ │ │ │ (mode != primary) │ │ │ │ Categories: │ │ │ │ │ │ - general │ │ Valid agents: │ │ │ │ - visual-engineer │ │ - oracle │ │ │ │ - ultrabrain │ │ - explore │ │ │ │ - artistry │ │ - librarian │ │ │ │ - most-capable │ │ - frontend-ui-ux │ │ │ │ - quick │ │ - document-writer │ │ │ │ - writing │ │ - etc... │ │ │ └────────────────────┘ └────────────────────┘ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
- Category-Based Routing (→ Sisyphus-Junior)
┌──────────────────────────────────────────────────────────────────────────────┐ │ CATEGORY → SISYPHUS-JUNIOR ROUTING │ │ (src/tools/sisyphus-task/tools.ts:279-287) │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ sisyphus_task(category="visual-engineering", prompt="...") │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │ │ resolveCategoryConfig("visual-engineering", userCategories) │ │ │ │ ├── Lookup in DEFAULT_CATEGORIES │ │ │ │ ├── Merge with user overrides │ │ │ │ └── Return { config, promptAppend } │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │ │ agentToUse = "Sisyphus-Junior" ← ALWAYS Junior for category │ │ │ │ categoryModel = parseModelString(config.model) │ │ │ │ categoryPromptAppend = resolved.promptAppend │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │ │ createSisyphusJuniorAgent(categoryConfig, promptAppend) │ │ │ │ ├── Base: SISYPHUS_JUNIOR_PROMPT (lightweight, no delegation) │ │ │ │ ├── + promptAppend (category-specific instructions) │ │ │ │ ├── + skillContent (if skills provided) │ │ │ │ └── Model/temp from categoryConfig │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ │ │ DEFAULT_CATEGORIES (from constants.ts): │ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │ │ general: claude-sonnet-4-5, temp=0.5 │ │ │ │ visual-engineering: claude-sonnet-4-5, temp=0.7 │ │ │ │ ultrabrain: gpt-5.1, temp=0.3 │ │ │ │ artistry: claude-sonnet-4-5, temp=0.9 │ │ │ │ most-capable: claude-opus-4-5, temp=0.5 │ │ │ │ quick: claude-haiku-3-5, temp=0.3 │ │ │ │ writing: claude-sonnet-4-5, temp=0.7 │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
- Agent Registration Flow
┌──────────────────────────────────────────────────────────────────────────────┐ │ AGENT REGISTRATION FLOW │ │ (src/plugin-handlers/config-handler.ts) │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ Plugin Initialization │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │ │ createBuiltinAgents(disabledAgents, overrides, directory, model) │ │ │ │ ├── Creates all builtin agents (oracle, explore, librarian, etc.) │ │ │ │ ├── Creates Sisyphus with availableAgents (for dynamic prompt) │ │ │ │ └── Creates orchestrator-sisyphus │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │ │ if (isSisyphusEnabled) { │ │ │ │ agentConfig["Sisyphus"] = builtinAgents.Sisyphus │ │ │ │ │ │ │ │ // ⭐ Sisyphus-Junior registered separately │ │ │ │ agentConfig["Sisyphus-Junior"] = createSisyphusJuniorAgent({ │ │ │ │ model: "anthropic/claude-sonnet-4-5", │ │ │ │ temperature: 0.1, │ │ │ │ }) │ │ │ │ } │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │ │ Final config.agent = { │ │ │ │ "Sisyphus": PRIMARY (main orchestrator) │ │ │ │ "Sisyphus-Junior": SUBAGENT (category executor) │ │ │ │ "orchestrator-sisyphus": PRIMARY (pure orchestrator) │ │ │ │ "Prometheus (Planner)": PRIMARY (if enabled) │ │ │ │ "oracle": SUBAGENT │ │ │ │ "explore": SUBAGENT │ │ │ │ "librarian": SUBAGENT │ │ │ │ ...other agents │ │ │ │ } │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
- Key Differences Summary ┌──────────────────┬─────────────────┬─────────────────────────────────────┬───────────────────────┐ │ Aspect │ Sisyphus (Main) │ Sisyphus-Junior │ orchestrator-sisyphus │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Mode │ PRIMARY │ SUBAGENT │ PRIMARY │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Default Model │ claude-opus-4-5 │ claude-sonnet-4-5 │ claude-sonnet-4-5 │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Can Execute Code │ ✅ Yes │ ✅ Yes │ ❌ No (delegate only) │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Can Delegate │ ✅ Yes │ ❌ No (blocked) │ ✅ Yes (only this) │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Prompt Size │ ~2000 lines │ ~70 lines │ ~1400 lines │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Temperature │ default │ 0.1 (precise) │ 0.1 (precise) │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Purpose │ 通用入口 │ 执行分类任务 │ 按计划执行所有任务 │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Invocation │ User → Agent │ sisyphus_task(category=) │ Direct or via plan │ ├──────────────────┼─────────────────┼─────────────────────────────────────┼───────────────────────┤ │ Blocked Tools │ call_omo_agent │ task, sisyphus_task, call_omo_agent │ task, call_omo_agent │ └──────────────────┴─────────────────┴─────────────────────────────────────┴───────────────────────┘
- Usage Scenarios
┌──────────────────────────────────────────────────────────────────────────────┐ │ USAGE SCENARIOS │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ SCENARIO 1: User directly interacts │ │ ───────────────────────────────────── │ │ User → Sisyphus (PRIMARY) │ │ │ │ │ ├─► Direct execution (simple tasks) │ │ │ │ │ └─► sisyphus_task(category="visual-engineering") │ │ │ │ │ └─► Sisyphus-Junior (with visual config) │ │ └─► Execute and return │ │ │ │ SCENARIO 2: Plan-based orchestration │ │ ───────────────────────────────────── │ │ .sisyphus/plans/my-plan.md │ │ │ │ │ └─► orchestrator-sisyphus (reads plan) │ │ │ │ │ ├─► sisyphus_task(category="ultrabrain", task1) │ │ │ └─► Sisyphus-Junior → Execute │ │ │ │ │ ├─► sisyphus_task(category="visual-engineering", task2) │ │ │ └─► Sisyphus-Junior → Execute │ │ │ │ │ └─► sisyphus_task(agent="oracle", consult) │ │ └─► Oracle agent → Return advice │ │ │ │ SCENARIO 3: Background parallel research │ │ ───────────────────────────────────────── │ │ Sisyphus │ │ │ │ │ ├─► sisyphus_task(agent="explore", run_in_background=true) │ │ ├─► sisyphus_task(agent="librarian", run_in_background=true) │ │ │ │ │ └─► Continue other work while agents run in parallel │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
- Why This Design?
┌──────────────────────────────────────────────────────────────────────────────┐ │ DESIGN RATIONALE │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ 1. SISYPHUS (Main) - 全能型 │ │ ├── Pros: 灵活,可直接执行或委派 │ │ ├── Cons: Prompt大(~2000行),可能过度思考 │ │ └── Use: 用户交互入口,处理混合任务 │ │ │ │ 2. SISYPHUS-JUNIOR - 专注执行型 │ │ ├── Pros: 轻量prompt(~70行),专注执行,不会递归委派 │ │ ├── Cons: 无法处理需要多步委派的复杂任务 │ │ └── Use: 被orchestrator调用执行具体任务 │ │ │ │ 3. ORCHESTRATOR-SISYPHUS - 纯编排型 │ │ ├── Pros: 专注协调,不会陷入实现细节 │ │ ├── Cons: 不能直接修改文件,必须委派所有实现 │ │ └── Use: 处理plan文件中的多任务列表 │ │ │ │ KEY INSIGHT: 分离关注点 │ │ ──────────────────────── │ │ • Orchestrator: "什么需要做" (WHAT) │ │ • Junior: "如何去做" (HOW) │ │ • Main Sisyphus: 两者兼具,用于交互式场景 │ │ │ │ ANTI-RECURSION: Junior blocked from sisyphus_task │ │ ────────────────────────────────────────────────── │ │ Prevents: Orchestrator → Junior → sisyphus_task → Junior → ... │ │ Ensures: Clean execution without infinite delegation loops │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
总结:
- Sisyphus (Main) - 用户直接交互的主 agent,可执行也可委派
- Sisyphus-Junior - 被 sisyphus_task(category=...) 调用的执行器,禁止再委派
- orchestrator-sisyphus - 纯编排器,只能委派不能直接执行代码,用于处理计划文件
路由逻辑在 sisyphus_task 工具中:
- 提供 category → 路由到 Sisyphus-Junior(带分类配置)
- 提供 subagent_type → 路由到指定的专家 agent(oracle, explore 等)