This post is written as part of the Kiroween 2026 hackathon (category: Skeleton Crew).
Try it: https://seance-kiro.vercel.app ·
Code: https://github.com/devprashant19/seance ·
Demo video (2:31): https://youtu.be/wdTlGj5SruA

The problem: a lab that was in everyone's pocket

Plenty of schools have no physics lab. But nearly every student carries an accelerometer, a gyroscope, a microphone and a camera: they're called phones. The sensors are locked behind apps and permissions, and nobody turns them into instruments: things with units, error bars and an honest answer.

A phone outline with four sensors, sealed behind glass (from the demo film)

Séance opens them up. You scan a QR code on a laptop. Your phone opens a 3.38 kB web page (no app, no install) and streams its sensors to the laptop. On the laptop, a 3D ghost is your phone: tilt the phone and the ghost turns; shake it and the ghost gets dizzy.

The ghost on the laptop follows the real phone in the hand (from the demo film)

Séance home page with the 3D ghost avatar

Séance QR pairing lobby on the laptop

Phone join screen at mobile viewport

Skeleton Crew: one skeleton, two bodies

Kiroween's Skeleton Crew category asks for a lean skeleton that's flexible enough to grow two different apps. Ours:

Architecture: phone, relay, seance-core skeleton, MCP server, and two apps

  • packages/seance-core, the skeleton. Every sensor becomes a typed spirit with real units and real uncertainty: transports, spirits, units, DSP and uncertainty, traces.
  • apps/poltergeist-lab, body one. A physics lab with a pendulum, free fall, spin, plank resonance, a "singing ruler", and a webcam photogate that needs no phone at all. Every result comes with an error bar and is judged by the Oracle.
  • apps/banshee-choir, body two. A multiplayer instrument. Every phone that joins becomes a named singing ghost, and the laptop keyboard can sing along: 8 instruments, an 8-key sing pad on the phone, and shake for tremolo.

Body one and body two attach to the same skeleton (from the demo film)

The same skeleton is under both. The lab cares about microseconds and uncertainty; the choir cares about latency and joy.

Motion Twin: seeing what the sensor actually did

While an experiment records—live or in replay—a Motion Twin panel beside the live chart animates what the phone or object is physically doing, reconstructed directly from that experiment's own sensor data (gyroscope, accelerometer, microphone or camera). Every twin is labelled Reconstructed from your <sensor>, with a toggleable faint Model overlay from the fitted result. When there is no data or no detected motion, the twin stays still and shows the experiment's refusal state (for example, "No spin detected").

Pendulum Motion Twin beside the live gyroscope chart — replay of a bundled synthetic demo trace
Motion Twin reconstructing a pendulum swing from gyroscope data (replay of a bundled synthetic demo trace).

Then we caught it lying

Here's the part I'm proudest of, because it started with a bug I'm embarrassed about.

An earlier build had a spin experiment ("Where does the spirit live?" finds where the accelerometer chip sits inside the phone). I ran it with no spin at all, and the Oracle said:

Newton approves. Error 0.00 %.

Zero against zero. The comparison was dividing nothing by nothing and calling it a perfect match.

The earlier build's real screenshot: Newton approves, error 0.00%, with no data (earlier build)

So we took its yes away. The rule is now part of the spec and is enforced by tests:

  • No data → no verdict.
  • No accepted answer → no pass.
  • Always show the measurement and its error bar.

No spin detected: the verdict flips and the refusal is stamped (from the demo film)

Spin & Find the Chip: the Oracle locates the motion-sensor chip 4.1 cm from the spin centre (51 mm from the left, 35 mm from the top) and the Motion Twin shows r = 4.09 cm — replay of a bundled synthetic demo trace
When no spin is detected, the Motion Twin stays still and displays the refusal state (replay of a bundled synthetic demo trace).

The three rules (from the demo film)

Then we tested the whole path end-to-end on simulated phones whose answers we already knew: real mobile-browser pages driven by synthetic sensor data.

  • The pendulum gave 9.81 ± 0.05 m/s² (truth 9.81).
  • A half-metre drop gave 0.49 ± 0.03 m (truth 0.50).
  • 29/29 end-to-end checks passed.

When we filmed the demo the repo had 399 tests. Today it has 431 tests in 66 files, 62 of them property-based.

Simulated proof: the test count at filming time (from the demo film)

And on a real phone? My first real pendulum run, hand-held on a string, gave 15 ± 6 m/s². Because 9.81 sat inside that huge error bar, the Oracle passed it. That was technically honest and practically useless, so we wrote a new rule into the spec first (.kiro/specs/experiments/pendulum-g, Requirement 6.3). If the relative uncertainty is above 20 %, the Oracle now says "Too uncertain to judge." It also tells you how to fix the run: tie the string to a fixed point, swing gently, record longer. A property-based test guarantees it can never say "approves" above that threshold. And a real phone does measure: dropped 40 cm onto a pillow and recorded live through the MCP, it gave h = 0.43 ± 0.03 m against 0.40 ± 0.05 m, at a steady 60 Hz with no dropouts. That recording is now a replay test in the repo.

The real pendulum run on a phone, with the app's own result (from the demo film)

Today's Oracle on the bundled pendulum demo: 9.92 ± 0.08 m/s², "The veil is thin" (close, but not within one standard deviation) — replay of a bundled synthetic demo trace

How Kiro built it

Kiro at a glance: 45 specs, 10 steering docs, 4 agents, 9 hooks, 14 MCP tools, 62 property tests

1. Specs before code (45 spec documents)

Every package and every experiment started as a Kiro spec: requirements.md → design.md → tasks.md. The pendulum spec, for example, states what is measured, the small-angle model and its validity range, the uncertainty budget, and which hook scaffolds the code when the spec is saved.

The real .kiro tree and the pendulum spec (from the demo film)

Writing the spec first changed the bug count more than anything else. Vibe-coding a physics experiment produces code that runs. A spec forces you to say what the right answer is and how wrong it's allowed to be, which is exactly what a test needs.

2. Steering (10 docs)

.kiro/steering/ holds physics.md, units.md, testing.md, audio.md, transports.md and more. The one that paid off most was units.md: every physical value crossing a module boundary must be a typed Quantity, never a bare number. Kiro follows that in every task.

3. Custom agents (4)

There are four agents: a physicist, a medium, a necromancer and an exorcist. The physicist's description literally says it "refuses unitless physics and inspects real traces before blaming code or physics". It has the @seance MCP tools, so it can look at real recordings instead of guessing.

The physicist agent's real definition

4. Agent hooks (9): the honesty machine

This is where Kiro stopped being "a chat that writes code" and became part of the lab.

H4, the physics guard. Every time a file in the signal-processing code or an experiment is saved, Kiro type-checks the units and runs the property tests. A second, agent-type action reviews theory, analysis and uncertainty files against the steering docs.

Hook H4: the real hook definition and the real output of its command

H2, haunting → test. When Kiro records a real sensor trace through the MCP tool record_trace, this hook turns it into a replay regression test. That test runs the recording through the same path as the app and asserts the result is within tolerance. Its prompt even says: if it fails, do NOT loosen the tolerance or edit the trace.

Hook H2: a real recording becomes a regression test

The hook flow from the film

The other hooks:

  • a contract and replay suite when the core changes (H3);
  • a public-API guard (H5);
  • mood-docs sync (H6);
  • a trace-schema check (H7);
  • an accessibility sweep (H8);
  • a write-up journal hook (H9).

5. MCP: Kiro can feel the phone

packages/seance-mcp is an MCP server with 14 tools, including read_stream, record_trace, run_experiment, trace_stats, compare_traces and sensor_passport. With it, Kiro can read a phone's live sensor stream in the room, run an experiment on it, and record what happened. Bugs that only exist on real hardware stop being "works on my machine".

Kiro, the seance MCP server, the relay and the phone

6. Property-based testing (62 properties)

With fast-check, the physics gets tested as laws, not examples. Real properties from the repo:

  • phone samples survive encodeBatch → JSON → decodeBatch, exactly what the relay carries;
  • the reported clock-skew uncertainty between phones is never below min(RTT)/2;
  • an inverse-variance weighted class mean is never less certain than its best single measurement;
  • webcam photogate timing uncertainty is bounded below by 1/(fps·√12), and aliasing is flagged above fps/2;
  • the newest one: for any result whose relative uncertainty is above 20 %, the Oracle never says "approves".

H4 runs the property tests of the core and the lab on every relevant save.

Honest scope note: most of the core, apps, MCP server, agents and hooks were built in Kiro, spec-first. Some later polish (UI theme, video) was done outside Kiro, and the repo's docs/kiro-journal.md says which.

Body two: the choir

Same skeleton, second body. Every phone that joins becomes a singing ghost, and the laptop keyboard sings along. Pick an instrument, slide along eight keys, shake for tremolo.

Banshee Choir: QR join card, scale and instrument controls, and the laptop keyboard's 3D ghost on stage

Accessibility: Ghost Ear Lab

At /hear, Ghost Ear Lab turns the physics experiments into an audio-first, keyboard-driven interface (Space, R, H, with adjustable speech rate and darkroom mode) for blind and low-vision learners.

Ghost Ear Lab audio-first interface

Try it

  1. Open https://seance-kiro.vercel.app on a laptop (hosted on Vercel, backed by seance-relay on AWS EC2 + CloudFront wss://).
  2. Scan the QR with your phone and type a name.
  3. Tilt and shake, then open the Lab or the Choir at /choir/.

No phone? The webcam photogate and replay mode work laptop-only.

Code (MIT): https://github.com/devprashant19/seance. The .kiro/ folder (specs, steering, agents, hooks) is all in the repo.

Every phone is already a lab. Séance just opens it. 👻

#kiro #kiroween #KiroweenHackathon26