Module 04 · 9 min
Ask well: questions, changes and follow-ups
How to talk to Albert: questions that change nothing, requests that say what done looks like, follow-ups, sessions and attachments.
By the end of this module you can
- Tell a question from a change, and decide for Albert when you want to
- Write a request that names the place and says what done looks like
- Use follow-ups, sessions and attachments the way they are meant
You talk to Albert the same way in the terminal, the browser and VS Code: ask a question, or say what you want changed.
Questions change nothing
Ask anything about the repository. Albert reads the code to answer, and changes nothing:
› What does this project do, and where are the tests?
› Where is the session cookie set, and how long does it last?
› Why would /api/orders return 403 for an admin?Good questions name what you are looking at: a file, a function, an endpoint or an error message. Paste the error itself rather than describing it.
A change says what done looks like
Say what you want, and how you will know it is done:
› The /login endpoint returns 500 when the password is empty. Make it return 400 with
"Password is required", and add a test.The guide's rules for good requests:
- Say what done looks like. "Return 400 with a message", "the existing tests still pass", "add a test that fails before the fix".
- Name the place when you know it. A file, a function, an endpoint or a page.
- One change at a time. Two unrelated changes are two requests. Each gets its own plan, diff and evidence.
- Paste the evidence. The full error, the failing test's output, a screenshot.
- Let the plan be your review. If the plan is wrong, say what to change before you approve it. That is cheaper than reviewing a wrong diff.
Albert tells a question from a change by your words. To decide for it, start your message with /plan for a governed change or /do for a direct one. The next module covers what each mode does.
Follow-ups and sessions
Keep talking in the same session to build on what was just done. A follow-up to a change starts a new task that continues the previous one. Albert is told what the previous task changed and why, so you don't repeat yourself.
A session is one conversation. Nothing said in one session reaches another, and each session has its own run: start or open another session while one is working, and the first carries on.
Each step appears as it happens: what Albert read, searched, ran and changed. The lamp before each session's title tells you whether its run is working, waiting for you or stopped with an error (Chat).
Attachments
| Where | How |
|---|---|
| Browser | Paste, drag onto the page, or use the paperclip button |
| VS Code | Paste, drop onto the panel, or use the attach button |
| Terminal | /attach <paths> attaches files, and globs work. /attach alone lists what is waiting, and /attach clear drops it |
Files up to 500 MB are accepted. What you attach goes with your next message only.
Practise
Read the session lamps
Each session in the list has a lamp before its title. Match what the lamp does to what it means.
One good conversation
Try these in any session, in the terminal, the browser or VS Code. They work the same way in each.
- 1
Ask a question that names what you are looking at. Albert reads the code to answer, and changes nothing:
Why would /api/orders return 403 for an admin? - 2
Ask for a change, and say how you will know it is done. The guide's example:
The /login endpoint returns 500 when the password is empty. Make it return 400 with "Password is required", and add a test. - 3
Once that change is done, follow up in the same session. Albert is told what the previous task changed and why:
Now add the same validation to /register. - 4
In the terminal, attach evidence to your next message, check what is waiting with
/attach, then drop it:/attach clear - 5
Start a new session and ask about the earlier change: nothing said in one session reaches another.
/new
Check your understanding
6 questions. Answer 5 correctly to complete the module. Checked here, in your browser.