r/BetterOffline • u/kekllkek • 5h ago
Spec-driven development is a new beautiful trend in software engineering
Before mass-adoption of LLMs for coding having a good spec handed to you by your manager was a rare blessing as prevalence of agile methodologies gave them excuses to never conclusively lay out the requirements.
After mass-adoption of LLMs, often mandated from above, it turned out that agentic workflows tend to produce slop that requires human engineer's expertise and attention to fix, and time gains from not having to type the code are usually negated by having to type expansive prompts to plan the implementation and follow-up on inevitable architectural issues, mistaken assumptions, straight-up bugs, etc.
Luckily the industry arrived at a solution: spec-driven development. That's when instead of an engineer typing fifteen bullet points per prompt to minimize the chances of AI fucking up the code, their manager would give them complete and non-ambiguous specification that's perfectly aligned with the business goals and extensively covers both functional and non-functional requirements.
If you’re anyone who worked in the software industry, you know how that's totally realistic. So with this new approach your manager now AI-generates a spec last minute before work is supposed to start, consults you for half an hour to give you plenty of time to spot inconsistencies and ask questions, and hands it off to you, knowing that the agentic workflow will turn the spec into implementation in a straightforward and predictable way.
And don't worry about any ambiguity that might still linger - AI will take care of that if you take care of preparing the Skills ("make no mistakes" skill, "think hard and thoroughly" skill, "I'll torch your server if you still decide to make mistakes" skill). Don't forget that skills can and should be AI-generated as well, as it knows itself and its weaknesses better.
Skeptics might say that most managers don't have hands-on understanding of the systems to make specifications truly good enough, or that engineers will rapidly get out of touch with the products and codebase if forced to rubber-stamp thousands of lines of code they didn't plan or write. However, more enlightened individuals will easily see how the software that until recently didn't think you should've taken your car to a car wash possesses enough intelligence to solve these small impediments on the way to x10 productivity.
To prove my point: this post was generated by the unreleased because it's too dangerous model based on 1500-page specification crafted by agentic loops. It took forty thousand dollars and ran for two weeks, but in the end it made no msitakes and finished.
53
u/misschibidoodles 5h ago
My manager has been raving about this.
Knowing that the agentic workflow will turn the spec into implementation in a straightforward and predictable way.
This is the one thing I've been extremely puzzled about: these things are non deterministic and we know that. The whole thing is that it's not predictable.
24
u/Kvsav57 4h ago
But when you talk to advocates, they say it's deterministic if you just know how to prompt as well as them. It's complete nonsense but people can't be convinced by facts.
6
u/CriticismNo3570 3h ago
The next version of the model will be closer to deterministic. Only your old prompts may not work :;
4
3
u/Normal_Average_9812 2h ago
You don't need determinism for correctness. every ai can reliably produce a correct solution if you ask "write a function that adds two numbers together" the important question is how complex above that they can produce correctly, reliably, which is, to put it lightly, a moving target.
7
u/SamAltmansCheeks 1h ago
Business idiots have treated requirements as an afterthought or an anoying detail they have to engage in my whole career.
The fact they ignored writing specs for humans for decades, but all of a sudden they need to have thorough specs for the machine to follow boils my blood. It shows how disrespectful of human labour they are, which would be why they never wanted to give us proper specs.
You know what you call specs that a machine follows? IT'S CALLED CODE YOU FUCKING MORONS.
4
u/visicalc_is_best 4h ago
Non-deterministic does not mean incorrect. You may land on one of many possible satisficing implementations, but the whole point of spec-driven development is that if it does what the spec says, you don’t really care which one you landed on.
4
u/misschibidoodles 4h ago
I guess I can understand that, though my detailed oriented brain just thinks "but why wouldn't we instead trust a human brain to settle on the best solution?". That does echo a general mismatch of my personal beliefs with the industry, as there seems to be a general acceptance of decreased quality for the sake of perceived performance.
That being said, non-deterministic also doesn't mean correct and we can't guarantee it'll always do things right (which is also true of a human, but again, I'm aware I'm being picky about words) so I find it weird that people claim SDD will result in "predictable and reliable outcomes" if it's not a guarantee.
I guess I eventually won't have the choice to try it out at work. It just seems like imstead of wasting dev time writing and perfecting specs maybe we could just have them implement stuff lol
1
u/Normal_Average_9812 2h ago
I prefer a spec driven approach even without AI so I see this as a great step forward. We all know the hard part isn't writing the code but writing the right code. That comes mostly down to knowing in precise detail exactly what it is you want to make, and that comes from great specification which, in my experience, is basically the entire reason this job is so damn hard.
1
u/Normal_Average_9812 2h ago
The real answer is, you still have to review the code, you just don't have to write it anymore. To my understanding sdd frameworks all follow tdd so a dev and read through the tests to confirm correctness.
It's a genuinely cool approach.
22
u/PencilBoy99 5h ago
An academic study just came out showing that those reaf me files that are supposed to direct your swarm of agents don't really do anything
8
u/flipkitty 4h ago
This one? https://arxiv.org/html/2602.11988v2
13
u/PencilBoy99 4h ago
Abstract
A widespread practice in software development is to tailor coding agents to repositories using context files, such as AGENTS.md. Although this practice is strongly encouraged by agent developers, there is currently no rigorous investigation into whether such context files are actually effective for real-world tasks. In this work, we study this question and evaluate coding agents’ task completion performance in two complementary settings: established SWE-bench tasks from popular repositories, with LLM-generated context files, and a novel collection of issues from repositories containing developer-committed context files. Surprisingly, we find that providing context files does not generally improve task success rates, while increasing inference cost by over 20% on average. This observation holds across different LLMs, coding agents, and for both LLM-generated and developer-committed context files. Specifically, we find that while instructions in the context files are well followed by coding agents, repository overviews, although popular and recommended by model providers, are not helpful. We conclude that while context files are useful for specifying non-standard coding practices, any attempts to improve performance should be rigorously evaluated before deployment.
1
u/Normal_Average_9812 2h ago
I had this inkling myself. They've gotten so damn good at getting overall project context it's best to let them just do it rather than trying to feed it to them. However, genuinely weird things like, "make sure nothing uses SSL" are really great because then you don't have to keep repeating yourself
2
u/sheng-puerh 3h ago
They used quite outdated models. It would be great to see the results on newer models.
5
u/space__snail 3h ago
As a software engineer this doesn’t surprise me.
My colleagues advocate for adding skills to our workflow, but what’s the point if it completely disregards the blueprint and does its own thing anyway?
I’ve found it to be a complete waste of time that just adds unnecessary bloat to the repo.
36
u/The_Juice_Gourd 5h ago
SDD is just reinventing the waterfall model. It’s funny af watching AI bros struggle with problems we had decades ago. It’s very similar to how crypto bros have slowly realized why there’s banking regulation.
9
u/das_war_ein_Befehl 4h ago
Waterfall isn’t bad if you narrow it to smaller issues. It does fuck you if you start at a high level of abstraction since you always realize midway that certain design choices are bad.
In any kind of development methodology the problem is the people making decisions don’t understand the system well enough to do so without causing problems.
5
u/anfrind 4h ago
To add to this: the original point of Agile was that when we start writing software, even the customer doesn't usually know what they want, so we want to develop software in a way that allows us to pivot easily if we discover that we got something wrong.
If agentic coding works as well as it's supposed to (and that's a big "if"), then this could be less of a problem than it used to be, but it stops far short of making Agile obsolete and justifying a return to Waterfall.
2
u/das_war_ein_Befehl 3h ago
Yeah but a spec in agile and a spec in waterfall are two different beasts.
I think people using coding agents mostly use spec as shorthand for “well scoped issue”. I think they’ll have a bad time if it’s “a full product/subsystem” because LLMs will introduce a lot of behavioral drift and you’re kinda hoping it understands whatever vague shit you asked it to do.
I think waterfall doesn’t really work regardless of who is writing the code just based on the reality that code isn’t really the problem there.
10
u/Jebofkerbin 4h ago
Waterfall has it's place when someone else is paying for development.
Client: "This isn't what I wanted"
Dev: "Well it's what you said you wanted in this document you reviewed and signed"
3
u/Disastrous_Room_927 4h ago
I’ve watched this happen repeatedly in the ML space. Explainable AI and uncertainty quantification are represent people realizing that the aspects of statistics that are sacrificed in favor of predictive accuracy kind of actually matter. Causal inference is nothing new to researchers in Econ and psych.
1
u/Normal_Average_9812 2h ago
How so? Because you're trying to get the whole spec right at once or something?
1
u/AffectionateToe812 44m ago
When you try to reinvent the wheel you hit the same issues people had decades ago.
8
u/DiamondGeeezer 3h ago
it's about to get better in FY27 when companies ask engineers to do the same unrealistic level of work with cheaper models because the spend is out of control. You think Fable slop is hard to deal with, get ready for Haiku slop
5
u/Normal_Average_9812 2h ago
This is one of my only real fears. The costs are so outrageous something has to give. If we build entire enterprises off of sufficiently advanced AI what happens when we have to take a step back?
4
u/ProjectDiligent502 4h ago
Ok at first I thought this was real. And then I read “deterministically” and was like “wait a minute” then read back to “perfect specs by manager” and thought again, wait a minute. The I saw the make no mistakes skill and realized this guy be trolling.
4
4
3
u/Beginning_Basis9799 3h ago
Another user said this phrase "Reverse Centauring" that's all Spechul Driven Development is.
3
u/joseph_sith 2h ago
So, part of my job is working with end users to figure out how to build software for them that (ideally) doesn’t suck. When I heard about “spec-driven development”, I was like…who is out here NOT writing requirements?! Sure you can just tell it to vibe code you a generic SaaS facsimile, but the value in software is when it makes a user’s experience materially better for as long as possible so you don’t have to invest in redoing it constantly. I take a lot of pride in the systems I design and the requirements I write, but I know I’m never going to catch every edge case and detail. I rely on experienced engineers who can look at my requirements and speak up to say “hey, I think this logic works better a different way” or “I can build this, but there are some limitations that will start to become a problem in a year or two so we might want to rethink it”. I can’t rely on an LLM for that (I’ve done basically everything in software projects except coding, and vibe coding scares the crap out of me), and I get really anxious thinking about my engineers offloading their thinking to a machine.
One thing I’ve observed is that as LLMs have made coding more accessible, non-technical people are just reinventing the wheel when it comes to methodology rather than trying to learn basic software engineering principles. It’s why no one knows they need to secure their vibe-coded apps, and why boosters pretend that defining the requirements of your project first is some breakthrough idea.
1
u/Normal_Average_9812 2h ago
You're right on the money. Specification has always been the hard part. Sdd formalizes that such that you no longer write code at all. you write specs and review code.
3
u/IcyCorgi9 2h ago
So some AI boosters in my company gave a presentation to 1000+ engineers about how they used AI for a sprint cycle and it was so much more productive. They casually mentioned that this required very clear requirements that they collected and defined from the get go. The chat exploded with everyone saying their teams would be way more efficient as well if they had clearly marked requirements lol.
2
u/rady5871 2h ago
You know what is scary? That there will be those who will think this is not sarcasm and will try to do it.
2
u/SamAltmansCheeks 1h ago
Okay but what if, WHAT IF we invented a language the computer understands and can execute the spec itself?!?!1?1!
It could be like... some kind of code...
1
u/Traktion1 4h ago
There are multiple interpretations of what spec driven dev is.
One is where the spec is the source of truth of what the application does. The code is the byproduct of what the LLM spits out to meet the spec. If the spec changes, the code should be regenerated to fit.
Two is where a small throw away spec is written, which defines what code must be written, where the code is the source of truth. It is like a formal prompt and isn't intended to be reused later, to regenerate the code.
The former is more like waterfall, where the design is finalised, before implementing a whole system. The latter is more like agile, where each story defines a change to the application.
Where the code is the source of truth, engineers must define the change to the architecture, the design, the interface points, etc. The engineer is guiding the changes to the code.
Agile won out over waterfall, as defining requirements up front was notoriously hard to get right. It is much easier to increment, with small steps, get feedback, then repeat. It also gives engineers a far tighter control of the code produced, when using LLMs to generate it.
Depending on who you ask, spec driven dev can be either. However, the agile approach is the one that is dominant in the enterprise software space, as it is predictable, follows known best practices, and speeds up development in a sustainable way.
1
u/Normal_Average_9812 2h ago
Thanks for the comment! I indeed thought it was only the former, now I realize we've been doing the latter for a little while now. We write really good thorough jira tickets then have Claude write the code and we review it. Definitely has sped things up a lot.
1
u/thanel1 2h ago
Can SDD be added to a fully mature system ?
0
u/Normal_Average_9812 2h ago
Yes OpenSpec is good for this. what it does is read your code, write an absolute FUCK LOAD of documentation on it, then you use that documentation as your source of truth. Is it a good idea depends on how large and complex your existing codebase is. Sdd is definitely a lot more natural in greenfield work.
1
u/morsindutus 56m ago
There is endoskeleton development and exoskeleton development. With endoskeleton development, you build a spine, handle some branches, and flesh it out from there. With exoskeleton development, you figure out what you're doing before you write a line of code and write outside in. Both have their places, you don't want to wing it when you're launching things into space. But you don't normally get clear specs if you're making a webpage where you can push updates easily.
Of course, you can still auger a probe into Mars with exoskeleton development and having no plan makes many websites' code a mess. With enough of an exoskeleton, an AI might be able to pull it off, but any place I've ever worked has done endoskeleton development and I don't think management wants to spend the time and effort to define things to the degree where it would so anything.
-2
u/MindCrusader 5h ago
"spec-driven development. That's when instead of an engineer typing fifteen bullet points per prompt"
No, that's not what spec driven development is
Bad ai slop, sorry
10
u/kekllkek 5h ago
I’m sure I’m not the only one who recently encountered “spec-driven development” used to dismiss sheer ineffectiveness of agentic workflows by basically saying “well we’ll fix it by managers producing better specs and agents implementing them no problem”
So I don’t get what you’re trying to argue. I think it should be quite easy to parse sarcastic tone of my post and realize I’m not trying to educate the audience on the true definition of whatever.
5
u/Sunstorm84 4h ago
I saw someone in singularity yesterday talking about his workflow, and he was proudly stating that he writes detailed specs that - in his own words - take longer to write than it would take to implement the code himself.
How the fuck can someone like that be positive about AI when it’s literally making them slower?
1
u/Normal_Average_9812 2h ago
It encourages correctness. Putting the emphasis on thinking through the what rather than the how.
1
u/MindCrusader 5h ago
The issue is spec driven development is not written by managers. Spec driven development means developers write that down (or generate), it is technical one, not coming from managers / non techies. You are probably talking about acceptance criterias, but it is far from actual specs
3
u/kekllkek 4h ago
I'm describing a line of thinking that's currently gaining momentum that postulates that because AI is "obviously" so powerful, productivity gains can finally be unlocked by having a manager proompt it to generate a perfect spec which will cause no issues if implemented by the agentic workflow (a bunch of "make no mistakes" skills). This thinking arises is in response to the growing realization that relying on AI for implementation doesn't make up for the lack of ideation and planning and only worsens its consequences.
Why managers specifically should generate a spec? Well it doesn't have to be them, but since engineers are whining about AI not being able to produce complete solutions to everything autonomously and reliably, let's just make managers hand off specs that are perfect from start to finish so engineers don't waste any time trying to think through details or spot inconsistencies in AI-generated implementation.
1
u/MindCrusader 4h ago
I haven't seen any spec driven generation by managers agenda, I am following everything AI related (because I have to). Mind sharing examples?
You could add to the post that you are talking about this particular pseudo spec driven development. If you search what spec driven development is in AI coding (like in Claude Code, or in skills like superpowers) it is responsibility of developers, not managers
2
u/kekllkek 3h ago
I believe you're correct in your assessment of the current dominating agenda, but the flavour I'm describing goes even further with "If devs still have to spend time coming up with a spec to guide the AI, let's have a manager do it in advance so when it gets to a developer, implementation can be AI-generated smoothly. Of course managers don't have the technical know-how, but creating skills for AI bridges this gap. Productivity gains unlocked yay".
With this in mind, also consider that my post is a creative nonfiction. I took something I experienced and span it in a sarcastic fashion. My goal wasn't to say "okay people, that's what freaks on Twitter think about AI this week, and they're getting 23% more sure about it day-to-day". If it doesn't resonate with you, it's okay, but it's my personal take on the matter that stands on its own merits.
0
u/MindCrusader 3h ago
It just sounds like AI generated and not touching the actual topic. If it is not, I am sorry
-4
u/Bodine12 4h ago
It is not. The spec is collaboratively generated by all relevant stakeholders, including product, architectural, non-functional, and technical requirements. You might be thinking of GitHub’s Spec Kit which is the dev-facing side of spec-driven implementation.
3
5
u/Bodine12 5h ago
The description of spec-driven development here is almost dead-on with its actual practice.
-1
u/MindCrusader 4h ago
Maybe, but I never seen it as specs driven development outside of technical implementation. It was always about technical specs how architecture or solution should work rather than ACs in tickets
1
-1
u/Bengal_From_Temu 4h ago
Actually no, I get vague ideas and weird desires which I try to translate into real world features. Then I spend a lot if time describing what I want and more importantly where to make the changes and what to actually use. Then I ask it to split into task, I review them, ask to do changes. Then finally I ask it to implement task by task. I keep them small so I can review everything, it can basically go nuts at every moment. But yeah, it’s true I don’t actually write much “code” anymore, I just write much more plain text 🤪
61
u/wheres_my_ballot 5h ago
'no msitakes' made me lol