@genex-ai/cli-demo 0.78.1-dev.203 → 0.80.2-dev.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -5
- package/package.json +1 -1
- package/templates/README.md +1 -1
- package/templates/controllers/character/character-controller.ts +97 -0
- package/templates/skills/genex-ai-character/SKILL.md +2 -4
- package/templates/skills/genex-ai-hud/SKILL.md +46 -19
- package/templates/skills/genex-ai-menu/SKILL.md +13 -10
- package/templates/skills/genex-ai-model/SKILL.md +12 -6
- package/templates/skills/genex-game-director/SKILL.md +265 -0
- package/templates/skills/genex-game-director/references/design-contract.md +148 -0
- package/templates/skills/{genex-threejs-skill-router → genex-game-director}/references/routing-map.md +70 -67
- package/templates/skills/genex-getting-started/SKILL.md +3 -2
- package/templates/skills/genex-threejs-adaptive-quality/SKILL.md +9 -7
- package/templates/skills/genex-threejs-character-controller/SKILL.md +12 -9
- package/templates/skills/genex-threejs-embed-auth/SKILL.md +6 -48
- package/templates/skills/genex-threejs-game-content/SKILL.md +3 -4
- package/templates/skills/genex-threejs-game-ui/SKILL.md +23 -57
- package/templates/skills/genex-threejs-game-ui/references/style-capsules.md +7 -4
- package/templates/skills/genex-threejs-multiplayer/SKILL.md +7 -2
- package/templates/skills/genex-threejs-visual-validation/SKILL.md +2 -4
- package/templates/skills/genex-threejs-skill-router/SKILL.md +0 -266
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-game-director
|
|
3
|
+
description: The Genex game director — the entry point for every Genex build. Checks what your environment can do, writes the DESIGN.md design contract, routes any new-game, feature, or component request to the right Genex skills in the right order, and fans independent modules out to your sub-agents when you have them. Load first for any game work, or when unsure which skill applies.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Game Director
|
|
7
|
+
|
|
8
|
+
Own the end-to-end outcome: a finished, playable, good-looking game — not a
|
|
9
|
+
tech demo that boots. You are the director; the other Genex skills are your
|
|
10
|
+
specialists. Load only the skills that change the result; never the whole
|
|
11
|
+
pack by default.
|
|
12
|
+
|
|
13
|
+
## 1. Check what you can do (once, before planning)
|
|
14
|
+
|
|
15
|
+
Look at your own tool list and note the answers — the rest of this workflow
|
|
16
|
+
uses them:
|
|
17
|
+
|
|
18
|
+
- **A question tool?** Something that asks the player a structured question
|
|
19
|
+
with clickable options. If you have one, use it wherever this workflow says
|
|
20
|
+
"ask"; if not, a short numbered list in plain chat.
|
|
21
|
+
- **Sub-agents?** A way to hand a scoped task to a background worker. If you
|
|
22
|
+
have them, delegation (§6) is your default for independent modules; if not,
|
|
23
|
+
do the same work yourself, in the same order — nothing else changes.
|
|
24
|
+
- **A browser?** If you can open pages and take screenshots, verify visuals
|
|
25
|
+
yourself; if not, ask the player to look and tell you what they see.
|
|
26
|
+
|
|
27
|
+
Never claim a capability you didn't find, and never stall because one is
|
|
28
|
+
missing.
|
|
29
|
+
|
|
30
|
+
## 2. Scope check — what is this?
|
|
31
|
+
|
|
32
|
+
- **A new game** → the full flow: contract (§3), teams menu (§4), build order
|
|
33
|
+
(§5), delegation (§6).
|
|
34
|
+
- **A feature or fix for an existing game** → read the game's `DESIGN.md` if
|
|
35
|
+
present (keep it current as you work; create a stub if it's missing and the
|
|
36
|
+
change is big), then load just the skills the
|
|
37
|
+
[routing map](references/routing-map.md) names for the touched systems.
|
|
38
|
+
Read before writing: learn the current renderer choice, physics setup, and
|
|
39
|
+
file conventions first, then extend them — don't rebuild working systems or
|
|
40
|
+
switch renderers mid-project.
|
|
41
|
+
- **A component or tool** — a custom controller, a shader, an asset-pipeline
|
|
42
|
+
piece → skip the contract; route straight to the matching skills via the
|
|
43
|
+
routing map. Mostly we build games, but nothing here breaks for
|
|
44
|
+
game-adjacent work.
|
|
45
|
+
|
|
46
|
+
## 3. The design contract — DESIGN.md
|
|
47
|
+
|
|
48
|
+
Before rendering code, write `DESIGN.md` at the project root from
|
|
49
|
+
[references/design-contract.md](references/design-contract.md). Post a short
|
|
50
|
+
summary in chat (the plan-message duties from `$genex-threejs-game-ui` fold
|
|
51
|
+
into this file plus that summary). The file is the single source of truth:
|
|
52
|
+
sub-agents build against it, and after any long break it is how work resumes.
|
|
53
|
+
Keep it current — decisions land in its log the moment they're made.
|
|
54
|
+
|
|
55
|
+
## 4. Know your teams — what we can generate
|
|
56
|
+
|
|
57
|
+
Plan the DESIGN.md Assets table from this menu. Details, flags, and approval
|
|
58
|
+
steps live in each owning skill — load it when its lane fires:
|
|
59
|
+
|
|
60
|
+
- `npx genex model "<prompt>"` — a real 3D thing (GLB): what you chase,
|
|
61
|
+
drive, fight → `$genex-ai-model`
|
|
62
|
+
- `npx genex texture "<prompt>"` — any surface bigger than a prop
|
|
63
|
+
(`--terrain` for ground) → `$genex-ai-texture`
|
|
64
|
+
- `npx genex skybox "<prompt>"` — a described 360° sky when the game is
|
|
65
|
+
outdoors → `$genex-ai-skybox`
|
|
66
|
+
- `npx genex sfx "<prompt>"` — the core verb and every impact →
|
|
67
|
+
`$genex-ai-sfx`
|
|
68
|
+
- `npx genex image "<prompt>"` — posters, signs, sprites, decals, HUD art
|
|
69
|
+
(`--transparent` for anything laid on a surface) → `$genex-ai-image`,
|
|
70
|
+
`$genex-ai-hud`
|
|
71
|
+
- `npx genex video "<prompt>"` — in-world screens, billboards, an animated
|
|
72
|
+
menu backdrop (`--loop` for seamless) → `$genex-ai-video`, `$genex-ai-menu`
|
|
73
|
+
- `npx genex character "<prompt>"` — a custom playable humanoid (REQUIRED
|
|
74
|
+
player approvals — §7) → `$genex-ai-character`
|
|
75
|
+
- `npx genex controller character|car|drone|touch|quality` and
|
|
76
|
+
`npx genex animations search "<intent>"` — ready-made, tuned movement and
|
|
77
|
+
motion; never write movement physics from scratch →
|
|
78
|
+
`$genex-threejs-character-controller`,
|
|
79
|
+
`$genex-threejs-vehicle-controllers`, `$genex-threejs-touch-controls`,
|
|
80
|
+
`$genex-threejs-adaptive-quality`
|
|
81
|
+
|
|
82
|
+
Run the commands inside the project (the `@genex-ai/cli-demo` dev dependency
|
|
83
|
+
makes `npx genex` resolve to the right CLI). Each prints a permanent
|
|
84
|
+
`assets.genex.technology` URL you load straight from at runtime — the asset
|
|
85
|
+
lives in Genex storage, not your repo, so there's nothing to commit; each
|
|
86
|
+
owning `genex-ai-…` skill has the exact loader code. Prefer the procedural skills in
|
|
87
|
+
the routing map for abstract/parametric/animated systems (no files, infinite
|
|
88
|
+
variation); prefer these generators for concrete, describable, photoreal
|
|
89
|
+
assets — they complement each other. Assets you didn't plan don't exist: if
|
|
90
|
+
the menu has a lane this game needs, put a row in the Assets table.
|
|
91
|
+
|
|
92
|
+
**Generate a core asset set by default — don't wait to be asked.** For any
|
|
93
|
+
game that needs concrete objects or surfaces, decide a small core set from the
|
|
94
|
+
game IDEA — and from the Content lines when there are any (locations and the
|
|
95
|
+
enemy roster name the set) — and put it in the Assets table up front. This set
|
|
96
|
+
is concept-INDEPENDENT (prompted from the idea, not the concept image, and it
|
|
97
|
+
mostly survives a style change), so it does NOT wait on the concept yes. Each
|
|
98
|
+
`npx genex` job is an independent ~1-minute render: launch them concurrently
|
|
99
|
+
in the background (`--no-wait`), scaffold the scene while they run, and wire
|
|
100
|
+
each in as it lands, with a procedural placeholder until then:
|
|
101
|
+
|
|
102
|
+
- the **hero model** the player controls or chases (`npx genex model`),
|
|
103
|
+
- one key **texture** for the ground/main surface (`--terrain` for ground),
|
|
104
|
+
- a **skybox** when the scene is outdoors,
|
|
105
|
+
- a **sfx** or two for the core action and its feedback.
|
|
106
|
+
|
|
107
|
+
Skip generation only for purely abstract/geometric games. For three.js
|
|
108
|
+
questions no skill covers, use the official three.js documentation
|
|
109
|
+
(https://threejs.org/docs/) — the skills cover the Genex-specific parts, not
|
|
110
|
+
the whole engine.
|
|
111
|
+
|
|
112
|
+
## 5. Build order — the same hard floors, one owner
|
|
113
|
+
|
|
114
|
+
The mandatory rows, in order, each with its one "done when" line:
|
|
115
|
+
|
|
116
|
+
1. **Identity first** — load `$genex-threejs-embed-auth` unconditionally,
|
|
117
|
+
every game (multiplayer or not), before any boot code. Done when:
|
|
118
|
+
`initEmbed(...)` runs at the very top of boot and the right gate
|
|
119
|
+
(`waitForPlayer()` vs `waitForAuth()`) is wired.
|
|
120
|
+
2. **Adaptive quality at boot** — `$genex-threejs-adaptive-quality`. Done
|
|
121
|
+
when: the device tier is wired at boot (tier-capped pixel ratio), the
|
|
122
|
+
governor runs in the loop, and generated skyboxes/textures load through
|
|
123
|
+
their rungs. Phones enforce a hard GPU-memory kill desktop testing never
|
|
124
|
+
shows; the tier is what keeps a phone boot alive.
|
|
125
|
+
3. **UI plan gate** — `$genex-threejs-game-ui`, every game: the screen
|
|
126
|
+
inventory, one shared style brief, 2–3 AAA references, the menu archetype,
|
|
127
|
+
then the concept image with its full HUD already on it. Show the player
|
|
128
|
+
the picture the moment it lands and ask the keep-or-change question with
|
|
129
|
+
your question tool. Done when: the player said yes to a frame. The yes
|
|
130
|
+
gates ONLY style-dependent art — everything else keeps moving while you
|
|
131
|
+
wait.
|
|
132
|
+
4. **Content contract when the request names plural content** — quests,
|
|
133
|
+
enemies, bosses, locations, spells, items, or a content genre (an RPG, an
|
|
134
|
+
adventure, an open world, a story game) — `$genex-threejs-game-content`.
|
|
135
|
+
Its countable lines live in DESIGN.md's Content section, written before
|
|
136
|
+
the asset batch (the asset set derives from it). Done when: every plural
|
|
137
|
+
noun of the request has a countable line. Shrinking one is a question to
|
|
138
|
+
the player, never a silent cut.
|
|
139
|
+
5. **Route the rest** via [references/routing-map.md](references/routing-map.md):
|
|
140
|
+
the smallest useful skill set, the execution order, the visual-direction
|
|
141
|
+
gate (renderer baseline + named post stack), and the world-dressing
|
|
142
|
+
decision. Done when: DESIGN.md names the chosen skills and gates.
|
|
143
|
+
6. **Multiplayer when 2+ players share a world** — `$genex-threejs-multiplayer`
|
|
144
|
+
before any networking code. Choose the net model from the experience
|
|
145
|
+
(`connect()` for one ongoing drop-in world, `matchmake()` for fresh capped
|
|
146
|
+
matches) — never ask the player to pick an SDK API. When a Play/Online
|
|
147
|
+
button exists, nothing connects before the click. A `matchmake()` game
|
|
148
|
+
declares its `genex.matchmaking` block before preview. Done when: the
|
|
149
|
+
model, start rule, and late-join behavior are stated in DESIGN.md and the
|
|
150
|
+
netcode feel gate ran before handoff.
|
|
151
|
+
7. **Ship the first playable v0 fast and preview it.** The scaffold prompt
|
|
152
|
+
owns the player-facing milestones and links — don't restate them; obey
|
|
153
|
+
them. Done when: the player has a draft link within about ten minutes of
|
|
154
|
+
the build starting.
|
|
155
|
+
|
|
156
|
+
Two rules for every game that moves (decide both before building, state them
|
|
157
|
+
in DESIGN.md):
|
|
158
|
+
|
|
159
|
+
- **Pointer bucket** — the bundled `FollowCamera` locks the pointer by
|
|
160
|
+
default on desktop, so this is mostly a decision to opt OUT. **Mandatory
|
|
161
|
+
pointer lock**: first-person of any kind, and any mouse-aimed action
|
|
162
|
+
(third-person shooter, FPS, sniper, turret, crosshair/reticle) — leave it
|
|
163
|
+
on. **Lock by default**: third-person free-camera action/adventure —
|
|
164
|
+
drag-orbit (`pointerLockAim: false`) only with a stated reason (e.g. a
|
|
165
|
+
cursor-heavy UI core). **Never**: cursor-core games (click-to-move, tower
|
|
166
|
+
defense, builder, card/puzzle), orbit showcases, touch-only — these MUST
|
|
167
|
+
pass `pointerLockAim: false`. Keyboard-only games (racer, platformer) lock
|
|
168
|
+
too: the cursor is either a gameplay tool or locked away during play. The
|
|
169
|
+
mechanism and the full aim contract live in
|
|
170
|
+
`$genex-threejs-camera-direction`.
|
|
171
|
+
- **Input direction** — D/ArrowRight must move or turn the player
|
|
172
|
+
screen-RIGHT, mouse-right must turn the view right, drag-pan axes share one
|
|
173
|
+
convention. The screen-direction contract and verified copy-paste bases
|
|
174
|
+
live in `$genex-threejs-camera-direction` — hand-rolled steering/pan/look
|
|
175
|
+
math copies one instead of deriving signs, and the smoke check's
|
|
176
|
+
input-direction pass verifies it.
|
|
177
|
+
|
|
178
|
+
## 6. Delegate — sub-agents own Modules rows
|
|
179
|
+
|
|
180
|
+
If your environment has sub-agents, delegation is the DEFAULT for every
|
|
181
|
+
independent DESIGN.md Modules row — not a big-game special case. If it
|
|
182
|
+
doesn't, run the same rows yourself in order; the `--no-wait` generation
|
|
183
|
+
pattern still hides most latency. Either way this skill is worn by the main
|
|
184
|
+
agent: you stay the director.
|
|
185
|
+
|
|
186
|
+
- One row = one worker = one disjoint file set. One writer per file — that
|
|
187
|
+
rule is anti-collision, never a reason to serialize work.
|
|
188
|
+
- You stay the integrator and the only writer of shared files (boot, main
|
|
189
|
+
loop, netcode). Workers never spawn workers — one level deep, always.
|
|
190
|
+
- Concept-DEPENDENT rows (the HUD chain, style-matched art) wait for the
|
|
191
|
+
player's yes on the concept; concept-INDEPENDENT rows (world/terrain,
|
|
192
|
+
content data, enemies, asset wiring) launch immediately. Typing a big game
|
|
193
|
+
alone, line by line, is how sessions run out before the world exists.
|
|
194
|
+
- Give each worker everything by path: the `DESIGN.md` path, its Modules row,
|
|
195
|
+
and the skill files it needs (skills live in this project —
|
|
196
|
+
`.claude/skills/<name>/SKILL.md`, `.codex/skills/…`, or `.cursor/skills/…`,
|
|
197
|
+
whichever this project has). A worker prompt shape that works: "You own the
|
|
198
|
+
`<row>` module of `<project>/DESIGN.md` — read it first, then read the
|
|
199
|
+
named skill files. Build ONLY the files your row owns. Generate ONLY your
|
|
200
|
+
row's assets already marked `planned` in the Assets table; anything new you
|
|
201
|
+
need, add it as a `proposed` row and say so. Report what landed and what's
|
|
202
|
+
left."
|
|
203
|
+
- **The Assets table is the budget.** A worker runs generation commands only
|
|
204
|
+
for its own rows already marked `planned`; anything new it wants goes in as
|
|
205
|
+
a `proposed` row for you to approve first. An asset-shepherd lane polls
|
|
206
|
+
`npx genex wait --all` and wires + flips landed rows to `wired` — it never
|
|
207
|
+
enqueues. (Whoever wires the HUD after a worker finishes follows
|
|
208
|
+
`$genex-ai-hud`'s handoff rule: read the produced mask/bbox JSON from disk,
|
|
209
|
+
never wire from a prose summary.)
|
|
210
|
+
- Do NOT spawn workers to write extra test suites or audits — one
|
|
211
|
+
verification worker at most, running the smoke checks the scaffold prompt
|
|
212
|
+
already requires.
|
|
213
|
+
|
|
214
|
+
## 7. A custom playable character (Meshy) — approvals are the product
|
|
215
|
+
|
|
216
|
+
Use the existing VRM + UAL character controller by default
|
|
217
|
+
(`npx genex controller character`). Use `npx genex character` when the game
|
|
218
|
+
needs a custom generated humanoid or an action unavailable in UAL. Before
|
|
219
|
+
generating a Meshy character, discuss two or three visual directions. When the
|
|
220
|
+
user names a visual reference, inspect references before writing the concept
|
|
221
|
+
prompt. Recommend a neutral A-pose for characters that will be rigged.
|
|
222
|
+
|
|
223
|
+
Generate concept images first and show the actual images to the user. Do not
|
|
224
|
+
start Image-to-3D until the user explicitly selects a candidate. Generate
|
|
225
|
+
exactly three concepts, all neutral A-pose; never use a dynamic concept pose
|
|
226
|
+
or silently fall back to T-pose. Warn that held, slung, or overlapping props
|
|
227
|
+
and straps can fuse into the body or obscure limbs, and recommend separate
|
|
228
|
+
gameplay props. Only after the explicit choice, run
|
|
229
|
+
`npx genex character preview <concept-id> --candidate <1|2|3> --user-approved`.
|
|
230
|
+
|
|
231
|
+
Meshy Image-to-3D first produces an unremeshed high-detail model. Show its
|
|
232
|
+
front, back, left, and right views and report its measured face count. Preserve
|
|
233
|
+
that model in R2. Before rigging, ask the user to approve a separate
|
|
234
|
+
10,000-face triangle remesh. The 10k remesh—not the high-detail source—is
|
|
235
|
+
rigged and animated. Keep every pre-animation generation in the selected
|
|
236
|
+
neutral A-pose. Wait for that explicit approval before
|
|
237
|
+
`npx genex character finalize <preview-id> --user-approved --approve-remesh 10000 [--animation <action-id>…]`.
|
|
238
|
+
(`npx genex character "<prompt>" --direct-text` is the explicit legacy
|
|
239
|
+
one-shot path, not a substitute for these approvals.)
|
|
240
|
+
|
|
241
|
+
Load `$genex-ai-character`, search Meshy actions first with
|
|
242
|
+
`npx genex animations search "<intent>" --json`, and use returned action IDs;
|
|
243
|
+
never invent IDs. Meshy limb rotations play unchanged. Never freeze hand tracks
|
|
244
|
+
or apply post-mixer arm, hand, leg, or foot corrections. Only horizontal root
|
|
245
|
+
or hip translation may be normalized for Rapier. In both lanes, the
|
|
246
|
+
ECCTRL-derived character controller owns collision and world translation.
|
|
247
|
+
Before handoff, visibly check idle, walk, run, crouch-idle, crouch-move, and
|
|
248
|
+
jump — shoulders, elbows, wrists, hands, both leg cycles, and feet — and press
|
|
249
|
+
every control the HUD advertises.
|
|
250
|
+
|
|
251
|
+
## 8. Fresh-eyes review — before publish
|
|
252
|
+
|
|
253
|
+
Take the game's current screenshots (desktop and phone sizes) and hand them,
|
|
254
|
+
with DESIGN.md only, to a fresh reviewer — a sub-agent if you have one,
|
|
255
|
+
otherwise re-read them yourself adversarially, looking to refute "it's done":
|
|
256
|
+
untextured surfaces, a bare HUD, missing screens, Content lines not in the
|
|
257
|
+
game, Assets rows never flipped to `wired`. Fix or honestly report what it
|
|
258
|
+
finds; never publish over an unacknowledged gap.
|
|
259
|
+
|
|
260
|
+
## 9. Say it straight
|
|
261
|
+
|
|
262
|
+
"Loaded" means you read a file. "Built" means the thing runs. "Done" means its
|
|
263
|
+
"done when" line is true. Never report a skill as applied because you read it,
|
|
264
|
+
an asset as wired because it generated, or a gate as passed because you meant
|
|
265
|
+
to.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# The design contract — DESIGN.md
|
|
2
|
+
|
|
3
|
+
Write `DESIGN.md` at the game project root before any rendering code, from the
|
|
4
|
+
template below. Plain game language, readable by the player, committed to the
|
|
5
|
+
game's repo (it travels into remixes). It is a working document, not paperwork:
|
|
6
|
+
it replaces the plan you would otherwise post only in chat, and it is the
|
|
7
|
+
recovery point after any long break — sub-agents read it by path, and so do
|
|
8
|
+
you when a session resumes.
|
|
9
|
+
|
|
10
|
+
Rules the director enforces about this file:
|
|
11
|
+
|
|
12
|
+
- Create it right after the scope check, before the concept generation; fill
|
|
13
|
+
sections as decisions land and keep it current (stale is worse than short).
|
|
14
|
+
- **The Modules table is the delegation contract**: one row per independent
|
|
15
|
+
lane, and a row's "Owns files" set never overlaps another row's. One writer
|
|
16
|
+
per file.
|
|
17
|
+
- **The Assets table is the budget**: the asset list falls out of Content
|
|
18
|
+
(enemies → models, an arena → a ground texture, outdoors → a skybox).
|
|
19
|
+
Status flow per row: `proposed → planned → generating (id) → landed (URL) →
|
|
20
|
+
wired`. Workers generate only their own rows already marked `planned`; new
|
|
21
|
+
wants enter as `proposed` for the main agent to approve; the asset shepherd
|
|
22
|
+
flips statuses and never enqueues. Re-rolls follow the player's notes only.
|
|
23
|
+
The `Wired?` column exists because "generated but never wired in" is the
|
|
24
|
+
most common way finished art gets lost — a row isn't done at `landed`.
|
|
25
|
+
- Shrinking any Content line is a question to the player first, never a
|
|
26
|
+
silent cut.
|
|
27
|
+
|
|
28
|
+
## Template
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
# <Game name> — Design
|
|
32
|
+
|
|
33
|
+
_Living document — the agent keeps this current; changes land in the log at
|
|
34
|
+
the bottom._
|
|
35
|
+
|
|
36
|
+
## Concept
|
|
37
|
+
One paragraph: what the game is, what playing it feels like.
|
|
38
|
+
Concept image: <asset URL> (candidate <n> — my pick, approved by the player
|
|
39
|
+
on <date>)
|
|
40
|
+
|
|
41
|
+
## Core loop
|
|
42
|
+
- **You do:** <primary verb — drive, shoot, build…>
|
|
43
|
+
- **To:** <objective>
|
|
44
|
+
- **Under pressure from:** <what pushes back>
|
|
45
|
+
- **You earn:** <reward / progression>
|
|
46
|
+
- **You lose when:** <fail state> → **and retry by:** <restart shape>
|
|
47
|
+
|
|
48
|
+
## Content (only when the request names plural content or a content genre)
|
|
49
|
+
Every plural noun from the request becomes a countable line:
|
|
50
|
+
- Quests: <N>, chained by <how>
|
|
51
|
+
- Locations: <named list>
|
|
52
|
+
- Enemies: <N kinds, which are bosses>
|
|
53
|
+
- Grows: <levels/gear/abilities> · Earn/spend: <economy>
|
|
54
|
+
- Ten minutes in, I am: <one honest sentence>
|
|
55
|
+
|
|
56
|
+
## Screens & UI
|
|
57
|
+
Screens: <loader, menu, HUD, pause, win/lose…> · Style brief: <one line>
|
|
58
|
+
References: <2–3 named games> · Menu archetype: <name>
|
|
59
|
+
|
|
60
|
+
## Assets — the generation plan AND the budget
|
|
61
|
+
| Asset | Kind | Status | Wired? |
|
|
62
|
+
|------------------|-------------|---------------------------------|--------|
|
|
63
|
+
| Concept + HUD | image | landed → <URL> (candidate <n>) | n/a |
|
|
64
|
+
| <main surface> | texture | generating (<id>) | — |
|
|
65
|
+
| <hero model> | model | planned | — |
|
|
66
|
+
| Menu still+video | image+video | blocked on concept yes → queued | — |
|
|
67
|
+
Status flow: proposed → planned → generating (id) → landed (URL) → wired.
|
|
68
|
+
(Optionally note the prompt gist per row — it makes style-change re-rolls one
|
|
69
|
+
command.)
|
|
70
|
+
|
|
71
|
+
## World & scale
|
|
72
|
+
<Size in numbers if open world; arena bounds otherwise. Streamed terrain? y/n>
|
|
73
|
+
|
|
74
|
+
## Multiplayer
|
|
75
|
+
<single-player | ongoing world (connect) | fresh matches (matchmake: quorum,
|
|
76
|
+
teams, backfill…)> — and why. Play-button rule: nothing connects before the
|
|
77
|
+
click (when a Play screen exists).
|
|
78
|
+
|
|
79
|
+
## Modules — the build split
|
|
80
|
+
| Module | Owns files | Built by | Done when |
|
|
81
|
+
|---|---|---|---|
|
|
82
|
+
| Boot & identity | src/main.ts, src/genex-boot.ts | main agent (only writer) | boots, tier wired, initEmbed runs |
|
|
83
|
+
| World/terrain | src/world/** | sub-agent when available | walkable, matches World & scale |
|
|
84
|
+
| Quests & dialogue data | src/content/** | sub-agent when available | counts match Content lines |
|
|
85
|
+
| Enemies/AI | src/enemies/** | sub-agent when available | roster matches Content |
|
|
86
|
+
| HUD chain (style-dependent) | src/ui/** | sub-agent AFTER concept yes | all screens from Screens & UI |
|
|
87
|
+
| Verification | (no source files) | one sub-agent max | smoke check notes per milestone |
|
|
88
|
+
|
|
89
|
+
## Decisions & changes
|
|
90
|
+
- <date> — <one-liner per decision, including anything the player said no or
|
|
91
|
+
yes to>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Filled example (a small arena shooter)
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
# Rustyard — Design
|
|
98
|
+
|
|
99
|
+
## Concept
|
|
100
|
+
A scrap-robot arena shooter: you skate a magnetized junkyard bot around a
|
|
101
|
+
crusher pit, blasting rival bots into spare parts before the magnet cycle
|
|
102
|
+
pulls everything in. Fast, crunchy, thirty-second lives.
|
|
103
|
+
Concept image: https://assets.genex.technology/g/rustyard/concept.png
|
|
104
|
+
(candidate 2 — approved 2026-07-20)
|
|
105
|
+
|
|
106
|
+
## Core loop
|
|
107
|
+
- **You do:** skate + shoot
|
|
108
|
+
- **To:** outscore three rival bots before the magnet cycle ends
|
|
109
|
+
- **Under pressure from:** rivals hunting you; the pit's edges electrify as
|
|
110
|
+
the cycle counts down
|
|
111
|
+
- **You earn:** scrap for hits → speed/armor pickups mid-round
|
|
112
|
+
- **You lose when:** your bot breaks → **and retry by:** one key, instant
|
|
113
|
+
respawn, same round
|
|
114
|
+
|
|
115
|
+
## Screens & UI
|
|
116
|
+
Screens: loader, title menu, HUD (health, scrap, cycle timer), pause,
|
|
117
|
+
win/lose. Style brief: oily metal, warning-stripe accents, stencil type.
|
|
118
|
+
References: <three named AAA games>. Menu archetype: hangar pan.
|
|
119
|
+
|
|
120
|
+
## Assets
|
|
121
|
+
| Asset | Kind | Status | Wired? |
|
|
122
|
+
|------------------|---------|----------------------------|--------|
|
|
123
|
+
| Concept + HUD | image | landed → <URL> (cand. 2) | n/a |
|
|
124
|
+
| Junkyard ground | texture | landed → <URL> | yes |
|
|
125
|
+
| Player bot | model | generating (gen_8f2k) | — |
|
|
126
|
+
| Rival bot | model | planned | — |
|
|
127
|
+
| Overcast sky | skybox | landed → <URL> | yes |
|
|
128
|
+
| Blaster zap | sfx | landed → <URL> | yes |
|
|
129
|
+
| Menu still+video | image+video | blocked on concept yes | — |
|
|
130
|
+
|
|
131
|
+
## World & scale
|
|
132
|
+
One 60×60 m arena, walled; no streaming.
|
|
133
|
+
|
|
134
|
+
## Multiplayer
|
|
135
|
+
Single-player v1 (rivals are host-free local AI). Revisit after publish.
|
|
136
|
+
|
|
137
|
+
## Modules
|
|
138
|
+
| Module | Owns files | Built by | Done when |
|
|
139
|
+
|---|---|---|---|
|
|
140
|
+
| Boot & identity | src/main.ts | main agent | boots, tier wired, initEmbed runs |
|
|
141
|
+
| Arena & pickups | src/world/** | sub-agent | walkable, magnet cycle fires |
|
|
142
|
+
| Rival AI | src/enemies/** | sub-agent | 3 rivals hunt + shoot |
|
|
143
|
+
| HUD chain | src/ui/** | sub-agent after yes | all 5 screens live |
|
|
144
|
+
|
|
145
|
+
## Decisions & changes
|
|
146
|
+
- 2026-07-20 — player picked concept candidate 2; asked for "more sparks".
|
|
147
|
+
- 2026-07-20 — sparks added as the ambient-motion loop, not particles-everywhere.
|
|
148
|
+
```
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Routing Map
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The director's routing source: which skill owns which system, the execution
|
|
4
|
+
order for a Genex game, and the acceptance gate. Use it for every game and
|
|
5
|
+
whenever a request touches multiple visual systems.
|
|
4
6
|
|
|
5
7
|
## Three.js version and references
|
|
6
8
|
|
|
@@ -13,6 +15,48 @@ the user asks to upgrade. Use official Three.js docs first, then official
|
|
|
13
15
|
examples as implementation references. Match examples to the project's installed
|
|
14
16
|
Three.js release or branch, and do not blindly copy demo architecture.
|
|
15
17
|
|
|
18
|
+
## Route by system
|
|
19
|
+
|
|
20
|
+
| Work needed | Load |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| shot composition, chase/side/orbit rigs, camera handoffs, projection ownership, pointer look, mouse-aimed action (shooter, FPS/first-person, sniper, turret, crosshair/reticle), mouse-look, hand-rolled steering/pan/look input signs (screen-direction contract), floating origins | `$genex-threejs-camera-direction` |
|
|
23
|
+
| on-foot player movement: walk/run/jump/crouch, third-person character, slopes, stairs, moving platforms, personal VRM animation, directional locomotion, transitions, action motion | `$genex-threejs-character-controller` |
|
|
24
|
+
| a custom generated playable humanoid or Meshy animation coverage beyond UAL: reference-informed A-pose concepts, explicit candidate + 10k-remesh approvals, exact action IDs, same-rig adapter | `$genex-ai-character` + `$genex-threejs-character-controller` |
|
|
25
|
+
| the player drives or flies something: cars, drones, vehicle physics, gearbox, enter/exit between character and vehicle | `$genex-threejs-vehicle-controllers` |
|
|
26
|
+
| playable on phones: touch/mobile input for any game — joystick, virtual buttons, drag zones, per-genre touch recipes, rotate-device overlay — wired by default for every NEW game when a recipe fits (skip with a one-line reason) | `$genex-threejs-touch-controls` |
|
|
27
|
+
| phone-survivable rendering — device tiers, DPR/shadow/post budgets, the runtime quality governor, per-tier asset rungs for generated skyboxes/textures, the Quality picker, dispose-on-swap discipline — **mandatory for every game at boot wiring** | `$genex-threejs-adaptive-quality` |
|
|
28
|
+
| anything falls, collides, gets pushed, or needs physics: Rapier world setup, colliders for meshes and GLBs, collision events | `$genex-threejs-physics-rapier` |
|
|
29
|
+
| launch and docking timelines, procedural transform phases, springs, staging, rotating-frame alignment, debris motion | `$genex-threejs-procedural-animation` |
|
|
30
|
+
| reusable scalar/vector fields, domain warping, causal masks, procedural normals | `$genex-threejs-procedural-fields` |
|
|
31
|
+
| atlas-filtered blocks, planetary surfaces, terrain wetness, lava/emissive procedural surfaces, authored frame PBR, specular AA | `$genex-threejs-procedural-materials` |
|
|
32
|
+
| sculpted rails/frames, branch rings, semantic mesh writers, material groups | `$genex-threejs-procedural-geometry` |
|
|
33
|
+
| trees, stylized grass, GPU-computed grass fields, branching organisms, roots, foliage, rooted wind deformation | `$genex-threejs-procedural-vegetation` |
|
|
34
|
+
| buildings, façade grammars, profiles, ornaments, modular mesh writers | `$genex-threejs-procedural-architecture` |
|
|
35
|
+
| planets, terrain, craters, biome fields, coastlines, spherical detail | `$genex-threejs-procedural-planets` |
|
|
36
|
+
| sky scattering, planetary shells, depth-based aerial perspective | `$genex-threejs-atmosphere-aerial-perspective` |
|
|
37
|
+
| weather-driven raymarched clouds and cloud shadows | `$genex-threejs-volumetric-clouds` |
|
|
38
|
+
| hero open-water FFT oceans (expensive — only when open water IS the game): spectral cascades, hybrid FFT/Gerstner clear water, choppy derivatives, Jacobian whitecaps | `$genex-threejs-spectral-ocean` |
|
|
39
|
+
| **default water**: an ocean, sea, lake, river, or pool the game plays on or around — authored analytic waves, bounded heightfield pools, object ripples, differential-area caustics, shared normals, heuristic refraction, fallback absorption, crest foam | `$genex-threejs-water-optics` |
|
|
40
|
+
| falling snow, snow accumulation, model snow caps, wet asphalt puddles, procedural ripple normals, splash flipbooks, rain streaks, shared weather envelopes, surface wetness | `$genex-threejs-precipitation-surfaces` |
|
|
41
|
+
| curved-ray black holes, accretion disks, wormholes | `$genex-threejs-raymarched-space-effects` |
|
|
42
|
+
| particles, trails, plasma, shockwaves, layered event effects | `$genex-threejs-procedural-vfx` |
|
|
43
|
+
| accumulated screen frost, touch clearing, reduced blur, and refraction masks | `$genex-threejs-temporal-surfaces` |
|
|
44
|
+
| the light rig and where light belongs: sun/moon key, practical lights (campfire, torch, neon, lava), emissive-to-light coupling, light shafts and visible beams, fog mood, light signals, flicker, a scene that reads flat or uniformly lit | `$genex-threejs-lighting-design` |
|
|
45
|
+
| stable large-world shadows, cascades, clipmaps, cached updates | `$genex-threejs-shadow-systems` |
|
|
46
|
+
| GTAO, bent normals, bilateral reconstruction | `$genex-threejs-screen-space-ambient-occlusion` |
|
|
47
|
+
| HDR bloom and selective emission contribution | `$genex-threejs-bloom` |
|
|
48
|
+
| eye adaptation, tone mapping, LUT grading, output color | `$genex-threejs-exposure-color-grading` |
|
|
49
|
+
| shared depth/normal/velocity ownership and multi-pass ordering | `$genex-threejs-image-pipeline` |
|
|
50
|
+
| fixed-view diagnostics, seed sweeps, temporal and budget evidence | `$genex-threejs-visual-validation` |
|
|
51
|
+
| game content named in the plural or a content genre: quests, objectives, NPCs, dialogue, shops, inventory, loot, XP/progression, an RPG/adventure/story game — **mandatory whenever the ask names content**, and its content contract is written before the asset batch | `$genex-threejs-game-content` |
|
|
52
|
+
| a big/open world: kilometers of terrain, multiple regions or locations, exploration, points of interest, biomes, world streaming | `$genex-threejs-open-world` |
|
|
53
|
+
| the 2D interface — HUD, menus, pause/win/lose screens, loaders, lobby, on-screen text and buttons, UI state flow — **mandatory for every game**, and its "Plan the UI first" gate runs right after the concept is locked | `$genex-threejs-game-ui` |
|
|
54
|
+
| a cinematic menu — main menu/title/pause/victory/defeat/lobby/credits with a looping generated video backdrop behind DOM buttons | `$genex-ai-menu` |
|
|
55
|
+
| a cohesive art-directed HUD — generated sprite set (matched frames, masks, icons in one style) wired with masked fills | `$genex-ai-hud` |
|
|
56
|
+
| the game works but feels flat, floaty, or unresponsive: input response, acceleration curves, camera shake, hit feedback, hitstop, cooldowns, difficulty ramp, fail/retry loop | `$genex-threejs-game-feel` |
|
|
57
|
+
| realtime multiplayer: movement sync, a shared ball/NPC, host-run scores/enemies, shots/emotes, persistence | `$genex-threejs-multiplayer` |
|
|
58
|
+
| player identity, sign-in, guests, saves/progress, per-player state, a shared persistent world, leaderboards — **mandatory for every game** | `$genex-threejs-embed-auth` |
|
|
59
|
+
|
|
16
60
|
## Execution order
|
|
17
61
|
|
|
18
62
|
1. Define the game contract: player verb, win/interaction loop, target device,
|
|
@@ -29,12 +73,10 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
29
73
|
additionally fixes the world's scale class as a number here via
|
|
30
74
|
`$genex-threejs-open-world` — kilometers of streamed terrain, never one
|
|
31
75
|
fogged plane. Scope belongs to the user: shipping fewer or smaller than
|
|
32
|
-
the ask requires their explicit OK through a
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"vertical slice first" is a build order, never a license to shrink the
|
|
37
|
-
destination silently.
|
|
76
|
+
the ask requires their explicit OK through a question with real options
|
|
77
|
+
(your question tool when you have one; a short numbered list in chat
|
|
78
|
+
otherwise) — a "vertical slice first" is a build order, never a license
|
|
79
|
+
to shrink the destination silently.
|
|
38
80
|
2. Wire player identity before any boot code: `$genex-threejs-embed-auth` is
|
|
39
81
|
mandatory for every game (`initEmbed(...)` + the `waitForPlayer()` gate) —
|
|
40
82
|
saves, leaderboards, and multiplayer auth all come from it.
|
|
@@ -45,9 +87,8 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
45
87
|
game-ui gate) WITH the full HUD composited over it: the `$genex-ai-hud`
|
|
46
88
|
Stage-1 image, one generation serving as concept, style checkpoint, and
|
|
47
89
|
HUD blueprint (never a separate UI-free concept first). Show it to the user
|
|
48
|
-
the moment it lands and get a keep-or-change answer through
|
|
49
|
-
|
|
50
|
-
Codex: `request_user_input`; numbered-list fallback otherwise). This answer
|
|
90
|
+
the moment it lands and get a keep-or-change answer through your question
|
|
91
|
+
tool (a short numbered list in chat when you have none). This answer
|
|
51
92
|
GATES — but only the style-dependent pipeline: until the user approves a
|
|
52
93
|
frame, do NOT enqueue the Tier-2 art that builds on the look (the
|
|
53
94
|
`$genex-ai-hud` Stage-2 chain, and the `$genex-ai-menu` still + video
|
|
@@ -58,10 +99,10 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
58
99
|
arrive, and later `--edit`-able generations anchor to the approved frame for
|
|
59
100
|
STYLE while the game contract owns content. Everything that does NOT depend
|
|
60
101
|
on the look — scaffold, boot wiring, the core loop, and the
|
|
61
|
-
concept-independent
|
|
62
|
-
while the answer is pending, so the wait is
|
|
63
|
-
the #1 way a finished game ships an
|
|
64
|
-
to swap in.
|
|
102
|
+
concept-independent worker lanes (the director's Delegate section) —
|
|
103
|
+
keeps building in parallel while the answer is pending, so the wait is
|
|
104
|
+
never idle. Skipping this enqueue is the #1 way a finished game ships an
|
|
105
|
+
ugly HUD — by step 12 there is nothing to swap in.
|
|
65
106
|
4. Lock the visual direction — the same plan-first logic as the UI gate, in
|
|
66
107
|
the same plan block, before any rendering code:
|
|
67
108
|
- **camera**: the rig type and the pointer bucket
|
|
@@ -144,7 +185,7 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
144
185
|
Emissive-only is a real answer said in one line; a coupled practical
|
|
145
186
|
light is the step up; one white ambient wash over everything is the
|
|
146
187
|
unlit look with extra steps, and it reads the same at noon and at
|
|
147
|
-
midnight. `$genex-threejs-lighting-design` owns
|
|
188
|
+
midnight. `$genex-threejs-lighting-design` owns that gate;
|
|
148
189
|
Planning is not building: effects still land LAST (steps 10–11); this step
|
|
149
190
|
only fixes the target so the look isn't improvised pass-by-pass at the end.
|
|
150
191
|
5. Wire the gameplay layer for the player verb: the physics world via
|
|
@@ -217,61 +258,23 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
217
258
|
13. Validate in a real browser with fixed seeds, captures, interaction checks,
|
|
218
259
|
and performance evidence.
|
|
219
260
|
|
|
220
|
-
##
|
|
221
|
-
|
|
222
|
-
Generations already render server-side in parallel — the wall-clock savings
|
|
223
|
-
live in the ATTENDED chains. Whenever the coding agent supports background
|
|
224
|
-
subagents (e.g. Claude Code's Agent tool), fanning the independent work out is
|
|
225
|
-
the DEFAULT, not a big-scope special case: split every disjoint chain below off
|
|
226
|
-
by default and keep the main thread building. In environments without them
|
|
227
|
-
(Cursor), the same order simply runs sequentially and the `--no-wait` pattern
|
|
228
|
-
still hides most generation latency.
|
|
261
|
+
## Delegation
|
|
229
262
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
concept-dependent work before it.
|
|
263
|
+
Fan-out is owned by the director: sub-agents own DESIGN.md Modules rows,
|
|
264
|
+
concept-DEPENDENT lanes wait for the player's yes on the concept, one writer
|
|
265
|
+
per file, workers never spawn workers, and the Assets table is the budget —
|
|
266
|
+
the full rules and the worker prompt shape live in the Delegate section of
|
|
267
|
+
`$genex-game-director`. This map adds no separate delegation rules; it is the
|
|
268
|
+
routing source the director and its workers read.
|
|
237
269
|
|
|
238
|
-
|
|
239
|
-
user APPROVES the concept, hand the whole
|
|
240
|
-
`$genex-ai-hud` chain to one subagent: pick the better candidate → Stage-2
|
|
241
|
-
sheet → clean → extract → masks → write the sprite wiring. Its prompt must
|
|
242
|
-
be self-contained — the style brief, the approved mockup URL, the
|
|
243
|
-
output dir, and exactly which files it owns. **Handoff rule:** whoever
|
|
244
|
-
wires the HUD after the subagent finishes MUST read the produced
|
|
245
|
-
`*.annotated-progress.json` and `.bbox.json` files from disk — fillBox
|
|
246
|
-
numbers, `segments`, and sprite dims do not survive a prose summary, and
|
|
247
|
-
wiring from the summary is how validated masks end up on disk while the
|
|
248
|
-
shipped fill is a naive width%.
|
|
249
|
-
- **Asset shepherd.** One subagent runs `npx genex wait` on every queued ID
|
|
250
|
-
and wires each asset in as it lands (skybox, models, menu video, dressing),
|
|
251
|
-
swapping placeholders out and reporting each swap.
|
|
252
|
-
- **Verification runner.** Browser evidence — screenshots, control presses,
|
|
253
|
-
the menu loop-seam watch, in-situ checks of placed art — can run in a
|
|
254
|
-
subagent while the main agent keeps building.
|
|
255
|
-
- **Content module fan-out (big scopes — concept-independent, launch immediately).**
|
|
256
|
-
When the content contract names a
|
|
257
|
-
big world or several content systems, serial hand-typing is what runs out
|
|
258
|
-
of session: split the gameplay modules across parallel subagents instead —
|
|
259
|
-
one each for world/terrain, quest + dialogue DATA, enemies/AI, items/
|
|
260
|
-
economy — against a short written module contract (the shared state
|
|
261
|
-
object's shape, the event names, the content tables from
|
|
262
|
-
`$genex-threejs-game-content`, exact file ownership). Ship the
|
|
263
|
-
walking-skeleton v0 preview FIRST, then let the content agents land behind
|
|
264
|
-
it — the preview cadence and a long parallel build are not in conflict:
|
|
265
|
-
the user walks the skeleton while the world grows. Each subagent reports
|
|
266
|
-
deviations from the module contract; the main agent reconciles and stays
|
|
267
|
-
the only writer of the entry point.
|
|
270
|
+
## Routing rules
|
|
268
271
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
- Build silhouette, motion, and material readability before adding image
|
|
273
|
+
effects. Never dress a primitive shape in glow or bloom to fake quality —
|
|
274
|
+
authored forms first, then materials, then lighting, then effects last.
|
|
275
|
+
- Keep game logic, simulation state, visual fields, and screen-space passes
|
|
276
|
+
separated unless coupling is intentional.
|
|
277
|
+
- Prefer deterministic seeds and named controls for every procedural system.
|
|
275
278
|
|
|
276
279
|
## Acceptance gate
|
|
277
280
|
|
|
@@ -26,8 +26,9 @@ out automatically — only `genex-*`-named files are removed, never yours.
|
|
|
26
26
|
- **agents/** - example subagent definitions (Claude Code).
|
|
27
27
|
- **commands/** - example slash commands (Claude Code).
|
|
28
28
|
|
|
29
|
-
Start with `$genex-
|
|
30
|
-
|
|
29
|
+
Start with `$genex-game-director` for any game or graphics request. It checks
|
|
30
|
+
what your environment can do, writes the `DESIGN.md` design contract, and
|
|
31
|
+
routes the agent to focused skills for cameras, procedural geometry,
|
|
31
32
|
materials, atmosphere, water, weather, VFX, lighting, post-processing, and
|
|
32
33
|
visual validation.
|
|
33
34
|
|