Question
You're mentoring your team on agent workflows. A senior engineer is stuck: they've asked an agent three times to fix a flaky integration test in a Node.js service, and each round the agent makes a different plausible change — adds a timeout, then a retry, then a sleep — and the test still flakes intermittently. As the staff engineer, coach them: how do you diagnose why the agent is spinning, how do you re-steer it productively, and what's the principle for when to stop prompting and take over?
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.