cd /news/ai-tools/deleted-is-never-dead-building-after… · home › topics › ai-tools › article
[ARTICLE · art-181944] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Deleted is never dead: building Afterimage with Kiro

A developer built Afterimage, a demo web app for the Kiroween 2026 hackathon that shows how a deleted customer record can reappear after an old backup is restored, tracking one fictional record across four AWS stores (DynamoDB, an analytics copy, an S3 export and a versioned S3 snapshot). The app only reports what it has just read from a store, labeling failed reads "Unverified" rather than clear, and was built largely through six Kiro specs plus always-on steering files that enforced approval gates on every AWS step and a tests-first rule, ending with 572 Vitest and 21 Node tests passing.

recommendation

Put project hard rules in always-on .kiro/steering/ Markdown files and require per-step approval for AWS actions so coding agents stay on policy across sessions.

more in playbook: Working with AI coding agents
by read6 min views1 publishedDec 4, 2026

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 cemetery map at the start: one grave per place the record is stored.

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:

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.

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

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.

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.

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 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:

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.

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.

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 certificate compares the primary read before the import with the read that found the record again.

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 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.

── 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/deleted-is-never-dea…] indexed:0 read:6min 2026-12-04 · —