Back to Ghost in the Repo

Checked,
not trusted.

For developers who use AI every day
Checked, Not Trusted cover

An assistant can write the change. Only you can say it is right.

One method for checking code you did not write, whether an assistant, an agent or a colleague wrote it. Say what you want before you ask, write your own tests first, read the change instead of the files, prove every test can fail, and match the checking to the risk. Every chapter ends with a lab you can run in minutes.

PDF, 91 pages. Free with Google sign-in.ZIP of short scripts that build each lab’s repository, with an agent’s change waiting on a branch. Needs Git and Node 20 or newer.

From a green build
to a real verdict.

Five habits and one question: what would I see if this were wrong?

  1. Before you read it.

    Say what you want with examples, write your own tests from the request, and give an agent a job small enough to check.

  2. Read the change.

    Map it, read what it removed, treat every changed test as a changed requirement, and run it with realistic data. A short read to start: how to review AI-generated code.

  3. Trust the tests.

    Break every new test once, run mutation testing on thin suites, and catch flaky tests and false greens. Two short reads: AI-generated unit tests and mutation testing.

What’s inside.

Each chapter ends with a lab, a short exercise on paper and an entry in your check log.

  1. Green is not proof

    Why passing tests invite trust, and the one question that turns trusting into checking.

  2. Say what you want before you ask

    A short request with examples and edges, written before any code exists.

  3. Your tests first

    Tests from the request, aimed at the wrong answers you can imagine.

  4. Give the agent a small, fenced job

    Size a job by what you can check, write its fence, and prove it stayed inside.

  5. Map the change

    Every file, what kind of change, and whether anybody asked for it, before you read a line.

  6. A changed test is a changed requirement

    Find every weakened, skipped or deleted test, and decide who may change a requirement.

  7. Where AI code goes wrong

    Invented packages and slopsquatting, the versions you support, failure paths, security, data and fit.

  8. Run it on purpose

    A run sheet, realistic data, and every dependency broken once.

  9. Ask another model, carefully

    What a reviewing model is good for, what it cannot know, and how it fools you.

  10. Prove every test can fail

    Break each behaviour, watch its test go red, and repair the tests that never do.

  11. Mutation testing in an afternoon

    Run Stryker or mutmut on one module and read the survivors, not the score.

  12. Flaky tests and false greens

    Timing, order, the clock and retries, and the checks that catch them before merging.

  13. Match the checking to the risk

    Set the level in a minute, and write a verdict another person could check.

  14. Taking it to your team

    Four shared answers, a one-hour session, a pull request template and five numbers.