More than a year into "spec-driven" and there's still no single, best approach. Because "Spec" doesn't have a singular definition or purpose. What you need is very different from what I need is very different than what they need, yet we're all using the same word.
It wasn't enough to say all of our companies were "Agile", and it's not enough to say we're both need a "Spec".
The term "Spec" is not enough
Whether we're setting out to build a process or directing a team to build one, the term "Spec" is insufficient because it is too broad. Before I present my take on the terminology, let's dig into that a bit more.
1. There isn't a single, useful definition.
Communication is hard. I say a few words that I have a meaning for, you hear the words in the context of your own experience, and we end up somewhere between on the same page and in completely different bookstores.
"Spec" is one of those words that is wildly insufficient for communication, on it's own. Definitions range from academic and engineering definitions across a wide range of disciplines and context to ones that people have learned only by experiencing what someone else called a "Spec" at one or two companies in their past.
Consider NASA, ISO, college classes, a UML book from the 90s, 20 years and 4 versions of SWEBOK, and every engineering discipline that uses them.
My internal definition doesn't match yours, and an LLM has thousands to pick from each session.
🗣️ Write me a spec, make no mistakes
Asking an LLM for a software "Spec" narrows the field above. A little. The LLM will produce something that feels spec-y. The LLM is trained to produce convincing-looking documents.
Ask a second time, it will do it a second time, but probably very different.
And if we're building a process, what we don't want is a different type of document each time in the usual overly dense and difficult to review prose an LLM produces to find out just how different it is.
2. There are many flavors of spec
The reason so many different definitions exist is two-fold: (1) lots of different people talking at different levels of experience and points of time, (2) there are legitimately different flavors for "specs".
If we're intending to define expected product behavior for an internal team, it shouldn't look like an incredibly granular implementation spec we're giving to a junior staff augmentation team. Or enough of a spec to develop and test a prototype. Or a technical direction that is high risk and irreversible once we make it.
Even with a shared definition, different problems need different specs.
3. Spec lifecycle and purpose
The third major issue is that we write specs for different purposes in the lifecycle of making a decision. Some specs serve many of these stages, either trying to have one format that fits all or morphing over time.
Many of the more defined SDLC processes out there will have multiple documents over time, or will have clear process to shepherd documents from inception to conclusion (IETF).
Returning once again to connotations and LLM training data, if we don't define the stage or stages the "spec" is serving, what are the chances we get what we're expecting?
- Is it to assist in design, by organizing your thoughts?
- Is it to communicate that design to an audience so they can understand it?
- Sign off on it?
- Provide feedback on it?
- Execute on it?
- Validate what someone else executed from it?
- Remember why we did that thing 3 years later?
4. Many people don't want to write or read them
I've rolled out or improved writing practices at multiple companies. Nearly every company I've worked for had either no organized place for content or a wildly disorganized place for content. Some percentage of the folks there didn't want to write the content. A larger percentage didn't want to read the content.
There's a few factors here:
- The content isn't well written for the audience: it's too long-winded (guilty). It doesn't meet the audience where they are. It doesn't present content in a reasonable reading order.
- The content is tiring: dense, difficult to follow, requires unpacking each step
- The medium itself is not universal: researchers write highly technical documents for highly technical audiences, but still go to conferences to present their findings. A whiteboard may be a higher signal training exercise than a confluence document. A written document has value, but is not universally the best choice in every situation
And this is one that LLMs hit us hard on:
- Why is AI-generated language so hard to understand?
- The Cognitive Cost of LLM Writing: A Reading-Time Comparison with Human Text
reducing the amount of text to process while increasing the predicted processing effort associated with individual words
On its own, an agent is going to write something that is harder for everyone to read. It's on us to shape the presentation, ideally for our specific audience and purpose.
Frame "Spec" so it's useful
An earlier post was working on ontology for context, I'm going to present some taxonomy for "specs" in the hopes that this helps you define for yourself just what purpose and audience you're writing for (or prompting an Agent to write for).
Three Categories for Software Development
Scoping us to just software development, and ignoring post-development systems documentation, my research and experimentation have led me to 3 categories of "spec".
Product Solution Design
Product Solution Design builds on several key terms:
- Product Design is an iterative framing, generating, testing, and comparing process to select a response to an evidenced need from users, the environment, or the business.
- Evidence about problems and needs are observations about users, stakeholders, environmental or regulatory changes that support, qualify, or challenge us.
- Maintained needs are our revisable interpretation of what users and our business need to accomplish, avoid, or experience and what a successful response must maintain
- Inherited direction & constraints are the policies, standards, and other commitments that constrain our solution space
- Product Requirements describe the business or user impact we are trying to achieve against a selected set of evidence.
- Product Goal states the authorized outcome we intend to pursue and how we will judge whether we've achieved it
Within this scope, we consider how we're going to modify the product to address or maintain needs. We scope proportionally to the level of risk or intended impact. We consider how we will validate and capture signal when it's out in the real world, so we can iterate on our hypothesis with real data.
This is a human endeavor. We are selecting a business response to stimuli for a desired outcome, and repeating until we achieve it or shelve it.
Product Solution Design is then 5 key elements:
- Which selected set of evidence are we solving for?
- What impact will we have to solve for it?
- What must we maintain or operate within?
- What solution have we chosen and why?
- What outcome will we achieve when we've solved it?
This is what a "spec" for Product Solution Design answers.
Technical Solution Design
A Technical Solution Design starts from a Product Design (or the Architecture-equivalent for foundational technical changes). Technical Solution Design draws on:
- Technical Design is an iterative process of deciding how we will deliver the Product Design
- Product Requirements above are a key input
- Maintained requirements are relevant product requirements the current system already delivers, that must continue to be true after this change
- Governing forces of direction is policies, product-wide commitments, standards, and other obligations we must continue to meet
- Maintained quality concerns and constraints define service-level objectives, risk tolerance, and other key considerations that define the bar for how well the solution and broader system must work, and how we measure that
- Architecture and technical standards provide foundational policies, standards, and patterns for the solutions we consider, so that every design is building on the learnings of previous ones instead of reasoning from first principles each time
- Technical evidence and trade-offs explain what supports each option and the benefits, costs, risks, or uncertainties that apply. Evidence includes prototypes, threat models, expert review and other method that informed those trade-offs.
- Implementation, rollout, and verification plan is the high-level approach to how we will build, deliver, and monitor our technical design to ensure it delivered the product solution, enough to determine feasibility and shape the solution
This is how we bridge the "what" to the "how".
Technical Solution Design can be thought of as:
- Clearly identifying what inputs matter for this solution
- Describing a coherent solution that satisfies them
- Evaluating the solution elements been responsibly against alternatives
- Displaying it's feasibility and how it will be verified
- Designed to sufficient detail against the risks, uncertainties, reversibility, and implementation environment
That last part is tricky, because my experience shows that many developers will start really far in the details an then try to dig out, which means they are spending time on the easiest parts and not qualifying whether it's a good solution first.
Instead, we should be starting big picture. Identify what problem we are setting out to solve, from the inputs above, then explore the system responsibilities, boundaries, and interactions. Add technical depth like schema, interfaces, function details where it matters to evaluate the solution or coordinate implementation. Where there's more to be said, simply state explicitly what decisions have been left for implementation. Fine tune for the environment, team, and time constraints.
Implementation Plan
An Implementation Plan turns the selected Technical Solution Design into coordinated work. This addresses:
- Decisions identified above for implementation design, from broader ones that may need prototyping or decision records to straightforward "define the rest of the database table" activity
- Tasks the work can be broken down into, with clear dependencies
- Coordination that defines the order, given the uncertainties open for those decisions and the natural task dependencies
- Verification Activities that will be performed to confirm the implementation meets the Technical Solution Design
The Implementation Plan is also iterative. Many of the risks and uncertainties we identified in the Technical Solution Design are going to be exercised here, requiring feedback into earlier activities like Product and Technical Solution Design for iteration, or local iteration if they're narrow enough to be solved within implementation. Likewise, gaps wil show up, elements we assumed were easier or more straightforward above then they are in practice.
Performing Design vs Communicating Design
The type of "Spec" sets direction by defining the class of problem we are addressing. The audience and use determine how we present that work.
As folks that have worked with me before can attest, any "Spec" I write starts life as a wild mess of text, pictures, and other content, and only really becomes readable much later in the process. Those early days are semi-structured note taking, source finding, and solution evaluation. Skip forward in time, and the experience the document presents when I'm asking for reviewer feedback is very different. Further still, and the 1-pager or deck I share with executives is even more distant from that earlier creative mess.
Design is an iterative process.
The document or space we iterate on in early stages won't resemble the refined version we use to gather feedback or feed into a downstream process for the next level of detail. These can be revisions of one document or separate views, but knowing which one you have in front of you is critical. Send the creative space to an executive and you're not going to achieve the type of feedback or affirmation you were expecting to.
- Performing Design: focus on capturing the inputs, the current state, the lists of problems you're solving for, exploring options, testing assumptions, identifying trade-offs, and revising decisions.
- Requesting feedback: identify your reviewers and the type of feedback you want, then provide that prompt, refine the document to present the context they need, the proposed decisions, and the rationale. Be explicit about open questions. Make supporting detail available, but don't force every reviewer to read the detail that only some reviewers need.
- Communicating design: for implementer and testers, we emphasize the decisions, constraints, and detail needed to carry out and verify the design. The alternatives and rationale are still supporting, but more more to the background.
Later posts will continue this section, exploring how these distinctions shape agentic workflows and whyy many of those approaches may be different than how we would approach them pre-LLM, and dive into how we assess the quality of the resulting "Spec".
Wrap-up
Once we know what type of "Spec" we need, who will use it, and what it must support, then we can ask the next question (next post): how do we measure if it is good?