Live

Your first change: it writes, you review

Now we let it write. This is the most important part of the workshop: it's not that the agent creates a file, it's how you review what it proposes before accepting it.

1. First, have it propose (Plan mode)

Stay in Plan mode and ask it for a plan before touching anything:

I want a summary.md file with September spending by category, sorted from highest to lowest, the month's total, and whether I met the goal in @notes.md. Before you do it, tell me how you'll handle categories that only differ in capitalization.

Read its plan. If it says it will merge food with Food and transport with Transport, you're on track. If not, tell it yourself:

Treat categories as case-insensitive: food and Food are the same.

Asking for a plan first is a good habit: fixing an idea costs less than fixing a file.

2. Now, have it do it (Build mode)

Press Tab until it says Build and type:

Go ahead, create summary.md as we agreed.

Since we set "edit": "ask" in opencode.json, the agent stops and asks your permission before writing. It shows you what it wants to do, with what it adds in green.

3. Review before accepting

Before accepting, look at three things:

  1. Is it the file you asked for? Name and location: summary.md, in this folder.
  2. Does a number add up? Compare with the table from the previous lesson. Food should come to 192.65 and the total to 385.15.
  3. Is the conclusion right? The goal was to spend less than 350. With 385.15 it was not met, by 35.15.

If everything is fine, accept. If something is wrong, reject it and tell it what to fix. Rejecting is just as valid as accepting: the file isn't written and you keep talking.

4. A second change, on a file that already exists

Creating a new file is easy to review. Modifying an existing one is where reviewing really matters:

Fix expenses.csv so all categories are lowercase. Don't change anything else.

When it asks your permission, look at the change carefully: exactly two lines should change (the one with Food and the one with Transport). If you see it touched other lines, reordered rows, or changed an amount, reject it.

"Don't change anything else" is one of the most useful things you can say to an agent.

5. If you accepted something you didn't want

  • If you ran git init during preparation, type /undo: it undoes the last message and its changes to the files.
  • If not, ask it: "Undo the last change to expenses.csv". And check that it left it the way it was.

The lesson from this job

  • Ask for a plan before a change that matters to you.
  • Review before accepting: the right file, a number that adds up, nothing beyond what you asked for.
  • Rejecting is fine. It's part of the work, not a failure.

Summary

  • You used Plan to agree on the change and Build to make it.
  • The agent asked your permission before writing, and you reviewed before accepting.
  • You modified an existing file and checked that only what you asked for changed.