@startuml BSOD Decision Workflow ' Decision flowchart for BSOD triage and repair ' Source of truth — all scripts follow this flow ' Scripts: src/skill/bsod-diagnostics/bin/ title BSOD Decision Workflow start :User reports BSOD or system instability; == 1. PREREQUISITES == :Run **storage-cleanup.ps1** Free disk space (need 30GB+ for upgrade); note right: Rule 3: free space BEFORE any repair if (Free > 30GB?) then (yes) else (no) :Clean temp, WU cache, rotate dumps Check Windows\Installer (PatchCleaner) DISM /StartComponentCleanup /ResetBase; if (Free > 30GB now?) then (yes) else (no) #pink:STOP — cannot safely proceed Move data to external drive; stop endif endif == 2. QUICK TRIAGE == fork :Run **bsod-triage.ps1**; fork again :Run **norton-check.ps1**; fork again :Run **driver-check.ps1**; end fork == 3. ANALYZE == :Count bugcheck codes and patterns; if (Norton quarantined\nsystem files today?) then (yes) :Restore from Norton quarantine Add exclusions (**NortonExclusions**); stop else (no) endif switch (Bugcheck pattern?) case (0x10E, 0x116, 0x119\nGPU/VRAM codes) :GPU driver is primary suspect; -> GPU path; case (0x50, 0x1A, 0x0A\nMemory codes) :RAM or driver suspect; -> Memory path; case (0x139\nKernel security) :Code bug or memory corruption Run **windbg-analyze.ps1** (bg); -> WinDbg path; case (0x14F, 0x9F\nPower codes) :Power management issue; -> Driver path; case (Multiple different codes\n3+ distinct bugchecks) :Hardware likely (RAM/thermal) Also run **windbg-analyze.ps1** (bg); -> Hardware path; case (dwm.exe crash\nCan't login) :Boot Safe Mode Run **gpu-safe-mode.ps1 -Action disable**; -> GPU path; endswitch == 4. FIX ATTEMPT == partition "GPU path" { :Roll back GPU driver (Device Manager or **driver-check.ps1**); if (Rollback available?) then (yes) :Roll back via devmgmt.msc; else (no) :DDU clean install in Safe Mode Download previous stable driver; endif :Reboot and monitor; if (Crashes stopped?) then (yes) #lightgreen:RESOLVED — driver was the cause; stop else (no) endif } partition "WinDbg path" { :Check **windbg-analyze.ps1** output; if (Faulting module\nis system file?) then (yes) note right e.g. Wof.sys, Ntfs.sys Check if file corrupt: compare SHA256 with ISO copy end note -> System repair; else (driver .sys) :Update/rollback that specific driver; if (Crashes stopped?) then (yes) #lightgreen:RESOLVED; stop else (no) endif endif } partition "Memory path" { -> Hardware path; } partition "Driver path" { :Check recently installed drivers (**driver-check.ps1** — sorted by date); :Rollback suspect driver; if (Crashes stopped?) then (yes) #lightgreen:RESOLVED; stop else (no) endif } == 5. SYSTEM REPAIR (vendor tools only) == label System repair :Run **system-repair.ps1** (DISM /RestoreHealth then sfc /scannow); note right Monitor with **dism-monitor.ps1** Rule 2: vendor tools only end note if (DISM succeeded?) then (yes) :Run sfc /scannow; :Reboot and monitor; if (Crashes stopped?) then (yes) #lightgreen:RESOLVED; stop else (no) endif else (no — 0x800f0915 or other failure) :Run **fod-fix.ps1** (diagnostic only) to understand what's blocking DISM; note right #pink Do NOT remove packages or manifests. Do NOT tamper with CBS/WinSxS. Rule 1 + Rule 2. end note endif == 6. IN-PLACE UPGRADE (correct escalation) == :Ensure ISO available (**download-win11-iso.ps1** if needed) ISO naming: Win11_{ver}_{date}.iso; :Run **inplace-repair.ps1** setup.exe from ISO — "Keep everything"; note right Monitor with **upgrade-monitor.ps1** ~30-60 min, 1-2 reboots Replaces ALL system files Fixes CBS component store end note :Wait for upgrade to complete; if (Upgrade succeeded?) then (yes) :Verify: run **bsod-triage.ps1** Check Wof.sys version updated Check no new crashes; if (Crashes stopped?) then (yes) #lightgreen:RESOLVED — system repaired; stop else (no) endif else (no) #pink:Upgrade failed — check C:\$WINDOWS.~BT\Sources\Panther\setuperr.log; stop endif == 7. HARDWARE TESTS == label Hardware path :Run **mdsched.exe** (basic, reboot); if (MemDiag found errors?) then (yes) #orange:RAM failure confirmed Replace faulty DIMM; stop else (no / passed) :Run **MemTest86** from USB 4+ passes overnight; if (MemTest86 found errors?) then (yes) #orange:RAM failure confirmed Replace faulty DIMM; stop else (no) :Monitor thermals with HWiNFO64 GPU throttle ~83C, CPU ~100C; if (Overheating?) then (yes) #orange:Thermal issue Clean fans / repaste; stop else (no) #pink:Unknown root cause Collect dumps for vendor support Consider clean Windows install; stop endif endif endif == 8. BUG REPORT (system file bugs) == if (Root cause is\nMicrosoft system file?) then (yes) :Prepare feedback folder (nanoLong-slug-feedback/) FEEDBACK-SUMMARY.md, dumps, logs, scripts; :Copy non-.txt files to .txt suffix (.md -> .md.txt, .ps1 -> .ps1.txt, .puml -> .puml.txt); :File on **Microsoft Q&A** https://learn.microsoft.com/answers/questions/ask Upload attachments via Edit page (Playwright MCP); note right Accepted: .xml .pdf .txt .log .jpeg .jpg .png .gif Max 3MB per file .dmp not accepted — reference by path Use Edit page, NOT comments (comments lose file links) end note #lightblue:Bug report filed — track for Microsoft response; stop else (no — third-party driver) :Report to driver vendor (NVIDIA, etc.); stop endif @enduml