r/SpecDrivenDevelopment • u/13ptylerb • 18h 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?
3
u/HereOutOfBoredom 16h 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.
3
u/torvalds75 14h 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.
3
u/Economy_Bedroom3902 11h 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.
2
u/Sad-CTO 17h ago
Keeping specs updated is a pain only if you use wrong tools. Most mainstream SDD tools are missing the point 😑
2
u/simasch 18h ago
You should have a look at my process https://unifiedprocess.ai
There specs are the full definition of the system.
1
u/beachman4 17h 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/LordSavage2021 12h ago
Since we moved to SDD I've noticed a huge boost in the number of other companies I'm applying to.
1
u/funbike 11h ago edited 11h 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 11h ago
The drop in code quality is astounding.
1
u/AndyVictors 8h ago
What? What are you ppl smoking? Update is not a pain, you just dont get the concept.