Coding with AI tools

Stage 3 · Lesson 2 of 7

Writing a task spec with a definition of done

Prompting for code: small tasks, clear specs

is a short, structured prompt: the goal, the files involved, the constraints, what is out of scope, and how to prove the work is done. Constraints are things like "reuse the existing Redis client" or "no new dependencies". Out of scope stops the tool improving code you did not ask it to touch.

The "done when" line is the most important: a concrete check such as "the new tests pass and npm test and the pass". It gives you and the tool the same finish line. A spec takes two minutes to write and saves much longer arguing with a result that solved a different problem.

Common trapleaving out the non-goals and the check, so "done" means "the tool stopped", not "it works".

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

Keep handy

Also worth your time

Mark this stage as not done?