Setup engine

From striderZA/OpenCodeGameStudios · View interactive version

Setup engine is an AI agent skill from the GitHub repository striderZA/OpenCodeGameStudios. Configure the project's game engine and version. Pins the engine in AGENTS.md, detects knowledge gaps, and populates engine reference docs via webfetch when the version is beyond the LLM's training data.

How to use this skill

Skill file

When this skill is invoked:

1. Parse Arguments

Four modes:


2. Guided Mode (No Arguments)

If no engine is specified, run an interactive engine selection process:

Check for existing game concept

targets, art style, team size, and any engine recommendation from /concept-brainstorm

> "No game concept found. Consider running /concept-brainstorm first to discover what

> you want to build — it will also recommend an engine. Or tell me about your

> game and I can help you pick."

If the user wants to pick without a concept, ask in this order:

Question 1 — Prior experience (ask this first, always, via question):

Questions 2-6 — Decision matrix inputs (only if no prior engine experience):

Question 2 — Target platform (ask this second, always, via question — platform eliminates or heavily weights engines before any other factor):

  1. What kind of game? (2D, 3D, or both?)
  2. Primary input method? (keyboard/mouse, gamepad, touch, or mixed?)
  3. Team size and experience? (solo beginner, solo experienced, small team?)
  4. Any strong language preferences? (GDScript, C#, C++, visual scripting?)
  5. Budget for engine licensing? (free only, or commercial licenses OK?)

Produce a recommendation

Do NOT use a simple scoring matrix that eliminates engines. Instead, reason through the user's profile against the honest tradeoffs below, then present 1-2 recommendations with full context. Always end with the user choosing — never force a verdict.

Engine honest tradeoffs:

Godot 4

Unity

Unreal Engine 5

SFML 3

Raylib

Bevy

Genre-specific guidance (factor this into the recommendation):

Recommendation format:

  1. Show a comparison table with the user's specific factors as rows
  2. Give a primary recommendation with honest reasoning
  3. Name the best alternative and when to choose it instead
  4. Explicitly state: "This is a starting point, not a verdict — you can always migrate engines, and many developers switch between projects."
  5. Use question to confirm: "Does this recommendation feel right, or would you like to explore a different engine?"

If the user picks "Explore further":

Use question with concept-specific deep-dive topics. Always generate these options from the user's actual concept — do not use generic options. Always include at minimum:

The user can select multiple topics. Answer each selected topic in depth before returning to the engine confirmation question.


3. Look Up Current Version

Once the engine is chosen:


4. Update AGENTS.md Technology Stack

Language Selection (Godot only)

If Godot was chosen, ask the user which language to use before showing the proposed Technology Stack:

"Godot supports two primary languages:

A) GDScript — Python-like, Godot-native, fastest iteration. Best for beginners, solo devs, and teams coming from Python or Lua.

B) C# — .NET 8+, familiar to Unity developers, stronger IDE tooling (Rider / Visual Studio), slight performance advantage on heavy logic.

C) Both — GDScript for gameplay/UI scripting, C# for performance-critical systems. Advanced setup — requires .NET SDK alongside Godot.

Which will this project primarily use?"

Record the choice. It determines the AGENTS.md template, naming conventions, specialist routing, and which agent is spawned for code files throughout the project.


Read AGENTS.md and show the user the proposed Technology Stack changes.

Ask: "May I write these engine settings to AGENTS.md?"

Wait for confirmation before making any edits.

Update the Technology Stack section, replacing the [CHOOSE] placeholders with the actual values:

For Godot — use the template matching the language chosen above. See Appendix A at the bottom of this skill for all three variants (GDScript, C#, Both).

For Unity:

- **Engine**: Unity [version]
- **Language**: C#
- **Build System**: Unity Build Pipeline
- **Asset Pipeline**: Unity Asset Import Pipeline + Addressables

For Unreal:

- **Engine**: Unreal Engine [version]
- **Language**: C++ (primary), Blueprint (gameplay prototyping)
- **Build System**: Unreal Build Tool (UBT)
- **Asset Pipeline**: Unreal Content Pipeline

For SFML 3:

- **Engine**: SFML 3 (Simple and Fast Multimedia Library)
- **Language**: C++17
- **Build System**: CMake
- **Asset Pipeline**: Custom (file-based loading via sf::Texture::loadFromFile, sf::SoundBuffer, etc.)

For Raylib:

- **Engine**: Raylib
- **Language**: C (primary) or C++ (via raylib-cpp headers)
- **Build System**: CMake
- **Asset Pipeline**: Custom (file-based loading via LoadTexture, LoadSound, etc.)

For Bevy:

- **Engine**: Bevy 0.19
- **Language**: Rust
- **Build System**: Cargo
- **Asset Pipeline**: AssetServer / bevy_asset

4.5. Scaffold Build System (SFML 3 / Raylib / Bevy Only)

If SFML 3 or Raylib was chosen, ask the user about scaffolding the build system:

"I can create a skeleton CMakeLists.txt and a minimal src/main.cpp to get you started.

May I scaffold these files?"

Wait for confirmation before proceeding.

For SFML 3

Create CMakeLists.txt in the project root:

cmake_minimum_required(VERSION 3.20)
project(GameProject)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(SFML 3 REQUIRED COMPONENTS graphics window audio network system)

add_executable(${PROJECT_NAME}
    src/main.cpp
)

target_link_libraries(${PROJECT_NAME} PRIVATE
    sfml-graphics
    sfml-window
    sfml-audio
    sfml-network
    sfml-system
)

target_include_directories(${PROJECT_NAME} PRIVATE src)

Create src/main.cpp:

#include <SFML/Graphics.hpp>

int main() {
    auto window = sf::RenderWindow(sf::VideoMode({800, 600}), "Game");
    window.setFramerateLimit(60);

    while (window.isOpen()) {
        while (const auto event = window.pollEvent()) {
            if (event->is<sf::Event::Closed>())
                window.close();
        }

        window.clear(sf::Color::Black);

        // Game logic and rendering here

        window.display();
    }

    return 0;
}

For Raylib

Create CMakeLists.txt in the project root:

cmake_minimum_required(VERSION 3.20)
project(GameProject)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Try system-installed raylib first, fall back to FetchContent
find_package(raylib QUIET)
if(NOT raylib_FOUND)
    include(FetchContent)
    FetchContent_Declare(raylib
        GIT_REPOSITORY https://github.com/raysan5/raylib.git
        GIT_TAG 5.5
    )
    FetchContent_MakeAvailable(raylib)
endif()

add_executable(${PROJECT_NAME}
    src/main.cpp
)

target_link_libraries(${PROJECT_NAME} PRIVATE raylib)

target_include_directories(${PROJECT_NAME} PRIVATE src)

Create src/main.cpp:

#include "raylib.h"

int main() {
    const int screenWidth = 800;
    const int screenHeight = 600;

    InitWindow(screenWidth, screenHeight, "Game");
    SetTargetFPS(60);

    while (!WindowShouldClose()) {
        BeginDrawing();
        ClearBackground(BLACK);

        // Game logic and drawing here

        EndDrawing();
    }

    CloseWindow();
    return 0;
}

For Bevy

Ask: "I can create a skeleton Cargo project (Cargo.toml + src/main.rs) to get you started. May I scaffold these files?"

Create Cargo.toml:

[package]
name = "[project-name-lowercase]"
version = "0.1.0"
edition = "2024"

[dependencies]
bevy = "0.19"

Create src/main.rs:

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .add_systems(Update, hello)
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn(Camera2d);
}

fn hello() {
    println!("Hello, Bevy!");
}

Verify the skeleton against docs/engine-reference/bevy/modules/ for the pinned 0.19 version — if the reference docs show renames (e.g., camera or plugin component changes), update the skeleton to match. Note: Bevy is Rust-only, so the C-vs-C++ language-selection question does NOT apply.

Also ensure src/ and assets/ directories exist (create them if missing).

Add a .gitignore entry for the build directory if one does not exist:

build/

5. Populate Technical Preferences

After updating AGENTS.md, create or update docs/framework/technical-preferences.md with

engine-appropriate defaults. Read the existing template first, then fill in:

Engine & Language Section

Language Selection (SFML 3 and Raylib only)

(Bevy is excluded — Rust is the only language.)

If SFML 3 or Raylib was chosen, ask the user about C vs C++:

"SFML 3 / Raylib supports C and C++. Which will this project primarily use?

A) C++ — RAII patterns, classes, STL, stronger type safety. Recommended for larger projects.

B) C (Raylib only) — Plain C API, simpler compilation, C11 standard. Best for small projects or learning.

Which will this project primarily use?"

For SFML 3: only C++ is practical (SFML is a C++ library).

For Raylib: both C and C++ are viable. Record the choice.

Naming Conventions (engine defaults)

For Godot — see Appendix A for GDScript, C#, and Both variants.

For Unity (C#):

For Unreal (C++):

For SFML 3 (C++):

For Raylib (C):

For Raylib (C++):

Input & Platform Section

Populate ## Input & Platform using the answers gathered in Section 2 (or extracted

from the game concept). Derive the values using this mapping:

| Platform target | Gamepad Support | Touch Support |

|-----------------|-----------------|---------------|

| PC only | Partial (recommended) | None |

| Console | Full | None |

| Mobile | None | Full |

| PC + Console | Full | None |

| PC + Mobile | Partial | Full |

| Web | Partial | Partial |

For Primary Input, use the dominant input for the game genre:

Present the derived values and ask the user to confirm or adjust before writing.

Example filled section:

## Input & Platform
- **Target Platforms**: PC, Console
- **Input Methods**: Keyboard/Mouse, Gamepad
- **Primary Input**: Gamepad
- **Gamepad Support**: Full
- **Touch Support**: None
- **Platform Notes**: All UI must support d-pad navigation. No hover-only interactions.

Remaining Sections

Guardrail: Never add speculative dependencies to Allowed Libraries. For example, do NOT add GodotSteam unless Steam integration is actively beginning in this session. Post-launch integrations should be added to Allowed Libraries when that work begins, not during engine setup.

Engine Specialists Routing

Also populate the ## Engine Specialists section in technical-preferences.md with the correct routing for the chosen engine:

For Godot — see Appendix A for the routing table matching the language chosen.

For Unity:

## Engine Specialists
- **Primary**: unity-specialist
- **Language/Code Specialist**: unity-specialist (C# review — primary covers it)
- **Shader Specialist**: unity-shader-specialist (Shader Graph, HLSL, URP/HDRP materials)
- **UI Specialist**: unity-ui-specialist (UI Toolkit UXML/USS, UGUI Canvas, runtime UI)
- **Additional Specialists**: unity-dots-specialist (ECS, Jobs system, Burst compiler), unity-addressables-specialist (asset loading, memory management, content catalogs)
- **Routing Notes**: Invoke primary for architecture and general C# code review. Invoke DOTS specialist for any ECS/Jobs/Burst code. Invoke shader specialist for rendering and visual effects. Invoke UI specialist for all interface implementation. Invoke Addressables specialist for asset management systems.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.cs files) | unity-specialist |
| Shader / material files (.shader, .shadergraph, .mat) | unity-shader-specialist |
| UI / screen files (.uxml, .uss, Canvas prefabs) | unity-ui-specialist |
| Scene / prefab / level files (.unity, .prefab) | unity-specialist |
| Native extension / plugin files (.dll, native plugins) | unity-specialist |
| General architecture review | unity-specialist |

For Unreal:

## Engine Specialists
- **Primary**: unreal-specialist
- **Language/Code Specialist**: ue-blueprint-specialist (Blueprint graphs) or unreal-specialist (C++)
- **Shader Specialist**: unreal-specialist (no dedicated shader specialist — primary covers materials)
- **UI Specialist**: ue-umg-specialist (UMG widgets, CommonUI, input routing, widget styling)
- **Additional Specialists**: ue-gas-specialist (Gameplay Ability System, attributes, gameplay effects), ue-replication-specialist (property replication, RPCs, client prediction, netcode)
- **Routing Notes**: Invoke primary for C++ architecture and broad engine decisions. Invoke Blueprint specialist for Blueprint graph architecture and BP/C++ boundary design. Invoke GAS specialist for all ability and attribute code. Invoke replication specialist for any multiplayer or networked systems. Invoke UMG specialist for all UI implementation.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.cpp, .h files) | unreal-specialist |
| Shader / material files (.usf, .ush, Material assets) | unreal-specialist |
| UI / screen files (.umg, UMG Widget Blueprints) | ue-umg-specialist |
| Scene / prefab / level files (.umap, .uasset) | unreal-specialist |
| Native extension / plugin files (Plugin .uplugin, modules) | unreal-specialist |
| Blueprint graphs (.uasset BP classes) | ue-blueprint-specialist |
| General architecture review | unreal-specialist |

For SFML 3:

## Engine Specialists
- **Primary**: sfml-specialist
- **Language/Code Specialist**: sfml-specialist (C++ — single specialist covers all code)
- **Shader Specialist**: sfml-specialist (sf::Shader, GLSL integration)
- **UI Specialist**: sfml-specialist (no dedicated UI specialist — build UI with sf::Drawable or integrate Dear ImGui)
- **Additional Specialists**: None
- **Routing Notes**: Invoke primary for all SFML-related code, build system, and architecture decisions. The single specialist covers graphics, audio, network, window, and system modules.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.cpp, .hpp, .h files) | sfml-specialist |
| Shader files (.glsl, .vert, .frag) | sfml-specialist |
| CMake build files (CMakeLists.txt) | sfml-specialist |
| General architecture review | sfml-specialist |

For Raylib:

## Engine Specialists
- **Primary**: raylib-specialist
- **Language/Code Specialist**: raylib-specialist (C/C++ — single specialist covers all code)
- **Shader Specialist**: raylib-specialist (LoadShader, GLSL integration, rlgl raw OpenGL)
- **UI Specialist**: raylib-specialist (raygui header — immediate-mode GUI)
- **Additional Specialists**: None
- **Routing Notes**: Invoke primary for all raylib-related code, build system, and architecture decisions. The single specialist covers core, rlgl, raudio, raymath, and extras.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.c, .cpp, .h, .hpp files) | raylib-specialist |
| Shader files (.glsl, .vs, .fs) | raylib-specialist |
| CMake build files (CMakeLists.txt) | raylib-specialist |
| General architecture review | raylib-specialist |

For Bevy:

## Engine Specialists
- **Primary**: bevy-specialist
- **Language/Code Specialist**: bevy-specialist (Rust — single specialist covers all code)
- **Shader Specialist**: bevy-specialist (WGSL shaders, wgpu materials)
- **UI Specialist**: bevy-specialist (bevy_ui)
- **Additional Specialists**: None
- **Routing Notes**: Invoke primary for all Bevy code, Cargo build, and architecture decisions. The single specialist covers ECS, rendering, UI, assets, audio, and input.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.rs files) | bevy-specialist |
| Shader files (.wgsl) | bevy-specialist |
| Asset / scene files (.ron, .gltf, .scene) | bevy-specialist |
| General architecture review | bevy-specialist |

Collaborative Step

Present the filled-in preferences to the user. For Godot, include the chosen language and note where the full naming conventions and routing tables live:

"Here are the default technical preferences for [engine] ([language if Godot]). The naming conventions and specialist routing are in Appendix A of this skill — I'll apply the [GDScript/C#/Both] variant. Want to customize any of these, or shall I save the defaults?"

For all other engines, present the defaults directly without referencing the appendix.

Wait for approval before writing the file.


6. Determine Knowledge Gap

Check whether the engine version is likely beyond the LLM's training data.

Known approximate coverage (update this as models change):

Compare the user's chosen version against these baselines:

Inform the user which category they're in and why.


7. Populate Engine Reference Docs

If WITHIN training data (LOW RISK):

Create a minimal docs/engine-reference/<engine>/VERSION.md:

# [Engine] — Version Reference

| Field | Value |
|-------|-------|
| **Engine Version** | [version] |
| **Project Pinned** | [today's date] |
| **LLM Knowledge Cutoff** | May 2025 |
| **Risk Level** | LOW — version is within LLM training data |

## Note

This engine version is within the LLM's training data. Engine reference
docs are optional but can be added later if agents suggest incorrect APIs.

Run `/setup-engine refresh` to populate full reference docs at any time.

Do NOT create breaking-changes.md, deprecated-apis.md, etc. — they would

add context cost with minimal value.

If BEYOND training data (MEDIUM or HIGH RISK):

Create the full reference doc set by searching the web:

  1. Search for the official migration/upgrade guide:
  1. Fetch and extract from official documentation:

Ask: "May I create the engine reference docs under docs/engine-reference/<engine>/?"

Wait for confirmation before writing any files.

  1. Create the full reference directory:

```

docs/engine-reference/<engine>/

├── VERSION.md # Version pin + knowledge gap analysis

├── breaking-changes.md # Version-by-version breaking changes

├── deprecated-apis.md # "Don't use X → Use Y" tables

├── current-best-practices.md # New practices since training cutoff

└── modules/ # Per-subsystem references (create as needed)

```

  1. Populate each file using real data from the web searches, following

the format established in existing reference docs. Every file must have

a "Last verified: [date]" header.

  1. For module files: Only create modules for subsystems where significant

changes occurred. Don't create empty or minimal module files.

7.3. Configure godot-mcp (Optional — Godot Only)

If Godot was chosen as the engine, the AI can work more effectively with the

godot-mcp server, which provides

runtime tools for interacting with the Godot editor and running project:

Available MCP tools:

Installation:

# Install via npx (no global install needed)
# Pin to a specific version in production (e.g., @coding-solo/godot-mcp@1.0.0)
npx @coding-solo/godot-mcp@latest

MCP Configuration:

Add the following to your harness MCP config (opencode.json for OpenCode, ~/.pi/agent/mcp.json for Pi):

{
  "mcpServers": {
    "godot": {
      "command": "npx",
      "args": ["@coding-solo/godot-mcp"],
      "env": {
        "DEBUG": "true"
      }
    }
  }
}

Note: DEBUG=true enables verbose logging of all MCP communication (requests, responses, and debug info). Use it when troubleshooting MCP tool issues or during initial setup. Disable ("DEBUG": "false" or remove the variable) in normal use to reduce log noise.

Environment setup:

Optionally set GODOT_PATH if the Godot binary is not in PATH:

"env": {
  "GODOT_PATH": "/path/to/godot",
  "DEBUG": "true"
}

7.4. Configure Unity agent access (Optional — Unity Only)

What it is: Unity's official agent integration. The Unity CLI drives a running Unity 6+ Editor through the project's com.unity.pipeline package, and its built-in unity mcp command exposes the same Editor commands to MCP clients. This replaces the community CoplayDev unity-mcp package the framework previously recommended. Unity deprecated the in-Editor MCP server in com.unity.ai.assistant; the CLI is its supported replacement, and third-party MCP packages are unaffected.

Prerequisites (must be installed first)
Recommended setup (agents that can run shell commands)

OCGS agents run shell commands, so use the CLI directly. It exposes more Editor commands than the MCP server and needs no server process.

  1. Open the project in Unity 6+ and confirm the Editor is reachable:

```bash

unity status --project-path /path/to/MyProject

```

Expect state: ready (or a list of running Editors). unity status also reports Safe Mode and its compile errors.

  1. Discover the commands this Editor exposes, then drive it:

```bash

unity command --project-path /path/to/MyProject

unity command scene get_hierarchy --project-path /path/to/MyProject

unity command console get --project-path /path/to/MyProject

unity command editor.playmode start --project-path /path/to/MyProject

unity recompile --strict --project-path /path/to/MyProject

```

unity test starts its own batch Editor and refuses a project that is already open in an Editor. To run EditMode/PlayMode tests, close the Editor and run unity test /path/to/MyProject, or run the Pipeline's test command in the open Editor (unity command test.run --project-path /path/to/MyProject; run_tests on older packages).

Command names come from the project's Pipeline package. Use unity command rather than guessing, and unity commands --grep <term> to search the CLI, plugin and Editor command lists.

  1. Optionally install Unity's own agent skills where supported:

```bash

unity skill install --list

unity skill install opencode # OpenCode

unity skill install claude-code # Claude Code

```

OpenCode also has unity setup opencode, which installs the skills and a session plugin. unity setup all configures every detected client and deliberately does not register an MCP server for clients that can run shell commands. Pi and omp are not supported by unity skill install; use the CLI directly with the Unity specialist agents.

MCP fallback (clients without shell access, or if you prefer MCP tools)

unity mcp (Unity CLI 0.1.0-beta.8 or later) is the CLI's own stdio MCP server, not the deprecated in-Editor server. It starts even when no Editor is running and exposes a unity-cli-status tool until one connects. Tool names are the Editor command names with spaces and dots replaced by underscores (scene_get_hierarchy, console_get, script_eval); check tools/list for the names your Editor exposes, because an older Pipeline package may use flat names such as eval and run_tests.

Register it automatically where supported:

unity mcp configure --list          # supported clients and config paths
unity mcp configure claude-code     # also: cursor, vscode, windsurf, cline, codex, zed, ...

unity mcp configure supports 16 clients but not OpenCode, Pi, or omp. It can also remove an entry left by the deprecated in-Editor server:

unity mcp configure cursor --replace-legacy

If you are upgrading from the framework's previous CoplayDev unity-mcp setup, delete the old "unity" entry that points at http://localhost:8080/mcp from your harness config — opencode.json, Pi's ~/.pi/agent/mcp.json or .pi/mcp.json, or .omp/mcp.json — by hand before adding the block below. --replace-legacy only removes entries left by Unity's deprecated in-Editor AI Assistant relay, and unity mcp configure does not support OpenCode, Pi, or omp.

Manual config for the harnesses OCGS documents:

OpenCode — add to mcp.servers in opencode.json:

"unity": {
  "type": "local",
  "command": ["unity", "mcp"],
  "disabled": true,
  "codemode": false
}

Pi — add to the user-level ~/.pi/agent/mcp.json (Pi ignores a project .pi/mcp.json until the project is trusted). exposure: "direct" is required; the default codemode exposure hides the tools from the model:

{
  "mcpServers": {
    "unity": {
      "command": "unity",
      "args": ["mcp"],
      "enabled": false,
      "exposure": "direct"
    }
  }
}

omp — add to .omp/mcp.json in the project:

{
  "mcpServers": {
    "unity": {
      "type": "stdio",
      "command": "unity",
      "args": ["mcp"],
      "enabled": false
    }
  }
}

Keep the entry disabled until you want a session to use MCP tools, then restart the client. Pass --project-path <project> in args when the client starts outside the Unity project or more than one Editor is open. Add --cli-tools for six read-only CLI tools that work with no Editor running, and --tools / --exclude-tools to keep the tool list small.

⚠ The Unity Editor must be running for Editor commands to work. With no Editor, unity status reports none and MCP sessions expose only unity-cli-status; start the Editor and open the project, then retry.

Verify
Troubleshooting

Unity 2021.3–5.x: the Unity CLI can only drive Unity 6.0+ Editors. On older projects, the community MCP for Unity package still works and is unaffected by Unity's deprecation, but it is no longer the framework default. Prefer upgrading to Unity 6 when you can.

7.5. Build & Run Setup (SFML 3 / Raylib — No MCP Available)

SFML 3 and Raylib do not have MCP servers. Instead, configure a build-and-run workflow:

Recommended CMake structure:

project-root/
├── CMakeLists.txt          # cmake_minimum_required, project(), add_executable, target_link_libraries
├── src/                    # Game source code
├── assets/                 # Textures, sounds, fonts, shaders
└── build/                  # Build output (gitignored)

Minimal CMakeLists.txt for SFML 3:

cmake_minimum_required(VERSION 3.20)
project(my_game)

set(CMAKE_CXX_STANDARD 17)
find_package(SFML 3 REQUIRED COMPONENTS graphics window audio network system)

add_executable(my_game src/main.cpp)
target_link_libraries(my_game PRIVATE sfml-graphics sfml-window sfml-audio sfml-network sfml-system)

Minimal CMakeLists.txt for Raylib:

cmake_minimum_required(VERSION 3.20)
project(my_game)

set(CMAKE_C_STANDARD 11)      # For C projects
set(CMAKE_CXX_STANDARD 17)    # For C++ projects

# Option A: find_package
find_package(raylib REQUIRED)

# Option B: FetchContent (vendors raylib automatically)
include(FetchContent)
FetchContent_Declare(raylib GIT_REPOSITORY https://github.com/raysan5/raylib.git GIT_TAG 5.5)
FetchContent_MakeAvailable(raylib)

add_executable(my_game src/main.cpp)
target_link_libraries(my_game PRIVATE raylib)

Build & run commands:

cmake -B build -S .
cmake --build build
./build/my_game           # Linux/macOS
.\build\Release\my_game.exe  # Windows

For web targets (Raylib only):

cmake -B build-web -S . -DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=/path/to/emscripten/cmake/Modules/Platform/Emscripten.cmake
cmake --build build-web

7.6. Configure Autopilot Playtesting (Optional — Godot 4.7+, OpenCode, Pi or omp)

What it is: Autopilot, by the developers of Aura (Apache-2.0), plays the game open in the Godot editor and reports what it finds. Its results are automated evidence, never a human playtest. See github.com/ramenvr/autopilot and the /autopilot-playtest skill.

Gate: Offer this step only if all three conditions hold. If any fails, skip the step, report "Autopilot: skipped (needs Godot 4.7+ and OpenCode, Pi or omp)" in the Output Summary, and do not offer it.

Ask with question:

If the answer is Other, skip as above. Other harnesses are not verified.

Ask with question:

If the user picks No, report "Autopilot: not set up" in the Output Summary and write nothing.

If the user picks Yes:

  1. Tell the user what they must do themselves. Setup cannot install these, and keys must never be pasted into this chat:
  1. Wire the server. Setup writes only inside this repository. Show the block for the chosen harness:
"autopilot": {
  "type": "local",
  "command": ["autopilot", "mcp"],
  "disabled": true,
  "codemode": false
}
{
  "mcpServers": {
    "autopilot": {
      "command": "autopilot",
      "args": ["mcp"],
      "enabled": false,
      "exposure": "direct"
    }
  }
}

Keep the entry disabled. exposure: "direct" is required: the default codemode does not show the tools to the model.

{
  "mcpServers": {
    "autopilot": {
      "type": "stdio",
      "command": "autopilot",
      "args": ["mcp"],
      "enabled": false
    }
  }
}

Keep the entry disabled. Restart omp after enabling it.

  1. Do not start a run from this step.
  2. In the Output Summary, report "Autopilot: set up; addon, agent service, and keys still to do".

8. Update AGENTS.md Import

Ask: "May I update the @ import in AGENTS.md to point to the new engine reference?"

Wait for confirmation, then update the @ import under "Engine Version Reference" to point to the

correct engine:

## Engine Version Reference

@docs/engine-reference/<engine>/VERSION.md

If the previous import pointed to a different engine (e.g., switching from

Godot to Unity), update it.


9. Update Agent Instructions

Ask: "May I add a Version Awareness section to the engine specialist agent files?" before making any edits.

For the chosen engine's specialist agents, verify they have a

"Version Awareness" section. If not, add one following the pattern in

the existing Godot specialist agents.

The section should instruct the agent to:

  1. Read docs/engine-reference/<engine>/VERSION.md
  2. Check deprecated APIs before suggesting code
  3. Check breaking changes for relevant version transitions
  4. Use webfetch to verify uncertain APIs

10. Refresh Subcommand

If invoked as /setup-engine refresh:

  1. Read the existing docs/engine-reference/<engine>/VERSION.md to get

the current engine and version

  1. Use webfetch to check for:
  1. Update all reference docs with new findings
  2. Update "Last verified" dates on all modified files
  3. Report what changed

11. Upgrade Subcommand

If invoked as /setup-engine upgrade [old-version] [new-version]:

Step 1 — Read Current Version State

Read docs/engine-reference/<engine>/VERSION.md to confirm the current pinned

version, risk level, and any migration note URLs already recorded. If

old-version was not provided as an argument, use the pinned version from this

file.

Step 2 — Fetch Migration Guide

Use webfetch and WebFetch to locate the official migration guide between

old-version and new-version:

or use the URL found via search.

Extract: renamed APIs, removed APIs, changed defaults, behavior changes, and

any "must migrate" items.

Step 3 — Pre-Upgrade Audit

Scan src/ for code that uses APIs known to be deprecated or changed in the

target version:

guide (e.g., old function names, removed node types, changed property names)

Present the audit results as a table:

Pre-Upgrade Audit: [engine] [old-version] → [new-version]
==========================================================

Files requiring changes:
  File                              | Deprecated API Found       | Effort
  --------------------------------- | -------------------------- | ------
  src/gameplay/player_movement.gd   | old_api_name               | Low
  src/ui/hud.gd                     | removed_node_type          | Medium

Breaking changes to watch for:
  - [change description from migration guide]
  - [change description from migration guide]

Recommended migration order (dependency-sorted):
  1. [system/layer with fewest dependencies first]
  2. [next system]
  ...

If no deprecated APIs are found in src/, report: "No deprecated API usage

found in src/ — upgrade may be low-risk."

Step 4 — Confirm Before Updating

Ask the user before making any changes:

"Pre-upgrade audit complete. Found [N] files using deprecated APIs.

Proceed with upgrading VERSION.md to [new-version]?

(This will update the pinned version and add migration notes — it does NOT

change any source files. Source migration is done manually or via stories.)"

Wait for explicit confirmation before continuing.

Step 5 — Update VERSION.md

After confirmation:

  1. Update docs/engine-reference/<engine>/VERSION.md:

table if the new version falls beyond the LLM knowledge cutoff

containing: migration guide URL, key breaking changes, deprecated APIs

found in this project, and recommended migration order from the audit

  1. If breaking-changes.md or deprecated-apis.md exist in the engine

reference directory, append the new version's changes to those files.

Step 6 — Post-Upgrade Reminder

After updating VERSION.md, output:

VERSION.md updated: [engine] [old-version] → [new-version]

Next steps:
1. Migrate deprecated API usages in the [N] files listed above
2. Run /setup-engine refresh after upgrading the actual engine binary to
   verify no new deprecations were missed
3. Run /architecture-review — the engine upgrade may invalidate ADRs that
   reference specific APIs or engine capabilities
4. If any ADRs are invalidated, run /propagate-design-change to update
   downstream stories

12. Output Summary

After setup is complete, output:

Engine Setup Complete
=====================
Engine:          [name] [version]
Language:        [GDScript | C# | GDScript + C# | C# | C++ + Blueprint | C++17 | C (primary) or C++ | C11]
Knowledge Risk:  [LOW/MEDIUM/HIGH]
Reference Docs:  [created/skipped]
AGENTS.md:       [updated]
Tech Prefs:      [created/updated]
Agent Config:    [verified]
Autopilot:       [set up, steps pending | not set up | skipped (needs Godot 4.7+ and OpenCode, Pi or omp)]

Next Steps:
1. Review docs/engine-reference/<engine>/VERSION.md
2. [If from /concept-brainstorm] Run /map-systems to decompose your concept into individual systems
3. [If from /concept-brainstorm] Run /design-system to author per-system GDDs (guided, section-by-section)
4. [If from /concept-brainstorm] Run /prototype [core-mechanic] to test the core loop
5. [If fresh start] Run /concept-brainstorm to discover your game concept
6. Create your first milestone: /sprint-plan new

Verdict: COMPLETE — engine configured and reference docs populated.

Guardrails


Appendix A — Godot Language Configuration

All Godot-specific variants for language-dependent configuration. Referenced from Sections 4 and 5 — only relevant when Godot is the chosen engine. Use the subsection matching the language chosen in Section 4.


A1. AGENTS.md Technology Stack Templates

GDScript:

- **Engine**: Godot [version]
- **Language**: GDScript
- **Build System**: SCons (engine), Godot Export Templates
- **Asset Pipeline**: Godot Import System + custom resource pipeline

Guardrail: When using this GDScript template, write the Language field as exactly "GDScript" — no additions. Do NOT append "C++ via GDExtension" or any other language. The C# template below includes GDExtension because C# projects commonly wrap native code; GDScript projects do not.

C#:

- **Engine**: Godot [version]
- **Language**: C# (.NET 8+, primary), C++ via GDExtension (native plugins only)
- **Build System**: .NET SDK + Godot Export Templates
- **Asset Pipeline**: Godot Import System + custom resource pipeline

Both — GDScript + C#:

- **Engine**: Godot [version]
- **Language**: GDScript (gameplay/UI scripting), C# (performance-critical systems), C++ via GDExtension (native only)
- **Build System**: .NET SDK + Godot Export Templates
- **Asset Pipeline**: Godot Import System + custom resource pipeline

A2. Naming Conventions

GDScript:

C#:

Both — GDScript + C#:

Use GDScript conventions for .gd files and C# conventions for .cs files. Mixed-language files do not exist — the boundary is per-file. When in doubt about which language a new system should use, ask the user and record the decision in technical-preferences.md.


A3. Engine Specialists Routing

GDScript:

## Engine Specialists
- **Primary**: godot-specialist
- **Language/Code Specialist**: godot-gdscript-specialist (all .gd files)
- **Shader Specialist**: godot-shader-specialist (.gdshader files, VisualShader resources)
- **UI Specialist**: godot-specialist (no dedicated UI specialist — primary covers all UI)
- **Additional Specialists**: godot-gdextension-specialist (GDExtension / native C++ bindings only)
- **Routing Notes**: Invoke primary for architecture decisions, ADR validation, and cross-cutting code review. Invoke GDScript specialist for code quality, signal architecture, static typing enforcement, and GDScript idioms. Invoke shader specialist for material design and shader code. Invoke GDExtension specialist only when native extensions are involved.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.gd files) | godot-gdscript-specialist |
| Shader / material files (.gdshader, VisualShader) | godot-shader-specialist |
| UI / screen files (Control nodes, CanvasLayer) | godot-specialist |
| Scene / prefab / level files (.tscn, .tres) | godot-specialist |
| Native extension / plugin files (.gdextension, C++) | godot-gdextension-specialist |
| General architecture review | godot-specialist |

C#:

## Engine Specialists
- **Primary**: godot-specialist
- **Language/Code Specialist**: godot-csharp-specialist (all .cs files)
- **Shader Specialist**: godot-shader-specialist (.gdshader files, VisualShader resources)
- **UI Specialist**: godot-specialist (no dedicated UI specialist — primary covers all UI)
- **Additional Specialists**: godot-gdextension-specialist (GDExtension / native C++ bindings only)
- **Routing Notes**: Invoke primary for architecture decisions, ADR validation, and cross-cutting code review. Invoke C# specialist for code quality, [Signal] delegate patterns, [Export] attributes, .csproj management, and C#-specific Godot idioms. Invoke shader specialist for material design and shader code. Invoke GDExtension specialist only when native C++ plugins are involved.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.cs files) | godot-csharp-specialist |
| Shader / material files (.gdshader, VisualShader) | godot-shader-specialist |
| UI / screen files (Control nodes, CanvasLayer) | godot-specialist |
| Scene / prefab / level files (.tscn, .tres) | godot-specialist |
| Project config (.csproj, NuGet) | godot-csharp-specialist |
| Native extension / plugin files (.gdextension, C++) | godot-gdextension-specialist |
| General architecture review | godot-specialist |

Both — GDScript + C#:

## Engine Specialists
- **Primary**: godot-specialist
- **GDScript Specialist**: godot-gdscript-specialist (.gd files — gameplay/UI scripts)
- **C# Specialist**: godot-csharp-specialist (.cs files — performance-critical systems)
- **Shader Specialist**: godot-shader-specialist (.gdshader files, VisualShader resources)
- **UI Specialist**: godot-specialist (no dedicated UI specialist — primary covers all UI)
- **Additional Specialists**: godot-gdextension-specialist (GDExtension / native C++ bindings only)
- **Routing Notes**: Invoke primary for cross-language architecture decisions and which systems belong in which language. Invoke GDScript specialist for .gd files. Invoke C# specialist for .cs files and .csproj management. Prefer signals over direct cross-language method calls at the boundary.

### File Extension Routing

| File Extension / Type | Specialist to Spawn |
|-----------------------|---------------------|
| Game code (.gd files) | godot-gdscript-specialist |
| Game code (.cs files) | godot-csharp-specialist |
| Cross-language boundary decisions | godot-specialist |
| Shader / material files (.gdshader, VisualShader) | godot-shader-specialist |
| UI / screen files (Control nodes, CanvasLayer) | godot-specialist |
| Scene / prefab / level files (.tscn, .tres) | godot-specialist |
| Project config (.csproj, NuGet) | godot-csharp-specialist |
| Native extension / plugin files (.gdextension, C++) | godot-gdextension-specialist |
| General architecture review | godot-specialist |
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.