The working loop
Plan and prompt in small steps
Give the assistant a testable task boundary.
Understand the problem
State the intended behavior, constraints, files in scope, and acceptance checks. Ask for a narrow patch and inspect it before expanding the task. Keep architecture decisions explicit.
Make it concrete
Ask for an idempotent handler with duplicate-event tests rather than “make the service reliable.”
Trade-offs and pitfalls
Large generated patches increase review cost and make regressions harder to isolate.
Check your understanding
Write a prompt for fixing pagination without changing the response contract.
Practice this topic