Written for the #KiroweenHackathon26

Every on-call engineer has met the 3 a.m. alert. It is extremely sure that something is broken and has no idea what. The answer is always somewhere across four tabs: a dashboard, a log search, a trace viewer and git log, which is where you go to find out who to be quietly disappointed in. Usually it's you.

The trendy answer is "let an AI agent fix it". I've read enough post-mortems to know that sentence is how the next post-mortem starts. So for Kiroween I built the opposite: Reanimate, an AI that investigates incidents, has to prove everything it says, and is allowed to change exactly one config value, and only after a human says yes.

Try it: https://43-205-111-8.sslip.io (the replays need no login) · Code: https://github.com/chandrakantdubey/project-reanimate

What it does, in one breath

I break a tiny demo shop on purpose. A real Prometheus alert fires. Reanimate collects the metrics, logs, traces and Git diffs around it, and an LLM explains the cause, citing the evidence by ID. Cite something that doesn't exist and the whole answer gets thrown out. If the cause is a bad config deploy, it proposes a one-line fix, tests it in a sandbox, waits for me to approve the exact diff, and opens a draft pull request. It never merges anything. I like my job.

The fun part is the second fault. Payment gets slow, checkout times out, and the symptoms look identical. The "obvious" fix, a bigger timeout on checkout, would just hide the problem. Reanimate blames payment and refuses to patch. An AI that knows when to keep its hands in its pockets. Rare. Beautiful.

Kiro did the typing. Here's what made it good at it.

Steering: rules it can't forget

I gave Kiro my product documents and it turned them into four steering files: product, security, tech stack, testing. They ride along with every single agent turn, which is more than I can say for my own memory of the requirements.

The one that saved me:

Scenario IDs, fault names, expected remediation values, oracle, and lab control metadata MUST NEVER enter: alert labels, evidence metadata, model prompts...

Kiro's first draft of the investigation prompt helpfully explained both scenarios to the model. Which is like handing a student the exam with the answers stapled to the back. Because of that steering rule, the agent caught it in its own draft and rewrote it into one generic prompt. I wouldn't have spotted it. It looked like a great prompt. It was a great prompt, for cheating.

Specs: the plan, then the receipts

The project lives in eight Kiro specs, from "make a repo" to "put it on the internet for judges", each with requirements written as plain WHEN ... THE SYSTEM SHALL statements and a task list.

The hosted-demo spec is my favourite, because its final task wasn't "tests pass". It was "deploy it and check these exact things on the real server": only ports 22, 80 and 443 open, internal paths hidden, 401 for strangers, 403 for cross-site requests, 429 for anyone hammering the login. That task found that my sign-in page was redirecting people to https://localhost:3000. Very welcoming, if you happen to be my laptop.

Hooks: the nagging I needed

  • Save a TypeScript file and Kiro typechecks just that package.
  • Save a test and the test suite runs.
  • Finish a spec task and an agent hook checks it against the acceptance criteria. My favourite line in its prompt: "Do not mark tasks complete based solely on file creation." Relatable.
  • And before every shell command, a hook checks whether it's a git commit or git push carrying a secret from my .env. If so, blocked.

That last one matters because the agent commits and pushes by itself. I tested it by staging a real secret on purpose. Blocked, and it printed only the variable name, not the value. Trust, but hook.

Custom agents: a second pair of very suspicious eyes

An agent that just wrote the code is about as objective as a parent at a school play. So I made two read-only custom agents with fresh context: a security reviewer and a submission auditor.

I ran the security reviewer on launch day. It came back with a Critical: my Next.js version was hit by a known unauthenticated remote-code-execution bug. Then a High: scripts that run as root lived in a folder the web app could edit, which is a scenic route from "website hacked" to "server owned". Both fixed before anyone saw the site. I'm reasonably sure I'd have shipped both with a smile.

The auditor reads the repo against the hackathon rules and points at every claim in my docs that no file backs up. It also runs from Kiro CLI, so I can be judged from the terminal as well as the IDE.

Property-based tests for the scary bits

Kiro wrote 16 fast-check properties for the things that must never break. My favourite throws random changes at an approval: a different diff hash, an old base commit, a wrong policy version. Every single one has to be refused by the real API, with the database untouched. Because "the human approved something" is not the same as "the human approved this".

How it went

On the hosted demo every run got both faults right: about 80 seconds from fault to incident, then a cited diagnosis in under 40 seconds, from one model call of around 8k tokens. The config fault ended as a verified draft PR. The slow dependency ended as a polite, well-evidenced "not my fault". That one's my favourite.

My favourite thing about Kiro

Steering. Hands down.

Before this project, my "instructions" to AI tools were vibes: a polite paragraph at the start of a chat that got forgotten three answers later. Steering changed that. The rules sit in the repo, ride along with every turn, and the agent holds itself to them, even against its own drafts. The prompt-with-the-answer-key moment is the proof.

How it changed the way I build: I now write the "must never happen" list first, with a reason next to every rule, before a single line of code. Turns out an AI follows a rule with a reason far better than a rule with an exclamation mark. So do humans, to be fair.

The bit I'd tell a friend

Kiro is fast. What made it good was everything I put around it: steering that says what must never happen and why, specs that end with a real deployment, hooks that nag, and a second agent whose only job is to be unimpressed.

Which is, now that I think about it, exactly what Reanimate does to its own AI. Turns out I built the same guardrails twice. Very Frankenstein.