UI & UX Design

Verified against ChatGPT · 2026-08-13

Write acceptance criteria that cover the edge cases a developer will otherwise guess at

Writes Given/When/Then acceptance criteria for a user story that explicitly cover boundary and error conditions, instead of only the one happy-path scenario most acceptance criteria stop at.

ChatGPT (GPT-5.1)3 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

Write acceptance criteria in Given/When/Then format for the story below. Most acceptance criteria stop at the one happy-path scenario and leave every boundary and error condition for the developer to guess at during implementation — I want those made explicit up front instead.

USER STORY
As a customer, I want to apply a discount code at checkout so I can get the promotional price before paying.

INPUT FIELDS OR USER ACTIONS INVOLVED
Discount code text field, max 20 characters, applied via an 'Apply' button.

SYSTEM STATE THAT COULD VARY
Code could be expired, already used by this account, valid but for a different product category, or valid and applicable.

First write the single happy-path scenario. Then, for every input field or user action listed, generate the boundary and error scenarios a developer would otherwise have to guess: an empty or missing value, a value at the edge of an allowed range, a value just past that edge, and a malformed or unexpected value if the field type allows one. For every item listed under system state that could vary, write a scenario for each meaningfully different state (e.g., if the feature depends on account status, write a scenario for each status that would produce different behavior, not just the default one). Do not invent scenarios for conditions that couldn't actually occur given the inputs described — a text field with a hard 50-character limit enforced by the input itself doesn't need a "value has one million characters" scenario if that's physically impossible to enter. For any edge case where the correct behavior genuinely isn't decided yet by the story as written, write the scenario with the Then clause marked "TBD — needs a decision" rather than inventing a plausible-sounding behavior that hasn't actually been agreed to, since a fabricated Then clause here would ship as an assumed requirement no one actually approved.

WHAT NOT TO DO
Do not write vague Then clauses like "the system handles it appropriately" — every Then must state the specific observable outcome. Do not pad the list with scenarios that are trivial restatements of each other differing only in cosmetic wording.

OUTPUT FORMAT
A numbered list of Given/When/Then scenarios, happy path first, then boundary/error scenarios grouped by which input or state condition they test. Mark any TBD scenarios clearly at the end in their own short list so they're easy to route back to whoever owns the decision.

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

Given/When/Then output without an explicit boundary-enumeration instruction tends to stop at the single happy-path scenario because that's the shortest complete-looking answer to "write acceptance criteria for this story," and GPT-5.1 has no built-in obligation to enumerate every input's edge cases unless the prompt makes that enumeration the actual deliverable rather than an optional nicety. Explicitly requiring a scenario for empty, boundary, past-boundary, and malformed values per listed input converts the task from narrating one scenario into systematically walking a checklist per field, which is what actually produces the missing-code, expired-code, and used-code scenarios that a bare "write acceptance criteria" request would likely skip in favor of just the successful-discount-applied case. The instruction against inventing scenarios for physically impossible conditions matters because an unconstrained edge-case generator will happily produce scenarios for inputs the actual field constraints already rule out, padding the list with noise that a reviewer then has to filter out manually — tying scenario generation to the actual stated constraints keeps the output proportional to genuine risk rather than to how many permutations are mathematically possible. The TBD-marking instruction for undecided behavior is the most consequential rule in the prompt: without it, a model asked to write a Then clause for every scenario will produce a plausible-sounding specific behavior even where the story as given genuinely hasn't settled what should happen, and that fabricated behavior can silently become the de facto requirement once it's in a ticket — marking it TBD instead routes the actual decision back to a human rather than letting an invented answer pass as one that was actually agreed to.

What you get back

Scenario — code already used by this account: Given a customer has previously redeemed discount code SAVE20 on their account, When they attempt to apply SAVE20 again at checkout, Then the system rejects the code and displays 'This code has already been used.' Scenario — code valid but for a different product category: TBD — needs a decision on whether the system should reject the code outright or apply it partially to eligible items in the cart.

Verified against

ChatGPT GPT-5.1 · 2026-08-13

Changelog

  • 2026-08-13 Initial publish, verified against ChatGPT GPT-5.1.

Need this built into your business?

If a prompt isn't enough — branding & design, built and maintained for you — that's Scult's day job.

EXPLORE BRANDING & DESIGN
All UI & UX Design prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY