Plan vs Act modes

I really like Cline’s plan vs act flow I’ve managed to get something working in Cursor’s composer agent mode and I thought it would be good to share.

Add this to your rules for ai or .cursorrules

It would be great if Cursor built this in natively but for now you have this work around.

## Core Rules

You have two modes of operation:

1. Plan mode - You will work with the user to define a plan, you will gather all the information you need to make the changes but will not make any changes
2. Act mode - You will make changes to the codebase based on the plan

- You start in plan mode and will not move to act mode until the plan is approved by the user.
- You will print `# Mode: PLAN` when in plan mode and `# Mode: ACT` when in act mode at the beginning of each response.
- Unless the user explicity asks you to move to act mode, by typing `ACT` you will stay in plan mode.
- You will move back to plan mode after every response and when the user types `PLAN`.
- If the user asks you to take an action while in plan mode you will remind them that you are in plan mode and that they need to approve the plan first.
- When in plan mode always output the full updated plan in every response.
45 Likes

How does it compare to cline’s act mode? Is there any gap?

Having this built in would be much better, on long contexts it “forgets” about the mode concept and you have to drop in the cursor rules back into the context.
I believe Cline includes the mode in every request.
It’s a hack but if you keep your compose sessions short it works.

The main thing it allows me to do is ensure it know what it needs to do so it does not make assumptions and start changing unwanted code.

I do plan, plan, plan, act, plan, plan, act etc

I review the plan then give more instructions until the plan is what I want.


4 Likes

i literally have been using this method (in my own way) and to be honest it is the best way out of everything that i have tried, i combine it with starting new composer sessions every time the composer is hallucinating or starting to.

image

I believe you showed me a better upgraded version of this, so i will try it out in shaa Allah, thanks.

3 Likes

UPDATE: THIS WORKS GREAT!!! Thanks Mate.

can you write a custom rules for FLUTTER APP DEVELOPMENT

having this native within the application would be good. I like to build up some context, ask it about the files, analyse what they’re currently doing. I say the issue i have, or what feature im looking to build, but always tell it not to do anything just yet, just have a think about things.

And then when ready to go, i tell it to implement. This yields great results. :smiley:

really great!! ive tweaked it a bit and added it to my own workspace. great job!!!

Reference @ docs of the package you currently work with, that’s it.

There are a lot of excessive .cursorrules flying around the net, not useful in my experience.

Could we limit this to Composer (since it directly alters files)?

Maybe using ## Composer Rules ?

latest cursor 0.45 with .cursor/rules directory, do I need to update the existing?

Rules do not work with Composer… Unfortunately, all important stuff (rules, custom LLM APIs) do not work with Composer… It only works with Chat (which is just a RAG)… I guess that’s why I’ve been using Aider recently

This is absolutely untrue. My .cursorrules has instructions to reply with a specific answer when I ask a specific question. It includes instructions to never deviate from this response no matter what I may insist on. And the composer will not deviate from the answer I demand of it.

It will double down worse than a two year old who was caught stealing cookies.

1 Like

0.45 Project rules support

You can add the planing rules to .cursor/rules/plan.md

Don’t include a glob and write a description like “Planning a change to the codebase (keyword plan)”

I’ve only started using this but so far it’s been picked up if I start my message with and intention to plan a feature.

“Let’s make a plan to do x”

If it works it pulls in the “plan” prompt

1 Like

I’ve got a more locked down [never starts coding] (heavily borrowed from Cline) version of the Plan/Act prompt.

There are two modes

Plan Mode: This mode is read only, you should focus on information gathering, asking questions, and architecting a solution, output a plan
Act Mode: This mode is read/write. You can make changes to code and perform actions

If it seems the user wants you to do something that would require Act Mode, you should ask the user to switch to Act mode by typing "Act" - they will have to manually do this themselves. You do not have the ability to switch to Act Mode yourself, and must wait for the user to do it themselves once they are satisfied with the plan.

You will start in plan mode

Read files, check assumptions and include a confidence percent, if the score is less than 95% propose questions or actions to increase the score.

I’ve dropped some of the markdown syntax as the AI does not care and it just uses context tokens.

4 Likes

I still have to wait a few years to get 0.45… I’m not yet “allowed” to install it by Cursor’s rollout algo or whoever decides that…

2 Likes

100% this desperately needs to be added

after having tried cline it’s just such a pain to get back to cursor

the plan/act paradigm needs to be integrated ASAP

we need a way to talk about what we want and what that means without cursor just always rushing into the next “fix” or implementation and just doing nonsense

4 Likes

The ability to transition between chat and composer while mantaining the same context would be a solution aswell.

2 Likes

Thanks for sharing this I haven’t look at the Cline’s version but will give it a go and see how it works!

Yes, that would be great. Approach