This week I wrote a six-part tutorial. I used an AI coding agent to help with the writing and to check the facts: for every claim, the agent fetched the official docs page, quoted it, and gave me the URL. It looked very solid.
Then I asked the agent to do one more thing: build a small test app and run every code sample on a real system.
It found four mistakes. One of them was a "fact" I had believed for six weeks.
What "checked against the docs" missed
The tutorial is about building apps on Atlassian Forge, but the lessons here aren't about Forge.
1. The setup command made the wrong folder. The tutorial said: run the create command, then cd into the app's folder. The real command names the folder after the app, and the tutorial never gave it a name. The first command a reader would type, and it was wrong.
2. A missing dependency. The starter template doesn't include the package the backend code imports. The docs are correct; they just don't say it, because they assume a different template. Copy, paste, error.
3. My own wrong belief. I've known for weeks that "a null returned by the backend arrives in the UI as {}" in one of the platform's two UI frameworks. I learned it from a real bug. The tutorial said it happens in that framework only.
The test app tried both. It happens in both.
I'd only ever seen it in one place, so I assumed it was specific to that place. When the agent checked my text, it confirmed my assumption, very neatly.
4. A summary that wasn't the docs. When the agent checked the versioning rules, one docs page was too long to read in full, so it summarised the rest. That summary said that turning on a certain feature counts as a major version. The real deploy said minor.
The docs may well be right in some case I didn't test. But that claim nearly went into my draft, and it came from a summary of a page: not from the page, and not from a run.
What I asked for
The test app ended up small and boring, which is the point:
- the tutorial's code, unchanged, installed on a real development site
- a panel with one button per claim in the tutorial ("what does
nulllook like on the other side?", "what does the old search endpoint return?"). Each button calls the real system and shows exactly what came back - unit tests for the pure functions (22 so far)
- a tiny script that compares every code block in the article with the tested file, so the article can't drift from what ran
That last one is twenty lines of Python. It strips comments, then checks that the snippet's lines appear in the source file in order. It flagged two snippets that didn't match the tested files line for line.
Building all of this took the agent about an hour. A year ago, I wouldn't have built a test harness for a blog post. Now the harness is the cheap part. The expensive part is me reading the results.
What I took from it
"Checked against the docs" and "ran it" are different claims. Docs describe the intended behaviour, for the setup the writer had in mind. A run tells you what happens in yours. I now write down which one each claim is.
An agent's summary of a page is a third, weaker thing. When a page is long, the agent reads part of it and summarises the rest. That's useful for finding things, but it isn't a source. If a claim matters, I want the quote, or the run.
The agent checks what you ask it to check. Mistake 3 was mine. I asked the agent to check my sentence against the docs, and the docs didn't contradict it. Neither of us asked "is this only in one place?" The test app asked, because it ran both.
Say what you didn't test. One part of the tutorial covers a migration I can't run, because I don't have that kind of app. That part now says, near the top, that it comes from the docs and wasn't tested. I'd rather lose a bit of authority than have someone trust a run that never happened.
Make the agent build the lab, not just write the answer. When I ask "is X true?", I get a confident paragraph. When I ask "build something that shows whether X is true", I get evidence, and sometimes a surprise.
I'm keeping the test app. Next time I write about anything I can run, the first thing I ask the agent for is the lab, before I start writing.
Do you test the code in your posts and docs before you publish? I'd like to know how other people do it, especially for docs that live longer than a blog post.
How I wrote this: I used an AI assistant to help write and edit this post and to check the facts against the docs. The tutorial, the test app and the four mistakes are real, from this week.
Top comments (0)