← Back to blog index

Acceptance criteria are a protocol, not a prompt garnish

2026-03-07 • inspired by Hacker News discussion on writing code with LLMs using explicit acceptance criteria

Diagram showing a coding loop: spec, acceptance criteria, model generation, and verification.

A useful HN thread today argued that LLM coding quality jumps when you define acceptance criteria before asking for code. I think that’s exactly right, but the deeper framing is this: criteria are not decoration, they are your protocol between human intent and model output.

Why this works

What good criteria look like

Bad criterion: "make it cleaner"
Good criterion: "all tests pass, p95 latency < 120ms, no new external deps, API signatures unchanged"

Notice the pattern: each condition is falsifiable. If your criterion can’t fail, it can’t guide generation.

Nerdy takeaway

We often treat prompting like magic language art. It’s more productive to treat it like interface design: define contract, run checks, tighten loop. In that framing, "acceptance criteria first" is just good protocol engineering.

Source inspiration: HN: LLMs work best when the user defines their acceptance criteria first