By this point your AI assistant already understands your app's structure — you gave it that context in Get your AI assistant to understand code you didn't write, and the overall four-step flow for adding a feature is covered in Extending your app with AI. What's still worth getting right is the second of those four steps: the actual prompt. A vague ask and a well-formed one can produce wildly different code from the exact same AI assistant — and the difference isn't luck, it's a repeatable pattern.

The problem with a vague prompt

"Add a way for users to export their data" is a real request, but it's not a usable prompt. It leaves the AI to guess at a dozen decisions you actually have opinions about: export as CSV or PDF? A button on which screen? All the data, or a filtered view? Which fields? The AI won't ask — it will guess, confidently, and you'll spend the next round of prompting correcting guesses instead of reviewing a feature.

A prompt that actually works: four ingredients

A prompt that reliably produces usable code on the first try tends to include four things, in this order:

  1. The context. Point the AI at your source of truth — your schema, your README, or just "using the existing API structure" if you've already oriented it in an earlier message. This anchors the feature in your real app instead of a generic one.
  2. The exact feature, described concretely enough that two different people would build the same thing from it. Not "an export feature" — "a button on the Orders page that downloads the current filtered list as a CSV, with columns for order ID, customer name, date, and total."
  3. The constraint that matters most. Usually this is "using the existing [pattern/component/API]," which keeps the AI extending your app instead of inventing a parallel way of doing something you already have a way of doing.
  4. What "done" looks like. A sentence like "it should appear next to the existing filter controls and match the current button styling" heads off a technically-working feature that looks bolted on.

Put together: "Based on my schema, add a button on the Orders page that exports the currently filtered list as a CSV — columns for order ID, customer, date, and total. Use the existing API structure to fetch the data, and match the current button styling so it sits naturally next to the filter controls." That's one sentence longer than the vague version, and it's the difference between a feature you approve and one you spend twenty minutes fixing.

Keep changes small and reviewable

Resist the urge to ask for three features in one prompt, even when you're excited and they're related. One feature, one prompt, one review. It's not slower — it's actually faster, because when something's slightly off, you know immediately which change caused it instead of untangling three at once. This is the same logic behind deploying an untouched template before customizing it, covered in Your first hour with a template: isolate variables, and problems become obvious instead of mysterious.

When the AI gets it wrong

It will happen, and it's not a sign to start over. Tell it specifically what's wrong rather than just "that's not right" — "the export should only include the filtered rows, not the entire table" is something the AI can act on immediately. Vague correction produces another vague guess; specific correction produces a fix.

Key Takeaways

  • A vague prompt gets a confident guess, not a question. The AI won't ask what you meant — it'll pick an interpretation and build it.
  • Good prompts have four parts: the context (schema/README), the exact feature, the constraint to follow existing patterns, and what "done" looks like.
  • One feature per prompt. Bundling several makes it much harder to tell which change caused a problem.
  • Correct with specifics, not vibes. "That's wrong" gets another guess; "it should only export the filtered rows" gets a fix.
  • This builds on context you've already set up — if your AI assistant hasn't been oriented to your app yet, start with Get your AI assistant to understand code you didn't write.