Windows-compatible self-referential AI loops for iterative development. Uses PowerShell instead of Bash.

version
1.0.0
GitHub stars
14

Install

/plugin install ralph-wiggum@byigitt-ralph-wiggum-windows

Run it inside Claude Code after adding the marketplace with /plugin marketplace add byigitt/ralph-wiggum-windows.

Contents

Discovered from source

Commands 3

Cancel the active Ralph Wiggum loop.

Allowed operations:

  1. Check if loop is active:
test -f .claude/ralph-loop.local.md && echo "Active" || echo "No active loop"
  1. If active, read current state to report iteration count, then delete:
cat .claude/ralph-loop.local.md
rm .claude/ralph-loop.local.md
  1. If no active loop, inform the user.

Report the iteration number that was reached when cancelling.

Ralph Wiggum Plugin - Windows Edition

A self-referential development loop that iteratively improves on tasks until completion.

How It Works

Ralph creates a feedback loop where:

  1. You give Claude a task with a completion condition
  2. The stop hook intercepts exit attempts
  3. The same prompt is fed back with your previous work visible
  4. Claude iteratively improves until the task is truly complete

Commands

/ralph-wiggum:ralph-loop [prompt] [options]

Start a new loop with the given task.

Options:

  • --max-iterations <n> - Stop after N iterations (default: unlimited)
  • --completion-promise '<text>' - Text that signals completion

Examples:

/ralph-wiggum:ralph-loop Build a REST API --completion-promise "ALL TESTS PASS" --max-iterations 30
/ralph-wiggum:ralph-loop Fix the authentication bug --max-iterations 10
/ralph-wiggum:ralph-loop Refactor the cache layer

/ralph-wiggum:cancel-ralph

Force-stop an active loop and cleanup state files.

Completion

To signal completion, output:

<promise>YOUR_COMPLETION_TEXT</promise>

IMPORTANT: Only output this when the statement is genuinely TRUE.

Monitoring

Check current iteration:

Get-Content .claude/ralph-loop.local.md | Select-String "iteration:"

View full state:

Get-Content .claude/ralph-loop.local.md

Best Practices

  1. Clear Completion Criteria: Define what "done" means precisely
  2. Reasonable Limits: Set max-iterations as a safety net
  3. Verifiable Promises: Use promises that can be objectively verified (tests pass, linter clean, etc.)
  4. Incremental Tasks: Break large tasks into smaller loops

Technical Details

  • State file: .claude/ralph-loop.local.md
  • Hook type: Stop (intercepts session exit)
  • Scripts: PowerShell (Windows native)

Start a self-referential development loop that iteratively improves on a task.

Execute the setup script to initialize the loop:

powershell -NoProfile -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.ps1" $ARGUMENTS

Arguments: $ARGUMENTS

The stop hook will now intercept all exit attempts and feed the same prompt back, allowing you to see your previous work in files and iterate on improvements.

CRITICAL: You can ONLY declare the task complete when your completion promise statement is entirely and unambiguously accurate. Do NOT output a false completion promise just to escape the loop - this would be lying.

Your context persists through:

  • Modified files in the working directory
  • Git history showing your changes
  • The iteration counter in .claude/ralph-loop.local.md

Hooks 1

Sponsors

Details

Marketplace
byigitt/ralph-wiggum-windows
Source
plugins/ralph-wiggum
Author
byigitt
Category
Development