Code Room
Vibe codingMediumvc-g142
Subject Ai context engineeringLevel Mid–Senior~17 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

Your team is about to have an agent add a new endpoint to a large Node/TypeScript service that has strong but undocumented conventions: a specific way to register routes, a shared validation layer, a typed error envelope, and structured logging with required correlation-id fields. Left to itself the agent will produce a working-but-off endpoint that doesn't match any of these. What's the minimum, highest-leverage context you'd assemble so its FIRST attempt fits the codebase — and why is pointing it at one good example often worth more than a long list of rules?

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.