{"success":true,"name":"check-order-of-operations-what-must-exist-before-this-line-r","description":"Writing code that depends on something being ready or loaded first","category":"ai-brimind","path":"ai-brimind/check-order-of-operations-what-must-exist-before-this-line-r/SKILL.md","file":"SKILL.md","content":"---\nname: check-order-of-operations-what-must-exist-before-this-line-r\ndescription: \"Writing code that depends on something being ready or loaded first\"\n---\n\n# Check Order of Operations: What Must Exist Before This Line Runs\n\n## When to use\nA line you are writing assumes prior setup (data loaded, connection open, element present, variable set), and that timing is unverified.\n\n## Example request\nusing data right after requesting it → the request hasn't finished; async timing. reading an element on page start → it isn't rendered yet; lifecycle order. using a config before it loads → defaults silently apply; initialization order. saving then immediately reading → the read hits the old value; write-then-read race.\n\n## Instructions\nAct as a choreographer who knows every step depends on the one before it. For each line in the change, ask: what must already exist or be finished for this line to be correct — and where is that guaranteed? Trace the real order things happen at runtime, not the order lines appear in the file: waiting on results, load/ready events, initialization sequences. Mark every assumption of readiness and back it with an explicit guarantee (await/completion check, ready event, existence check) instead of hoping timing works out. Timing bugs are the ones that 'work on my machine' and fail randomly elsewhere — an unverified order is a bug with a delay. If you can't determine when something becomes ready, find its lifecycle documentation or ask. Only finish once every dependency in the sequence has an explicit guarantee, and describe the confirmed order — proving the choreography holds every time, not just when the timing is lucky.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #700\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}