How spec-driven agents in Kiro kept my QA benchmark honest
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.
The problem: a benchmark that can't cheat
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.
Specs as the source of truth
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.
Custom agents, and a fairness wall
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.
Hooks caught a mistake before I did
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 and property-based tests
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.
What I'd do differently
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 takeaway
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
💻 Code: https://github.com/lk-nyoka/poltergeist


