
How to Implement Spec-Driven Development with AI: A Pilot for Software Teams
Your team already uses AI agents to write code. The next question is whether it can deliver a change with less rework and with the same confidence when approving it. To find out, choose a real feature from the backlog and take it from a brief specification to a review with tests. This way you can observe where the agent helped and where the team had to resolve ambiguities.
In a Spec-Driven Development (SDD) pilot, the team agrees in writing what the feature should do, what cases it should cover, and how it will verify the result. The agent uses that specification to propose a plan and work in the repository. Product and engineering make the decisions that affect behavior and architecture. In the end, the same specification serves to review the implementation.
If you're looking for an introduction to the approach and its tools, start with our guide to Spec-Driven Development and intelligent agents. Here we're going to test it with a specific feature.
1. Choose a feature your team can evaluate
Look for a small change with a specific business rule and a flow the team already knows. It's best if someone from product can validate the behavior and engineering can run it in a test environment. If the team depends on several areas to resolve the scope, it will be difficult to know how much SDD influenced the result.
For this example, the team maintains an application that invites new members to an account. When an invitation expires, the administrator must ask support for help. The pilot adds the option to resend it from the application. The goal is for the administrator to solve the problem on their own and for an expired invitation not to become two active records for the same person.
Before starting, identify a recent feature of similar complexity. Note how long it took to review it and what changes the team requested after opening the review. Use only the information you can reliably reconstruct. That reference will help you interpret the pilot.

2. Write a specification that can be tested
One page may be enough for this change. The specification should state what happens to the user and under what conditions. If a rule allows two interpretations, write it as an observable case. This template can be adapted directly in the repository.
# Resending expired invitations
## Objective
An administrator can resend an expired invitation from their account.
## Acceptance criteria
- When an expired invitation is resent, the existing record is updated
and a link with a new expiration date is issued.
- If the invitation is still valid, the resend is rejected and the current
link continues to work.
- If the person requesting the resend does not administer that account,
the system rejects it and keeps the invitation intact.
- If two simultaneous requests arrive, only one renews the invitation
and queues the email send.
## Constraints
- Reuse the existing invitation system and email queue.
- Keep the current invitation creation flow.
Product can confirm what the administrator should see if someone else has just renewed the invitation. Engineering can confirm whether the repository already has a way to coordinate simultaneous requests. Resolving those questions before implementing prevents a business decision from ending up implicit in the code. Save the agreed version alongside the change so that any reviewer can consult it.
3. Ask the agent for a plan and review it before implementing
Give the agent the specification and ask it to locate the current flow, propose the minimal change, and associate each acceptance criterion with a test. The first review should be able to answer three questions. Where is it verified that the administrator belongs to the account? At what point is the invitation updated? How is it ensured that two simultaneous requests produce a single send?
The plan may reveal a decision that the specification left open. If updating the record and queuing the email occur in independent operations, a failure between the two can leave the invitation renewed with the email pending. In that case, the team must agree on how the operation is recovered using the system's mechanisms. Record the decision and ask the agent to adjust the plan before touching the code. When implementing, review the change along with its tests. A success test should verify the new expiration and that the invitation identifier remains the same. For simultaneous requests, an integration test must send both requests against the same record and check that the system queues a single email. In this case, verifying only the API response would leave the effect the user receives unchecked.  ## 4. Measure how much work it took to reach an approvable change After the review, bring together those who defined, implemented, and reviewed the feature. Use three simple measures and keep the evidence in the change history. | Measure | What to record | |---|---| | Review time | Minutes of active review from the first delivery to approval. Record separately the time spent writing and reviewing the specification. | | Rework | Changes requested after the first review and their reason. Distinguish a misunderstood rule from an implementation defect. | | Missed criteria | Criteria without a test or a check in the first delivery. Record when they were detected. | If the review was shorter, look at how much additional effort it took to prepare the specification. If there was less rework, identify which decision was resolved before writing code. And if a rule arrived unverified, examine whether the criterion was ambiguous or whether it was missing a link to a test. A single pilot provides evidence to decide what to adjust in the next feature. Repeating it with comparable changes allows you to check whether the result holds. ## Bring a real feature to the pilot A good candidate has an owner who can resolve questions, a scope that fits within a review, and a result that can be checked with tests. Bring to the first conversation the backlog story, the repository constraints, and an example of a previous change that required rework. With that, we can agree on what to test, who should review it, and how to evaluate the result. **[Bring a feature from your backlog and let's assess whether it fits an SDD pilot](https://www.kranio.io/contact#contacto).**Previous Posts

Strangler Fig: how to migrate from a monolith to microservices
Discover how to apply the Strangler Fig pattern to migrate from a monolith to microservices gradually, reduce risks, and keep the business operational.

PySpark vs Spark SQL vs Scala: differences and performance
PySpark, Spark SQL, or Scala? Compare their differences, performance, and use cases with a real lab of more than 3 million records.
