Stay Hungry,Stay Foolish!

Ralph Loop

Ralph Loop

https://github.com/snarktank/ralph

https://claude.com/plugins/ralph-loop

 

Ralph is an autonomous AI agent loop that runs repeatedly until all PRD items are complete.

Ralph is an autonomous AI agent loop that runs AI coding tools (Amp or Claude Code) repeatedly until all PRD items are complete. Each iteration is a fresh instance with clean context. Memory persists via git history, progress.txt, and prd.json.

Based on Geoffrey Huntley's Ralph pattern.

Read my in-depth article on how I use Ralph

image

 

 

image

 

Ralph Loop enables iterative, self-referential AI development loops where Claude works on the same task repeatedly until completion. The plugin intercepts session exits via a stop hook and automatically re-feeds your prompt while preserving all file modifications and git history between iterations. This creates autonomous improvement cycles where Claude can refine its work based on test failures and previous attempts.

The technique is ideal for well-defined projects with clear success criteria, greenfield development with automated verification, and any task amenable to iterative refinement. Claude reads its own past work to inform improvements, creating a powerful feedback loop for autonomous problem-solving.

How to use: Start an iterative session with /ralph-loop "your prompt here" --max-iterations 10 --completion-promise "DONE". The loop continues until Claude outputs the completion promise or reaches the iteration limit. Cancel anytime with /cancel-ralph. Write prompts with explicit completion criteria and success metrics for best results.

 

posted @ 2026-05-05 19:04  lightsong  阅读(0)  评论(0)    收藏  举报
千山鸟飞绝,万径人踪灭