Inspiration

As developers, staring at endless lists of open GitHub issues, stale pull requests, and CI logs can drain motivation fast. At the same time, classic retro dungeon crawlers make grinding for loot and clearing rooms genuinely addictive. For the Frankenstein category, I wanted to stitch those two worlds together: turning everyday software engineering habits into real-time RPG progression where shipping clean code is literally how you survive the dungeon.

What it does

Merge & Monsters connects directly to a GitHub repository and transforms its live engineering telemetry into a browser-based pixel-art dungeon crawler:

  • Commits & Merged PRs grant experience points (XP), gold, and equipment upgrades to your hero.
  • Open Issues dynamically spawn dungeon monsters whose class and difficulty scale with issue labels (e.g., bug, critical, enhancement) and how long they have been open.
  • Closing an Issue triggers a finishing strike in-game, dropping loot chests and unlocking deeper dungeon floors.

How I built it

I structured the entire development workflow inside Kiro using spec-driven development:

  • Specs & Architecture: Before writing UI code, I generated formal requirements, design documents, and task breakdowns inside .kiro/specs/ to decouple the GitHub telemetry parser from the game state engine.
  • Steering Docs & Hooks: I configured .kiro/steering/ rules to enforce strict TypeScript typing and retro pixel-art rendering constraints, alongside automated Agent Hooks that ran linting and type-checks on every file save.
  • Frontend & Game Engine: Built with React, TypeScript, and Tailwind CSS for the HUD and repository analytics, paired with a custom HTML5 Canvas rendering loop and synthesized retro SFX via the Web Audio API.
  • GitHub Integration & Game Math: Powered by the GitHub REST API (Octokit). Hero XP and monster health are calculated dynamically from repository metrics:

$$XP_{\text{commit}} = \left\lfloor 25 \cdot \ln(1 + \Delta_{\text{lines}}) \right\rfloor + 50 \cdot N_{\text{PR}}$$

$$HP_{\text{monster}} = B_{\text{severity}} \cdot \left(1 + 0.15 \cdot t_{\text{days}}\right)$$

where $\Delta_{\text{lines}}$ represents net constructive code changes, $B_{\text{severity}}$ is the base HP determined by issue priority labels, and $t_{\text{days}}$ is the age of the open issue in days.

Challenges I ran into

  • GitHub API Rate Limits & Polling: Fetching commit diffs and issue histories repeatedly without exhausting unauthenticated or standard OAuth rate limits required implementing smart conditional requests (ETag caching) and local state snapshots.
  • Balancing Game Mechanics vs. Code Quality: Naive line-count scoring would reward bloated commits, so tuning the logarithmic XP curve and bounding diff weights was essential to make small, atomic commits feel more rewarding than massive noisy ones.
  • Canvas & React Synchronization: Keeping a 60 FPS pixel-art Canvas loop decoupled from React UI state updates without introducing frame drops or stale closures.

What I learned

  • How spec-driven development in Kiro drastically reduces architectural drift when combining two completely different domains (REST data pipelines and a real-time game loop).
  • Designing deterministic state machines that map asynchronous webhook/API events into deterministic RPG combat animations.
  • Synthesizing lightweight 8-bit sound effects natively in the browser with the Web Audio API without bloating bundle sizes.

Built With

Share this project:

Updates

Submission history