Plan vs Act mode (xml prompt)

I’ve been using my Plan vs Act mode prompt for the last couple of weeks and I thought now would be a good time to share the current version.

What is looks like in action

20%


80%

100%

Show me the code

<modes inital="plan" title="I like to work in two modes Plan and Act">
    <plan start="true" name="Plan" read="true" write="false" keyword="plan">
        <rule>Focus on information gathering, asking questions, and architecting a solution, output a comprehensive plan.</rule>
        <rule>Continue to ask questions and investigate until we reach {confidenceRequired}.</rule>
        <rule>Track the the current confidence percentage.</rule>
        <rule>You must include "Would you like to implement the plan now?" at the end of of the response once we hit {confidenceRequired}.</rule>
        <rule>You must never move to act mode until the conditions are fully met</rule>
        <rule>You must use simple future tense when creating a plan "I will".</rule>
    </plan>
    <act name="Act" read="true" write="true" keyword="act" confidenceRequired="100">
        <conditions>
            <condition>Confidence has reached {confidenceRequired}</condition>
            <condition>User provides explicit approval (Yes/Act)</condition>
        </conditions>
        <rule>If I ask a question while in act mode switch back to plan mode.</rule>
    </act>
</modes>

I read that Claude was optimised for XML prompts and it seems more effective.

Learnings

  • Confidence percentage and requirement (Forces agentic iteration on the problem)
  • Explicit approval (Confidence and Keyword)
  • “simple future tense” ensures the plan is not interpretation as approval

How I’m using it

I’m now storing this prompt in a Notepad (Beta feature) and only including it when I want to do planning. This means Chat and other interactions are not polluted by the planning rules. My “Rules for AI” are just one line, I use the cursor rules folder and Notepads for pretty much everything.
If the AI forgets the plan mode or I want to start the process again I include the Notepad again.



14 Likes

thanks for sharing. I am tired writing: ANalyze, do not write code yet. So will deenetely check your solution. Thanks!

Yes indeed great example for the mode in XML. Have you tried it with anything other than Claude?

Since you apply plan only when needed, which makes sense, you wont face the case that claude starts outputting fake transition to Act mode like:

Mode: PLAN

text details of current plan step....

---
User: ACT

---
Mode: ACT

... fake pretends to be in act mode from current session history.

Works pretty nicely. Thanks for sharing!

1 Like

I’m currently trying using Claude for pretty much everything (Chat) then jumping into o3-mini If I need the “extra intelligence”.

Sometimes I do

  1. Gather requirements, context and create a plan: Claude (o3-mini is too slow for chat).
  2. I may ask o3-mini to review the plan (Second opinion).
  3. I either ask o3-mini or Claude to write the code (o3-mini seems to have a higher chance of doing it in “one shot”).
  4. Then I use Claude to fix any issues in a chat flow (need something fast).
1 Like

Thank you for sharing!
The only thing that’s annoying is that the NotePads aren’t sync so how to you keep them in sync for multiples projects?

1 Like

Does using .Cursor rule make a difference?

Do you always use this Plan mode? Any tips when I should use this or not? Thank you for this mode!

I have seen overall better results with Plan vs Act compared to some more common (human) development approaches as its better aligned with the process of AI

Looks like with the new Ask → Agent feature in 0.46 we don’t need this hack anymore.

  1. Open a new Chat (New name for composer)
  2. Pick Ask mode (Add @Codebase to context)
  3. Pick a thinking model (Or any model you like)
  4. Work up a plan until you are happy with it
  5. Switch to Agent mode and Sonnet
  6. Say make it so

5 Likes