AI with AIlabs
← All guides
2 min read

I shipped three batches in a day, then found the bug in my own build plan

The Lead Magnet Maker went live, and its generated PRD had a hole I almost shipped.


Build LogClaude CodeNext.jsVercelPRD

Learn · Nov 17, 2026

I shipped the Lead Magnet Maker in three batches yesterday. Themes first, then templates, then a build plan you can download.

Three production deploys, one after another, all green. That part was the easy part.

Then I read the build plan the tool generates, and I found the bug. It wasn't in my code. It was in the instructions my code hands to another AI.

Bring in the new looks and the runtime

Batch one came from my updated prototype, a single HTML file I keep in the repo. I didn't redesign anything. I ported it. Six new looks replaced the old four: Sticker Pop, Boop Poster, Night Studio, Pixel Pilot, Glass Blue and Aurora Glass. The runtime that draws them came along too. The rule I held myself to was simple. The prototype is the source of truth. If the app and the prototype disagree, the app is wrong.

Add seven templates, each with hard limits

Batch two added seven templates: Best-Fit Matcher, Space Planner, Daily Trainer, Bill Cutter, Automation System, Streak Tracker and Sprint Board. Each one got a schema. Numbers are bounded. Counts are fixed. Nobody gets to type a thousand rows into a quiz and break the preview. Each one also got defaults, an editor, and field tagging for edit mode, so you can click a thing in the preview and change that exact thing. I also extended the skill check, the short set of questions that shapes what the tool builds for you. It's boring work. It's also the work that keeps a tool from falling over the first time a stranger uses it.

Turn the config into a downloadable build plan

Batch three put a PRD on the Share screen. It's the "expand it into a real product" step. The tool takes your config and your skill-check answers and writes a Markdown build plan. Fourteen sections. Eight build steps. It also gives you the Claude Code prompt to start building from it. This is the part I care about most. A lead magnet gets someone to try an idea. The plan is how they leave with something real.

Ship in small batches so each one is easy to undo

I didn't push all of this at once. Each batch got its own commit and its own production deploy. That's on purpose. If themes had broken something, I'd know it was themes. If the templates had, I'd know it was the templates. Every deploy finished building in under a minute, and none of them failed. Small batches also change how you review. You can hold one batch in your head. You can't hold a whole day.

Read the plan like an attacker would

Here's the thing about generated instructions. Nobody reads them as code, so nobody reviews them as code. I did. I read the plan the way someone hostile would read it. And I stopped at one line. The plan told Claude Code to build a result page for each person at /r/[id]. That's a normal thing to ask for. But it never said what the id should be. When a plan leaves a gap like that, the builder fills it with the easiest option. The easiest option is a counter. One, two, three.

What broke: The generated PRD told Claude Code to build result pages at /r/[id]. It never said how the ids get made. So whoever followed the plan could easily pick a plain sequential id. With that, anyone can type the next number and read someone else's result. The tool itself wasn't leaking anything. I checked. The instructions it wrote would have taught another app to leak.

The fix: I rewrote the plan so it can't be misread. Step 3 of the plan now requires an unguessable id, 128 bits of randomness. I also hardened the plan against agent-instruction injection, so text a user types into the tool can't quietly become an order to the AI that reads the plan later. That went out as the last deploy of the day. I've learned this one before, in a different costume: when your product writes instructions for an AI, those instructions are part of your attack surface.

Audit a PRD before an AI builds from it
Review the PRD below as if you're an attacker who will follow it literally.

For every place it tells a builder to create a public URL, an id, a token, or a stored record:
1. Say how the id is generated. If the PRD doesn't say, flag it as unspecified.
2. Say whether someone could guess or count their way to another person's data.
3. Suggest the one-line fix to add to the PRD (for example: require an unguessable id with at least 128 bits of randomness).

Then list every place user-typed text gets copied into the PRD or into a prompt. For each one, say whether that text could be read as an instruction instead of data, and how to mark it as plain data.

Don't rewrite the PRD. Give me a numbered list of findings, most serious first.

PRD:
[paste it here]

Get new guides and builds in your inbox

No noise. New artifacts, skills, and lessons when they drop — and early access when agents launch.

next_steps.exe

Want a full structured path instead of one-off guides?

That's Learn AI with AI — a sequenced course that takes you from zero to building real things, with community and accountability built in.

Check out Learn AI with AI →