On Spec

As I slow-walk toward the end of Phase I for Slowpoke, I've decided to add a new wrinkle.  Lately, I've seen more press on Spec Driven Development, in which a developer writes specifications following opinionated guidelines to direct AI agents in their coding excursions.  I've only done some rudimentary research, but the idea is that the specs the developer generates are intended to be living, iterative documents, not fixed points in time.  By keeping the scope smaller, agents are expected to wander less and generate more serviceable code.

I'm skeptical.  At first, coding agents were expected to read a comprehensive Agents.md or Claude.md file and use that for the principles of implementation.  Then we learned that if one of those documents exceeds 150 lines, the agent will ignore most of it.

Enter skills, which are supposed to be more targeted.  I created a skill for generating partial Astro pages that are returned from an htmx AJAX-style call.  Except the agent mostly ignored the skill's instructions and returned something that was syntactically incorrect.  I'll give it credit, after directing it with the phrase "no, use the actual skill I wrote," along with a few expletives, it came close to writing 90% of the code correctly on its second pass, but this goes to show that skills too suffer from the same fundamental flaw.

But I'm willing to give spec driven development a try.  If the career of a software engineer ultimately morphs into a series of specs, skills, and tests (with the occasional tweak to poor-performing code), it's not something that fills me with dread for the position.  

I'd like to say that I'd be happy to measure the increase in productivity, but that'll be difficult to do, because it would involve me writing the same app twice, which is something I don't have the patience for.  

I may try a few different micro-experiments and attempt to write the same functionality twice, but that can suffer from bias too, since I will have gained the experience that leads to a better solution on the second pass, which also tips the scales.  So, I'll mostly provide updates of the type "well, it feels like it's 3x faster," which, really, is what everyone else is doing anyway.

Viva la Spec!

Until next time, my human and robot friends.

Comments

Popular Posts