Most acceptance I have seen is the first kind, with a demo in between. Someone clicks through the screens, the happy path works, everyone nods. The rules are assumed to be in there somewhere. Nobody tries to break one.
This week we let an AI assistant build and deploy an internal system overnight, from a specification written the evening before. What stayed with me is not the speed but the order in which things appeared. The rules became tests before there was a single screen to click.
A demo proves the happy path. A rule only shows in a refusal.
A rule like "the uploader may not confirm their own upload" is invisible when everyone behaves. The upload works, the confirmation works, the screen looks fine. The rule exists only at the moment someone tries the forbidden thing and the system says no. If nobody tries, you do not have a rule. You have an intention, which survives a demo untested.
Demos have their place: they show the product owner what she is getting. They do not tell you whether the rules are in there. So I have stopped asking "does it do what the spec says" and started asking "which refusals have you seen".
That this is not theory, we saw on an internal system of our own
The system is an internal contract register with AI field extraction. A contract is uploaded, the model proposes the fields, a second person confirms, a third approves, and after approval the money fields are locked. The spec also has a viewer role, an admin who creates accounts but must not read contract content, and machine clients for the CRM, the HR system and our reporting.
The build turned those rules into a smoke test of thirty-seven checks before it wrote the first screen. Ten of them are refusals:
- the uploader cannot confirm their own upload;
- a viewer cannot open a workspace;
- a non-approver cannot approve;
- money fields are locked after approval;
- the admin cannot read a contract they uploaded;
- a CRM client cannot read staffing data.
A collection of thirty-six API assertions walks the same flow per role. The smoke test ran locally fourteen minutes into the build; the API collection followed before the deployment. Both ran again on the live address, through the office IP allow list. Then the database was emptied and each of the nine accounts signed in once, so the product owner would find a clean system that behaved as the tests had seen it.
Thirty-one files were written and none rewritten. Eleven faults were found and fixed, median thirty-nine seconds from detection to fix. A budget with alerts existed before anything chargeable was deployed. When a spec rule collided with the goal of the night (the admin creates workspaces, but the product owner must not wait for anyone) the build wrote a decision record rather than quietly changing the rule. When a push to the main branch was refused by the organisation's required secret scan, it opened a pull request instead of looking for a bypass.
Now the honest part. The test suite only proves the rules the spec wrote down. The spec had one contradiction in its roles table, and no test found it. It surfaced while the assistant was writing the permission code, about thirty minutes in, because three rules that were fine on their own could not become one function. A test can only refuse what someone thought to forbid.
The lesson: refusal tests turn a spec's rules into evidence, and their blind spot is exactly the rules nobody wrote down.
Local green means little. Verify where the user will verify.
The smoke test passed on my laptop first. Stopping there proves that the rules hold on my laptop. The product owner would be using a different address, behind a load balancer and an IP allow list, with a certificate that took nine minutes to appear and a secret that was empty on the first deploy.
So the same checks ran again on the live address, and then the test data was removed. A system full of test contracts is not what the user will see. Verify where the user will use it, then reset it.
The environment is where the surprises live
Of the eleven faults, six were ordinary coding mistakes and one a test that had not kept up with a decision taken during the build. The other four had nothing to do with the code: a package peer conflict, a billing account in euros, an empty secret under a different variable name than the script expected, and a push refused by a required secret scan. None of these belong in the spec. They belong in a pre-flight checklist: cloud login, container runtime, the required checks on the main branch, billing currency, secret names. Ten minutes before the build, four interruptions fewer during it.
A deviation is a decision, and decisions live next to the code
The build took six decisions the spec had left open. One got a decision record that night. The other five lived only in a working journal until a review found them the next day. Size does not matter; whether anyone can find it in six months does. So every deviation gets a decision record, in the same commit as the code that makes it. A build too busy to write one is too busy to deviate.
The questions I ask before accepting a build
- Refusals. Of the rules in your spec, how many have a test that tries to break them and expects a no?
- Blind spots. Which rule do you believe holds but has never been refused by a test?
- Location. Where did the last test run: on a laptop, or on the address the user will type?
- Reset. After verification, does the user find test data or a clean system with their account working?
- Environment. Which facts about your cloud account, billing currency, secret names and branch rules would surprise a builder?
- Budget. Was a spending limit with alerts in place before the first chargeable resource existed?
- Deviation. When the build has to bend a rule, where is that written down, and is it in the same commit as the code?
A rule without a refusal test is a wish.
Before the first screen
If your acceptance is a demo and a nod, the rules in your spec may be in the system, or they may not. The only way to know is to try to break them and count the refusals. We are happy to do that exercise with you on your own backlog: pick a spec, list its rules, see how many have a no behind them. Over a coffee.