Stage 3 · Lesson 2 of 7
Writing a task spec with a definition of done
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
- CoursePaidGrokking Prompt Engineering for Software Engineers
Design Gurus · Beginner · Subscription
A structured course on prompting for engineering work: specs, context, examples and iteration
- GuideFreeAnthropic Prompt Engineering Documentation
Anthropic
Free and model-agnostic in spirit: be clear and direct, give examples, let the model think