スキル一覧に戻る
sunholo-data

game-architect

by sunholo-data

1🍴 0📅 2025年12月23日
GitHubで見るManusで実行

SKILL.md


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

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

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です