Bug-Fix Workflow

Systematic root cause analysis and verified fix delivery.

~16 phasesBUG_FIXED--pr supported

Pipeline

Phase Summary

Hover over any phase name to see what it does in detail.

#PhasePurposeKey Output
1INTAKE/TRIAGECollect problem statement, parse ticketINTAKE.md
2TICKET_GATEValidate Jira ticket has required info for bug-fixTICKET_GATE.md
3REPRODUCEDemonstrate broken behavior with actual commandsREPRODUCE.md
4RECALLSearch knowledge base for similar past issuesRECALL.md
5CODE_TRACEFind specific code paths involved in the bugCODE_TRACE.md
6BLAST_RADIUS_MAPIdentify all affected code, tests, and componentsBLAST_RADIUS_MAP.md
7REQUIREMENTSDefine acceptance criteria for ‘fixed’REQUIREMENTS.md
8TEST_INVENTORYDocument existing tests in the fix areaTEST_INVENTORY.md
9DIAGNOSISRoot cause analysis using all discovery documentsDIAGNOSIS.md
10FIX_PLANDetailed solution design with specific code changesFIX_PLAN.md
11BASELINERun all tests before changes to establish healthBASELINE.md
12TEST_GENWrite new tests for the fix (Category A)TEST_GEN.md
13FIXApply fix with red-green cycleCode changes
14VERIFYRun Category A + B tests to confirm fixVERIFY.md
15BLAST_RADIUS_RUNFull regression suite (Category C)BLAST_RADIUS_RUN.md
16CLOSESummarize, update Jira, create QE sub-task, PR if --prCLOSE.md
17LEARNUpdate knowledge stores with learningsLEARN.md

Key Processes

Ticket Gate

TICKET_GATE validates 6 required fields (repro steps, expected/actual behavior, priority, affected area). Blocks with downstream impact analysis if insufficient. Re-fetches ticket on retry. Use /bug-fix PROJ-123 --jira-check to run this check without starting the workflow — it drafts concrete fixes for each gap and can update the ticket for you.

REPRODUCE Verification

Must demonstrate broken behavior with actual commands and output before any analysis begins.

3-Attempt Diagnosis

DIAGNOSIS gets 3 attempts. If root cause is wrong (VERIFY fails), REDIAGNOSE loops back with new evidence. After 3 failures: BLOCKED.

Blast Radius

Mapped before changes (BLAST_RADIUS_MAP) and verified after (BLAST_RADIUS_RUN). Ensures no unintended side effects.

Signal Flow

SignalTypeMeaning
PHASE_COMPLETEAdvancePhase done, advance to next
BLOCKED_NEEDS_HUMANBlockCannot proceed without human input
SCOPE_ESCALATIONBlockScope larger than expected
REDIAGNOSELoopbackRoot cause wrong, loop back to DIAGNOSIS
BUG_FIXEDTerminalWorkflow complete

Loopback: REDIAGNOSE

When VERIFY discovers the fix doesn't resolve the issue, the workflow loops back to DIAGNOSIS with all new evidence.