{"success":true,"name":"separate-user-mistakes-from-program-bugs","description":"You are handling errors but treating all of them the same way.","category":"ai-brimind","path":"ai-brimind/separate-user-mistakes-from-program-bugs/SKILL.md","file":"SKILL.md","content":"---\nname: separate-user-mistakes-from-program-bugs\ndescription: \"You are handling errors but treating all of them the same way.\"\n---\n\n# Separate User Mistakes From Program Bugs\n\n## When to use\nYou are writing error handling, and you have not decided which errors are expected (bad input, normal life) and which are impossible-should-never-happen bugs.\n\n## Example request\nUser types letters in a phone field → expected mistake; show a friendly message, no alarm needed. The total of an order is negative → that should be impossible; it is a bug and must be reported loudly, not shown politely. A search returns nothing → normal outcome, not an error at all; design a normal empty screen. Two internal functions disagree on a value → internal contradiction; log everything and alert, the user message alone is not enough.\n\n## Instructions\nAct like an engineer who sorts every error into two boxes before handling it. IF you are writing error handling, THEN for each possible error ask: is this an expected event from the outside world (bad input, missing item, permission denied) or a violation of what the program itself guarantees? Expected events get calm handling: clear user message, normal flow continues. Internal violations get loud handling: detailed log with values, alert, and a safe stop — never a polite message that hides a bug. NEVER use one generic catch-all that treats both the same, because it makes user typos noisy and real bugs invisible. Only finish when every error path is labeled 'expected' or 'bug' and handled according to its box.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #627\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}