Bug Until Reproduced
A systematic debugging loop designed to help developers identify, isolate, and create reliable reproductions of software bugs. This loop iterates through test creation, execution, and analysis until a consistent reproduction of the issue is achieved, enabling effective root cause analysis and resolution.
Goal
Create a reliable and minimal reproduction of a software bug through iterative testing and analysis
How to Run
Iterate through test creation and execution until a bug can be consistently reproduced
- 01
Identify the Bug
Provide detailed information about the bug, including symptoms, error messages, and affected components
- 02
Run Check Command
Execute 'repro test' to attempt to reproduce the bug with existing tests
- 03
Inspect Results
Analyze test output and system behavior to determine if the bug was reproduced
- 04
Refine Tests
Modify or create new test cases based on analysis to improve reproduction chances
- 05
Repeat Until Exit
Continue the loop until the exit condition is met: 'Reproduction exists'
Workflow Steps
- 01
Bug Identification
Analyze user-provided bug description and context to understand the problem space
- 02
Context Gathering
Collect relevant logs, error messages, recent changes, and environmental factors that may influence the bug
- 03
Test Case Creation
Develop initial test scenarios aimed at triggering the described bug behavior
- 04
Check Execution
Run the 'repro test' command with created test cases to observe system behavior
- 05
Result Inspection
Examine test output, logs, and system state to determine if the bug was successfully reproduced
- 06
Analysis and Refinement
If not reproduced, analyze failures and refine test cases to better target the bug conditions
- 07
Iteration Decision
Decide whether to continue iterating or terminate based on iteration count and exit condition
Kickoff Prompt
Start the "Bug Until Reproduced" loop. Goal: Create a reliable and minimal reproduction of a software bug through iterative testing and analysis Max iterations: 10 Between iterations run: repro test Exit when: Reproduction exists Start the 'Bug Until Reproduced' loop by providing a detailed bug description including error messages, expected vs actual behavior, and any relevant context such as recent code changes or specific conditions that trigger the issue. Self-pace this loop. After each iteration, run `repro test` and evaluate the output, and only continue if the exit condition is not met (Reproduction exists). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.
Guardrails
hardcoded- ·Ensure reproduction steps are minimal and isolated from unrelated code
- ·Verify that the check command 'repro test' correctly identifies the target bug
- ·Maintain consistent testing environment and dependencies throughout iterations
- ·Confirm that each test run actually exercises the suspected bug path
- ·Stop iteration once a reliable reproduction is confirmed to prevent unnecessary cycles
Flow Diagram
Related loops — Debugging
Debugging
Reproduce and Fix
This loop guides you through reproducing a reported bug, identifying its root cause, implementing a fix, and verifying the solution through automated testing. The agent will iteratively work to resolve the issue while maintaining system integrity.
Debugging
Error Log Reduction
This loop analyzes application error logs to identify and fix recurring errors, reducing their frequency over time through iterative debugging and targeted code improvements.
Debugging
Production Incident Resolver
A coding agent loop designed to diagnose and resolve production incidents through iterative investigation, targeted fixes, and continuous health monitoring until system stability is restored.