Loop 016
The ticket-to-PR-ready loop
A bounded engineering workflow that turns a ticket, failing behavior, or customer complaint into a proven root cause, minimal patch, and reviewer-ready handoff.
Ready-to-use prompt
Copy the loop
Take a ticket, bug report, failing behavior, or customer complaint and turn it into a review-ready patch. Reproduce the failure in the smallest representative environment, prove the root cause, make the smallest credible fix, and rerun the original reproduction plus relevant regression tests. If the issue cannot be reproduced after two serious attempts, say so. Do not fold unrelated refactors into the patch. Finish with the cause, changed files, before-and-after proof, risks, and pull-request summary.
Verify / stop
The failure is fixed, verified, and ready for review.
The issue reproduces before the fix, no longer reproduces afterward, and relevant regression checks pass.
Context and guidanceWhen to use it, steps, safety notes, and related loops
Use this when
Use this when a real but loosely written ticket, bug report, or customer complaint needs to become a bounded engineering change with enough proof for a fast review.
How to run it
- State the expected and actual behavior, then reproduce the failure in the smallest representative environment.
- Trace the behavior to a root cause and confirm the causal link with evidence.
- Implement the smallest credible fix, avoiding unrelated cleanup or hidden refactors.
- Repeat the original reproduction, run relevant regression checks, and package the result for review.
Why it works
The loop closes the gap between something being wrong and a reviewer being able to trust the patch. Reproduction, evidence, bounded scope, and a structured handoff remove the detective work from review.
Implementation note
Match the proof to the failure: screenshots or recordings for UI issues, tests or logs for backend behavior, benchmark deltas for performance, and sanitized traces for integrations.