Code RoomAgent ignores codebase conventions
HardPrep Room Coding #4029

Agent ignores codebase conventions

Vibe & agenticAlgorithms & data structuresSenior–Staff~18 min

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.

Implement
prorate_upgrade_cents(old_plan_cents: int, new_plan_cents: int, days_elapsed: int, days_in_cycle: int) → int
Examples
in[1000,3000,0,30]out2000
in[1000,3000,15,30]out1000
in[3000,1000,15,30]out-1000
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.