Your Spec Has Bugs. Catch Them Before Your Agent Codes.

Rajath Mahendrappa Kotyal, AWS07:50 · Nov 2026 · 3,617 views
Thumbnail for Your Spec Has Bugs. Catch Them Before Your Agent Codes. Watch on YouTube
TL;DR
  1. 1

    Kiro checks specifications for contradictions, gaps, and ambiguous wording before a coding agent generates code.

  2. 2

    The system translates requirements into SMT formulas and uses a satisfiability solver to test whether interpretations can hold together.

  3. 3

    LLMs generate possible interpretations, but the user resolves unclear requirements because domain knowledge cannot be guaranteed by the tool.

Summary

Rajath Mahendrappa Kotyal presents Kiro, a specification analyzer for checking requirements before they reach a coding agent. He shows how individually reasonable rules can conflict when read together, such as placing an unavailable item on back order while also forbidding every back order. Kiro first asks an LLM to refine the wording. When that is insufficient, it translates the English into SMT formulas and sends them to a satisfiability solver. The system samples several translations, groups them by logical equivalence, and uses the different interpretations as evidence of ambiguity. It can also identify gaps where no rule covers a case. The tool offers the user possible resolutions, asks them to decide, or abstains from implementing the unclear rule. Kotyal is clear that the user remains responsible for correctness because implicit domain knowledge cannot be supplied reliably by an LLM or solver.

Key ideas
00:21

Specifications can contain rules that are individually sensible but jointly impossible

Kotyal uses an e-commerce example. One rule says that when an order is submitted while inventory is unavailable, the order should become a back order. Another says that no order should ever be placed as a back order. Each sentence appears reasonable on its own, but both cannot hold at the same time. A coding agent given the full specification may faithfully implement the contradiction. The analyzer aims to expose this conflict before design or code generation begins.

02:10

The analyzer checks wording, relationships between sentences, and missing cases

Kotyal says specification bugs appear at different levels. A sentence may use the wrong wording or level of detail, while separate sentences may conflict or leave a gap. His example of a gap is an idle order for which no rule describes what should happen. The goal is to review these files before code is written, in the same way that teams inspect design documents, diagrams, and flowcharts before implementation.

02:34

An LLM refines the text before formal reasoning is used

Kiro uses a three-step process. First, an LLM tries to clean up the specification's wording by itself. If that does not resolve the issue, the system formalizes the English into SMT formulas. A satisfiability solver then returns whether the resulting expression is valid. When it detects ambiguity within a sentence or a conflict between sentences, the system sends the sentence back to the LLM for another pass.

03:47

Multiple translations reveal when an LLM is interpreting a requirement in different ways

After detecting a possible problem, Kiro asks the LLM to translate the requirement repeatedly, using seven or ten translations in Kotyal's example. It compares the interpretations through logical equivalence and clusters the translations that share the same assumptions. Different clusters indicate that the wording permits different meanings. The system can then ask the user to resolve the ambiguity or abstain from implementing the affected rule.

05:09

Ambiguous actions need an explicit decision from the user

Kotyal gives the phrase "remove the record" as an example of wording that is too vague. It could mean deleting the record permanently, or keeping it while hiding it from users. Kiro presents these possible interpretations and asks which one the user wants. The tool does not silently choose an implementation for a requirement with multiple plausible meanings.

06:01

The user remains the authority on specification correctness

Kotyal says there is no correctness oracle for a specification other than the user. A solver can find logical problems, and an LLM can suggest rewrites, but neither has the project's implicit domain knowledge. The user must still check every part of the rule set before passing it to an agent. He also says there is limited evidence so far about how formalization should be used in agents.

06:56

The workflow is translate, check, then decide

Kotyal summarizes the division of work as: the LLM translates, the solver checks, and the human decides. Logical-equivalence clustering helps show where the model has produced genuinely different interpretations. If the user cannot resolve an issue, the system can use an LLM judge or abstain from implementing that part of the specification.

"User needs to make sure to check every part of the snippet part of the rule book before sending it to the LLM."06:01
Who should watch
  • You give coding agents long requirements documents and want to catch contradictions before they become design or implementation work.
  • Your specifications contain business rules with missing edge cases or phrases that can be interpreted in more than one way.
  • You are evaluating formal methods alongside LLM-based checks and want to understand where a solver helps and where a human still has to decide.