Skip to content
game-architect logo

Game Architect

game-architect

Validate codebase architecture and organization before releases. Use when user asks to 'check architecture', 'validate structure', 'pre-release check', or before versioning.

SKILL.md

Full skill instructions

Game Architect

Validates Stapledon's Voyage codebase against the three-layer architecture and organization standards.

Quick Start

# Full validation (all checks - run before releases)
.claude/​skills/​game-architect/​scripts/​validate_all.sh --full

# Quick validation (core checks only - faster)
.claude/​skills/​game-architect/​scripts/​validate_all.sh --quick

# Individual checks (core)
.claude/​skills/​game-architect/​scripts/​check_file_sizes.sh       # Files under 800 lines
.claude/​skills/​game-architect/​scripts/​check_layer_boundaries.sh # No game logic in engine/
.claude/​skills/​game-architect/​scripts/​check_structure.sh        # Files in correct locations
.claude/​skills/​game-architect/​scripts/​check_import_cycles.sh    # No circular imports

# Individual checks (extended)
.claude/​skills/​game-architect/​scripts/​check_complexity.sh       # Function size, nesting
.claude/​skills/​game-architect/​scripts/​check_ailang_sync.sh      # AILANG ↔ Go types match
.claude/​skills/​game-architect/​scripts/​check_api_stability.sh    # sim_gen API unchanged
.claude/​skills/​game-architect/​scripts/​check_coverage.sh         # Test coverage
.claude/​skills/​game-architect/​scripts/​check_dependencies.sh     # Package import graph
.claude/​skills/​game-architect/​scripts/​pre_release_check.sh      # Build, tests, TODOs

When to Use This Skill

Invoke this skill when:

  • Before tagging a version release
  • After major refactoring
  • User asks "check architecture" or "validate structure"
  • Periodic codebase health checks
  • After adding new files/​directories

Architecture Rules

The Key Question: AILANG or Engine?

Ask: Does this affect gameplay outcomes?

If YES → AILANGIf NO → Engine OK
Position, health, inventoryDecorative particles
NPC behavior, dialogueScreen transitions
Time dilation, velocityShader effects
Planet data, civilizationsUI layout math
Game mode, decisionsAsset loading
AILANG owns WHAT is happening (state, logic, decisions)
Engine owns HOW it looks (rendering, animation, polish)

Four-Layer Separation

LayerLocationPurposeAllowed Content
Sourcesim/​*.ailGame logic (AILANG)Types, pure functions
Generatedsim_gen/​*.goGenerated from AILANGGame types (OK - generated)
Game Viewsgame_views/​*.goGame-specific renderingDomeRenderer, DeckStack
Engineengine/​*.goGeneric rendering (reusable)DrawCmd, Camera, Assets
Entrycmd/​*.goWiringMain, game loop

Engine Genericization (Critical)

Goal: Engine should work unchanged for ANY AILANG game.

Before adding to engine/, ask: Could a different game use this unchanged?

If YESIf NO
→ OK for engine/→ Put in game_views/

engine/ must be generic:

  • ✅ DrawCmd rendering (any variant)
  • ✅ Asset loading, camera, shaders
  • ❌ Deck names (Core, Engineering, Bridge)
  • ❌ Planet names (Saturn, Earth)
  • ❌ Crew roles (pilot, comms, scientist)
  • ❌ Game-specific state types

sim_gen/ is fine:

  • Generated from AILANG - game types belong there
  • Never manually edit

game_views/ for game-specific rendering:

  • DomeRenderer (solar system viz)
  • DeckStackRenderer (5-deck ship)
  • Any code using sim_gen types beyond DrawCmd

Layer Boundaries (Critical)

engine/ must NOT contain:

  • Game state (positions, health, time) - use AILANG
  • Game logic (NPC AI, decisions) - use AILANG
  • Hardcoded game data (planet configs) - use AILANG
  • Game-specific types (DeckType, DomeViewState) - use game_views/

engine/ CAN contain:

  • Generic DrawCmd rendering
  • Decorative particles (no gameplay impact)
  • Screen transition animations
  • Shader/​visual effects
  • UI layout helpers

File Size Limits

ThresholdAction
> 800 linesError - must split file
> 600 linesWarning - consider splitting
> 100 lines/​functionWarning - extract functions

Workflow

  1. Run full validation: ./​scripts/​validate_all.sh
  2. Review violations: Check output for ✗ markers
  3. Fix issues: Refactor code to correct layer
  4. Re-validate: Ensure all checks pass
  5. Proceed with release: Once clean

Checks Performed

Core Checks (blocking)

ScriptPurpose
check_file_sizes.shMax 800 lines/​file, warn at 600
check_layer_boundaries.shNo game logic in engine/, no rendering in sim_gen/
check_structure.shFiles in correct directories
check_import_cycles.shNo circular package dependencies
pre_release_check.shBuild, tests, TODOs, debug code

Extended Checks (warnings)

ScriptPurpose
check_complexity.shFunction size (<100 lines), nesting depth, param count
check_ailang_sync.shAILANG types match sim_gen Go types
check_api_stability.shsim_gen exports haven't changed unexpectedly
check_coverage.shTest coverage for critical paths
check_dependencies.shPackage import graph, layer violations

API Stability

The API stability check maintains a baseline of sim_gen exports:

# Update baseline after intentional API changes
.claude/​skills/​game-architect/​scripts/​check_api_stability.sh --update

Design Doc Management

Track implementation progress of design docs through sprint files:

# Audit design docs - check which have sprints
.claude/​skills/​game-architect/​scripts/​audit_design_docs.sh

Design Doc Workflow

  1. Create design doc in design_docs/​planned/​next/
  2. Use sprint-planner skill to create sprint plan in sprints/
  3. Execute sprint (sprint tracks implementation progress via checkboxes)
  4. When sprint complete, move doc to design_docs/​implemented/​vX_Y_Z/

Audit Output

The audit script checks:

  • Which design docs have corresponding sprint files
  • Sprint completion percentage (via checkbox counting)
  • Orphan sprints (sprints without design docs)

Design docs WITHOUT sprints need planning before implementation.

Resources

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View