A haunted-cemetery demo of how a deleted record returns from a backup, and what three weeks of building it with Kiro specs and steering taught me.

I wrote this post as part of the Kiroween Hackathon 2026, about building Afterimage with Kiro.

You delete a customer record from the main database. The app says it worked, and the row is gone. A month later someone restores an old backup to fix an unrelated problem, and the customer is back in the database as if nothing happened.

Afterimage is a small web app that shows this happening, one step at a time, with fake data. It is our entry in the Costume Contest category of Kiroween 2026, so the whole thing is dressed as a haunted cemetery: every place the data lives is a grave, and a record that comes back from a backup returns as a ghost.

In this post

  • What Afterimage shows: a deleted record that comes back from a backup, and why the app refuses to call a failed check "clear".
  • How specs, steering files and tests-first work kept an AI agent on the rules for three weeks.
  • A run that looked like a bug, and how timestamps showed it was not.

The Afterimage cemetery map with four graves for the primary database, the analytics replica, the file export and the backup vault.

The cemetery map at the start: one grave per place the record is stored.

What the app does

One fictional customer, Evelyn Marlow (CUS-0713), is stored in four places on AWS: the primary database (DynamoDB), an analytics copy of that table, an exported file in S3, and a versioned backup snapshot in S3. You go through four steps:

  1. Erase the primary record.
  2. Scan all four locations.
  3. Restore from the backup.
  4. Read the report.

After each step the app reads the store again and shows what it found, with the UTC time of the read. In the run from the demo video, the primary read comes back empty after the erase, the backup vault still holds Evelyn's record, and after the restore a new read of the primary finds her again.

Scan results where the primary database is verified clear while the backup vault and the file export still show a copy.

After the scan: the primary database is clear, but the backup vault and the file export still hold a copy.

Restore result showing the primary database holding the record again, restored from snapshot SNP-0042.

After the restore: a new read of the primary at 12:54:19 UTC finds the record, restored from snapshot SNP-0042.

One rule sits behind every screen. The app only says something when it has just read it from the store. If a read fails, the screen says "Unverified". A failed check is never shown as clear.

Specs before code

Kiro gives you two ways to work. You can chat with the agent and let it write code as you go, which is the vibe coding most people know. Or you can start from a spec: a requirements file, a design file and a task list, which the agent then works through one task at a time.

Most of Afterimage went through specs. The repository has six of them: the foundation (contracts and the four stores), erase and restore, verification, reporting, the AWS serverless backend, and the demo video. Each task in a spec has a "Start task" button in the IDE, and Kiro keeps its own record of when each task ran. When a session ended, the next one picked up from the task list instead of from my memory of what we had done.

Steering: rules the agent reads every time

My favorite Kiro feature is steering. Steering files are plain Markdown files in .kiro/steering/, and Kiro adds them to every session. (Steering also has other inclusion modes, such as loading a file only when you work on matching files, but I used the always-on mode.) I wrote the project's hard rules there once, at the start. Two of them:

  • UNKNOWN on missing/failed/inaccessible evidence; never report unknown as PASS.
  • Never deploy, bootstrap CDK, configure account credentials, change IAM or spend money without explicit owner approval.

The agent kept to both across three weeks of sessions. Every AWS step stopped and waited for my approval: first a read-only identity check, then cdk diff for me to review, then the deploy, each as its own step. The build log records every one of those approvals.

Another steering rule says tests come first. The agent wrote failing tests before the code, and it often broke the code on purpose to prove the tests would notice. For example, when it removed the conditional write from the DynamoDB save, 6 tests failed; then it put the code back. By the end of the project, the backend had 572 Vitest tests and 21 Node tests passing.

The run that looked like a bug

My favorite moment came near the end. We needed to prove that a failed read really shows "Unverified" on the deployed app. To make the read fail on purpose, Kiro added a temporary IAM policy that blocked the read-only verifier role from reading the primary table, then ran a restore.

The first attempt showed "Resurrected" and "Return confirmed", the exact screen that should not appear. Without the timestamps, that looks like a bug in the app.

Kiro checked the times instead. The block was attached at 12:19:35 UTC and the restore read happened at 12:20:06 UTC. An IAM policy check run a minute later showed the block active, which meant IAM had not applied it yet when the read went through. Kiro marked that case as a normal restore, removed the block, and ran it again with a 150-second wait. The second run showed "Primary database · Unverified" and no ghost. A direct read with my own credentials confirmed the record had been written, so only the evidence read was blocked, which is exactly what the test needed.

That changed how I work with an agent. I now ask it to write down what it ran, when, and what it did not check. The build log for Afterimage grew to about 900 lines, and most entries end with a list of what was not done or not checked.

Running it on AWS

The backend is TypeScript on AWS: API Gateway HTTP API, Lambda on Node.js, DynamoDB, and S3 with versioning, all defined with AWS CDK. The site is a static build served from a private S3 bucket through CloudFront at afterimage.web.id. Each case expires after one hour, and a budget alarm emails me when the month's spending nears or passes 5 USD. The Cost Explorer export I checked showed 0 USD for every service listed.

Kiro also tested the deployed site in a real browser, limited to the site's own domain, and read the labels from the page's accessibility tree to check what a visitor would see.

The report certificate comparing the primary read before the import with the read that found the record again.

The certificate compares the primary read before the import with the read that found the record again.

The demo video

The 2:48 demo video was also made in Kiro, in the same repository, as the sixth spec. The scenes are HTML compositions rendered to video with HyperFrames, the voiceover is from ElevenLabs, and the footage comes from one recorded run on AWS. Before the final cut, two custom agents I had defined, demo-reviewer and privacy-reviewer, reviewed the script and the evidence files. One thing to know if you try this: according to the docs, custom agents do not load steering files on their own, so you list them in the agent's resources setting.

https://www.youtube.com/watch?v=RFHbdcOuTEo

What I would tell someone starting with Kiro

Write your steering files before you write code, and put the rules you would hate to see broken there. Turn anything you would have to explain twice into a spec. And ask the agent to record what it did not check, because that list tells you what to test next.

Afterimage uses fictional data only. It shows a risk with backups; it is not a compliance tool.

Originally published at alfianh.id.