DEV Community

Cover image for I turned production incidents into a haunted house, and Kiro kept the ghosts honest
Bayu Trisnapati
Bayu Trisnapati

Posted on

I turned production incidents into a haunted house, and Kiro kept the ghosts honest

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

When production breaks at 3 a.m., dashboards give you forty graphs and no story. You have to work out which service is sick, how badly, and what changed, all while half asleep.

For Kiroween I wanted an incident view you can read in one glance. Halloween handed me the metaphor: a system in trouble is a haunted house.

Try it: live demo (no login, a 48-second scripted incident) · Haunted-Ops repo · Haunted-Lab repo

Reading the house

Four services (gate, orders, payments and ledger) are four rooms of a 2.5D house at night.

  • Ghosts are errors. More and angrier ghosts as the error ratio rises.
  • Fog is latency. Fog fills a room when its p95 climbs.
  • A dark room is down.
  • A lantern and floating dust mean healthy.

Every service gets one of five levels: calm, uneasy, haunted, possessed, dark. The level is the worst of three signals (error ratio, p95 latency, availability). It only rises after 2 polls in a row and only falls after 3, so the house never flickers between states. An incident opens at haunted.

The Exorcist: an agent that can only read

When an incident opens, the Exorcist, a custom Kiro agent, walks into the most downstream sick room and investigates. It can only use the five read-only tools of our own MCP server: query_metrics, search_errors, tail_logs, recent_deploys and diff_commit. It finishes with submit_diagnosis: the culprit service, deploy and commit, a summary, a fix hint and the evidence it cited.

Each tool call is a step you can see. A mint tick lights up on a ring on the room floor, a badge on the wall counts the steps (Hunting · 4 steps, then Diagnosed), and the side panel lists every call.

Hunts are fenced in: a credit budget per hunt and per day, a 90-second timeout, a cooldown, a cap on tool calls and a kill switch. Tool output is treated as untrusted text: sanitized, size-limited and never followed as instructions.

The Exorcist can also propose a fix. A separate agent writes a patch, and the server, not the agent, runs 8 checks on it (at most 5 files and 60 lines, allowed paths only, syntax and size) before it opens a pull request. Nothing merges by itself. A person always has the last word.

Accessible by design

A spooky scene is no excuse for an unreadable one. Accessible mode swaps the canvas for a full table. Every room is a real button you can Tab to, one polite live region announces changes, text contrast is at least 4.5:1, labels never go below 14 px on phones, and reduced motion freezes every animation. There are even sound cues for ghosts, dark rooms, hunts and fixes, but they are off by default and rate-limited so an incident never turns into noise.

How Kiro shaped the build

Specs for everything, even for "make it prettier". Haunted Ops is 9 specs with 177 EARS requirements and 173 tasks, all done. The biggest one is visual-refresh: 71 tasks in 8 parts. Writing visual polish as requirements sounds odd, but it stopped the endless loop of small fixes. "The room labels are too big" became a requirement with sizes, a correctness property and a test that runs at every screen width.

Property-based tests from the design. Each correctness property in a design became a fast-check test tagged // Feature: <spec>, Property N. There are 53 property test files now, for example:

  • every fact in the scene also appears as text in Accessible mode;
  • room labels never overlap, at any screen size;
  • sound cues always obey their rate limits.

More than once a property found a counterexample I would never have written by hand, like a label touching the hunt badge on a 419 × 252 screen.

Hooks as a second pair of eyes. Four agent hooks ran the whole time:

  • typecheck-test-after-task after every task;
  • scene-table-parity on every scene save, to check the haunted house and the accessible table still agree;
  • guard-shell, which blocks destructive commands and secret paths;
  • kiro-usage-log, which writes one line per finished task (about 190 so far).

Steering as shared memory. Eight steering files (product, tech, structure, security, scene rendering, a11y and performance, MCP tools, lab chaos) meant every session started from the same rules: the Exorcist is read-only, humans merge, budgets hold, no flashing.

Narrow agents work better. The Exorcist and the fix agent got the smallest tool sets I could give them, and the MCP server they use lives in the repo with its own tests. The narrower the tools, the better the diagnoses got.

What went wrong (and what I learned)

  • My first live hunts against the chaos lab did not land a clean diagnosis. It took several runs, reading the tool traces each time, before the Exorcist named the right deploy.
  • One demo hunt stopped because a tool title started with Running:. Since then I treat every agent output strictly.
  • The log sanitizer had a ReDoS: 562 ms for a 24 KB input. A test caught it before release.

The biggest lesson: a metaphor only works if it stays consistent. Every ghost, fog bank and lantern had to mean exactly one thing, and the specs, properties and hooks in Kiro are what kept it that way.

The house is open at 3-209-32-188.sslip.io/?demo=1. Turn the sound on and watch the Exorcist work.

Top comments (0)