Drive uninterrupted end-to-end software execution with minimal user interaction using the Ralph Loop engineering protocol. Use when the user wants Codex to keep developing continuously, avoid unnecessary questions, choose reasonable reversible assumptions, push through debugging and validation loops, recover cleanly from interruptions such as model-capacity errors, and only stop for clear completion or truly blocking issues such as destructive actions, missing credentials, legal or safety risk, or irrecoverable ambiguity. Trigger on requests like "don't ask me", "keep going", "work autonomously", "ralph loop", "ralph-loop", "闭环执行", "连续工作", "不要打断", "不要问我", or "一直开发".
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Drive uninterrupted end-to-end software execution with minimal user interaction using the Ralph Loop engineering protocol. Use when the user wants Codex to keep developing continuously, avoid unnecessary questions, choose reasonable reversible assumptions, push through debugging and validation loops, recover cleanly from interruptions such as model-capacity errors, and only stop for clear completion or truly blocking issues such as destructive actions, missing credentials, legal or safety risk, or irrecoverable ambiguity. Trigger on requests like "don't ask me", "keep going", "work autonomously", "ralph loop", "ralph-loop", "闭环执行", "连续工作", "不要打断", "不要问我", or "一直开发".
Ralph Loop
Operating Mode
Run this skill as a Ralph-style closed-loop execution protocol adapted to Codex.
Do not imitate Claude Code's exact stop-hook mechanics. Import the engineering discipline: explicit exit criteria, one high-value item per loop, durable state, and validation-backed continuation.
Stay inside system, developer, repository, and safety constraints.
Read references/ralph-loop.md when you need Ralph rationale, Codex adaptation boundaries, durable-state guidance, failure-mode handling, or copy-ready resume prompts after interruption.
Default Resume Prompt
Use this as the default Chinese resume prompt after a capacity error or dropped session:
Restate the real goal in one sentence before substantial work.
Define explicit done criteria as early as possible.
If the user did not provide done criteria, infer pragmatic ones from the request, repository conventions, and available validation.
Pick the smallest loop unit that can be validated quickly.
If the task is large, keep a lightweight ordered checklist in durable form when that materially improves continuity.
Run The Loop
Re-read the goal, active files, open failures, and latest validation signal.
Search the codebase before assuming something is missing, broken, or unimplemented.
Pick the single highest-value unresolved item that moves the task toward done.
Implement only that slice or fix only that failure class.
Run the smallest high-signal validation for that slice.
If validation fails, debug and retry instead of pausing for approval.
If validation passes, update any durable artifacts needed for the next loop.
Re-check the done criteria. If not done, continue immediately into the next loop.
Engineering Rules
Default to one meaningful item per loop.
Treat tests, linters, typecheckers, builds, runtime checks, and reproducible scripts as loop backpressure.
Prefer durable repo state over long conversational reasoning.
Prefer reversible assumptions over interruptions.
Match established project conventions unless there is a clear technical reason not to.
Preserve user changes and adapt to the current worktree instead of reverting unrelated edits.
Do not stop at analysis if code can be changed and checked now.
Do not ask "should I continue?" after completing a partial step.
Interruption Recovery
Treat model-capacity errors, transient host failures, and dropped sessions as execution interruptions, not as evidence the task should stop.
Resume from durable state first: current files, git status, diffs, failing checks, task notes, and the latest validation signal matter more than chat memory.
When resuming, first reconstruct what is already complete and what remains open before making new edits.
Do not blindly rerun commands with side effects. Re-run only after verifying necessity or idempotence.
Prefer a structured resume prompt over a bare "continue" when recovering from capacity errors or a fresh session.
Use the standard prompts in references/ralph-loop.md when the user asks for a safe Codex or CLI continuation after interruption.
Stop Conditions
Stop when the explicit done criteria are satisfied with evidence.
Stop when a real blocker remains after reasonable local attempts to resolve it.
Real blockers include destructive or irreversible actions needing consent, missing secrets or approvals, legal or safety concerns, and irrecoverable ambiguity with materially different outcomes.
Communication
Send short progress updates stating what is being done and what was learned.
Report blockers only after trying reasonable local resolution paths.
Keep the final handoff concise and outcome-focused.
Include validation results, assumptions that mattered, and any residual risk.