Code Room
Vibe codingHardvc-g063
Subject Ai context orchestrationLevel Senior–Staff~18 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You've joined a team owning a 400k-line Ruby on Rails monolith and you need an AI agent to add a new billing-proration feature. The agent's first attempt invents a PricingService that doesn't exist, duplicates logic already in app/services/billing, and ignores the team's convention of routing all money math through a Money value object. Describe how you'd give the agent the right CONTEXT so it succeeds, and what specifically went wrong on attempt one.

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.

Describe your solution

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.

Run or narrate your approach, then ask the coach.