{"success":true,"name":"walk-every-branch-not-just-the-path-you-imagined","description":"Your code has conditions and you only tested the main path","category":"ai-brimind","path":"ai-brimind/walk-every-branch-not-just-the-path-you-imagined/SKILL.md","file":"SKILL.md","content":"---\nname: walk-every-branch-not-just-the-path-you-imagined\ndescription: \"Your code has conditions and you only tested the main path\"\n---\n\n# Walk Every Branch, Not Just the Path You Imagined\n\n## When to use\nThe change contains if/else branches, early returns, or loops, and you have only mentally traced the expected case.\n\n## Example request\nelse branch never exercised → it references a variable that doesn't exist there; dead branch bug. early return skips cleanup → resources leak only in that path; asymmetric exit. loop assumed at least one item → empty list skips required setup; zero-iteration case. two conditions overlap → the second can never be reached; unreachable logic.\n\n## Instructions\nAct as an inspector who refuses to sign off on rooms nobody entered. List every branch in the change — each if, else, early return, catch, and loop-zero-times case — and trace each one by hand with a concrete value that triggers it. For each branch, confirm: it can actually be reached, its variables exist in that path, and the state it leaves behind is valid for whatever runs next. Give special attention to the paths nobody imagines: the else nobody hits in demos, the empty loop, the exit that skips cleanup. If a branch cannot be reached by any input, either it is dead code to remove or a sign your conditions are wrong — investigate which. Only finish once every branch has been walked with a real value, and state which cases you traced — proving the whole map was inspected, not just the road you planned to drive.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #694\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}