Lock In Lab Intern, rank 1 of 9

SE-2choreSecond of 3 Tech Lead tickets

One agent builds, another tries to break it

Takes
30 min in 3 steps
Checked
19 Nov 2026
min

Your estimate is optional. Your review compares it with how long it took; nothing is scored.

An agent that writes the tests for its own code tests what it already thought of. Our support bot answered "I smell gas" correctly and "I smell gas and feel dizzy" wrong, with forty green tests written by the same agent that built it. A second agent with a different brief, writing cases from the spec without reading the code, found it on its first run.

You'll need Claude Code subagents (.claude/agents/), or two separate sessions in any agent. A project with a SPEC.md. Prices checked this month are on Tools.

Write the breaker

Step 1 of 3, about 10 min

Create .claude/agents/breaker.md:

---
name: breaker
description: Writes adversarial test cases from SPEC.md. Never reads src/.
tools: Read, Write
---
Read SPEC.md and nothing in src/. Write cases to tests/adversarial/.
Combine conditions the spec mentions separately.
Each case: input, expected output, and which spec line it comes from.

In other agents, start a fresh session and paste the same brief.

The part of a video worth watching for this step

YouTube, AI Engineer. Published Nov 2026.Checked 19 Nov 2026

Optional. The step counts when you've done it, whether or not you watch. Minutes from the creator's chapters; our notes on this video.

Let it loose

Step 2 of 3, about 10 min

Check it didn't open src/. If it did, tighten its tools or the brief.

Paste this to your agent
Use the breaker subagent to write adversarial cases for this project.

The part of a video worth watching for this step

YouTube, AI Engineer. Published Nov 2026.Checked 19 Nov 2026

Optional. The step counts when you've done it, whether or not you watch. Minutes from the creator's chapters; our notes on this video.

the usual mistake

Asking the builder to 'also write some edge cases'. Same head, same blind spots. It happened to us in INC-01, "The bot that graded its own homework".

Run the cases yourself

Step 3 of 3, about 10 min

Run them with your normal test command, not by asking an agent whether they pass. Count failures. Fix the real bugs; for cases you think are wrong, write down why in the test file instead of deleting them.

The part of a video worth watching for this step

YouTube, John Kim. Published Sep 2026.Checked 19 Nov 2026

Optional. The step counts when you've done it, whether or not you watch. Minutes from the creator's chapters; our notes on this video.

Check and ship

The whole ticket
Run:
npm test -- tests/adversarial

It passes when The cases run outside the agent. You can state how many failed before your fixes and how many after.

  • A breaker agent whose instructions forbid reading the source code.
  • It writes test cases from the spec, combining conditions the spec lists separately.
  • The cases are run outside the agent, by your test command, and you report how many failed.

No server checks your work in this version: you mark it, and your review says "Checked by you". Graded checks are planned for Plus.

Next: SE-3 Two agents, two worktrees, no collisions

What do you see?

Pick the closest one. Each goes to what to try first and the incident it looks like.