Apprentice Lv 1
Chapter 4 — Check It Without Reading Code
_ □ ×

Check It Without Reading Code

"Done" is a claim. Treat it like one.

Claude will tell you it's finished, and it will sound sure. Sometimes it's wrong. You don't need to read code to catch that. You need the same things you'd use to check anyone's work: numbers you worked out separately, an explanation you can follow, and a second opinion from someone who didn't do the work.

One Warning

When a check fails, Claude will sometimes “fix” it by deleting or weakening the check. Kent Beck, who has been writing tests for longer than most engineers have been working, has described the same fight. If you ever see a check disappear, ask why. It’s already in your CLAUDE.md as a thing never to do, and this is the reason.

Build it

  1. Ask for an explanation you can follow

    After any change, you can ask what happened. If you can’t follow the answer, that’s not your failing. Ask again.
    Paste this into Claude

    Explain what index.html does to work out the total open value, in plain English, as if to someone who has never coded. Then tell me which deals you counted and which you left out.

  2. Add checks you can see

    A check is a small test that compares the page’s numbers against numbers worked out separately. These show up as green and red rows, so you can read the result without reading code.
    Paste this into Claude

    Add a page called checks.html that tests the numbers in index.html and works by double-clicking the file, with nothing to install. Show one row per check, green for pass and red for fail, in plain English. Check the total open value, the open value for each owner, and that Won and Lost deals are left out. Work out the expected numbers from sample-pipeline.csv yourself, separately from the code in index.html. Then open or run what you can to confirm it works, and tell me honestly what you could and couldn't verify.

    Open checks.html. Every row should be green, with $331,000 for the total, $190,000 for Maya, $105,500 for Priya and $35,500 for Theo.

    Stuck?
    It says it couldn't run the checks.
    That’s an honest answer, so don’t be annoyed by it. Double-click checks.html yourself and tell it what you see. Give it a few seconds to fill in.
    It asks permission to run something I don't recognize.
    Decline, and ask what it would do and why. If it’s opening a browser to look at your page, that’s fine to approve.
    Everything is green, but I don't believe it.
    Good instinct. Say: “Change one number in index.html so a check should fail, show me it fail, then put it back.” A check that can’t fail isn’t checking anything.
  3. Break it on purpose

    Real spreadsheets are never this clean. Download messy-pipeline.csv into your folder. It has a dollar sign, a blank value, a duplicate row, “26k”, a negative number, a missing owner and a close date of “TBD”.
    Paste this into Claude

    Here's a new file, messy-pipeline.csv. Replace the data in index.html with it. Don't fix anything silently: list every row you had to guess about and what you assumed, and leave those rows flagged on the page. Then update checks.html so it still tells the truth.

    Read the list of guesses. In my test runs it landed on $196,000, and one of its guesses (is the repeated row one deal or two?) moves that number by $64,000. This is the skill: a tool that guesses quietly can give you a confident wrong number, and it’s the assumptions you need to see. When you’re done, ask Claude to put the clean sample data back.

    Stuck?
    It cleaned everything up and didn't tell me.
    Say: “Which rows did you change, and what did each one say before?” Then add a line to CLAUDE.md: “Never fix data silently.”
  4. Get a second opinion

    The session that built something is the worst one to review it, for the same reason you can’t proofread your own writing. Start a new session and ask for a skeptical look.
    Paste this into Claude

    You didn't build this. Review index.html and spec.md as a skeptic. Does the page do what the spec says? What would give a wrong number without anyone noticing? Don't change anything. Give me your top three concerns in plain English.

    Not every concern will matter. Decide which ones do, and ask for those to be fixed.

006
000

I did this

  • Got a plain-English explanation of how a number is worked out
  • Added a checks page and saw it go green
  • Saw a check fail on purpose
  • Fed it messy data and read the list of guesses
  • Had a fresh session review the work
0 of 5 complete