Code RoomAuthoritative versus speculative code
MediumPrep Room Coding #5006

Authoritative versus speculative code

Vibe & agenticAlgorithms & data structuresMid–Senior~18 min

You're building a multiplayer game feature in C++ and plan to use an AI agent for parts of it: the client-side animation interpolation, the server-authoritative hit-detection, and the boilerplate for serializing network messages. A junior asks why you'd delegate some of these but insist on owning others when 'it's all just code.' Lay out which parts you'd hand to the agent and which you'd keep, and the principle behind the split.

Implement
decide_agent_delegation(tasks: list[str], blast_radius: list[int], verifiability: list[int]) → list[str]
Examples
in[["serialize_messages","interpolate_animation","hit_detection"],[1,2,5],[5,4,2]]out["serialize_messages:delegate","interpolate_animation:delegate","hit_detection:own"]
in[["read_config","rollback_ledger"],[1,5],[5,5]]out["read_config:delegate","rollback_ledger:own"]
What a strong answer looks like

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.

0:00 of about 18 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.