guest@pkucia.com:~$ cat articles/prompts-dont-scale.md

Prompts don't scale. Specs do.

Piotr Kucia · 2026-10-22 · 5 min read

How to make AI coding agents a reliable part of the SDLC: hand them a one-page spec instead of a chat, and put human checkpoints where they're cheap.

Give an agent the same prompt twice and you get two different features. Ask a teammate what the agent was told to build and they'll have to scroll through forty messages to find out. Ask a reviewer whether the 2,000-line result is correct, and the honest answer is "it compiles and the tests pass".

That's fine for a weekend experiment. It isn't fine once agents write a real share of the code a team ships.

The shift: from conversation to document

Two flows side by side. Prompt-driven: a prompt, then rounds of chat corrections, then a 2,000-line diff and a review that ends in LGTM. Spec-driven: spec, plan, tasks, small diffs, each with a human checkpoint, ending in done-when criteria passing.

On the left, intent lives in a chat history. It's spread across corrections ("no, not like that"), it's invisible to anyone who wasn't in the chat, and the only thing left to review is the final diff.

On the right, intent lives in a document. Every step produces something small enough for a human to check, before the expensive work happens:

StepWhat a human checksCost
SpecAre we building the right thing?~10 min read
PlanIs this a sane way to build it?~10 min, yes/no
TasksIs each piece small enough for one PR?a skim
DiffsDoes each change trace to a task?per PR, small
Done whenDo the agreed checks pass?automated

The agent does the same amount of work. The human effort moves to the start, where a mistake costs a paragraph instead of a rewrite.

What a spec is (and isn't)

A spec is one page about the what and the why. It isn't a design document and it isn't the implementation written in English. A minimal one:

# Spec: CSV export for the orders list

## Why
Support exports orders by hand every week for finance (~1 h).
Finance needs a file, not a screenshot.

## What
- An "Export CSV" button on the orders list, respecting the current filters.
- Columns: order id, date, customer, total, status.

## Out of scope
- Excel format, scheduled exports, exporting other lists.

## Constraints
- Max 50k rows; larger exports show an error, not a timeout.
- Only users with the `orders:read` permission.

## Done when
- [ ] Exporting a filtered list of 3 orders gives a CSV with exactly those 3 rows.
- [ ] 50,001 rows → a clear error message.
- [ ] A user without `orders:read` doesn't see the button (test).

Three sections do most of the work:

Why it scales

A spec is reviewable. A teammate reads one page in ten minutes and says "that's not what finance asked for". Nobody does that with a chat transcript, and almost nobody does it properly with a 2,000-line diff.

A spec is repeatable. The same spec works tomorrow, with a different agent, a newer model or a human. A chat only made sense to the person who had it. When the output is wrong, you fix the spec and run it again; you don't argue with the agent for another forty messages.

A spec has a finish line. "Done when" criteria are what turn agent output from "probably fine" into "verified". They also become the acceptance tests, so the spec keeps checking the code long after the PR is merged.

Where it goes wrong

Try it this week

  1. Pick one small, real change: a day of work, not a quarter.
  2. Write the one-page spec above before opening the agent. Time-box it to 30 minutes.
  3. Ask someone to review just the spec. Note what they catch.
  4. Give the agent the spec and ask for a plan first. Approve or reject it before any code gets written.
  5. Afterwards, compare with your last chat-driven change: how many corrections, how big the diff, how confident the reviewer felt.

If step 3 catches even one misunderstanding, the spec has already paid for itself.

What a spec doesn't fix

Specs fix the input. They don't answer the harder question: when an agent opens a big PR, who actually reads it? Reading every line doesn't scale, and clicking "Approve" isn't review. The next article is about replacing eyeballs with evidence: acceptance tests, quality gates, canaries and A/B checks behind feature flags.

Until then: are you giving your agents specs, or prompts? I'm happy to compare notes on LinkedIn.