Add Ralph Wiggum Plugin Support #21424

Closed
opened 2026-02-21 20:12:29 -05:00 by yindo · 0 comments
Owner

Originally created by @lyzno1 on GitHub (Jan 4, 2026).

Feature Request: Add Ralph Wiggum Plugin Support

Overview

Enable the Ralph Wiggum plugin in the Dify project's Claude Code configuration to support iterative development workflows.

What is the Ralph Wiggum Technique?

The Ralph Wiggum technique is a self-referential iterative development approach pioneered by Geoffrey Huntley. It works by:

  1. Feeding the same prompt to Claude repeatedly
  2. Claude works on the task, modifying files
  3. Each iteration, Claude sees its previous work in files and git history
  4. Iteratively improves until completion criteria are met

The technique is described as "deterministically bad in an undeterministic world" - failures are predictable, enabling systematic improvement through prompt tuning.

Core Concept

while :; do
  cat PROMPT.md | claude-code --continue
done

Plugin Capabilities

The Ralph Wiggum plugin provides three main commands:

1. /ralph-loop - Start Ralph Loop

Start an iterative development loop in the current session.

Options:

  • --max-iterations <n> - Maximum iterations before auto-stop
  • --completion-promise <text> - Promise phrase to signal completion

Example:

/ralph-loop "Refactor the cache layer" --max-iterations 20

2. /cancel-ralph - Cancel Active Loop

Cancel an active Ralph loop by removing the loop state file.

3. /ralph-wiggum:help - Get Help

Display detailed help information about the Ralph Wiggum technique and available commands.

How It Works

  1. Creates .claude/.ralph-loop.local.md state file to track iterations
  2. Stop hook intercepts exit attempts
  3. Same prompt is fed back for the next iteration
  4. Claude sees previous work in files and git history
  5. Continues until completion promise is detected or max iterations reached

Completion Promises

To signal task completion, Claude must output a <promise> tag:

<promise>TASK COMPLETE</promise>

Use Cases

Good for:

  • Well-defined tasks with clear success criteria
  • Tasks requiring iteration and refinement
  • Iterative development with self-correction
  • Greenfield projects

Not good for:

  • Tasks requiring human judgment or design decisions
  • One-shot operations
  • Tasks with unclear success criteria

Official Resources

Proposed Changes

  • Add ralph-wiggum@claude-plugins-official to enabled plugins in .claude/settings.json
  • This will enable the Ralph Wiggum iterative development workflow for the Dify project

Testing

The plugin can be tested by running:

/ralph-wiggum:help

Then trying a simple loop:

/ralph-loop "Add a simple comment to README" --max-iterations 3
Originally created by @lyzno1 on GitHub (Jan 4, 2026). ## Feature Request: Add Ralph Wiggum Plugin Support ### Overview Enable the **Ralph Wiggum plugin** in the Dify project's Claude Code configuration to support iterative development workflows. ### What is the Ralph Wiggum Technique? The Ralph Wiggum technique is a self-referential iterative development approach pioneered by Geoffrey Huntley. It works by: 1. Feeding the same prompt to Claude repeatedly 2. Claude works on the task, modifying files 3. Each iteration, Claude sees its previous work in files and git history 4. Iteratively improves until completion criteria are met The technique is described as "deterministically bad in an undeterministic world" - failures are predictable, enabling systematic improvement through prompt tuning. ### Core Concept ```bash while :; do cat PROMPT.md | claude-code --continue done ``` ### Plugin Capabilities The Ralph Wiggum plugin provides three main commands: #### 1. `/ralph-loop` - Start Ralph Loop Start an iterative development loop in the current session. **Options:** - `--max-iterations <n>` - Maximum iterations before auto-stop - `--completion-promise <text>` - Promise phrase to signal completion **Example:** ```bash /ralph-loop "Refactor the cache layer" --max-iterations 20 ``` #### 2. `/cancel-ralph` - Cancel Active Loop Cancel an active Ralph loop by removing the loop state file. #### 3. `/ralph-wiggum:help` - Get Help Display detailed help information about the Ralph Wiggum technique and available commands. ### How It Works 1. Creates `.claude/.ralph-loop.local.md` state file to track iterations 2. Stop hook intercepts exit attempts 3. Same prompt is fed back for the next iteration 4. Claude sees previous work in files and git history 5. Continues until completion promise is detected or max iterations reached ### Completion Promises To signal task completion, Claude must output a `<promise>` tag: ``` <promise>TASK COMPLETE</promise> ``` ### Use Cases **Good for:** - Well-defined tasks with clear success criteria - Tasks requiring iteration and refinement - Iterative development with self-correction - Greenfield projects **Not good for:** - Tasks requiring human judgment or design decisions - One-shot operations - Tasks with unclear success criteria ### Official Resources - **Original Technique Documentation**: https://ghuntley.com/ralph/ - **Ralph Orchestrator Project**: https://github.com/mikeyobrien/ralph-orchestrator - **Pioneered by**: Geoffrey Huntley (@ghuntley) ### Proposed Changes - Add `ralph-wiggum@claude-plugins-official` to enabled plugins in `.claude/settings.json` - This will enable the Ralph Wiggum iterative development workflow for the Dify project ### Testing The plugin can be tested by running: ```bash /ralph-wiggum:help ``` Then trying a simple loop: ```bash /ralph-loop "Add a simple comment to README" --max-iterations 3 ```
yindo added the 💪 enhancement🤖 feat:agent labels 2026-02-21 20:12:29 -05:00
yindo closed this issue 2026-02-21 20:12:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21424