r/SpecDrivenDevelopment • • 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?

8 Upvotes

25 comments sorted by

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/meshifthenelse 7h ago

Agreed. So is there a tool that doesn't suck?

1

u/Sad-CTO 5h ago

My team is working on one: https://github.com/Ask-Loft/loft

1

u/AndyVictors 8h ago

It is not "tools". Again what are you guys are smoking?

1

u/Sad-CTO 7h ago

Humans use tools to achieve results.

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.

2

u/AndyVictors 8h ago

So you surely think your process is something unique, just like 100000 of others who are inventing the wheel now?

2

u/meshifthenelse 7h ago

Well it's unified, it's process, and it's AI. 3 for 1.

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.

4

u/editor_of_the_beast 15h ago

Why would you log deviations instead of updating the spec

1

u/beachman4 1h ago

Two main reasons:

  1. You keep the "why", not just the final state. If you overwrite the spec mid-build, you lose the fact that you tried approach A and hit some constraint in the codebase that forced approach B. Keeping the deviation lets future agents (and people) see why the obvious approach didn't work so they don't suggest it again.
  2. Less churn mid-flight. A spec for a feature is a point-in-time plan, not permanent living docs. Constantly rewriting it while you're still discovering edge cases is the exact tax OP is talking about. Appending a quick note ("switched from X to Y because Z") is cheap, and once the feature actually ships you can update your actual system docs / ADRs once with what landed, instead of editing the spec five times along the way.

1

u/editor_of_the_beast 1h ago

That seems like what you would use a commit message for. I absolutely believe the current state of the spec should always be committed.

1

u/beachman4 1h ago

Writing a deviation in a commit message makes total sense in a single repo. In my setup, I'm working across multiple repos in a microservices architecture, so keeping deviations in a central work log means an agent in any repo can see them instead of them being scattered across different git histories (plus failed approaches usually never make it into a commit anyway).

2

u/meshifthenelse 7h ago

Sounds like you're creating spaghetti 🍝. I suggest to consider creating deviations of deviations

1

u/beachman4 1h ago

For me, deviations are just simple notes in a work log for a spec that future agents can pick up on so they don't repeat mistakes. No 🍝

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 (*.feature files). 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/AndyVictors 8h ago

Surely a vegetable driven approach is the best

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.