Code RoomShared utilities conflicts across agents
HardPrep Room Coding #4648

Shared utilities conflicts across agents

Vibe & agenticAlgorithms & data structuresSenior–Staff~22 min

Your team runs a shared TypeScript monorepo. Three teammates each kicked off AI agents this morning to add unrelated features, and all three agents independently 'helpfully' touched shared utilities — one renamed a helper, one changed a function's signature, one added a dependency. Now you have three PRs that each work alone but conflict and break each other. How do you prevent this pattern going forward when everyone's using agents on the same repo?

Implement
find_contended_shared_files(branch_file_lines: list[str], shared_prefix: str) → list[str]
Examples
in[["feat-search|packages/common/format.ts","feat-billing|packages/common/format.ts","feat-auth|apps/web/login.ts"],"packages/common/"]out["packages/common/format.ts"]
in[["feat-search|packages/common/dates.ts","feat-search|packages/common/dates.ts","feat-search|packages/common/http.ts"],"packages/common/"]out[]
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 22 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.