This framework enhances Roo Code's multi-agent system with a research-first, predictive development approach that identifies and addresses potential issues before they arise. By combining specialized AI agents with proactive problem prediction, it creates a more robust, secure, and maintainable development process.
The key concept: Look before you leap. Each AI agent researches potential challenges, pitfalls, and best practices before taking action, delivering evidence-based solutions that mitigate risks from the start.
Every mode follows a consistent pattern:
- Research First: Identify potential issues before implementation
- Justify with Evidence: Back decisions with research findings
- Predict Edge Cases: Anticipate and plan for potential failures
- Continuous Validation: Verify against best practices and standards
A comprehensive team of AI agents covering the entire development lifecycle:
Core Development Flow:
- ⚡️ SPARC Orchestrator (
sparc
): Orchestrates complex workflows with memory-driven task delegation - 🔍 Deep Research Mode (
deep-research
): Conducts comprehensive research using Perplexity AI and context7 - 📋 Specification Writer (
spec-pseudocode
): Captures requirements and translates to modular pseudocode with TDD anchors - 🏗️ Architect (
architect
): Designs scalable, secure, modular architectures with HuggingFace integration - 🧠 Auto-Coder (
code
): Writes clean, efficient, modular code with HuggingFace ML patterns
Quality & Security:
- 🧪 Tester (TDD) (
tdd
): Implements Test-Driven Development with Puppeteer browser testing - 🪲 Debugger (
debug
): Troubleshoots runtime bugs and integration failures - 🛡️ Security Reviewer (
security-review
): Performs static/dynamic audits with HuggingFace code analysis
Specialized Functions:
- 📚 Documentation Writer (
docs-writer
): Creates concise, clear Markdown documentation - 🔗 System Integrator (
integration
): Merges outputs into working, tested, production-ready systems - 🧹 Optimizer (
refinement-optimization-mode
): Refactors and improves system performance - 📈 Deployment Monitor (
post-deployment-monitoring-mode
): Observes post-launch performance and logs - 🚀 DevOps (
devops
): Handles deployment, automation, and infrastructure operations
Advanced Functions:
- ♾️ MCP Integration (
mcp
): Manages external service connections through MCP interfaces with mem0 memory operations - 🔐 Supabase Admin (
supabase-admin
): Specializes in Supabase database, authentication, and storage management - 📘 SPARC Tutorial (
tutorial
): Provides SPARC onboarding and education assistance - ❓ Ask (
ask
): Guides task formulation and delegation to correct SPARC modes
This framework uses a token-efficient symbolic notation to encode best practices:
# Core Directives
# 1. Predictive Research First
↹ task•tech
⊕ search•docs•code•history
⊕ check_deprecated
⊕ predict•issues•risks
⊕ research•predict => action
# 2. Justify With Evidence
⊕ action•research•predict
Σ commit•pr•comment + why
# 3. Strict Modularity
⊕ file•lines > 500
⊕ refactor => modules•new_task
# 4. Secure Configuration
⊕ code•secrets => flag
⊕ use•config•env•secrets_mgr
# 5. Version Control Discipline
⊕ work => create_branch
⊕ changes => push_files•commit
⊕ track => create_issue•comment
⊕ integrate => create_pull_request
# 6. Complete & Summarize
⊕ task•end => attempt_completion
Σ summary(done•predict•solve•ref)
Traditional Approach:
- Get requirement: "Build a login with rate limiting"
- Code implementation directly
- Test after completion
- Fix issues as they're discovered
Predictive Approach:
- Research rate limiting best practices and common issues
- Design architecture addressing potential scaling challenges
- Write pseudocode with TDD anchors for identified edge cases
- Implement with justification comments for risk mitigation
- Test specifically targeting predicted failure modes
- Review with focus on whether predicted risks were addressed
Traditional Approach:
- Build feature
- Run security scan later
- Fix vulnerabilities reactively
Predictive Approach:
- Research OWASP Top 10 relevant to the feature
- Build with security patterns addressing predicted threats
- Document reasoning for security choices
- Test specifically targeting predicted vulnerabilities
- Review for security as integral part of development
- Copy the
custom_modes.json
file to your Roo Code settings - Reference the
symbolic_coding_principles.txt
in your custom instructions - Start using the specialized modes in your workflow
HuggingFace AI/ML Integration:
architect
,code
,tdd
,security-review
,spec-pseudocode
modes include HuggingFace model integration patterns- Model discovery, dataset integration, and performance benchmarking capabilities
- Secure AI/ML pipeline implementation with proper error handling
MCP Server Integrations:
mcp
mode with mem0 memory operations for persistent learningdeep-research
mode with Perplexity AI and context7 integrationtdd
mode with Puppeteer browser testing capabilitiessupabase-admin
mode with comprehensive Supabase management
Memory-Enhanced Workflows:
- Cross-session context maintenance with mem0 integration
- Persistent learning from successful/failed patterns
- Intelligent recommendations based on historical data
- AI/ML Integration: Built-in HuggingFace patterns for model discovery, dataset integration, and performance benchmarking
- Memory-Enhanced Workflows: Persistent learning across sessions with mem0 integration for continuous improvement
- Comprehensive Testing: TDD with Puppeteer browser testing and targeted security analysis
- External Service Integration: MCP server connections for Perplexity AI research, Supabase management, and context7 enhancement
- Modular Architecture: Each mode enforces 500-line file limits and secure configuration practices
- Orchestrated Workflows: SPARC methodology with intelligent task delegation and cross-mode coordination
Mode | Slug | Primary Function |
---|---|---|
⚡️ SPARC Orchestrator | sparc |
Complex workflow orchestration with memory |
🔍 Deep Research | deep-research |
Perplexity AI + context7 research |
📋 Specification Writer | spec-pseudocode |
Requirements to pseudocode with TDD |
🏗️ Architect | architect |
System design with HuggingFace patterns |
🧠 Auto-Coder | code |
Clean code with ML integration |
🧪 Tester (TDD) | tdd |
Test-driven development + Puppeteer |
🪲 Debugger | debug |
Runtime troubleshooting |
🛡️ Security Reviewer | security-review |
Security audits with AI code analysis |
📚 Documentation Writer | docs-writer |
Markdown documentation |
🔗 System Integrator | integration |
Component integration |
🧹 Optimizer | refinement-optimization-mode |
Performance optimization |
📈 Deployment Monitor | post-deployment-monitoring-mode |
Post-launch monitoring |
🚀 DevOps | devops |
Infrastructure & deployment |
♾️ MCP Integration | mcp |
External service connections |
🔐 Supabase Admin | supabase-admin |
Database & auth management |
📘 SPARC Tutorial | tutorial |
Framework education |
❓ Ask | ask |
Task formulation guidance |
This framework builds on the work of Reuven Cohen, enhancing it with custom specialized modes and adapting it to a 500-line modularity standard. The predictive, research-first approach creates more robust, maintainable, and secure software.