Skip to content

Instantly share code, notes, and snippets.

@nathanmkaya
Created January 13, 2026 17:39
Show Gist options
  • Select an option

  • Save nathanmkaya/c7599f7f8fd4c2121f66899f8c1adb20 to your computer and use it in GitHub Desktop.

Select an option

Save nathanmkaya/c7599f7f8fd4c2121f66899f8c1adb20 to your computer and use it in GitHub Desktop.

Ralph Agent Instructions

Your Task

  1. Read sprints/mvp-core-sprint-2-2.json
  2. Read ralph/progress.txt (check Codebase Patterns first)
  3. Check you're on the correct branch
  4. Pick highest priority story where passes: false
  5. Implement that ONE story
  6. Run typecheck (spotless and detekt) and tests
  7. Update AGENTS.md files with learnings
  8. Commit: feat: [ID] - [Title]
  9. Update sprint.json: passes: true
  10. Append learnings to progress.txt

Progress Format

APPEND to progress.txt:

[Date] - [Story ID]

  • What was implemented
  • Files changed
  • Learnings:
    • Patterns discovered
    • Gotchas encountered

Codebase Patterns

Add reusable patterns to the TOP of progress.txt:

Codebase Patterns

  • Migrations: Use IF NOT EXISTS
  • React: useRef<Timeout | null>(null)

Stop Condition

If ALL stories pass, reply: COMPLETE

Otherwise end normally.

#!/bin/bash
set -e
MAX_ITERATIONS=${1:-10}
SCRIPT_DIR="$(cd "$(dirname \
"${BASH_SOURCE[0]}")" && pwd)"
echo "πŸš€ Starting Ralph"
for i in $(seq 1 $MAX_ITERATIONS); do
echo "═══ Iteration $i ═══"
OUTPUT=$(cat "$SCRIPT_DIR/prompt.md" \
| claude --dangerously-skip-permissions 2>&1 \
| tee /dev/stderr) || true
if echo "$OUTPUT" | \
grep -q "<promise>COMPLETE</promise>"
then
echo "βœ… Done!"
exit 0
fi
sleep 2
done
echo "⚠️ Max iterations reached"
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment