Last active
January 8, 2026 14:36
-
-
Save TikiCat7/2447f80fb31602e3f72dbbb7878e7dcb to your computer and use it in GitHub Desktop.
Ralph Wiggums Bash Script (time taken + telegram notification)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| start_time=$(date +%s) | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <iterations>" | |
| exit 1 | |
| fi | |
| for ((i = 1; i <= $1; i++)); do | |
| echo "Iteration $i" | |
| echo "------------------------------" | |
| result=$(claude --permission-mode acceptEdits -p "@plans/prd.json @progress.txt \ | |
| 1. Find the highest-priority feature to work on and work only on that feature. \ | |
| This should be the one YOU decide has the highest priority - not necessarily the first in the list. \ | |
| 2. Check that the types check via bun run typecheck and that the tests (unit and e2e) pass via bun run test and bun run test:e2e. \ | |
| 3. Update the PRD with the work that was done. \ | |
| 4. Append your progress to the progress.txt file. \ | |
| Use this to leave a note for the next person working in the codebase. \ | |
| 5. Make a git commit of that feature. \ | |
| ONLY WORK ON A SINGLE FEATURE. \ | |
| If, while implementing the feature, you notice the PRD is complete, output <promise>COMPLETE</promise>") | |
| echo "$result" | |
| if [[ "$result" == *"<promise>COMPLETE</promise>"* ]]; then | |
| echo "PRD complete, exiting." | |
| end_time=$(date +%s) | |
| duration=$((end_time - start_time)) | |
| mins=$((duration / 60)) | |
| secs=$((duration % 60)) | |
| echo "PRD complete after $i iterations in ${mins}m ${secs}s" | notify -p telegram | |
| exit 0 | |
| fi | |
| done | |
| end_time=$(date +%s) | |
| duration=$((end_time - start_time)) | |
| mins=$((duration / 60)) | |
| secs=$((duration % 60)) | |
| echo "Ralph finished $1 iterations in ${mins}m ${secs}s" | notify -p telegram |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ralph-once.sh - タスクを一つだけ
prd.jsonから選んで実行する