AI Learning Hub › Learn AI › Self-Paced Courses › VS Code: Files, Changes, and AI Agents › Inspect a Change You Did Not Make
Capstone
Inspect a Change You Did Not Make
Open a small project, find the two files that changed, read the diff line by line, notice the change nobody asked for, check the result in a browser, and decide what belongs in the commit.
What this asks of you
- Identify the folder and the files that changed
- Read a diff you did not write, line by line
- Find a change that was not requested
- Check the result independently of the diff
- Revert one block without discarding the file
- Commit only what you decided to keep
Everything in this course has been building to one task: look at a change somebody else made and work out what it actually did.
Set aside about sixteen minutes and do not skip ahead to the answer key. The exercise only works if you find the second change yourself.
Before you start
Download the practice project from the course landing page if you have not already, and unzip it. If you worked through the modules, start from a clean copy — unzip it fresh — so that no earlier edit confuses the picture.
You will also need the project to be a Git repository, so that VS Code can tell you what changed. Open the folder in VS Code, open the terminal, and run these three commands. They set a name and address for this project only and do not touch any Git configuration you may already have.
Set up the practice project
git init git -c user.name="Course Demo" -c user.email="demo@example.invalid" add -A git -c user.name="Course Demo" -c user.email="demo@example.invalid" commit -m "Add the event page"
Those record the project as it is now, which gives the diff something to compare against. Nothing is sent anywhere; there is no remote and no account involved.
Step 1 — Know what you are looking at
Before any change exists, answer three questions. Write the answers down.
- Which folder is open, and where is it on your computer? Use
pwdin the terminal and compare it with the Explorer. - What files are in the project? Include the ones inside folders.
- Open
index.htmlin a browser. What does the page say — the event, the date, the room, the schedule?
This step feels skippable and is not. You cannot notice that something changed if you never looked at it unchanged.
Step 2 — Get a change you did not write
Someone needs to correct the room number on the event page from 180 to 290. Take whichever route you have.
- With an AI coding agent
- Ask it to make that one change and nothing else. Any agent will do — this course does not care which. Do not read the file afterwards.
- Without one
- Copy
after-the-change/index.htmloverindex.html. The project ships with that file so the capstone works without any AI product. Do not open it first.
Either way, the rule is the same: do not read the changed file. The point is to find out what changed by reading the diff, which is the thing you will actually have to do in real work.
Step 3 — Which files changed?
Open View: Show Source Control from the Command Palette.
How many files are listed? What letter does each one carry, and what does that letter mean? Write it down before going further.
Step 4 — Read the diff
Open the diff for the changed file. Then, slowly, write one line for each change you can see:
- Which lines were removed?
- Which lines were added?
- For any line that appears in both forms, what exactly differs inside it?
Take the time. There is more than one change in there, and the second one is quiet.
Step 5 — Check the result
Open index.html in a browser and look at the page.
Is the room number right? Does anything look broken, misaligned or missing? Answer honestly before reading on.
Step 6 — The question this course is about
You now have two pieces of evidence that do not say the same thing: a diff listing the changes, and a page that looks fine.
So: is every change in that diff one that was asked for?
Answer key — open only after you have written your own list
One file changed, index.html, marked M for modified.
The diff contains two changes, not one.
The first is the one that was requested. The line reading Thursday, November 12 · Room 180 was removed and a line reading Thursday, November 12 · Room 290 was added. VS Code highlights the digits inside the line, so you can see the rest of the sentence is untouched. This change is correct.
The second was not requested. The paragraph beginning An evening of fictional oral argument used to end with its closing </p> tag on the same line. In the new version that tag sits on a line of its own. No words were added or deleted — a tag moved.
The page looks completely correct, because in HTML a closing tag on its own line renders exactly the same. Step 5 could not have revealed this. Only the diff could.
That is the whole lesson: the result being right does not establish that the change was right.
Step 7 — Decide, then act
Having found both changes, decide what to do with the one nobody asked for. There is a defensible case either way — it is harmless, and it is also not what you asked for — and this course is not going to tell you which to pick. What it will tell you is to make the decision deliberately rather than by not noticing.
For the exercise, revert it. Use Revert Change on that block in the diff, which undoes one block and leaves the room-number change in place.
Use Revert Change, not Discard Changes. Discard would throw away every edit to the file, including the room number you wanted to keep. That difference is the whole of Module 7.
Step 8 — Review again, then commit
- Look at the diff once more. It should now show one change.
- Open the page in the browser again and confirm the room number is still 290.
- Stage the file and watch it move into Staged Changes.
- Commit with a message describing what you kept — Correct the room number.
- Check the Source Control view. The Changes group should be empty and the asterisk gone from the branch name.
What you just did
You opened a project and knew what was in it. You took a change you did not write and found out what it contained without being told. You noticed something the finished result gave no sign of. You checked the output separately from the change. You undid one part without destroying the rest, and you committed a reviewed change with a message that described it.
That is a complete review, and the fact that it took a few minutes on a tiny page is the point. The same seven steps work on a project you did not write, with an agent whose summary you cannot check any other way.
Where to go next. GitHub Without the Jargon teaches the Git model this course has only shown you the surface of — branches, history, and working with other people. Agents Without the Hype covers what agents are and how they pursue goals. Codex Without the Code goes further into directing one.