{"success":true,"name":"log-the-actual-value-instead-of-trusting-your-memory","description":"Reasoning about what a variable 'should' contain without checking it","category":"ai-brimind","path":"ai-brimind/log-the-actual-value-instead-of-trusting-your-memory/SKILL.md","file":"SKILL.md","content":"---\nname: log-the-actual-value-instead-of-trusting-your-memory\ndescription: \"Reasoning about what a variable 'should' contain without checking it\"\n---\n\n# Log the Actual Value Instead of Trusting Your Memory\n\n## When to use\nYou are debugging or writing code based on what you believe a value is at some point, without having printed or inspected it there.\n\n## Example request\n'This variable is definitely the user object' → it was null the whole time; one print would have shown it in seconds. Debugging by re-reading code for an hour → the data didn't match the code's assumptions; look at the DATA, not just the code. Assuming a function returns what its name suggests → it returned something wrapped differently; verify at the boundary. The value is right at creation but wrong later → something changed it in between; print at both points to trap the culprit.\n\n## Instructions\nAdopt the mindset of an inspector who trusts what's in the box only after opening the box. Whenever your reasoning includes 'this value should be X here': (1) Don't argue with yourself — print it, log it, or inspect it at EXACTLY that point. Thirty seconds of printing beats an hour of confident wrong reasoning. (2) Look at the real output carefully: the type, the shape, whether it's empty, whether it's the whole thing or a wrapper around it — 'roughly what I expected' hides bugs. (3) If the value is wrong, walk backwards: print it one step earlier, and again, until you find the point where expectation and reality split — that's where the bug lives. (4) Remove or tidy the debug prints after, but keep any log that would help diagnose this area in production. Never build the next step of logic on an unverified belief about data. Conclude only from observed values, and explain the finding as 'at point A the value was actually B, which proves C.'\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #281\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}