Ralph Loop + Beads integration for Claude Code. Tracks Ralph loop sessions as Beads epics for better visibility and history.
This plugin combines two powerful Claude Code tools:
- Ralph Loop - Iterative AI development loops by Geoffrey Huntley
- Beads - Git-backed issue tracker with dependency support
When you start a Ralph loop with this plugin, it automatically creates a Beads epic to track the session. When the loop completes (or is cancelled), the epic is closed with a summary.
Copy to your Claude Code plugins directory:
cp -r . ~/.claude/plugins/local/ralph-beads/Or clone directly:
git clone https://github.com/YOUR_USERNAME/ralph-beads ~/.claude/plugins/local/ralph-beadsThen restart Claude Code.
/ralph-beads "Build a REST API" --max-iterations 20 --completion-promise "DONE"Options:
--max-iterations <n>- Stop after N iterations (default: unlimited)--completion-promise '<text>'- Stop when Claude outputs<promise>TEXT</promise>
/cancel-ralph-beadsThis stops the loop and closes the Beads epic.
- On Start: Creates a Beads epic titled "Ralph Loop: <prompt>"
- During Loop: Stop hook intercepts exit attempts and feeds the same prompt back
- On Complete: Closes the epic with iteration count and completion reason
The plugin uses a managed_by: ralph-beads marker in the state file to avoid conflicts with the original ralph-loop plugin.
- jq - For JSON parsing
- perl - For promise tag extraction
- bd (optional) - Beads CLI for epic tracking
If Beads isn't initialized in your project, the plugin still works - it just skips epic tracking.
ralph-beads/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── commands/
│ ├── ralph-beads.md # /ralph-beads command
│ └── cancel-ralph-beads.md # /cancel-ralph-beads command
├── hooks/
│ ├── hooks.json # Stop hook registration
│ └── stop-hook.sh # Loop continuation + epic closing
├── scripts/
│ └── setup-ralph-loop.sh # Loop setup + epic creation
└── README.md
- Designed to coexist with the original
ralph-loopplugin - Only processes loops it created (via
managed_bymarker) - Falls back gracefully if Beads isn't initialized
- Ralph Loop technique by Geoffrey Huntley
- Beads issue tracker by Steve Yegge
MIT