Identify the Bug and Context
Select a specific bug, usually from a bug report or a GitHub issue. This document should clearly describe the failure and provide enough detail for the AI to understand the problem.
Leverage an AI coding assistant like Claude Code to implement a Test-Driven Development (TDD) process. This workflow allows you to reproduce, fix, and verify bug fixes with incredible speed and accuracy.


Source episode · 36:26
How Gusto Built a New Product Line in 10 Weeks with Claude Code, No Jira, and No Docswith Claire Vo
From 36:26 to 39:38, Eddie Kim demonstrates fixing a payroll bug in Claude Code by first creating an evaluation that reproduces the failure, then changing the code until it passes. Clip range: 36:26 to 39:38.
A pull request containing a failing regression test, the implemented fix, and passing test results.
Claude for coding tasks
Step by step
Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.
6 steps
Select a specific bug, usually from a bug report or a GitHub issue. This document should clearly describe the failure and provide enough detail for the AI to understand the problem.
In your AI coding assistant, provide a prompt that points to the GitHub issue. Instruct the AI to follow a test-driven development (TDD) process: first, write a test that reproduces the bug and fails; second, propose a fix; and third, prove the fix works by showing the test now passes.
There's a customer issue that is outlined in this GitHub issue... Can you please read this issue and come up with a fix for the problem that's outlined here? I'd love for you to first write an eval that fails to show that you can reproduce this issue, then come up with a solution, and then prove that the solution works by showing that the eval now passes.
The AI reads the issue and generates a test case, or evaluation, designed to fail. This failing test serves as confirmation that the AI can successfully reproduce the bug as described.
The AI then proposes a solution, which could be a code change or a modified prompt. It runs the same evaluation again, this time expecting it to pass. The passing test is the proof that the proposed fix works.
Review the AI's proposed code change and the test case. Use your judgment to verify that the fix is correct, high quality, and does not introduce any unintended side effects.
Once you approve the solution, instruct the AI to open a pull request. This prepares the change for team review and merging into the main codebase.
This looks correct. Please open a pull request with the title "[PR Title]" and the following description: [Describe the fix and link to the original issue].
Turn an idea into a PRD, user stories, and a plan.
After the steps
How to recover when the loop fails and where human judgment helps.
Recover
Keep building

Log your workouts effortlessly without ever opening a spreadsheet. This workflow uses the Claude mobile app to parse a simple voice note and automatically update your workout tracking spreadsheet in the background.

Create a custom email management interface within Claude to read, triage, and draft replies without opening the Gmail tab. This workflow helps you reclaim focus and compound your learnings by training your AI on every interaction.

Build a fully automated system in Claude to generate personalized, interactive HTML proposals and client onboarding materials, saving hours on administrative work and creating a high-touch experience.
Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.