RIPER Modes - johnpeterman72/CursorRIPER.sigma GitHub Wiki
๐ RIPER Modes Explained
The heart of CursorRIPERโฆฮฃ is the RIPER modal system - five distinct operational modes that guide both you and the AI through a structured development workflow.
๐ Mode Overview
Mode | Symbol | Command | Purpose | Key Restriction |
---|---|---|---|---|
Research | ๐ ฮฉโ | /r |
Gather information | Cannot write code |
Innovate | ๐ก ฮฉโ | /i |
Explore solutions | Cannot implement |
Plan | ๐ ฮฉโ | /p |
Design approach | Cannot execute |
Execute | โ๏ธ ฮฉโ | /e |
Implement solution | Cannot search web |
Review | ๐ ฮฉโ | /rev |
Validate results | Cannot modify |
๐ง The RIPER Philosophy
Each mode represents a distinct phase of problem-solving:
- Understand the problem (Research)
- Explore possible solutions (Innovate)
- Design the approach (Plan)
- Build the solution (Execute)
- Verify the results (Review)
This separation prevents common pitfalls like:
- ๐ซ Coding before understanding requirements
- ๐ซ Over-engineering during implementation
- ๐ซ Changing design while coding
- ๐ซ Missing validation steps
๐ Research Mode (ฮฉโ)
Symbol Definition:
ฮฉโ = ๐R โถ โ(ฮฉโ) โถ +๐[0:3] -๐[4:15]
Purpose:
Gather information, analyze existing code, understand requirements.
Permissions:
โ(ฮฉโ) = {R: โ, C: โ, U: โ, D: โ}
- โ Read everything
- โ Create nothing
- โ Update nothing
- โ Delete nothing
Allowed Operations:
- Read files and documentation
- Analyze code structure
- Ask clarifying questions
- Document findings
- Search web for information
- Review git history
Forbidden Operations:
- Write any code
- Modify files
- Create new files
- Make design decisions
- Suggest implementations
Example Usage:
/research
"Analyze the current authentication system and identify potential security vulnerabilities"
!af src/auth/login.js # Add file to context
!ad src/auth/ # Add directory
!ag feature/auth-update # Add git branch
Memory Updates:
- ๐ projectbrief.md - Requirements captured
- ๐ป techContext.md - Technical findings
- ๐ฎ activeContext.md - Research focus
Best Practices:
- Cast a wide net initially
- Document all findings
- Ask "why" questions
- Verify assumptions
- Check existing documentation
Common Mistakes:
- โ Trying to fix issues immediately
- โ Skipping to implementation ideas
- โ Making design decisions
- โ Narrow focus too early
๐ก Innovate Mode (ฮฉโ)
Symbol Definition:
ฮฉโ = ๐กI โถ โ(ฮฉโ) โถ +๐[4:6] -๐[8:15]
Purpose:
Explore creative solutions, evaluate alternatives, brainstorm approaches.
Permissions:
โ(ฮฉโ) = {R: โ, C: ~, U: โ, D: โ}
- โ Read for reference
- ๐ก Create conceptually only
- โ Update nothing
- โ Delete nothing
Allowed Operations:
- Suggest new approaches
- Explore alternatives
- Evaluate pros/cons
- Create conceptual designs
- Reference best practices
- Discuss patterns
Forbidden Operations:
- Write actual code
- Create real files
- Implement solutions
- Make final decisions
- Modify existing code
Example Usage:
/innovate
"What are modern alternatives to our session-based authentication?"
!ac AuthenticationConcepts # Track concepts
!adoc "OAuth2 Best Practices" # Reference docs
!an "Security Ideas" # Notepad for ideas
Memory Updates:
- ๐๏ธ systemPatterns.md - Architectural ideas
- ๐ฎ activeContext.md - Innovation focus
- ๐ progress.md - Explored options
Best Practices:
- Think outside the box
- Consider multiple approaches
- Evaluate trade-offs
- Reference industry standards
- Document all ideas
Common Mistakes:
- โ Getting too detailed
- โ Committing to one approach
- โ Writing pseudo-code
- โ Ignoring alternatives
๐ Plan Mode (ฮฉโ)
Symbol Definition:
ฮฉโ = ๐P โถ โ(ฮฉโ) โถ +๐[7:9] -๐[10:15]
Purpose:
Create detailed specifications, sequence steps, define success criteria.
Permissions:
โ(ฮฉโ) = {R: โ, C: โ, U: ~, D: โ}
- โ Read for planning
- โ Create specifications
- ๐ก Update plan documents only
- โ Delete nothing
Allowed Operations:
- Create specifications
- Design architecture
- Sequence implementation
- Define interfaces
- Plan test cases
- Identify protection needs
Forbidden Operations:
- Write production code
- Implement features
- Execute the plan
- Modify existing code
Example Usage:
/plan
"Create a detailed plan to implement JWT authentication"
# Output: Numbered checklist
1. Install dependencies (jsonwebtoken, bcrypt)
2. Create JWT utility module
3. Update user model for tokens
4. Modify login endpoint
5. Create refresh endpoint
6. Update auth middleware
7. Add tests
8. Update documentation
Memory Updates:
- ๐ฎ activeContext.md - Plan details
- ๐ progress.md - Milestones set
- ๐ก๏ธ protection.md - Protection planned
Best Practices:
- Be extremely detailed
- Number every step
- Consider edge cases
- Plan protection strategy
- Define success criteria
Common Mistakes:
- โ Vague specifications
- โ Missing steps
- โ No success criteria
- โ Forgetting tests
โ๏ธ Execute Mode (ฮฉโ)
Symbol Definition:
ฮฉโ = โ๏ธE โถ โ(ฮฉโ) โถ +๐[10:12] -[improve,create,deviate]
Purpose:
Implement exactly according to plan, write code, create files.
Permissions:
โ(ฮฉโ) = {R: โ, C: โ, U: โ, D: ~}
- โ Read anything needed
- โ Create new files/code
- โ Update existing code
- ๐ก Delete with caution
Allowed Operations:
- Write code per plan
- Create new files
- Modify existing code
- Run tests
- Fix bugs
- Add protection markers
Forbidden Operations:
- Deviate from plan
- Add unplanned features
- Redesign on the fly
- Search web (focus!)
- Skip planned steps
Special Restriction:
๐ซ No web searches in EXECUTE mode! This maintains focus on implementation.
Example Usage:
/execute
"Implement step 2: Create JWT utility module"
# AI writes exactly what was planned
!af src/utils/jwt.js # Track new file
!cp # Protect critical parts
Code Protection Example:
// !cp PROTECTED - JWT Configuration
const JWT_SECRET = process.env.JWT_SECRET;
const JWT_EXPIRES = '24h';
// !cp END-P
// !cc CRITICAL - Token Generation
export function generateToken(user) {
return jwt.sign(
{ id: user.id, email: user.email },
JWT_SECRET,
{ expiresIn: JWT_EXPIRES }
);
}
// !cc END-C
Memory Updates:
- ๐ progress.md - Steps completed
- ๐ก๏ธ protection.md - Protected code
- ๐ฎ activeContext.md - Implementation focus
Best Practices:
- Follow plan exactly
- Protect while coding
- Test each step
- Document deviations
- Stay focused
Common Mistakes:
- โ "Improving" the plan
- โ Adding features
- โ Skipping protection
- โ Web searching
๐ Review Mode (ฮฉโ )
Symbol Definition:
ฮฉโ
= ๐RV โถ โ(ฮฉโ
) โถ +๐[13:15] -[modify,improve]
Purpose:
Validate implementation, verify against requirements, identify issues.
Permissions:
โ(ฮฉโ
) = {R: โ, C: โ, U: โ, D: โ}
- โ Read everything
- โ Create nothing
- โ Update nothing
- โ Delete nothing
Allowed Operations:
- Check code quality
- Verify against plan
- Run tests
- Identify issues
- Review protection
- Validate requirements
Forbidden Operations:
- Fix issues found
- Modify code
- Improve implementation
- Change requirements
- Add features
Example Usage:
/review
"Review JWT implementation against security requirements"
!af src/utils/jwt.js # Review specific file
!ac generateToken # Check function
!ag main...feature/jwt # Compare branches
Review Outputs:
## Review Results:
โ
PASS: JWT secret from environment
โ
PASS: Token expiration set
โ ๏ธ WARN: No refresh token rotation
โ FAIL: Missing rate limiting
Memory Updates:
- ๐ progress.md - Review results
- ๐ฎ activeContext.md - Issues found
- ๐ projectbrief.md - Requirement status
Best Practices:
- Be thorough
- Check every requirement
- Verify protection
- Test edge cases
- Document findings
Common Mistakes:
- โ Fixing issues immediately
- โ Changing requirements
- โ Skipping tests
- โ Partial reviews
๐ Mode Transitions
Standard Flow:
Research โ Innovate โ Plan โ Execute โ Review
ฮฉโ ฮฉโ ฮฉโ ฮฉโ ฮฉโ
Transition Commands:
/r or /research โ Enter Research
/i or /innovate โ Enter Innovate
/p or /plan โ Enter Plan
/e or /execute โ Enter Execute
/rev or /review โ Enter Review
Valid Transitions:
- โ Any mode to any mode
- โ Skip modes if needed
- โ Return to earlier modes
- โ Emergency transitions
Transition Process:
- Backup current state
- Verify completion
- Update mode
- Apply permissions
- Load context
- Log transition
Context Updates:
Each transition updates context:
Research: [Docs, Folders, Git]
โ
Innovate: [Code, Docs, Notepads]
โ
Plan: [Files, Folders, Rules]
โ
Execute: [Code, Files, Pinned]
โ
Review: [Code, Files, Git]
๐ฏ Mode Selection Guide
When to Use Each Mode:
Research When:
- Starting new feature
- Investigating bugs
- Understanding codebase
- Gathering requirements
- Checking documentation
Innovate When:
- Need creative solutions
- Exploring alternatives
- Evaluating approaches
- Brainstorming ideas
- Considering patterns
Plan When:
- Ready to specify
- Need detailed steps
- Defining architecture
- Creating test plans
- Setting milestones
Execute When:
- Plan is complete
- Ready to code
- Implementing features
- Fixing bugs
- Creating files
Review When:
- Implementation done
- Need validation
- Checking quality
- Verifying requirements
- Before deployment
๐ก Pro Tips
1. Trust the Process
The restrictions exist for good reasons. Embrace them!
2. Complete Each Phase
Don't skip steps. Each builds on the previous.
3. Use Appropriate Detail
- Research: Broad investigation
- Innovate: Creative exploration
- Plan: Extreme detail
- Execute: Precise implementation
- Review: Thorough validation
4. Context Switching
Use !cm
to automatically set mode-appropriate context.
5. Permission Awareness
Use !ckp
to check what you can do in current mode.
๐จ Common Issues
"Cannot write code"
- Cause: Not in EXECUTE mode
- Fix: Switch with
/e
"Cannot search web"
- Cause: In EXECUTE mode
- Fix: Complete task, then
/r
"Cannot modify plan"
- Cause: In EXECUTE/REVIEW
- Fix: Switch to PLAN with
/p
"Operation not permitted"
- Cause: Mode restriction
- Fix: Check
!ckp
, switch modes