DEV Community

Cover image for I Built a Game That Reads Your Mind (Using 100% AI)
Samuel Simiyu
Samuel Simiyu

Posted on

I Built a Game That Reads Your Mind (Using 100% AI)

How Kiro, Agent Hooks, and Biofeedback created NeuroLabyrinth.

It started with a terrifying idea for a hackathon: What if the boss battle wasn't a monster on the screen, but your own anxiety?

This weekend, I built NeuroLabyrinth, a dungeon crawler that uses your webcam to detect your heart rate, stress levels, and focus in real-time. If you panic, the maze gets darker and tighter. If you focus, the path clears.

Here is the crazy part: I didn't write the code.

I acted as the Architect, and Kiro acted as the entire engineering team. We completed 42 complex implementation tasks—from signal processing to 3D rendering—with 0 manual coding.

Here is how Kiro changed the way I build software.

1. Spec-Driven Architecture

Most AI coding tools guess what you want. Kiro knows what you want because of the .kiro/specs directory.

I wrote formal requirements using EARS syntax (e.g., "WHEN StressLevel > 0.7, THE GameEngine SHALL spawn a Catastrophizer"). Because Kiro had this "blueprint," it could implement complex, multi-file systems without losing context. It wasn't just guessing the next line of code; it was fulfilling a contract.

2. Agent Hooks: The Nervous System

This is where I got #hookedonkiro. We used Agent Hooks for two things:

The Game Loop:
Instead of writing complex if/else chains for game logic, I created "Living Hooks."

// .kiro/hooks/biofeedback-triggers.js
export const catastrophizerSpawnHook = {
  trigger: (metrics) => metrics.stressLevel > 0.7 && metrics.calmness < 0.3,
  action: (metrics) => ({ type: 'spawn_enemy', intensity: 'high' })
};
Enter fullscreen mode Exit fullscreen mode

The game engine automatically monitors these hooks. It feels like programming with magic.

The "AI Senior Dev":
I even set up a Code Quality Hook. Every time I edited a file, a background agent analyzed the code for smells, React anti-patterns, and performance issues. Kiro wasn't just writing code; it was reviewing it.

3. Steering the Aesthetics

How do you tell an AI to make a game "feel scary"?

I used a Steering Document (visual-aesthetics.md). This YAML file defined exactly what "High Stress" looked like (Dark Red palette, dissonant audio intervals, flickering lights).

When I asked Kiro to "make the music match the mood," it didn't hallucinate random songs. It looked at the steering doc, saw the definition for stress, and programmed the Tone.js synthesizer to play minor 2nd intervals.

The Result

  • 42 Tasks Completed
  • 100% TypeScript Strict Mode
  • <100ms Biofeedback Latency

NeuroLabyrinth proved to me that the future of development isn't just typing faster. It's about becoming an Architect and letting tools like Kiro handle the implementation.

The maze is waiting. Are you brave enough to face yourself? 🧠⚡️

Play the demo here:
🔗 https://neuro-labyrinth.vercel.app

Check out the code:
👨‍💻 https://github.com/simiyu-samuel/NeuroLabyrinth


Built with love and Kiro.

Top comments (0)