cd /news/ai-tools/what-building-a-haunted-hospital-api… · home › topics › ai-tools › article
[ARTICLE · art-181367] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

What building a haunted-hospital API tester taught me about Kiro

A developer built Sanitarium Chaos, an API resilience tester styled as a haunted 1980s hospital, for the Kiroween 2026 hackathon using the Kiro IDE. The build relied on Kiro's spec workflow to turn numbered correctness properties into fast-check property-based tests, which caught two bugs the developer says vibe coding would have shipped: a `__proto__: null` key crashing the Prisma JSON serializer and a second unspecified failure. Five steering files and agent hooks enforced rules across hundreds of changes, and a read-only security-review agent found three CLI flaws — credential-bearing URLs written to saved files, saved files redirecting replays at internal addresses, and redirects leaking custom headers — all of which were fixed.

recommendation

Write correctness properties as invariants first, then map each to one property-based test so the test hunts counterexamples instead of confirming examples you already imagined.

more in playbook: Evals and testing for LLM apps
by read2 min views4 publishedDec 3, 2026

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

I built Sanitarium Chaos for Kiroween 2026, using the Kiro IDE: an API resilience tester styled as a haunted 1980s hospital. You admit an endpoint as a patient, hostile inputs flatline it, an AI autopsy explains why, and Verify Cure replays the exact payload that broke it. The room decays as results come in (sterile, stained, dimming, dark), and the EKG beats only from recorded results.

This post is about how Kiro shaped the build, including what did not pay off.

I used Kiro's spec workflow: requirements, then design, then tasks. The design numbered its correctness properties, and each one became a single property-based test with fast-check. That mapping was the most valuable thing Kiro gave me. Two of those tests caught bugs I would never have written an example for:

__proto__: null key crashed the Prisma JSON serializer. With vibe coding I would have shipped both. The spec forced me to state the invariant first, and the property test then hunted for the counterexample.

I wrote five steering files: product, tech, security, testing and UI/UX. They held rules the agent kept applying without me repeating them: every result is labeled "controlled in-process simulation", the UI never claims anything is "secure", untrusted AI output is treated as data, and every color pair is declared and contrast-checked. A CI check even bans one word from the UI strings. Written once as steering, those rules applied to hundreds of changes.

I configured agent hooks to run lint and related tests on backend saves, contracts tests plus a frontend typecheck when shared code changes, and Prisma validation on schema edits.

I also created a read-only security-review custom agent from my security checklist. Its one run found problems in my CLI that I had missed: URLs with credentials could be written to a saved file, a saved file could aim a replay at internal addresses, and redirects could leak custom headers. I fixed all three and recorded the run in the repo.

Full spec and test rigor cost a lot of time and tokens, and most of it protected a simulated target: the three hosted demo patients are rule tables inside the backend. That made a nice demo but a weak tool. The fix was a small CLI that tests your own API from your own machine:

npx sanitarium-cli examine http://localhost:3000/your-route --body '{"key":"value"}'

Crashing payloads are saved to a "morgue" file, and sanitarium-cli replay fails a CI build if an old crash comes back. It found six crashes in one of my own NestJS endpoints, and its replay caught that my first fix was incomplete. Next time I would start with that useful core and spend spec effort only where correctness is hard.

I used an MCP fetch server only for small lookups (checking npm package names), and I did not use Kiro powers.

Written for the Kiroween 2026 hackathon. #KiroweenHackathon26

── more in #ai-tools 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/what-building-a-haun…] indexed:0 read:2min 2026-12-03 · —