Turn a single OpenCode session into a full game development studio.
49 agents. 77 skills. 77 commands. One coordinated AI team.
A faithful port of Claude Code Game Studios (commit
984023d) to a native OpenCode project. See PORTING_NOTES.md for the full porting log, decisions, and known gaps.
Building a game solo with AI is powerful — but a single chat session has no structure. No one stops you from hardcoding magic numbers, skipping design docs, or writing spaghetti code. There's no QA pass, no design review, no one asking "does this actually fit the game's vision?"
OpenCode Game Studios solves this by giving your AI session the structure of a real studio. Instead of one general-purpose assistant, you get 49 specialized agents organized into a studio hierarchy — directors who guard the vision, department leads who own their domains, and specialists who do the hands-on work. Each agent has defined responsibilities, escalation paths, and quality gates.
The result: you still make every decision, but now you have a team that asks the right questions, catches mistakes early, and keeps your project organized from first brainstorm to launch.
- 49 OpenCode subagents in
.opencode/agents/*.mdwith deny-by-default permissions, model-tier metadata, and structured delegation paths - 77 repo-local skills in
.opencode/skills/*/SKILL.md- 73 upstream workflow skills ported to OpenCode
- 4 OpenCode-native support skills:
studio-status,studio-next,handoff, andresume-from-handoff
- 77 slash commands in
.opencode/commands/*.md— one per skill, all run inline in the main conversation (no subtask isolation) - 12 hook scripts +
ccgs-hooks.jsplugin adapter mapping OpenCode events to shell-based validation (commits, pushes, assets, session lifecycle, agent audit trail, gap detection) - 15 path-scoped rule files in
.opencode/rules/*.mdwith a routing table inAGENTS.mdthat tells agents which rules to read before editing matching paths - 17 agent memory contracts in
.opencode/agent-memory/*/MEMORY.md - 41 document templates for GDDs, UX specs, ADRs, sprint plans, HUD design, accessibility, and more
- Root
AGENTS.mdstartup instructions with behavioral sections (Startup Contract, Verification Integrity, Vertical-Slice Forcing Function, Code-Turn Discipline, Workflow Gates, File Lifecycle, Continuity Epilogue) - Installer, uninstaller, audit framework, release tooling, and manifest tracking
- Coexistence rules for repositories that already contain Claude Code or Codex Game Studios files
Package version: 0.5.2 (see .opencode/VERSION).
This release includes:
- Hard
/resume-from-handofflane-selection boundary: focus arguments only bias ranking, multiple lanes use thequestiontool for structured choice, single lanes wait for numeric1, and follow-up forks remain separate decisions. FIRST verification cannot be waived by lane choice, and entering a selected workflow grants no additional mutation authority. /handoffmandatory two-round review gate with STANDARD/ADVERSARIAL tier selection, pure-document exemptions, finding triage, conditional second review, pass caps, and an auditable handoff record. The review stays inside the active OpenCode session with no external egress.- Bug lifecycle consolidation:
/bug-report verifywith a VERIFIED FIXED verdict can complete verification, closure, stale triage cleanup, and derived session-state routing under one approved changeset instead of forcing separate verify → close → triage handoffs. - User-owned playtest focus routing: when owed verification or the next action
is a manual playtest, closeouts include a
Playtest focus:brief with the hypothesis, setup/build, observation prompts, and verdict/evidence to return./playtest-reporttemplates and follow-up routing now require concrete hypotheses before sending the user back to play, while preserving the user's ownership of game-feel and balance verdicts. Arun_playtest_focusvalidator keeps the contract present in root instructions, session-continuity docs, and the playtest-report workflow. - Session Worklist routing cache (
## Session Worklist+## Phase Guardinproduction/session-state/active.md);/resume-from-handoffcompiles it, post-work closeouts read it, and/studio-nextis now a deprecated manual reference - Numbered closeout on completion skills: final responses end with a
Next action:prompt and exactly one numeric(Recommended)option - Central role-agent delegation contract: explicit skill invocation authorizes only the declared spawns, with review-mode filtering and no simulated specialist/director verdicts
- Full behavioral alignment with upstream CCGS (Startup Contract, Resume & Wrap-Up Routing, Verification Integrity, Vertical-Slice Forcing Function, Code-Turn Discipline, Workflow Gates, File Lifecycle, Continuity Epilogue)
- Model-agnostic installer with 3-tier model selection and hard validation
- Coexistence detection for Claude Code, Codex, and mixed-runtime projects
- Manifest-driven deploy with fail-closed preflight,
--replace-modified, and transactional rollback - Spawn-based plugin with payload capture for runtime verification
'*': denypermission model withquestion/todowriteallowed for all agents.env*denied acrossread/edit/glob/bashso secrets are protected at the permission layer
This is a faithful semantic port of the upstream Claude Code Game Studios structure with documented runtime limits — not a claim that every upstream enforcement primitive is reproduced exactly in OpenCode:
- Path rules are advisory. Root
AGENTS.mdroutes edits to.opencode/rules/*.md, but nested rule files are not auto-discovered by OpenCode on every edit; agents are instructed to read them. Per-edit rule triggering is instruction-backed, not a hard platform hook. - Per-agent fences are instruction/rule/hook-backed. Where upstream roles
deny specific tools, the OpenCode equivalent is enforced through agent
instructions, path rules, and the
ccgs-hooks.jsplugin rather than an exact per-agent hard fence. - Model tiers are guidance. Per-agent
metadata.ccgs_tiermaps to a model tier configured at install time; the OpenCode session model choice remains the available runtime control. - Installer success ≠ activation. A successful install deploys files and
passes the static audit only. Trust the project and start a new
opencodesession before hooks, rules, the permission profile, and agents are active. - Prototype/worktree isolation is explicit workflow guidance, not automatic subagent isolation.
The advisory audit.sh coexistence and smoke-headless commands surface
regressions in these areas without blocking the build.
Agents are organized into three tiers, matching how real studios operate:
Tier 1 — Directors (opus-tier)
creative-director technical-director producer
Tier 2 — Department Leads (sonnet-tier)
game-designer lead-programmer art-director
audio-director narrative-director qa-lead
release-manager localization-lead
Tier 3 — Specialists (sonnet/haiku-tier)
gameplay-programmer engine-programmer ai-programmer
network-programmer tools-programmer ui-programmer
systems-designer level-designer economy-designer
technical-artist sound-designer writer
world-builder ux-designer prototyper
performance-analyst devops-engineer analytics-engineer
security-engineer qa-tester accessibility-specialist
live-ops-designer community-manager
Engine Specialists
godot-specialist + 4 sub-specialists (GDScript, C#, Shaders, GDExtension)
unity-specialist + 4 sub-specialists (DOTS, Shaders, Addressables, UI Toolkit)
unreal-specialist + 4 sub-specialists (GAS, Blueprints, Replication, UMG)
Model tiering: Unlike upstream (hardcoded
opus/sonnet/haiku) and the Codex port (hardcodedgpt-5.5/gpt-5.4/gpt-5.4-mini), this package is truly model-agnostic. The original Claude tier is preserved asmetadata.ccgs_tier— a routing key the installer uses to inject your chosen model per tier. See Install below.
Type / in OpenCode to access all 77 commands. Every command runs inline in
the main conversation — no subtask isolation, no context switching.
Onboarding & Navigation
/start /help /project-stage-detect /setup-engine /adopt
/resume-from-handoff /studio-next /studio-status
Game Design
/brainstorm /map-systems /design-system /quick-design /review-all-gdds /propagate-design-change
Art & Assets
/art-bible /asset-spec /asset-audit
UX & Interface Design
/ux-design /ux-review
Architecture
/create-architecture /architecture-decision /architecture-review /create-control-manifest
Stories & Sprints
/create-epics /create-stories /dev-story /sprint-plan /sprint-status /story-readiness /story-done /estimate
Reviews & Analysis
/design-review /code-review /balance-check /content-audit /scope-check /perf-profile /tech-debt /gate-check /consistency-check /security-audit
QA & Testing
/qa-plan /smoke-check /soak-test /regression-suite /test-setup /test-helpers /test-evidence-review /test-flakiness /skill-test /skill-improve
Production
/milestone-review /retrospective /bug-report /bug-triage /reverse-document /playtest-report
Release
/release-checklist /launch-checklist /changelog /patch-notes /hotfix /day-one-patch
Creative & Content
/prototype /onboard /localize
Session Continuity
/handoff /resume-from-handoff /studio-next /studio-status
Team Orchestration (coordinate multiple agents on a single feature)
/team-combat /team-narrative /team-ui /team-release /team-polish /team-audio /team-level /team-live-ops /team-qa
git clone https://github.com/Cipher-85/OpenCode-Game-Studios.git my-game
cd my-game
bash .opencode/install.shThe installer prompts interactively for your model choices (see below), then configures all 49 agents and starts OpenCode.
The installer is the key differentiator — it's truly model-agnostic. You choose models per tier at install time:
Interactive:
bash .opencode/install.sh
# Prompts:
# Tier 1 — Directors (3 agents): Model: zai-coding-plan/glm-5.2
# Variant (max/high/standard): max
# Tier 2 — Leads + Specialists (44): Model: zai-coding-plan/glm-5.2
# Variant: high
# Tier 3 — Light agents (2): Model: (Enter to reuse Tier 2)
# Variant: (Enter to reuse Tier 2)
# Primary agent: (Enter to reuse Tier 1)Non-interactive (CLI):
bash .opencode/install.sh \
--tier-opus "zai-coding-plan/glm-5.2" \
--tier-sonnet "zai-coding-plan/glm-5.2" \
--tier-haiku "zai-coding-plan/glm-5.2" \
--primary "zai-coding-plan/glm-5.2" \
--variant-opus "max" \
--variant-sonnet "high" \
--variant-haiku "high"Dry-run (preview without changes):
bash .opencode/install.sh --dry-run \
--tier-opus "zai-coding-plan/glm-5.2" \
--tier-sonnet "zai-coding-plan/glm-5.2"Each model ID is hard-validated against opencode models output. Unknown
models are rejected.
bash .opencode/install.sh /path/to/existing-game-project \
--tier-opus "provider/model" \
--tier-sonnet "provider/model" \
--tier-haiku "provider/model"The installer deploys all framework files alongside existing content. It detects prior installs, foreign runtimes (Claude Code, Codex), and preserves shared project files. See Coexistence below.
The installer preflights the target before mutating anything: an unowned
collision (an existing file at a package path not proven ours) or a
locally-modified package-owned file aborts the deploy with the exact paths
and changes nothing. To back up and replace state-proven package paths you
intentionally edited, re-run with --replace-modified:
bash .opencode/install.sh --dry-run --replace-modified /path/to/existing-game-project
bash .opencode/install.sh --replace-modified /path/to/existing-game-project--replace-modified never overwrites an unowned shared file.
A cross-target deploy is transactional: if the deploy fails partway, modified
files are restored from the transaction snapshot and newly-created files are
removed, leaving the target at its pre-deploy state. A rollback-<timestamp>/
record is kept under .opencode/backups/ for inspection.
.opencode/agents/*.md— injectsmodel:andvariant:into each agent's frontmatter based on itsmetadata.ccgs_tieropencode.json— sets the primary model.opencode/models.json— records the tier→model mapping.opencode/install-state.json— schema-v2 with SHA256 hashes, detected mode, preserved/created paths, and model configuration
Static install only. Installer success proves package deployment and static verification only. Trust the target project and start a new
opencodesession before treating its hooks, rules, permission profile, or agents as active.
Restore the model-agnostic state (strips injected model: and variant: from
agents, removes generated files):
bash .opencode/uninstall.shOr uninstall from a target:
bash .opencode/uninstall.sh /path/to/project
bash .opencode/uninstall.sh --dry-run /path/to/projectIn coexistence mode, the uninstaller preserves shared paths it didn't create,
removes only OpenCode-owned files, and extracts the marker block from
AGENTS.md without deleting user content.
Uninstall is fail-closed: it requires valid .opencode/install-state.json
ownership data. Missing, stale, malformed, path-traversing, or symlinked state
aborts without removing project files — restore the state from
.opencode/backups/ or resolve ownership manually. AGENTS.md is deleted only
when its entire content was the CCGS marker block; any user-authored content is
kept.
OpenCode Game Studios is intentionally additive. The installer detects the target's runtime state before deploying:
| Mode | Detected by | Behavior |
|---|---|---|
opencode_clean |
No foreign runtimes | Full deploy |
opencode_prior |
Prior OpenCode CCGS install | Incremental update |
claude_present |
CLAUDE.md or .claude/ exists |
Deploy alongside |
claude_ccgs_coexist |
.claude/agents/ with CCGS names |
Preserve shared paths, refuse .claude/* |
codex_present |
.codex/ exists |
Deploy alongside |
codex_ccgs_coexist |
.codex/VERSION or .codex/agents/ |
Preserve shared paths, refuse .codex/* |
multi_runtime |
Multiple foreign runtimes | Most cautious — preserve all existing files |
Rules:
- Never modifies
.claude/,CLAUDE.md,.codex/, or.agents/paths - Preserves all existing non-
.opencode/files in coexistence mode - Backs up any file before overwriting (to
.opencode/backups/<timestamp>/) - Shared paths (CCGS Skill Testing Framework,
docs/engine-reference/,design/registry/, etc.) are preserved silently if they already exist - AGENTS.md is created via marker-block splice — existing content is
preserved, only the
<!-- BEGIN/END CCGS OPENCODE PORT -->block is inserted
Validate the framework's structural integrity:
# Full audit (agents, skills, runtime refs, config, hooks, smoke counts)
bash .opencode/audit.sh all
# Individual checks
bash .opencode/audit.sh agents
bash .opencode/audit.sh skills
bash .opencode/audit.sh runtime
bash .opencode/audit.sh config
bash .opencode/audit.sh hooks
bash .opencode/audit.sh smoke
bash .opencode/audit.sh release
# Validate against an external root
bash .opencode/audit.sh all --root /path/to/project
# Python structural validator (CI-ready, JSON output)
python3 .opencode/lib/validate_port.py --root .
python3 .opencode/lib/validate_port.py --root . --json.opencode/VERSION is the package version source of truth. Releases use
namespaced opencode-vX.Y.Z GitHub tags.
bash .opencode/release.sh current # print version
bash .opencode/release.sh bump patch|minor|major # bump version
bash .opencode/release.sh check # validate release readiness
bash .opencode/release.sh publish --dry-run # preview release
bash .opencode/release.sh publish # create tag + GitHub releaseThe release sequence is manual: bump, update CHANGELOG, run check, commit
and push to main, then publish. GitHub Actions (release-check.yml) runs
validation on every push and PR.
AGENTS.md # Master instructions + routing table + behavioral sections
opencode.json # Permissions, plugin ref, instruction files
.opencode/
agents/ # 49 subagent definitions (markdown + YAML frontmatter)
skills/ # 77 skill definitions (one SKILL.md per subdirectory)
commands/ # 77 slash-command wrappers (one per skill)
hooks/ # 12 shell hook scripts + statusline.sh
plugins/
ccgs-hooks.js # Event adapter: OpenCode events → shell scripts
docs/ # Operational docs, workflow catalog, templates
workflow-catalog.yaml # 7-phase pipeline definition (read by /help)
templates/ # 41 document templates
rules/ # 15 path-scoped rule files (read via routing table)
lib/ # models.sh, hooks.sh, coexistence.sh, validate_port.py
agent-memory/ # 17 agent memory contract files
manifest/ # Asset inventories for install/uninstall tracking
install.sh # Installer with model tier injection
uninstall.sh # Coexistence-aware uninstaller
audit.sh # Validation dispatcher
release.sh # Version management + GitHub releases
VERSION # Package version (0.5.2)
design/ # GDDs, narrative docs (AGENTS.md + registry/)
docs/ # Technical docs, ADRs, engine reference
production/ # Sprint plans, milestones, session state
src/ # Game source code (created during development)
Path-scoped coding standards live in
.opencode/rules/*.md(15 flat files). The routing table inAGENTS.mdtells agents which rule file to read before editing files matching each path glob. Directories likeassets/,tests/, andprototypes/are created during game development — the rules already apply when they exist.
Agents follow a structured delegation model:
- Vertical delegation — directors delegate to leads, leads delegate to specialists
- Horizontal consultation — same-tier agents consult but can't make binding cross-domain decisions
- Conflict resolution — disagreements escalate to the shared parent (
creative-directorfor design,technical-directorfor technical) - Change propagation — cross-department changes coordinated by
producer - Domain boundaries — agents don't modify files outside their domain without explicit delegation
Every agent follows a strict collaboration protocol:
- Ask — agents ask questions before proposing solutions
- Present options — agents show 2-4 options with pros/cons
- You decide — the user always makes the call
- Draft — agents show work before finalizing
- Approve — nothing gets written without your sign-off
The ccgs-hooks.js plugin maps OpenCode events to shell-based validation:
| Script | OpenCode event | What it does |
|---|---|---|
validate-commit.sh |
tool.execute.before (bash) |
Checks hardcoded values, TODO format, JSON validity, design doc sections |
validate-push.sh |
tool.execute.before (bash) |
Warns on pushes to protected branches |
validate-assets.sh |
tool.execute.after (write/edit) |
Validates naming conventions and JSON structure for assets/ files |
session-start.sh |
session.created |
Shows branch, recent commits, active sprint |
detect-gaps.sh |
session.created |
Detects fresh projects, missing design docs |
pre-compact.sh |
experimental.session.compacting |
Injects session state into compaction context |
post-compact.sh |
session.compacted |
Reminds to restore session state from active.md |
session-stop.sh |
session.idle |
Archives active.md, records git activity |
log-agent.sh |
tool.execute.before (task) |
Audit trail — logs subagent invocation |
log-agent-stop.sh |
tool.execute.after (task) |
Audit trail — logs subagent completion |
validate-skill-change.sh |
tool.execute.after (write/edit) |
Advises running /skill-test after skill file changes |
The plugin also captures runtime payloads to porting-reports/runtime-payload-captures/
for debugging and Stage 2 verification.
Permission rules in opencode.json auto-allow safe operations (git status,
test runs) and block dangerous ones (force push, rm -rf, reading .env files).
Three skills manage session persistence, centered on the live worklist cache in
production/session-state/active.md:
/handoff— creates a durableproduction/session-handoff.mdbefore pausing. Includes review gate, session state rotation, commit/push when authorized, and a structured report./resume-from-handoff— one-time session-entry compiler. Reads the handoff at session start, merges sprint and slice state, and writes a ranked## Session Worklistplus## Phase Guardintoactive.md. Applies the vertical-slice forcing function. Explicit invocation authorizes that single write./studio-next— deprecated manual reference. Normal post-work routing now reads the saved## Session Worklist; invoke/studio-nextonly for manual recovery from stale session state.
Grounded in professional game development practices:
- MDA Framework — Mechanics, Dynamics, Aesthetics analysis for game design
- Self-Determination Theory — Autonomy, Competence, Relatedness for player motivation
- Flow State Design — Challenge-skill balance for player engagement
- Bartle Player Types — Audience targeting and validation
- Verification-Driven Development — Tests first, then implementation
This is a template, not a locked framework:
- Add/remove agents — delete agent files you don't need, add new ones
- Edit agent prompts — tune behavior, add project-specific knowledge
- Modify skills — adjust workflows to match your team's process
- Add rules — create new
.opencode/rules/*.mdfiles and update the routing table - Pick your engine — use the Godot, Unity, or Unreal agent set (or none)
- Set review intensity —
full(all director gates),lean(phase gates only), orsolo(none). Set during/startor editproduction/review-mode.txt - Reconfigure models — re-run
install.shwith new model choices; previous models are replaced
All hooks use POSIX-compatible patterns (grep -E, not grep -P) and include
fallbacks for missing tools. Runs on macOS, Linux, and Windows (Git Bash/WSL).
- PORTING_NOTES.md — porting decisions, known gaps, corrections
- CHANGELOG.md — version history
- ATTRIBUTION.md — upstream attribution and coexistence constraints
- UPGRADING.md — migration instructions
- .opencode/README.md — package overview
- .opencode/docs/verification-integrity.md — evidence labeling rules
- .opencode/docs/session-continuity.md — pause/resume procedures
- .opencode/docs/file-lifecycle.md — track vs ignore policy
This project is an unofficial OpenCode-native port of
Claude Code Game Studios
by Donchitos, pinned to upstream commit 984023ddac0d5e27624f2baacde6105e45de375f.
The upstream project is distributed under the MIT License.
See ATTRIBUTION.md for full attribution and coexistence constraints.
MIT License. See LICENSE for details.