From dx-core
Run the full bug fix workflow — triage, verify, and fix — all in one command. Fetches the bug from ADO, reproduces it in browser, generates and executes a fix, and creates a PR. Use when starting work on a bug ticket.
npx claudepluginhub easingthemes/dx-aem-flow --plugin dx-coreThis skill is limited to using the following tools:
You are a coordinator. You do NOT implement anything yourself. You delegate each workflow step via the Skill tool, then report progress.
Executes step-by-step bug fix workflow: read issue, diagnose root cause, reproduce (browser for UI bugs), minimal fix, regression test, verify, open PR.
Fixes bugs via root cause diagnosis with debugger/gap-analyzer, requirements.md generation, /execute delegation, 3-retry circuit breaker, and QA.
Fix a GitHub issue by number. Automatically fetches details and implements a fix.
Share bugs, ideas, or general feedback.
You are a coordinator. You do NOT implement anything yourself. You delegate each workflow step via the Skill tool, then report progress.
Before creating tasks, use TaskList to check for existing tasks from a previous run (e.g., user interrupted and restarted). If stale tasks exist, delete them all first with TaskUpdate (status: cancelled) so the list is clean. Then create a task for each item using TaskCreate. Mark each in_progress when starting, completed when done. Delete skipped tasks.
digraph bug_all {
"Parse argument" [shape=box];
"Hub dispatch?" [shape=diamond];
"Hub dispatch" [shape=box];
"Hub results summary" [shape=doublecircle];
"Dispatch triage" [shape=box];
"Triage succeeded?" [shape=diamond];
"Dispatch verify" [shape=box];
"Verify result?" [shape=diamond];
"Dispatch fix" [shape=box];
"Fix succeeded?" [shape=diamond];
"Final summary + log run" [shape=doublecircle];
"Retry triage" [shape=box];
"Retry succeeded?" [shape=diamond];
"Report FAIL (triage)" [shape=doublecircle];
"Retry fix" [shape=box];
"Retry fix succeeded?" [shape=diamond];
"Report FAIL (fix)" [shape=doublecircle];
"Parse argument" -> "Hub dispatch?";
"Hub dispatch?" -> "Hub dispatch" [label="hub mode active"];
"Hub dispatch?" -> "Dispatch triage" [label="not hub mode"];
"Hub dispatch" -> "Hub results summary";
"Dispatch triage" -> "Triage succeeded?";
"Triage succeeded?" -> "Dispatch verify" [label="success"];
"Triage succeeded?" -> "Retry triage" [label="FAIL"];
"Retry triage" -> "Retry succeeded?";
"Retry succeeded?" -> "Dispatch verify" [label="success"];
"Retry succeeded?" -> "Report FAIL (triage)" [label="FAIL"];
"Dispatch verify" -> "Verify result?";
"Verify result?" -> "Dispatch fix" [label="success"];
"Verify result?" -> "Dispatch fix" [label="blocked (warn + continue)"];
"Verify result?" -> "Dispatch fix" [label="FAIL (warn + continue)"];
"Dispatch fix" -> "Fix succeeded?";
"Fix succeeded?" -> "Final summary + log run" [label="success"];
"Fix succeeded?" -> "Retry fix" [label="FAIL"];
"Retry fix" -> "Retry fix succeeded?";
"Retry fix succeeded?" -> "Final summary + log run" [label="success"];
"Retry fix succeeded?" -> "Report FAIL (fix)" [label="FAIL"];
}
The argument is the ADO work item ID — a numeric value (e.g., 2453532).
If the user provides a full ADO URL, extract the numeric ID.
If no argument is provided, ask the user for the work item ID.
Read shared/hub-dispatch.md for hub detection logic.
Check if hub mode is active:
DX_PIPELINE_MODE is NOT set (pipeline mode takes precedence).ai/config.yaml has hub.enabled: true.hub/ directoryIf all three conditions are met:
Print: Hub mode detected. Use /dx-hub-dispatch <ticket-id> to dispatch this bug to repo terminals. STOP.
Hub dispatch is handled by the dedicated /dx-hub-dispatch skill, which opens independent VS Code terminals for each repo.
Otherwise → proceed to "Dispatch triage" (existing flow)
Invoke Skill(/dx-bug-triage <id>).
Print: Step 1/3 done — followed by the skill's summary.
raw-bug.md + triage.md created → proceed to "Dispatch verify"Retry the failed step once by invoking Skill(/dx-bug-triage <id>) again.
Print which step failed and the error. Cannot proceed without bug data. Suggest: "Run /dx-bug-triage to retry." STOP.
Invoke Skill(/dx-bug-verify <id>).
Print: Step 2/3 done — followed by the skill's summary.
Invoke Skill(/dx-bug-fix <id>).
Print: Step 3/3 done — followed by the skill's summary.
Retry the failed step once by invoking Skill(/dx-bug-fix <id>) again.
Print which step failed and the error. Print which steps succeeded and their outputs. Suggest: "Run /dx-bug-fix to retry." STOP.
Find the spec directory and present:
## ADO #<id> — Bug Fix Complete
**<Title>**
**Branch:** `bugfix/<id>-<slug>`
**Directory:** `.ai/specs/<id>-<slug>/`
| Document | Status | Highlights |
|----------|--------|------------|
| raw-bug.md | <status> | Severity: <sev>, Priority: <pri> |
| triage.md | <status> | Component: <name>, <N> files |
| verification.md | <status> | <result> — <N> screenshots |
| implement.md | <status> | <N> steps, all done |
| verification-local.md | <status> | <result> — <N> post-fix screenshots |
**PR:** <PR URL or "Not created">
### What was done:
1. Fetched bug ticket and identified affected component
2. <Reproduced/Could not reproduce> the bug via browser automation
3. Fixed: <1-line root cause summary>
4. Verified fix on local AEM: <Fix Verified/Fix Partial/Fix Failed/Blocked>
5. Created PR with <N> file changes
Log run:
Ensure directory:
mkdir -p .ai/learning/raw
Append run record to .ai/learning/raw/runs.jsonl:
{"timestamp":"<ISO-8601>","ticket":"<id>","flow":"bug-all","severity":"<from triage>","priority":"<from triage>","component":"<from triage>","verification":"<reproduced|not-reproduced|blocked>","fix_result":"<success|failed>","local_verification":"<fix-verified|fix-partial|fix-failed|blocked>","pr_created":<true|false>}
Append bug pattern to .ai/learning/raw/bugs.jsonl:
{"timestamp":"<ISO-8601>","ticket":"<id>","component":"<from triage>","root_cause":"<category from fix summary>","files_changed":<count>}
Bug hotspot check: Read .ai/learning/raw/bugs.jsonl. Count bugs per component value. If any component has 3 or more bugs:
Learning: <component> has had <N> bugs. Consider adding focused test coverage.Known pattern check: If .ai/learning/raw/fixes.jsonl exists, read it and check if the root cause type from this bug matches any known fix pattern (by error_type). If match:
Learning: Root cause "<root_cause>" matches a known fix pattern from previous runs.If no hotspots and no pattern matches, skip silently.
If any skill returns FAIL:
/dx-bug-<skill> to retry"Dependency rules:
/dx-bug-all produces identical output to running each skill separatelyThis skill uses Skill() tool calls which work on both Claude Code and Copilot CLI.
Copilot CLI / VS Code Chat fallback: If subagent skill invocation fails, run the skills manually in sequence:
/dx-bug-triage <id> — fetch bug ticket and identify affected component/dx-bug-verify <id> — reproduce bug via browser automation/dx-bug-fix <id> — implement fix, verify locally, create PR