RepositoryTypeScript
snarktank

snarktank/ralph

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

22.4kstars
2.1kforks
36issues
1views

🤖 Ralph: Autonomous AI Agent Loop

Runs AI coding tools repeatedly until every PRD item is done.

Ralph is an autonomous AI agent loop created by snarktank that repeatedly invokes Amp or Claude Code to implement items from a PRD until all are complete. Each iteration starts with a fresh context, while memory is preserved through git history, a progress.txt log, and a prd.json task list.

✨ Highlights

  • Autonomous loop: Runs repeatedly until all PRD items are marked complete.
  • Fresh context: Each iteration spawns a new AI instance with clean context.
  • Persistent memory: Stores state in git history, progress.txt, and prd.json.
  • Tool support: Works with Amp CLI or Claude Code.
  • PRD workflow: Includes skills to generate PRDs and convert them to prd.json.
  • Quality checks: Runs typecheck and tests before committing.
  • AGENTS.md updates: Appends learnings after each iteration.
  • Configurable iterations: Default 10, adjustable via command line.

💡 Why it matters

Ralph automates the repetitive cycle of planning, implementing, and verifying code, letting developers focus on higher‑level design. By isolating each task in a fresh context, it avoids context pollution and reduces the chance of errors. The persistent memory files ensure that progress is never lost, and the built‑in quality checks enforce a minimum standard before commits are made. This makes it well‑suited for teams that want a reliable, scriptable way to turn product requirements into working software without manual hand‑offs.


#AI #Autonomous #AgentLoop #TiniX