Every agent, in every tool, runs the same four beats. Learn them once and you can read any
tool’s output, including tools that do not exist yet.

The four beats

Read. It gathers what it needs. Opens files, searches the project, looks at the folder
structure.

Plan. It decides what to do, usually stating it. “I will add a trim() before the
comparison on line 14.”

Act. It changes something. Edits a file, creates a file, runs a command.

Check. It looks at the result. Runs the tests. Reads the error. Loads the page.

Then it goes back to the start, using what it just learned.

A real example

Your task: “The login test is failing. Fix it.”

Read   →  opens tests/login.test.ts, opens src/login.ts
Plan   →  "The test expects spaces to be removed from the password. The code does not."
Act    →  edits src/login.ts to trim the password
Check  →  runs npm test
          → the login test passes, but two other tests now fail
Read   →  opens those two tests
Plan   →  "Those tests expect the password NOT to be trimmed. My change was too broad."
Act    →  trims only the username, not the password
Check  →  runs npm test → all pass

Look at what happened at the third beat from the end. It made a mistake, saw it, and
corrected it, without you.

That is the whole promise of agents. Not that they are right the first time. That they can
find out that they are wrong.

A cycle of four steps: read, plan, act, check, then back to read.
Read, plan, act, check. Check is the beat that makes an agent better than a chat window.

The beat that does all the work

Check is the important one.

An agent that cannot check its own work is just a chat window that types faster. It makes a
change, believes it is correct, and stops.

An agent that can run your tests will keep going until they pass.

So here is a rule that shapes the rest of this course:

How good an agent’s work is depends mostly on how well it can check its work.

If you give it a project with good tests, it becomes noticeably better at its job. Not
because the model changed. Because the loop now closes.

Module 5 is built entirely on this sentence.

Reading the loop while it runs

Once you know the four beats, you can watch a session and spot trouble early.

Warning sign 1: it acts without reading. Straight to editing, no files opened. It is
guessing.

Warning sign 2: it never checks. Makes changes, says “done”, never runs anything. You
have no evidence.

Warning sign 3: the same loop three times. Read, act, check, fail, read, act, check,
fail. It is stuck and trying small variations of a wrong idea. Stop it and give it more
information.

Warning sign 4: the plan grew. You asked for one thing and the plan has six parts. Stop
it now, not after it writes all six.

You will practise all four of these in Module 4.

Try this before the next lesson

  1. Think of a bug you fixed recently. Write your own work as the four beats.
  2. Which beat do you personally skip most often when coding by hand?
  3. In your project, how would an agent check whether a change worked? If you cannot answer,
    you have found the most valuable thing to build in Module 5.