Demo

Demo catalogue. These entries were written to prove the format; they are not an exhaustive or endorsed list, and their review dates are sample records. What demo means here

FM-08 Reviewed · v1.0

Have a coding agent implement against tests you wrote first

You fix the behaviour in tests, the agent writes the code, and you check that it did not edit or weaken the tests.

You end with

A change whose behaviour is pinned by tests you own, with a diff you have read and a full suite run by you.

Level
Advanced
Effort
1 h 15 min first time
Works in
  • Coding agent in a repository, full support
  • Model API and scripts, partial support

Is it the right skill?

Use it when

  • The behaviour is clear enough to express as tests.
  • The code is important enough that you will read every line of the diff.

Skip it when

  • You are still exploring what the behaviour should be.
  • The area has no test harness and adding one is the real task.

Before you start

  • A working test runner in the repository.
  • An agent session with permission to edit code and run tests.

Steps

Do not move on until the checkpoint holds.

  1. Write failing tests

    Cover the main behaviour and two or three edge cases. Run them and watch them fail for the right reason.

    Checkpoint Each test fails with a message that names the missing behaviour.

  2. Brief the agent

    Ask for an implementation that makes the tests pass without editing test files, and to stop and explain if a test looks wrong.

    Checkpoint The instructions name the test files that must not change.

  3. Inspect the diff for test changes

    Look for edited tests, skipped tests, broadened assertions and catch-all error handling.

    Checkpoint Test files are unchanged and no test is skipped.

  4. Run everything yourself

    Run the full suite and the linters in your own terminal, not only the agent's report.

    Checkpoint All checks pass on your machine.

  5. Read for clarity

    Read the implementation as a reviewer would. Ask for simplification where it is longer than it needs to be.

    Checkpoint You could explain every changed line to a colleague.

What can go wrong

  • Accuracy Tests can be satisfied in unintended ways. Reading the diff is part of the method, not an extra.
  • Security Reject new dependencies you did not ask for until you have checked their source and licence.

Revision history

Demo records, newest first.
VersionDateChange
v1.0First published.