[{"data":1,"prerenderedAt":563},["ShallowReactive",2],{"content-\u002Fplugins\u002Faio-planning\u002Faio-debug":3,"children-\u002Fplugins\u002Faio-planning\u002Faio-debug":562,"twin-\u002Fplugins\u002Faio-planning\u002Faio-debug":557},{"id":4,"title":5,"author":6,"body":7,"budget_tier":6,"build_tags":6,"created":6,"description":553,"document_type":554,"extension":555,"game":6,"install":36,"investment_tier":6,"league":6,"meta":556,"navigation":557,"patch":6,"path":558,"plugin":24,"profit_per_hour":6,"ratings":6,"seo":559,"skills_count":6,"status":6,"stem":560,"strategy_tier":6,"tags":6,"updated":6,"version":6,"weight":6,"__hash__":561},"content\u002Fplugins\u002Faio-planning\u002Faio-debug.md","aio-debug",null,{"type":8,"value":9,"toc":535},"minimark",[10,37,42,52,57,60,64,74,78,81,104,110,114,117,167,173,184,189,196,258,261,266,270,273,312,317,328,332,335,372,377,381,384,416,420,423,475,478,482,514,518,522,525],[11,12,13],"blockquote",{},[14,15,16,17,25,26,25,30,33,34],"p",{},"From plugin ",[18,19,21],"a",{"href":20},"\u002Fplugins\u002Faio-planning",[22,23,24],"strong",{},"aio-planning"," · ",[27,28,29],"code",{},"v1.1.2",[22,31,32],{},"Install:"," ",[27,35,36],{},"\u002Fplugin install aio-planning@aiocean-plugins",[38,39,41],"h2",{"id":40},"environment","Environment",[43,44,45],"ul",{},[46,47,48,49],"li",{},"git: !",[27,50,51],{},"git --version 2>\u002Fdev\u002Fnull || echo \"NOT INSTALLED\"",[53,54,56],"h1",{"id":55},"debugfix-systematic-debug-fix-orchestrator","DebugFix - Systematic Debug & Fix Orchestrator",[14,58,59],{},"Orchestrate four specialized skills in sequence to maximize debugging effectiveness. Each phase builds on the previous, ensuring root cause is found before any code changes, and all changes are reviewed before completion.",[38,61,63],{"id":62},"orchestration-flow-skill-graph","Orchestration Flow — Skill Graph",[65,66,71],"pre",{"className":67,"code":69,"language":70},[68],"language-text","Phase 1: Understand Context\n    \u002Fdiscover (AIO) + \u002Fdeep-dive (OMC)\n         |\nPhase 2: Investigate Root Cause\n    \u002Fsuperpowers:systematic-debugging + \u002Foh-my-claudecode:trace\n         |\nPhase 3: Implement Fix\n    \u002Fsuperpowers:test-driven-development (TDD)\n         |\nPhase 4: Verify & Review\n    \u002Fsuperpowers:verification-before-completion → \u002Faio-code-review\n","text",[27,72,69],{"__ignoreMap":73},"",[38,75,77],{"id":76},"phase-1-understand-context","Phase 1: Understand Context",[14,79,80],{},"Before debugging, understand the surrounding codebase using discovery skills:",[82,83,84,91,98,101],"ol",{},[46,85,86,87,90],{},"Invoke ",[27,88,89],{},"\u002Fdiscover"," with the bug description — finds relevant files via GitNexus",[46,92,93,94,97],{},"For complex bugs spanning multiple modules, also invoke ",[27,95,96],{},"\u002Foh-my-claudecode:deep-dive"," for deeper analysis",[46,99,100],{},"Identify: affected files, data flow, dependencies, recent changes to the area",[46,102,103],{},"Map the execution path from input to where the bug manifests",[14,105,106,109],{},[22,107,108],{},"Exit criteria",": Clear understanding of the code area, its patterns, and its dependencies.",[38,111,113],{"id":112},"phase-2-investigate-root-cause","Phase 2: Investigate Root Cause",[14,115,116],{},"With codebase context established, apply systematic debugging rigor:",[82,118,119,125,131,160],{},[46,120,86,121,124],{},[27,122,123],{},"\u002Fsuperpowers:systematic-debugging"," — the gold standard 4-phase debugging methodology",[46,126,127,128],{},"Follow its iron law: ",[22,129,130],{},"NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST",[46,132,133,134],{},"Execute all four phases:",[43,135,136,142,148,154],{},[46,137,138,141],{},[22,139,140],{},"Root Cause Investigation",": Read errors, reproduce, check recent changes, trace data flow",[46,143,144,147],{},[22,145,146],{},"Pattern Analysis",": Find working examples, compare against references, identify differences",[46,149,150,153],{},[22,151,152],{},"Hypothesis and Testing",": Form specific hypothesis, test minimally (one variable at a time)",[46,155,156,159],{},[22,157,158],{},"Implementation Planning",": Plan the single fix addressing root cause",[46,161,162,163,166],{},"For complex causal chains, additionally invoke ",[27,164,165],{},"\u002Foh-my-claudecode:trace"," — evidence-driven causal analysis with hypothesis ranking and disconfirmation",[14,168,169,172],{},[22,170,171],{},"Critical constraints",":",[43,174,175,178,181],{},[46,176,177],{},"Never guess. Gather evidence first",[46,179,180],{},"One change at a time. Never shotgun multiple fixes",[46,182,183],{},"Compare broken code against working examples in the same codebase",[185,186,188],"h3",{"id":187},"circuit-breaker-3-strikes-rule","Circuit Breaker — 3 Strikes Rule",[14,190,191,192,195],{},"Track each fix attempt explicitly (attempt 1, attempt 2, attempt 3). After ",[22,193,194],{},"3 failed fix attempts",", STOP and escalate:",[82,197,198,204,210,216,236,252],{},[46,199,200,203],{},[22,201,202],{},"Declare circuit breaker"," — announce: \"Circuit breaker triggered: 3 fix attempts failed. Stopping to reassess.\"",[46,205,206,209],{},[22,207,208],{},"Summarize all 3 attempts",": what was tried, what evidence was gathered, why each failed",[46,211,212,215],{},[22,213,214],{},"Re-anchor"," — re-read the original bug report and all Phase 1-2 evidence from scratch. Fresh eyes after reset.",[46,217,218,221,222],{},[22,219,220],{},"Question the architecture",":\n",[43,223,224,227,230,233],{},[46,225,226],{},"Is the root cause actually in this layer, or is it a design flaw one level up?",[46,228,229],{},"Are we fighting the framework\u002Flibrary instead of working with it?",[46,231,232],{},"Is there a simpler approach that sidesteps the problem entirely?",[46,234,235],{},"Should this component be restructured rather than patched?",[46,237,238,221,241],{},[22,239,240],{},"Present options to the user",[43,242,243,246,249],{},[46,244,245],{},"Option A: Redesign the affected component (describe the approach)",[46,247,248],{},"Option B: Work around with explicit trade-offs (describe them)",[46,250,251],{},"Option C: Escalate to a human domain expert",[46,253,254,257],{},[22,255,256],{},"Do NOT attempt a 4th fix"," without user approval of a fundamentally different approach",[14,259,260],{},"A circuit breaker is not failure — it prevents wasted time and regression-inducing guesses. The best debuggers know when to stop patching and start rethinking.",[14,262,263,265],{},[22,264,108],{},": Confirmed root cause with evidence. Single, specific fix identified.",[38,267,269],{"id":268},"phase-3-implement-fix","Phase 3: Implement Fix",[14,271,272],{},"With root cause confirmed and fix identified:",[82,274,275,302,305],{},[46,276,277,278,281,282],{},"Follow ",[27,279,280],{},"\u002Fsuperpowers:test-driven-development"," — RED-GREEN-REFACTOR:\n",[43,283,284,290,296],{},[46,285,286,289],{},[22,287,288],{},"RED",": Create a failing test that reproduces the bug",[46,291,292,295],{},[22,293,294],{},"GREEN",": Implement the single fix addressing root cause",[46,297,298,301],{},[22,299,300],{},"REFACTOR",": Clean up only what the fix touched",[46,303,304],{},"Run the full test suite to check for regressions",[46,306,307,308,311],{},"Type-check the changes (Swift: build, TS: ",[27,309,310],{},"tsc --noEmit",", etc.)",[14,313,314,172],{},[22,315,316],{},"Constraints",[43,318,319,322,325],{},[46,320,321],{},"Fix only the root cause. Do not refactor surrounding code",[46,323,324],{},"Do not add \"while I'm here\" improvements",[46,326,327],{},"Keep the diff minimal and focused",[38,329,331],{"id":330},"phase-4-verify-review","Phase 4: Verify & Review",[14,333,334],{},"After implementation, verify with evidence then review:",[82,336,337,351,366,369],{},[46,338,86,339,342,343],{},[27,340,341],{},"\u002Fsuperpowers:verification-before-completion"," — NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE\n",[43,344,345,348],{},[46,346,347],{},"Run tests, type-check, build — capture actual output",[46,349,350],{},"No hedging language (\"should work\", \"probably fixed\")",[46,352,353,354,357,358],{},"Then invoke ",[27,355,356],{},"\u002Faio-code-review"," to launch parallel review agents\n",[43,359,360,363],{},[46,361,362],{},"Security, quality, architecture checks via OMC agents",[46,364,365],{},"Critic meta-review with confidence scoring",[46,367,368],{},"If reviewers find critical issues, loop back to Phase 3",[46,370,371],{},"If reviewers find minor issues, fix them inline",[14,373,374,376],{},[22,375,108],{},": All verification passes with fresh evidence. All critical review findings addressed.",[38,378,380],{"id":379},"completion-summary","Completion Summary",[14,382,383],{},"After all phases complete, provide:",[43,385,386,392,398,404,410],{},[46,387,388,391],{},[22,389,390],{},"Root cause",": What caused the bug (one sentence)",[46,393,394,397],{},[22,395,396],{},"Fix",": What was changed and why (one sentence)",[46,399,400,403],{},[22,401,402],{},"Files modified",": List of changed files",[46,405,406,409],{},[22,407,408],{},"Verification",": Test results, type-check results",[46,411,412,415],{},[22,413,414],{},"Review status",": Clean or with noted minor items",[38,417,419],{"id":418},"when-to-abbreviate","When to Abbreviate",[14,421,422],{},"Not every bug needs all four phases at full depth:",[424,425,426,439],"table",{},[427,428,429],"thead",{},[430,431,432,436],"tr",{},[433,434,435],"th",{},"Bug complexity",[433,437,438],{},"Phases to use",[440,441,442,451,459,467],"tbody",{},[430,443,444,448],{},[445,446,447],"td",{},"Typo \u002F obvious one-liner",[445,449,450],{},"Phase 2 (quick) + Phase 3",[430,452,453,456],{},[445,454,455],{},"Logic error in single file",[445,457,458],{},"Phase 2 + Phase 3 + Phase 4",[430,460,461,464],{},[445,462,463],{},"Cross-file \u002F architectural",[445,465,466],{},"All four phases, full depth",[430,468,469,472],{},[445,470,471],{},"Intermittent \u002F race condition",[445,473,474],{},"All four phases, extra Phase 2 depth",[14,476,477],{},"Even for simple bugs, always investigate before fixing (Phase 2 minimum).",[38,479,481],{"id":480},"anti-patterns","Anti-Patterns",[43,483,484,490,496,502,508],{},[46,485,486,489],{},[22,487,488],{},"Skipping to Phase 3"," without understanding root cause",[46,491,492,495],{},[22,493,494],{},"Fixing symptoms"," instead of root cause",[46,497,498,501],{},[22,499,500],{},"Multiple unrelated changes"," in the fix",[46,503,504,507],{},[22,505,506],{},"Skipping review"," for \"obvious\" fixes (obvious fixes have non-obvious side effects)",[46,509,510,513],{},[22,511,512],{},"Not reproducing"," the bug before attempting to fix it",[38,515,517],{"id":516},"additional-resources","Additional Resources",[185,519,521],{"id":520},"reference-files","Reference Files",[14,523,524],{},"For detailed guidance on each phase, consult:",[43,526,527],{},[46,528,529,534],{},[22,530,531],{},[27,532,533],{},"references\u002Forchestration-details.md"," - Detailed phase transitions, decision points, and edge cases",{"title":73,"searchDepth":536,"depth":536,"links":537},2,[538,539,540,541,545,546,547,548,549,550],{"id":40,"depth":536,"text":41},{"id":62,"depth":536,"text":63},{"id":76,"depth":536,"text":77},{"id":112,"depth":536,"text":113,"children":542},[543],{"id":187,"depth":544,"text":188},3,{"id":268,"depth":536,"text":269},{"id":330,"depth":536,"text":331},{"id":379,"depth":536,"text":380},{"id":418,"depth":536,"text":419},{"id":480,"depth":536,"text":481},{"id":516,"depth":536,"text":517,"children":551},[552],{"id":520,"depth":544,"text":521},"Debug broken code — orchestrates codebase context gathering, root cause investigation, minimal fix, and code review validation via debugger agent.","skill","md",{},true,"\u002Fplugins\u002Faio-planning\u002Faio-debug",{"title":5,"description":553},"plugins\u002Faio-planning\u002Faio-debug","qAt7Mrt5xNjTGR4Z5gNZMSBwUsMjhBXMfQH0L_Ytm_A",[],1779712313576]