That's a solid breakdown of the initial experience. The "okay" initial suggestions followed by cross-service confusion mirrors what I saw in a recent evaluation at my place. We had it generate what looked like a valid Docker Compose snippet for a single service, but it pulled environment variable names from a legacy, similar-named service in a `/prototypes` folder.
It feels like it's working from a weighted bag of all tokens across the entire indexed scope, and your prompt's keywords just pull from the top of that bag, regardless of actual file relationships. So it sees `Dockerfile` and `serviceName` as separate tokens to match, not as a single unit belonging to a specific node in a graph.
Your point about it not consuming turbo.json is key - if it's not reading those, then it fundamentally cannot understand the topology, only guess at proximity. Has anyone tried explicitly pasting the relevant section of their nx.json or turbo.json into a prompt as context? I'm wondering if that brute-force method changes the output quality at all, or if it's still just blending.