Bug Fix Flow

From bug ticket to merged PR -- triage, reproduce with browser automation, fix, and ship. Works with ADO and Jira.

One Command

End-to-End Bug Fix

A single command chains all three phases together.

Run in Claude Code /dx-bug-all <ID or JIRA-KEY>

Chains Triage, Verify, and Fix automatically. Or run each phase individually for more control.

Triage Fetch bug, identify component
/dx-bug-triage
Verify Reproduce in browser
/dx-bug-verify
Fix Plan, implement, PR
/dx-bug-fix
Three Phases

Bug Fix Phases

Each phase produces structured output that feeds into the next.

1. Triage

/dx-bug-triage

Fetches the bug from ADO or Jira, identifies the affected component and source files, checks for cross-repo dependencies.

raw-bug.md triage.md

2. Verify

/dx-bug-verify

Playwright MCP navigates to the affected page, follows repro steps, takes screenshots. Three modes: before (confirm bug exists), after (verify fix locally), qa (verify fix on QA post-merge).

verification.md screenshots

3. Fix

/dx-bug-fix

Generates implementation plan, executes fix steps, runs the same test/review/commit loop as features, creates PR.

implement.md PR
Flow

Bug Fix Flow Diagram

The full decision tree from bug ID to learning.

Full Bug Fix Flow /dx-bug-all <ID or JIRA-KEY>

The full decision tree from bug ID to learning.

Bug ID ADO or Jira
Triage Fetch, identify component
/dx-bug-triage
Cross-repo? Same or delegate
Verify Reproduce in browser
/dx-bug-verify
Fix Plan + implement + PR
/dx-bug-fix
Learning Bug history + hotspots
Browser

Browser Automation

Playwright MCP provides real browser interaction for bug reproduction.

Page Navigation

Navigates to the affected page, handles QA Basic Auth, waits for page load, and interacts with elements.

  • Navigate to URL
  • Click elements, fill forms
  • Take screenshots at each step
  • Evaluate JavaScript in page context

AEM Component Dialog

For AEM bugs, the aem-bug-executor agent interacts directly with the component dialog in the AEM author environment.

  • Open component dialog
  • Inspect field values
  • Compare with expected state
  • Screenshot dialog panels
Cross-Repo

Cross-Repo Detection

Bugs don't always live in the repo where they're reported.

KAI-HUB Routing

In automation, the KAI-HUB router resolves which repos the bug touches via /dx-discover-repos (reading the triage ## Cross-Repo Scope table among other tiers) and queues the BugFix worker once per resolved repo. Each worker clones its target repo dynamically and runs the fix there.

Same Repo

Bug and fix are in the same repo. The worker fires directly via its own webhook and proceeds to verify and fix.

Other Repo

Bug reported in frontend but fix needed in backend. /dx-discover-repos resolves the backend repo and the hub fans the BugFix worker out to clone and fix it.

Learning

Bug Pattern Detection

Bug history is tracked per component to identify hotspots.

Hotspot Alerts

When 3 or more bugs are filed against the same component, a hotspot alert is triggered. This flags the component for deeper review — recurring bugs in the same area often indicate a systemic issue rather than isolated defects.

Commands

Individual Commands

Run each phase separately for more control.

CommandPhaseOutput
/dx-bug-triage <ID>Triageraw-bug.md, triage.md
/dx-bug-verify [before|after|qa]Verifyverification.md / verification-local.md / verification-qa.md, screenshots
/dx-bug-fixFiximplement.md, commits, PR
/dx-bug-all <ID>All threeEverything above, end-to-end
KAI by Dragan Filipovic