feat(ralph): implement AFK Ralph pattern with Docker sandbox and YOLO mode#3
Merged
feat(ralph): implement AFK Ralph pattern with Docker sandbox and YOLO mode#3
Conversation
… mode Refactor all three Ralph scripts for autonomous AFK operation: - Add USE_SANDBOX flag for Docker sandbox mode (default: true) - Add YOLO_MODE flag for --dangerously-skip-permissions (default: true) - Add unified run_claude() function with jq streaming + capture - Add trap handlers for cleanup on EXIT/SIGINT/SIGTERM - Replace custom <phase> signals with standard <promise> pattern - Convert while loops to for loops with iteration limits - Pass env vars from parent to child scripts Scripts can now run completely unattended with safety guarantees.
Validates plugin.json schema, version sync, and shell script syntax on push/PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the full Matt Pocock AFK Ralph pattern across all three workflow orchestration scripts for true autonomous operation.
Changes
USE_SANDBOX=truedefault) - Runs Claude in isolated Docker container for AFK safetyYOLO_MODE=truedefault) - Uses--dangerously-skip-permissionsto skip promptsrun_claude()function - Consistent Claude invocation with jq streaming + output capture<phase>XML with standard<promise>COMPLETE|FAILED</promise>patternFiles Changed
scripts/workflow-ralph.sh- Main orchestratorscripts/ci-ralph.sh- CI failure resolution loopscripts/comments-ralph.sh- PR comment resolution loopUsage
Test Plan
bash -n scripts/*.shrun_claude()function with simple promptdocker sandbox run --credentials host claude --version