feat(ralph-loop): add persistent iterative AI development loops for Codex#216
Open
Andersonlimahw wants to merge 5 commits into
Open
feat(ralph-loop): add persistent iterative AI development loops for Codex#216Andersonlimahw wants to merge 5 commits into
Andersonlimahw wants to merge 5 commits into
Conversation
|
Try martinloop its a governed runtime budget and control harness for loops and autonomous agents that solves a lot of the ralph loops probems with consistency and drift |
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
This Pull Request introduces the Ralph Loop plugin for Codex. Adapted from the "Ralph Wiggum" technique, this plugin enables persistent, bounded, and self-improving AI development loops within both the Codex CLI and Codex App.
It provides a robust runtime for long-running tasks, allowing Codex to execute iterative cycles with state management, progress tracking, and automated summaries.
Core Features
.codex/ralph-loop/storage..codex-plugin/plugin.jsonand shell adapters.Architecture
The following diagram illustrates the interaction between the Codex CLI, the Ralph Loop runtime, and the local filesystem:
graph TD A[Codex CLI/App] -->|Exec Command| B(Ralph Codex Script) B -->|Check State| C{Active Loop?} C -->|No| D[Initialize Local DB] C -->|Yes| E[Resume Iteration] D --> F[Execute Codex Exec] E --> F F -->|Capture Output| G[State Manager] G -->|Update JSON| H[(.codex/ralph-loop/)] G -->|Detect Goal| I{Task Finished?} I -->|No| B I -->|Yes| J[Generate Summary] J --> AChanges
plugins/ralph-loop/with dedicated commands, hooks, and skills..codex-plugin/plugin.jsonfor Codex App integration and.claude-plugin/plugin.jsonfor Claude Code.scripts/lib/includingstate.mjs,codex-exec.mjs, anddoctor.mjs..agents/plugins/marketplace.jsonto include Ralph Loop.README.mdand adaptation plans indocs/ai/plans/.Testing
Comprehensive test suite implemented using Node.js test runner:
args.test.mjs: CLI argument parsing.state.test.mjs: Local state persistence and JSON DB integrity.runner.test.mjs: E2E execution flow with mocked Codex binary.promise.test.mjs: Completion detection logic.Impact
This is a feature addition. It does not break existing functionality but introduces a new set of commands (
ralph-loop,ralph-status,ralph-doctor,cancel-ralph) available to the Codex environment.