$ show agrimsingh/ralph-wiggum-cursor
Ralph Wiggum for Cursor is an implementation of Geoffrey Huntley's Ralph Wiggum technique for autonomous AI development. It manages LLM context like memory by tracking token usage and rotating to fresh agent contexts when needed, persisting state in files and git. The system provides automated iteration loops with features like gutter detection, rate limit handling, task progress tracking via checkboxes, and support for both sequential and parallel execution modes. Key components include a sophisticated stream parser for real-time token and error monitoring, a YAML-backed task parser with caching, and retry logic with exponential backoff.
The LLM identified 2 files worth highlighting for reuse:
A real-time parser for Cursor agent stream-json output that tracks token usage from file operations, assistant messages, and shell output. Implements sophisticated gutter detection (repeated failures, file thrashing), identifies retryable API errors (rate limits, network issues), and detects completion/gutter signals from the agent. Writes detailed activity and error logs with context health indicators. Demonstrates non-obvious skill in parsing streaming JSON and implementing context-aware monitoring logic.
A YAML-backed task parser for RALPH_TASK.md with mtime-based cache invalidation to avoid re-parsing on every check. Provides line-number-based task IDs for stable references, supports group-based task execution for parallel mode coordination, and includes functions to get next task, mark tasks complete/incomplete. Shows excellent engineering in caching strategy and handling the constraints of parallel execution with shared state files.