Lock In Lab Intern, rank 1 of 9

INT-3specThird of 3 Intern tickets

Write the spec before you ask for code

Takes
25 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.

The product owner wants a tip splitter: total, tip percentage, number of people, amount each. Instead of typing that into the agent and hoping, you write a short spec first and make the agent plan against it.

A ten-line spec saves more time than any prompt trick. It also gives you something to check the result against.

You'll need Any agent, git. Prices checked this month are on Tools.

Write SPEC.md yourself

Step 1 of 3, about 10 min

In a new folder, write SPEC.md by hand. Keep it short:

# Tip splitter
Does: total, tip %, people -> amount each, rounded up to the cent.
Doesn't: currencies, saving history, accounts.
Examples:
- 100, 10%, 4 -> 27.50
- 45.20, 15%, 3 -> 17.33
- 0, 10%, 2 -> 0.00
Edge: people = 0 shows an error, not Infinity.

Work out the examples yourself with a calculator. That's the point: you decide what right looks like.

The part of a video worth watching for this step

YouTube, Tina Huang. Published May 2025.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.

Ask for a plan, not code

Step 2 of 3, about 5 min

Read the plan. If it adds things the spec says it doesn't do (accounts, a database), tell it to drop them. Claude Code also has a plan mode (Shift+Tab) that stops it editing until you agree.

Paste this to your agent
Read SPEC.md. Don't write code yet. Give me a short plan: files you'll create, and how you'll check each example.

The part of a video worth watching for this step

YouTube, Claude. 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.

the usual mistake

Saying yes to a plan you didn't read. The plan is the cheapest place to catch a wrong idea. It happened to us in INC-15, "The cause we found by elimination was wrong".

Build it and test the examples

Step 3 of 3, about 10 min

Try the three examples and the edge case yourself in the browser. Commit when they match. If one doesn't, paste the example and the wrong result back, nothing else.

Paste this to your agent
Go ahead with the plan. When you're done, tell me how to check the three examples.

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.

Check and ship

The whole ticket
In the browser, enter each example from SPEC.md.
100, 10, 4   ->  27.50
45.20, 15, 3 ->  17.33
people = 0   ->  an error message

It passes when All match. Then git log --oneline shows the spec committed before or with the code.

  • A SPEC.md with what it does, what it doesn't do, and three example inputs with expected outputs.
  • The agent produced a plan before any code, and you approved it.
  • The three examples from the spec give the expected results in the finished page.

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: JR-1 Put it on a public URL

What do you see?

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