Purpose
Fix a bug with regression safety and minimal change scope.
Inputs
- •JIRA ticket key/URL (required unless explicitly invoked as
$fixbug) - •Current codebase and relevant tests
- •Optional logs, stack traces, or reproduction notes
Outputs (files changed/created)
- •New or updated failing-then-passing ExUnit regression test
- •Minimal production code fix
- •Optional docs updates if behavior contract changed
Process (step-by-step)
- •Read the JIRA ticket and extract:
- •Reproduction steps
- •Expected behavior
- •Actual behavior
- •Reproduce the bug locally where possible.
- •Write a failing ExUnit test that captures the bug.
- •Implement the minimal fix to make the test pass.
- •Run relevant tests (at least the new regression test and affected suite) until green.
- •Verify no unnecessary scope expansion occurred.
- •Prepare a PR-ready summary.
Quality bar / guardrails
- •Trigger policy: run only with JIRA ticket context or explicit
$fixbug. - •TDD-first is mandatory: test fails before fix, then passes after fix.
- •Keep fixes minimal and localized; avoid opportunistic refactors.
- •Preserve Elixir/Phoenix best practices and production safety.
- •Include regression coverage for the reported behavior.
Final response format (brief)
- •
PR title suggestion: <title> - •
Changes:concise bullets (test + fix) - •
Verification:tests run and outcomes - •
Risk:one short assessment