architecture

Guide Bestow game project architecture with Lua hot reloading and state management patterns.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/radical-beard/bestow --skill architecture-radical-beard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture
Source: https://github.com/radical-beard/bestow/tree/main/template/.claude/skills/architecture
Command: npx skills add https://github.com/radical-beard/bestow --skill architecture-radical-beard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides essential guidelines and patterns to prevent common bugs and ensure maintainable, high-quality code in Bestow game development.

Core Features & Use Cases

  • Architectural Best Practices: Learn the golden rules for writing correct, idiomatic Bestow code that survives hot reloading and avoids crashes.
  • Project Structure: Understand the recommended file-to-namespace mapping and the purpose of different module types (Entities, Systems, Levels, Data).
  • Use Case: When starting a new game project or refactoring existing code, consult this Skill to ensure your project follows proven patterns for state management, event handling, and system communication, leading to a more stable and scalable game.

Quick Start

Follow the golden rules for architecting your Bestow game projects by reading this skill.

Frequently Asked Questions about architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Lua game project to support hot reloading without crashing?

Structure a Lua game project using specific module types for entities, systems, levels, and data. This architecture prevents hot reload crashes by avoiding cached app references at file scope and using table+method callbacks for system communication.

What's the best way to manage mutable state in Bestow game development?

Manage mutable state in Bestow game development by storing it in app.main.state. This pattern ensures your game survives hot reloading cycles and avoids common bugs associated with file-scoped variable caching.

How do I handle event-driven communication and input in Lua game systems?

Handle event-driven communication and input in Lua game systems by employing table+method callbacks. Following this initialization sequence prevents common bugs and ensures code maintainability across your game project.

Does my Bestow game architecture need specific file-to-namespace mapping for entities and systems?

Yes, Bestow game architecture requires a specific file-to-namespace mapping. Organizing your code into distinct Entities, Systems, Levels, and Data modules ensures correct patterns for state management and system communication.

Why does my Lua game code break when hot reloading entities and levels?

Lua game code breaks during hot reloading when developers cache app.* at file scope or misuse mutable state. Refactoring to use app.main.state and strict table+method callbacks resolves these crashes and ensures code maintainability.