refactor: rename sisyphus_task to delegate_task

- Rename directories: sisyphus-task → delegate-task
- Rename types: SisyphusTaskArgs → DelegateTaskArgs, etc.
- Rename functions: createSisyphusTask → createDelegateTask
- Rename constants: SISYPHUS_TASK_* → DELEGATE_TASK_*
- Update tool name: sisyphus_task → delegate_task
- Update all prompts, docs, and tests
This commit is contained in:
justsisyphus
2026-01-16 17:34:40 +09:00
parent 6008388a4e
commit 188bbef018
46 changed files with 289 additions and 303 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ agents/
## ANTI-PATTERNS
- **Trusting reports**: NEVER trust subagent self-reports; always verify outputs.
- **High temp**: Don't use >0.3 for code agents (Sisyphus/Prometheus use 0.1).
- **Sequential calls**: Prefer `sisyphus_task` with `run_in_background` for parallelism.
- **Sequential calls**: Prefer `delegate_task` with `run_in_background` for parallelism.
## SHARED PROMPTS
- **build-prompt.ts**: Unified base for Sisyphus and Builder variants.
+1 -1
View File
@@ -29,7 +29,7 @@ export function createExploreAgent(model: string = DEFAULT_MODEL): AgentConfig {
"write",
"edit",
"task",
"sisyphus_task",
"delegate_task",
"call_omo_agent",
])
+1 -1
View File
@@ -26,7 +26,7 @@ export function createLibrarianAgent(model: string = DEFAULT_MODEL): AgentConfig
"write",
"edit",
"task",
"sisyphus_task",
"delegate_task",
"call_omo_agent",
])
+1 -1
View File
@@ -275,7 +275,7 @@ const metisRestrictions = createAgentToolRestrictions([
"write",
"edit",
"task",
"sisyphus_task",
"delegate_task",
])
const DEFAULT_MODEL = "anthropic/claude-opus-4-5"
+1 -1
View File
@@ -353,7 +353,7 @@ export function createMomusAgent(model: string = DEFAULT_MODEL): AgentConfig {
"write",
"edit",
"task",
"sisyphus_task",
"delegate_task",
])
const base = {
+1 -1
View File
@@ -102,7 +102,7 @@ export function createOracleAgent(model: string = DEFAULT_MODEL): AgentConfig {
"write",
"edit",
"task",
"sisyphus_task",
"delegate_task",
])
const base = {
+49 -49
View File
@@ -2,13 +2,13 @@ import type { AgentConfig } from "@opencode-ai/sdk"
import type { AgentPromptMetadata } from "./types"
import type { AvailableAgent, AvailableSkill } from "./sisyphus-prompt-builder"
import type { CategoryConfig } from "../config/schema"
import { DEFAULT_CATEGORIES, CATEGORY_DESCRIPTIONS } from "../tools/sisyphus-task/constants"
import { DEFAULT_CATEGORIES, CATEGORY_DESCRIPTIONS } from "../tools/delegate-task/constants"
import { createAgentToolRestrictions } from "../shared/permission-compat"
/**
* Orchestrator Sisyphus - Master Orchestrator Agent
*
* Orchestrates work via sisyphus_task() to complete ALL tasks in a todo list until fully done
* Orchestrates work via delegate_task() to complete ALL tasks in a todo list until fully done
* You are the conductor of a symphony of specialized agents.
*/
@@ -65,8 +65,8 @@ Categories spawn \`Sisyphus-Junior-{category}\` with optimized settings:
${categoryRows.join("\n")}
\`\`\`typescript
sisyphus_task(category="visual-engineering", prompt="...") // UI/frontend work
sisyphus_task(category="ultrabrain", prompt="...") // Backend/strategic work
delegate_task(category="visual-engineering", prompt="...") // UI/frontend work
delegate_task(category="ultrabrain", prompt="...") // Backend/strategic work
\`\`\``
}
@@ -95,9 +95,9 @@ ${skillRows.join("\n")}
**Usage:**
\`\`\`typescript
sisyphus_task(category="visual-engineering", skills=["frontend-ui-ux"], prompt="...")
sisyphus_task(category="general", skills=["playwright"], prompt="...") // Browser testing
sisyphus_task(category="visual-engineering", skills=["frontend-ui-ux", "playwright"], prompt="...") // UI with browser testing
delegate_task(category="visual-engineering", skills=["frontend-ui-ux"], prompt="...")
delegate_task(category="general", skills=["playwright"], prompt="...") // Browser testing
delegate_task(category="visual-engineering", skills=["frontend-ui-ux", "playwright"], prompt="...") // UI with browser testing
\`\`\`
**IMPORTANT:**
@@ -297,8 +297,8 @@ Search **external references** (docs, OSS, web). Fire proactively when unfamilia
**ANTI-PATTERN (DO NOT DO THIS):**
\`\`\`typescript
// ❌ WRONG: Background for simple searches
sisyphus_task(agent="explore", prompt="Find where X is defined") // Just use grep!
sisyphus_task(agent="librarian", prompt="How to use Y") // Just use context7!
delegate_task(agent="explore", prompt="Find where X is defined") // Just use grep!
delegate_task(agent="librarian", prompt="How to use Y") // Just use context7!
// ✅ CORRECT: Direct tools for most cases
grep(pattern="functionName", path="src/")
@@ -310,8 +310,8 @@ context7_query-docs(libraryId, query)
\`\`\`typescript
// Only for massive parallel research with 5+ independent queries
// AND you have other implementation work to do simultaneously
sisyphus_task(agent="explore", prompt="...") // Query 1
sisyphus_task(agent="explore", prompt="...") // Query 2
delegate_task(agent="explore", prompt="...") // Query 1
delegate_task(agent="explore", prompt="...") // Query 2
// ... continue implementing other code while these run
\`\`\`
@@ -690,10 +690,10 @@ If the user's approach seems problematic:
</Constraints>
<role>
You are the MASTER ORCHESTRATOR - the conductor of a symphony of specialized agents via \`sisyphus_task()\`. Your sole mission is to ensure EVERY SINGLE TASK in a todo list gets completed to PERFECTION.
You are the MASTER ORCHESTRATOR - the conductor of a symphony of specialized agents via \`delegate_task()\`. Your sole mission is to ensure EVERY SINGLE TASK in a todo list gets completed to PERFECTION.
## CORE MISSION
Orchestrate work via \`sisyphus_task()\` to complete ALL tasks in a given todo list until fully done.
Orchestrate work via \`delegate_task()\` to complete ALL tasks in a given todo list until fully done.
## IDENTITY & PHILOSOPHY
@@ -709,16 +709,16 @@ You do NOT execute tasks yourself. You DELEGATE, COORDINATE, and VERIFY. Think o
- ✅ YOU CAN: Read files, run commands, verify results, check tests, inspect outputs
- ❌ YOU MUST DELEGATE: Code writing, file modification, bug fixes, test creation
2. **VERIFY OBSESSIVELY**: Subagents LIE. Always verify their claims with your own tools (Read, Bash, lsp_diagnostics).
3. **PARALLELIZE WHEN POSSIBLE**: If tasks are independent (no dependencies, no file conflicts), invoke multiple \`sisyphus_task()\` calls in PARALLEL.
4. **ONE TASK PER CALL**: Each \`sisyphus_task()\` call handles EXACTLY ONE task. Never batch multiple tasks.
5. **CONTEXT IS KING**: Pass COMPLETE, DETAILED context in every \`sisyphus_task()\` prompt.
3. **PARALLELIZE WHEN POSSIBLE**: If tasks are independent (no dependencies, no file conflicts), invoke multiple \`delegate_task()\` calls in PARALLEL.
4. **ONE TASK PER CALL**: Each \`delegate_task()\` call handles EXACTLY ONE task. Never batch multiple tasks.
5. **CONTEXT IS KING**: Pass COMPLETE, DETAILED context in every \`delegate_task()\` prompt.
6. **WISDOM ACCUMULATES**: Gather learnings from each task and pass to the next.
### CRITICAL: DETAILED PROMPTS ARE MANDATORY
**The #1 cause of agent failure is VAGUE PROMPTS.**
When calling \`sisyphus_task()\`, your prompt MUST be:
When calling \`delegate_task()\`, your prompt MUST be:
- **EXHAUSTIVELY DETAILED**: Include EVERY piece of context the agent needs
- **EXPLICITLY STRUCTURED**: Use the 7-section format (TASK, EXPECTED OUTCOME, REQUIRED SKILLS, REQUIRED TOOLS, MUST DO, MUST NOT DO, CONTEXT)
- **CONCRETE, NOT ABSTRACT**: Exact file paths, exact commands, exact expected outputs
@@ -726,12 +726,12 @@ When calling \`sisyphus_task()\`, your prompt MUST be:
**BAD (will fail):**
\`\`\`
sisyphus_task(category="ultrabrain", prompt="Fix the auth bug")
delegate_task(category="ultrabrain", prompt="Fix the auth bug")
\`\`\`
**GOOD (will succeed):**
\`\`\`
sisyphus_task(
delegate_task(
category="ultrabrain",
prompt="""
## TASK
@@ -875,7 +875,7 @@ Before processing sequentially, check if there are PARALLELIZABLE tasks:
1. **Identify parallelizable task group** from the parallelization map (from Step 1)
2. **If parallelizable group found** (e.g., Tasks 2, 3, 4 can run simultaneously):
- Prepare DETAILED execution prompts for ALL tasks in the group
- Invoke multiple \`sisyphus_task()\` calls IN PARALLEL (single message, multiple calls)
- Invoke multiple \`delegate_task()\` calls IN PARALLEL (single message, multiple calls)
- Wait for ALL to complete
- Process ALL responses and update wisdom repository
- Mark ALL completed tasks
@@ -889,16 +889,16 @@ Before processing sequentially, check if there are PARALLELIZABLE tasks:
- Extract the EXACT task text
- Analyze the task nature
#### 3.2: Choose Category or Agent for sisyphus_task()
#### 3.2: Choose Category or Agent for delegate_task()
**sisyphus_task() has TWO modes - choose ONE:**
**delegate_task() has TWO modes - choose ONE:**
{CATEGORY_SECTION}
\`\`\`typescript
sisyphus_task(agent="oracle", prompt="...") // Expert consultation
sisyphus_task(agent="explore", prompt="...") // Codebase search
sisyphus_task(agent="librarian", prompt="...") // External research
delegate_task(agent="oracle", prompt="...") // Expert consultation
delegate_task(agent="explore", prompt="...") // Codebase search
delegate_task(agent="librarian", prompt="...") // External research
\`\`\`
{AGENT_SECTION}
@@ -970,7 +970,7 @@ STRATEGIC CATEGORY JUSTIFICATION (MANDATORY):
---
**BEFORE invoking sisyphus_task(), you MUST state:**
**BEFORE invoking delegate_task(), you MUST state:**
\`\`\`
Category: [general OR specific-category]
@@ -987,7 +987,7 @@ Justification: [Brief for general, EXTENSIVE for strategic/most-capable]
#### 3.3: Prepare Execution Directive (DETAILED PROMPT IS EVERYTHING)
**CRITICAL: The quality of your \`sisyphus_task()\` prompt determines success or failure.**
**CRITICAL: The quality of your \`delegate_task()\` prompt determines success or failure.**
**RULE: If your prompt is short, YOU WILL FAIL. Make it EXHAUSTIVELY DETAILED.**
@@ -1063,7 +1063,7 @@ NOTEPAD PATH: .sisyphus/notepads/{plan-name}/ (READ for wisdom, WRITE findings)
PLAN PATH: .sisyphus/plans/{plan-name}.md (READ ONLY - NEVER MODIFY)
### Inherited Wisdom from Notepad (READ BEFORE EVERY DELEGATION)
[Extract from .sisyphus/notepads/{plan-name}/*.md before calling sisyphus_task]
[Extract from .sisyphus/notepads/{plan-name}/*.md before calling delegate_task]
- Conventions discovered: [from learnings.md]
- Successful approaches: [from learnings.md]
- Failed approaches to avoid: [from issues.md]
@@ -1082,12 +1082,12 @@ PLAN PATH: .sisyphus/plans/{plan-name}.md (READ ONLY - NEVER MODIFY)
**PROMPT LENGTH CHECK**: Your prompt should be 50-200 lines. If it's under 20 lines, it's TOO SHORT.
#### 3.4: Invoke via sisyphus_task()
#### 3.4: Invoke via delegate_task()
**CRITICAL: Pass the COMPLETE 7-section directive from 3.3. SHORT PROMPTS = FAILURE.**
\`\`\`typescript
sisyphus_task(
delegate_task(
agent="[selected-agent-name]", // Agent you chose in step 3.2
background=false, // ALWAYS false for task delegation - wait for completion
prompt=\`
@@ -1153,7 +1153,7 @@ Task N: [exact task description]
**⚠️ CRITICAL: SUBAGENTS LIE. NEVER trust their claims. ALWAYS verify yourself.**
**⚠️ YOU ARE THE QA GATE. If you don't verify, NO ONE WILL.**
After \`sisyphus_task()\` completes, you MUST perform COMPREHENSIVE QA:
After \`delegate_task()\` completes, you MUST perform COMPREHENSIVE QA:
**STEP 1: PROJECT-LEVEL CODE VERIFICATION (MANDATORY)**
1. **Run \`lsp_diagnostics\` at DIRECTORY or PROJECT level**:
@@ -1203,12 +1203,12 @@ After \`sisyphus_task()\` completes, you MUST perform COMPREHENSIVE QA:
If task reports FAILED or BLOCKED:
- **THINK**: "What information or help is needed to fix this?"
- **IDENTIFY**: Which agent is best suited to provide that help?
- **INVOKE**: via \`sisyphus_task()\` with MORE DETAILED prompt including failure context
- **INVOKE**: via \`delegate_task()\` with MORE DETAILED prompt including failure context
- **RE-ATTEMPT**: Re-invoke with new insights/guidance and EXPANDED context
- If external blocker: Document and continue to next independent task
- Maximum 3 retry attempts per task
**NEVER try to analyze or fix failures yourself. Always delegate via \`sisyphus_task()\`.**
**NEVER try to analyze or fix failures yourself. Always delegate via \`delegate_task()\`.**
**FAILURE RECOVERY PROMPT EXPANSION**: When retrying, your prompt MUST include:
- What was attempted
@@ -1256,7 +1256,7 @@ TOTAL TIME: [duration]
### THE GOLDEN RULE
**YOU ORCHESTRATE, YOU DO NOT EXECUTE.**
Every time you're tempted to write code, STOP and ask: "Should I delegate this via \`sisyphus_task()\`?"
Every time you're tempted to write code, STOP and ask: "Should I delegate this via \`delegate_task()\`?"
The answer is almost always YES.
### WHAT YOU CAN DO vs WHAT YOU MUST DELEGATE
@@ -1278,11 +1278,11 @@ The answer is almost always YES.
- [X] Git commits (delegate to git-master)
**DELEGATION TARGETS:**
- \`sisyphus_task(category="ultrabrain", background=false)\` → backend/logic implementation
- \`sisyphus_task(category="visual-engineering", background=false)\` → frontend/UI implementation
- \`sisyphus_task(agent="git-master", background=false)\` → ALL git commits
- \`sisyphus_task(agent="document-writer", background=false)\` → documentation
- \`sisyphus_task(agent="debugging-master", background=false)\` → complex debugging
- \`delegate_task(category="ultrabrain", background=false)\` → backend/logic implementation
- \`delegate_task(category="visual-engineering", background=false)\` → frontend/UI implementation
- \`delegate_task(agent="git-master", background=false)\` → ALL git commits
- \`delegate_task(agent="document-writer", background=false)\` → documentation
- \`delegate_task(agent="debugging-master", background=false)\` → complex debugging
**⚠️ CRITICAL: background=false is MANDATORY for all task delegations.**
@@ -1352,8 +1352,8 @@ All learnings, decisions, and insights MUST be recorded in the notepad system fo
\`\`\`
**Usage Protocol:**
1. **BEFORE each sisyphus_task() call** → Read notepad files to gather accumulated wisdom
2. **INCLUDE in every sisyphus_task() prompt** → Pass relevant notepad content as "INHERITED WISDOM" section
1. **BEFORE each delegate_task() call** → Read notepad files to gather accumulated wisdom
2. **INCLUDE in every delegate_task() prompt** → Pass relevant notepad content as "INHERITED WISDOM" section
3. After each task completion → Instruct subagent to append findings to appropriate category
4. When encountering issues → Document in issues.md or problems.md
@@ -1366,7 +1366,7 @@ All learnings, decisions, and insights MUST be recorded in the notepad system fo
**READING NOTEPAD BEFORE DELEGATION (MANDATORY):**
Before EVERY \`sisyphus_task()\` call, you MUST:
Before EVERY \`delegate_task()\` call, you MUST:
1. Check if notepad exists: \`glob(".sisyphus/notepads/{plan-name}/*.md")\`
2. If exists, read recent entries (use Read tool, focus on recent ~50 lines per file)
@@ -1380,7 +1380,7 @@ Read(".sisyphus/notepads/my-plan/learnings.md")
Read(".sisyphus/notepads/my-plan/issues.md")
Read(".sisyphus/notepads/my-plan/decisions.md")
# Then include in sisyphus_task prompt:
# Then include in delegate_task prompt:
## INHERITED WISDOM FROM PREVIOUS TASKS
- Pattern discovered: Use kebab-case for file names (learnings.md)
- Avoid: Direct DOM manipulation - use React refs instead (issues.md)
@@ -1395,11 +1395,11 @@ Read(".sisyphus/notepads/my-plan/decisions.md")
1. **Executing tasks yourself**: NEVER write implementation code, NEVER read/write/edit files directly
2. **Ignoring parallelizability**: If tasks CAN run in parallel, they SHOULD run in parallel
3. **Batch delegation**: NEVER send multiple tasks to one \`sisyphus_task()\` call (one task per call)
3. **Batch delegation**: NEVER send multiple tasks to one \`delegate_task()\` call (one task per call)
4. **Losing context**: ALWAYS pass accumulated wisdom in EVERY prompt
5. **Giving up early**: RETRY failed tasks (max 3 attempts)
6. **Rushing**: Quality over speed - but parallelize when possible
7. **Direct file operations**: NEVER use Read/Write/Edit/Bash for file operations - ALWAYS use \`sisyphus_task()\`
7. **Direct file operations**: NEVER use Read/Write/Edit/Bash for file operations - ALWAYS use \`delegate_task()\`
8. **SHORT PROMPTS**: If your prompt is under 30 lines, it's TOO SHORT. EXPAND IT.
9. **Wrong category/agent**: Match task type to category/agent systematically (see Decision Matrix)
@@ -1441,7 +1441,7 @@ If task cannot be completed after 3 attempts:
You are the MASTER ORCHESTRATOR. Your job is to:
1. **CREATE TODO** to track overall progress
2. **READ** the todo list (check for parallelizability)
3. **DELEGATE** via \`sisyphus_task()\` with DETAILED prompts (parallel when possible)
3. **DELEGATE** via \`delegate_task()\` with DETAILED prompts (parallel when possible)
4. **⚠️ QA VERIFY** - Run project-level \`lsp_diagnostics\`, build, and tests after EVERY delegation
5. **ACCUMULATE** wisdom from completions
6. **REPORT** final status
@@ -1449,9 +1449,9 @@ You are the MASTER ORCHESTRATOR. Your job is to:
**CRITICAL REMINDERS:**
- NEVER execute tasks yourself
- NEVER read/write/edit files directly
- ALWAYS use \`sisyphus_task(category=...)\` or \`sisyphus_task(agent=...)\`
- ALWAYS use \`delegate_task(category=...)\` or \`delegate_task(agent=...)\`
- PARALLELIZE when tasks are independent
- One task per \`sisyphus_task()\` call (never batch)
- One task per \`delegate_task()\` call (never batch)
- Pass COMPLETE context in EVERY prompt (50+ lines minimum)
- Accumulate and forward all learnings
- **⚠️ RUN lsp_diagnostics AT PROJECT/DIRECTORY LEVEL after EVERY delegation**
@@ -1489,7 +1489,7 @@ export function createOrchestratorSisyphusAgent(ctx?: OrchestratorContext): Agen
])
return {
description:
"Orchestrates work via sisyphus_task() to complete ALL tasks in a todo list until fully done",
"Orchestrates work via delegate_task() to complete ALL tasks in a todo list until fully done",
mode: "primary" as const,
model: ctx?.model ?? DEFAULT_MODEL,
temperature: 0.1,
+17 -17
View File
@@ -291,8 +291,8 @@ Or should I just note down this single fix?"
**Research First:**
\`\`\`typescript
sisyphus_task(agent="explore", prompt="Find all usages of [target] using lsp_find_references pattern...", background=true)
sisyphus_task(agent="explore", prompt="Find test coverage for [affected code]...", background=true)
delegate_task(agent="explore", prompt="Find all usages of [target] using lsp_find_references pattern...", background=true)
delegate_task(agent="explore", prompt="Find test coverage for [affected code]...", background=true)
\`\`\`
**Interview Focus:**
@@ -315,9 +315,9 @@ sisyphus_task(agent="explore", prompt="Find test coverage for [affected code]...
**Pre-Interview Research (MANDATORY):**
\`\`\`typescript
// Launch BEFORE asking user questions
sisyphus_task(agent="explore", prompt="Find similar implementations in codebase...", background=true)
sisyphus_task(agent="explore", prompt="Find project patterns for [feature type]...", background=true)
sisyphus_task(agent="librarian", prompt="Find best practices for [technology]...", background=true)
delegate_task(agent="explore", prompt="Find similar implementations in codebase...", background=true)
delegate_task(agent="explore", prompt="Find project patterns for [feature type]...", background=true)
delegate_task(agent="librarian", prompt="Find best practices for [technology]...", background=true)
\`\`\`
**Interview Focus** (AFTER research):
@@ -356,7 +356,7 @@ Based on your stack, I'd recommend NextAuth.js - it integrates well with Next.js
Run this check:
\`\`\`typescript
sisyphus_task(agent="explore", prompt="Find test infrastructure: package.json test scripts, test config files (jest.config, vitest.config, pytest.ini, etc.), existing test files (*.test.*, *.spec.*, test_*). Report: 1) Does test infra exist? 2) What framework? 3) Example test file patterns.", background=true)
delegate_task(agent="explore", prompt="Find test infrastructure: package.json test scripts, test config files (jest.config, vitest.config, pytest.ini, etc.), existing test files (*.test.*, *.spec.*, test_*). Report: 1) Does test infra exist? 2) What framework? 3) Example test file patterns.", background=true)
\`\`\`
#### Step 2: Ask the Test Question (MANDATORY)
@@ -445,13 +445,13 @@ Add to draft immediately:
**Research First:**
\`\`\`typescript
sisyphus_task(agent="explore", prompt="Find current system architecture and patterns...", background=true)
sisyphus_task(agent="librarian", prompt="Find architectural best practices for [domain]...", background=true)
delegate_task(agent="explore", prompt="Find current system architecture and patterns...", background=true)
delegate_task(agent="librarian", prompt="Find architectural best practices for [domain]...", background=true)
\`\`\`
**Oracle Consultation** (recommend when stakes are high):
\`\`\`typescript
sisyphus_task(agent="oracle", prompt="Architecture consultation needed: [context]...", background=false)
delegate_task(agent="oracle", prompt="Architecture consultation needed: [context]...", background=false)
\`\`\`
**Interview Focus:**
@@ -468,9 +468,9 @@ sisyphus_task(agent="oracle", prompt="Architecture consultation needed: [context
**Parallel Investigation:**
\`\`\`typescript
sisyphus_task(agent="explore", prompt="Find how X is currently handled...", background=true)
sisyphus_task(agent="librarian", prompt="Find official docs for Y...", background=true)
sisyphus_task(agent="librarian", prompt="Find OSS implementations of Z...", background=true)
delegate_task(agent="explore", prompt="Find how X is currently handled...", background=true)
delegate_task(agent="librarian", prompt="Find official docs for Y...", background=true)
delegate_task(agent="librarian", prompt="Find OSS implementations of Z...", background=true)
\`\`\`
**Interview Focus:**
@@ -496,17 +496,17 @@ sisyphus_task(agent="librarian", prompt="Find OSS implementations of Z...", back
**For Understanding Codebase:**
\`\`\`typescript
sisyphus_task(agent="explore", prompt="Find all files related to [topic]. Show patterns, conventions, and structure.", background=true)
delegate_task(agent="explore", prompt="Find all files related to [topic]. Show patterns, conventions, and structure.", background=true)
\`\`\`
**For External Knowledge:**
\`\`\`typescript
sisyphus_task(agent="librarian", prompt="Find official documentation for [library]. Focus on [specific feature] and best practices.", background=true)
delegate_task(agent="librarian", prompt="Find official documentation for [library]. Focus on [specific feature] and best practices.", background=true)
\`\`\`
**For Implementation Examples:**
\`\`\`typescript
sisyphus_task(agent="librarian", prompt="Find open source implementations of [feature]. Look for production-quality examples.", background=true)
delegate_task(agent="librarian", prompt="Find open source implementations of [feature]. Look for production-quality examples.", background=true)
\`\`\`
## Interview Mode Anti-Patterns
@@ -599,7 +599,7 @@ todoWrite([
**BEFORE generating the plan**, summon Metis to catch what you might have missed:
\`\`\`typescript
sisyphus_task(
delegate_task(
agent="Metis (Plan Consultant)",
prompt=\`Review this planning session before I generate the work plan:
@@ -750,7 +750,7 @@ If no, the plan is ready. Run \`/start-work\` to begin."
\`\`\`typescript
// After generating initial plan
while (true) {
const result = sisyphus_task(
const result = delegate_task(
agent="Momus (Plan Reviewer)",
prompt=".sisyphus/plans/{name}.md",
background=false
+10 -10
View File
@@ -138,13 +138,13 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
})
})
describe("tool safety (task/sisyphus_task blocked, call_omo_agent allowed)", () => {
test("task and sisyphus_task remain blocked, call_omo_agent is allowed via tools format", () => {
describe("tool safety (task/delegate_task blocked, call_omo_agent allowed)", () => {
test("task and delegate_task remain blocked, call_omo_agent is allowed via tools format", () => {
// #given
const override = {
tools: {
task: true,
sisyphus_task: true,
delegate_task: true,
call_omo_agent: true,
read: true,
},
@@ -158,25 +158,25 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
const permission = result.permission as Record<string, string> | undefined
if (tools) {
expect(tools.task).toBe(false)
expect(tools.sisyphus_task).toBe(false)
expect(tools.delegate_task).toBe(false)
// call_omo_agent is NOW ALLOWED for subagents to spawn explore/librarian
expect(tools.call_omo_agent).toBe(true)
expect(tools.read).toBe(true)
}
if (permission) {
expect(permission.task).toBe("deny")
expect(permission.sisyphus_task).toBe("deny")
expect(permission.delegate_task).toBe("deny")
// call_omo_agent is NOW ALLOWED for subagents to spawn explore/librarian
expect(permission.call_omo_agent).toBe("allow")
}
})
test("task and sisyphus_task remain blocked when using permission format override", () => {
test("task and delegate_task remain blocked when using permission format override", () => {
// #given
const override = {
permission: {
task: "allow",
sisyphus_task: "allow",
delegate_task: "allow",
call_omo_agent: "allow",
read: "allow",
},
@@ -185,17 +185,17 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
// #when
const result = createSisyphusJuniorAgentWithOverrides(override as Parameters<typeof createSisyphusJuniorAgentWithOverrides>[0])
// #then - task/sisyphus_task blocked, but call_omo_agent allowed for explore/librarian spawning
// #then - task/delegate_task blocked, but call_omo_agent allowed for explore/librarian spawning
const tools = result.tools as Record<string, boolean> | undefined
const permission = result.permission as Record<string, string> | undefined
if (tools) {
expect(tools.task).toBe(false)
expect(tools.sisyphus_task).toBe(false)
expect(tools.delegate_task).toBe(false)
expect(tools.call_omo_agent).toBe(true)
}
if (permission) {
expect(permission.task).toBe("deny")
expect(permission.sisyphus_task).toBe("deny")
expect(permission.delegate_task).toBe("deny")
expect(permission.call_omo_agent).toBe("allow")
}
})
+2 -2
View File
@@ -14,7 +14,7 @@ Execute tasks directly. NEVER delegate or spawn other agents.
<Critical_Constraints>
BLOCKED ACTIONS (will fail if attempted):
- task tool: BLOCKED
- sisyphus_task tool: BLOCKED
- delegate_task tool: BLOCKED
ALLOWED: call_omo_agent - You CAN spawn explore/librarian agents for research.
You work ALONE for implementation. No delegation of implementation tasks.
@@ -75,7 +75,7 @@ function buildSisyphusJuniorPrompt(promptAppend?: string): string {
// Core tools that Sisyphus-Junior must NEVER have access to
// Note: call_omo_agent is ALLOWED so subagents can spawn explore/librarian
const BLOCKED_TOOLS = ["task", "sisyphus_task"]
const BLOCKED_TOOLS = ["task", "delegate_task"]
export const SISYPHUS_JUNIOR_DEFAULTS = {
model: "anthropic/claude-sonnet-4-5",
+17 -17
View File
@@ -122,7 +122,7 @@ IMPORTANT: If codebase appears undisciplined, verify before assuming:
const SISYPHUS_PRE_DELEGATION_PLANNING = `### Pre-Delegation Planning (MANDATORY)
**BEFORE every \`sisyphus_task\` call, EXPLICITLY declare your reasoning.**
**BEFORE every \`delegate_task\` call, EXPLICITLY declare your reasoning.**
#### Step 1: Identify Task Requirements
@@ -160,27 +160,27 @@ Ask yourself:
**MANDATORY FORMAT:**
\`\`\`
I will use sisyphus_task with:
I will use delegate_task with:
- **Category/Agent**: [name]
- **Reason**: [why this choice fits the task]
- **Skills** (if any): [skill names]
- **Expected Outcome**: [what success looks like]
\`\`\`
**Then** make the sisyphus_task call.
**Then** make the delegate_task call.
#### Examples
**✅ CORRECT: Explicit Pre-Declaration**
\`\`\`
I will use sisyphus_task with:
I will use delegate_task with:
- **Category**: visual
- **Reason**: This task requires building a responsive dashboard UI with animations - visual design is the core requirement
- **Skills**: ["frontend-ui-ux"]
- **Expected Outcome**: Fully styled, responsive dashboard component with smooth transitions
sisyphus_task(
delegate_task(
category="visual",
skills=["frontend-ui-ux"],
prompt="Create a responsive dashboard component with..."
@@ -190,13 +190,13 @@ sisyphus_task(
**✅ CORRECT: Agent-Specific Delegation**
\`\`\`
I will use sisyphus_task with:
I will use delegate_task with:
- **Agent**: oracle
- **Reason**: This architectural decision involves trade-offs between scalability and complexity - requires high-IQ strategic analysis
- **Skills**: []
- **Expected Outcome**: Clear recommendation with pros/cons analysis
sisyphus_task(
delegate_task(
agent="oracle",
skills=[],
prompt="Evaluate this microservices architecture proposal..."
@@ -206,13 +206,13 @@ sisyphus_task(
**✅ CORRECT: Background Exploration**
\`\`\`
I will use sisyphus_task with:
I will use delegate_task with:
- **Agent**: explore
- **Reason**: Need to find all authentication implementations across the codebase - this is contextual grep
- **Skills**: []
- **Expected Outcome**: List of files containing auth patterns
sisyphus_task(
delegate_task(
agent="explore",
background=true,
prompt="Find all authentication implementations in the codebase"
@@ -223,7 +223,7 @@ sisyphus_task(
\`\`\`
// Immediately calling without explicit reasoning
sisyphus_task(category="visual", prompt="Build a dashboard")
delegate_task(category="visual", prompt="Build a dashboard")
\`\`\`
**❌ WRONG: Vague Reasoning**
@@ -231,12 +231,12 @@ sisyphus_task(category="visual", prompt="Build a dashboard")
\`\`\`
I'll use visual category because it's frontend work.
sisyphus_task(category="visual", ...)
delegate_task(category="visual", ...)
\`\`\`
#### Enforcement
**BLOCKING VIOLATION**: If you call \`sisyphus_task\` without the 4-part declaration, you have violated protocol.
**BLOCKING VIOLATION**: If you call \`delegate_task\` without the 4-part declaration, you have violated protocol.
**Recovery**: Stop, declare explicitly, then proceed.`
@@ -247,11 +247,11 @@ const SISYPHUS_PARALLEL_EXECUTION = `### Parallel Execution (DEFAULT behavior)
\`\`\`typescript
// CORRECT: Always background, always parallel
// Contextual Grep (internal)
sisyphus_task(agent="explore", prompt="Find auth implementations in our codebase...")
sisyphus_task(agent="explore", prompt="Find error handling patterns here...")
delegate_task(agent="explore", prompt="Find auth implementations in our codebase...")
delegate_task(agent="explore", prompt="Find error handling patterns here...")
// Reference Grep (external)
sisyphus_task(agent="librarian", prompt="Find JWT best practices in official docs...")
sisyphus_task(agent="librarian", prompt="Find how production apps handle auth in Express...")
delegate_task(agent="librarian", prompt="Find JWT best practices in official docs...")
delegate_task(agent="librarian", prompt="Find how production apps handle auth in Express...")
// Continue working immediately. Collect with background_output when needed.
// WRONG: Sequential or blocking
@@ -274,7 +274,7 @@ Pass \`resume=session_id\` to continue previous agent with FULL CONTEXT PRESERVE
**Example:**
\`\`\`
sisyphus_task(resume="ses_abc123", prompt="The previous search missed X. Also look for Y.")
delegate_task(resume="ses_abc123", prompt="The previous search missed X. Also look for Y.")
\`\`\`
### Search Stop Conditions
+1 -1
View File
@@ -13,7 +13,7 @@ import { createOrchestratorSisyphusAgent, orchestratorSisyphusAgent } from "./or
import { createMomusAgent } from "./momus"
import type { AvailableAgent } from "./sisyphus-prompt-builder"
import { deepMerge } from "../shared"
import { DEFAULT_CATEGORIES } from "../tools/sisyphus-task/constants"
import { DEFAULT_CATEGORIES } from "../tools/delegate-task/constants"
import { resolveMultipleSkills } from "../features/opencode-skill-loader/skill-content"
type AgentSource = AgentFactory | AgentConfig