From e145898e94c4dd2cf51ca4afbc07bc54587c8b9a Mon Sep 17 00:00:00 2001 From: Dawid Date: Fri, 23 Jan 2026 10:52:36 +0700 Subject: [PATCH] Windows version of ralph.sh --> ralph.bat --- ralph.bat | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 ralph.bat diff --git a/ralph.bat b/ralph.bat new file mode 100644 index 0000000..d6b225d --- /dev/null +++ b/ralph.bat @@ -0,0 +1,133 @@ +@echo off +setlocal enabledelayedexpansion + +:: Ralph Wiggum Autonomous Development Loop +:: ========================================= +:: This script runs Claude Code in a continuous loop, each iteration with a fresh +:: context window. It reads PROMPT.md and feeds it to Claude until all tasks are +:: complete or max iterations is reached. +:: +:: Usage: ralph.bat +:: Example: ralph.bat 20 + +:: Check for required argument +if "%~1"=="" ( + echo Error: Missing required argument + echo. + echo Usage: %~nx0 ^ + echo Example: %~nx0 20 + exit /b 1 +) + +set MAX_ITERATIONS=%~1 + +:: Verify required files exist +if not exist "PROMPT.md" ( + echo Error: PROMPT.md not found + echo Please create PROMPT.md or run /create-prd first + exit /b 1 +) + +if not exist "prd.md" ( + echo Error: prd.md not found + echo Please create your PRD or run /create-prd first + exit /b 1 +) + +if not exist "activity.md" ( + echo Warning: activity.md not found, creating it... + ( + echo # Project Build - Activity Log + echo. + echo ## Current Status + echo **Last Updated:** Not started + echo **Tasks Completed:** 0 + echo **Current Task:** None + echo. + echo --- + echo. + echo ## Session Log + echo. + echo ^