template

Bug Fix

Resolve bugs from report to verified fix. The AI drives through Intake, Reproduce, Analyze, Fix, and Verify.

the steps, as stored

  1. 01Intake

    Verify the bug report is actionable before investigation begins.

    Required elements: - A specific, unambiguous title - A one-line summary describing the incorrect behavior - Observed context (when, where, or under what conditions)

    If any element is missing, identify the gap and ask the operator to clarify. Do not advance with an under-specified report.

  2. 02Reproduceapproval gateagent: developer

    Produce a minimal, deterministic reproduction of the reported behavior.

    Capture: - Exact steps required to trigger the bug - Expected versus observed behavior - Relevant environment details (version, OS, configuration)

    If the bug cannot be reproduced, stop and report that finding explicitly. Do not proceed on speculation — an irreproducible report requires clarification, not guesswork.

    Request operator confirmation that this reproduction matches the reported issue before advancing.

  3. 03Analyzeagent: planner

    Identify the root cause and scope the smallest corrective change.

    Document: - Location of the defect (files, functions, or subsystem) - Mechanism — why the observed behavior occurs - Proposed fix — the minimal change that resolves the root cause - Collateral impact — callers affected, tests that will shift, migrations or contracts potentially touched

    Keep the analysis focused and concise — depth of reasoning matters more than length.

  4. 04Fixagent: developer

    Apply the corrective change defined in the analyze step. Keep the edit surgical — do not refactor adjacent code, rename unrelated symbols, or expand scope beyond the root cause.

    Add or update a regression test that would have caught this bug before the fix. The test must fail on the unfixed code and pass on the fixed code.

  5. 05Verifyapproval gateagent: reviewer

    Verify the fix resolves the reported behavior without introducing regressions.

    Execute: - The reproduction recipe from the reproduce step - The regression test added in the fix step - The project's existing test suite at the relevant level

    Report what was executed, what passed, and what failed. If any check fails, reject this step — the workflow returns to fix so the gap can be addressed before another verification pass.

    Request operator approval before advancing.

  6. 06Completecontext gate

    The bug has been reproduced, analyzed, fixed, and verified. Mark the task completed and close it out.

use it for

  • Fix a login-page bug from report to confirmed resolution
  • Trace and fix an upload crash with the root cause documented
  • Debug a payment-processing error and verify the fix before close

without it, with it

without with bug fix
An urgent fix ships straight to production because no one had time to review itThe AI drives through Reproduce and Analyze first, then pauses at an approval step before the fix is closed out
The same bug returns later because the root cause was never written downEvery step — Intake, Reproduce, Analyze, Fix, Verify — is logged automatically, so the root cause and the audit trail are already there
Each developer triages bugs differently, so severity and handling are inconsistentThe AI drives the same six-step triage every time, from intake through verified resolution

say this in your client

"Fix a bug in the login page""There's a crash when uploading files""Debug the payment processing error"