In the evolving landscape of software development, the line between utility and creativity is increasingly blurring. For Lee Reilly, a Senior Program Manager at GitHub, a simple challenge—the GitHub Copilot CLI Challenge—became the catalyst for a project that blends technical infrastructure with classic gaming nostalgia. The result is GitHub Dungeons, a terminal-based extension that transforms any software repository into a procedurally generated, permadeath roguelike game.
This project serves as a compelling case study on how AI-assisted coding can shift the focus of development from writing boilerplate syntax to high-level architectural design and creative problem-solving.
The Genesis of a Terminal Adventure
The project began as an off-the-cuff response to the GitHub Copilot CLI Challenge. Reilly, known for his work in developer relations and hackathon management, sought to push the boundaries of what a CLI tool could achieve.

"I got nerd-sniped into the challenge and made a questionable decision: I turned my codebase into a roguelike dungeon," Reilly remarked. The initial prompt was deceptively simple: create a tool in Go that takes a repository and renders it as a navigable dungeon using Binary Space Partitioning (BSP). With a quick /yolo command—a nod to the Copilot CLI’s alias for allow-all—the process was set in motion.
The concept fits the terminal environment perfectly. Roguelikes, which trace their lineage to the 1980s game Rogue, are defined by procedural generation, text-based interfaces, and, most importantly, permadeath. By tying the game’s layout to the repository’s commit SHA, Reilly ensured that every repository produces a unique map, and every commit fundamentally reshapes the dungeon’s architecture.
The Mechanics of Code-to-Dungeon Mapping
At the heart of GitHub Dungeons lies a sophisticated application of procedural generation. To ensure the game feels "designed" rather than randomly generated, Reilly utilized Binary Space Partitioning (BSP).

The BSP Workflow
- Spatial Initialization: The system starts with a single, large rectangular space representing the entire dungeon.
- Recursive Partitioning: The space is split into two regions, which are then split again, recursively, either horizontally or vertically.
- Leaf Generation: Once regions become too small to subdivide, they are designated as "leaf" regions, forming the foundation of the rooms.
- Room Creation: These leaves are transformed into rooms, with randomized sizing and positioning to avoid a monotonous, grid-like appearance.
- Corridor Connectivity: The algorithm walks back up the binary tree, linking sibling rooms with L-shaped corridors.
This approach creates "structured chaos." It avoids the messiness of pure randomness and the predictability of rigid grids, resulting in an environment that feels deliberate and challenging to navigate.
AI as an Extension of the Developer
A significant aspect of this project is the use of GitHub Copilot’s /delegate command. Rather than manually writing every line of Go code, Reilly used the tool to hand off specific tasks to the AI agent.
"Using Copilot is like having an army of NPCs available to do whatever I want them to do," Reilly explained. This workflow—describing high-level behavior in plain English, delegating the implementation to the agent, and reviewing the resulting pull requests—allowed him to maintain a "game designer mindset."

For instance, when Reilly wanted to increase the difficulty, he delegated the task: "Make each level progressively harder; on level 2 there are extra baddies, but more health potions." The AI generated the logic, which Reilly then refined. This method of working allowed for rapid iteration, enabling the inclusion of features like "fog of war," auto-attack mechanics, and even a "dungeon scribe" agent that automatically generated technical documentation and ASCII-art diagrams explaining the generation logic.
The Philosophy of Permadeath and Risk
The name of the project is not merely an homage to classic gaming; it captures the volatile nature of the terminal. The use of /yolo is thematic, as the game adheres to the strict rules of permadeath. If the player’s HP reaches zero, the game ends, and the progress is lost—forcing a total restart.
To push the concept to its logical (and dangerous) extreme, Reilly experimented with a "Danger Zone" mode. By creating a pre-commit hook, developers can integrate the game directly into their workflow. In this configuration, if a developer fails to "beat the dungeon," the script triggers a git stash that drops all uncommitted changes.

While the author explicitly warns against using this in a production environment, it highlights the potential for gamification to influence software development habits. It serves as a reminder of the fragility of code and the importance of version control—albeit in a high-stakes, ludic fashion.
Implications for the Future of Dev-Tooling
The success of GitHub Dungeons raises broader questions about the role of AI in software engineering.
1. Shift from Syntax to Strategy
The traditional hurdle in learning a new language—like Go, in this case—is mastering syntax. AI agents are effectively lowering this barrier, allowing developers to focus on architectural patterns and user experience. When the "boilerplate" is automated, the developer becomes an orchestrator of systems rather than a laborer of syntax.

2. The Rise of "Agentic" Coding
The use of the /delegate command demonstrates a shift toward "agentic" development. This is a workflow where the human developer sets the intent and reviews the output of an autonomous agent, rather than performing line-by-line coding. This could significantly accelerate the development of developer-focused tooling and CLI extensions.
3. Reimagining Developer Experience (DX)
Projects like this demonstrate that developer tooling doesn’t have to be sterile. By integrating game mechanics into the terminal, developers can build tools that are not only functional but also engaging. As AI continues to handle the heavy lifting of scaffolding and documentation, the "personality" of software tools may become a new frontier for creativity.
Installation and Community Engagement
For those interested in testing their own codebase, the installation process is straightforward for users of the GitHub CLI:

gh extension install leereilly/gh-dungeons
Once installed, running gh dungeons transforms a local repository into an interactive dungeon. The game supports standard WASD, arrow key, and Vim-style navigation.
The project has already sparked interest in the developer community, serving as a template for how AI-assisted development can lead to rapid prototyping. Whether it is used as a legitimate tool for stress-testing a repository or simply as a creative outlet for a Friday afternoon, GitHub Dungeons stands as a testament to the versatility of modern developer environments.
Conclusion: A New Era of Playful Engineering
GitHub Dungeons is more than just a novelty; it is a successful experiment in human-AI collaboration. By offloading the technical minutiae to an AI agent, Lee Reilly was able to explore complex concepts like BSP and procedural generation without getting bogged down in the traditional hurdles of development.

As AI coding assistants continue to mature, we are likely to see more "playful" engineering projects that challenge our perceptions of what a CLI can do. In the end, the project validates a core tenet of modern software development: the best tools are often the ones that not only solve a problem but also inspire the user to keep exploring.
For now, the dungeon awaits. Just remember: keep your commits frequent and your HP high. If you choose to enable the pre-commit hook, you do so at your own peril—because, in the world of roguelikes, you really do only live once.







