← ClaudeAtlas

bugfixlisted

Use whenever a bug is reported and a fix is asked for, however small the fix looks, even a one-line change: the regression test comes before the edit, so do not patch the code directly on a bug report. Investigate root cause, write a failing regression test (RED), implement the minimum fix, confirm the test passes (GREEN), then commit test and fix together. Fires on "fix this bug", "this is broken", "it's not working", "there's a regression", "resolve this issue", "X returns Y instead of Z, fix it", or a reference to a bug report. Not for: planning multi-step work (/aidex:plan); executing a written plan phase-by-phase (/aidex:plan-exec); recording why a fix was chosen as an ADR (/aidex:decision); pure refactors with no bug.
yacb2/aidex · ★ 2 · Code & Development · score 75
Install: claude install-skill yacb2/aidex
# Bug Fix Workflow Test-driven bug fixing methodology that ensures every fix includes a regression test. ## Core Principle **Every bug fix MUST include a regression test.** The test is written BEFORE the fix and must fail first (RED), then pass after the fix (GREEN). ## Workflow The bug-fix workflow is these nine steps — the agent table and prose below key to their step numbers: 1. Investigate root cause (don't guess) 2. Write test that reproduces bug (must FAIL) — **read** `${CLAUDE_PLUGIN_ROOT}/skills/bugfix/references/test-patterns.md` **before choosing the test type**: it holds the signal→type decision matrix, the naming convention, the regression-test structure, and the cases where an automated test is the wrong call. The summary below is the first column of that matrix, not a substitute for it. 3. Confirm test fails **for the right reason** — the failure message names the buggy behavior, not an import/syntax/setup error. Verify this before writing the fix. 4. Implement minimum fix 5. Confirm test passes — capture the GREEN output as proof (see *Proof of done*) 6. Run surrounding tests (no regressions) — **select them, don't run everything**: `${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/affected-tests.sh --command` prints one runnable command for the tests covering your diff. Exit 3 means no selection is available (no `module-map.json`, or nothing matched) — name the narrowest paths you can yourself (the fix's module, the touched spec) and sa