Inspiration

Social-deduction games like Werewolf are at their best with a full table of people who bluff well, and that is exactly the hard part to get on a random weeknight. Large language models turned out to be very good at the talking half of the game: inventing an alibi, accusing a neighbour, defending a role claim under pressure. I wanted a game where you can sit at a full table any time, against characters who really lie.

The second idea came from time-loop stories: what if the only thing you keep from one attempt to the next is what you remember? The AIs forget. You don't.

What it does

Hollow Lantern is a single-player social-deduction game played as a trial-style visual novel. On Halloween night the starliner Hollow Lantern drifts powerless in a purple nebula. The guests wear masks, and some of them are Wolves. You are the Lantern-keeper. Every other seat (7, 9 or 11 of them) is an AI character with its own personality, speech style, secret role and plan.

  • A full trial each day: the morning meeting, challenges and confrontations with witnesses, a vote that sends someone to the Cold, free-time private talks in the cabins, and the night, when the Wolves strike.
  • Roles: Wolf, Traitor (a human on the Wolves' side), Engineer (scans someone each evening), Doctor (learns whether the voted-out character was a Wolf), Guardian Angel (protects someone), a Stay-behind pair who know each other, and Crew. The engine checks every role claim: a real role holder can only report the truth, while Wolves and the Traitor can fake-claim, and they do.
  • You play in your own words. Type what you want to say; the game reads role claims straight out of your lines. Challenge, call witnesses, vote, and act at night if your role can.
  • Time rewind: when you die, your pocket watch takes you back to an earlier moment of the same game for time shards. The random seed stays the same, the AIs remember nothing, and you remember everything.
  • Post-game review: Unmasked shows every character's true role, fate, claims and secret plan; Lies lists every fake claim and false result together with what the liar was thinking; Full log marks every claim TRUE or LIE.
  • Character voices: the AI characters' English lines are spoken by Kokoro-82M, running on your own CPU, with 16 cast voices. No network, no key.
  • Three AI providers: Claude Haiku 5.5 by default, or DeepSeek Flash or GPT-6 Luna. Without any key, an offline mode with canned lines is fully playable.
  • Watch mode: an all-AI game with the option to reveal every secret.
  • English and Simplified Chinese, switchable at any time; the AIs speak and think in the language the game started in.
  • One portable Windows exe: nothing to install, keys stored with Windows encryption, a 16:9 window with fullscreen, crash recovery and a clean quit.

How I built it

The engine (lab/). A Node.js engine owns all game truth: roles, the day cycle, claims, votes and night actions. The LLM only talks and decides, through structured JSON outputs. A small local "lab" website let me run AI-only games, read every prompt and answer, and tune the rules. I ran more than 200 full AI games while balancing. One prompt layout serves all three providers: shared rules and the character card first, then the speech log, then the task. Prompt caching hits on every call, so a 10-player game costs about $0.25 with an 80% cache hit rate on Claude, and 88% on DeepSeek and GPT.

The game (game-ui/). A plain node:http server and a browser UI with no framework and no build step, on a fixed 1600x900 stage. It includes the time-rewind timeline (each checkpoint stores a full game copy plus the RNG state, and unchanged AI calls are replayed verbatim), the review page and its lie rules, and the voice server (Kokoro-82M through onnxruntime-node in a worker thread, with prefetching of the next lines). I built the engine and the UI with AI coding agents (Claude) working in parallel.

The desktop app (desktop/), built by Kiro. Kiro wrote, packaged and tested the Electron shell spec-first: it runs the unmodified game server in a utility process, serves the page through a private hollow://game/ scheme, stores keys with safeStorage, and ships everything, including the 100 MB voice model, as one portable exe that starts in about 8 to 10 seconds. Details are in the Kiro section below.

Art and music. All characters, names and story are original. The portraits and backgrounds were generated for this project with an image model from our own descriptions, then picked and re-generated many times (for example, the cabin beds had to be full-size and the perspective correct). The demo video's music was written in code (a numpy synthesizer), so the project owns it.

How I used Kiro

Summary. Kiro owned the shippable product: the Electron desktop app in desktop/. It built it spec-first through ten headless Kiro CLI runs (model: Claude Opus 5.5 in Kiro), guided by five steering files and three agent hooks. The game engine and the browser UI were developed in parallel by other AI agents, so the Kiro setup was designed around a moving target: Kiro could read the game but never change it, and everything it needed from the game went through a written notes file.

Kiro IDE vs CLI. I prepared an IDE start guide (KIRO-START.md), but all ten build runs used the Kiro CLI in headless mode: kiro-cli chat --v3 --no-interactive --trust-all-tools --trust-workspace --model claude-opus-5.5 < kiro-runs/prompt-NN.txt > kiro-runs/run-NN.log. The CLI suited this project because the runs were long (12 to 80 minutes), I wanted a full log of every run, and I could start them minimized and keep working on the same PC. Both read the same .kiro/ folder, so the spec, steering and hooks did the heavy lifting and each prompt stayed short: what changed since the last run, numbered goals, and the rules repeated. Each run ended with a report of what was built, every check that passed with timings, and a "could not verify" list, which told me exactly what to test by hand. All prompts and logs are committed in kiro-runs/.

Spec-driven development. .kiro/specs/desktop-app/ has:

  • requirements.md: 13 requirements in user-story form with acceptance criteria (desktop start, a true 16:9 window, every game feature unchanged, keys, the server process, menu and shortcuts, security, one portable exe, developer workflow; later three AI providers, Settings from inside the game, three fixed models, packaged voices).
  • design.md: the architecture (utilityProcess server on a free port, a private hollow://game/ scheme for a stable origin, safeStorage keys, redacted logs, an allow-list staging script) plus an "Amendment" section for each change of direction.
  • tasks.md: 22 tasks, each with a "Done when" check Kiro had to run before ticking the box, and two checkpoints where Kiro stopped and told me what to try.

Compared with vibe coding, the biggest difference was that changes went into the spec, not the chat. "Ship only the portable exe" became Requirement 11 and tasks 17-18; the voices became Requirement 13 and task 20. Each new session started from the spec, so no decision was lost. The "Done when" checks found real platform bugs: on Windows setAspectRatio applies to the frame, not the content (the game area was 1430x776); utilityProcess has no pid until it starts; app.getLocale() is empty before ready; a double-launched portable exe overwrote its own files (Kiro read electron-builder's NSIS source and found that only unpackDirName: true isolates each launch); synchronous speech synthesis reset keep-alive sockets (fixed with a fresh loopback connection per request); and in Electron 45 protocol.handle's abort signal never fires (fixed by wiring webRequest aborts upstream).

Steering. Five files in .kiro/steering/: product.md, story.md, structure.md and tech.md with inclusion: always, and desktop.md with inclusion: fileMatch on desktop/**, so shell conventions load only when Kiro works there. The strategy that made the biggest difference was ownership: structure.md makes lab/ and game-ui/ read-only for Kiro because other agents own them, and desktop.md says the shell wraps the game and never forks or patches it. Anything Kiro needed from the game went into desktop/NOTES-for-game-ui.md (14 notes, such as moving voice synthesis to a worker, or keeping the ?final=1 contract that tells the shell a game has ended). The game side worked through them, and the one approved exception (run 6, adding the desktop bridge lines to the title screen and Options) is written down there. Other rules: never open lab/.env and use only Mock games and fake keys; every file in English; and, added late, "automated runs are always minimized and muted", after test windows kept jumping in front of me.

Agent hooks. .kiro/hooks/desktop-tests.json:

  • PostFileSave and PostFileCreate on desktop/src|scripts|test: run the unit tests with plain node --test (not npm, because PowerShell's execution policy blocks npm.ps1).
  • PostTaskExec: after every spec task, run the contract test, which starts the real game-ui/server.js exactly as the shell does and plays a short offline game over its API. This caught drift between the changing game, the engine and the shell at once instead of at packaging time. By the last run: 190 unit tests, 11 contract tests, 13 Playwright end-to-end tests against the packaged app, and a release-test script (cold start, double launch, clean quit, voices, review page).

Custom agents, MCP, powers, PBT. I did not create custom agents, MCP servers or Kiro powers for this project: every tool Kiro needed (Node, Playwright, PowerShell, electron-builder) was already local. Tests are example-based; property-based testing of the engine's claim validator and vote rules is the first thing I would add next.

Challenges I ran into

  • Passive liars. At first the Wolves almost never fake-claimed, so the game had no tension. Banning bad moves did not help; it killed variety. What worked was explaining the facts (why a Day-1 Engineer claim is costly to vote out, what a fake Doctor result does to the vote) and giving fake-claim plans a few firm "must act" rules.
  • Balance. Humans won 81% of early test games. One more Wolf at 10 players brought it close to even, and the game now has three tested sizes: 8, 10 and 12 players.
  • False contradictions. A Wolf twisted my story ("the Wolves came for him" plus "the Guardian Angel saved him") into a "contradiction", and even honest AIs repeated it unchecked, because the rules never said an attack can be blocked. The fix was to state the night sequence plainly, tell the AIs to check a pointed-out contradiction against the actual words, and add a fact explaining what a quiet night means.
  • A shell around a moving target. The game kept changing while the desktop app was being built. A Kiro hook that plays a real offline game against the real server after every spec task caught each break immediately.
  • Voices on the CPU. Speech synthesis blocked the server thread and reset connections. The fix was a worker thread, a fresh loopback connection per request in the shell, and passing page aborts through to the server.
  • A 250 MB portable exe that starts fast. The portable unpacks itself on every launch. Kiro measured the start-up, found that the default archive mode writes everything to disk three times, and switched it, cutting cold start from about 30 s to under 10 s.

Accomplishments that I'm proud of

  • AI characters that lie convincingly, and a review page that proves it afterwards, line by line.
  • A time rewind that feels like a real ability: same seed, same people, and only you remember.
  • Three LLM providers with 80 to 88% prompt-cache hits, so a full game costs cents.
  • Local voices with no network at all.
  • One double-click exe, built and release-tested by Kiro across ten logged runs.

What I learned

  • For LLM characters, explain, don't forbid. Every time I replaced "never do X" with the fact that makes X a bad idea, the crew got more interesting.
  • Put decisions in a spec, not in chat. A requirement with a "Done when" check survives every new session.
  • Give each AI agent a fence: read-only folders plus a notes file beat any amount of "please be careful".

What's next for Hollow Lantern

  • Property-based tests for the engine's claim validator and vote rules.
  • More voice languages, so Chinese games can be voiced too.
  • A story layer on top of the loops: side scenes that unlock only after you have seen certain lies.
  • macOS and web builds.

Links

Built With

Share this project:

Updates

Submission history