Exercises
Exercises for the workshop. We'll work through these together.
1. Trying HITL Ralph
The intent of this exercise is to give you a feel for how Ralph works.
- Go to the
ralph-workshop-001repo - Check out the
mainbranch
git checkout main
-
Open the
plans/prd.mdfile to look at the shape of the PRD (don't read the whole thing!) -
Run the
./plans/once-claude.shscript (you might need to make it executable)
chmod +x ./plans/once-claude.sh./plans/once-claude.sh
- Observe the output and see what happens
2. Adding Tracer Bullets To Our Prompt
Here we're trying to steer Ralph towards better task prioritization using some old techniques.
- Open the
ralph-workshop-001repo - Check out the
mainbranch (or start from where you left off)
git checkout main
-
Open the
plans/prompt.mdfile -
Add a section to the 'Task Selection' section telling the AI in which order it should implement features in the PRD
-
Consider using the 'tracer bullets' approach to prioritize getting feedback quickly
-
If you get curious about my solution, check out the
tracer-bulletsbranch
git checkout tracer-bullets
3. Using Skills To Steer Ralph
Let's see how good Ralph is at invoking its own skills and how useful skills are in steering Ralph passively.
- Open the
ralph-workshop-001repo - Check out the
skillsbranch
git checkout skills
- OR if you want to retain your code, merge the
skillsbranch in:
git add . && git commit -m "My awesome work so far" && git merge skills
-
Run the
./plans/once-claude.shscript -
While it's running, open the
.agents/skills/writing-testsfolder -
Check out the files in the folder and see what they contain
-
Check the logs to see if the LLM has invoked the skill, and if it changed anything about its behavior
4. Ralph In A Frontend Feedback Loop
Let's check out a front-end feedback loop using the Playwright MCP server with Ralph.
- Open the
ralph-workshop-002repo - Check out the
mainbranch
git checkout main
- OR if you want to try it with a more realistic, half-finished app, try the
run-throughbranch:
git checkout run-through
-
Run
npx playwright install chrometo install the Chromium browser -
Run
./plans/once-claude.shto run Ralph in a frontend feedback loop -
Observe how connecting it to the Playwright MCP Server changes its behavior
5. Building A Red Green Refactor Loop
Let's try another old technique and use a red-green-refactor loop with Ralph.
- Open the
ralph-workshop-001repo - Check out the
skillsbranch (or start from where you left off)
git checkout skills
-
Open the
plans/prompt.mdfile -
Rewrite the 'Execution' section to describe a red green refactor loop.
"Red" means that the agent should write a failing test first. "Green" means that the agent should write the code to make the test pass. "Refactor" means that the agent should refactor the code to make it better.
-
Run the
./plans/once-claude.shscript -
Observe the output and see what happens
-
If you get curious about my solution, check out the
tdd-promptbranch
git checkout tdd-prompt
6. Running Ralph On Your Backlog
Let's try building a backlog and hook up Ralph to that backlog.
- Open the
ralph-workshop-001repo - Check out the
backlogbranch. This is a branch where the app has been built up significantly, but has some issues.
git checkout backlog
-
Open the
plans/flaky-geo-tests.mdfile and read it. -
Create an issue in the
issuesfolder that describes the problem (imagine this is a GitHub issue - we're not using GitHub here just for ease of setup) -
Run the
./plans/once-claude.shscript -
Observe the output and see what happens
7. Create A Refactor Plan
Let's try creating a refactor plan and putting in our backlog to see what happens.
- Open the
ralph-workshop-001repo - Check out the
backlogbranch (or start from where you left off)
git checkout backlog
-
Open the
plans/repo-cleanup-request.mdfile and read it. -
Run Claude or OpenCode and initiate the
/request-refactor-planskill. -
Walk through the refactor plan dialogs
-
Once complete, run the
./plans/once-claude.shscript -
Observe the output and see what happens
8. Create A PRD
Let's use my write a PRD skill to see how Ralph does when it encounters a PRD in the backlog.
- Open the
ralph-workshop-001repo - Check out the
backlogbranch (or start from where you left off)
git checkout backlog
-
Open the
plans/webhooks-feature-request.mdfile and read it. -
Run Claude or OpenCode and initiate the
/write-a-prdskill. -
Walk through the PRD dialogs
-
Once complete, run the
./plans/once-claude.shscript -
Observe the output and see what happens