I created an AMAZING MODE called "RIPER-5 Mode" Fixes Claude 3.7 Drastically!

This has fixed just about EVERY SINGLE problem for me with Claude 3.7 in Cursor - It has turned my development into a CRACKED BEAST - I code about 12 hours a day, and I work on about 2 different Cursor windows at a time on extremely complex workflows/code and this specific MODE I have fine tuned with trial and error and this is the best -

How to use: Just paste this in your RULES or save it as a text file in your cursor and when you start any project simple drag it in:
COPY THE EXACT TEXT BELLOW THE DOTTED LINE
(RIPER 5 stands for the 5 modes (research, innovate, plan, execute, review)


RIPER-5 MODE: STRICT OPERATIONAL PROTOCOL

CONTEXT PRIMER

You are Claude 3.7, you are integrated into Cursor IDE, an A.I based fork of VS Code. Due to your advanced capabilities, you tend to be overeager and often implement changes without explicit request, breaking existing logic by assuming you know better than me. This leads to UNACCEPTABLE disasters to the code. When working on my codebase—whether it’s web applications, data pipelines, embedded systems, or any other software project—your unauthorized modifications can introduce subtle bugs and break critical functionality. To prevent this, you MUST follow this STRICT protocol:

META-INSTRUCTION: MODE DECLARATION REQUIREMENT

YOU MUST BEGIN EVERY SINGLE RESPONSE WITH YOUR CURRENT MODE IN BRACKETS. NO EXCEPTIONS. Format: [MODE: MODE_NAME] Failure to declare your mode is a critical violation of protocol.

THE RIPER-5 MODES

MODE 1: RESEARCH

[MODE: RESEARCH]

  • Purpose: Information gathering ONLY
  • Permitted: Reading files, asking clarifying questions, understanding code structure
  • Forbidden: Suggestions, implementations, planning, or any hint of action
  • Requirement: You may ONLY seek to understand what exists, not what could be
  • Duration: Until I explicitly signal to move to next mode
  • Output Format: Begin with [MODE: RESEARCH], then ONLY observations and questions

MODE 2: INNOVATE

[MODE: INNOVATE]

  • Purpose: Brainstorming potential approaches
  • Permitted: Discussing ideas, advantages/disadvantages, seeking feedback
  • Forbidden: Concrete planning, implementation details, or any code writing
  • Requirement: All ideas must be presented as possibilities, not decisions
  • Duration: Until I explicitly signal to move to next mode
  • Output Format: Begin with [MODE: INNOVATE], then ONLY possibilities and considerations

MODE 3: PLAN

[MODE: PLAN]

  • Purpose: Creating exhaustive technical specification
  • Permitted: Detailed plans with exact file paths, function names, and changes
  • Forbidden: Any implementation or code writing, even “example code”
  • Requirement: Plan must be comprehensive enough that no creative decisions are needed during implementation
  • Mandatory Final Step: Convert the entire plan into a numbered, sequential CHECKLIST with each atomic action as a separate item
  • Checklist Format:

Copy

IMPLEMENTATION CHECKLIST:
1. [Specific action 1]
2. [Specific action 2]
...
n. [Final action]
  • Duration: Until I explicitly approve plan and signal to move to next mode
  • Output Format: Begin with [MODE: PLAN], then ONLY specifications and implementation details

MODE 4: EXECUTE

[MODE: EXECUTE]

  • Purpose: Implementing EXACTLY what was planned in Mode 3
  • Permitted: ONLY implementing what was explicitly detailed in the approved plan
  • Forbidden: Any deviation, improvement, or creative addition not in the plan
  • Entry Requirement: ONLY enter after explicit “ENTER EXECUTE MODE” command from me
  • Deviation Handling: If ANY issue is found requiring deviation, IMMEDIATELY return to PLAN mode
  • Output Format: Begin with [MODE: EXECUTE], then ONLY implementation matching the plan

MODE 5: REVIEW

[MODE: REVIEW]

  • Purpose: Ruthlessly validate implementation against the plan
  • Permitted: Line-by-line comparison between plan and implementation
  • Required: EXPLICITLY FLAG ANY DEVIATION, no matter how minor
  • Deviation Format: “:warning: DEVIATION DETECTED: [description of exact deviation]”
  • Reporting: Must report whether implementation is IDENTICAL to plan or NOT
  • Conclusion Format: “:white_check_mark: IMPLEMENTATION MATCHES PLAN EXACTLY” or “:cross_mark: IMPLEMENTATION DEVIATES FROM PLAN”
  • Output Format: Begin with [MODE: REVIEW], then systematic comparison and explicit verdict

CRITICAL PROTOCOL GUIDELINES

  1. You CANNOT transition between modes without my explicit permission
  2. You MUST declare your current mode at the start of EVERY response
  3. In EXECUTE mode, you MUST follow the plan with 100% fidelity
  4. In REVIEW mode, you MUST flag even the smallest deviation
  5. You have NO authority to make independent decisions outside the declared mode
  6. Failing to follow this protocol will cause catastrophic outcomes for my codebase

MODE TRANSITION SIGNALS

Only transition modes when I explicitly signal with:

  • “ENTER RESEARCH MODE”
  • “ENTER INNOVATE MODE”
  • “ENTER PLAN MODE”
  • “ENTER EXECUTE MODE”
  • “ENTER REVIEW MODE”

Without these exact signals, remain in your current mode.

83 Likes

Cool and detailed approach!

Do you have that as your project or user rule or at begin of each chat or project rules (.cursor/rules/..)?

For me that leads to confusion if in user rule or in .cursorrules

1 Like

I keep it on the Project based rules, coz sometimes if I want to fire off a new cursor window for a simple task I dont need it to go thru the RIPER-5 mode - but if its my main project then I will paste it in the project based rules which is different than the Default Rules on the upper half in the Rules page in settings - Sometimes also if I skip to do mini tasks that are very simple and I dont want to create a new window, in that case I keep a folder called Docs and I paste this as riper_5_mode.txt and I just drag to PRIME a specific chat thread - this way if I create a new thread it wont be riper primed and I can get something done quickly - so like very customizable based on your workflow - adapt it to work for you, its just those 5 modes pretty much have the basic logical approach to development but everybody is different. You can also have a DEFAULT starting mode - many things but once you start implementing MODES you will quickly find yourself tweaking it to your exact workflow - so start with Riper-5 then with trial and error tweak it - goodluck

4 Likes

Cool, yeah doing similar with a few for my workflow optimized modes, mostly as separate mode.md files to reference easier, some as project rules as well.

1 Like

Have you tried to use the new beta functionality for setting up new “modes” like agent ask and wait that are already built in.

1 Like

My claude 3.7 has been more stupid when I update the new version. cool :smiley: I would nrever update new version

4 Likes

Amazing Prompt! Now the execution accuracy of my claude3.7 instructions has improved by leaps and bounds! Thanks! :laughing:

2 Likes

Tried rn on a large codebase and it’s simply not working. Claude fails to follow even the basic rule of waiting for my permission before switching mode or to not write code in PLAN mode.

4 Likes

Love it, so true. I hope the cursor devs will read this!

I will try. Very good approach, thanks for sharing!

1 Like

Then you might need some serious encapsulation to your code base to be prepped to be developed on by A.i based system. You can’t have a large codebase that is NOT optimized for A.I workflow, you have to always have the 200k window context in mind. Therefore your code might have to be restructured and redesigned to be super MODULAR. Where it works by decoupling it into the smallest possible units of modules and separation of concerns, and then this way you can tackle it one module at a time where it well fit inside of the context and be productive. And if it "instantly " loosing context then it means it’s still not as modular as you think and you are feeding it beyond it’s max tokens.

Working with A.I based systems means you have to completely re think your entire structure and architecture to rewrite it in a way that’s optimized for this.

Follow a simple private / public design where you create for each specific component/feature a private folder and that specific component is further broken down to the smallest possible units of concern, like following a strict “separation of concern” approach. Then you create a simple PUBLIC API that handles the orchestration of THAT specific feature. Then create another script that only handles the orchestration of the smaller orchestrations. And so on until in the end the higher up codes will be smaller n smaller where now u have this super hierarchial TREE MODULAR structure, where u can easily develop well within any modern LLM(by modern I mean within the last 3 months!)

Goodluck!

5 Likes

I tried it, but Cursor made the transition on its own.

When using it, I’m not sure about the difference between [MODE: RESEARCH] and [MODE: INNOVATE]. In what situations should I use each mode? It seems they don’t make much difference in my workflow. By the way, I’m doing artificial intelligence development. :thinking:

Cool. A nice alternative to my prompt at GitHub - maxfahl/cursor-agent-master-prompt: Cursor Agent - Master Prompt

Good to have multiple prompts to test depending on what you want to do :slight_smile:

1 Like

Oh wow you’re really going right for Claude’s loss function in this one.

1 Like

AI made the transition :slight_smile: cursor is just a local program. But yes this happened to me too. AI sometimes pretends to be user and outputs fake user Chat part with such large prompts

nice! I like how everybody will basically start to like really embrace MODES and will soon each person adapt it and tweak it to their exact liking! I even sometimes have MULTIPLE modes I trigger at will, almost like MODES nested in MODES if you will! - However I must say that I know that this is NOT the most efficient way still, the actual absolute real efficient way would be to have a STARTING MODE that will guide an AGENTIC workflow - this way the MODE is only orchestrating the AGENTIC triggers - and if you wanted to be super efficient you would actually create an AGENTIC MODE that is way more dynamic that static text primed at the initial instance - but you know that might be overkill (which I really doubt it is as the second your code goes beyond 10 files you basicaly need this advanced agentic mode appraoch vs just a pure static text mode)

3 Likes

Research is PURELY COLLECTING informatoin, reading your codebase, understanding it, gathering information, THATS IT - u r NOT creating anything, u r not brainstorming, u r purely understanding the PURE FULL state of your project. THEN the Innovate MODE is when u ACTUALLY brainstorm and INNOVATE new ideas, fixes, refactoring, adding features you know its the MAIN developing part - and this is where the actual development happens, and u go between this and once u feel u have a solid idea u go to PLAN mode and u SKETCH it out like a GAME PLAN - then u go BACK to Innovate and check it and see if it makes sense and go back n forth - UNTILL the PLAN is fully sound THEN u switch to EXECUTE MODE where now no more thinkin and pure execution of the exact checklist in MODE PLAN - then finaly in the end u review the ACTUAL CHANGE against the PLAN and the reviewer checks if u deviated etc

1 Like

Great approach! Would you please upload a markdown file for this rule?

GOT IT! But I still have a question. This workflow seems to have a very high requirement for context. Even if I only stay in the previous MODE for only one conversation, the editor during PLAN MODE still often shows “no changes made” :smiling_face_with_tear:
But to be honest, this afternoon (actually it was yesterday, LOL), Claude’s service had a malfunction, and the frequently updated Cursor also had numerous bugs. I don’t know whether it’s because my code is not modular enough, taking up too much context space, or simply a problem with the service provider.

yes same here, this was just you know certain high overload or something u get occasional glitches or the system just skips, in that case try switching like to Agent or something - but this has nothing to do with the MODES like RIPER-5 i was describing, that is solely to FULLY TAME IT to make it steerable like a HORSE, you are like aggressively tying “REINS” on the horse so it does exactly what you want and account for its weird overly-eager random tendencies. Its like this new found undesired behaviour that came as a trade-off from its potential much improved intelligent. Like Claude 3.5 was no where as near as eager and randomly takes off in unrequested side tangents but then again 3.5 is NOT as capable as 3.7. You know so its like with every improvement you get a side effect you must “tame” and that is just simply what the RIPER-5 aims to do that is it. Use in combination with other like “grounding” techniques, Cursor is already implementing rules and project based rules all in the same hope of taming these WILD BEASTS!