You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Core Principle: EVERY create_task response gets the SAME comprehensive guidance that works for ALL patterns.
Universal Response After EVERY create_task:
{
"success": true,
"taskId": "task-id",
"guidance": {
"workflow": {
"step1": "✅ Task created and queued for processing",
"step2": "Continue creating any additional tasks needed",
"step3": "When done creating tasks, launch agent(s) to process all work"
},
"orchestration": {
"pattern": "Agents discover their own tasks via check_tasks()",
"single_agent": "Task(subagent_type=\"agent-name\", prompt=\"...\")",
"multiple_agents_parallel": "Put all Task() calls in ONE message for parallel execution",
"multiple_agents_sequential": "Use separate messages for sequential execution"
},
"example_invocations": {
"single": "Task(\n subagent_type=\"senior-backend-engineer\",\n prompt=\"You have MCP tasks assigned.\\nStart: mcp__agent_comm__check_tasks(agent=\\\"senior-backend-engineer\\\")\\nThis discovers ALL your tasks. For each task:\\n1. Get context 2. Submit plan 3. Execute 4. Report progress 5. Mark complete\"\n)",
"parallel": "// For parallel execution, put ALL in ONE message:\nTask(subagent_type=\"frontend-engineer\", prompt=\"Check your MCP tasks...\")\nTask(subagent_type=\"backend-engineer\", prompt=\"Check your MCP tasks...\")\nTask(subagent_type=\"qa-engineer\", prompt=\"Check your MCP tasks...\")"
},
"critical_note": "⚡ PARALLEL EXECUTION: Multiple Task() calls in SAME message run simultaneously"
}
}
Implementation Changes
1. Remove Task Types Completely:
Delete taskType from CreateTaskOptions interface
Remove all type-related logic from create-task.ts
Simplify response generation
2. Update ResponseEnhancer.ts:
privateasyncenhanceCreateTask(context: EnhancementContext): Promise<EnhancedResponse['guidance']>{return{workflow: generateWorkflowSteps(),orchestration: generateOrchestrationGuidance(),example_invocations: generateExampleInvocations(context.agent),critical_note: "⚡ PARALLEL EXECUTION: Multiple Task() calls in SAME message run simultaneously"};}
Problem Statement
The Smart Response System fails to provide clear workflow guidance after task creation, causing Claude to:
Root Cause Analysis
Proposed Solution: Universal Orchestration Template
Core Principle: EVERY create_task response gets the SAME comprehensive guidance that works for ALL patterns.
Universal Response After EVERY create_task:
{ "success": true, "taskId": "task-id", "guidance": { "workflow": { "step1": "✅ Task created and queued for processing", "step2": "Continue creating any additional tasks needed", "step3": "When done creating tasks, launch agent(s) to process all work" }, "orchestration": { "pattern": "Agents discover their own tasks via check_tasks()", "single_agent": "Task(subagent_type=\"agent-name\", prompt=\"...\")", "multiple_agents_parallel": "Put all Task() calls in ONE message for parallel execution", "multiple_agents_sequential": "Use separate messages for sequential execution" }, "example_invocations": { "single": "Task(\n subagent_type=\"senior-backend-engineer\",\n prompt=\"You have MCP tasks assigned.\\nStart: mcp__agent_comm__check_tasks(agent=\\\"senior-backend-engineer\\\")\\nThis discovers ALL your tasks. For each task:\\n1. Get context 2. Submit plan 3. Execute 4. Report progress 5. Mark complete\"\n)", "parallel": "// For parallel execution, put ALL in ONE message:\nTask(subagent_type=\"frontend-engineer\", prompt=\"Check your MCP tasks...\")\nTask(subagent_type=\"backend-engineer\", prompt=\"Check your MCP tasks...\")\nTask(subagent_type=\"qa-engineer\", prompt=\"Check your MCP tasks...\")" }, "critical_note": "⚡ PARALLEL EXECUTION: Multiple Task() calls in SAME message run simultaneously" } }Implementation Changes
1. Remove Task Types Completely:
taskTypefrom CreateTaskOptions interface2. Update ResponseEnhancer.ts:
3. Clean Task Content (Integrate with #63):
4. New Orchestration Templates:
Files to Modify
src/tools/create-task.ts- Remove types, clean contentsrc/core/ResponseEnhancer.ts- Universal orchestration guidancesrc/types.ts- Remove taskType enumsrc/core/orchestration-templates.ts(new) - Orchestration patternsSuccess Criteria
Benefits
Related Issues
This elegant solution provides Claude with everything needed to successfully orchestrate agents, regardless of the pattern.