DEV Community

Kohei Miyata
Kohei Miyata

Posted on AI-assisted

The AI Got the Answer Right. The Evidence Was Broken.

The AI Got the Answer Right. The Evidence Was Broken.

Building more trustworthy rule-based software with Kiro for Kiroween 2026.

A correct answer isn't always a trustworthy answer

Imagine an AI system updating a benefits calculator after an official policy change.

It generates the correct monetary amount.

But the supporting quotation contains corrupted characters, and automated evidence verification fails.

The answer is correct. The evidence is broken. Should the update be accepted?

This is a real problem I encountered while working on my Kiroween 2026 project, Changeling Kit.

The experience reinforced an important lesson:

AI-generated code should not be trusted simply because its output looks correct.

The problem I'm trying to solve

Many applications depend on rules that change over time: public benefits, eligibility requirements, financial policies, and regulations.

When those rules change, existing software can become outdated without anyone noticing.

A calculator might still return a perfectly formatted answer based on last year's rules.

For Changeling Kit, I'm exploring how to build reusable rule-based applications that can adapt to changes while preserving traceability and human oversight.

Rather than letting an AI freely rewrite production logic, I want changes to pass through a verifiable process.

Using Kiro beyond code generation

For this project, I'm focusing on several aspects of Kiro-assisted development.

1. Specs: Making expectations explicit

Kiro's spec-driven workflow provides a way to express requirements and design decisions before and during implementation.

For rule-based software, requirements need to cover more than the calculation itself.

They must also address where a rule came from, when it applies, and what should happen when supporting evidence cannot be verified.

2. Hooks: Turning verification into a development habit

Verification should not depend entirely on developers remembering to run the right checks.

Kiro Hooks provide a way to incorporate checks into the development workflow.

The goal is to make verification a repeatable part of implementing changes, rather than an optional final step.

3. Ground truth: Testing against independent expectations

One risk with AI-generated software is allowing the same AI to generate both the implementation and the tests that supposedly prove it correct.

Those tests may share the same mistaken assumptions.

Independent, known-correct examples provide another reference point.

Property-based testing can check broader behavioral expectations, but passing tests alone does not prove that an interpretation of a policy is correct.

4. Signatures and provenance: Knowing what was verified

An evidence-based workflow also needs to distinguish the information being checked from the information presented to users.

Signatures and integrity checks can help establish whether an artifact has changed.

However, a valid signature does not prove that the underlying interpretation is correct.

Integrity, provenance, and correctness are different properties, and each requires appropriate checks.

The failure that changed how I think about verification

During development, an AI-generated proposal produced the correct monetary result, but its supporting quotation suffered from character corruption.

That caused automated verification to fail.

This is a useful distinction.

A calculator can produce the right number while failing to provide trustworthy evidence for that number.

The appropriate response is not to ignore the verification failure simply because the output looks plausible.

Instead, the development process needs to preserve the failure, investigate the cause, and verify the correction.

That experience also highlights why additional review matters.

I'm incorporating Kiro Crew into the workflow to explore how another review stage can help scrutinize proposed changes before human approval.

The objective is not to eliminate human judgment. It is to make that judgment better informed.

What I've learned so far

This project has changed how I think about AI-assisted development.

Generating code quickly is useful. But in domains where rules affect people's money or eligibility, correctness requires more than plausible output.

The important questions are:

  • Can we trace a decision back to reliable evidence?
  • Can independent tests challenge the implementation?
  • Can we detect when evidence itself is corrupted?
  • Can we distinguish verified changes from proposals that still require review?
  • Can humans understand why a change should be accepted or rejected?

These are the questions I'm exploring with Kiro.

What's next

I'm continuing development of Changeling Kit, including its reusable rule-processing approach and verification workflow.

I plan to share the implementation and further lessons as the project progresses.

The most valuable outcome of this experiment may not be faster code generation.

It may be learning how to build systems that know when an AI-generated change is not yet safe to trust.


This article was written as part of the Kiroween 2026 hackathon.

AI disclosure: AI tools assisted with drafting and English editing. The technical experiences and conclusions are subject to review by the author.

Top comments (0)