Run the pharmacy desk for a week
Pharmacy emails and patient orders arrive throughout the day. Your app reads the emails with AI, works out what's true about each pharmacy at every moment, and decides where every order goes, safely.
How it runs
We give you a simulator. It replays a week against your app as webhooks, and it plays the pharmacies' order API. You build everything in the blue boxes.
Watch a morning at the desk
An illustration with the pharmacies from week A, but made-up events. It's not the week you'll get: it shows the mechanics, not the tricky parts. Those are yours to find.
One event at a time: reply when you're done
The simulator only sends the next event after you reply. Your reply is the signal that you've finished. That's how a whole week replays in a minute or two, in the right order, however long your AI call takes.
Do this finish, save, then reply
Not this reply first, work later
Business goals, in priority order
Goals, not an algorithm. When two of them conflict, decide what's right and explain it in your README.
What to build
There's more here than fits in two hours, on purpose. We'd rather see a core that's right in every case than many features done halfway.
Core about 1.5 hours
When the core works, commit with the message core done.
Bonuses pick, don't spread
Get started in two minutes
Set up any TypeScript server with one POST endpoint, then point the simulator at it. --ping sends just three events to check your wiring.
Full contract: sim/README.md in the repo. Keep state in memory between requests, and use the event's occurred_at as "now", never the computer's clock.
How we evaluate
We replay a week you haven't seen
The same kinds of emails and orders, different details. Three times, because AI answers vary.
One unsafe order outweighs everything
An order sent where it can't be filled is the worst outcome.
Ops, MANUAL, speed, cost
Did you follow instructions, use MANUAL only when needed, and ship fast and cheap?
The README matters
What you chose not to do and why, the conflicts you resolved, and where you overrode the AI.