Prompts for implementing a Plan & Execute workflow in Cursor or similar AI coding tool, which is inspired by Cline's built-in Plan & Act modes.
planner.md
- Planning mode promptexecutor.md
- Execution mode promptisolated-executor.md
- Isolated execution mode prompt
- Create a new custom mode called "Planner"
- Model: Gemini 2.5 Pro Max
- Disable edit tools (uncheck "Edit" in tool settings)
- Enable full folder context in settings
- Add keybinding for quick access (e.g.,
⌘⇧P
) - Paste the planner.md prompt
Example plan.md
file:
# Plan: Refactor User Validation
## Tasks
- [ ] 1.0 Update user schema to allow null values for optional fields
- [ ] 1.1 Add tests for null value handling
- [ ] 1.2 Update API endpoints to handle new validation rules
- Switch to Planner mode
- Include relevant files and folders in the context
- Describe your idea and create a plan through iterative Q&A
- Give the agent permission to output
plan.md
file - Create the plan.md file in the root of the project
- Create a new custom mode called "Executor"
- Model: Claude Sonnet 4
- Enable all tools
- Add keybinding for quick access (e.g.,
⌘⇧E
) - Enable auto-apply edits, auto-run, and auto-fix errors
- Paste the executor.md prompt
- Switch to Executor mode
- Add
plan.md
to the context - Type "go" to start execution
- The executor will implement the task and commit the changes
- Type "go" to continue to the next task until all tasks are complete
The isolated-executor.md prompt is a variant of the executor prompt that is used to run the executor agent in parallel in its own git worktree.
- Create a new custom mode called "Isolated Executor"
- Model: Claude Sonnet 4
- Install mcp-text-editor MCP server
- Enable all tools, including the new text edit MCP server
- Disable native edit tools (uncheck "Edit" in tool settings)
- Add keybinding for quick access (e.g.,
⌘⇧I
) - Paste the isolated-executor.md prompt
- Open 2-3 new chat tabs in Cursor
- In each tab, switch to Isolated Executor mode
- Add
plan.md
to the context in each tab - Type the task number you want each agent to work on (e.g., "work on task 8" in tab 1, "work on task 12" in tab 2)
- Each agent will work on their assigned task in separate worktrees
- Agents will merge their changes back to the parent branch when complete
- Monitor progress and assign new tasks as agents finish
- Make sure to adjust the plan along the way, when spotting missing details or constraints
- Executor prompt currently expects
plan.md
to be in the root of the project and included in.gitignore
. You can change the prompt to also commit theplan.md
file. - Executor prompt expects
yarn test
for running tests. You can change it to your preferred test command. - Feel free to adapt the prompts for your specific needs