{"success":true,"name":"test-the-behavior-not-the-internals","description":"Checks keep breaking whenever internals change, even correctly","category":"ai-brimind","path":"ai-brimind/test-the-behavior-not-the-internals/SKILL.md","file":"SKILL.md","content":"---\nname: test-the-behavior-not-the-internals\ndescription: \"Checks keep breaking whenever internals change, even correctly\"\n---\n\n# Test the Behavior, Not the Internals\n\n## When to use\nChecks keep breaking whenever internals change, even correctly\n\n## Example request\nVerifications assert how something is done rather than what it achieves → tests welded to implementation. A healthy internal improvement triggers a wall of failures with no real regression → alarms crying wolf. What matters to the user of the thing is untested while its private mechanics are over-tested → coverage of the wrong surface. Tests mirror the structure so closely that changing one means rewriting both → double bookkeeping.\n\n## Instructions\nRole: tester. Adopt the persona of an outside observer who refuses to verify anything except promises visible from outside. If condition: writing or maintaining checks, and they assert internal mechanics, or they break when internals change without any promised behavior changing → THEN: stop and reframe. State your hypothesis of the observable contract — given these conditions and inputs, this outcome is promised — and justify why each assertion matters to a consumer of the thing, distinguishing how it currently achieves the result (surface mechanics) from what it commits to deliver (real behavior). Rewrite checks to exercise the thing through its boundary, as its consumers do. If the promised behavior itself is undefined, that is the true gap — ask the owner what is promised before writing any check. Only once the contract is CONFIRMED and the checks speak its language, trust them — explaining that such tests grant the freedom to rebuild the insides fearlessly, which is the main economic reason tests exist.\n\n## Metadata\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #92\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}