Your first reviewed change
Time to fix the bug. The “recent orders” endpoint in orders-service returns the list oldest-first when the UI wants newest-first. You can describe it precisely, you can verify the fix by eye, and it touches almost nothing — which makes it the ideal first thing to hand an agent on a repo you don’t yet trust. The change matters less than the loop you’re about to run, because that loop is the spine of everything that follows.
Describe the bug, don’t prescribe the fix
Section titled “Describe the bug, don’t prescribe the fix”Open the Chat view and tell Copilot what’s wrong in terms of behavior, not implementation:
The recent-orders endpoint returns orders oldest-first, but they should come back newest-first. Find where that list is built and fix the ordering.
Notice what that prompt does and doesn’t do. It describes the symptom (“oldest-first, should be newest-first”) and points at roughly where to look (“where that list is built”), but it doesn’t tell Copilot how — it doesn’t name the file, the sort call, or the comparator. On code you don’t know well, that’s deliberate: you’re letting Copilot do the part it’s genuinely better at than you right now — finding the relevant code in an unfamiliar repo — while you stay the judge of whether its answer is right.
Copilot reads the project, locates the endpoint, and comes back with a proposed change: usually a one-line fix to a sort, plus an explanation of what it found and why that’s the cause.
Read the diff before you accept it
Section titled “Read the diff before you accept it”This is the habit. Copilot presents its change as a reviewable diff, not a fait accompli — and the entire discipline of working with an agent is that you read that diff before you accept it. For a one-line sort fix this feels almost ceremonial. Do it anyway, because the muscle you’re building here is the one that protects you when the changes are forty lines across six files and you’re tempted to skim.
Three things to check, every time, and they scale all the way up:
- Did it change what you asked — and only that? A one-line ordering fix should be a one-line diff. If Copilot also “helpfully” reformatted the file or renamed a variable, that’s scope creep you want to catch now, not in code review.
- Is the fix actually correct? Read the sort direction. Does newest-first mean descending by a timestamp here, or is “recent” defined some other way in this codebase? You’re verifying its reasoning, not just trusting that it ran.
- Does it match how this repo does things? If the surrounding code sorts one way and Copilot’s fix introduces a different idiom, that’s a smell — and a preview of why the Rules chapter exists, where you’ll teach Copilot the conventions so its first draft already fits.
If it’s right, accept it. If something’s off, you don’t start over — you say so in the same conversation (“keep the existing sort helper, just reverse the direction”) and Copilot revises. That back-and-forth is the tool working as intended.
Verify, then commit
Section titled “Verify, then commit”Accepting the diff changes the files on disk; it doesn’t make the fix true. Run the endpoint, or its test, and confirm the list now comes back newest-first against output you can read. Then commit it yourself.
That last part is worth stating plainly: in this surface, you stage and commit. Copilot proposed and edited; the decision to make the change permanent is a human keystroke. Later in the course you’ll meet surfaces where Copilot opens a pull request on its own — but even there it lands as a draft you review, never a direct push to your main branch. The shape is the same at every scale: Copilot proposes, you decide.
What you just learned
Section titled “What you just learned”The bug was trivial. The loop wasn’t:
- Describe behavior, let Copilot find the code — especially valuable on a repo you’ve inherited.
- Read the diff before accepting — the one habit that scales from a one-liner to a sprawling change.
- Verify against real output, then commit yourself — the agent proposes; you decide.
That loop doesn’t change for the rest of the course. What does change is how much latitude you give Copilot to run it — and that latitude has a name. It’s called the mode, and choosing the right one for what’s in front of you is Copilot’s signature skill. Next chapter: the modes.