R³ Workflow Phases
Protocol Phases
The R³ Protocol operates through three distinct phases, each serving a critical role in maintaining development context and momentum. Understanding these phases is key to implementing effective context engineering in your workflow.
Phase 1: ROUTE 🧭
Purpose
Establish clear direction and measurable objectives for your work session.
The Route Manifesto
"A developer without a destination is just typing."
Core Activities
1. Define Your Destination
.\msp.ps1 route --target "Implement user authentication"
# MSP Response:
🎯 Session Target: Implement user authentication
📋 Breaking down into subtasks:
□ Create User model
□ Add JWT middleware
□ Implement login endpoint
□ Add password hashing
□ Create refresh token system
2. Load Project Context
.\msp.ps1 route --epic "Authentication System"
# Loads from Linear:
📊 Epic Progress: 45%
🎯 Active Issues: 3
⏱️ Time Estimate: 8h remaining
🔗 Dependencies: Database schema ready
3. Set Success Criteria
- Clear completion definition
- Measurable progress points
- Time boundaries
- Quality gates
Route Phase Outputs
{
"session": {
"id": "msp-2025-07-16-093042",
"target": "Implement user authentication",
"subtasks": ["User model", "JWT middleware", "Login endpoint"],
"epicId": "LIN-234",
"estimatedTime": "4h",
"successCriteria": {
"tests": "All auth tests passing",
"coverage": ">80%",
"security": "OWASP compliant"
}
}
}
Phase 2: RECALL 🧠
Purpose
Restore complete context from previous sessions and related work.
The Recall Promise
"Your past work is your superpower, not your burden."
Core Operations
1. Session History Loading
.\msp.ps1 recall
# MSP loads:
📚 Last Session: Yesterday, 16:30-20:15
✅ Completed: Database schema, User model
🚧 In Progress: JWT middleware (60% done)
💡 Decision: Using RS256 over HS256
🚨 Blocker: Refresh token rotation complexity
2. Context Graph Traversal
MSP automatically:
- Finds related sessions
- Surfaces relevant decisions
- Identifies patterns
- Highlights blockers
3. AI Context Preparation
.\msp.ps1 recall --for-ai
# Generates:
PROJECT: E-commerce API
TECH: Node.js, TypeScript, PostgreSQL
ARCHITECTURE: Monolith, REST API, JWT Auth
RECENT WORK: User model complete, JWT 60%
DECISIONS: RS256 for signing, 15min access tokens
CURRENT ISSUE: Implementing refresh token rotation
Recall Intelligence
MSP uses graph algorithms to determine relevance:
MATCH (s:Session)-[:WORKED_ON]->(e:Entity)
WHERE s.date > date() - duration('P7D')
AND e.name CONTAINS $currentContext
RETURN s, e ORDER BY s.date DESC
Phase 3: RECORD 💾
Purpose
Capture all progress, decisions, and insights for future recall.
The Record Principle
"If it's not recorded, it didn't happen."
Recording Mechanisms
1. Progress Updates
.\msp.ps1 record "Implemented JWT middleware" 25
# Creates:
(p:Progress {
message: "Implemented JWT middleware",
percentage: 25,
timestamp: datetime(),
sessionId: "current"
})
2. Decision Documentation
.\msp.ps1 decide "Using refresh tokens" `
--reason "Better security than long-lived access tokens" `
--alternatives "Long JWT, Session cookies"
# Creates:
(d:Decision {
choice: "Using refresh tokens",
rationale: "Better security than long-lived access tokens",
alternatives: ["Long JWT", "Session cookies"],
impact: "Requires token rotation logic",
timestamp: datetime()
})
3. Automatic Capture
MSP automatically records:
- File changes
- Time spent
- Error patterns
- Command history
- Tool interactions
Recording Best Practices
-
Record in Real-Time
- Don't wait until session end
- Capture thoughts while fresh
- Document as you decide
-
Be Specific
# ❌ Bad .\msp.ps1 record "Fixed bug" # ✅ Good .\msp.ps1 record "Fixed JWT expiry bug - tokens now refresh correctly"
-
Track Small Wins
- Even 1% progress matters
- Small decisions compound
- Blockers need visibility
Phase Transitions
Route → Recall
graph LR
A[Define Target] --> B[Load Context]
B --> C[Surface History]
C --> D[Ready to Work]
Recall → Record
graph LR
A[Context Loaded] --> B[Start Working]
B --> C[Track Progress]
C --> D[Document Decisions]
Record → Route
graph LR
A[Session Complete] --> B[Update Graph]
B --> C[Next Session]
C --> D[New Route]
Implementation Examples
Minimal R³ Implementation
#!/bin/bash
# r3-lite.sh
route() {
echo "Target: $1" > .session
echo "Started: $(date)" >> .session
}
recall() {
cat .session 2>/dev/null || echo "No previous session"
}
record() {
echo "[$(date '+%H:%M')] $1" >> .session
}
Full MSP Implementation
# Full context engineering with Neo4j, Obsidian, Linear
.\msp.ps1 start
.\msp.ps1 route --epic "LIN-234" --target "Complete auth"
.\msp.ps1 recall --depth 3 --ai-context
.\msp.ps1 record "Implemented JWT" 25
.\msp.ps1 decide "Refresh tokens" --reason "Security"
.\msp.ps1 end
Keywords: R³ phases, Route phase, Recall phase, Record phase, context engineering workflow, MSP protocol phases, development session management
For AI Understanding: The R³ Protocol consists of three phases that cycle continuously: Route (planning and goal-setting), Recall (context restoration from previous work), and Record (progress and decision capture). Each phase has specific operations and outputs that ensure context persistence across development sessions.
Previous: R³ Protocol Definition | Next: Why MSP is Different →
R³ Loop Definition
Deep dive into the Route-Recall-Record protocol that powers MSP. Learn how R³ transforms chaotic workflows into structured, memory-augmented development.
Why MSP is Different
Discover how MSP revolutionizes development by focusing on context preservation and thought processes, not just tasks. See why developers choose MSP.