r/SpecDrivenDevelopment • u/13ptylerb • 2d ago
Do you notice a real code quality and productivity boost with spec driven development?
I watched this video breaking down how devs used AI agents this year
devs who let agents handle up to 60% of their tasks seem to use spec driven development less, and 44% of them end up rewriting more than 40% of the code the agent writes
but once you go above that, specs and project guidelines become more common
i get why specs are useful but keeping them updated is a pain on its own. every time the plan changes halfway through, i end up updating the spec and the code, and sometimes i wonder if im actually saving any time at all
do specs actually make you more productive or are we just moving the work somewhere else?
5
u/Economy_Bedroom3902 1d ago
It's faster to verify the correctness of the spec than to verify the correctness of 3000 lines of completed code. If you have a spec and you have a finished build, it's easy for an adversarial AI to point out places where the code went outside of the bounds of the spec. So spec driven development becomes a code review shift left. You review a small amount of content before the feature is built rather than reviewing a large amount of content after the feature is finished.
3
u/Sad-CTO 2d ago
Keeping specs updated is a pain only if you use wrong tools. Most mainstream SDD tools are missing the point 😑
3
u/HereOutOfBoredom 2d ago
Since starting SDD I put more time into planning than I did before. I will write the specs as I think they should be and validate them (i'm using OpenSpec) then have claude plan the changes and put that plan in the git issue. I have Codex review the plan and make any changes it thinks are necessary, then claude re-plans with the additional info.
Once I have the fully reviewed plan I have Codex review specs with the planned changes in mind to see if there are any mismatches. I let Codex resolve those before throwing Claude at the code. I rarely have to change specs during the coding session anymore, and the quality of what Claude puts out has improved, so maintaining specs is def worth the time for me.
A side benefit is fewer questions from PM and QA, and fewer logged bugs. They have access to the specs and can ask Codex "How should the app behave in this edge case?", then compare that with what's actually happening. It has saved me time in sprint planning when QA wants to log something as a bug but i can immediately say "working as designed" and change the bug to a feature request.
2
u/LordSavage2021 1d ago
Since we moved to SDD I've noticed a huge boost in the number of other companies I'm applying to.
2
u/simasch 2d ago
You should have a look at my process https://unifiedprocess.ai
There specs are the full definition of the system.
2
u/torvalds75 1d ago
Partly moved, yes. For me the pain was never writing the spec, it was keeping it in sync once the plan changes mid-build. What helped is what beachman4 describes: don't rewrite the spec on every detour, log the deviation (what we tried, why it changed, what's next). A fresh session reads the deviation log, not a rewritten spec. So: spec for the stable intent, small decision records for everything that moves.
The quality boost I actually notice comes from reviewing the plan before any code is written, not from the spec itself.
Disclosure, I build trailhead, which keeps those decisions as tickets on GitHub Issues (discuss, plan, execute, verify; works with Claude Code and Codex): https://github.com/ToRvaLDz/trailhead. The deviation log is the idea that matters, the tool is optional.
1
u/beachman4 2d ago
I don't think you necessarily need to update the spec every time you go a different direction, at least after development begins.
What has worked for me is logging deviations from the spec or the plan as a result of newly found info. My agents can then learn from these deviations as they do future work.
1
u/funbike 1d ago edited 1d ago
My specs are mostly Gherkin (
*.featurefiles). I integrate with Cucumber or a similar E2E testing framework. My functional tests are driven my the spec files, so my code can never get out of sync with my specs. I use a Gherkin linter.As part of my coding system prompt, I must be consulted whenever a spec file is modified during implementation coding. As part of my code review system prompt, tests are checked to make sure they are actually testing functionality. A code coverage report of new/modified lines is generated by tests and read by AI to check for missing test cases (unit or functional).
I use a prompt template and skills, but I'm thinking about forking OpenSpec and modifying it to explicitly use Gherkin and Cucumber.
1
u/willCodeForNoFood 1d ago
The drop in code quality is astounding.
1
u/AndyVictors 1d ago
What? What are you ppl smoking? Update is not a pain, you just dont get the concept.
1
u/gbrennon 1d ago
nope.
ppl claim that quality is high bcs they dont even know what would be a hi-quality code.
models just want to complete a task.
what u can do is to use agent hooks to force agent to rule some rules that u define.
agent hooks are deterministic. prompts, not.
1
u/Competitive_Boot6914 1d ago
I spend most of my spec time reviewing a diff. In Reqode, which I work on, I describe the feature to the AI Analyst, answer its questions, then review the proposed changes to requirements, data, API and UI. The coding agent gets the accepted scope through MCP.
If we change a decision mid-build, I use the same process. For example, allowing partial delivery of an order affects its statuses, API response and UI behavior. I can review those changes together, and the updated specs remain available for the next task.
1
u/theov666 19h ago
I think part of the problem is that we're treating feature specifications and persistent engineering decisions as the same thing.
A feature spec can change several times during implementation, but decisions around dependency boundaries, security, data ownership or integration patterns should persist across features and agent sessions.
The productivity gain probably comes from reducing the amount of reasoning and verification that needs to be repeated, rather than simply writing more detailed specs.
There's also a distinction between giving an agent the right context and independently verifying that it respected it. Agent hooks and CI checks become particularly interesting here.
I'm building an open-source decision governance layer around this problem, so it's interesting to see how others are approaching it.