refactor: rename project to Codex Game Studio

This commit is contained in:
MerlinH
2026-06-29 08:38:04 +10:00
parent bcbf92595b
commit 4cc5e65582
94 changed files with 388 additions and 314 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ Use `npm run validate` before any parity claim.
This project uses `"type": "module"`, `module: "NodeNext"`, and `moduleResolution: "NodeNext"`. Every relative TypeScript import must use the emitted `.js` specifier: write `import { x } from "./config.js"`, never `import { x } from "./config"`.
For local development before install/link, use npm scripts. Package scripts build first and exercise the built CLI through `node dist/cli.js`; use `npm run init -- ...`, `npm run manage -- ...`, `npm run templates -- list`, and `npm run validate -- ...`. Use `npm exec opengamestudio -- ...` only after build/link/install or inside package-bin smoke fixtures. Bare `opengamestudio ...` is only guaranteed after package install/link.
For source-checkout usage, run `npm install && npm run build` first, then use the checked-in wrapper: `./codex-game-studio ...`. Do not commit generated bundled CLI artifacts. Use `npm run validate` before parity claims. Use `npm exec codex-game-studio -- ...` only after package install/link or inside package-bin smoke fixtures. Bare `codex-game-studio ...` is only guaranteed after package install/link.
Keep generated game projects under `projects/<slug>/`.
@@ -12,7 +12,7 @@ Do not load all agents or all templates for a single role task.
`src/agents.ts` is the single owner for generated project `AGENTS.md`.
Direct Codex execution is the default path via `opengamestudio run <role>`. `--dry-run` and `--print-prompt` are inspection-only paths. Explicit, file-backed task orchestration is now inside the product boundary; telemetry, planner/next, ownership enforcement, hosted orchestration, background loops, and unbounded parallelism remain future-only.
Direct Codex execution is the default path via `codex-game-studio run <role>`. `--dry-run` and `--print-prompt` are inspection-only paths. Explicit, file-backed task orchestration is now inside the product boundary; telemetry, planner/next, ownership enforcement, hosted orchestration, background loops, and unbounded parallelism remain future-only.
## Repository Rules
+39 -36
View File
@@ -1,26 +1,26 @@
# Open Game Studio
# Codex Game Studio
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Node.js >=24](https://img.shields.io/badge/node-%3E%3D24-339933.svg)](package.json)
[![TypeScript](https://img.shields.io/badge/TypeScript-NodeNext-3178c6.svg)](tsconfig.json)
Open Game Studio is a Codex-native command line studio for making games with AI agents without hiding the workflow in a black box.
Codex Game Studio is a Codex-native command line studio for making games with AI agents without hiding the workflow in a black box.
Create a local game project, generate Codex-ready role prompts, hand focused work to a studio role, then validate the project artifacts before you trust them. The state lives in your repository under `.codex/`; generated games live under `projects/<slug>/`; normal execution goes through `codex exec`.
```sh
npm run init -- --name "Signal Cartographer" --engine godot --mode prototype --non-interactive \
./codex-game-studio init --name "Signal Cartographer" --engine godot --mode prototype --non-interactive \
--concept "A compact puzzle game about routing trains through haunted switchyards"
node dist/cli.js run producer --project projects/signal-cartographer \
./codex-game-studio run producer --project projects/signal-cartographer \
"Create the initial market overview."
npm run validate -- --project projects/signal-cartographer
./codex-game-studio validate --project projects/signal-cartographer
```
## Why developers use it
Open Game Studio gives game teams a repeatable way to work with Codex across design, production, engineering, art, QA, and release tasks.
Codex Game Studio gives game teams a repeatable way to work with Codex across design, production, engineering, art, QA, and release tasks.
- Local-first project state. No hosted planner, hidden queue, or opaque database.
- Codex-native instructions in generated `AGENTS.md` and `.codex/prompts/<role>.md` files.
@@ -49,33 +49,36 @@ A generated project contains the working contract Codex needs: project summary,
## Requirements
- Node.js 24 or newer.
- npm.
- Codex CLI available on `PATH` for normal `run <role>` execution and full validation.
## Install from source
## Use from source checkout
Codex Game Studio uses the normal source-checkout path: clone the repo, install dependencies, build TypeScript, then run the local CLI wrapper. The repository does not commit generated bundled CLI artifacts.
```sh
git clone git@github.com:merlinhu1/open-gamestudio.git
cd open-gamestudio
git clone git@github.com:merlinhu1/codex-game-studio.git
cd codex-game-studio
npm install
npm run build
node dist/cli.js --help
./codex-game-studio --help
./codex-game-studio init --name "My Game" --engine godot --mode prototype --non-interactive
```
For package use after installing or linking the package:
For package use after publishing, installing, or linking the package:
```sh
npm exec opengamestudio -- --help
npm exec opengamestudio -- templates list
npm exec codex-game-studio -- --help
npm exec codex-game-studio -- templates list
```
For local development from this checkout, prefer the npm scripts. They build first and exercise the built CLI through `node dist/cli.js`:
For contributor development on Codex Game Studio itself, use npm scripts. They install developer dependencies, rebuild TypeScript output, and run validation:
```sh
npm run init -- --name "My Game" --engine godot --mode prototype --non-interactive
npm run manage -- --project projects/my-game
npm run templates -- list
npm run validate -- --project projects/my-game
npm install
npm run build
npm run typecheck
npm test
npm run validate
```
## Quick start
@@ -83,17 +86,17 @@ npm run validate -- --project projects/my-game
### 1. Create a project
```sh
npm run init -- --name "My Game" --engine godot --mode prototype --non-interactive \
./codex-game-studio init --name "My Game" --engine godot --mode prototype --non-interactive \
--concept "A compact puzzle game about routing trains"
```
Open Game Studio creates `projects/my-game/` with engine markers, starter docs, `.codex/studio.json`, generated role prompts, generated workflow prompts, and a project-level `AGENTS.md`.
Codex Game Studio creates `projects/my-game/` with engine markers, starter docs, `.codex/studio.json`, generated role prompts, generated workflow prompts, and a project-level `AGENTS.md`.
### 2. Inspect the project
```sh
npm run manage -- --project projects/my-game
node dist/cli.js resume --project projects/my-game
./codex-game-studio status --project projects/my-game
./codex-game-studio resume --project projects/my-game
```
`status` and `resume` are read-only. `freeze` is the explicit command that changes project status.
@@ -101,10 +104,10 @@ node dist/cli.js resume --project projects/my-game
### 3. Choose a template or workflow
```sh
npm run templates -- list
npm run templates -- show gdd
node dist/cli.js market --project projects/my-game
node dist/cli.js ship-check --project projects/my-game
./codex-game-studio templates list
./codex-game-studio templates show gdd
./codex-game-studio market --project projects/my-game
./codex-game-studio ship-check --project projects/my-game
```
Workflow shortcuts render prompts only. They do not launch Codex.
@@ -112,18 +115,17 @@ Workflow shortcuts render prompts only. They do not launch Codex.
### 4. Run a studio role through Codex
```sh
npm run build --silent
node dist/cli.js run producer --project projects/my-game \
./codex-game-studio run producer --project projects/my-game \
"Create the initial market overview."
```
Want to see exactly what Codex will receive first?
```sh
node dist/cli.js run producer --project projects/my-game \
./codex-game-studio run producer --project projects/my-game \
"Create the initial market overview." --dry-run
node dist/cli.js run producer --project projects/my-game \
./codex-game-studio run producer --project projects/my-game \
"Create the initial market overview." --print-prompt
```
@@ -132,8 +134,8 @@ node dist/cli.js run producer --project projects/my-game \
### 5. Validate before relying on output
```sh
npm run validate
npm run validate -- --project projects/my-game
./codex-game-studio validate
./codex-game-studio validate --project projects/my-game
```
Validation exits nonzero on failure. It checks package contracts, template availability, forbidden future surfaces, build output, project state, generated-surface freshness metadata, rendered-body hashes, and stale or tampered generated prompt/workflow files.
@@ -145,6 +147,7 @@ Validation exits nonzero on failure. It checks package contracts, template avail
| `init` / `new` | Create a project under `projects/<slug>/`. |
| `status` | Print project phase, status, engine, and the next validation command. |
| `resume` | Print a read-only continuation summary. |
| `refresh-context` | Regenerate `.codex/context-manifest.json` and its freshness metadata after selected context files change. |
| `freeze` | Mark a project as frozen. |
| `validate` | Run hard-failing repository or project validation. |
| `templates list` | List packaged template IDs. |
@@ -157,7 +160,7 @@ Validation exits nonzero on failure. It checks package contracts, template avail
## Studio roles
Open Game Studio ships a Codex-native role roster with hyphenated IDs:
Codex Game Studio ships a Codex-native role roster with hyphenated IDs:
| Area | Roles |
| --- | --- |
@@ -198,7 +201,7 @@ Generated role prompts and workflow files carry deterministic freshness metadata
## Current boundaries
Open Game Studio is intentionally narrow right now.
Codex Game Studio is intentionally narrow right now.
Implemented:
@@ -243,4 +246,4 @@ Before opening changes, run the checks in [`CONTRIBUTING.md`](CONTRIBUTING.md).
## License
Open Game Studio is released under the MIT License. See [`LICENSE`](LICENSE).
Codex Game Studio is released under the MIT License. See [`LICENSE`](LICENSE).
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env sh
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
if [ ! -f "$SCRIPT_DIR/dist/cli.js" ]; then
echo "Codex Game Studio needs a built checkout. Run: npm install && npm run build" >&2
exit 1
fi
exec node "$SCRIPT_DIR/dist/cli.js" "$@"
+2 -2
View File
@@ -16,11 +16,11 @@ This file mirrors the repository-specific agent rules from `AGENTS.md` in the co
- Use `npm run validate` before any parity claim.
- This project uses `"type": "module"`, `module: "NodeNext"`, and `moduleResolution: "NodeNext"`; relative TypeScript imports must use emitted `.js` specifiers.
- For local development before install/link, use npm scripts that build first and exercise `node dist/cli.js`.
- For source-checkout usage, run `npm install && npm run build` first, then use `./codex-game-studio ...`; generated bundled CLI artifacts are not committed.
- Keep generated game projects under `projects/<slug>/`.
- Do not load all agents or all templates for a single role task.
- `src/agents.ts` is the single owner for generated project `AGENTS.md`.
- Direct Codex execution is the default path via `opengamestudio run <role>`.
- Direct Codex execution is the default path via `codex-game-studio run <role>`.
- `--dry-run` and `--print-prompt` are inspection-only paths.
- Explicit, file-backed task orchestration is now inside the product boundary; telemetry, planner/next, ownership enforcement, hosted orchestration, background loops, and unbounded parallelism remain future-only.
- Read `docs/architecture/product-boundary.md` before creating or revising designs, implementation plans, OpenSpec changes, generated project surfaces, role/workflow expansions, approval/write-policy behavior, or runtime execution behavior.
+1 -1
View File
@@ -12,7 +12,7 @@ source_of_truth:
## Purpose
These Architecture Flow Guides document Open Game Studio's important runtime scenarios, branching logic, failure paths, and code/truth-doc traceability. They are Markdown docs-as-code runtime views: readable in GitHub/VS Code, reviewable in pull requests, and detailed enough to guide humans and agents through the system.
These Architecture Flow Guides document Codex Game Studio's important runtime scenarios, branching logic, failure paths, and code/truth-doc traceability. They are Markdown docs-as-code runtime views: readable in GitHub/VS Code, reviewable in pull requests, and detailed enough to guide humans and agents through the system.
## Professional Framing
@@ -13,7 +13,7 @@ source_of_truth:
## Purpose
This architecture flow guide documents the runtime scenario for `opengamestudio init` and `opengamestudio new`. Both commands use the same initialization path to create a deterministic Codex Game Studio project under `projects/<slug>/`.
This architecture flow guide documents the runtime scenario for `codex-game-studio init` and `codex-game-studio new`. Both commands use the same initialization path to create a deterministic Codex Game Studio project under `projects/<slug>/`.
## Scope
@@ -29,8 +29,8 @@ Project initialization owns generated project creation and initial `.codex` stat
| Entry point | Role in flow | Code |
| --- | --- | --- |
| `opengamestudio init` | Primary project initialization command. | `src/cli.ts` |
| `opengamestudio new` | Alias that delegates to the same initialization path. | `src/cli.ts` |
| `codex-game-studio init` | Primary project initialization command. | `src/cli.ts` |
| `codex-game-studio new` | Alias that delegates to the same initialization path. | `src/cli.ts` |
| `initProject(...)` | Creates project config, directories, state, docs, workflows, and prompts. | `src/projects.ts` |
## Preconditions
@@ -13,7 +13,7 @@ source_of_truth:
## Purpose
This architecture flow guide documents the runtime scenario for `opengamestudio run <role>`. The flow prepares a deterministic Codex prompt, optionally returns inspection output, and otherwise executes a bounded implementation/verification/review/fix lifecycle.
This architecture flow guide documents the runtime scenario for `codex-game-studio run <role>`. The flow prepares a deterministic Codex prompt, optionally returns inspection output, and otherwise executes a bounded implementation/verification/review/fix lifecycle.
## Scope
@@ -29,7 +29,7 @@ The role run lifecycle owns runtime preparation, prompt inspection branches, Cod
| Entry point | Role in flow | Code |
| --- | --- | --- |
| `opengamestudio run <role>` | Public CLI command for role execution. | `src/cli.ts` |
| `codex-game-studio run <role>` | Public CLI command for role execution. | `src/cli.ts` |
| `prepareRun(...)` | Resolves project, validates role/task input, renders prompt, builds cache paths and Codex command. | `src/runner.ts` |
| `checkCodexAvailability(...)` | Confirms Codex can be executed before non-dry runs. | `src/codex-runtime.ts` |
| `executeRunLifecycle(...)` | Runs implementation, verification, review, and bounded fix passes. | `src/runner.ts` |
@@ -13,28 +13,28 @@ source_of_truth:
## Purpose
This architecture flow guide documents the validation path around Open Game Studio behavior changes and the injected Truthmark repository-truth workflow around documentation/routing updates.
This architecture flow guide documents the validation path around Codex Game Studio behavior changes and the injected Truthmark repository-truth workflow around documentation/routing updates.
Validation is an Open Game Studio CLI/package behavior. Truthmark is an injected repository-truth workflow/tooling layer for documentation authority, routing, and agent workflow surfaces; it is not an Open Game Studio runtime feature unless product code explicitly implements Truthmark-facing behavior.
Validation is an Codex Game Studio CLI/package behavior. Truthmark is an injected repository-truth workflow/tooling layer for documentation authority, routing, and agent workflow surfaces; it is not an Codex Game Studio runtime feature unless product code explicitly implements Truthmark-facing behavior.
## Scope
This guide covers two related but separate flows:
1. `opengamestudio validate` / `npm run validate` checks package and generated-project contracts.
1. `codex-game-studio validate` / `npm run validate` checks package and generated-project contracts.
2. `npx truthmark check --json` checks repository-truth routing and generated Truthmark surfaces.
The guide ends when validation/truth checks have either passed or produced diagnostics that identify the broken contract.
## Boundaries
Repository validation is an Open Game Studio package behavior implemented by the CLI and validation modules. Truthmark checks are an injected repository-truth workflow/tooling layer for documentation authority and generated agent surfaces, not an Open Game Studio runtime feature.
Repository validation is an Codex Game Studio package behavior implemented by the CLI and validation modules. Truthmark checks are an injected repository-truth workflow/tooling layer for documentation authority and generated agent surfaces, not an Codex Game Studio runtime feature.
## Entry Points
| Entry point | Role in flow | Code / owner |
| --- | --- | --- |
| `opengamestudio validate` | Public CLI validation command. | `src/cli.ts`, `src/validation.ts` |
| `codex-game-studio validate` | Public CLI validation command. | `src/cli.ts`, `src/validation.ts` |
| `npm run validate` | Repository readiness gate that builds/tests/validates through package scripts. | `package.json` |
| `npx truthmark check --json` | Injected repository-truth consistency check. | Truthmark tooling, `.truthmark/config.yml` |
| Truthmark route files | Map code surfaces to bounded truth docs. | `docs/truthmark/routes/areas.md`, `docs/truthmark/routes/areas/repository.md` |
@@ -67,7 +67,7 @@ sequenceDiagram
participant Docs as docs/truth and docs/architecture
Contributor->>Repo: change code or docs
Contributor->>Validate: npm run validate / opengamestudio validate
Contributor->>Validate: npm run validate / codex-game-studio validate
Validate->>Repo: check package, source, templates, build, generated project contracts
Validate-->>Contributor: all checks pass
alt behavior claim changed
@@ -107,7 +107,7 @@ flowchart TD
| Condition | Branch | Required action | Output/diagnostic | Owner |
| --- | --- | --- | --- | --- |
| Source/package behavior changed | Functional validation branch | Run relevant tests and `npm run validate`. | Failing package/project check if contract is broken. | Open Game Studio repo |
| Source/package behavior changed | Functional validation branch | Run relevant tests and `npm run validate`. | Failing package/project check if contract is broken. | Codex Game Studio repo |
| Generated project behavior changed | Project validation branch | Validate generated-project contracts. | Missing/invalid generated surface diagnostic. | `src/validation.ts` and scaffold owners |
| Public CLI claim changed | CLI contract branch | Update contract truth doc and validation/readme claims together. | Validation or doc drift if missed. | `docs/truthmark/engineering/contracts/cli-and-validation.md` |
| Behavior claim changed | Truth sync branch | Update owning bounded truth doc. | Truthmark may flag stale/unmapped surfaces. | Truthmark docs workflow |
@@ -140,7 +140,7 @@ flowchart TD
## Product Decisions
- `npm run validate` remains the readiness gate before repository parity claims.
- Truthmark checks validate repository-truth routing and generated workflow surfaces without redefining Open Game Studio runtime behavior.
- Truthmark checks validate repository-truth routing and generated workflow surfaces without redefining Codex Game Studio runtime behavior.
- Markdown truth docs remain canonical; generated portal HTML remains non-canonical presentation.
## Rationale
+9 -9
View File
@@ -12,15 +12,15 @@ source_of_truth:
- ../truthmark/engineering/contracts/cli-and-validation.md
---
# Open Game Studio Product Boundary
# Codex Game Studio Product Boundary
**Audience:** humans and agents designing, planning, or changing Open Game Studio.
**Audience:** humans and agents designing, planning, or changing Codex Game Studio.
**Use:** read this before creating or revising product designs, implementation plans, OpenSpec changes, role/workflow expansions, approval policy, generated project surfaces, or runtime execution behavior.
## Mission
Open Game Studio helps developers use Codex as a practical game-development studio inside a local repository.
Codex Game Studio helps developers use Codex as a practical game-development studio inside a local repository.
The product should make it easier to start, plan, build, review, and ship games by providing a package-friendly TypeScript CLI that creates project scaffolds, renders bounded Codex prompts, manages game-studio roles and workflows, records auditable project state, and validates the generated surfaces.
@@ -28,7 +28,7 @@ The product exists to expand what a developer can do with Codex for game creatio
## Product Shape
Open Game Studio is:
Codex Game Studio is:
- a local-first CLI and package for game-development repository workflows;
- Codex-native in its primary execution path;
@@ -37,7 +37,7 @@ Open Game Studio is:
- allowed to provide bounded task orchestration for role-scoped Codex runs when it remains local, explicit, file-backed, policy-gated, and validated;
- explicit about when it is rendering prompts, planning tasks, orchestrating task runs, running Codex, mutating project state, or only inspecting planned behavior.
Open Game Studio is not:
Codex Game Studio is not:
- a game engine or replacement for engine tooling;
- a hosted service, daemon, IDE, or background workflow controller;
@@ -47,11 +47,11 @@ Open Game Studio is not:
- a requirements-management system or heavyweight studio-process mandate;
- a clone of any reference game-studio framework or workflow library.
External tools, reference workflows, and comparison projects may inspire improvements, but designs must translate those ideas into Open Game Studio's local, Codex-native, package-friendly boundary.
External tools, reference workflows, and comparison projects may inspire improvements, but designs must translate those ideas into Codex Game Studio's local, Codex-native, package-friendly boundary.
## Core Behavior Expectations
1. **Codex-native by default.** Direct Codex execution through `opengamestudio run <role>` remains the primary runtime path. Inspection paths such as `--dry-run` and `--print-prompt` must stay non-mutating.
1. **Codex-native by default.** Direct Codex execution through `codex-game-studio run <role>` remains the primary runtime path. Inspection paths such as `--dry-run` and `--print-prompt` must stay non-mutating.
2. **Orchestration is now in scope when explicit.** The CLI may coordinate multiple role-scoped Codex task runs, including dependencies and bounded sequences, only when task state, selected context, approvals, locks, run metadata, and failure outcomes are visible in `.codex/**` or deterministic CLI output.
3. **Local repository files stay reviewable.** Project state, prompts, tasks, approvals, templates, and validation evidence should be visible in the working tree or deterministic CLI output, not hidden in off-repo services.
4. **Developer control comes first.** Studio depth is optional and mode-controlled. Fast prototype workflows must remain lightweight; orchestration and strict approval flows must be explicit rather than silently imposed on every project.
@@ -61,7 +61,7 @@ External tools, reference workflows, and comparison projects may inspire improve
8. **Mutation is policy-gated and visible.** Any design that lets Codex or the CLI mutate files must specify write policy, approval/override behavior, sandbox selection, dry-run diagnostics, and where provenance is recorded.
9. **Future-only surfaces must remain absent until built.** Planner/next, telemetry, hard output-ownership enforcement, hosted orchestration, background autonomous loops, and unbounded parallelism must not appear as user-facing behavior before they have implementation, tests, and docs.
10. **Validation is part of the product.** New generated surfaces, package assets, CLI commands, orchestration behavior, and behavior-bearing docs need repo-native validation and tests before readiness or parity claims.
11. **Truthmark is repository workflow tooling here, not the product.** Truthmark-backed docs may guard Open Game Studio's repository truth, but Open Game Studio should not present Truthmark workflow mechanics as game-studio product features.
11. **Truthmark is repository workflow tooling here, not the product.** Truthmark-backed docs may guard Codex Game Studio's repository truth, but Codex Game Studio should not present Truthmark workflow mechanics as game-studio product features.
## In Scope
@@ -106,4 +106,4 @@ If a design or plan cannot answer these questions, it is not ready to implement.
## Maintenance Notes
Update this boundary when Open Game Studio's mission, runtime model, generated-surface contract, approval/write-policy model, package boundary, or explicit non-goals change. Keep it human-facing: concise enough to read before planning, concrete enough to stop product drift.
Update this boundary when Codex Game Studio's mission, runtime model, generated-surface contract, approval/write-policy model, package boundary, or explicit non-goals change. Keep it human-facing: concise enough to read before planning, concrete enough to stop product drift.
+1 -1
View File
@@ -11,7 +11,7 @@ source_of_truth:
## Purpose
Open Game Studio is a Node/TypeScript CLI package that installs and operates Codex-native game studio project workflows.
Codex Game Studio is a Node/TypeScript CLI package that installs and operates Codex-native game studio project workflows.
## Scope
+13 -14
View File
@@ -3,33 +3,32 @@
Create and validate a project from this repository:
```sh
npm run build
npm run init -- --name "Rogue Core" --engine godot --mode prototype --non-interactive --competitor "Mini Metro" --competitor "Dorfromantik"
npm run manage -- --project projects/rogue-core
npm run validate -- --project projects/rogue-core
./codex-game-studio init --name "Rogue Core" --engine godot --mode prototype --non-interactive --competitor "Mini Metro" --competitor "Dorfromantik"
./codex-game-studio status --project projects/rogue-core
./codex-game-studio validate --project projects/rogue-core
```
Run a studio role directly through Codex:
```sh
npm run build && node dist/cli.js run producer --project projects/rogue-core "Create the initial market overview."
./codex-game-studio run producer --project projects/rogue-core "Create the initial market overview."
```
Inspect prompts without launching Codex:
```sh
npm run build && node dist/cli.js run producer --project projects/rogue-core "Create the initial market overview." --dry-run
npm run build && node dist/cli.js market --project projects/rogue-core --dry-run
npm run build && node dist/cli.js analytics --project projects/rogue-core --dry-run
npm run build && node dist/cli.js handoff --project projects/rogue-core --dry-run
npm run build && node dist/cli.js design-spec --project projects/rogue-core --dry-run
npm run build && node dist/cli.js feel-review --project projects/rogue-core --dry-run
npm run build && node dist/cli.js ui-review --project projects/rogue-core --dry-run
./codex-game-studio run producer --project projects/rogue-core "Create the initial market overview." --dry-run
./codex-game-studio market --project projects/rogue-core --dry-run
./codex-game-studio analytics --project projects/rogue-core --dry-run
./codex-game-studio handoff --project projects/rogue-core --dry-run
./codex-game-studio design-spec --project projects/rogue-core --dry-run
./codex-game-studio feel-review --project projects/rogue-core --dry-run
./codex-game-studio ui-review --project projects/rogue-core --dry-run
```
Discover packaged templates:
```sh
npm run templates -- list
npm run templates -- show market_analysis
./codex-game-studio templates list
./codex-game-studio templates show market_analysis
```
+3 -3
View File
@@ -3,8 +3,8 @@
Use the canonical TypeScript CLI with direct Codex execution:
```bash
npm exec opengamestudio -- init --name "My Game" --engine godot --mode prototype --non-interactive --competitor "Mini Metro"
npm exec opengamestudio -- run producer --project projects/my-game "Create the initial market overview."
npm exec codex-game-studio -- init --name "My Game" --engine godot --mode prototype --non-interactive --competitor "Mini Metro"
npm exec codex-game-studio -- run producer --project projects/my-game "Create the initial market overview."
```
For inspection-only runs, add `--dry-run` or `--print-prompt` to view the generated Codex prompt packet and metadata path before execution. Role runs inline the generated project role prompt and only selected package templates; workflow shortcuts still render prompts only.
@@ -13,4 +13,4 @@ For inspection-only runs, add `--dry-run` or `--print-prompt` to view the genera
Intentional differences: no interactive menu, no `startover`, no exact `template_info.md`, no eager competitor reports during init, no generated `project_orchestrator.md`, no `CODEX.md`, no legacy `.gamestudio` compatibility, and no unsupported upstream underscore role IDs. Supported aliases such as `new` for `init` remain available.
Future-only features are not implemented: `opengamestudio next`, telemetry, changed-file tracking, hosted/background orchestration, unbounded parallelism, and ownership enforcement. Explicit local task orchestration is implemented through reviewable `.codex/**` task, lock, and run state.
Future-only features are not implemented: `codex-game-studio next`, telemetry, changed-file tracking, hosted/background orchestration, unbounded parallelism, and ownership enforcement. Explicit local task orchestration is implemented through reviewable `.codex/**` task, lock, and run state.
@@ -2,9 +2,9 @@
> **For Hermes:** Use subagent-driven-development skill to implement this plan task-by-task.
**Goal:** Add explicit local task orchestration with bounded parallel execution, and adapt the useful Claude Code Game Studios (CCGS) role/skill/workflow surface into Open Game Studio without importing Claude-specific machinery or unbounded orchestration.
**Goal:** Add explicit local task orchestration with bounded parallel execution, and adapt the useful Claude Code Game Studios (CCGS) role/skill/workflow surface into Codex Game Studio without importing Claude-specific machinery or unbounded orchestration.
**Architecture:** Keep Open Game Studio local-first and Codex-native. Extend the existing `.codex/tasks.json`, `.codex/runs/**`, role packages, workflow registry, template registry, approvals, and validation systems. Orchestration is a foreground CLI command that plans, locks, executes, verifies, reviews, and records bounded task runs; it is not a daemon, hosted scheduler, hidden planner, or generic workflow DAG engine.
**Architecture:** Keep Codex Game Studio local-first and Codex-native. Extend the existing `.codex/tasks.json`, `.codex/runs/**`, role packages, workflow registry, template registry, approvals, and validation systems. Orchestration is a foreground CLI command that plans, locks, executes, verifies, reviews, and records bounded task runs; it is not a daemon, hosted scheduler, hidden planner, or generic workflow DAG engine.
**Tech Stack:** TypeScript ESM on Node 24, Commander CLI, Vitest, existing Codex runtime, existing project validation, Truthmark-backed docs.
@@ -14,7 +14,7 @@
### 1.1 In scope
- `opengamestudio task orchestrate --project <path>` as the primary orchestration entrypoint.
- `codex-game-studio task orchestrate --project <path>` as the primary orchestration entrypoint.
- Bounded task DAG execution using explicit task dependencies.
- Bounded parallelism with an explicit `--max-concurrency` flag and a hard product cap.
- Local reviewable state in `.codex/tasks.json`, `.codex/locks/**`, and `.codex/runs/<run-id>/**`.
@@ -37,7 +37,7 @@
3. **Parallel mutating tasks require declared write sets.** A task without declared `writeFiles` uses a conservative project-wide write lock when file edits are allowed.
4. **No separate scheduler process.** Orchestration runs in the current foreground CLI process and exits when the bounded run completes.
5. **No hidden task generation.** CCGS workflow adaptation may create task graphs only through explicit commands that show the planned tasks before writing or executing them.
6. **CCGS adaptation is curated, not mirrored.** Use CCGS as source material, but translate into existing Codex-native IDs, bounded context selection, and Open Game Studio's role/workflow/template contracts.
6. **CCGS adaptation is curated, not mirrored.** Use CCGS as source material, but translate into existing Codex-native IDs, bounded context selection, and Codex Game Studio's role/workflow/template contracts.
### 1.4 Review follow-up constraints
@@ -135,7 +135,7 @@ export type TaskStore = {
Extend `task create`:
```bash
opengamestudio task create --project projects/demo \
codex-game-studio task create --project projects/demo \
--role gameplay-programmer \
--file documentation/design/gdd.md \
--write-file source/project-demo/player.gd \
@@ -351,7 +351,7 @@ Testing requirement:
### 7.1 New command
```bash
opengamestudio task orchestrate --project <path> [task-id...]
codex-game-studio task orchestrate --project <path> [task-id...]
```
Options:
@@ -371,10 +371,10 @@ Options:
Examples:
```bash
opengamestudio task orchestrate --project projects/demo --dry-run
opengamestudio task orchestrate --project projects/demo --max-concurrency 2 --review --fix
opengamestudio task orchestrate --project projects/demo --workflow vertical-slice --max-concurrency 2
opengamestudio task orchestrate --project projects/demo task-001 task-002 task-003 --dry-run
codex-game-studio task orchestrate --project projects/demo --dry-run
codex-game-studio task orchestrate --project projects/demo --max-concurrency 2 --review --fix
codex-game-studio task orchestrate --project projects/demo --workflow vertical-slice --max-concurrency 2
codex-game-studio task orchestrate --project projects/demo task-001 task-002 task-003 --dry-run
```
### 7.2 Help surface guardrails
@@ -409,8 +409,8 @@ export type WorkflowTaskRecipe = {
Add CLI:
```bash
opengamestudio workflow create-tasks <workflow-id> --project <path> --dry-run
opengamestudio workflow create-tasks <workflow-id> --project <path>
codex-game-studio workflow create-tasks <workflow-id> --project <path> --dry-run
codex-game-studio workflow create-tasks <workflow-id> --project <path>
```
Rules:
@@ -458,7 +458,7 @@ Reference source inspected for this design:
- `.claude/hooks`: Claude hook runtime files
- `.claude/rules`: Claude-specific rule files
Important translation principle: CCGS is a rich reference library, not an implementation contract. Open Game Studio adapts outcomes into local Codex-native primitives.
Important translation principle: CCGS is a rich reference library, not an implementation contract. Codex Game Studio adapts outcomes into local Codex-native primitives.
### 9.2 Role adaptation policy
@@ -466,14 +466,14 @@ Role decisions use four categories:
| Decision | Meaning |
|---|---|
| `built-in-existing` | Already represented by an Open Game Studio role package. Improve prompt depth only if tests show a gap. |
| `built-in-add` | Add a new canonical hyphenated Open Game Studio role. |
| `built-in-existing` | Already represented by an Codex Game Studio role package. Improve prompt depth only if tests show a gap. |
| `built-in-add` | Add a new canonical hyphenated Codex Game Studio role. |
| `specialty-context` | Do not add a role; adapt as engine/module/plugin reference context selected by task keywords. |
| `custom-pack-example` | Keep as project-local `custom-*` example or docs, not built-in product surface. |
### 9.3 CCGS role mapping
| CCGS role | Open Game Studio target | Decision |
| CCGS role | Codex Game Studio target | Decision |
|---|---|---|
| `producer` | `producer` | built-in-existing |
| `creative-director` | `creative-director` | built-in-existing |
@@ -525,9 +525,9 @@ Do not add every engine sub-specialist as a first-class role. Use active-engine
### 9.4 CCGS skill adaptation policy
Do not generate `.claude/skills` or implement a Claude skill runtime. Convert CCGS skills into one of these Open Game Studio surfaces:
Do not generate `.claude/skills` or implement a Claude skill runtime. Convert CCGS skills into one of these Codex Game Studio surfaces:
| CCGS skill kind | Open Game Studio surface |
| CCGS skill kind | Codex Game Studio surface |
|---|---|
| Planning or review skill | built-in workflow prompt or workflow task recipe |
| Structured output document | package template |
@@ -811,7 +811,7 @@ Defer or keep out of product:
### Task 11: Add CLI command
**Objective:** Expose orchestration through `opengamestudio task orchestrate`.
**Objective:** Expose orchestration through `codex-game-studio task orchestrate`.
**Files:**
+21 -10
View File
@@ -1,6 +1,23 @@
# Setup
Install and verify with Node 24 or newer:
## Use from source checkout
Clone the repository, install dependencies, build TypeScript output, and then run the checked-in CLI wrapper. Generated bundled CLI artifacts are not committed.
```bash
git clone git@github.com:merlinhu1/codex-game-studio.git
cd codex-game-studio
npm install
npm run build
./codex-game-studio --help
./codex-game-studio init --name "My Game" --engine godot --mode prototype --non-interactive --competitor "Mini Metro" --engine-version "4.4.1"
./codex-game-studio templates list
./codex-game-studio validate --project projects/my-game
```
## Contributor development
Install npm dependencies when using or modifying Codex Game Studio from a source checkout. Development validation rebuilds TypeScript output before running checks.
```bash
npm install
@@ -10,17 +27,11 @@ npm test
npm run validate
```
Local development scripts build first and then run `node dist/cli.js`.
```bash
npm run init -- --name "My Game" --engine godot --mode prototype --non-interactive --competitor "Mini Metro" --engine-version "4.4.1"
npm run templates -- list
npm run validate -- --project projects/my-game
```
## Package install smoke
After build/link/install, the package bin is available:
```bash
npm exec opengamestudio -- --help
npm exec opengamestudio -- templates show gdd
npm exec codex-game-studio -- --help
npm exec codex-game-studio -- templates show gdd
```
+10 -11
View File
@@ -7,22 +7,21 @@ npm test -- --run tests/behavioral-evaluation.test.ts tests/customization.test.t
npm run typecheck
npm run build
npm test
node dist/cli.js --help
node dist/cli.js validate
npm exec opengamestudio -- --help
npm exec opengamestudio -- validate
npm exec opengamestudio -- run --help
./codex-game-studio --help
./codex-game-studio validate
npm run validate
```
`npm run validate` includes the temporary packed-package install smoke for the published `codex-game-studio` bin.
Engine smoke:
```bash
npm run init -- --name "Codex Godot Smoke" --engine godot --mode prototype --non-interactive
npm run init -- --name "Codex Unity Smoke" --engine unity --mode design --non-interactive
npm run init -- --name "Codex Unreal Smoke" --engine "Unreal Engine" --mode development --non-interactive
npm run validate -- --project projects/codex-godot-smoke
npm run validate -- --project projects/codex-unity-smoke
npm run validate -- --project projects/codex-unreal-smoke
./codex-game-studio init --name "Codex Godot Smoke" --engine godot --mode prototype --non-interactive
./codex-game-studio init --name "Codex Unity Smoke" --engine unity --mode design --non-interactive
./codex-game-studio init --name "Codex Unreal Smoke" --engine "Unreal Engine" --mode development --non-interactive
./codex-game-studio validate --project projects/codex-godot-smoke
./codex-game-studio validate --project projects/codex-unity-smoke
./codex-game-studio validate --project projects/codex-unreal-smoke
rm -rf projects/codex-godot-smoke projects/codex-unity-smoke projects/codex-unreal-smoke
```
@@ -81,7 +81,7 @@ It also covers reads, writes, and mutations. It does not own approval CLI syntax
## Product Truth Links
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
## Engineering Decisions
@@ -132,7 +132,7 @@ It does not own process execution, task persistence, package installation, or ge
## Product Truth Links
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
## Engineering Decisions
@@ -156,7 +156,7 @@ It records visible run, task, orchestration, verification, review, and fix outco
## Product Truth Links
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
## Engineering Decisions
@@ -1,14 +1,14 @@
---
status: active
truth_kind: engineering-contract
last_reviewed: 2026-06-26
last_reviewed: 2026-06-27
---
# CLI And Validation Contracts
## Purpose
The CLI and validation contracts define the public `opengamestudio` command surface.
The CLI and validation contracts define the public `codex-game-studio` command surface.
They also define package entrypoints, hard-failing validation checks, and future-surface guardrails.
@@ -20,52 +20,57 @@ It does not own project scaffolding internals, role prompt content, or Codex run
## Current Implementation Behavior
- The repository exposes a package CLI named `opengamestudio`.
- The built entrypoint is `dist/cli.js`.
- The repository exposes a package CLI named `codex-game-studio`.
- The source checkout exposes a root `./codex-game-studio` wrapper.
- The wrapper executes built TypeScript output at `dist/cli.js` and tells users to run `npm install && npm run build` when it is missing.
- The TypeScript build entrypoint remains `dist/cli.js` for contributor and package validation.
- The CLI supports project initialization and status commands.
- It supports template discovery and project-local customization inspection.
- It supports role execution, file-backed tasks, approval-store management, workflow prompt rendering, workflow shortcut aliases, and validation.
- It supports role execution, file-backed tasks, approval-store management, workflow prompt rendering, workflow shortcut aliases, context-manifest refresh, and validation.
- Repository validation is executable through `npm run validate`.
- `npm run validate` builds the package and runs the built CLI validation command.
- `npm run validate` builds TypeScript output and runs the built CLI validation command.
- Validation includes deterministic behavioral-evaluation scenarios for representative prompts.
- Behavioral-evaluation subchecks render prompts and inspect obligations locally.
- They do not use hosted evaluators, telemetry, hidden memory, or LLM calls.
## Contract Surface
- Package name: `open-gamestudio`.
- Package bin: `opengamestudio` points to `./dist/cli.js`.
- Package name: `codex-game-studio`.
- Package bin: `codex-game-studio` points to `./dist/cli.js`.
- Package bin also keeps `opengamestudio` as a compatibility alias to the same built entrypoint.
- Primary scripts include `build`, `typecheck`, `test`, `validate`, `init`, `manage`, and `templates`.
- Source checkout usage requires `npm install && npm run build`, then goes through `./codex-game-studio`.
- Public command groups include initialization and status commands.
- Public command groups also include template discovery, role runs, file-backed tasks, approval management, generic workflow rendering, and render-only workflow shortcuts.
- `opengamestudio templates list --project <path>` includes project-local custom templates beside built-in templates.
- `opengamestudio templates show <template-id> --project <path>` can show project-local custom templates.
- `opengamestudio workflow <workflow-id> --project <path>` renders built-in workflow IDs.
- `codex-game-studio templates list --project <path>` includes project-local custom templates beside built-in templates.
- `codex-game-studio templates show <template-id> --project <path>` can show project-local custom templates.
- `codex-game-studio workflow <workflow-id> --project <path>` renders built-in workflow IDs.
- The same command also renders extend-only project-local custom workflow IDs and aliases.
- Render-only discovery shortcuts include market, analytics, start, onboard, brainstorm, and prototype.
- Render-only design shortcuts include design-spec, feel-review, art-direction, ui-review, architecture-decision, and architecture-review.
- Render-only production shortcuts include milestone, handoff, review, ship-check, release-checklist, and hotfix.
- Render-only planning shortcuts include create-epics, create-stories, sprint-plan, sprint-status, story-readiness, and story-done.
- Render-only QA and operations shortcuts include qa-plan, regression-suite, security-audit, perf-profile, and localization-plan.
- `opengamestudio init` and `opengamestudio new` accept `--studio-mode fast-prototype|guided-studio|strict-studio`.
- `codex-game-studio init` and `codex-game-studio new` accept `--studio-mode fast-prototype|guided-studio|strict-studio`.
- Omitted `--studio-mode` defaults to `guided-studio`.
- Generated `.codex/studio.json` persists the value as `studioMode`.
- `opengamestudio approval grant --project <path> --role <role> --task <id-or-hash> --scope <glob>` appends a scoped approval record.
- `codex-game-studio approval grant --project <path> --role <role> --task <id-or-hash> --scope <glob>` appends a scoped approval record.
- Approval grant accepts built-in roles and syntactically valid `custom-*` role IDs.
- Approval grant requires a safe, non-empty scope.
- Approval grant accepts either an existing same-role task ID or a 64-character SHA-256 objective hash.
- `opengamestudio approval list --project <path>` prints approval history.
- `codex-game-studio approval list --project <path>` prints approval history.
- Approval history includes revoked and expired records as visible non-authorizing records.
- `opengamestudio approval revoke --project <path> --approval-id <id>` sets `revokedAt` on the matching record.
- `codex-game-studio approval revoke --project <path> --approval-id <id>` sets `revokedAt` on the matching record.
- Revocation preserves approval history.
- `opengamestudio run <role> --project <path> --dry-run --approval-scope <glob>` prints approval mismatch diagnostics.
- `codex-game-studio run <role> --project <path> --dry-run --approval-scope <glob>` prints approval mismatch diagnostics.
- The dry-run approval diagnostics apply to guided and strict studio modes.
- Dry-run approval diagnostics do not write prompt cache or run metadata.
- `opengamestudio run <role>` and `opengamestudio task run` expose `--approved-by-user` for guided-studio local override.
- `codex-game-studio run <role>` and `codex-game-studio task run` expose `--approved-by-user` for guided-studio local override.
- They expose `--constrained-sandbox` for explicit `workspace-write` sandbox use.
- Without the constrained override, allowed mutating runs use `danger-full-access`.
- `opengamestudio task run` accepts `--approval-scope <glob>`.
- Repository validation is exposed through `opengamestudio validate` and `npm run validate`.
- `codex-game-studio task run` accepts `--approval-scope <glob>`.
- Repository validation is exposed through `codex-game-studio validate` and `npm run validate`.
- Context-manifest refresh is exposed through `codex-game-studio refresh-context --project <path>`.
## Inputs
@@ -86,11 +91,12 @@ It does not own project scaffolding internals, role prompt content, or Codex run
- It also includes approval scopes, current objective hash, match status, and authorization reasons.
- Authorization reasons include role, objective, scope, project stage, studio mode, expiry, revocation, and stage mismatches.
- Validation emits one line per check in `STATUS id: message (path)` shape.
- Context refresh prints the refreshed project name and both context manifest paths.
- Validation exits non-zero when any check fails.
- Behavioral evaluation check IDs use `behavioral.scenario.<scenario-id>`.
- Behavioral checks fail when prompts miss required obligations.
- They also fail on unnegated future-only drift, prompt-size overflow, missing selected-context categories, missing required templates, or forbidden templates.
- Package smoke validation builds and exercises the packed package bin.
- Package smoke validation builds TypeScript output and exercises the packed package bin.
- Package smoke validation also checks template loading behavior.
- Package validation checks every registered engine reference asset is included in `npm pack`.
@@ -104,7 +110,7 @@ It does not own project scaffolding internals, role prompt content, or Codex run
- Approval grant rejects invalid roles, unknown task IDs, wrong-role task IDs, and malformed canonical expiry timestamps.
- Approval revoke fails clearly for unknown approval IDs.
- Unapproved strict-studio mutating `run <role>` and `task run` fail before Codex launch, run metadata writes, or task mutation.
- Validation fails on missing package scripts, package bin/files, source files, Codex CLI, role packages, templates, and engine reference assets.
- Validation fails on missing package scripts, package bin/files, source wrapper, source files, Codex CLI, role packages, templates, and engine reference assets.
- It also fails on missing build output or broken package smoke behavior.
- Validation fails when engine reference metadata is missing reviewer, date, source link, engine, reviewed version, tags, roles, or workflows.
- Validation fails when future surfaces are exposed early.
@@ -126,7 +132,7 @@ It does not own project scaffolding internals, role prompt content, or Codex run
- The TypeScript project uses NodeNext ESM semantics.
- Relative TypeScript imports must use emitted `.js` specifiers.
- Node support requires a package engine floor that includes Node >=24.
- Packaged files must include `dist/`, `engine_configs/`, `engine_reference/`, and `templates/`.
- Packaged files must include `dist/`, `engine_configs/`, `engine_reference/`, and `templates`.
- Future-only command surfaces stay hidden until implemented intentionally.
- Future-only examples include `next`, `telemetry`, hosted/background orchestration, unbounded parallelism, and ownership enforcement.
@@ -138,7 +144,7 @@ It does not own project scaffolding internals, role prompt content, or Codex run
## Product Truth Links
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
## Engineering Decisions
@@ -191,6 +197,7 @@ Validation makes those claims executable. Prompt-surface drift and packaging dri
- ../../routes/areas/repository.md
- ../../../../package.json
- ../../../../src/cli.ts
- ../../../../src/projects.ts
- ../../../../src/validation.ts
- ../../../../src/customization.ts
- ../../../../src/context-manifest.ts
@@ -198,6 +205,7 @@ Validation makes those claims executable. Prompt-surface drift and packaging dri
- ../../../../src/generated-surfaces.ts
- ../../../../src/behavioral-evaluation.ts
- ../../../../tests/cli-prompt-surface.test.ts
- ../../../../tests/project-workflow.test.ts
- ../../../../tests/validation.test.ts
- ../../../../tests/functionality-gap-pass.test.ts
- ../../../../tests/customization.test.ts
@@ -85,15 +85,15 @@ It does not own Codex run execution, task lifecycle persistence, or repository-l
## Contracts
- `open-gamestudio init --name <name> --engine <engine> --mode <mode> --non-interactive [--studio-mode <mode>]` creates a project and prints the created path.
- `open-gamestudio new` is an alias for initialization.
- `open-gamestudio status --project <path>` reads `.codex/studio.json`.
- `open-gamestudio resume --project <path>` reads `.codex/studio.json`.
- `open-gamestudio freeze --project <path>` operates on `.codex/studio.json` and changes status.
- `codex-game-studio init --name <name> --engine <engine> --mode <mode> --non-interactive [--studio-mode <mode>]` creates a project and prints the created path.
- `codex-game-studio new` is an alias for initialization.
- `codex-game-studio status --project <path>` reads `.codex/studio.json`.
- `codex-game-studio resume --project <path>` reads `.codex/studio.json`.
- `codex-game-studio freeze --project <path>` operates on `.codex/studio.json` and changes status.
## Product Truth Links
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
## Engineering Decisions
@@ -8,7 +8,7 @@ last_reviewed: 2026-06-26
## Purpose
Open Game Studio is a Codex-native workflow layer for game-development projects.
Codex Game Studio is a Codex-native workflow layer for game-development projects.
The repository packages a TypeScript CLI.
@@ -26,7 +26,7 @@ They are listed in `docs/truthmark/routes/areas/repository.md`.
## Current Implementation Behavior
- The package exposes the `opengamestudio` CLI from `dist/cli.js`.
- The package exposes the `codex-game-studio` CLI from the built `dist/cli.js` entrypoint, and the source checkout exposes `./codex-game-studio` as a thin wrapper over built TypeScript output.
- Initialization commands create deterministic game project structure under `projects/<slug>`.
- Generated projects contain `.codex/studio.json`, role prompt files, workflow markdown, starter docs, engine markers, and `AGENTS.md`.
- Role run commands render deterministic Codex prompts.
@@ -47,7 +47,7 @@ They are listed in `docs/truthmark/routes/areas/repository.md`.
- Dry-run and print-prompt modes are inspection paths.
- Non-dry runs write prompt/run metadata before executing Codex.
- Truthmark is an injected repository-truth workflow/tooling layer.
- Truthmark is not an Open Game Studio runtime feature unless product code implements Truthmark-facing behavior.
- Truthmark is not an Codex Game Studio runtime feature unless product code implements Truthmark-facing behavior.
## Flows And States
+1 -1
View File
@@ -14,7 +14,7 @@ README.md files are indexes, not Truth Sync targets. Keep product truth in bound
## Product Capability Docs
- [Open Game Studio Codex-Native CLI](open-game-studio-cli.md)
- [Codex Game Studio CLI](codex-game-studio-cli.md)
## Source References
@@ -1,14 +1,14 @@
---
status: active
truth_kind: product-capability
last_reviewed: 2026-06-26
last_reviewed: 2026-06-27
---
# Open Game Studio Codex-Native CLI
# Codex Game Studio CLI
## Capability Promise
Open Game Studio provides a local-first TypeScript CLI for Codex-assisted game development inside a repository.
Codex Game Studio provides a local-first TypeScript CLI for Codex-assisted game development inside a repository.
The CLI must let developers scaffold projects, render bounded Codex-native prompts, run selected studio roles and workflows, and record reviewable project state.
@@ -24,7 +24,7 @@ The product protects lightweight prototype work by keeping studio depth optional
## Capability Scope
This capability includes the user-visible Open Game Studio package and CLI.
This capability includes the user-visible Codex Game Studio package and CLI.
It covers project initialization, role/workflow prompt rendering, direct Codex execution, task state, approval/write-policy primitives, and engine reference packaging.
@@ -34,15 +34,19 @@ This capability excludes game-engine functionality and hosted orchestration. It
It also excludes background autonomous control, CI/release enforcement, hidden checkpoint/memory systems, and mandatory studio ceremony for small prototypes.
Truthmark is repository workflow tooling for this checkout. Open Game Studio must not present Truthmark mechanics as game-studio product features.
Truthmark is repository workflow tooling for this checkout. Codex Game Studio must not present Truthmark mechanics as game-studio product features.
## Current Product Behavior
Open Game Studio exposes npm package scripts and a built CLI for initialization, management, template listing, validation, and Codex-oriented role execution.
Codex Game Studio exposes a checked-in source checkout wrapper at `./codex-game-studio` for initialization, management, template listing, validation, context-manifest refresh, and Codex-oriented role execution.
The source checkout wrapper runs built TypeScript output from `dist/cli.js` after `npm install && npm run build`.
Contributor npm scripts remain available for rebuilding TypeScript output and validating package behavior.
Generated projects use `AGENTS.md` and `.codex/**` surfaces instead of legacy `CODEX.md` contracts.
Direct Codex execution through `opengamestudio run <role>` is the default runtime path.
Direct Codex execution through `codex-game-studio run <role>` is the default runtime path.
`--dry-run` and `--print-prompt` remain inspection-only paths.
@@ -78,7 +82,8 @@ Production templates are package-shipped assets selected by relevance.
## Acceptance Criteria
- Developers can initialize and manage project scaffolds through the package CLI.
- Developers can initialize and manage project scaffolds through the source checkout wrapper without npm installation.
- Published or linked packages expose the same CLI as the `codex-game-studio` package bin.
- Generated project files remain reviewable in the repository.
- Role and workflow execution stays Codex-native by default.
- Role and workflow execution does not require a hosted service, daemon, or alternate agent runtime.
@@ -92,17 +97,19 @@ Production templates are package-shipped assets selected by relevance.
## Product Decisions
- 2026-06-13: Open Game Studio is a local-first Codex-native CLI/package for game-development repository workflows.
- 2026-06-13: Open Game Studio is not a hosted studio service, daemon, general-purpose orchestrator, or game engine.
- 2026-06-13: Codex Game Studio is a local-first Codex-native CLI/package for game-development repository workflows.
- 2026-06-13: Codex Game Studio is not a hosted studio service, daemon, general-purpose orchestrator, or game engine.
- 2026-06-25: Explicit local task orchestration is inside the product boundary when it remains Codex-native, file-backed, bounded by selected context, policy-gated, and validated.
- 2026-06-26: Foreground task orchestration is exposed through `task orchestrate` with bounded concurrency, transient `.codex/locks/`, workflow task recipes, and no hosted/background/unbounded behavior.
- 2026-06-28: The product name is Codex Game Studio and the package name is `codex-game-studio`.
- 2026-06-28: The user-facing source checkout path is clone plus `./codex-game-studio`; npm install is contributor setup, not project-use setup.
- 2026-06-13: Studio depth is optional and mode-controlled.
- 2026-06-13: Lifecycle stage must remain separate from process strictness.
- 2026-06-13: Generated project instruction contracts use `AGENTS.md` and `.codex/**`.
- 2026-06-13: Generated project instruction contracts do not use `CODEX.md` or legacy compatibility shims.
- 2026-06-26: Planner/next, telemetry, hard ownership enforcement, hosted/background orchestration, unbounded parallelism, and similar surfaces remain out of scope unless a later product-boundary decision, implementation, tests, and truth docs bring them in.
- 2026-06-13: Truthmark-backed docs guard repository truth in this checkout.
- 2026-06-13: Truthmark workflow mechanics are not Open Game Studio product features.
- 2026-06-13: Truthmark workflow mechanics are not Codex Game Studio product features.
- 2026-06-17: Project-local customization is an extend-only, file-backed overlay for `custom-*` roles, workflows, and templates.
- 2026-06-17: Project-local customization must remain Codex-native, reviewable, path-safe, and non-hosted.
+8 -8
View File
@@ -6,12 +6,12 @@ last_reviewed: 2026-06-25
# Repository Areas
## Open Game Studio Product Capability
## Codex Game Studio Product Capability
Truth documents:
```yaml
truth_documents:
- path: docs/truthmark/product/open-game-studio-cli.md
- path: docs/truthmark/product/codex-game-studio-cli.md
lane: product
kind: product-capability
realized_by:
@@ -40,7 +40,7 @@ Code surface:
- tests/validation.test.ts
Update truth when:
- Open Game Studio's mission, user-visible CLI/package capability, Codex-native product boundary, generated-project contract, product non-goals, or acceptance criteria change
- Codex Game Studio's mission, user-visible CLI/package capability, Codex-native product boundary, generated-project contract, product non-goals, or acceptance criteria change
- user-facing behavior crosses from optional/local repository workflow support into hosted orchestration, hidden memory, CI/release governance, or non-Codex runtime replacement
## Project Scaffolding
@@ -52,7 +52,7 @@ truth_documents:
lane: engineering
kind: engineering-behavior
realizes:
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
```
Code surface:
@@ -85,7 +85,7 @@ truth_documents:
lane: engineering
kind: engineering-behavior
realizes:
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
```
Code surface:
@@ -121,7 +121,7 @@ truth_documents:
lane: engineering
kind: engineering-workflow
realizes:
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
```
Code surface:
@@ -160,7 +160,7 @@ truth_documents:
lane: engineering
kind: engineering-behavior
realizes:
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
```
Code surface:
@@ -179,7 +179,7 @@ truth_documents:
lane: engineering
kind: engineering-contract
realizes:
- docs/truthmark/product/open-game-studio-cli.md
- docs/truthmark/product/codex-game-studio-cli.md
```
Code surface:
+2 -2
View File
@@ -9,8 +9,8 @@ Project validation checks `.codex/studio.json` full `roles`, mode-specific `acti
CLI surface checks:
```bash
npm exec opengamestudio -- run --help | grep -- "--dry-run"
! npm exec opengamestudio -- --help | grep -E " next|telemetry"
./codex-game-studio run --help | grep -- "--dry-run"
! ./codex-game-studio --help | grep -E " next|telemetry"
```
Workflow shortcut commands such as `market`, `analytics`, `design-spec`, `feel-review`, `art-direction`, `ui-review`, `milestone`, and `handoff` render prompts only. They do not launch Codex or create run records. `workflow create-tasks <workflow-id>` is the explicit path for turning supported workflow recipes into `.codex/tasks.json` tasks; it still does not launch Codex.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Use this file to confirm the reviewed engine version, official documentation roo
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Surface version upgrade and compatibility risks before relying on engine behavio
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -22,6 +22,6 @@ Apply current engine-native defaults without turning the task into broad process
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Avoid stale APIs and migration traps when editing or reviewing engine code.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Guide gameplay code with engine-native runtime patterns and verification evidenc
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Animation graphs, timelines, clips, blending, events, and animation-state debugg
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Music, SFX, voice, routing, mixers, spatial audio, and subtitle/accessibility co
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Input actions, rebinding, devices, accessibility, and control-scheme validation.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Navigation meshes, pathfinding, AI agents, steering, and level-authoring constra
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Replication, rollback, authority, synchronization, server/client boundaries, and
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Collision, rigid bodies, physics queries, deterministic simulation risks, and ga
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Materials, lighting, render pipelines, shaders, post-processing, and performance
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ HUDs, menus, widgets, focus, navigation, accessibility, and platform UI constrai
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Guide plugin/package use without adding hidden runtime dependencies.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.godotengine.org/en/stable/
engine: godot
@@ -21,6 +21,6 @@ Guide the active engine specialist role with bounded, engine-specific review con
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Use this file to confirm the reviewed engine version, official documentation roo
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Surface version upgrade and compatibility risks before relying on engine behavio
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -22,6 +22,6 @@ Apply current engine-native defaults without turning the task into broad process
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Avoid stale APIs and migration traps when editing or reviewing engine code.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Guide gameplay code with engine-native runtime patterns and verification evidenc
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Animation graphs, timelines, clips, blending, events, and animation-state debugg
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Music, SFX, voice, routing, mixers, spatial audio, and subtitle/accessibility co
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Input actions, rebinding, devices, accessibility, and control-scheme validation.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Navigation meshes, pathfinding, AI agents, steering, and level-authoring constra
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Replication, rollback, authority, synchronization, server/client boundaries, and
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Collision, rigid bodies, physics queries, deterministic simulation risks, and ga
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Materials, lighting, render pipelines, shaders, post-processing, and performance
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ HUDs, menus, widgets, focus, navigation, accessibility, and platform UI constrai
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Guide plugin/package use without adding hidden runtime dependencies.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Addressables asset loading, groups, labels, profiles, content updates, and runti
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Camera rigs, follow/look-at targets, confiners, camera blending, and game-feel v
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Entities, Jobs, Burst, data-oriented design, and profiling gates for ECS-style w
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://docs.unity3d.com/Manual/index.html
engine: unity
@@ -21,6 +21,6 @@ Guide the active engine specialist role with bounded, engine-specific review con
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Use this file to confirm the reviewed engine version, official documentation roo
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Surface version upgrade and compatibility risks before relying on engine behavio
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -22,6 +22,6 @@ Apply current engine-native defaults without turning the task into broad process
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Avoid stale APIs and migration traps when editing or reviewing engine code.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Guide gameplay code with engine-native runtime patterns and verification evidenc
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Animation graphs, timelines, clips, blending, events, and animation-state debugg
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Music, SFX, voice, routing, mixers, spatial audio, and subtitle/accessibility co
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Input actions, rebinding, devices, accessibility, and control-scheme validation.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Navigation meshes, pathfinding, AI agents, steering, and level-authoring constra
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Replication, rollback, authority, synchronization, server/client boundaries, and
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Collision, rigid bodies, physics queries, deterministic simulation risks, and ga
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Materials, lighting, render pipelines, shaders, post-processing, and performance
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ HUDs, menus, widgets, focus, navigation, accessibility, and platform UI constrai
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Guide plugin/package use without adding hidden runtime dependencies.
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Common UI activatable widgets, input routing, platform prompts, and menu-stack b
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Gameplay Ability System abilities, attributes, effects, tags, prediction, and re
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Procedural Content Generation graphs, volumes, data flow, generation bounds, and
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
+2 -2
View File
@@ -1,4 +1,4 @@
reviewer: Open Game Studio seed review
reviewer: Codex Game Studio seed review
date: 2026-06-17
source-link: https://dev.epicgames.com/documentation/en-us/unreal-engine/
engine: unreal
@@ -21,6 +21,6 @@ Guide the active engine specialist role with bounded, engine-specific review con
## Validation
- Prefer project-local engine commands and Open Game Studio project validation before readiness claims.
- Prefer project-local engine commands and Codex Game Studio project validation before readiness claims.
- Record unknown version-specific behavior as a risk instead of presenting it as confirmed.
- Keep this reference selected by relevance; do not load every engine reference for one task.
Executable
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env sh
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
if [ ! -f "$SCRIPT_DIR/dist/cli.js" ]; then
echo "Codex Game Studio needs a built checkout. Run: npm install && npm run build" >&2
exit 1
fi
exec node "$SCRIPT_DIR/dist/cli.js" "$@"
+3 -2
View File
@@ -1,11 +1,11 @@
{
"name": "open-gamestudio",
"name": "codex-game-studio",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "open-gamestudio",
"name": "codex-game-studio",
"version": "0.1.0",
"license": "MIT",
"dependencies": {
@@ -13,6 +13,7 @@
"zod": "^3.25.76"
},
"bin": {
"codex-game-studio": "dist/cli.js",
"opengamestudio": "dist/cli.js"
},
"devDependencies": {
+2 -1
View File
@@ -1,5 +1,5 @@
{
"name": "open-gamestudio",
"name": "codex-game-studio",
"version": "0.1.0",
"description": "Codex-native CLI workflow layer for game projects.",
"author": "MerlinH",
@@ -15,6 +15,7 @@
"templates/"
],
"bin": {
"codex-game-studio": "./dist/cli.js",
"opengamestudio": "./dist/cli.js"
},
"scripts": {
+4 -3
View File
@@ -55,7 +55,7 @@ export const projectAgentsMdRequiredSections = [
export function generateProjectAgentsMd(config: ProjectConfig): string {
const hash = guidanceConfigHash(config);
return `<!-- generated-by: open-gamestudio src/agents.ts schema=1.0 -->
return `<!-- generated-by: codex-game-studio src/agents.ts schema=1.0 -->
<!-- source-config-sha256: ${hash} -->
# ${config.project.name} Agents
@@ -74,7 +74,8 @@ ${config.project.engine} ${config.project.engine_version}
## Commands
- Validate: \`npm run validate -- --project projects/${config.project.slug}\`
- Validate: \`./codex-game-studio validate --project projects/${config.project.slug}\`
- Refresh context manifest after editing selected project context: \`./codex-game-studio refresh-context --project projects/${config.project.slug}\`
## Coding Conventions
@@ -101,7 +102,7 @@ Run project validation before claiming parity or readiness.
## Rules
Use AGENTS.md, .codex/studio.json, the current role prompt, and task-relevant context only.
Codex is the default runtime for \`opengamestudio run <role>\`; use \`--dry-run\` or \`--print-prompt\` only for inspection.
Codex is the default runtime for \`codex-game-studio run <role>\`; use \`--dry-run\` or \`--print-prompt\` only for inspection.
Do not use telemetry, planner/next, hosted/background orchestration, unbounded parallelism, or ownership enforcement in this build. Explicit local task orchestration must stay reviewable in .codex state.
`;
}
+8 -2
View File
@@ -12,7 +12,7 @@ import {
revokeApprovalRecord
} from "./approvals.js";
import { formatTemplateShow, listTemplates, templateRegistry, type TemplateId } from "./templates.js";
import { freezeProject, initProject, readStudioProject, resumeProject, statusProject } from "./projects.js";
import { freezeProject, initProject, readStudioProject, refreshContextManifestProject, resumeProject, statusProject } from "./projects.js";
import { runValidation } from "./validation.js";
import { executeRunLifecycle, prepareRun } from "./runner.js";
import { checkCodexAvailability } from "./codex-runtime.js";
@@ -33,7 +33,7 @@ function collectScope(value: string, previous: string[] = []): string[] {
return [...previous, value];
}
program.name("opengamestudio").description("Codex Game Studio: a Codex-native game-development workflow layer").version("0.1.0");
program.name("codex-game-studio").description("Codex Game Studio: a Codex-native game-development workflow layer").version("0.1.0");
const sha256Pattern = /^[a-f0-9]{64}$/i;
const customRoleIdPattern = /^custom-[a-z0-9][a-z0-9-]*$/;
@@ -110,6 +110,12 @@ program
.requiredOption("--project <path>", "project path")
.action((opts) => console.log(resumeProject(opts.project)));
program
.command("refresh-context")
.description("Regenerate the project context manifest and freshness metadata")
.requiredOption("--project <path>", "project path")
.action((opts) => console.log(refreshContextManifestProject(opts.project)));
program
.command("freeze")
.description("Set project status to frozen")
+1 -1
View File
@@ -86,7 +86,7 @@ function parseCustomizationFile(projectRoot: string): { ok: true; value: Project
export function readProjectCustomization(projectRoot: string): ProjectCustomization {
const parsed = parseCustomizationFile(projectRoot);
if (!parsed.ok) throw new Error(`Invalid Open Game Studio customization config: ${parsed.error}`);
if (!parsed.ok) throw new Error(`Invalid Codex Game Studio customization config: ${parsed.error}`);
return parsed.value;
}
+6 -6
View File
@@ -37,7 +37,7 @@ export function hashGeneratedBody(bodyWithoutMetadata: string): string {
export function stripGeneratedMetadata(body: string): string {
return body.replace(
/^<!-- generated-by: open-gamestudio surface=.* -->\n<!-- source-input-sha256: .* -->\n<!-- rendered-body-sha256: .* -->\n/,
/^<!-- generated-by: (?:open-gamestudio|codex-game-studio) surface=.* -->\n<!-- source-input-sha256: .* -->\n<!-- rendered-body-sha256: .* -->\n/,
""
);
}
@@ -45,7 +45,7 @@ export function stripGeneratedMetadata(body: string): string {
export function renderGeneratedSurfaceMetadata(args: { surface: string; id?: string; role?: string; sourceInput: unknown; body: string }): string {
const target = [args.id ? `id=${args.id}` : undefined, args.role ? `role=${args.role}` : undefined].filter(Boolean).join(" ");
return [
`<!-- generated-by: open-gamestudio surface=${args.surface}${target ? ` ${target}` : ""} schema=1.0 -->`,
`<!-- generated-by: codex-game-studio surface=${args.surface}${target ? ` ${target}` : ""} schema=1.0 -->`,
`<!-- source-input-sha256: ${stableHash(args.sourceInput)} -->`,
`<!-- rendered-body-sha256: ${hashGeneratedBody(args.body)} -->`,
""
@@ -59,10 +59,10 @@ export function parseGeneratedSurfaceMetadata(body: string): GeneratedSurfaceMet
}
export function parseGeneratedSurfaceMetadataParts(body: string): GeneratedSurfaceMetadataParts {
const generated = /^<!-- generated-by: open-gamestudio surface=(\S+)(?: id=(\S+))?(?: role=(\S+))? schema=(\S+) -->\n/.exec(body);
const source = /^<!-- generated-by: open-gamestudio surface=.* -->\n<!-- source-input-sha256: ([a-f0-9]+) -->\n/.exec(body);
const rendered = /^<!-- generated-by: open-gamestudio surface=.* -->\n<!-- source-input-sha256: [a-f0-9]+ -->\n<!-- rendered-body-sha256: ([a-f0-9]+) -->\n/.exec(body);
const hasAnyMarker = /^<!-- generated-by: open-gamestudio\b.*-->$/m.test(body) || /^<!-- source-input-sha256: .*-->$/m.test(body) || /^<!-- rendered-body-sha256: .*-->$/m.test(body);
const generated = /^<!-- generated-by: (?:open-gamestudio|codex-game-studio) surface=(\S+)(?: id=(\S+))?(?: role=(\S+))? schema=(\S+) -->\n/.exec(body);
const source = /^<!-- generated-by: (?:open-gamestudio|codex-game-studio) surface=.* -->\n<!-- source-input-sha256: ([a-f0-9]+) -->\n/.exec(body);
const rendered = /^<!-- generated-by: (?:open-gamestudio|codex-game-studio) surface=.* -->\n<!-- source-input-sha256: [a-f0-9]+ -->\n<!-- rendered-body-sha256: ([a-f0-9]+) -->\n/.exec(body);
const hasAnyMarker = /^<!-- generated-by: (?:open-gamestudio|codex-game-studio)\b.*-->$/m.test(body) || /^<!-- source-input-sha256: .*-->$/m.test(body) || /^<!-- rendered-body-sha256: .*-->$/m.test(body);
return {
generated: generated ? { surface: generated[1], id: generated[2], role: generated[3], schema: generated[4] } : undefined,
sourceInputSha256: source?.[1],
+2 -2
View File
@@ -8,11 +8,11 @@ export function packageRoot(metaUrl: string = import.meta.url): string {
const manifest = path.join(current, "package.json");
if (existsSync(manifest)) {
const parsed = JSON.parse(readFileSync(manifest, "utf8")) as { name?: string };
if (parsed.name === "open-gamestudio") return current;
if (parsed.name === "codex-game-studio" || parsed.name === "open-gamestudio") return current;
}
const parent = path.dirname(current);
if (parent === current) {
throw new Error("Could not find open-gamestudio package root");
throw new Error("Could not find codex-game-studio package root");
}
current = parent;
}
+8 -1
View File
@@ -292,7 +292,14 @@ export function statusProject(project?: string, cwd = process.cwd()): string {
export function resumeProject(project?: string, cwd = process.cwd()): string {
const root = resolveProjectRoot(project, cwd);
const config = readStudioProject(root);
return `Resume ${config.name}\nphase: ${config.phase}\nstatus: ${config.status}\nSuggested next command: npm run build && node dist/cli.js run producer --project ${path.relative(cwd, root) || "."} "Summarize current project state"`;
return `Resume ${config.name}\nphase: ${config.phase}\nstatus: ${config.status}\nSuggested next command: ./codex-game-studio run producer --project ${path.relative(cwd, root) || "."} "Summarize current project state"`;
}
export function refreshContextManifestProject(project?: string, cwd = process.cwd()): string {
const root = resolveProjectRoot(project, cwd);
const config = readStudioProject(root);
writeContextManifest(root, config);
return [`Refreshed context manifest for ${config.name}`, path.join(root, ".codex", "context-manifest.json"), path.join(root, ".codex", "context-manifest.meta.json")].join("\n");
}
export function freezeProject(project?: string, cwd = process.cwd()): string {
+1 -1
View File
@@ -117,7 +117,7 @@ export const templateRegistry: Record<TemplateId, TemplateInfo> = {
id: "project_config",
category: "config",
path: "templates/project_config_template.json",
description: "Canonical project configuration JSON seed used to initialize Open Game Studio projects.",
description: "Canonical project configuration JSON seed used to initialize Codex Game Studio projects.",
roles: ["producer", "creative-director"],
workflows: ["onboard", "prototype"],
tags: ["config", "setup"],
+12 -6
View File
@@ -224,15 +224,20 @@ export async function validateRepo(root = process.cwd()): Promise<ValidationChec
const pkgPath = path.join(root, "package.json");
const pkg = JSON.parse(readFileSync(pkgPath, "utf8")) as { scripts?: Record<string, string>; bin?: Record<string, string>; files?: string[]; engines?: { node?: string } };
const scripts = pkg.scripts ?? {};
for (const script of ["init", "manage", "test", "validate", "templates"]) {
for (const script of ["build", "init", "manage", "test", "validate", "templates"]) {
checks.push(scripts[script] ? pass(`pkg.script.${script}`, `script ${script} exists`) : fail(`pkg.script.${script}`, `missing script ${script}`, pkgPath));
}
checks.push(scripts.build === "tsc -p tsconfig.build.json" ? pass("package.build", "build uses tsconfig.build.json") : fail("package.build", "build must use tsconfig.build.json", pkgPath));
checks.push(pkg.bin?.opengamestudio === "./dist/cli.js" && !pkg.bin?.["open-gamestudio"] ? pass("package.bin", "opengamestudio bin points to dist/cli.js") : fail("package.bin", "opengamestudio bin must point to ./dist/cli.js and replace open-gamestudio", pkgPath));
checks.push(
pkg.bin?.["codex-game-studio"] === "./dist/cli.js" && pkg.bin?.opengamestudio === "./dist/cli.js"
? pass("package.bin", "codex-game-studio bin points to built dist CLI with opengamestudio compatibility alias")
: fail("package.bin", "codex-game-studio and opengamestudio bins must point to ./dist/cli.js", pkgPath)
);
checks.push(pkg.engines?.node?.includes(">=24") ? pass("package.node", "node 24 floor declared") : fail("package.node", "node >=24 must be declared", pkgPath));
for (const file of ["dist/", "engine_configs/", "engine_reference/", "templates/"]) {
checks.push(pkg.files?.includes(file) ? pass(`pkg.files.${file}`, `${file} shipped`) : fail(`pkg.files.${file}`, `${file} missing from package files`, pkgPath));
}
checks.push(existsSync(path.join(root, "codex-game-studio")) ? pass("source.wrapper", "source checkout wrapper exists") : fail("source.wrapper", "source checkout wrapper missing", path.join(root, "codex-game-studio")));
for (const file of ["src/cli.ts", "src/behavioral-evaluation.ts", "src/customization.ts", "src/codex-runtime.ts", "src/codex-session.ts", "src/codex-prompts.ts", "src/prompt-context.ts", "src/context-manifest.ts", "src/roles.ts", "src/tasks.ts", "src/orchestrator.ts", "src/orchestrator-locks.ts", "src/workflow-recipes.ts", "src/ccgs-adaptation.ts", "src/workflows.ts", "src/verification.ts", "src/projects.ts", "src/runner.ts", "src/validation.ts"]) {
checks.push(existsSync(path.join(root, file)) ? pass(`src.${file}`, `${file} exists`) : fail(`src.${file}`, `${file} missing`, file));
}
@@ -294,13 +299,14 @@ export async function validateRepo(root = process.cwd()): Promise<ValidationChec
}
if (templateFailures.length === 0) checks.push(pass("templates", "all templates exist"));
const cliHelp = existsSync(path.join(root, "src", "cli.ts")) ? execFileSync(path.join(root, "node_modules", ".bin", "tsx"), [path.join(root, "src", "cli.ts"), "--help"], { cwd: root, encoding: "utf8" }) : "";
const builtCli = path.join(root, "dist", "cli.js");
const cliHelp = existsSync(builtCli) ? execFileSync("node", [builtCli, "--help"], { cwd: root, encoding: "utf8" }) : "";
checks.push(/\bnext\b/.test(cliHelp) ? fail("codex.surface.future.next", "future next command exposed") : pass("codex.surface.future.next", "future next command is not exposed"));
checks.push(/\btelemetry\b/.test(cliHelp) ? fail("codex.surface.future.telemetry", "future telemetry command exposed") : pass("codex.surface.future.telemetry", "future telemetry command is not exposed"));
checks.push(/\bparallel\b/.test(cliHelp) ? fail("codex.surface.future.parallel", "future parallel command exposed") : pass("codex.surface.future.parallel", "future parallel command is not exposed"));
checks.push(/ownership/i.test(cliHelp) ? fail("codex.surface.future.ownership", "future ownership enforcement surface exposed") : pass("codex.surface.future.ownership", "future ownership enforcement surface is not exposed"));
checks.push(existsSync(path.join(root, "dist", "cli.js")) ? pass("build.output", "dist/cli.js exists") : fail("build.output", "dist/cli.js missing; run npm run build", path.join(root, "dist", "cli.js")));
checks.push(existsSync(builtCli) ? pass("build.output", "dist/cli.js exists") : fail("build.output", "dist/cli.js missing; run npm run build", builtCli));
if (existsSync(path.join(root, "dist", "cli.js"))) {
try {
const packRaw = execFileSync("npm", ["pack", "--json"], { cwd: root, encoding: "utf8", shell: false });
@@ -316,10 +322,10 @@ export async function validateRepo(root = process.cwd()): Promise<ValidationChec
]) {
checks.push(packed.has(need) ? pass(`pack.${need}`, `${need} packed`) : fail(`pack.${need}`, `${need} missing from npm pack`));
}
const temp = mkdtempSync(path.join(tmpdir(), "open-gamestudio-pack-"));
const temp = mkdtempSync(path.join(tmpdir(), "codex-game-studio-pack-"));
try {
execFileSync("npm", ["install", "--silent", "--prefix", temp, path.join(root, packInfo.filename)], { cwd: root, encoding: "utf8", shell: false });
execFileSync("npm", ["exec", "--prefix", temp, "opengamestudio", "--", "templates", "list"], { cwd: temp, encoding: "utf8", shell: false });
execFileSync("npm", ["exec", "--prefix", temp, "codex-game-studio", "--", "templates", "list"], { cwd: temp, encoding: "utf8", shell: false });
checks.push(pass("pack.install_smoke", "installed package bin loads templates from temp cwd"));
} finally {
rmSync(temp, { recursive: true, force: true });
+1 -1
View File
@@ -13,4 +13,4 @@ Plan analytics instrumentation for the game.
# Validation
Run `npm run validate -- --project <project>` and verify analytics docs are consistent with project goals.
Run `./codex-game-studio validate --project <project>` and verify analytics docs are consistent with project goals.
+1 -1
View File
@@ -13,4 +13,4 @@ Document engine setup work for the selected game engine.
# Validation
Run `npm run validate -- --project <project>` and verify engine project files exist.
Run `./codex-game-studio validate --project <project>` and verify engine project files exist.
+1 -1
View File
@@ -13,4 +13,4 @@ Define a focused feature specification.
# Validation
Run `npm run validate -- --project <project>` and include feature-specific checks.
Run `./codex-game-studio validate --project <project>` and include feature-specific checks.
+1 -1
View File
@@ -13,4 +13,4 @@ Create or update the game design document.
# Validation
Run `npm run validate -- --project <project>` after updating design docs.
Run `./codex-game-studio validate --project <project>` after updating design docs.
+1 -1
View File
@@ -13,4 +13,4 @@ Transfer context between agents without broad project scanning.
# Validation
Run `npm run validate -- --project <project>` before handing off.
Run `./codex-game-studio validate --project <project>` before handing off.
+1 -1
View File
@@ -13,4 +13,4 @@ Analyze market positioning using configured competitors as seeds.
# Validation
Run `npm run validate -- --project <project>` and preserve competitor names in project config.
Run `./codex-game-studio validate --project <project>` and preserve competitor names in project config.
+12 -3
View File
@@ -26,12 +26,21 @@ const validApprovalRecord = {
};
describe("validation", () => {
test("package exposes opengamestudio as the canonical installed CLI", () => {
const pkg = JSON.parse(readFileSync(path.join(process.cwd(), "package.json"), "utf8")) as { bin?: Record<string, string> };
test("package exposes codex-game-studio as the canonical installed CLI", () => {
const pkg = JSON.parse(readFileSync(path.join(process.cwd(), "package.json"), "utf8")) as { name?: string; bin?: Record<string, string> };
expect(pkg.name).toBe("codex-game-studio");
expect(pkg.bin?.["codex-game-studio"]).toBe("./dist/cli.js");
expect(pkg.bin?.opengamestudio).toBe("./dist/cli.js");
expect(pkg.bin?.["open-gamestudio"]).toBeUndefined();
});
test("source checkout wrapper uses built dist output instead of a generated bundle", () => {
const wrapper = readFileSync(path.join(process.cwd(), "codex-game-studio"), "utf8");
expect(wrapper).toContain("dist/cli.js");
expect(wrapper).toContain("npm install && npm run build");
expect(wrapper).not.toContain("bin/codex-game-studio.mjs");
});
test("fresh initialized projects validate and failures are explicit", () => {
const cwd = mkdtempSync(path.join(tmpdir(), "ogs-val-"));
for (const [name, engine, mode] of [
@@ -270,7 +279,7 @@ describe("validation", () => {
const { projectRoot: malformedProject } = initProject({ name: "Malformed Surface Game", engine: "godot", mode: "prototype", nonInteractive: true }, cwd);
const malformedPrompt = path.join(malformedProject, ".codex", "prompts", "market-analyst.md");
writeFileSync(malformedPrompt, readFileSync(malformedPrompt, "utf8").replace(/^<!-- generated-by: open-gamestudio surface=.* -->\n/m, "<!-- generated-by: open-gamestudio -->\n"));
writeFileSync(malformedPrompt, readFileSync(malformedPrompt, "utf8").replace(/^<!-- generated-by: codex-game-studio surface=.* -->\n/m, "<!-- generated-by: codex-game-studio -->\n"));
const malformedFailures = validateProject(malformedProject).filter((c) => c.status === "fail").map((c) => c.id);
expect(malformedFailures).toContain("codex.role.market-analyst.prompt.freshness");