cd /news/ai-agents/how-spec-driven-agents-in-kiro-kept-… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-178587] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=↑ positive

How spec-driven agents in Kiro kept my QA benchmark honest

A developer built Poltergeist, a proof-driven behavioural QA tool in which AI "ghost" agents probe a web app like difficult customers while independent code judges whether real harm occurred, using Kiro's spec-driven workflow to keep the benchmark honest. On a blind holdout, the ghost crew verified 4 of 12 seeded defects versus 1 of 12 for a deterministic crawler. Separate builder, ghost-smith, judge and mutant-maker agents with scoped permissions, plus a PreToolUse "protect-mutants" hook, ensured the agents that build and score the benchmark cannot read the mutants the ghosts must find.

recommendation

Define agent permission boundaries on day one and add a PreToolUse hook that blocks reads of benchmark internals from the wrong context, so scoring agents cannot see the defects they must find.

more in playbook: Securing agents and AI tools
by read3 min views5 publishedNov 30, 2026

I spent Kiroween 2026 building Poltergeist β€” proof-driven behavioural QA, where AI "ghost" agents test a web app like difficult customers and independent code decides whether real harm happened. But this post isn't really about Poltergeist. It's about the thing that made it possible to trust my own results: building it in Kiro, spec-first, with agents I could wall off from each other.

Poltergeist claims a number β€” on a blind holdout, the ghost crew verified 4/12 seeded defects versus 1/12 for a deterministic crawler. A number like that is worthless if the part of the system that builds the hidden defects can also see them. The whole result collapses into a lie.

This is where Kiro stopped being "an AI IDE" and became the architecture.

I ran the build as a sequence of specs β€” foundation, the shop, the oracles and contract rules, the Playwright driver, then the CLI and benchmark. Each spec was the contract. When I came back after a day away, I didn't re-explain the project; the spec already said what "done" meant. For a solo builder racing a deadline, that continuity was the difference between momentum and re-litigating decisions every morning.

I defined separate agents β€” a builder, a ghost-smith, a judge, and a mutant-maker β€” each with scoped permissions. The permissions weren't a convenience; they were the proof. The agents that build and score the benchmark cannot read the mutants the ghosts have to find. At one point an agent tried to read something it shouldn't and came back with, essentially, "I'm not allowed to look at that." That refusal is the feature. It's what lets me put the 4/12 number in front of a judge and mean it.

A PreToolUse hook β€” "protect-mutants" β€” blocks any read of mutant internals from the wrong context. Before I froze the benchmark corpus, it caught a path that would have leaked a mutant and manufactured a false positive. I would not have seen it by eye. The hook did.

Steering files (product, structure, tech) kept conventions consistent across every spec and agent, so the codebase didn't drift as it grew. And I leaned on property-based testing with fast-check so the contract rules held across seeds, not just the handful of cases I'd have thought to write by hand.

I didn't use Kiro Crew or the web features β€” everything was IDE, spec-driven. If I ran it again I'd lean on specs even earlier, before writing a line of the shop, and I'd define the agent permission boundaries on day one instead of hardening them later.

The believable part of an AI testing tool isn't the AI. It's the proof around it. Kiro let me express that proof as structure β€” specs that hold the line, agents that can't see what they shouldn't, hooks that stop me making the exact mistake that would invalidate the result. That's not scaffolding I bolted on. It's the reason the number means anything.

Poltergeist: the ghost finds, the oracle judges, the replay proves.

▢️ Demo: [https://youtu.be/DDZZjSN0u3o](https://youtu.be/DDZZjSN0u3o)

πŸ’» Code: [https://github.com/lk-nyoka/poltergeist](https://github.com/lk-nyoka/poltergeist)
── more in #ai-agents 4 stories Β· sorted by recency
── more on @kiro 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/how-spec-driven-agen…] indexed:0 read:3min 2026-11-30 Β· β€”