ykononov.com bb + agents / hands-on course Glossary FAQ RU

ykononov.com / Vibe coding from scratch: bb, Claude Code, Codex, and OpenCode / Module 08

Git, second-agent code review, and AGENTS.md for vibe coding

Module 08 of 11 · 20 min · updated 2026-11-28

The habits that separate a prototype that works by luck from something you can actually use.

In short

Commit after every step that works, so you always have a point to roll back to. Look at how many files the agent changed and which ones. Have important changes reviewed in a new thread by an agent from a different company. Write the project’s rules in AGENTS.md, which every new thread reads.

Git as a save point in a game

You’ve already asked the agent to “make a commit” several times. Now let’s look at what’s behind that, in just enough detail that you know what you’re doing.

There are three git concepts you need.

You do all of this in plain language. Here’s a working set of phrases:

You sayWhat happens
Make a commitThe current state is saved to the history
What’s changed since the last commit?The agent lists the unsaved changes
Roll everything back to the last commitThe unsaved changes are thrown away
Show me the last ten commitsYou get the history with its messages, so you can pick a point to go back to
Take the project back to the commit “…”The project goes back more than one step

In bb, you can see the same things without asking. The thread’s right panel shows the branch, the list of commits, and the changed files with the number of lines added and removed. After a commit, a Committed line appears in the thread itself. If you’re signed in to your account, bb writes the commit messages for you.

When to commitThe rule is simple: if it works, save it. After every stage you approve, after every change that turned out well, before every experiment. There’s no such thing as too many commits. There is such a thing as one big commit for a whole evening’s work, and it’s useless as a point to roll back to.
What about GitHub?Git keeps the history in the project folder on your computer. GitHub is a website you can upload that history to, as a backup and for working with other people. You don’t need it for this course. When you do need it, ask the agent: “Help me put this project in a private repository on GitHub,” and it will walk you through it.

See what changed

You don’t have to read code. But there’s a tool that lets you keep the agent in check without reading it: the diff, a list of changes.

Until changes are saved in a commit, a line such as Uncommitted · 1 file sits above the prompt box. It shows how many files were touched, followed by the number of lines added and removed. For a brand-new file that git isn’t tracking yet, it says Untracked instead. The same information is in the right panel, in the Uncommitted files block.

The “Dark theme” thread in bb with unsaved changes: an Uncommitted line above the prompt box and the Uncommitted files block in the right panel
The agent has changed index.html and hasn’t committed the change yet. On the right: the branch, the git status, the earlier commit, and the Uncommitted files block.

To see the changes themselves, switch the right panel to the Diff tab, the second icon at the top of the panel. Added lines are highlighted in green, removed lines in red. Once you’ve looked through a file, you can check Viewed so you don’t lose track when there are many files.

The Diff tab in the bb right panel: the index.html file with its count of added lines and a Viewed checkbox
The Diff tab. Each changed file gets its own block with the number of lines added and removed and a Viewed checkbox. A new file is all green; when an existing file is edited, you’ll see red lines too.

Even without understanding a single line, you can use the diff to answer four questions.

If something bothers you, select it and ask. A good question:

Explain the changes since the last commit for someone who doesn't read code: which files you changed, what you did in each one, and why. Then, separately, list anything that isn't directly related to my last request.

That last sentence matters. While they’re at it, agents tend to “improve” nearby code that nobody asked them to touch. Sometimes that’s useful. More often it’s a source of breakage that surfaces a week later.

A second opinion: one writes, another reviews

This is why the course title lists several agents. Authors are bad at seeing their own mistakes. That’s true of people and just as true of models. Ask the agent that wrote the code to “check your own work” and it will usually tell you everything is fine. A model from a different company, which didn’t write that code, has no such attachment to it.

  1. Make sure the latest work is saved in a commit.
  2. Create a new thread in the same project.
  3. In the prompt box, pick a different agent: if Claude Code wrote the code, choose Codex or opencode, and vice versa. Keep the same environment, Project checkout.
  4. Send this:
    You're the reviewer here. Don't change any files, just read them.
    
    Read SPEC.md and the project's code. Find:
    1) places where the app doesn't do what the spec says;
    2) situations where it could break or lose my data;
    3) anything extra that isn't in the spec.
    
    Give me your answer as a list, most serious first. Explain each item in plain language: what could happen to the user and how to reproduce it. No more than ten items.
  5. Read the list. Here’s what it looks like for our tracker:
    The “Review by Codex” thread in bb: a numbered list of problems found, each with an explanation and a link to the file
    Codex reviewed the code Claude Code wrote and found several problems, each with an explanation of what the user would run into and a link to the relevant place in the file. Notice the icons in the sidebar: every thread has its own agent.
    Some of the items will be nitpicks. That’s normal; reviewers like to err on the side of caution. Pick out what really matters.
  6. Go back to the author’s thread and pass the findings on: “A second agent found some problems. Here’s the list. Fix items 1, 2, and 4, and leave the rest alone.” Or have the reviewer make the fixes itself.

Notice how this works: two threads, two different agents, one folder. The reviewer sees the same files as the author because both are working in the same environment. There’s no need to copy code between them.

When to do thisNot after every change, or the work will grind to a halt. Sensible moments: the whole first version is ready; you’ve built something that involves storing data; you’re about to show the app to other people. Reviewing a small project takes three to five minutes and a little of your second subscription’s usage limit. A free plan is usually enough.
What a review doesn’t replaceTwo agents are better than one, but both are models, and they can make the same mistakes. For a personal tool, this level of checking is enough. For anything where other people’s money, access, or personal data is at stake, you need a person who understands the code.

AGENTS.md: the project’s rules

By now you’ve probably noticed that every new thread starts from a blank slate. The agent doesn’t remember that yesterday you agreed to keep the wording in the interface short and friendly, to leave the data file alone, and to start the app with a particular command. Explaining all this every time is tedious and unreliable.

The answer is a file called AGENTS.md in the project’s root folder. Agents read it automatically at the start of every conversation. Think of it as the job description for anyone who comes to work on your project.

Create an AGENTS.md file in the project root: a short set of instructions for the AI agents that will work here. Include:
- what this app is, in two sentences, with a link to SPEC.md;
- how to start the app and how to check that it works;
- how the project's folders are organized, briefly;
- rules: answer me in plain language, no jargon; do only what I asked for and don't "improve" nearby code; suggest a commit after every finished task; don't add new libraries without asking me.

Keep the file short, no more than a page. Then make sure Claude Code reads these rules too: create a CLAUDE.md that points to AGENTS.md.

The last line is a technical detail worth knowing about: Codex and OpenCode read AGENTS.md, while Claude Code has historically looked for a file called CLAUDE.md. To avoid keeping two sets of rules, one file simply points to the other.

From here the file grows on its own. Whenever you catch yourself explaining the same thing to the agent a second time, don’t explain it a third:

Add this rule to AGENTS.md so I don't have to repeat it.
Don’t turn the rules into a novelThe agent will read a ten-page file, but it will follow it less faithfully: the important parts drown in the unimportant ones. A page is a good size. Every couple of weeks, ask the agent: “Reread AGENTS.md and remove anything outdated or repeated.”
Before you move on
  • I’ve opened the list of changes and seen which files the agent changed
  • I’ve rolled changes back at least once, even if only as an experiment
  • A second agent reviewed the project in a separate thread, and I went through its findings
  • The project has an AGENTS.md, and the start command is written in it

Review questions

When should you make a commit?

After every successful step and before every experiment. A commit is a point you can return to. The more often you make them, the less work you lose when you roll back. One big commit for a whole evening’s work is almost useless.

You asked for a different button color, and the list of changes shows twelve files. What does that mean?

It’s a reason to ask the agent why so many changes were needed. The diff lets you keep the agent in check without reading code: the number and kind of files touched should match the size of the request. Agents tend to “improve” extra things along the way.

Why is it better to have a different agent do the review instead of the code’s author?

Authors miss their own mistakes; another company’s model looks with fresh eyes. Asked to “check your own work,” the author usually says everything is fine. An independent model has no attachment to the decisions already made.

What is the AGENTS.md file for?

It holds the project’s rules, which the agent reads at the start of every new conversation. A new thread starts from a blank slate. A rules file saves you from explaining every time how to start the project and what not to touch.

This page covers a single module. The interactive version of the course has steps, quizzes, and checklists that save your progress.

Open this module in the course →
← 07. Building the first version 09. Several agents at once →

By Yury Kononov, Chief Technology Officer. The course is free and licensed under CC BY 4.0. Updated 2026-11-28. Contact the author: @ykononov.