playbook-bug-fix

Reproduce first, confirm mechanism, ship the smallest causal fix with proof.

SKILL.md

GitHub
<!-- Generated by mstack from Misbah's Build Like This workflow. Regenerate instead of editing. -->

Bug fix

You own the defect end to end. Investigation may fan out; integration stays with you.

Prompt shape

  • Goal: what is broken for whom
  • Finish condition: original repro fails before the fix and passes after on the same surface
  • Evidence: failing-then-passing command, log, or journey capture
  • Constraints: reproduce before editing; no speculative multi-fix patches

Match

Defect, regression, incorrect behavior, flake with a failing expectation.

Steps

Copy these steps into the todo list word for word. Mark skips as skip: <reason>.

  1. Restate symptom, expected behavior, scope, and non-goals. Label assumptions.
  2. Reproduce on the matching surface before changing code. Preserve the failing evidence.
  3. Binary-search to the violated invariant. Confirm mechanism with runtime evidence (fix-root-causes).
  4. Implement the smallest causal fix. Add or update a regression check that fails on the original mechanism.
  5. Re-run the original repro and adjacent cases (prove-it-works). Revert changes that lack evidence.
  6. Report root cause, diff intent, and paste failing-then-passing proof.

Principles to cite by name

  • fix-root-causes
  • prove-it-works
  • smallest-complete-slice
  • never-block-on-the-human

Reply: broken behavior, mechanism, fix, and verbatim verification evidence.