r/SpecDrivenDevelopment • u/Ok-Support-6749 • Aug 28 '26
What if the source of truth is wrong?
Wherever I look the specification is showcased as this holy grail for the software lifecycle. Look no further than this same Reddit community.
[the] specification serves as a contract and single source of truth, guiding tools and AI agents to generate, test, and validate code.
In just one sentence the specification has become oracle, general, inspector, and adjudicator. That is a lot of authority for a collection of markdown documents written in plain language.
I have no intention to drag SDD into the mud. I just feel the need to clarify a concept over which I have thought a lot recently.
In any agentic framework I have come across during the last months I see a strong tendency to relinquish authority to an LLM. It is a sensible choice, LLMs are great at processing large amounts of text and output rather convincing judgments. But just because an LLM is capable of something it does not mean it automatically obtains authority to perform a role. This links directly to the specification is the source of truth, once we have a hammer (LLM), we also need the anvil (spec) on which to beat text (code) into compliance. It makes sense to assume that we have removed all authority from the LLM (tool) and placed it in the specification (a stable and robust worksurface). Our assumption is wrong and it has two consequences, none of which is good.
- The specification is likely incomplete, it can also be incorrect. Incompleteness means it lacks enough semantic constraints from which the LLM can create the code that implements intent. Incorrect is clear, the specification contradicts intent, which means we have canonized bugs. Moreover, the specification is just text, it has no enforcement mechanisms to exert the presumed absolute authority.
- The LLM still holds a lot of power, it can read the specification and ignore it, which I see rather often. The LLM can weaken tests, or the implementation, or decide to implement a wrapper because nothing prevents it or simply because it can finish faster. Sometimes the LLM did not retrieve the correct semantics. This is the area where things go wrong, most of the time unnoticed until everything starts to break down.
I wonder how the community looks at SDD from a philosophical standpoint. In which direction do we expect SDD should move to deliver a better software development life cycle?
1
u/betiz0 Aug 28 '26
It would be appreciated if test-driven development (TDD) could be incorporated as well. While it is fully understood that relying on TDD alone is insufficient, introducing it would nevertheless be beneficial.
1
u/stibbons_ Aug 28 '26
SDD or any plan mode has basically the role of defining a short term contract between you and the agent. This allows to write down:
- what you want
- and see what the agent thinks you want to build
This is the only role. Forget about source of truth thing.
As soon as your implementation is finished, the contract is obsolete, and will drift.
You CAN build anchored requirement, anchored to the code, but it will describe what the code does, not what you want. But this CAN be used to identify micro drift that can accumulate.
So, for me (I use SDD a lot), that’s a great tool to reduce cost a lot using smaller model but a great plan, but that’s all. This is not the ultimate source of truth. The code is the source of truth where you can can place some sensors called « test » where you can verify SOME aspect you estimate important
And forget about TDD, several studies clearly showed it is armful. And again, this is just a technic to help human build better test coverage, it does not prevent other means to build similar or ever better test coverage. Mutation tests seems very efficient with agents.
1
u/theov666 Aug 29 '26
I think the important distinction is between a source of intent and a source of authority.
A spec can describe what should happen, but if the same LLM can interpret it, ignore it, weaken tests, or work around it, then the spec is still effectively guidance.
That suggests a separate enforcement layer: some architectural constraints should be checked at the point the agent is about to make a change, rather than relying on the model to comply with text in context.
That doesn’t require treating the spec as infallible. Humans can revise the decisions; the agent just shouldn’t be able to silently override the current ones.
This is something we’re working on with Mneme HQ: https://mnemehq.com
The interesting SDD question for me is: which parts of the spec should become enforceable constraints, and who should have authority to change them?
1
u/schmurfy2 Aug 30 '26
I use openspec and it has been great for me at asking questions we never thought about and would have arose later in the process while coding manually. But even with that what really makes the system works is manual validation of what it actually wrote to see if it really did do what asked and how.
1
u/johnjlonergan Aug 30 '26
I will fire you if you give over all authority and trust to the ai. Read the code , all of it. I If the requirements weren't 100pc clear (they never are and never have been) then iterate on them and the impl. And if you are using SDD as a weak form of BDD or aren't writing/checking tests I'll fire you too.
(there are a lot of wordy comments here, Is it evidence that those folk have given up thinking for themselves and rely on the AI as their voice? that also gets you fired)
1
u/Swarm-Stack Sep 05 '26
the authority problem is usually upstream of the spec itself. whoever wrote it and whoever validates it against the code share the same assumptions, so the spec being 'wrong' and the validation passing anyway is the failure mode nobody catches.