home

Blog

SDD: What is Spec-Driven Development and why does developing with AI require more than good prompts?

Blog, Pitang.

Diego Peter Luna

SDD: What is Spec-Driven Development and why does developing with AI require more than good prompts?

AI


Artificial intelligence has changed the speed at which we can develop software.


Today, we can generate code, implement features, and fix issues in much less time. But developing faster doesn't necessarily mean developing better.


An AI can deliver code that works and still not solve the problem. It can misunderstand a requirement, add unnecessary complexity, or overlook a business rule that no one made explicit.


That's why I believe one of the main challenges of software engineering with AI lies not just in the ability to generate code, but in how we guide and validate that execution. 


At Pitang, our approach to AI development goes beyond crafting good prompts. 


We use engineering methodologies that help us structure development, from understanding the problem to implementing and validating the solution. 


This is one of the foundations of our agentic development pipeline, where we combine artificial intelligence's execution capability with processes aimed at increasing control, security, and the quality of deliverables.


Among the approaches we use is Spec-Driven Development (SDD).

 

The principle is simple: before asking AI to build a solution, we need to clearly define what must be built, which requirements need to be met, and how we will evaluate the result.


But what does this change, in practice, in the way we develop software? 


What is Spec-Driven Development (SDD)?


Spec-Driven Development (SDD) is a software development approach where implementation is guided by specifications that define requirements, expected behaviors, constraints, and acceptance criteria.


Instead of starting development directly by writing code, we begin by understanding and defining the problem.


The specification serves as a reference to guide the subsequent stages, helping maintain alignment between the initial need and the delivered outcome.


Although the practice of specifying requirements is not new in software engineering, the use of generative AI has brought a new dimension to its importance.


This happens because AI models can produce code quickly, but they depend on the information provided and the available context to guide their decisions. When this information is insufficient, the model may adopt behaviors that do not correspond to what we actually need.


SDD helps reduce these ambiguities by organizing the necessary information before and during implementation. More than just documenting a request, we seek to create conditions for development to happen with clarity and verifiable criteria. 


What is the difference between SDD and prompt engineering? 


A common question is whether SDD is just a more elaborate way of writing prompts. 

The answer is no.


Prompt engineering is related to crafting instructions and providing context to guide the responses of AI models.


SDD, in turn, organizes a specification-driven development process. 

A prompt can request the implementation of a feature. A specification establishes the expected behavior of that feature, its constraints, and the conditions that make it possible to evaluate whether it was built correctly.


Imagine that we need to implement notifications in a project management system. 

An instruction like "add notifications to the system" allows the AI to start working. 

However, several questions remain open.


Which events should trigger notifications? Who should receive them? How will they be displayed? Are there individual preferences? Which situations should not trigger alerts?


Without these definitions, the AI might produce a technically functional solution, but one that differs from the actual need.


With SDD, we aim to clarify these questions and document the criteria that will guide the implementation.


The fundamental difference is that we are not just telling the AI what to do. We are structuring how the solution should be understood, developed, and validated.


This also doesn't mean that prompts cease to be important. They continue to be part of interacting with AI, but they are now used within a broader engineering process. 

How does specification-driven development work? 


SDD can be applied through a workflow that connects problem definition to software validation.


Although there are different ways to organize this process, we can understand its logic in five main stages. 


1. Problem understanding


Before thinking about implementation, we need to understand the need that originated the request. 

This involves identifying the goal of the feature, the impacted users, the business rules, and the system context. This stage helps prevent a solution from being built based on incomplete interpretations. 


2. Specification definition


Once the problem is understood, we organize the requirements that will guide development. 

The specification can include expected behaviors, business rules, technical constraints, edge cases, and acceptance criteria. It is also important to establish what should not be changed or implemented. This information helps define scope and reduce inappropriate decisions during execution. 


3. Implementation planning 


From the specification, we define how the solution can be built. Depending on complexity, planning may involve architectural decisions, identifying dependencies, and breaking down work into smaller tasks. The level of detail should be proportional to the demand. 


4. Implementation with artificial intelligence 


With the requirements and planning defined, AI can support or execute development activities. The specification serves as a reference to guide implementation and reduce the need for decisions based on assumptions. 


5. Validation of results 


The implementation must be evaluated against the established criteria. This involves checking the feature's behavior, running tests, and assessing whether changes respect the scope. Code that compiles correctly does not necessarily mean the requirement has been fulfilled. 

We need to verify whether the solution addresses the problem that motivated its development. 


What are the benefits of SDD in AI-driven development? 


The main contribution of SDD is establishing a clearer relationship between requirements and implementation.


This organization can bring important benefits to teams that use AI in software development. 


Fewer ambiguities in implementation


When requirements are clarified before execution, we reduce the need for AI to make decisions without sufficient information.


This helps ensure the result is closer to the expected behavior. 


Greater control over technical decisions


The specification makes it possible to establish constraints and guide choices related to architecture, business rules, and how the application functions.


In this way, we can better delineate the AI's autonomy and identify decisions that require human evaluation. 


Reduced rework


Correcting a requirement during specification tends to be less costly than identifying the problem after the entire feature has been implemented.


By resolving uncertainties early, we can avoid unnecessary changes and successive fixes. 


Clearer criteria for assessing quality


An implementation should not be considered complete just because the code was generated. Acceptance criteria allow us to verify whether the result matches the initial need.

 

This makes validation more objective and helps identify discrepancies between what was requested and what was delivered. 


Better alignment between humans and AI agents


In development processes involving different professionals and artificial intelligence agents, the specification can serve as a shared reference. It helps preserve relevant information and guide different execution stages.


It is important to emphasize that these benefits depend on the quality of the specifications, the context, and how the process is applied. SDD does not eliminate errors or replace testing, code review, or technical expertise. 


Does SDD require extensive specifications? 


Not necessarily. One of the points I consider most important when working with SDD is understanding that the level of specification must be proportional to the complexity of the demand.


A simple fix may require only an objective description of the problem, the expected behavior, and the criteria that prove its resolution.


On the other hand, a feature that involves multiple systems, business rules, and security requirements may need more detailed planning.


At Pitang, we have been investigating how different levels of specification and planning influence AI-assisted development.


An important takeaway is that more elaborate processes do not always represent the most efficient alternative for every situation. For certain small tasks, a lean approach can produce good results with less effort.


This reinforces a fundamental distinction: SDD should not be confused with bureaucracy or excessive document production.


The goal is not to create the largest specification possible, but to provide the necessary information to develop with quality and efficiency.


This concern also applies to the context shared with the AI. It is not enough to provide large amounts of information. We need to identify which data actually contributes to understanding and executing the task. 


What is the developer's role in an AI-driven process? 


The evolution of artificial intelligence is changing the distribution of activities within software engineering.


As AI takes on part of the implementation, developers can focus more attention on defining problems, evaluating solutions, and validating results. But this requires an important distinction: delegating execution is not the same as delegating all decisions.


When we use AI, we can transfer operational activities, such as implementing features and organizing tests. However, decisions related to architecture, security, business rules, and quality still require technical accountability.


In our studies, we have observed different levels of human involvement during AI-assisted development.


Some approaches encourage the professional to clarify doubts and participate in decisions before implementation. Others allow the AI to proceed with greater autonomy.


This difference is relevant because not every decision should be made without human evaluation. An implementation can work and still introduce unnecessary complexity. A change can fix one problem and compromise another part of the system.


Identifying these situations depends on technical expertise and context understanding.


Therefore, I believe SDD reinforces an essential competency of software engineering: the ability to transform needs into technically sound and verifiable solutions. 

AI expands our execution capacity, but it does not eliminate the importance of critical thinking. 


How is Pitang incorporating SDD into AI-driven development? 


At Pitang, we have been investing in the evolution of our engineering processes to harness the execution capacity of artificial intelligence without compromising the technical criteria that guide our deliveries.


SDD is part of this approach. Its application is connected to the development we carry out using our agentic pipeline, where we seek to organize work in a structured manner, from understanding the requirement to validating the solution.


We have also conducted experiments to evaluate different ways of applying specifications, planning, and AI-assisted execution.


Our goal is to understand which practices truly contribute to quality and efficiency, considering the characteristics of each demand. We do not assume that a more complex process will always be better.


We strive to identify when to deepen the specification, when to use leaner approaches, and which decisions must remain under human review.


This experience has reinforced an insight: adopting AI in development cannot be limited to generating code. It is necessary to rethink how we structure demands, guide implementations, and verify results. 


The future of AI development requires more method, not just more speed 


Artificial intelligence will continue to expand our capacity to produce software. However, enterprise systems need to meet real needs, adhere to business rules, integrate with other applications, and maintain security and quality requirements.


These responsibilities do not disappear when we use AI. What changes is how we can execute part of the work.


In this scenario, Spec-Driven Development represents an important approach for connecting the speed of artificial intelligence with the fundamentals of software engineering.


At Pitang, we continue to explore how to apply these practices efficiently, combining methodologies, technical expertise, and development assisted by AI agents.


I believe this is one of the paths forward to evolve the way we build software. Because developing with AI is not just about being able to write code faster. It is about knowing how to guide technology to build the right solution. 

Recife

Cais do Apolo Street, 222 - 13th floor

ZIP: 50030-220 - Old Recife Recife/PE

Tel: +55(81) 3134 5200

Fax: +55(81) 3134 5374

São Paulo

Joaquim Floriano Street, 466 - Suite 1001 - 0

Brascan Century Building

Corporate, Itaim Bibi

São Paulo/SP

Recife

Cais do Apolo Street, 222 - 13th floor

ZIP: 50030-220 - Old Recife Recife/PE

Tel: +55(81) 3134 5200

Fax: +55(81) 3134 5374

São Paulo

Joaquim Floriano Street, 466 - Suite 1001 - 0

Brascan Century Building

Corporate, Itaim Bibi

São Paulo/SP

Recife

Cais do Apolo Street, 222 - 13th floor

ZIP: 50030-220 - Old Recife Recife/PE

Tel: +55(81) 3134 5200

Fax: +55(81) 3134 5374

São Paulo

Joaquim Floriano Street, 466 - Suite 1001 - 0

Brascan Century Building

Corporate, Itaim Bibi

São Paulo/SP