brainax

How to brief the AI

Lesson 4 of 26 in the course “Vibe coding”. Free, with animations and a quiz.

Describe the result

Not “make a website” but exactly what: who it's for, which sections, which buttons, how it looks on a phone. Example: “A one-page site for a coffee shop: menu, address, an order button in Telegram, dark theme, works well on a phone.” The AI doesn't know your plans and will fill the gaps however it can. The more precise the brief, the less rework.

Small steps

A feature is one piece of what the project does, like a menu or a contact form. Ask for one feature at a time: first the skeleton, meaning the empty layout of the page, then the menu, then the form. Test, save, move on. Ask for everything at once and the AI gets confused, and you won't know what broke. A small step is easy to test and undo.

Save, roll back, deploy

Save means locking in a working version so you can return to it. Many AI tools have a version history for this; programmers use Git, a program that stores versions of code. Roll back means returning to the last working version if a new step broke things. Deploy means putting the project online so others can open it by a link. Do it last, once everything is tested.

Hand over the whole error

If something doesn't work, find the error text. It's often in red in the browser console: on a computer press F12 and open the Console tab. Copy the whole error and say what you did right before. With “it doesn't work” the AI can only guess. With an exact error like “Cannot read properties of undefined” it often finds the cause right away.

Check yourself

  1. Which brief for the AI is better?
    Correct answer: “A photographer's site: gallery, prices, a Telegram button, works on a phone”. Concrete sections and requirements save hours of rework. The AI will read “beautiful” and “like everyone's” its own way.
  2. How should you build a project?
    Correct answer: One feature at a time, testing each. Small steps are easy to test and undo. If something breaks, you know right away which step did it.
  3. The code shows an error. What do you send the AI?
    Correct answer: The full error text and what you did. The exact error plus your steps is the fastest way to a fix. With “broken” the AI can only guess.

← What a website is made of Plan first: a one-page spec →