Dev.to WebDev πŸ›  Dev πŸ‘ 2 πŸ“– 2 min read

1,442 passing tests and the wrong price of gold: building a haunted market with Kiro

This post was written as part of the Kiroween 2026 hackathon. My Kiroween project had 1,442 passing tests, and it was selling gold for about 60% of its real price. The project is Alembic Exchange, a paper-trading marke

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

My Kiroween project had 1,442 passing tests, and it was selling gold for about 60% of its real price.

The project is Alembic Exchange, a paper-trading market dressed up as a haunted alchemist's shop. All 118 elements sit on a shelf as glass vials. You can trade 39 of them with 10,000 fictional gold crowns. There's no sign-up and no real money.

Kiro's agent wrote all of the application code. Here's what worked, and the mistake I nearly shipped.

The spec came first

I started with a Kiro spec: requirements, then a design, then 16 tasks. The most useful part of the design was a list of 13 correctness properties, rules that must hold for any input. This one covers the trading fee:

For any trade quantity q > 0 kg and price per kg p > 0, the computed fee must equal exactly q Γ— p Γ— 0.005.

Kiro turned those properties into tests with fast-check, which tries many random trades instead of a few hand-picked examples.

Changing my mind was cheap

The first version was brown and candlelit yellow, and it was unpleasant to look at. So I wrote a second spec for the redesign. It said which parts of the first spec it replaced, and it included this rule:

THE theme SHALL contain no brown or yellow colour tokens.

The market logic and its tests carried over. Only the costume changed.

Hooks kept the agent honest, up to a point

I set up Kiro hooks to run when files were saved:

  • Any change under src/ ran the tests.
  • Any TypeScript change ran the linter and type checker.
  • Any component change triggered an accessibility checklist.
  • Any change to the price file reminded the agent to update the source notes.

That last hook matters for what came next.

The bug no test could catch

Each price in the app names its source and date. Before the deadline, I used Claude Code to review the project, and it compared those prices with the reports they cited. None of the 39 matched exactly. Some were close. Others were not:

Price per kg In the app In the source
Gold $85,500 $138,538
Bismuth $6.20 $44.09
Ruthenium $520 $22,184

The uranium price cited a report that doesn't price uranium at all.

Every test still passed, because they checked that prices were positive numbers with a valid source name. My hook kept the price file and the source notes in sync, so the two agreed with each other and were both wrong.

I fixed it with Kiro CLI. Claude Code read the real figures from the World Bank, USGS and EIA reports and wrote the prompts, and Kiro made the edits.

The lesson

Specs, steering and hooks are good at keeping a project consistent. They can't tell you whether a number is true. The fix is simple: give the agent the source document before it writes any data, and check a few values by hand on day one.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.