# Done-Test

**Template, version 1.** The done-test is the contract: an objective, demonstrable definition of "done" that both sides sign before a fixed price exists. It is what the money-back guarantee pays out against, so it is written to be binary.

## The rules (read before writing)

1. **Every check must be demonstrable in a live demo.** If it cannot be shown, it cannot be in the done-test.
2. **Binary, not adjectival.** "Fast", "easy", and "intuitive" are banned; write the number instead ("search returns in under 500ms at 10,000 records").
3. **Client-dependent checks name their input and date.** A check waiting on something from your side is blocked, not failed; blocked items are completed late, waived in writing, or severed at acceptance.
4. **Material run costs get an economics check.** If a feature costs money per use, the acceptable unit cost at production volume is a pass/fail row.
5. **Changes go through a written change request**, producing a revised price and done-test. Verbal additions are not scope.
6. **Both sides sign.** A well-written done-test makes a guarantee payout structurally impossible; that is the point of writing it.

## Functional checks

| ID | Check (demonstrable statement) | How demonstrated | Depends on (input + date) | Pass |
|---|---|---|---|---|
| F1 | A user can [action] and sees [result] | Live on staging | none | |
| F2 | | | | |

## Quality gates

| ID | Check | How demonstrated | Pass |
|---|---|---|---|
| Q1 | Automated tests exist for the functional checks above and run in CI on every commit | CI run shown live | |
| Q2 | Security scanning (SAST + dependency scan) runs in CI with no unresolved critical findings | CI output shown | |
| Q3 | Documentation covers setup, deployment, and operations | Repo walkthrough | |

## Performance and economics checks

| ID | Check | How demonstrated | Pass |
|---|---|---|---|
| P1 | [Operation] completes in under [N] at [volume] | Timed live | |
| P2 | [Feature] unit cost at [volume] is at or under [£X per unit] | Billing/metrics shown | |

## Compliance checks (where applicable)

| ID | Check | How demonstrated | Pass |
|---|---|---|---|
| C1 | Personal data flows match the data map; retention and deletion work as documented | Live walkthrough | |

## Handover checks

| ID | Check | How demonstrated | Pass |
|---|---|---|---|
| H1 | Client holds source, documentation, and deploy access | Access verified live | |

## Sign-off

| | Client | Mangrove |
|---|---|---|
| Name | | |
| Date | | |
| Version of this done-test | | |
