Question
You're letting an AI agent work in a C++ networking codebase to add a new packet-parsing path. The codebase has a hard rule: the hot path must do zero heap allocation, and there's a region of legacy code that's fragile and must not be touched. How do you set up guardrails so the agent stays out of the no-go zone and respects the no-allocation invariant — given the agent can't 'see' these rules unless you make them visible?
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 coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.