logoalt Hacker News

locusofself • today at 2:14 AM • 5 replies • view on HN

My team has been struggling to understand whether or not we should do "spec-driven" development or not. It makes a lot of sense to me to have one developer iterate with the model/harness to generate a markddown document that is a high-level of what will be implemented, and then have the team PR review it before and agent attempts to do the actual implementation work. Do you think this is a good practice?


Replies

Fr0styMatt88 • today at 2:59 AM

I specifically work in tooling now, so this probably applies more to that domain than some others, but I find 'very up-front spec-driven development' unappealing for that kind of work.

I'm experimenting just like everyone else, but this is my process right now:

- Quick prototype

- Figure out the language of your app (what terms you want to use for things, what your UI design language will be, etc) and spec that, so you can use words consistently with the agent. You need to be able to describe the things you want well and consistently.

- Keep prototyping. Let the agent write unit tests along the way. Lock down behaviour you like, keep track of those things in a document.

- At some point your idea of the real architecture comes into focus, from actual use cases -- avoids the over-abstracting right away trap.

- Refactoring is cheap with tests, so start refactoring into the architecture you want.

- Your architecture won't necessarily be what would be best for a human, but it will be pretty close.

- Keep relentlessly iterating on small work.

- Things that were expensive before aren't that expensive now -- integrating a library, changing from one library to another, trying out a few architectural refactors, trying out different performance optimizations, etc. That stuff is all 'throw it there and see what sticks' now, so don't be afraid to try stuff which felt big before.

I feel like 'front loading' too much is just the wrong approach. You might feel like you're sitting there 'babysitting the agent'; but that's just what the hard part of the work (hard as in 'zjust slogging through it', not as in 'conceptually complex') looks like now. Your code is much more like clay.

Atleast that's how I'm thinking about it so far, but I'm not working on large sprawling systems that I imagine would need more pre-planning.

jghn • today at 5:55 AM

I have found it doesn't see me any direct time. I either iterate ruthlessly on the spec or on the implementation.

I find that the code is generally in a better place proportionate to the amount of SDD I actually do. But it's just a matter of where and when I want to spend my time.

tomasGiden • today at 5:38 AM

I believe spec driven design is a good way to go. But that means keeping all your specs either in the repo (if you want the agent to be able to edit them) or available via for example MCP (if you think only humans should be able to edit them and you got some type of external documentation system keeping specs).

But given that running an agent us cheaper than the cost of waiting for a slot to assemble the team to talk about a change (isn’t it always?), why wait with running the agent?

I propose updating the spec then do the implementation. This will most likely show that a few assumptions were wrong forcing some major or minor updates to the spec. Work through those and then let your team review the spec change together with testing the next iteration of what what’s build.

chickensong • today at 7:43 AM

SDD is good. It's a lot faster and cheaper to have an agent polish a spec, than refactor code. The implementation can then be verified against the spec artifact, and any drift can feed back into process improvements for future specs.

overfeed • today at 5:00 AM

> Do you think this is a good practice?

For who? The more control you hand over to the AI and let it think for you with no supervision, the better it is for Anthropic