Basic Workflow - johnpeterman72/CursorRIPER.sigma GitHub Wiki
๐ Basic CursorRIPERโฆฮฃ Workflow
Understanding the RIPER workflow is key to maximizing your productivity with AI assistance. This guide explains how to use the framework effectively.
๐ฏ The RIPER Philosophy
RIPER stands for:
- Research - Understand the problem
- Innovate - Explore solutions
- Plan - Design the approach
- Execute - Implement the solution
- Review - Validate the results
Each mode has specific purposes and restrictions to keep you and the AI focused.
๐ The Workflow Cycle
โโโโโโโโโโโโโโโ
โ ๐ RESEARCH โ โ Start here
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโ
โ ๐ก INNOVATE โ
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโ
โ ๐ PLAN โ
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโ
โ โ๏ธ EXECUTE โ
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโ
โ ๐ REVIEW โ
โโโโโโโโโโโโโโโ
๐ Research Mode (ฮฉโ)
Purpose: Gather information and understand requirements
What You Can Do:
- โ Read existing code and documentation
- โ Ask questions about the project
- โ Analyze current implementation
- โ Document findings
What You Cannot Do:
- โ Write or modify code
- โ Create new files
- โ Make design decisions
Example Workflow:
/research
"Analyze the current authentication system and identify security vulnerabilities"
!af src/auth/login.js # Add relevant files to context
!ad src/auth/ # Add authentication folder
Memory Updates:
- ๐
projectbrief.md
- Requirements documented - ๐ป
techContext.md
- Technical findings recorded
๐ก Innovate Mode (ฮฉโ)
Purpose: Explore ideas and potential solutions
What You Can Do:
- โ Suggest new approaches
- โ Explore alternatives
- โ Discuss pros and cons
- โ Create conceptual designs
What You Cannot Do:
- โ Implement solutions
- โ Write actual code
- โ Make final decisions
Example Workflow:
/innovate
"What are modern alternatives to session-based authentication?"
!ac authenticationConcepts # Track conceptual ideas
!adoc OAuth2 Specification # Reference relevant docs
Memory Updates:
- ๐ฎ
activeContext.md
- Ideas and concepts tracked - ๐๏ธ
systemPatterns.md
- Potential patterns noted
๐ Plan Mode (ฮฉโ)
Purpose: Create detailed implementation plans
What You Can Do:
- โ Create specifications
- โ Design architecture
- โ Sequence implementation steps
- โ Define success criteria
What You Cannot Do:
- โ Write production code
- โ Execute the plan
- โ Skip planning steps
Example Workflow:
/plan
"Create a detailed plan to migrate from sessions to JWT authentication"
# The AI will create a numbered checklist:
1. Install required dependencies (jsonwebtoken, bcrypt)
2. Create JWT utility functions
3. Modify user model for refresh tokens
4. Update login endpoint
5. Create token refresh endpoint
6. Update middleware for JWT validation
7. Migrate existing sessions
8. Update client-side token handling
Protection Planning:
!cp Identify critical sections that need protection
!cg Mark sections that require review before changes
Memory Updates:
- ๐ฎ
activeContext.md
- Plan details stored - ๐
progress.md
- Milestones defined
โ๏ธ Execute Mode (ฮฉโ)
Purpose: Implement exactly according to plan
What You Can Do:
- โ Write code following the plan
- โ Create and modify files
- โ Run tests
- โ Fix bugs
What You Cannot Do:
- โ Deviate from the plan
- โ Add unplanned features
- โ Search web (stay focused!)
- โ Redesign on the fly
Example Workflow:
/execute
"Implement step 2 from our plan: Create JWT utility functions"
# AI writes code exactly as planned
!af src/utils/jwt.js # Track new files
!ac generateToken() # Track new functions
Protection in Execution:
// !cp PROTECTED - JWT Secret
const JWT_SECRET = process.env.JWT_SECRET;
// !cp END-P
// !cc CRITICAL - Token Generation
function generateToken(user) {
return jwt.sign(
{ id: user.id, email: user.email },
JWT_SECRET,
{ expiresIn: '24h' }
);
}
// !cc END-C
Memory Updates:
- ๐
progress.md
- Implementation progress tracked - ๐ก๏ธ
protection.md
- Protected regions recorded
๐ Review Mode (ฮฉโ )
Purpose: Validate implementation against requirements
What You Can Do:
- โ Check code quality
- โ Verify against plan
- โ Identify issues
- โ Suggest improvements
What You Cannot Do:
- โ Modify code
- โ Implement fixes
- โ Change requirements
Example Workflow:
/review
"Review the JWT implementation against our security requirements"
!ac generateToken() # Review specific functions
!af test/auth.test.js # Check test coverage
Review Outputs:
- โ PASS: Matches plan exactly
- โ ๏ธ WARNING: Minor deviations found
- โ FAIL: Does not match plan
Memory Updates:
- ๐
progress.md
- Review results recorded - ๐ฎ
activeContext.md
- Issues documented
๐ Mode Transitions
Forward Progression:
/r โ /i โ /p โ /e โ /rev
When to Switch Modes:
-
Research โ Innovate
- When you understand the problem
- Requirements are clear
- Ready to explore solutions
-
Innovate โ Plan
- When you've chosen an approach
- Ready to create specifications
- Need concrete steps
-
Plan โ Execute
- When plan is complete
- All steps are clear
- Ready to implement
-
Execute โ Review
- When implementation is done
- Need to validate work
- Ready for quality check
Jumping Between Modes:
You can jump to any mode when needed:
/review โ /research # Need more information
/execute โ /plan # Plan needs revision
/innovate โ /execute # Emergency fix (not recommended)
๐ Context Management Throughout Workflow
Research Phase Context:
!ad src/ # Broad context
!adoc README.md # Documentation
!ag main # Git history
Innovation Phase Context:
!ac conceptA() # Conceptual references
!an "Design Ideas" # Notepad references
!adoc "Best Practices" # External docs
Planning Phase Context:
!af config.json # Specific files
!ar coding-standards # Project rules
!ad src/components/ # Target directories
Execution Phase Context:
!pf critical.js # Pin critical files
!ac implementedFunc() # Track new code
!cc # Clear old context
Review Phase Context:
!ag feature-branch # Git differences
!af test-results.log # Test outputs
!ac reviewTarget() # Specific functions
๐ก๏ธ Protection Throughout Workflow
When to Add Protection:
-
During Planning:
- Identify sensitive areas
- Mark future protection needs
-
During Execution:
- Protect as you write
- Guard critical logic
-
During Review:
- Verify protection coverage
- Add missing protections
Protection Strategy:
// Research: Identify sensitive areas
// Plan: Design protection strategy
// Execute: Implement with protection
// !cp PROTECTED - Never modify
const CRITICAL_CONFIG = {
apiKey: process.env.API_KEY,
secretKey: process.env.SECRET_KEY
};
// !cp END-P
// Review: Verify all critical code is protected
๐ Permission Awareness
Permission Checking:
!ckp # Check current mode permissions
!pm write_code # Can I write code now?
!vm read_files # What mode for reading files?
Common Permission Errors:
-
"Cannot write code in RESEARCH mode"
- Switch to EXECUTE mode first
-
"Cannot search web in EXECUTE mode"
- Complete execution, then switch to RESEARCH
-
"Cannot modify plan in EXECUTE mode"
- Switch back to PLAN mode
๐ก Workflow Best Practices
1. Complete Each Phase
Don't skip steps. Each mode builds on the previous.
2. Use Memory Bank
Your progress is saved automatically. Reference it:
"According to our plan in progress.md..."
"As documented in projectbrief.md..."
3. Maintain Context Focus
- Research: Broad context
- Plan: Specific targets
- Execute: Narrow focus
- Review: Comparison context
4. Protect Early and Often
Add protection during planning and execution, not as an afterthought.
5. Trust the Process
The restrictions exist to improve outcomes. Embrace them!
๐ฏ Common Workflows
Feature Development:
/r
- Research existing code/i
- Explore feature approaches/p
- Plan implementation/e
- Build feature/rev
- Validate completion
Bug Fixing:
/r
- Investigate bug/p
- Plan fix approach/e
- Implement fix/rev
- Verify fix works
Refactoring:
/r
- Analyze current code/i
- Explore refactoring options/p
- Plan refactoring steps/e
- Execute refactoring/rev
- Ensure functionality preserved
๐ Advanced Workflow Tips
Parallel Workflows:
Work on multiple features by switching context:
!cc # Clear context
!cm # Set mode-appropriate context
!af feature-b.js # Focus on different feature
Workflow Shortcuts:
/r โ /i โ /p โ /e โ /rev # Quick mode switches
!cm # Auto-set context for mode
Emergency Workflow:
For urgent fixes (use sparingly):
/p # Quick plan
"Emergency fix for [issue]"
/e # Immediate execution
๐ Next Steps
Now that you understand the basic workflow:
- ๐๏ธ Memory System Deep Dive
- ๐ก๏ธ Advanced Protection Strategies
- ๐ Context Management Mastery
- ๐ง Troubleshooting Workflows