mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 15:37:55 +01:00
2.9 KiB
2.9 KiB
Ralph Autonomous Loop - RevampIT
Run Claude Code in autonomous loops to complete tasks without manual intervention.
Quick Start
# 1. Edit PROMPT.md with your task
nano PROMPT.md
# 2. Add tasks to @fix_plan.md
nano @fix_plan.md
# 3. Run Ralph
./ralph.sh
Configuration (Conservative for Limited Plans)
Default settings are conservative to work with limited Claude subscriptions:
| Setting | Default | Purpose |
|---|---|---|
| Max iterations | 10 | Safety limit |
| Sleep between | 60s | Prevent rate limits |
| Prompt file | PROMPT.md | Task description |
Custom Settings
# Fewer iterations (very conservative)
./ralph.sh --max 5
# More iterations (if you have quota)
./ralph.sh --max 20
# Custom prompt file
./ralph.sh --prompt my-task.md
# Longer sleep between iterations
./ralph.sh --sleep 120
Files
| File | Purpose |
|---|---|
PROMPT.md |
Task description - edit this for each task |
@fix_plan.md |
Priority queue - Claude focuses on P0/P1 first |
ralph.sh |
The loop script |
RALPH.md |
This file |
RevampIT-Specific Reminders
When running Ralph on RevampIT, ensure tasks include:
- Use logger: No
console.log, useloggerfrom@/lib/logger - Use TABLE_NAMES: No hardcoded table names
- Parameterized queries: No string concatenation in SQL
- Swiss German: Use "ss" not "ß" for user-facing text
Workflow
- Define Task: Edit
PROMPT.mdwith clear requirements - Set Priorities: Update
@fix_plan.mdwith specific subtasks - Run Loop:
./ralph.sh - Monitor: Watch output, Ctrl+C to stop anytime
- Review: Check changes with
git diff
Best Practices for Limited Plans
- Run during active hours: Don't let it run overnight
- Use 5-10 iterations: Start small, increase if needed
- Clear success criteria: Help Claude know when done
- Focused tasks: One feature at a time
- Check rate limits: Script auto-detects and waits
Stopping
- Ctrl+C: Stop immediately
- Max iterations: Stops automatically
- Completion signal: Stops when Claude outputs
<promise>TASK_COMPLETE</promise>
Example Task
# In PROMPT.md
## Current Task
Add appointment booking feature to CMS API
## Success Criteria
- [ ] API endpoint created at /api/appointments
- [ ] Using TABLE_NAMES.APPOINTMENTS
- [ ] Using logger for all logging
- [ ] Parameterized SQL queries
- [ ] Type check passes
- [ ] Lint passes
When ALL criteria met, output:
<promise>TASK_COMPLETE</promise>
Troubleshooting
"Prompt file not found"
- Create PROMPT.md first
"Rate limit detected"
- Normal for limited plans
- Script waits automatically
Task not completing
- Add clearer success criteria
- Break into smaller subtasks
- Check @fix_plan.md priorities
Console.log errors
- Replace with
logger.info(),logger.error(), etc.