Skip to main content

Spec-Driven Development and Context Engineering—A Smarter Approach to AI-Enabled Coding

Brenno Oliveira of Kyndryl explains why this measured approach beats "vibe coding" as a reliable path to desired results

TechChannel AI

As Generative AI becomes commonplace in the world of software development, the way we interact with it must evolve. Traditional “vibe coding”—where developers describe a goal and hope the AI generates usable code—often leads to mismatches between intent and output. This is where context engineering and, more specifically, spec-driven development, come in, offering a structured, scalable and more reliable approach to building software with AI.

What Is Context Engineering?

Context engineering is the practice of designing and managing the information that an AI model is given, so that the AI produces the desired results reliably. With good context quality and coverage, the output produced by AI will be much more aligned to what is intended when asking it to do something.

Here are some quick best practices when providing context to AI:

  • Define rules to be followed by the agent and requirements for the final product.
  • Avoid unnecessary details, noise and ambiguity.
  • Provide context in a consistent and structured format.

Context engineering is important because AI Models have a relatively large, but still limited context window—usually somewhere around 130,000 tokens. Deciding what information to put into that window is crucial to getting the best quality output possible. AI agents are literal-minded; they excel at pattern recognition but struggle with ambiguity. A bloated or unclear context can lead to misinterpretation, bugs or misaligned outputs.

What Is Spec-Driven Development?

SDD is a context engineering framework for agentic-AI-enabled coding. Instead of jumping right into writing code after a single prompt and documenting everything later, developers begin with a specification—a clear and structured document (or documents) outlining the what, why and how of a feature or system. This spec then becomes the source of truth for AI agents, guiding them to generate code that aligns with the intended user experience and business goals.

In practice, this is generally the process followed when working with SDD:

  1. Specify – Define the user journey, goals, success metrics, desired architecture and more—the more valuable context you can provide without overloading the context window, the better.
  2. Plan – Define an implementation plan for the specification defined on the initial input. This will often be a list of tasks that can be executed one-by-one by the AI agents.
  3. Generate – AI agents will generate the code following the specifications and tasks under them.
  4. Validate and iterate – Run generated tests, manually validate the implementation and establish a feedback loop to perform adjustments as needed.

This method reduces ambiguity, improves alignment across teams and AI-enabled coding sessions and leads to AI producing more accurate code.

Tooling Landscape

Since this is a relatively recent concept when it comes to AI-enabled development, the landscape is evolving literally every week that passes. Due to that, the actual implementation of SDD and the features provided by each tool are slightly different, so let’s take a quick look at some of the available tooling today.

GitHub – Spec Kit

Spec Kit is the open-source toolkit for SDD by GitHub. It integrates with popular AI coding agents like GitHub Copilot, Claude Code and Gemini CLI. Spec Kit has a multi-phased process for spec definition where each document generated is responsible for one aspect of the project.

For example, the constitution step is meant to store the project’s governing principles and development guidelines, while the plan step describes the technology stack that should be used and the architecture choices.

Features:

  • Structured spec creation workflows (constitution → specify → plan → tasks → implement)
  • Integration with multiple coding agents for seamless handoff
  • Encourages creating a variety of separate spec documents

AWS – Kiro

Kiro, from AWS, is an AI-focused integrated development environment (IDE) that implements SDD at its core. It’s designed to treat AI as a strategic partner, helping developers think through problems and creating a solid specification before coding.

Kiro has been built with AI development in mind, and aside from implementing SDD, it also provides a method to trigger AI Agents when something occurs on your project. For example, you can define a hook for the Agent to update the documentation when a file is saved.

Features:

  • Purpose-built conversational spec generation and execution
  • Relatively focused specifications (requirements → design → tasks)
  • Agentic hooks for automated triggering of AI Agents

Fission AI – OpenSpec

Fission AI’s OpenSpec is a lightweight, open source, spec-driven framework focused on making AI coding assistants more predictable and verifiable. The key differentiator is that it separates the source of truth (what is currently implemented) from proposed changes by keeping specs in different locations and tracking these separately as you work with the code.

This allows OpenSpec to not only work well with greenfield implementations (0 → 1) but also do a pretty good job at modifying existing behavior (1 → n). When the implementation is complete and it’s accepted by the human in charge, the proposed change is archived, and the source of truth spec is updated.

Features:

  • Minimalist spec-driven workflow (proposal → apply → archive).
  • Source of truth spec is kept separate from proposed changes specs.
  • Defines spec “deltas” to add/remove/alter features.

A step in the right direction

While SDD offers a more disciplined and accurate approach to AI-enabled coding, it’s still not foolproof.

Poorly written specs or messy context can still derail development, so I encourage you to play around with each of these tools, building small projects to get a feel for it before committing to any one of them and applying this technique on larger production projects.

Another caveat for current implementations of SDD is that, often times, the specs generated by the AI Agents are too large, with unnecessary bloat and assumptions. I still find it best to manually tune the specs and remove a lot of generated text in favor of more concise statements. Remember, your output will only ever be as good as your input; garbage in, garbage out is the name of the game.

Be a Part of the Solution

Every day there are thousands of developers out there creating solutions that aim to increase the level of quality code that our AI buddies can create, and we should all try to be up to speed with these new solutions.

Go out there and try out one (or all) of the tools covered in this article and provide their developers with feedback so that we can collectively push the industry forward.

SDD is an exciting development in the AI-enabled coding landscape, and I am very excited to see how it evolves over time—and how big of an impact it will have on the future of software development.


Key Enterprises LLC is committed to ensuring digital accessibility for techchannel.com for people with disabilities. We are continually improving the user experience for everyone, and applying the relevant accessibility standards.