Skip to content

Building with agents, lesson 6.1

What makes a repo agent-ready

Some repos let an agent finish a job alone. Others make it stop, guess or say "done" too early. This lesson names the five things that make the difference.

What do you run?

Every example below changes to fit what you pick. The businesses are made up for teaching.

The picture, one step at a time

Each box is one stage. The picture lights up as you scroll.

Step 1 of 6

Ready means it can finish without you

An agent-ready repo is one where an agent can pick up a job, do it and prove it is done, without asking you at every step. A repo is the folder of code and its history. Most of what an agent needs from it is what a new hire needs: written down, and runnable.

Factory, which makes coding agents, publishes a readiness model with nine areas, from linters and tests to security (as of November 2026). The five here are a shorter version of the same idea.

Step 2 of 6

It can find its way

Agents read code fast. They find the layout and the habits of a repo on their own. What they cannot find is what was never written down: a decision made in a meeting, a deploy process in one person's head, a folder that looks dead but is not. That goes in the instruction file from lesson 5.1.

Step 3 of 6

It can set up

If the agent cannot run the project, it cannot test anything. One command should install it. A sample settings file should name every setting the app needs, with no real secrets in it. The same versions should work on every machine.

Step 4 of 6

It can check its work

This matters most. The agent needs something that answers pass or fail: tests, a type check, a linter. Each should be one command, and there should be a quick way to run a single test file. Then for a change to delivery costs, it can change the code, run the check, read what broke and fix it.

Anthropic's docs put it plainly: with nothing to run, "looks done" is all an agent has to go on, and "in practice that makes you the test suite" (as of November 2026).

Your repo has no tests. The agent says the change is done. What do you know?

Step 5 of 6

It can see what happened

When something fails, the message should say what and where. "Something went wrong" makes an agent guess, just as it would a person. Clear errors, and logs it can read on its own copy of the app, turn a guess into a fix.

Step 6 of 6

It cannot do damage

Last, the limits. The live branch needs a person's approval before anything merges. Secrets stay outside the repo. The never-rules are hooks, from lesson 5.2. With these in place you can let the agent work alone, because the worst it can do is propose something you turn down.

The agent can merge its own changes into the live branch. Which fix is strongest?

What is missing?

Here are four problems in your repo. Sort each one into the thing the agent is missing.

  1. 1The checkout tests only run on one person's laptop, because they need a file nobody else has.

  2. 2Nothing tells the agent the old discounts folder is still used by the sale page.

  3. 3There are no tests for delivery costs, so the agent can only say the change "looks right".

  4. 4The live payment key is written in a settings file inside the repo.

0 of 4 right so far, 4 to go.

A readiness checklist

This is what you keep: the five things on one card, each as a check you can run against your own repo.

A readiness checklist

  1. Find its way: a short instruction file with the commands, the traps and the decisions the code doesn't show.
  2. Set up: one command installs it, and a sample settings file names every setting the app needs, with no real secrets.
  3. Check its work: tests, a type check and a linter, each one command, and a quick way to run a single test file.
  4. See what happened: errors and logs that say what failed and where.
  5. Stay safe: the live branch needs a person's approval, secrets live outside the repo, and hooks block the never-rules.

If a new hire would have to ask someone, so will the agent. Write it down, or make it runnable.

Next: Lesson 6.2: Scoring a repo for readiness. Turn this checklist into a score you can run on any repo, and watch it improve.