AIhero

    Exercises

    Matt Pocock
    Matt Pocock

    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-001 repo
    • Check out the main branch
    git checkout main
    • Open the plans/prd.md file to look at the shape of the PRD (don't read the whole thing!)

    • Run the ./plans/once-claude.sh script (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-001 repo
    • Check out the main branch (or start from where you left off)
    git checkout main
    • Open the plans/prompt.md file

    • 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-bullets branch

    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-001 repo
    • Check out the skills branch
    git checkout skills
    • OR if you want to retain your code, merge the skills branch in:
    git add . && git commit -m "My awesome work so far" && git merge skills
    • Run the ./plans/once-claude.sh script

    • While it's running, open the .agents/skills/writing-tests folder

    • 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-002 repo
    • Check out the main branch
    git checkout main
    • OR if you want to try it with a more realistic, half-finished app, try the run-through branch:
    git checkout run-through
    • Run npx playwright install chrome to install the Chromium browser

    • Run ./plans/once-claude.sh to 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-001 repo
    • Check out the skills branch (or start from where you left off)
    git checkout skills
    • Open the plans/prompt.md file

    • 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.sh script

    • Observe the output and see what happens

    • If you get curious about my solution, check out the tdd-prompt branch

    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-001 repo
    • Check out the backlog branch. 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.md file and read it.

    • Create an issue in the issues folder 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.sh script

    • 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-001 repo
    • Check out the backlog branch (or start from where you left off)
    git checkout backlog
    • Open the plans/repo-cleanup-request.md file and read it.

    • Run Claude or OpenCode and initiate the /request-refactor-plan skill.

    • Walk through the refactor plan dialogs

    • Once complete, run the ./plans/once-claude.sh script

    • 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-001 repo
    • Check out the backlog branch (or start from where you left off)
    git checkout backlog
    • Open the plans/webhooks-feature-request.md file and read it.

    • Run Claude or OpenCode and initiate the /write-a-prd skill.

    • Walk through the PRD dialogs

    • Once complete, run the ./plans/once-claude.sh script

    • Observe the output and see what happens

    Join over 50,000 Developers Becoming AI Heroes

    Get my new agent skills first, skip the doom scroll and grab subscriber-only discounts.

    I respect your privacy. Unsubscribe at any time.

    Share