Define Success First
Before the design, before a single line is built, write the tests — or at least the acceptance criteria. That way “correct” is defined before you start, not argued about after.
What Test-First Means
You describe the behaviour you expect as checks, and only then build toward them.
- Describe expected behaviour as checks first — write down what a correct result looks like.
- Build until the checks pass — the work is done when they go green.
- The checks are the definition of done — not a feeling, not a demo.
A Target for the Agent
Test-first is especially powerful when a coding agent does the building. Hand it the tests to satisfy and two things change at once.
TDD in One Loop
Test-driven development is a small loop you repeat, one behaviour at a time.
- Write a failing test — state what should be true; it fails because nothing does it yet.
- Make it pass — build the smallest thing that turns it green.
- Clean up — tidy the code now that a test protects it.
- Repeat — move to the next behaviour and go again.
A Preview of Module 8
Keep this idea in mind — it comes back. Evaluation-driven development is this same test-first discipline applied to unpredictable AI outputs.
Build It
How to implement: for one core feature of your capstone, write the acceptance test first — “given X, expect Y” — then build only until it passes.
- Weekly AI Tasks tracker — write “this message parses into this task” as a test before building the parser; it becomes a Module 8 eval.
- Personal brand site — write the check “every project has a source link” first, then generate to satisfy it.
What you learned
Define “done” as checks before you build; hand those checks to your agent as a target and an automatic verifier; work the small TDD loop — and know this is the seed of Module 8’s evaluation-driven development.