Question
You need a SQL query (Postgres) plus a thin wrapper that answers 'which feature flags is this user entitled to?', combining their plan tier, explicit per-user overrides, and org-level grants, with overrides taking precedence. You'll ask an AI agent to write the query. Draft the prompt/spec — constraints, edge cases, acceptance criteria — so it's correct first try. What does a vague prompt ("query the user's enabled features") get wrong in SQL specifically?
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.
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.