Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/ralph/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Take a PRD (markdown file or text) and convert it to `prd.json` in your ralph di

**Each story must be completable in ONE Ralph iteration (one context window).**

Ralph spawns a fresh Claude Code/OpenCode instance per iteration with no memory of previous work. If a story is too big, the LLM runs out of context before finishing and produces broken code.
Ralph spawns a fresh Claude Code instance per iteration with no memory of previous work. If a story is too big, the LLM runs out of context before finishing and produces broken code.

### Right-sized stories:
- Add a database column and migration
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ uv run pytest path/to/test.py # Run specific test
- `global_config.yaml` - Base hyperparameters and config values
- `<name>.yaml` - Optional split configs (loaded as root key `<name>`)
- `global_config.py` - Config class (access via `from common import global_config`)
- `.env` - Secrets/API keys (git-ignored)
- **.env** - Secrets/API keys (git-ignored, located in root)
- **src/** - Source code (utils/)
- **utils/llm/** - LLM inference with DSPY (`dspy_inference.py`) and LangFuse observability
- **tests/** - pytest tests inheriting from `TestTemplate` in `test_template.py`
Expand Down
17 changes: 4 additions & 13 deletions scripts/ralph.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Ralph Wiggum - Long-running AI agent loop
# Usage: ./ralph.sh [--tool opencode|amp|claude] [max_iterations]
# Usage: ./ralph.sh [--tool amp|claude] [max_iterations]

set -e

Expand Down Expand Up @@ -29,8 +29,8 @@ while [[ $# -gt 0 ]]; do
done

# Validate tool choice
if [[ "$TOOL" != "opencode" && "$TOOL" != "amp" && "$TOOL" != "claude" ]]; then
echo "Error: Invalid tool '$TOOL'. Must be 'opencode', 'amp' or 'claude'."
if [[ "$TOOL" != "amp" && "$TOOL" != "claude" ]]; then
echo "Error: Invalid tool '$TOOL'. Must be 'amp' or 'claude'."
exit 1
fi

Expand Down Expand Up @@ -97,16 +97,7 @@ for i in $(seq 1 $MAX_ITERATIONS); do
echo "==============================================================="

# Run the selected tool with the ralph prompt
if [[ "$TOOL" == "opencode" ]]; then
# opencode run: use prompt from prompt.md
if [ -f "$RALPH_DIR/prompt.md" ]; then
OUTPUT=$(opencode run "$(cat "$RALPH_DIR/prompt.md")" 2>&1 | tee /dev/stderr) || true
else
echo "Error: $RALPH_DIR/prompt.md not found. Create this file or use a different tool."
echo "Example: ./ralph.sh --tool claude"
exit 1
fi
elif [[ "$TOOL" == "amp" ]]; then
if [[ "$TOOL" == "amp" ]]; then
if [ -f "$RALPH_DIR/prompt.md" ]; then
OUTPUT=$(cat "$RALPH_DIR/prompt.md" | amp --dangerously-allow-all 2>&1 | tee /dev/stderr) || true
else
Expand Down
4 changes: 0 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading