ExitCode Completion vs. Spec-Driven Development1 / 7
Explanationassociate7 steps · 3 exercises

The difference is what guides the work

How continuing code at the cursor differs from using an explicit specification to guide a broader implementation, even when both produce several lines of code.

Code completion proposes what to insert at the cursor. It can fill in a method name or draft an entire loop using available context, such as nearby code and comments. A comment that says “return an empty list when nothing matches” can guide a multi-line suggestion, but the suggestion is still a continuation of the current edit.

Spec-driven development starts with an explicit description of behavior the implementation must satisfy. For a report export API, the spec can say that retrying the same request with the same idempotency key within a defined window returns the original job ID without starting another job. That rule guides the work wherever it belongs, whether implementing it takes one edit or several.

Use completion when you know the behavior and want help writing the current piece of code. Use a spec when the behavior itself needs to be agreed on and checked. Count neither lines nor files: the distinction is between continuing an edit and implementing an explicit contract.

Next up: Sort the statements on what you just read.