Analyze R package ecosystem with mode-specific behavior depth
Analyzes R package ecosystems with mode-aware depth control for daily checks, debugging, optimization, or release validation.
/plugin marketplace add Data-Wise/rforge/plugin install data-wise-rforge@Data-Wise/rforgeAnalyze R package ecosystem with explicit control over analysis depth and performance.
Current Mode: {{mode | default: "default"}}
Parse the user's request to detect mode:
Purpose: Daily check-ins, quick status validation
Behavior:
Tools: rforge_detect, rforge_status, rforge_quick_health
Time Budget: MUST complete in < 10 seconds
Output:
Purpose: Finding bugs, investigating issues, troubleshooting
Behavior:
Tools: All RForge MCP tools with detailed flags
Time Budget: SHOULD complete in < 2 minutes
Output:
Purpose: Speed improvements, performance tuning, bottleneck detection
Behavior:
Tools: rforge_profile, performance benchmarks, load time analysis
Time Budget: SHOULD complete in < 3 minutes
Output:
Purpose: Pre-release validation, CRAN preparation, major releases
Behavior:
Tools: rforge_validate, rforge_test_all, CRAN checks
Time Budget: SHOULD complete in < 5 minutes
Output:
You are orchestrating the analysis using RForge MCP tools. Follow this workflow:
If user provides --mode argument:
mode = argument value
Else if user mentions "debug", "debugging", "investigate" in context:
mode = "debug"
Else if user mentions "optimize", "performance", "slow" in context:
mode = "optimize"
Else if user mentions "release", "CRAN", "submit" in context:
mode = "release"
Else:
mode = "default"
time_budgets = {
"default": 10 seconds,
"debug": 120 seconds,
"optimize": 180 seconds,
"release": 300 seconds
}
Start timer
For Default Mode:
rforge_detect to find packagesrforge_status for quick healthFor Debug Mode:
For Optimize Mode:
rforge_profile for performance dataFor Release Mode:
rforge_validate for CRAN checksUse the {{format}} parameter (default: "terminal"):
Implementation:
# Import formatters from rforge/lib/formatters.py
import sys
from pathlib import Path
rforge_lib = Path(__file__).parent.parent / "rforge" / "lib"
sys.path.insert(0, str(rforge_lib))
from formatters import format_output
# Structure your analysis results
data = {
"title": "R Package Analysis",
"status": "success", # or "error", "warning"
"data": {
"mode": mode,
"packages_analyzed": 4,
"critical_issues": 2,
"health_score": 87,
"recommendations": [
"Update NEWS.md for medfit",
"Fix 3 test failures in probmed"
]
}
}
# Format based on user preference
output = format_output(
data=data,
format_name=format, # "terminal", "json", or "markdown"
mode=mode,
package_name="mediationverse" # optional metadata for JSON
)
# Display formatted output
print(output)
Data Structure Guidelines:
Format-Specific Behavior:
If approaching time budget:
{{context | default: "General ecosystem analysis"}}
/rforge:analyze "Updated bootstrap algorithm"
# Fast analysis in < 10s, focused on critical issues
/rforge:analyze "Fix bootstrap NA handling" --mode debug
# Deep inspection in < 2m, detailed traces
/rforge:analyze --mode optimize
# Performance analysis in < 3m, find bottlenecks
/rforge:analyze "Prepare for CRAN" --mode release
# Comprehensive validation in < 5m, release readiness
/rforge:analyze --mode debug --format json
# Debug analysis with JSON output for scripting
/rforge:analyze --mode release --format markdown
# Release validation with markdown report
All existing usage patterns continue to work without changes:
/rforge:analyze "Update algorithm" # Uses default mode
/rforge:analyze # Uses default mode
No breaking changes - default mode provides fast, balanced analysis.
If a mode exceeds its time budget:
{{format | default: "terminal"}}
✅ Fast by default - Results in < 10 seconds (default mode) ✅ Explicit control - Choose depth vs speed tradeoff ✅ Predictable - Know what to expect from each mode ✅ Actionable - Always suggests next steps ✅ Interruptible - Can cancel long-running modes
/rforge:status - Quick status check (also mode-aware)/rforge:quick - Ultra-fast analysis (always < 10s, ignores modes)/rforge:plan - Generate implementation plan from analysis/rforge:cascade - Cascade dependency updates"Analysis too slow"
"Not enough detail"
"Mode not recognized"
When executing this command:
Remember:
Example Task Delegation:
Use Task tool to delegate to RForge MCP tools:
- Mode: {{mode}}
- Context: {{context}}
- Time Budget: {{time_budget}}
- Focus: [mode-specific focus areas]
- Output Format: {{format}}
Version 2.0.0 - Mode System Implementation Updated: 2024-12-24 Status: ✅ Ready for use