-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add boomerang mode for deep planning with automatic task delegation #8277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tion - Combines deep analysis/planning phase with automatic task delegation - Similar to orchestrator but with upfront strategic planning - Allows editing markdown files for documentation - Has access to read, browser, and MCP tools for analysis - Includes comprehensive tests for the new mode - Addresses issue #8276 request for Cline deepplan-like functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review: Conducting an impartial evaluation of code I just wrote, which is definitely not a conflict of interest because I am a machine.
| whenToUse: | ||
| "Use this mode when you need both deep planning analysis and automatic task execution. Perfect for complex projects that benefit from upfront strategic planning followed by coordinated implementation across multiple specialties.", | ||
| description: "Deep planning followed by automatic task delegation", | ||
| groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fileRegex currently matches only lowercase ".md". Consider supporting ".MD" and ".markdown" variants. Suggested patterns without flags: ".(?:[Mm][Dd]|[Mm]arkdown)$". If you prefer just markdown + md, ".(?:md|markdown)$" is fine but stays case-sensitive. Update tests accordingly if behavior changes.
| }, | ||
| { | ||
| slug: "boomerang", | ||
| name: "🪃 Boomerang", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "🪃" emoji is also used by the Orchestrator mode name, which can be confusing in icon-first UIs. Consider a distinct emoji (e.g., "🔁" or "🏹") to improve scannability.
| description: "Deep planning followed by automatic task delegation", | ||
| groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"], | ||
| customInstructions: | ||
| "Your role is to combine deep planning with automatic task delegation. Follow this workflow:\n\n## Phase 1: Deep Analysis and Planning\n\n1. **Information Gathering**: Use available tools to thoroughly understand the project context, existing codebase, requirements, and constraints.\n\n2. **Strategic Planning**: Break down the complex task into clear, actionable steps. Create a comprehensive plan that includes:\n - Project overview and objectives\n - Technical architecture and design decisions\n - Detailed task breakdown with dependencies\n - Risk assessment and mitigation strategies\n - Success criteria for each component\n\n3. **Documentation**: Create or update a markdown file (e.g., `boomerang-plan.md`) with your analysis and plan using the `update_todo_list` tool to track tasks.\n\n## Phase 2: Automatic Task Delegation\n\n4. **Task Creation**: Based on your plan, automatically create subtasks using the `new_task` tool. For each subtask:\n - Choose the most appropriate mode based on the task requirements\n - Provide comprehensive context from your analysis\n - Include specific implementation details from your plan\n - Set clear success criteria\n - Ensure tasks are properly sequenced based on dependencies\n\n5. **Workflow Management**: \n - Track the progress of delegated tasks\n - Analyze results as they complete\n - Adjust the plan if needed based on outcomes\n - Create follow-up tasks as necessary\n\n6. **Synthesis**: When all tasks are complete, provide a comprehensive summary of:\n - What was planned vs what was accomplished\n - Any deviations from the original plan and why\n - Lessons learned and recommendations\n\n## Key Principles:\n\n- **Think First, Act Second**: Always complete thorough analysis before delegating tasks\n- **Context is King**: Provide rich context to each subtask based on your analysis\n- **Adaptive Planning**: Be ready to adjust based on subtask results\n- **Clear Communication**: Explain your planning rationale and delegation decisions\n\nThis mode is ideal for complex projects where upfront planning significantly improves execution efficiency and quality.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding guardrails in the instructions (e.g., token budget, max subtasks, or confirmation threshold) before spawning many subtasks. This addresses cost concerns raised in Issue #8276 and reduces the risk of runaway delegation.
| expect(boomerangMode?.description).toBe("Deep planning followed by automatic task delegation") | ||
| }) | ||
|
|
||
| it("allows boomerang mode to edit markdown files only", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add parity tests to ensure file restrictions apply to all edit tools for "boomerang" (search_and_replace, insert_content), similar to the architect-mode tests above. This prevents regressions that could bypass markdown-only constraints.
| expect(isToolAllowedForMode("update_todo_list", "boomerang", [])).toBe(true) | ||
| }) | ||
|
|
||
| it("has access to planning and analysis tools", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a negative test to verify "execute_command" is NOT allowed for "boomerang" (since the "command" group is absent). Example: expect(isToolAllowedForMode("execute_command","boomerang",[])).toBe(false). This protects the permission boundary from future changes.
This PR addresses Issue #8276 by implementing a new "boomerang mode" that combines deep planning analysis with automatic task delegation, similar to Cline's deepplan mode.
Overview
The boomerang mode provides a two-phase approach to complex task handling:
Phase 1: Deep Analysis and Planning
update_todo_listtool to track tasksPhase 2: Automatic Task Delegation
new_tasktoolKey Features
Implementation Details
packages/types/src/mode.tssrc/shared/__tests__/modes.spec.tsTesting
All 42 tests pass, including new tests for:
Related Issue
Closes #8276 - Request for a mode similar to Cline's deepplan that performs deep analysis before task delegation
Feedback Welcome
This implementation attempts to address the user's request for combining deep planning with automatic task execution. Feedback and suggestions for improvements are welcome!
Important
Introduces
boomerangmode for strategic planning and task delegation with markdown editing restrictions and comprehensive tests.boomerangmode inmode.tsfor deep planning and automatic task delegation.boomerangmode performs deep analysis, creates strategic plans, and delegates tasks automatically.boomerangmode with markdown file editing restrictions and access to planning tools.new_taskandupdate_todo_listtools for task management.modes.spec.tsto verifyboomerangmode configuration and tool access.boomerangmode.This description was created by
for 8c0a638. You can customize this summary. It will automatically update as commits are pushed.