Pi Ralph Loop
Extension
Runs a plan from durable plan/progress files one task per iteration, with feedback, commits, context collapse, and explicit completion.
What it does
Pi Ralph Loop runs a durable plan one task per iteration with feedback, commits, progress updates, context collapse, and explicit completion.
The loop controls iteration mechanics but does not grant authority to push, publish, deploy, or change product scope.
When to reach for it
Invocation: Start an existing plan with /ralph or seed a loop prompt with /ralph-prompt.
- A multi-step plan should survive context collapse
- Keep canonical plan and progress files between iterations.
- Each iteration must finish one bounded task and run feedback
- Use the loop policy to re-read state and advance in order.
- An operator needs explicit status, stop, or continue controls
- Use the registered loop commands without editing hidden runtime state.
What it adds
- A one-active-loop lifecycle with durable plan and progress paths.
- Iteration prompts, context collapse, completion policy, and operator controls.
How it fits
- Pi Subagents: Ralph owns iteration order while subagents can perform bounded research, implementation, or review inside one task.
- Pi Watcher: Watcher favors immediate editor feedback; Ralph favors planned durable execution.
- Handoff: Handoff starts a fresh session and links it to the current session when persistence is enabled; Ralph instead collapses context while preserving loop state.
Common questions
- What does the loop not guarantee?
- The loop depends on agent compliance and green feedback, allows only one active loop, writes durable planning state, and does not itself grant permission to publish, push, or deploy.
It’s working if
- Each iteration re-reads the same plan and progress files, completes one task, and records focused feedback.
- The loop stops on its explicit completion policy, operator stop, or iteration limit.
Source and setup
Provenance
- Project
- Pi Ralph Loop
- Origin
- Vedang Manerikar
- Current maintainer
- Vedang Manerikar
- Relationship
- original
- Installed source
git:github.com/vedang/pi-ralph-loop- Source path
- View source (
src/index.ts) - Compatibility
- Pi session navigation and compaction APIs
- Writable planning directory
- Version-control workflow
- License publication scope
- Independently written factual summary and source link only; no source reuse permission asserted.
- Reviewed revision
49c6bde25385392d0999155708a141028d5d80f2- Catalog revision
e0c035a297462c519315abfa1af31a1ed3bd9eef
Setup notes
- Created and maintained by Vedang; source is public but no reuse license is declared.
- The package requires Pi session navigation and compaction APIs, a writable planning directory, and a version-control workflow.
- Behavior claims were reviewed against the installed Git revision.
Commands
/ralph/ralph-prompt