Custom framework invariants
You're the team's expert on your company's custom event-sourcing framework — it has unusual rules about idempotency keys and event ordering that aren't documented publicly. You ask an agent to add a new projection, and it writes confident, fluent code that follows mainstream event-sourcing conventions but violates two of your framework's invariants. The code compiles and passes the agent's tests. How do you handle working with AI in a domain where it will be confidently wrong, and how do you keep this from shipping?
apply_events_with_invariants(seqs: list[int], keys: list[str]) → list[str][[1,2,3],["a","b","c"]]out["applied","applied","applied"][[1,2,3],["a","b","a"]]out["applied","applied","duplicate"][[5,3,6],["a","b","c"]]out["applied","out_of_order","applied"]Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.