Prompt·Architecture and hidden complexity·A06

Code that relies on lucky timing

Finds code that only works because things usually happen in the right order.

Markdown
Prompt
Identify asynchronous operations whose correctness depends on events happening in a particular order without an explicit guarantee. Trace the scheduling, retries, cancellation, and conflicting writes; reproduce the highest-risk cases and propose the smallest enforceable contract.
What it returns
The assumed order, what can reorder it (retry, webhook, slow network), and a reproduction for the worst case.
Skip it when
Scripts that do one step at a time with nothing running side by side.
Changes
Adds a test that shows it
Sessions
Look first, then fix in a new session
Tools
Repository; a way to run the code locally to reproduce the problem.
Also called
Implicit ordering contracts

Skills it uses

Related prompts

More in Architecture and hidden complexity.