DEV Community

Cover image for Vibe code the fun part, spec the part that can't drift
bangerzai
bangerzai

Posted on Fully Autonomous

Vibe code the fun part, spec the part that can't drift

I'm writing this as part of the Kiroween 2026 hackathon, where my entry is Playtest Poltergeist.

On a level map, everything is visible. On the player's screen, it isn't.

Playtest Poltergeist replays a recorded playtest as a sheet ghost. You drag the ghost back to the moment the player made a choice, see what was on their screen, and try a level edit on that same moment. You can try it in a browser, watch the three-minute film or read the source.

This post is about how it was built with Kiro, and the one habit Kiro changed.

I couldn't see my own code

I build by directing AI agents in conversation. I didn't write this code by hand. That gave the build the same problem the tool is about: from where I sat everything looked right, and I couldn't see what was actually there.

Most of a game tool can be judged by looking and listening. Does the ghost read as a ghost? Is the timeline clear? I vibe coded all of that.

One thing can't be judged by looking: a level edit may change what is visible, but it must never change the recorded run. If that breaks, every comparison the tool shows is wrong and still looks right. That rule went to Kiro.

Spec first gave me an engine and no demo

Kiro IDE wrote a requirements-first spec from my brief. The kickoff prompt asked it to name one ambiguous requirement that would change what a designer could conclude. Kiro asked whether a half-hidden key counts as "visible".

Settling that before any code existed set the rule for the whole tool. It reports what the game drew (fully drawn, partly drawn, fully covered or outside the view) and never claims what a player noticed.

From its own design and task list, Kiro then built the first version: a door-and-key room, the recorder, the saved-recording format and the rewind viewer. It worked, and I couldn't see the point of it as a demo.

So I dropped that room and asked for something a viewer would get in one look. A platformer jump came out of that conversation, and the flashlight room and the sheet ghost were my asks. Both levels and the ghost interface were vibe coded over the next day in a general-purpose coding agent outside Kiro, with a few lines of requirements each and no design or task list.

Spec first gave me an engine I could trust and a demo with no point. Vibe coding gave me a demo with a point and no reason to trust what it showed.

What worked was both, in that order: vibes to find the thing, then a spec clause and tests to pin down the part that must not drift. The new levels went back to Kiro. It added a level-edit fidelity clause to the spec and wrote 16 checks against two recorded walks and the recorded jump. The checks are here.

My favorite part: the save hook

One hook, Replay check on save, runs six test files whenever the replay core, either level or the shared viewer is saved. Kiro IDE shows each run next to the edit that triggered it. It caught two things nobody was looking for.

  • The first real run failed while the same command passed in a terminal. On Windows, Kiro starts a hook with a lowercase drive letter, so the test runner loaded itself under two spellings of one path and registered no tests. A launcher script fixed it.
  • After Kiro added the 16 checks, the first save came back 41 of 43. Two renderer checks had timed out. Kiro adjusted them, and the next save passed 43 of 43 in about 12 seconds.

Neither catch is dramatic. But I don't read the code, so a check that runs without my asking is the one reviewer that is always there.

Steering what it may claim

The project has one short steering file, and its most useful lines aren't about code style. "Describe what was on screen. Attribute statements about attention or intent to the player who made them." "Report observed counts with denominators."

It shows in Kiro's output. The spec uses four drawing states where it could have said "visible", and Kiro's playtest review keeps "the pilot's recorded intention" apart from "my reading".

A reviewer that didn't know what it was looking at

Kiro Crew got the project folder and the running preview, and was asked for read-only observations. It met each screen without knowing what the screen was meant to show. Four of its findings changed the product. One was that the timeline markers were too small to read, and they are bigger now.

Asking Kiro why, and a fix that half worked

TideWire is a separate game I made before the jam. You fly a rescue helicopter and tap Hook to lift a building by its roof. Six AI players tried the rescue, and Kiro CLI counted their runs, reading the recordings through a small MCP server with three read-only tools. Nobody recovered within eight moves of their first miss.

I asked Kiro why, with an open question and the six recordings. It said it couldn't open the screenshots, then answered from the touch journals: players believed that overlap on screen meant reach, and they couldn't see the hook's tip behind roofs and foam. It recommended a ring where the hook will land, and wrote that ring on its own branch.

Twelve more first-time AI players tried it. I had written down beforehand what would count as working, and the ring failed that test. The first catch came no sooner. What changed was the blind tapping: without the ring every player missed at least twice before their first catch, and with it nobody missed more than once.

I'm reporting the part that failed because a tool about what the player could actually see shouldn't round its own results up. The full study is here.

Three features in thirty minutes

After submitting, I asked Kiro CLI for three additions and had it work spec first each time: requirements, a design and a task list, then the code and its tests.

  • A guided first run, where the ghost walks a new visitor through four steps. Six minutes.
  • A mist over everything on the map that the player's screen did not show. Six minutes.
  • A drop-in recorder: one 130-line script that lets any canvas game record what it drew, a screen that rewinds that capture with the ghost, and a way to pair two builds at the same named moment, with 105 tests. Eighteen minutes.

Two needed touching up afterwards. Another agent fixed where the guide's card sat and a heading the mist had knocked out of line, and I asked for the mist to start switched off. The three specs are in the repository.

What I'd keep

  1. Find it with vibes, then write the rule down. Work out the one thing that can be wrong while looking right, and give that to the spec.
  2. Ask for the ambiguity. One line in the kickoff prompt shaped the whole tool.
  3. Put the checks on a hook. A test I have to remember to run is a test I don't run.
  4. Steer what it may claim. Lines about evidence did more than lines about style would have.
  5. Decide what counts as working before you test a fix. It is the only reason I know the ring half worked.
  6. Check answers against the files they cite. Kiro Web's first review of a recording described a building that wasn't in the two screenshots it named. A check against those files caught it, and Kiro corrected its own pull request.

What I don't know yet

The playtesters were AI. They show what the game drew along a plausible route and what an agent did next. They can't show what a person would notice. Nobody outside this project has used the tool on their own game, and the drop-in recorder has only met its own demo.

If you make levels, I'd like to know whether the ghost shows you anything a recording didn't. Play a level, then haunt your own run.

Top comments (0)