Ralph Monitor Skill
Monitor and report on Ralph Wiggum loop status and progress. Provides visibility into active and completed loops via Archon state.
Triggers
Use this skill when:
- Checking Ralph loop status
- Viewing iteration progress
- Monitoring running loops
- Reviewing loop history
- Diagnosing stuck loops
- Keywords: ralph status, loop status, ralph monitor, check loop, iteration progress, loop history
Core Mission
Query Archon and local state to provide comprehensive status reports on Ralph loops.
Status Report Formats
Active Loop Status
markdown1## Ralph Loop Status 2 3### Loop Information 4| Property | Value | 5|----------|-------| 6| Loop ID | [LOOP_ID] | 7| Status | Running / Paused / Stopped | 8| Started | [TIMESTAMP] | 9| Duration | [HH:MM:SS] | 10 11### Progress 12| Metric | Current | Target | 13|--------|---------|--------| 14| Iteration | [N] | [MAX] | 15| Tasks | [DONE] | [TOTAL] | 16| Tests Passing | [PASS] | [TOTAL] | 17 18[====================----------] 67% complete 19 20### Current Iteration 21| Property | Value | 22|----------|-------| 23| Iteration | [N] | 24| Started | [TIME] | 25| Focus | [Current work summary] | 26 27### Recent Activity 28| Iter | Time | Summary | Files | Tests | 29|------|------|---------|-------|-------| 30| N | 5m ago | [Summary] | 3 | 15/15 | 31| N-1 | 12m ago | [Summary] | 5 | 14/15 | 32| N-2 | 20m ago | [Summary] | 2 | 10/15 | 33 34### Validation Status 35- Build: Passing 36- Tests: 15/15 passing 37- Lint: 2 warnings 38 39### Archon Integration 40- Project: [PROJECT_NAME] ([PROJECT_ID]) 41- Task: [TASK_TITLE] ([TASK_ID]) 42- Task Status: doing 43- State Doc: [DOC_ID] 44 45### Commands 46- View full log: `cat .ralph/loop.log` 47- Cancel loop: Use ralph-loop skill with cancel mode 48- View prompt: `cat .ralph/prompts/current.md`
Data Collection
From Archon
python1# Get state document 2state_docs = find_documents( 3 project_id=PROJECT_ID, 4 query="Ralph Loop State" 5) 6 7# Get active loops 8active_loops = [ 9 doc for doc in state_docs 10 if doc["content"]["status"] == "running" 11] 12 13# Get associated tasks 14for loop in active_loops: 15 task = find_tasks(task_id=loop["content"]["task_id"]) 16 loop["task"] = task
From Local State
bash1# Read config 2cat .ralph/config.json 3 4# Read recent log 5tail -100 .ralph/loop.log 6 7# Git status 8git --no-pager log --oneline -5 9git status --short
Report Types
Quick Status
Returns brief one-liner:
Ralph: Iteration 12/50 | 67% | Tests 15/15 | Duration 25m
Full Status
Returns complete report as shown above.
History Report
markdown1## Ralph Loop History 2 3### Completed Loops 4| Loop ID | Task | Iterations | Duration | Status | 5|---------|------|------------|----------|--------| 6| ralph-20260122-150000 | Auth API | 12 | 45m | Complete | 7| ralph-20260121-100000 | DB Schema | 8 | 30m | Complete | 8| ralph-20260120-140000 | User Model | 25 | 1h 20m | Max reached | 9 10### Statistics 11| Metric | Value | 12|--------|-------| 13| Total Loops | 15 | 14| Completed | 12 (80%) | 15| Blocked | 2 (13%) | 16| Max Reached | 1 (7%) | 17| Avg Iterations | 14 | 18| Avg Duration | 35m |
Comparison Report
markdown1## Loop Comparison 2 3| Metric | loop1 | loop2 | 4|--------|-------|-------| 5| Task | Auth API | User API | 6| Iterations | 12 | 18 | 7| Duration | 45m | 1h 10m | 8| Files Changed | 24 | 31 | 9| Tests Added | 15 | 22 | 10| Status | Complete | Complete |
Progress Visualization
Iteration Timeline
Iteration Progress
==================
1 #### Setup
2 ######## Basic impl
3 ############ Tests added
4 ###### Bug fix
5 ################ Feature complete
6 #### Refactor
7 ########## Edge cases
8 #################### Validation
9 ###### Polish
10 ######################## Complete
Legend: #### = Work done, length = files changed
Test Progress
Test Progress Across Iterations
===============================
Iter 1: [ ] 0/0
Iter 2: [### ] 5/15
Iter 3: [##### ] 8/15
Iter 4: [###### ] 10/15
Iter 5: [######## ] 12/15
Iter 6: [######## ] 12/15 <- regression
Iter 7: [##########] 15/15 PASS
Alerts and Warnings
Stuck Detection
markdown1## Potential Issue Detected 2 3### Stuck Pattern 4The loop appears to be stuck: 5- Last 3 iterations made no test progress 6- Same files being modified repeatedly 7- Similar error messages in output 8 9### Recommendation 10Consider: 111. Reviewing the prompt for clarity 122. Breaking the task into smaller pieces 133. Adding more specific validation criteria 144. Canceling and debugging manually 15 16### Action 17- Continue monitoring 18- Cancel loop if needed 19- Review logs: `cat .ralph/loop.log | tail -500`
Resource Warning
markdown1## Resource Warning 2 3### Issue 4- Token usage high in recent iterations 5- Approaching context limit 6 7### Recommendation 8- Consider checkpointing 9- May need to restart with fresh context 10- Current work is saved in Archon
Troubleshooting Commands
Check Configuration
markdown1## Configuration Check 2 3### Files 4- [x] .ralph/config.json exists 5- [x] .ralph/prompts/current.md exists 6- [x] .ralph/loop-state.json exists 7 8### Archon Connection 9- [x] Project found: [PROJECT_NAME] 10- [x] Task found: [TASK_TITLE] 11- [x] State document found 12 13### Validation Commands 14- [x] Build: `npm run build` (verified) 15- [x] Test: `npm test` (verified) 16- [ ] Lint: `npm run lint` (not configured) 17 18### All checks passed
Usage Examples
Check Current Status
python1# Quick check 2"What's the Ralph loop status?" 3 4# Full details 5"Show me detailed Ralph loop status"
View History
python1# All loops 2"Show Ralph loop history" 3 4# Specific loop 5"Show details for ralph-20260122-150000"
Diagnose Issues
python1# Check for problems 2"Is the Ralph loop stuck?" 3 4# View recent iterations 5"Show last 5 Ralph iterations"
Integration with Other Skills
With ralph-loop Skill
python1# If monitoring shows issues, suggest: 2"Use ralph-loop skill to cancel or resume"
With archon-workflow Skill
python1# For task management integration: 2"Use archon-workflow to update task status"
Best Practices
- Regular Monitoring: Check status periodically for long loops
- Watch for Patterns: Same files modified repeatedly = potential issue
- Test Progress: Should generally increase each iteration
- Duration Tracking: Unusually long iterations may indicate problems
- Archon Sync: Ensure state is properly saved to Archon
- Log Review: Check loop.log for detailed error messages