# Specification: before the code is written

What an algorithm's specification must hold so that an implementer, a person or a model, builds it correctly: the
contract first, code-like steps, and examples that become the first tests. The shape is the
[algorithm specification](../../shapes/algorithm-specification.md).

| Principle | Claim |
|---|---|
| [Contract before steps](contract-before-steps.md) | the precondition and postcondition come before the steps |
| [Code-like steps](code-like-steps.md) | the steps are constrained pseudocode, not prose |
| [Examples and properties as tests](examples-as-tests.md) | examples with expected outputs, edge cases first, and properties for every input |
