blog

Spec-driven development: rethinking how security fits in

Security decisions now live in the specification, long before the pull request. How to tell which level of agent ownership your team is at, and where security fits.

Itamar Falcon avatar
Itamar Falcon
Calculating...
Spec-driven development: Rethinking how security fits in

You’ve probably heard spec-driven development come up in conversations with engineering, if it hasn’t already made its way into your security team meetings. Like most things in cybersecurity, engineering is quick to adopt, while we’re still figuring out what it means for security. In spec-driven development (SDD), engineers define what the software should do and the requirements it needs to meet in written specifications. Agents then use those specifications to plan, build and test the software.

The catch for security is that development decisions, and the security implications that come with them, are now documented in specifications and plans before code is even written, while most security reviews still happen at the pull request. That means we need to understand the security implications before code reaches us. To get there, we’ll look at how SDD works from an engineering perspective, the different levels of agent involvement and how to identify which level your organization is at, so you know where security needs to get involved.

What spec-driven development looks like in practice: five levels of agent ownership

In September 2025, GitHub introduced Spec Kit, a useful resource for putting spec-driven development into practice. Engineers define what needs to be built in a specification. Agents use it to create a technical plan, break the work into tasks and implement the feature, with engineers reviewing the outputs before moving forward.

Not all spec-driven development looks the same. Teams hand different parts of development to agents, with different expectations for human review and approval. At the far end, in August 2026, Uber stated that more than 70% of its pull requests were attributed to AI agents.

It’s becoming a bigger priority for security teams, too. According to an October 2026 a16z survey of 100 CISOs at companies with more than 1,000 employees, 83% already run coding assistants or agents in production. Nearly half rank AI code security among their top five priorities for 2027, up from about a quarter for 2026.

But let’s put those numbers into perspective. The transition doesn’t happen overnight. Using an agent to write code is very different from having agents design, build and ship an entire feature. Agent ownership progresses through different levels, from basic coding assistance to a software factory where agents own every stage.

For security teams, the important thing is knowing where engineering stands today. It helps to think about agent adoption in levels. Each level changes where security requirements need to be defined, who checks them and what can slip through. You don’t need to be at the highest level to start adapting your security process.

To keep it simple, we use five stages: requirements, design, build, review and production. Your process may split them differently. The handoffs between them are what matter.

Five levels of agent ownership across requirements, design, build, review and production
Figure 1: Five levels of agent ownership

Level 0: Agents assist.

Engineers own every stage, using agents as copilots for individual tasks. They carry requirements, specifications and plans between stages and review agent-generated code.

What changes for security: Nothing yet. Security relies on code reviews and existing checks, with engineers responsible for carrying security requirements through development.

Level 1: Agents design.

Engineers write the specification. Agents turn it into a technical plan and task list, which engineers use to build the feature.

What changes for security: Requirements need to shape the design, not depend on engineers adding them during implementation.

Level 2: Agents build.

Engineers own the design and provide specifications, plans and tickets. Agents use them to implement the feature and submit pull requests for review.

What changes for security: Instructions must include security requirements and reviews must verify the code meets them.

Level 3: Agents design and build.

Engineers write the specification. Agents turn it into a plan, build the feature and submit pull requests for review. Engineers approve the pull requests before work moves forward.

What changes for security: An assumption in the specification can carry through to implementation without an engineer challenging it. Security needs input before design and review of both the decisions and the code.

Level 4: The specification is the code.

The software factory is in full swing. An engineer writes the specification, and agents carry it through design, implementation, pull requests, review and production without routine human approval.

What changes for security: Security requirements need to be explicit in the specification, with automated checks and release gates to enforce them and clear conditions for when human approval is required.

Now take the last feature your team shipped. As you follow that feature from requirements through production, ask yourself five questions at each stage:

  1. Which agents worked here, and what did they do?
  2. What had to happen before work could move to the next stage?
  3. Where did a person have to approve?
  4. What gets passed to the next stage? A specification, ticket, document or prompt?
  5. Who was responsible for security? A rule, a person, an agent working alongside the other agents or nobody?

Use your answers to identify gaps at the handoffs like security requirements that don’t reach the next stage, approvals without clear criteria or stages with no security owner.

How security requirements get lost in spec-driven development

A pull request review can easily miss what the specification never said. Take a simple password reset. The specification says users can reset their password through a link sent by email. It does not say when that link stops working.

A security review of the specification would have raised a few questions before development began: When does the link expire? Can it be used more than once? How many reset requests can a user make in a minute? What happens to existing reset links after a password is changed?

But hand that specification to an agent and it has to fill in the gap. It may pick an expiry. It may not. Either way, a security decision has been made that nobody explicitly specified or approved.

Run the same specification five times, and the results could all agree while carrying the same unapproved decision. A reviewer comparing the outputs would find no disagreement to flag.

Here’s how that decision carries through development:

Requirements: The engineer writes a specification describing how users reset their password but leaves out when the link stops working.

Design: The agent fills the gap in the plan it produces, making a security decision nobody explicitly approved.

Build: Agents turn that plan into code, carrying the assumption into implementation. Separate runs may make the same decision.

Review: The outputs may agree, leaving no disagreement to flag. Comparing results won’t reveal a security requirement that was never specified.

How that missing requirement gets handled also depends on the level of agent adoption:

Level 0: The engineer owns the design and can define the expiry even if the requirements leave it out.

Level 1: The planning agent may overlook the expiry, but an engineer can add it out of habit.

Level 2: The agent can build the feature without an expiry, and the engineer may only notice during code review.

Level 3: The planning agent can leave out the expiry, and the coding agent can carry that assumption into implementation without questioning it.

Level 4: Agents can carry the missing requirement all the way to production if no automated check catches it.

Ultimately, the challenge for security is to read the specification for what it does not say, remember at review what was decided at design and challenge assumptions before they reach production.

Prioritizing security’s role in spec-driven development

For years, design and threat model reviews reached only the big features, because most work was never written down before it was built. Everything else we caught after the code was written.

Spec-driven development gives us a chance to change that. The decisions that guide development are now written down for every feature, in specifications we can review before anything gets built. We can catch missing security requirements, question assumptions and influence decisions we would otherwise see only at the pull request.

Now is the time to shape how security fits into the process before agents start making those decisions for us.

Figure 1 is your blueprint. Bring it to your next engineering meeting and use it to map where security fits into the spec-driven development workflow. Leave with clear answers on which decisions need security input, where reviews should happen and who owns them.

In the next post, Clover engineers will show you the team’s software factory, how they put SDD into practice and how they secure it.

Until then, read Clover’s research on why giving agents the right context will be more important than simply giving them more of it.