This post is part of the Kiroween 2026 hackathon.
A small paper shop opens at midnight in the afterlife. Ghosts line up at the counter, and they still want the paper cuts they loved when they were alive: a papel picado banner, a bat, a hex sign for the barn door. They can't hold scissors anymore, so you cut the paper for them, before the candles burn out.
That's The Paper Ghost Shop, the browser game we built for Kiroween. This post covers what the game is, the geometry engine under it, and how Kiro changed the way we worked.
Play it:: https://paper-ghost-shop.vercel.app/
The game
You start by painting your own ghost on a 64 × 64 pixel grid. Your ghost joins the other apprentices on the shop's ghost wall.
Then the orders start. Each ghost shows you a pattern, and you get a folded sheet of paper. You have two tools:
- Blade: Draw a stroke to cut through every layer of the fold.
- Gouge: Draw a closed loop to cut out the piece inside it.
Undo fixes mistakes, and Peek shows the unfolded sheet while you hold it. When you serve the order, the paper unfolds and the game scores your cut against the target. Miss the pass mark and you lose a candle. When the last candle goes out, the shift ends.
The game has three nights, with three orders each:
- Night 1, Día de Muertos: Papel picado with calaveras, marigolds, and crosses.
- Night 2, Halloween: Bat windows, jack-o'-lantern faces, and spider webs.
- Night 3, Pennsylvania Dutch folk art: Hex-sign rosettes and eight-point stars.
Night 1 uses half folds only. The spider web at the end of Night 2 introduces the eighth fold, and Night 3 moves to quarter and eighth folds. The fun of real paper cutting is the reveal. A few rough snips on a folded sheet open up into a symmetric design, and we wanted the game to have that same moment.
The engine: Kiro Paper Cut Kit
The game sits on top of a geometry engine called Kiro Paper Cut Kit, in src/core/. It's plain TypeScript with no DOM, no canvas, and no game code. A boundary test fails the build if anything in the core imports a browser API or a game module.
The engine does the real work:
- Cutting: It smooths freehand strokes and turns them into polygons. When a cut fully cuts off a piece, that piece falls away.
- Folding: It handles half, quarter, and eighth folds. Cuts go through the actual geometry of every layer and unfold correctly. The game does not just mirror your drawing.
- Replay: Every design is a log of operations. Player designs and target patterns are rebuilt through the same replay code, so both follow the same geometry rules.
- Scoring: Plain Intersection over Union is too harsh on hand-drawn cuts, so the score gives credit for cuts that land close to the target. It widens the cuts by a tolerance (9 mm on Night 1, down to 6 mm on Night 3) and measures precision and coverage. Those make up 80% of the score, and strict IoU makes up the other 20%.
- Export: It can write a millimetre-accurate cutting SVG for a laser or vinyl cutter and read it back in. It can also make a printable pattern as an SVG, or as a PDF tiled across A4 or Letter pages at real size. The game doesn't have a download button for these yet.
How Kiro changed the way we worked
My favorite part of Kiro is specs. Before I used Kiro, I would have started with a canvas and a mouse handler and figured out the geometry as I went. For a project with folds, polygon clipping, and scoring, that would have gone badly.
Instead, the project runs on two specs in .kiro/specs/:
-
paper-cut-kit: The geometry engine. -
paper-ghost-shop: The game, plus the extra geometry it needed.
Each spec has three documents: requirements, a design, and a task list. The task list includes checkpoints, such as "core geometry and shader prototype" and "core engine complete except strokes and preview". Work stopped at each checkpoint until the build and tests passed.
Property tests
Kiro's spec tasks include property-based tests written with fast-check. An example test checks a case you chose, such as "cut this square and expect this hole." A property test checks a rule against hundreds of random inputs, such as:
- Cuts always stay inside the sheet.
- Replaying the same operation log always gives the same design.
- Exporting a design to SVG and reading it back moves no point more than 0.05 mm.
Geometry code fails on the inputs you don't think of: nearly parallel edges, holes touching the border, zero-area slivers. Property tests found those for us. The project has 12 property test files and 322 tests in total, and they all pass.
Changing the plan
The first spec was much bigger than what we shipped. It described a full starter kit with an MCP server, a validation hook, paper "bridges" that keep pieces attached, and two demo apps: a pumpkin stencil maker and a papel picado studio.
Partway through, we cut that scope. Bridges, the MCP server, and the validation hook came out. Pieces that your cuts fully surround now just fall out. The papel picado demo grew into The Paper Ghost Shop.
The spec made that change easier. Because the requirements were written down, we could see exactly what we were dropping, mark those parts as superseded at the top of the spec, and keep the rest. The engine kept its boundaries through the change because they were in the design document, and the boundary test checks them.
And thats it, we finally have shipped it.
Play: https://paper-ghost-shop.vercel.app/
Written for the Kiroween 2026 hackathon. #KiroweenHackathon26
