DEV Community

Discussion on: Spec First, Code Later: My Spec-Driven Development Adventure with AI

Collapse
 
nedcodes profile image
Ned C

Curious whether you found the AI respecting the spec boundaries consistently, or did it drift when modules started interacting with each other?

Collapse
 
yyuji profile image
Yuji Yamamoto

If the overall purpose of the system is clearly defined in advance, it seems to me that the likelihood of drift would decrease.
It may be necessary to help the AI understand that it is not building isolated modules, but rather constructing an entire system.

Collapse
 
nedcodes profile image
Ned C

that's a good distinction. the "isolated modules vs whole system" framing matters a lot for how the AI scopes its changes. i'd imagine that when the spec only describes individual features, the AI optimizes locally and you get inconsistencies at the boundaries. a short system-level overview at the top of the spec that says "this is a checkout flow, these modules talk to each other like this" probably goes a long way. even a paragraph.

Collapse
 
nedcodes profile image
Ned C

that's a good framing. i'd expect the drift to get worse when the spec describes modules in isolation without explaining how they connect. giving the AI the dependency graph upfront, even just a rough sketch, probably helps it make better local decisions. do you define those system-level boundaries in the spec itself or in a separate architecture doc?