Order of operations
- Spec first: the spec is the durable source of truth. Code can be deleted and rewritten; the spec survives.
- Tests are not optional: tests and code are written together, but specs define what to test before implementation begins. Only test code that has meaningful logic (branching, transformations, error handling). Don't test code that can only break if the language, runtime, or a dependency breaks.
- Code implements the spec: write code along with tests, implementing the spec in full.