Considering Spec Driven Development

 People are making a big deal about the new way of agentic working: Spec-Driven!!!

But, wait...

Big Design Up Front (BDUF) is something we tried for many years, in many companies, many times. 

It was proven to be a losing proposition and a bad idea. We did it in the 80s, and by 96 or so we had alternatives. 

If the idea of spec-driven is to fully detail a system up-front, and then use agents to implement it, then I think we're about to repeat a historic mistake

 But, wait...

BDD and TDD are also specification-driven, just in very tight loops with constant verification. The test acts as a specification, and we implement code to make all the tests pass. We do this incrementally and iteratively, adding tests as we go. 

If the idea of spec-driven is to iteratively and incrementally build software covered by the safety mechanism of tests, and the feedback loop is tight, then maybe we're about to repeat one of the best ideas of the 20th and 21st centuries.

But, wait...

If the specification is not a deterministic test, then it may end up causing us to generate little more than technical debt and future headaches.

But, wait...

If the purpose of the specification is to generate tests, then it may be a much faster way to initiate BDD.

But, wait...

How do we know the generated tests are good? What if it generates a small raft of pointless tests and we can't use them?

But, wait...

What if we examine the tests, and are able to quickly read them because they are business tests written from the specs, using something like playwright or gherkin?  Then we have a human in the loop, and if we don't like them we can re-generate them.

After all, it only took minutes the first time, redoing it seems perfectly reasonable; then make sure the tests are reasonable. Then use the tests to make sure the code is written correctly. Then use mutation testing to make sure the tests are valid.

But, wait...

What about the visual elements? I guess they can be generated from wireframes and validated in storybook, and then we have humans in the loop validating the output. Then, of course the code has to be able to use the visual components, and the tests will check the code... maybe this isn't too bad.

And, of course...

We have a lot of tools like SonarQube and Veracode and ruff and such, looking for problems and failings in the code which we may be able to mitigate with entries in AGENT.md files.


Have we reached a point where we have the languages, tools, frameworks, and LLMs such that we can do work reliably, with humans in the loop, generating and reviewing everything up front and maybe it will turn out okay?

It's worth trying, whether one feels it's promising or poppycock.  The whole ecosystem make this something a bit different from the BDUF/Waterfall we did in the 80s and 90s.

I don't plan on abandoning the disciplines we've learned, but maybe there are new ways to support them.

I'm no AI fanboy, but neither am I a stubborn detractor: we try to find ways to make the best use of all the tech available to us all, don't we? Why would I oppose those experiments? 

There is a lot to learn from trying, I think.


Comments

Popular posts from this blog

Programming Is Mostly Thinking

Is It My Fault You Can't Handle The Truth?

Preplanning Poker: Is This Story Even Possible?