TL;DR
I built Haunted Graph Kit: one small 3D node engine, and two apps on top of it that have nothing in common.
- Ghost Mansion is a game for students about AI safety. You give an AI helper robot keys to your house and see how far the damage spreads when it gets tricked.
- Moodwalk is a tool for creators. You place images along a route and walk through to see how the mood changes from entrance to exit.
Both run as a static site in the browser. There is no backend, no login, no API key, and no AI is needed to play. Kiro did most of the typing, but the useful part was how I made Kiro stop and wait for me: specs, a read-only reviewer agent, a boundary lint, and property-based tests.
- Live: https://seimu1207.github.io/SpatialCore/
- Code: https://github.com/seimu1207/SpatialCore
- Demo video: https://youtu.be/GYX-OsVxTnU
The idea: the same mechanics mean safety in one app and expression in the other
The engine's loop is Place → Connect → Judge → Explain → Replay. You place text or images as nodes in 3D, connect them with edges, let a rule engine judge the result, explain it, and replay it on a timeline.
That loop gives two very different products:
| Ghost Mansion | Moodwalk | |
|---|---|---|
| Who | Junior high and high school students | Creators designing a mood in sequence |
| Nature | Play to learn (there are right answers) | Make to communicate (there are none) |
| Nodes | Text and icons | Images |
| Floors / zones mean | How exposed a thing is (outside road → garden → house → safe) | The order of the visitor's experience |
| Fog means | An answer with no source | A sudden brightening, or the same mood for too long |
Fog is the part I like best. It is one rendering and one kind of rule result in the core. Ghost Mansion's rule definitions (apps/ghost-mansion/rules/game-rules.json) mark an unsourced answer as fog. Moodwalk's (apps/moodwalk/rules/mood-rules.json) mark a sudden brightening or a long same-mood stretch. The core does not know which is which.
Ghost Mansion
The first screen is a risky mansion: maximum convenience, too many keys given to the robot. The student fixes it like a refactoring puzzle. Each key is one of three types:
- Plain key: the robot runs automatically. Convenient, and damage spreads along it if the robot is tricked.
- Bell key: a human confirms every time. Less convenient, and it stops automatic spread.
- No line: no convenience, and everything behind it is safe.
A night is a timeline replay. The robot does its jobs in order. The attack comes from the game, never from the student, and it is shown only as an abstract attack card. Score is a point on two axes, convenience and damage, and the stars are looked up from that point. The robot runs on rules. There is no LLM anywhere.
The attack ideas map to the OWASP Top 10 for LLM Applications (2025 edition): prompt injection (LLM01), sensitive information disclosure (LLM02), excessive agency (LLM06), and misinformation (LLM09). Source: https://genai.owasp.org/llm-top-10/
Moodwalk
Open the page and a sample board, a school festival haunted house, is already there. One button starts a walkthrough at visitor eye level. Brightness and warmth are computed from image pixels by plain formulas (BT.709 luma for brightness, (R - B) / 255 for warmth). Moodwalk hands the core only numbers, and the core decides where a shift is too sudden or a run is too long.
How Kiro was used
I used Kiro IDE. I am one developer, so I cut everything that one person could not keep up with. In total there are 6 specs, 6 steering files, 4 hooks, 2 custom agents and 1 skill.
Specs: six of them, and they were the main tool
The work is split into repo-foundation, core-graph, core-rules, core-view, app-ghost-mansion and app-moodwalk. Each has requirements.md in EARS form, design.md with the property-based test properties, and tasks.md. Nothing moved to the next document without my approval, and every approval is one line in docs/decision-log.md.
The order was fixed: requirements, approve, design, approve, tasks, approve, build, then a verification gate. At the gate the checks must pass, and then I open the public URL and use it myself.
Specs are also why the engine stayed generic. The app specs were approved with "core unchanged". When a later Moodwalk feature really did need the core (a free-space editing amendment, then a camera that focuses a zone), it went through the core specs again instead of being patched in from the app side.
I used vibe coding in the second half, for how things look: panel layouts, the guide ghost with a speech bubble, the studio-style look of Moodwalk. Rules, data and judgement stayed spec-driven. Vibe work was time-boxed, and the sensors kept running during it.
Steering: one file for the top constraints
00-scope.md holds the constraints that outrank everything: it must work with no AI and no backend, rules decide and AI only explains, core/ knows no app, and safety rules are never broken. The other steering files (product, tech, structure, safety) just point to it. That kept each Kiro session from re-reading the same rules five times and from finding two slightly different versions of them.
Custom agents: one writes specs, one only reads
- architect can write specs and nothing else. Its job is to find gaps in my intent document and guard the rule that
core/knows no app. - reviewer is read-only. Its permissions deny file writes and shell commands. It checks requirement coverage, missing properties, safety rules, claim sources and the core/app boundary, and it returns READY or NOT-READY.
The reviewer earned its place. Several documents came back NOT-READY on the first pass and had to be fixed, for example the core-view task amendment for edge selection and the zone-focus camera design, which took four review rounds. Findings are written with the file and the requirement ID, so fixing them was mechanical. I did not have to trust the same context that wrote the spec to check it.
The unit-approval skill carries the approval procedure, so I did not retype it for each Unit.
Hooks: sensors on save and on task completion
Four hooks run small scripts in scripts/sensors/:
| Hook | Runs |
|---|---|
| Save a spec | required-sections check on requirements.md and design.md |
| Save TypeScript | type check and lint |
| Save a scenario JSON | Zod schema validation |
| Task done | the tests |
Heavy checks run only when a task finishes, to save credits.
Two things I learned the hard way, both written in the decision log:
- Hook input carried no saved file path (every logged payload was
{}), so each sensor runs on its whole scope. - A save made by me in the editor did not fire the save hook, while a write made by the agent did. Human edits therefore rely on CI, which runs the same checks on every push.
The boundary as a test, not a promise
core/ must not contain an app name or concept (no "ghost", "robot", "mansion", "mood"). I did not trust myself or Kiro to remember that. A test scans every file under core/, by path and by content, for app names. ESLint rules in scripts/sensors/boundary-rules.ts also forbid core/ from importing apps/, forbid core/model from importing three.js or core/view, and keep each app's model code free of React and three.js. A change that fails these checks is not accepted, including during vibe work.
Property-based testing
core/model has no three.js dependency, so the engine's judgement can be tested with no rendering. The design docs list 114 property IDs. The ones fixed at the start were:
- save then load leaves the content unchanged;
- every edge points to existing nodes;
- the same input always gives the same result;
- removing edges never grows the set of reachable nodes;
- nothing automatic travels past a stopping edge.
PBT found things I would not have written an example test for:
- A timeline seek helper stopped after a bad cursor and skipped a position check.
- Zod accepted a rule condition that contained itself. I added a pre-check (depth 32, size 10,000) before parsing.
-
structuredCloneof values fromfc.recordfailed an equality check, because fast-check can build objects with a null prototype. - A property that used values near the largest double made sums overflow to infinity, and the run stalled while fast-check shrank the case. Geometry generators are now bounded.
- A resize direction taken from comparing coordinates flipped when the width was below float precision. The direction now comes from the handle name.
Each of these is a line in lessons.md, in the form date | type | what happened | fix.
Numbers
- 40 commits between 2026-11-11 and 2026-12-04.
- About 15,000 lines of source under
core/andapps/, and about 20,000 lines of test code undercore/,apps/andscripts/. - About 1,880 tests in 103 files. The count at each gate: 391 (core-graph), 550 (core-rules), 833 (whole core), 1,110 (Ghost Mansion), 1,432 (Moodwalk).
- A median frame time of 16.7 ms in the core demo's performance mode, on an integrated GPU (AMD Radeon 860M, Microsoft Edge). The Moodwalk gate also checked 50 images and 50 solids against the same 16.7 ms limit.
What went wrong
The first public check said "I don't know what to do." The Ghost Mansion panel passed every test and was still confusing. A person opening it saw a list of controls and no direction. I added a guide character with a speech bubble and a highlight on the next button, and the wording of that guide is a pure function of game state, so it is tested without rendering. Later I wrote a "first complaints" plan that cut the screen to one main button plus a few context buttons. I should have put a human in front of the first screen days earlier.
I cut scope on purpose. On Dec 2, the Ghost Mansion amendment listed more than I could finish. I wrote down what was Must, what was Should and in what order Should items would be dropped, and I deferred "three stars in one click" to a later stage. Doing this in writing, with a date, was easier than deciding it under deadline pressure. The free-space work for Moodwalk had a tripwire in the same spirit: if zone editing was not done by the night of Dec 1, I would drop it. It did not fire.
A failed sub-agent run was marked as completed. The orchestrating agent wrote down that a task was done when it was not. The rule I added: mark a task completed only after its "Done when" commands exit 0.
Some floating point tests are still random-seed sensitive. The geometry properties are the part that taught me the most, and they are also where a random seed can still fail a run. I would bound the generators earlier.
What I would do differently
- Run a human check on the first screen of each app as soon as it renders, not after the gate.
- Keep the amendments smaller. The free-space and zone-focus changes were approved, reviewed and built correctly, but each one meant three documents and a reviewer round.
- Record the 60-second time on the public URL as a number. I recorded only that the walkthrough finished within 60 seconds.
Try it
Open https://seimu1207.github.io/SpatialCore/ in a desktop browser. Moodwalk opens on the sample board and starts the walkthrough in one action. Ghost Mansion starts on the risky mansion: change a key, run the night, and check the stars. No install, no key, no account.
The repo is MIT licensed and the .kiro directory is committed at the root: specs, steering, hooks, agents and the skill are all there.
This post was written as part of the Kiroween 2026 hackathon.
