By Luv, Gatik and Tanush, for Kiroween 2026
We wrote this post as part of our Kiroween 2026 entry, a toolkit that adds motion control to any website.
Every one of us carries a device in our pocket that comes with the same inputs as a gamepad: an accelerometer, a gyroscope and a touchscreen. Yet hardly any site treats it like one, simply because doing it well is very hard.
For Kiroween, the three of us built a kit we call Hallowand. You add it to your website, and people can control the page by moving their phone. They don't have to download an app or sign in, and you don't have to host a server. The web page shows a QR code. You scan it with your normal phone camera, and that launches a controller page on the phone. The two browsers talk directly, peer to peer, over WebRTC.
Our category is Skeleton Crew, so the kit needed to serve two completely different apps:
- Last Ride is a 3D Halloween-themed kart racing game. You hold your phone as if you were holding a steering wheel, tilt it to steer, and give it a quick shake to trigger a boost.
- Clicker is a presentation remote. Drop in a PDF and your phone becomes the laser pointer, the slide clicker and the speaker notes.
The kit also comes with its own tool, the Workshop. You choose the motions and buttons your controller needs, try them out on a preview phone or on your own device, and then copy the resulting code to your page. The Workshop can also hand you a single starter HTML file that loads the kit from our site, so you don't have to build or install anything.
Live demo: https://hallowand.vercel.app
Code: https://github.com/luvudeshi/hallowand
Why phone motion is hard on the web
Three problems show up at once.
- Permissions. On iOS you have to ask explicitly for the motion sensor permission, and only after a user gesture such as a tap. Android doesn't require that, and guessing the platform from the user agent is fragile.
- The axes disagree. iOS and Android return acceleration with opposite signs. A tilt control derived from acceleration would work perfectly on one platform and be inverted on the other.
- Real-time networking. Two devices exchange 60 updates a second with no server of ours in the middle, and the connection has to survive poor Wi-Fi.
Steering came before code
Before any feature existed, we had written the steering docs for Kiro, the always-on context that every Kiro session reads. Nearly the entire first commit was writing: the steering docs, the public types for the kit and the build setup.
-
tech.mdpins down the kit's whole public API (connect(), thePadobject, the events) and the messages that travel between the phone and the screen. -
sensors.mdis all of the math. Tilt comes only from thebetaandgammaangles, which are consistent across platforms, and never from acceleration. The formulas, signs and dead zones are fully written out. -
design.mdsets the look, more a candle-lit seance table than a plastic Halloween shop, and the voice of every message a person reads.
This turned out to be the most useful thing we did. Because the API was fixed first, the kit and both apps could be built in parallel, so neither side was ever stuck waiting on the other. We learned that a steering doc is not just documentation, but a contract that lets several people and agents work at the same time.
One spec per feature
Every feature began as a spec in Kiro's format: requirements in EARS style, a design with numbered correctness properties and a list of tasks. Kiro wrote the spec, then worked through the tasks one at a time, running the type check and the tests after each one.
Each correctness property turned into a property-based test with fast-check, at 200 runs or more. A few things this caught:
-
'ß'.toUpperCase()is'SS'. Room codes are five letters, so normalizing typed input to upper case would have turned some invalid codes into valid ones. Writing the spec caught this before the code existed. - Properties that tested nothing. fast-check spreads its doubles by exponent, so a generator of "a number between 0 and 600" almost always produced tiny values, far below 1. The gesture tests reported 200 passing runs while the inputs barely moved. Deliberately breaking the code, more than twenty times, exposed it, and tighter generators fixed it.
- Negative zero. An ink stroke clamped to the unit square was saved as
y = -0, since-0 < 0is false. fast-check shrank the failing case to just that value, and the fix was one character. - A mistake in the spec itself. The limit on how many motion frames may pass in one time window held only for some windows, not for every one. Writing the property showed that the spec was wrong, so we fixed the spec first, and then the code.
Hooks and custom agents
We did not have to rely on anyone's memory, because Kiro hooks enforced the rules. One hook runs the related tests when you save. One watches the kit's public types, so the contract cannot change by accident. One checks every write for anything that looks like a secret key. We tested that last one by asking the agent to write a file with a fake key, and its own hook blocked the write and told it why.
We also set up two custom agents: a builder that can change code and run tests, and a reviewer that can only read. A documentation server (Context7, over MCP) is loaded for the builder and left out for the reviewer.
What we learned
- Steering pays off the most. Starting with the sensor math meant that all later code followed the same conventions, and the tests could check the code against the document.
- A written contract lets people work in parallel. The kit and the two apps were built at the same time, and they fit together because
tech.mddefined the API they all followed. - Property tests are only as good as their generators. Two hundred passing runs don't prove the code is right until you have tried to break it on purpose.
Try it
Load https://hallowand.vercel.app on your laptop, then scan the code with your phone and drive. If you don't have a phone at hand, hit "No phone? Borrow a ghost one." and use the keyboard.
Built for Kiroween 2026.