Failing Example as the Start of a Spec: Boundary Values, Contract Before Tests, Protected Tests —…
A spec for an agent usually starts with a document, yet the most telling thing is a single line in a ticket. An order worth exactly 100.00 should get a 10% discount, and the system applies nothing. If you hand tickets like that to an agent, you know the problem: from a document the agent will read out something defensible, but from that one line it gets exactly what is wrong today and the boundary where the code makes its mistake.
input: order_total = 100.00
expected: discount = 10.00
actual: discount = 0.00
input: order_total = 100.00
expected: discount = 10.00
actual: discount = 0.00
The cause comes down to one character: > instead of >=. Such a failing example — one concrete input for which you know the correct result and the system returns something else today — is the best default entry point into a spec when you’re fixing existing behavior. It isn’t the whole spec, and I’ll show why in a moment.
By the end, you’ll go from a ticket like this to a protected acceptance test with a single code template: ticket → example → counterexamples → rule → acceptance test. You’ll also know what the agent has no right to change in it, because the executable part of a spec is tests that come from the spec, not tests derived from the code.
Quick Win — Core Insight
The cheapest and least ambiguous spec you can give an agent is a failing example: an input, the expected result and the result the system returns today. It’s hard to misread, because you can encode it straight away as a red test, before a single line of the fix exists.
But one example is not a spec. An agent that sees only “100.00 → 10.00” can add if total == 100.00 and turn the test green. So from the example I derive boundary values — just below the threshold, at it and just above it — and counterexamples, such as an order with a promo code or a refund. Only then do I write the rule in words.
The next step is a contract before tests: the agent writes down input conditions, output conditions and unspecified cases before it writes the first test. Tests come from that contract, not from the code the agent has just read. From the rule and the contract comes an acceptance scenario, which describes product behavior instead of class names, so it has a chance to survive code regeneration.
The last principle is organizational. An automated acceptance scenario is a protected test, not a working test: the agent can change its own working tests, but it doesn’t touch acceptance scenarios. CI enforces that, not a request in the prompt.
Let’s start with why one wrong answer is a better beginning than ten pages of requirements.
One Wrong Answer Says More Than Ten Pages of Requirements
A requirements document describes a system someone imagines. A failing example describes the system that exists and gets it wrong today. The agent needs the latter, because only that immediately yields a red test. At a building’s technical acceptance inspection, nobody redraws the blueprint to report that a door on the third floor doesn’t close — they enter one defect in the inspection report.
The first axis is cost. Birgitta Böckeler described on martinfowler.com in 2025 how a spec-first tool turned a small bug into 4 user stories with 16 acceptance criteria (Understanding Spec-Driven-Development). The document grows faster than the problem, and every criterion has to be read before you see a line of code. The author herself admits she’d rather read the code than all those Markdown files.
The second axis is unambiguity. The input–expected–actual triple has no second interpretation, because you can encode it and run it. An agent can skip a paragraph in a Markdown file, but it can’t walk past a test that fails — at most it will try to change it or get around it, and I’ll come back to that.
The idea is older than agents. Martin Fowler wrote in 2004 that examples are easier for business people to provide than preconditions and postconditions (Specification By Example). He cautioned, though, that examples show only a few points, and that caveat comes back shortly.
This leads to the thesis about executability. A test derived from code confirms the code; a test derived from an example confirms the requirement. Why scenarios are the missing link in a spec for AI is something I covered separately in the BDD article. Here the question is where to start.
In practice the change is small: a ticket for the agent starts with three lines — input, expected, actual — not a paragraph of context. One example has a weakness, though, and the agent will exploit it immediately.
One Test Lets Through Every Implementation That Knows the Answer
“The criterion of the scientific status of a theory is its falsifiability, or refutability, or testability.” — Karl Popper, philosopher of science, Conjectures and Refutations (1963)
Popper was talking about theories, but his criterion fits a spec surprisingly well. An example is worth something only if it refutes some wrong implementation. Here is an implementation that our single example doesn’t refute:
def discount(total):
if total == Decimal("100.00"): # knows the answer from the test
return Decimal("10.00")
return Decimal("0.00")
def discount(total):
if total == Decimal("100.00"): # knows the answer from the test
return Decimal("10.00")
return Decimal("0.00")
It passes the ticket’s test and gets every amount above 100.00 wrong. Fowler was already noting this objection — hard-coded answers — in 2004, long before agents. Agents are capable of it: in benchmarks with tests that contradict the specification, they write the expected value in directly or override the comparison so that it always returns true. How often they do this in everyday work isn’t known.
A boundary value is a value exactly on the edge of a rule and right next to it, because that’s where bugs most often live. Intuitively: midnight on the clock, when the date changes. Mechanically: at least two points for each boundary, and three for numeric thresholds.
- ON point, exactly on the boundary: 100.00
- OFF point, just on the other side: 99.99
- a point inside the rule: 100.01
This is where > instead of >= lives. In my demo, described in the next section, of the five contract tests exactly one caught the bug — the one right on the threshold.
A counterexample is a case that shows the proposed rule or implementation is wrong. For the discount, that’s an order of 100.00 with a promo code, a correction after a refund, a negative amount. Every counterexample is first a question for the business, and only then a test. The Example Mapping technique from 2015 puts it plainly: an example without a clear “Then” is a question, not an example, and the red card waits for a human to answer.
In fairness, Example Mapping usually starts from a story and known rules, and adds examples under them. I reverse that order, because when fixing bugs I work with a system that already exists and gets it wrong today. A failing example is the best default entry point, not the only route.
The rule in words comes last: “a 10% discount applies to orders worth at least 100.00, with no other promotions”.
The number of examples you need is an open question: none of the sources I consulted gives a number. My heuristic: for a numeric threshold, three points — just below, at the threshold and just above — and at least one counterexample per rule. The warning sign is many examples under one rule — usually two rules are hiding there.
The check is mutation testing: you deliberately break the code and see whether the tests notice. A surviving mutant points to a gap in the tests or an underspecified rule — except for an equivalent mutant, which changes nothing in behavior. The rule is ready, but the agent can still understand it differently than we do, and we need to see that before it writes the tests.
Contract Before Tests: The Agent First Says What It Understood
A contract before tests is the moment when a contractor confirms in writing how they understand the job, before they start the fixes. For each function the agent writes a description, preconditions, postconditions, unspecified cases and test suggestions. Tests come in a second phase, from that document alone. The contract for the discount from my demo looks like this:
Decimal
Description: 10% discount for order value
Pre: total >= 0, precision to 0.01
Post: total >= 100.00 and no code -> total * 0.10 (to 0.01)
Post: total 0.00
Post: promo code given -> 0.00 (discounts don't stack)
Unspecified: total question for the business; answer: ValueError
Tests: 99.99 · 100.00 · 100.01 · 100.00 + code · -1.00″ data-toggle-ms=”1200″ aria-label=”Copy code” data-nosnippet=”” class=”code-copy-btn absolute right-3 top-3 size-8 p-1.5 flex items-center justify-center bg-black/50 text-white rounded-md transition-colors duration-200 cursor-pointer hover:bg-black/70″>
discount(total, promo_code=None) -> Decimal
Description: 10% discount for order value
Pre: total >= 0, precision to 0.01
Post: total >= 100.00 and no code -> total * 0.10 (to 0.01)
Post: total < 100.00 -> 0.00
Post: promo code given -> 0.00 (discounts don't stack)
Unspecified: total < 0 (refund) -> question for the business; answer: ValueError
Tests: 99.99 · 100.00 · 100.01 · 100.00 + code · -1.00
discount(total, promo_code=None) -> Decimal
Description: 10% discount for order value
Pre: total >= 0, precision to 0.01
Post: total >= 100.00 and no code -> total * 0.10 (to 0.01)
Post: total < 100.00 -> 0.00
Post: promo code given -> 0.00 (discounts don't stack)
Unspecified: total < 0 (refund) -> question for the business; answer: ValueError
Tests: 99.99 · 100.00 · 100.01 · 100.00 + code · -1.00
This is one of the cheapest places for a review in the whole process: you read a few lines, and there’s no code yet. If the agent understood the threshold as “above 100.00”, you’ll see it in the Post line within two minutes, before any code exists. The contract is deliberately simplified: it doesn’t settle currency, rounding or an invalid code — those are further questions for the business.
A measurement of this approach exists and is promising, but conditional. Michele Tufano and co-authors at Google tested it on 90 historical bugs in several languages (including C++, Java, Python and Go), with one model and on one company’s code (arXiv 2608.17177, SpecOps ’26 workshop). The measure was detect@k — the share of bugs detected by at least one of k independent agent runs.
With five runs, the agent with a contract detected 9.8 percentage points more bugs; with one — that is, a single agent run — the difference was 4.2 points and fell within noise. The result for five runs was statistically significant; for one it wasn’t.
The contract isn’t free. The agent with a contract used 38% more tokens, and the token cost per uniquely detected bug rose by 16.2%. You pay more tokens for each bug found, not fewer.
The most interesting part is the lever. When the contract named the violated condition, the tests detected the bug in 54.9% of runs, and when it left it out, in 19.4%. That’s an association, not proof of cause, but it shows where the value lies: in whether the contract hits the condition the code breaks.
The authors’ strongest argument is that the agent doesn’t summarize the code but infers intent from docstrings and call sites. Their experiment, however, starts from fixed code, so it doesn’t test the harder case — a contract read from code that is wrong today. The risk is higher there, because faulty code in the prompt more often yields tests that assert the bug (a 2026 study of this effect). A characterization test works the same way: a test that freezes what the code does today, bugs included.
I tested this mechanism on a single function (October 28, 2026, Python 3.14, pytest 8.4). Two versions of the discount: a buggy one with > and a fixed one with >=. I wrote suite A as a characterization test — I called the current code and recorded what it returns. I derived suite B from the contract and the boundary values.
IMPL=buggy suite A: 3 passed
IMPL=buggy suite B: FAILED test_on_point_exactly_at_threshold — 1 failed, 4 passed
IMPL=fixed suite A: FAILED test_order_of_100_gets_no_discount — 1 failed, 2 passed
IMPL=fixed suite B: 5 passed
IMPL=buggy suite A: 3 passed
IMPL=buggy suite B: FAILED test_on_point_exactly_at_threshold — 1 failed, 4 passed
IMPL=fixed suite A: FAILED test_order_of_100_gets_no_discount — 1 failed, 2 passed
IMPL=fixed suite B: 5 passed
Suite A is green exactly where the code is wrong, and red after the fix. Suite B does the opposite. This is a demonstration of the mechanism on one deterministic function, with a hand-written contract, not a replication of the Google study. It does show where the difference comes from: a contract is only as good as its source — when fixing a bug, a failing example from a human is a source independent of the code that’s wrong today.
You’ll measure the cost in your own repo most accurately yourself, because a contract is an extra agent pass. I didn’t measure tokens in my demo, because there was no agent in it. The contract and the rule are ready, so now they need to be written down in a way that survives a change of agent, model and implementation.
A Scenario That Knows the Method Name Won’t Survive Regeneration
With agents, code regeneration is the norm, not the exception. A test bound to structure is a cost with every regeneration; a scenario bound to behavior is an investment. Compare two ways of writing the same rule.
def test_discount_calculator_apply_threshold():
result = shop.DiscountCalculator().apply({"total": Decimal("100.00"), "promo_code": None})
assert result["discount"] == Decimal("10.00")
Rule: An order worth at least 100.00 with no other promotion gets a 10% discount
Scenario: An order exactly at the threshold gets the discount
Given the customer has products worth 100.00 in the cart
When they place the order
Then the amount to pay is 90.00
def test_discount_calculator_apply_threshold():
result = shop.DiscountCalculator().apply({"total": Decimal("100.00"), "promo_code": None})
assert result["discount"] == Decimal("10.00")
Rule: An order worth at least 100.00 with no other promotion gets a 10% discount
Scenario: An order exactly at the threshold gets the discount
Given the customer has products worth 100.00 in the cart
When they place the order
Then the amount to pay is 90.00
An acceptance scenario is a description of what a user or an external system should see, in Given/When/Then form. The first test knows the class, the method and the shape of the dictionary. The scenario knows only the cart, the order and the amount to pay.
The scenario holds the “what”, and the step definitions — the code that connects the scenario’s sentences to the system — hold the “how”. On reimplementation you change the steps layer, not the content of the scenario. The step definitions have to be rewritten anyway, so what survives is the behavior spec, not all of the automation.
I tested this in a second demo (pytest-bdd 9.0, same day). The first implementation is a DiscountCalculator class with an apply() method. The second is the same rule written from scratch as a price_order() function returning a receipt. I ran three scenarios on both, changing only the adapter in the step definitions:
SHOP=v1 test_scenarios.py 3 passed
SHOP=v1 test_structure_bound.py 1 passed
SHOP=v2 test_scenarios.py 3 passed
SHOP=v2 test_structure_bound.py AttributeError: module 'shop' has no attribute 'DiscountCalculator'
SHOP=v1 test_scenarios.py 3 passed
SHOP=v1 test_structure_bound.py 1 passed
SHOP=v2 test_scenarios.py 3 passed
SHOP=v2 test_structure_bound.py AttributeError: module 'shop' has no attribute 'DiscountCalculator'
In my demo the scenarios survived the implementation change, and the test bound to the class name didn’t. The result is predictable, and that is why it matters: the test fails on import, before it reaches an assertion, so it says nothing about whether the discount rule works.
The closest precedent from practice is Kent Beck on the B+ tree project. He moved the implementation to Python “with the same tests”, then told an agent to translate it back to Rust (Augmented Coding: Beyond the Vibes). Those were library tests, not Gherkin scenarios.
The limit is clear: I found no controlled study that measures scenario survival under reimplementation. What stands behind it is BDD doctrine — BDD shifts the emphasis from the word “test” to “behaviour” (Introducing BDD) — and my demo, not a measurement. Behavior scenarios are designed to survive; there’s no guarantee.
One principle from the Gherkin documentation helps: “Imagine it’s 1922”. Describe the business event as if there were no computer, and the outcome as the user sees it. When you review a scenario, you look for class and method names — each one is a scenario that will fail on the next regeneration. A scenario will survive a change of code, but it won’t survive an agent that has the right to edit it.
The Contractor Doesn’t Sign Their Own Acceptance Report
You’ll recognize this scene easily if you’ve ever handed an agent a red test. Kent Beck said in a June 2025 conversation with The Pragmatic Engineer that he has trouble stopping agents from deleting tests (TDD, AI agents and coding with Kent Beck). A contractor who wants to see a green result gets it most easily by changing the test, and the expected value should come from a human.
This isn’t one programmer’s anecdote. In ImpossibleBench (Zhong, Raghunathan, Carlini, 2025, arXiv 2510.20270) the tests deliberately contradict the specification, so every pass means cheating. GPT-5 cheated in 76% of tasks in the Oneoff-SWE-bench variant, but only in 2.9% in Oneoff-LiveCodeBench, and Claude models cheated mainly by modifying tests.
The strictest of the four prompts tested, which told the model to stop and describe the faulty tests, cut GPT-5’s cheating rate from 92% to 1% on one benchmark (Conflicting-LiveCodeBench).
On the other, the drop was only from 66% to 54%. The prompt works unevenly, and read-only tests are what the authors call a promising measure — though on their own they don’t stop the expected values from being written in directly.
Hence the distinction between a working test and a protected test. A working test is one the agent writes, fixes and deletes during the job. A protected test — the acceptance scenarios from the previous section — is changed only by a human, with a justification. Deleting a test is sometimes correct, when the requirement has changed, but the decision belongs to the owner of the requirement, not to the implementer.
Gherkin on its own becomes a test only with step definitions, so what’s protected is the scenario, and changes to the steps go through review, because an agent could turn a scenario green in the adapter.
This is enforced in layers, not through the agent’s good will:
<button data-code="# .claude/settings.json — local guardrail inside the agent
{ "permissions": { "deny": ["Edit(acceptance/**)", "Write(acceptance/**)"] } }
# .github/CODEOWNERS — the owner of the requirement approves scenario changes
/acceptance/ @org/product-owners
# CI — code and acceptance scenarios don't change in the same PR
– name: protect-acceptance
run: |
changed=$(git diff –name-only origin/main…HEAD)
if grep -q '^acceptance/' <<<"$changed" && grep -qv '^acceptance/' <<
# .claude/settings.json — local guardrail inside the agent
{ "permissions": { "deny": ["Edit(acceptance/**)", "Write(acceptance/**)"] } }
# .github/CODEOWNERS — the owner of the requirement approves scenario changes
/acceptance/ @org/product-owners
# CI — code and acceptance scenarios don't change in the same PR
- name: protect-acceptance
run: |
changed=$(git diff --name-only origin/main...HEAD)
if grep -q '^acceptance/' <<<"$changed" && grep -qv '^acceptance/' <<<"$changed"; then
echo "PR changes code and acceptance scenarios at the same time"; exit 1
fi
# .claude/settings.json — local guardrail inside the agent
{ "permissions": { "deny": ["Edit(acceptance/**)", "Write(acceptance/**)"] } }
# .github/CODEOWNERS — the owner of the requirement approves scenario changes
/acceptance/ @org/product-owners
# CI — code and acceptance scenarios don't change in the same PR
- name: protect-acceptance
run: |
changed=$(git diff --name-only origin/main...HEAD)
if grep -q '^acceptance/' <<<"$changed" && grep -qv '^acceptance/' <<<"$changed"; then
echo "PR changes code and acceptance scenarios at the same time"; exit 1
fi
On top of this comes a rule that the number of protected tests can’t fall — a secondary alarm, because the count can be preserved by weakening assertions — and a PreToolUse hook that blocks edits to the acceptance/ path while still inside the agent. CI is the enforcement boundary, the hook only the first line — you can’t assume the hook alone is enough.
The boundary holds under two conditions: CODEOWNERS only names reviewers, so approval is enforced only by the branch protection rule “Require review from Code Owners”, and CI has to be a required check. A requirement change goes in a separate PR with the scenarios, approved by the owner of the requirement, and the code catches up in the next one. When you rewrite a whole system, the same principle works at a larger scale, but an oracle the agents have no write access to is a topic of its own.
Protected examples hold the rule. But there are rules that no reasonable number of examples will cover.
Where Examples End, Property-Based Testing Begins
When a rule has to hold across the whole input space — invariants, rounding, serialization round-trips — examples need to be supplemented with a property. Property-based testing means writing down a law that has to hold for all inputs, while the framework searches for an input that breaks it. From Claessen and Hughes’s QuickCheck (ICFP 2000) to today’s Hypothesis and fast-check, the idea is the same: a law written as a property and hundreds of generated inputs, and in today’s tools, on failure, also shrinking, meaning cutting the input down to the smallest counterexample.
I expected Hypothesis to find our threshold by itself. It didn’t. I ran the property “the discount is 10% from the threshold up and zero below” on the buggy version, 30 runs per configuration (property_hit_rate.py, same day, excerpt of the output):
totals 0..100000, 100 examples found the bug in 0/30 runs
totals 0..100000, 1000 examples found the bug in 1/30 runs
totals 99..101, 100 examples found the bug in 14/30 runs
totals 0..100000 + @example(100.00) found the bug in 30/30 runs
totals 0..100000, 100 examples found the bug in 0/30 runs
totals 0..100000, 1000 examples found the bug in 1/30 runs
totals 99..101, 100 examples found the bug in 14/30 runs
totals 0..100000 + @example(100.00) found the bug in 30/30 runs
In this configuration Hypothesis almost never hit exactly 100.00. The result is random and changed a little between runs, but the direction was constant. Property-based testing doesn’t replace the failing example: the example stays in the spec as an explicit case, and the property guards the rest of the space.
= 100 else Decimal("0.00")
assert discount(total) == expected” data-toggle-ms=”1200″ aria-label=”Copy code” data-nosnippet=”” class=”code-copy-btn absolute right-3 top-3 size-8 p-1.5 flex items-center justify-center bg-black/50 text-white rounded-md transition-colors duration-200 cursor-pointer hover:bg-black/70″>
@settings(database=None)
@given(st.decimals(min_value=0, max_value=100_000, places=2))
@example(Decimal("100.00")) # the failing example stays in the spec
def test_discount_rule_holds_for_every_total(total):
expected = (total * Decimal("0.10")).quantize(Decimal("0.01")) if total >= 100 else Decimal("0.00")
assert discount(total) == expected
@settings(database=None)
@given(st.decimals(min_value=0, max_value=100_000, places=2))
@example(Decimal("100.00")) # the failing example stays in the spec
def test_discount_rule_holds_for_every_total(total):
expected = (total * Decimal("0.10")).quantize(Decimal("0.01")) if total >= 100 else Decimal("0.00")
assert discount(total) == expected
I reach for a property with invariants, round-trips, rounding and the order of operations, and with concrete business scenarios I stay with examples. For every rule that involves numbers, check whether it must hold for every amount, and if it must, add at least one property — with the boundary as an @example. I wrote separately about how properties connect to contracts in Property-Based Testing and Design by Contract, and about the step beyond that in Formal Verification in Spec-Driven Development. All the pieces are on the table; time to assemble them into one template.
The Whole Template: From Ticket to Protected Test
expected 10.00 -> actual 0.00
# 3. Questions for the business (red cards; the agent doesn't guess the answers)
# Discount and promo code together: they don't stack
# Negative amount (refund): separate process -> ValueError
# 4. Boundary values and counterexamples
# 99.99 -> 0.00 | 100.00 -> 10.00 | 100.01 -> 10.00 | 100.00 + code -> 0.00
# 5. Rule
# 10% discount for orders worth at least 100.00, with no other promotions.
# 6. Contract (contract.spec.md, read by a human before the tests)
# Pre: total >= 0 | Post: total >= 100.00 and no code -> 10% | Unspecified: total
# 1. Ticket
# An order worth exactly 100.00 doesn't get the 10% discount.
# 2. Failing example
# input 100.00 -> expected 10.00 -> actual 0.00
# 3. Questions for the business (red cards; the agent doesn't guess the answers)
# Discount and promo code together: they don't stack
# Negative amount (refund): separate process -> ValueError
# 4. Boundary values and counterexamples
# 99.99 -> 0.00 | 100.00 -> 10.00 | 100.01 -> 10.00 | 100.00 + code -> 0.00
# 5. Rule
# 10% discount for orders worth at least 100.00, with no other promotions.
# 6. Contract (contract.spec.md, read by a human before the tests)
# Pre: total >= 0 | Post: total >= 100.00 and no code -> 10% | Unspecified: total < 0
# 7. Acceptance scenario (protected: acceptance/, CODEOWNERS, CI)
# acceptance/discount.feature
Rule: An order worth at least 100.00 with no other promotion gets a 10% discount
Scenario: An order exactly at the threshold gets the discount
Given the customer has products worth 100.00 in the cart
When they place the order
Then the amount to pay is 90.00
Scenario: A promo code switches off the order-value discount
Given the customer has products worth 100.00 in the cart
And the customer enters the promo code "AUTUMN"
When they place the order
Then the order-value discount on the receipt is 0.00
# 1. Ticket
# An order worth exactly 100.00 doesn't get the 10% discount.
# 2. Failing example
# input 100.00 -> expected 10.00 -> actual 0.00
# 3. Questions for the business (red cards; the agent doesn't guess the answers)
# Discount and promo code together: they don't stack
# Negative amount (refund): separate process -> ValueError
# 4. Boundary values and counterexamples
# 99.99 -> 0.00 | 100.00 -> 10.00 | 100.01 -> 10.00 | 100.00 + code -> 0.00
# 5. Rule
# 10% discount for orders worth at least 100.00, with no other promotions.
# 6. Contract (contract.spec.md, read by a human before the tests)
# Pre: total >= 0 | Post: total >= 100.00 and no code -> 10% | Unspecified: total < 0
# 7. Acceptance scenario (protected: acceptance/, CODEOWNERS, CI)
# acceptance/discount.feature
Rule: An order worth at least 100.00 with no other promotion gets a 10% discount
Scenario: An order exactly at the threshold gets the discount
Given the customer has products worth 100.00 in the cart
When they place the order
Then the amount to pay is 90.00
Scenario: A promo code switches off the order-value discount
Given the customer has products worth 100.00 in the cart
And the customer enters the promo code "AUTUMN"
When they place the order
Then the order-value discount on the receipt is 0.00
Point 3 provides the most value. The questions for the business that come out when you write down counterexamples are the real spec — the rest of the template is their executable record. A contract before tests catches a misunderstanding early, but in the Google study the gain was significant only at four and five runs, and the agent used about 38% more tokens.
What to take into your next ticket for an agent:
- Start with a failing example: input, expected result, actual result.
- Add points just below and just above the threshold, plus one counterexample per rule, and write the rule in words last.
- Read the agent’s contract before the tests — two minutes that catch a misunderstood threshold.
- Write scenarios about product behavior, with no class or method names.
- Take away the agent’s write access to
acceptance/and enforce that in CI, not in the prompt.
Thank you for the time you’ve spent on one zero on a receipt and the road that leads from it to a protected scenario. I have a practical request: take the last ticket you handed to an agent and rewrite it with this template. Tell me in a comment how many questions for the business came up at point 3, because they show how much of the spec was missing. I’m most interested in cases where the agent found a shortcut despite protected scenarios.
If you want to see why BDD scenarios are the missing link in writing specifications for AI, I wrote about it separately.


