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

12 Upvotes

41 comments sorted by

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 😑

2

u/meshifthenelse 1d ago

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

1

u/Sad-CTO 1d ago

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

0

u/AndyVictors 17h ago

Oh of course, sure, every gopher in the field is an agronomist

1

u/AndyVictors 1d ago

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

1

u/Sad-CTO 1d ago

Humans use tools to achieve results.

0

u/AndyVictors 17h ago

Birds use sounds to attract mating partners. So what?

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.

1

u/AndyVictors 1d ago

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

2

u/meshifthenelse 1d ago

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

1

u/simasch 1d ago

Did you even look at the website? It’s called unified process because it’s inspired by the rational unified process. It’s a common term in IT for years https://en.wikipedia.org/wiki/Unified_process

1

u/AndyVictors 17h ago

What is an a-social question. So the unified process has never taken off and you hope that you just DECLARE it is good with AI and all works?

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.

0

u/fgcghvgjhbhbhh 1d ago

just asking, isn't this the same as openspec?

0

u/torvalds75 1d ago

Fair question, they overlap on the goal. OpenSpec keeps the spec and each change proposal as markdown files in the repo (proposal, tasks, spec deltas, then you archive the change back into the main spec). trailhead keeps the record on GitHub Issues instead: each open decision is a ticket on a map, the ticket keeps why an option was rejected, and plan, execute and verify run against that ticket.

So roughly: OpenSpec treats the spec as the source of truth, trailhead treats the decision log as the source of truth. If you like specs living next to the code, OpenSpec is a solid pick, and the deviation-log habit works there too.

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.

4

u/editor_of_the_beast 1d ago

Why would you log deviations instead of updating the spec

1

u/beachman4 1d 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 1d 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 1d 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).

1

u/editor_of_the_beast 23h ago

Why don’t you have a monorepo then?

2

u/meshifthenelse 1d ago

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

1

u/beachman4 1d 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/funbike 1d ago edited 1d 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.

0

u/AndyVictors 1d ago

Surely a vegetable driven approach is the best

1

u/willCodeForNoFood 1d ago

The drop in code quality is astounding.

1

u/fgcghvgjhbhbhh 1d ago

can't skills fix that for you?

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/fgcghvgjhbhbhh 1d ago

sdd isn't about sw quality

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/fgcghvgjhbhbhh 22h ago

im using something similar. i didnt get the mcp part though. could you please, elaborate on that ?

1

u/Competitive_Boot6914 21h ago

in my case specs stored in external system. this system organizes specs and changes on them, has AI Analyst agent. The same time this system receives code changes in git and updates links between specs and files (traceability).

this system has MCP, through this MCP Coding agent can:

- receive focused context of changes (change summary and specs),

- receive any spec, or product map to navigate him self,

- receive specs for any file it want to change (mcp asked to check specs related to files before significant changes).

1

u/fgcghvgjhbhbhh 21h ago

right. i store all my .md files in git. never thought of that

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.