@genex-ai/cli-demo 0.93.0 → 0.94.0-dev.249

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.
Files changed (58) hide show
  1. package/dist/index.js +26 -5
  2. package/package.json +1 -1
  3. package/templates/skills/genex-ai-model/SKILL.md +3 -2
  4. package/templates/skills/genex-ai-skybox/SKILL.md +4 -4
  5. package/templates/skills/genex-ai-texture/SKILL.md +1 -1
  6. package/templates/skills/genex-ai-video/SKILL.md +1 -1
  7. package/templates/skills/genex-game-director/SKILL.md +321 -411
  8. package/templates/skills/genex-game-director/references/design-contract.md +130 -179
  9. package/templates/skills/genex-game-director/references/routing-map.md +242 -362
  10. package/templates/skills/genex-getting-started/SKILL.md +2 -2
  11. package/templates/skills/genex-threejs-exposure-color-grading/SKILL.md +3 -7
  12. package/templates/skills/genex-threejs-multiplayer/SKILL.md +19 -2
  13. package/templates/skills/genex-threejs-procedural-assets/SKILL.md +112 -0
  14. package/templates/skills/genex-threejs-procedural-materials/SKILL.md +3 -7
  15. package/templates/skills/genex-threejs-procedural-vfx/SKILL.md +6 -11
  16. package/templates/skills/genex-threejs-shadow-systems/SKILL.md +2 -3
  17. package/templates/skills/genex-threejs-visual-validation/SKILL.md +0 -4
  18. package/templates/skills/genex-updates/SKILL.md +1 -1
  19. package/templates/skills/genex-threejs-atmosphere-aerial-perspective/SKILL.md +0 -46
  20. package/templates/skills/genex-threejs-atmosphere-aerial-perspective/references/atmosphere.md +0 -213
  21. package/templates/skills/genex-threejs-bloom/SKILL.md +0 -44
  22. package/templates/skills/genex-threejs-bloom/references/bloom.md +0 -187
  23. package/templates/skills/genex-threejs-exposure-color-grading/references/exposure-grading.md +0 -205
  24. package/templates/skills/genex-threejs-game-content/SKILL.md +0 -198
  25. package/templates/skills/genex-threejs-game-content/references/content-tables.md +0 -269
  26. package/templates/skills/genex-threejs-image-pipeline/SKILL.md +0 -56
  27. package/templates/skills/genex-threejs-image-pipeline/references/image-pipeline.md +0 -197
  28. package/templates/skills/genex-threejs-lighting-design/SKILL.md +0 -144
  29. package/templates/skills/genex-threejs-lighting-design/references/light-recipes.md +0 -137
  30. package/templates/skills/genex-threejs-open-world/SKILL.md +0 -149
  31. package/templates/skills/genex-threejs-open-world/references/terrain-streaming.md +0 -215
  32. package/templates/skills/genex-threejs-precipitation-surfaces/SKILL.md +0 -59
  33. package/templates/skills/genex-threejs-precipitation-surfaces/references/precipitation-surfaces.md +0 -181
  34. package/templates/skills/genex-threejs-procedural-architecture/SKILL.md +0 -50
  35. package/templates/skills/genex-threejs-procedural-architecture/references/architecture-systems.md +0 -509
  36. package/templates/skills/genex-threejs-procedural-fields/SKILL.md +0 -61
  37. package/templates/skills/genex-threejs-procedural-fields/references/field-systems.md +0 -232
  38. package/templates/skills/genex-threejs-procedural-geometry/SKILL.md +0 -39
  39. package/templates/skills/genex-threejs-procedural-geometry/references/mesh-systems.md +0 -202
  40. package/templates/skills/genex-threejs-procedural-materials/references/material-systems.md +0 -198
  41. package/templates/skills/genex-threejs-procedural-planets/SKILL.md +0 -48
  42. package/templates/skills/genex-threejs-procedural-planets/references/planet-systems.md +0 -498
  43. package/templates/skills/genex-threejs-procedural-vegetation/SKILL.md +0 -52
  44. package/templates/skills/genex-threejs-procedural-vegetation/references/vegetation-systems.md +0 -314
  45. package/templates/skills/genex-threejs-procedural-vfx/references/vfx-systems.md +0 -218
  46. package/templates/skills/genex-threejs-raymarched-space-effects/SKILL.md +0 -37
  47. package/templates/skills/genex-threejs-raymarched-space-effects/references/space-effects.md +0 -194
  48. package/templates/skills/genex-threejs-screen-space-ambient-occlusion/SKILL.md +0 -35
  49. package/templates/skills/genex-threejs-screen-space-ambient-occlusion/references/ambient-occlusion.md +0 -441
  50. package/templates/skills/genex-threejs-spectral-ocean/SKILL.md +0 -52
  51. package/templates/skills/genex-threejs-spectral-ocean/references/spectral-ocean.md +0 -473
  52. package/templates/skills/genex-threejs-temporal-surfaces/SKILL.md +0 -41
  53. package/templates/skills/genex-threejs-temporal-surfaces/references/temporal-surfaces.md +0 -207
  54. package/templates/skills/genex-threejs-visual-validation/references/visual-validation.md +0 -427
  55. package/templates/skills/genex-threejs-volumetric-clouds/SKILL.md +0 -49
  56. package/templates/skills/genex-threejs-volumetric-clouds/references/volumetric-clouds.md +0 -579
  57. package/templates/skills/genex-threejs-water-optics/SKILL.md +0 -57
  58. package/templates/skills/genex-threejs-water-optics/references/water-optics.md +0 -195
@@ -1,379 +1,259 @@
1
1
  # Routing Map
2
2
 
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.
3
+ This map assigns the player's **current request** to its owning Genex lanes.
4
+ A clear focused request starts there; it never inherits unrelated steps from a
5
+ full-game workflow.
6
6
 
7
7
  ## Three.js version and references
8
8
 
9
9
  For new Genex browser-game projects, use the current stable Three.js release
10
- (what `npm i three` installs) and keep the project on the version that is
11
- actually installed match all docs and examples to it.
10
+ (what `npm i three` installs) and keep the project on the version actually
11
+ installed—match all docs and examples to it.
12
12
 
13
- For existing projects, inspect and respect the installed Three.js version unless
14
- the user asks to upgrade. Use official Three.js docs first, then official
15
- examples as implementation references. Match examples to the project's installed
16
- Three.js release or branch, and do not blindly copy demo architecture.
13
+ For existing projects, inspect and respect the installed Three.js version
14
+ unless the player asks to upgrade. Use official Three.js docs first, then
15
+ official examples. Match examples to the installed release and do not blindly
16
+ copy demo architecture.
17
+
18
+ ## Route by request shape
19
+
20
+ - **Clear latest request:** load the owning rows below and start.
21
+ - **Focused existing work:** read `DESIGN.md` and the touched code, update
22
+ `Now:`, preserve unrelated commitments, and do not replay discovery.
23
+ - **Broad new game:** only when unresolved, ask whole coordinated build versus
24
+ one request-relevant part first. If the player already answered, proceed.
25
+ - **Blank/unclear:** ask whether this is a game, tool/component, or existing
26
+ work. Do not propose a concept.
27
+ - **Generated GLB versus editable code:** for an ambiguous “make this image
28
+ 3D,” ask one plain question: normal generated GLB, or editable parameterized
29
+ Three.js code? Explicit `GLB`, `procedural`, `parametric`, `code-built`, or
30
+ `variations` language chooses directly.
17
31
 
18
32
  ## Route by system
19
33
 
20
34
  | Work needed | Load |
21
35
  | --- | --- |
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` |
36
+ | shot composition, chase/side/orbit rigs, camera handoffs, projection ownership, pointer look, mouse-aimed action, mouse-look, the screen-direction contract for hand-rolled steering/pan/look input signs, floating origins | `$genex-threejs-camera-direction` |
23
37
  | on-foot player movement: walk/run/jump/crouch, third-person character, slopes, stairs, moving platforms, the player's body loader, directional locomotion, transitions, action motion | `$genex-threejs-character-controller` |
24
- | the game's own generated character the player's BODY wherever a human body appears on screen (first-person included; the exemption is "no human body ever appears", not "the camera is in the head"), enqueued with the first art actions; one user stop riding the concept review, owner-ratified auto-pick on silence (director §7) or Meshy animation coverage beyond UAL: reference-informed A-pose concepts, exact action IDs, same-rig adapter | `$genex-ai-character` + `$genex-threejs-character-controller` |
25
- | a character or enemy needs a motion the catalog lacks a signature move, a boss telegraph, a death, a full 8-way movement set, or a performance from the user's own footage: free-text verbs, platform-routed, plan shown before any spend (`genex character animate <id> "<verb>"`, `genex creature animate`, `--locomotion`, `--video`) | `$genex-ai-character` (motion section + `references/motion-generation.md`) |
26
- | remote player bodies in multiplayer NEVER hand-built primitives: the game's generated character when it has one (everyone wears it), the player's `p.avatarUrl` VRM only when it doesn't | `$genex-threejs-multiplayer` + `$genex-threejs-character-controller` |
27
- | the game has enemies, NPCs, or creatures — **load whenever an enemy roster exists**: rigged bipeds via `npx genex creature`, static + procedural motion for other body shapes, plus the mechanical floor every enemy owes (collider, verified facing, hit reaction, death moment) | `$genex-threejs-creatures` |
28
- | the player drives or flies something: cars, drones, vehicle physics, gearbox, enter/exit between character and vehicle | `$genex-threejs-vehicle-controllers` |
29
- | 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` |
30
- | 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` |
31
- | anything falls, collides, gets pushed, or needs physics: Rapier world setup, colliders for meshes and GLBs, collision events | `$genex-threejs-physics-rapier` |
32
- | launch and docking timelines, procedural transform phases, springs, staging, rotating-frame alignment, debris motion | `$genex-threejs-procedural-animation` |
33
- | reusable scalar/vector fields, domain warping, causal masks, procedural normals | `$genex-threejs-procedural-fields` |
34
- | atlas-filtered blocks, planetary surfaces, terrain wetness, lava/emissive procedural surfaces, authored frame PBR, specular AA | `$genex-threejs-procedural-materials` |
35
- | sculpted rails/frames, branch rings, semantic mesh writers, material groups | `$genex-threejs-procedural-geometry` |
36
- | trees, stylized grass, GPU-computed grass fields, branching organisms, roots, foliage, rooted wind deformation | `$genex-threejs-procedural-vegetation` |
37
- | buildings, façade grammars, profiles, ornaments, modular mesh writers | `$genex-threejs-procedural-architecture` |
38
- | planets, terrain, craters, biome fields, coastlines, spherical detail | `$genex-threejs-procedural-planets` |
39
- | sky scattering, planetary shells, depth-based aerial perspective | `$genex-threejs-atmosphere-aerial-perspective` |
40
- | weather-driven raymarched clouds and cloud shadows | `$genex-threejs-volumetric-clouds` |
41
- | 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` |
42
- | **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` |
43
- | 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` |
44
- | curved-ray black holes, accretion disks, wormholes | `$genex-threejs-raymarched-space-effects` |
45
- | particles, trails, plasma, shockwaves, layered event effects | `$genex-threejs-procedural-vfx` |
46
- | accumulated screen frost, touch clearing, reduced blur, and refraction masks | `$genex-threejs-temporal-surfaces` |
47
- | 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` |
38
+ | the game's own generated character—the player's body wherever a human body appears—or Meshy animation coverage beyond the stock pack: reference-informed A-pose concepts, exact action IDs, same-rig adapter | `$genex-ai-character` + `$genex-threejs-character-controller` |
39
+ | a character/enemy needs motion the catalog lacks—a signature move, boss telegraph, death, full 8-way set, or the player's footage; free plan before spend | `$genex-ai-character` motion section + `references/motion-generation.md` |
40
+ | remote player bodies in multiplayer—never hand-built primitives: the game's generated character when it has one, otherwise the player's `p.avatarUrl` VRM | `$genex-threejs-multiplayer` + `$genex-threejs-character-controller` |
41
+ | enemies, NPCs, or creatures: rigged bipeds via `npx genex creature`; static plus procedural motion for other body shapes; collider, facing, hit reaction, death | `$genex-threejs-creatures` |
42
+ | cars, drones, vehicle physics, gearbox, character↔vehicle enter/exit | `$genex-threejs-vehicle-controllers` |
43
+ | playable on phones: joystick, virtual buttons, drag zones, genre touch recipes, rotate-device overlay | `$genex-threejs-touch-controls` |
44
+ | phone-survivable rendering: device tiers, DPR/shadow/post budgets, runtime governor, generated-asset rungs, Quality picker, dispose-on-swap | `$genex-threejs-adaptive-quality` |
45
+ | anything falls, collides, gets pushed, or needs colliders/events | `$genex-threejs-physics-rapier` |
46
+ | launch/docking timelines, authored transform phases, springs, convergence, deterministic prop/debris motion | `$genex-threejs-procedural-animation` |
47
+ | rebuild a reference prop, hard-surface object, modular decoration, or simple environment piece as editable parameterized Three.js code | `$genex-threejs-procedural-assets` |
48
+ | procedural/PBR material boundary, authored frame PBR, and the retained material craft | `$genex-threejs-procedural-materials` |
49
+ | particles, trails, plasma, shockwaves, pooled bursts, and event effects | `$genex-threejs-procedural-vfx` |
48
50
  | stable large-world shadows, cascades, clipmaps, cached updates | `$genex-threejs-shadow-systems` |
49
- | GTAO, bent normals, bilateral reconstruction | `$genex-threejs-screen-space-ambient-occlusion` |
50
- | HDR bloom and selective emission contribution | `$genex-threejs-bloom` |
51
- | eye adaptation, tone mapping, LUT grading, output color | `$genex-threejs-exposure-color-grading` |
52
- | shared depth/normal/velocity ownership and multi-pass ordering | `$genex-threejs-image-pipeline` |
53
- | fixed-view diagnostics, seed sweeps, temporal and budget evidence | `$genex-threejs-visual-validation` |
54
- | 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` |
55
- | a big/open world: kilometers of terrain, multiple regions or locations, exploration, points of interest, biomes, world streaming | `$genex-threejs-open-world` |
56
- | 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` |
57
- | a cinematic menu — main menu/title/pause/victory/defeat/lobby/credits with a looping generated video backdrop behind DOM buttons | `$genex-ai-menu` |
58
- | a cohesive art-directed HUD — generated sprite set (matched frames, masks, icons in one style) wired with masked fills | `$genex-ai-hud` |
59
- | background music the looping instrumental track under gameplay and menu (default ONE ~90 s track; Music + SFX sliders in settings) | `$genex-ai-music` |
60
- | 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` |
61
- | realtime multiplayer: movement sync, a shared ball/NPC, host-run scores/enemies, shots/emotes, persistence | `$genex-threejs-multiplayer` |
62
- | player identity, sign-in, guests, saves/progress, per-player state, a shared persistent world, leaderboards **mandatory for every game** | `$genex-threejs-embed-auth` |
63
-
64
- ## Execution order
65
-
66
- 1. Define the game contract: player verb, win/interaction loop, target device,
67
- camera distance, scene scale, motion, and frame budget. **When the request
68
- names content in the plural (quests, enemies, locations, bosses, items) or
69
- a content genre (RPG, adventure, open world, story game), the contract has
70
- a second half the content contract from `$genex-threejs-game-content`:**
71
- every plural noun becomes a countable line (N quests and their chain, N
72
- named locations, N enemy types and which are bosses, the progression axis,
73
- the economy's sources and sinks), plus the minute-ten answer ("what is the
74
- player doing ten minutes in?"). Write it BEFORE step 3's art enqueue and
75
- before the asset batch — the asset set derives from it, and a world shaped
76
- around the wrong assets can't be reshaped later. A **big/open world** ask
77
- additionally fixes the world's scale class as a number here via
78
- `$genex-threejs-open-world` kilometers of streamed terrain, never one
79
- fogged plane. Scope belongs to the user: shipping fewer or smaller than
80
- the ask requires their explicit OK through a question with real options
81
- (your question tool when you have one; a short numbered list in chat
82
- otherwise) a "vertical slice first" is a build order, never a license
83
- to shrink the destination silently.
84
- 2. Wire player identity before any boot code: `$genex-threejs-embed-auth` is
85
- mandatory for every game (`initEmbed(...)` + the `waitForPlayer()` gate) —
86
- saves, leaderboards, and multiplayer auth all come from it.
87
- 3. Run `$genex-threejs-game-ui`'s "Plan the UI first" gate: screen inventory,
88
- one shared style brief, a tier per screen — stated visibly in chat, never
89
- decided silently. FIRST of all art, generate the gate's **concept mockup** —
90
- a playable-moment shot (verb + threat + objective in frame, per the
91
- game-ui gate) WITH the full HUD composited over it: the `$genex-ai-hud`
92
- Stage-1 image, ONE generation serving as concept, style checkpoint, and
93
- HUD blueprint (never a separate UI-free concept first, and no candidate
94
- variants unless the player asks for them). **The moment it lands, the
95
- cheap style chain fires nothing waits for the player here**: decide the
96
- HUD lane as art director and record the `HUD lane:` line in DESIGN.md
97
- (director §5), then enqueue with `--no-wait` the `$genex-ai-hud` Stage-2
98
- sheet, the `$genex-ai-menu` still (the menu is the default for every
99
- game — "it's only a draft" is not a reason to decide no), and the
100
- logotype. THEN show the player the frame and ask keep-or-change through
101
- your question tool (a short numbered list in chat when you have none) —
102
- the answer is INFORMATION, never a gate: silence means the concept
103
- stands; "change" loops the concept with their notes and the chain re-runs
104
- from the new frame (image-priced cheap by design; the game-ui skill
105
- owns the re-anchor loop). Only the menu VIDEO waits, for the FIRST of:
106
- the player's yes · the next `genex preview` after the menu still landed ·
107
- style work being the only work left and never while a player objection
108
- is open (two failed videos ship the still). Later `--edit`-able
109
- generations anchor to the standing frame for STYLE while the game
110
- contract owns content. Everything concept-independent — scaffold, boot
111
- wiring, the core loop, the worker lanes keeps building in parallel.
112
- Skipping this enqueue is the #1 way a finished game ships an ugly HUD —
113
- by step 12 there is nothing to swap in.
114
- 4. Lock the visual direction — the same plan-first logic as the UI gate, in
115
- the same plan block, before any rendering code:
116
- - **camera**: the rig type and the pointer bucket
117
- (`$genex-threejs-camera-direction` — the bucket decision is mandatory);
118
- - **renderer baseline**: tone mapping, exposure, and output color space set
119
- deliberately at boot (`$genex-threejs-exposure-color-grading` owns the
120
- staging stock three.js defaults are not a look);
121
- - **the post stack**: read the look off your evidence — don't default to a
122
- single bloom. TWO sources drive it: (a) the CONCEPT FRAME — a rendered
123
- image that already carries a grade, a bloom level, haze/DoF, maybe grain or
124
- aberration; name what it actually shows and reproduce THAT; (b) the 2–3 AAA
125
- references name which post each one leans on (racing: motion blur + heat
126
- haze; grounded shooter: restrained bloom + film grain + faint aberration;
127
- clean sci-fi: crisp bloom + strong grade). Ship the stack that evidence
128
- calls for, each effect named and justified. ONE scene-serving render-pass
129
- effect (bloom, AO, or a LUT/shader grade a UI vignette div or a CSS
130
- canvas filter does NOT count) is the FLOOR against "no post", never the
131
- target: match the concept's richness, don't stop at one token pass. "No
132
- post at all" is the stock default, not a plan, and "it's only a draft" is
133
- not a lower floor. When 2+ effects compose, `$genex-threejs-image-pipeline`
134
- owns the pass ordering. **If the stack includes film grain, author it from
135
- `$genex-threejs-exposure-color-grading`'s grain recipe static, seeded on
136
- device pixels, luminance-weighted. A hand-rolled per-frame `vUv` hash
137
- shimmers across the whole screen and reads as a cheap noise sheet; it is the
138
- most common post defect in shipped games, and "add grain" without that
139
- recipe is how it happens;**
140
- - **references**: name 2–3 AAA games whose look this game borrows
141
- (conventions, lighting mood, palette, post — never trade dress); the
142
- same 2–3 the UI gate named, extended from the interface to the scene,
143
- and embodied in the gate's concept frame — the image the scene's STYLE
144
- is judged against (content always comes from the game contract);
145
- - **ambient motion**: name ONE subtle environmental motion loop that keeps
146
- the scene alive at rest — an emissive pulse along edges, heat shimmer,
147
- drifting dust, a slowly flowing texture. Shader/procedural, zero
148
- generations, built with the scene — a world that is perfectly still
149
- reads as a screenshot, not a place. ONE is the budget, not the floor.
150
- If the answer is particles, `$genex-threejs-procedural-vfx` carries the
151
- recipe a bare `PointsMaterial` renders hard squares, and picking this
152
- bullet without that skill is how "drifting dust" ships as flying boxes;
153
- - **every primitive surface — texture it or shade it, decided one by one**:
154
- the ground is never the only surface. Walk the walls, barriers, kerbs,
155
- platforms and props the game BUILDS out of primitives, and give each a real
156
- material: a generated texture, or a **shader** where that surface genuinely
157
- wants motion or energy a force barrier that pulses and refracts, an
158
- electric fence, a scrolling hazard strip, an emissive seam that breathes.
159
- Judge surface by surface: a shader that gives a blocking barrier life earns
160
- its place; the same effect smeared over everything disfigures the scene.
161
- Deliberate flat black IS a valid answer when the look calls for it — say so
162
- in one line. What is never valid is not deciding: a flat-colour box standing
163
- next to textured geometry is the "stopped halfway" tell, and it is what
164
- ships when this bullet is skipped. `$genex-threejs-procedural-materials`
165
- and `$genex-threejs-procedural-vfx` own the craft. Whatever you apply, SEE
166
- it in the running game before calling it done — an unverified shader
167
- disfigures as easily as it delights. Scale is not a judgement call: derive
168
- the UVs from world size (`worldUV`, `$genex-ai-texture`) and never hand-pick
169
- a `repeat` one `repeat` cannot be right for six box faces of different
170
- sizes, and a shipped game put 1:102 on a wall top that way;
171
- - **every moment the rules fire — decide the effect one by one**: the
172
- surfaces above are only half the scene. Walk the moments the GAME
173
- CONTRACT already names a hit lands, a crate breaks, a pickup is taken, a
174
- player dies, a round starts and for each ask whether the world changes
175
- in a way the player should see, and whether existing feedback already says
176
- it. "A flash and a sound already carry this" is a real answer; so is "bare
177
- on purpose". Say either in one line. Not deciding is the only wrong answer,
178
- and it is why games ship where bombs detonate and nothing reacts. Then
179
- check the inverse — an effect on a moment the player didn't cause and can't
180
- read is noise, and ambient particles are the usual offender. For a moment
181
- made of ENERGY (fire, a blast, a shockwave) the question is not "what
182
- texture goes on this box" but "what shape is this energy": a primitive
183
- standing in for an effect is a placeholder no matter how deliberate the
184
- comment says it is. `$genex-threejs-procedural-vfx` owns this gate;
185
- - **every light has a cause — walk the sources one by one**: the
186
- lighting/atmosphere mood comes from the SAME shared style brief the UI
187
- gate wrote — one art direction across scene and UI — but a mood is not a
188
- rig. Walk the sources the contract already names: the sky (day, night,
189
- underground that one answer sets the key), the fiction's emitters
190
- (campfire, torch, neon, a monitor, a crack of daylight in the roof), and
191
- the gameplay signals (beacon, telegraph, checkpoint). For each: does it
192
- change what the player sees around it, or only need to be seen itself?
193
- Emissive-only is a real answer said in one line; a coupled practical
194
- light is the step up; one white ambient wash over everything is the
195
- unlit look with extra steps, and it reads the same at noon and at
196
- midnight. `$genex-threejs-lighting-design` owns that gate;
197
- Planning is not building: effects still land LAST (steps 10–11); this step
198
- only fixes the target so the look isn't improvised pass-by-pass at the end.
199
- 5. Wire the gameplay layer for the player verb: the physics world via
200
- `$genex-threejs-physics-rapier` when anything falls, collides, or gets
201
- pushed; on-foot movement via `$genex-threejs-character-controller`;
202
- driving/flying and character↔vehicle enter/exit via
203
- `$genex-threejs-vehicle-controllers`. For a custom Meshy player, load
204
- `$genex-ai-character` and keep the generation decisions ahead of wiring:
205
- discuss two or three visual directions, inspect any user-named references,
206
- then generate and show exactly three neutral-A-pose concepts. Wait for an
207
- explicit candidate selection before Image-to-3D. Warn that held, slung, or
208
- overlapping props and straps may fuse into the body or hide limbs. Keep the
209
- selected high-detail pre-rig output in neutral A-pose, preserve it in R2,
210
- show front/back/left/right views plus its measured face count, and wait for
211
- explicit approval of the separate 10,000-face triangle remesh. Only the 10k
212
- remesh is rigged and animated; there is no dynamic concept pose or silent
213
- T-pose fallback. Meshy limb rotations remain unchanged—never freeze or
214
- correct arm, hand, leg, or foot tracks. Only horizontal root or hip
215
- translation may be normalized for Rapier.
216
- 6. Select the minimum scene-generation skills: geometry, materials, vegetation,
217
- architecture, planets, water, precipitation, clouds, or VFX. Show the
218
- planned loader from the very first asset load a player must never stare
219
- at a black screen; the rest of the UI states come at step 12.
220
- Then make the world-dressing DECISION — a judgment call, not a quota:
221
- does THIS world's fiction support 2D art (posters, signs, graffiti,
222
- decals, banners, in-world screens — `$genex-ai-image`; `$genex-ai-video`
223
- for anything that should move)? Say the decision in one line in the
224
- visual-direction block. Name only the pieces that genuinely belong — a
225
- garage wants grease posters and warning decals; a pristine void wants
226
- none — and anchor their prompts to the concept frame. **Zero is a valid
227
- answer with a stated reason; art placed just to satisfy this step is the
228
- failure mode, not skipping it.** Enqueue what you named with `--no-wait`
229
- alongside the other assets. Every placed piece is
230
- screenshot-checked in situ — right scale, not stretched, unlit material
231
- where it must glow, readable at gameplay distance
232
- (`$genex-threejs-visual-validation` owns the capture discipline).
233
- 7. Add camera direction when framing, controls, transitions, or scale perception
234
- affect play — or the game aims with the mouse (shooter/FPS/turret): the
235
- step-4 bucket decision executes here. And before ANY hand-rolled
236
- steering/pan/look math: the screen-direction contract (D → screen-right,
237
- mouse-right → view right, drag axes one convention) with verified copy-paste
238
- bases lives there — signs are copied, never derived.
239
- 8. Add procedural animation when object motion needs authored phases,
240
- convergence, looping, or deterministic timelines.
241
- 9. Add shared fields before writing multiple independent noise layers.
242
- 10. Add lighting, atmosphere, and shadows only after the no-post baseline
243
- reads: the step-4 source walk builds now — `$genex-threejs-lighting-design`
244
- owns the rig.
245
- 11. Add image-pipeline, bloom, exposure, grading, or AO last — building out the
246
- step-4 post plan, not inventing one now. This is a completion gate: the
247
- named post stack must be BUILT before the game is called done, published,
248
- or handed off — a game rendering on stock three.js defaults is not done,
249
- and the gate does not wait for the word "done" to be said. The stack is
250
- tier-gated (`$genex-threejs-adaptive-quality`): full on desktop, the built
251
- tone-mapping pass + the tier's light additions on phones — wire the
252
- governor's post toggle so phone tiers drop the heavy passes, never ship
253
- them undropped.
254
- 12. Once the loop is playable, build the planned interface states via
255
- `$genex-threejs-game-ui` (HUD, pause on Escape, fail/retry, win, and the
256
- full loading state grown from the step-6 loader), then `npx genex wait`
257
- the step-3 UI generations and wire them in — the sprite HUD replaces the
258
- placeholder CSS (or the recorded `HUD lane: CSS` build lands finished to
259
- its brief), the menu video replaces the still frame (wired with the menu
260
- skill's loop crossfade), the logotype lands on the menu and loader, and
261
- the scene's planned generated models replace their placeholder
262
- primitives — a shipped wave of enemies may not be untextured boxes. This
263
- swap is a completion gate, not an option: a game still on the
264
- placeholder CSS HUD (with no recorded CSS lane), without the menu video
265
- playing (or its recorded still fallback), or without a working Escape
266
- pause, is not done. Then run a feel pass via
267
- `$genex-threejs-game-feel` (input response, camera, impact feedback,
268
- retry speed).
269
- 13. Validate in a real browser with fixed seeds, captures, interaction checks,
270
- and performance evidence.
271
-
272
- ## Delegation
273
-
274
- Fan-out is owned by the director: sub-agents own DESIGN.md Modules rows,
275
- concept-DEPENDENT lanes launch the moment the concept lands (only the menu
276
- video waits for its event triple — step 3), one writer per file, workers
277
- never spawn workers, and the Assets table is the budget —
278
- the full rules and the worker prompt shape live in the Delegate section of
279
- `$genex-game-director`. This map adds no separate delegation rules; it is the
280
- routing source the director and its workers read.
281
-
282
- ## Routing rules
283
-
284
- - Build silhouette, motion, and material readability before adding image
285
- effects. Never dress a primitive shape in glow or bloom to fake quality —
286
- authored forms first, then materials, then lighting, then effects last.
287
- - Keep game logic, simulation state, visual fields, and screen-space passes
288
- separated unless coupling is intentional.
289
- - Prefer deterministic seeds and named controls for every procedural system.
290
-
291
- ## Acceptance gate
292
-
293
- **Game fast path:** for a game task that loaded no procedural/visual-system skill,
294
- done = a screenshot plus an interaction smoke check (load the page, press each
295
- control, assert a visible response in its labeled direction — `$genex-threejs-visual-validation` has the
296
- procedure), **plus the UI floor from `$genex-threejs-game-ui` (the generated
297
- sprite HUD wired in — not the CSS placeholder — or the DESIGN.md-recorded
298
- `HUD lane: CSS` build finished to its brief; the menu video playing, or its
299
- recorded still fallback; the logotype placed; pause on Escape, the branded
300
- loader with its key-art background, the brief's font pair actually loaded)
301
- and the look floor (the step-4 renderer baseline + named post stack actually
302
- built; every placed 2D/media piece — decals, posters, in-world screens —
303
- screenshot-verified in situ; no UI element left as default browser CSS; no
304
- placeholder primitive left where a generated asset was
305
- planned)**, **plus the content floor whenever a step-1 content contract
306
- exists: every countable line of the contract is present and reachable in the
307
- shipped game, or the user explicitly re-scoped it in chat. "Big world"
308
- shipped as one small fogged arena, "quests" shipped as a single kill
309
- counter, a village of textured huts where nobody speaks — each is a scope
310
- violation the same way a CSS-placeholder HUD is, and it gates publish the
311
- same way.** These floors gate `npx genex publish` and the
312
- final handoff of a session the same way — "I never said it was done" is not
313
- an exemption. The list below applies to routed *visual-system* scenes, and each
314
- system-specific item (debug views, seed manifests, tier knobs) applies only when
315
- the corresponding skill was loaded.
316
-
317
- A routed Genex scene is incomplete until it exposes:
318
-
319
- - deterministic or reproducible inputs;
320
- - camera and input controls suited to the game verb;
321
- - named perceptual parameters for the important visual systems;
322
- - debug views for generated fields, masks, or passes;
323
- - a no-post baseline that still communicates the subject;
324
- - a clear quality tier or render-budget knob when the effect is expensive —
325
- and for every GAME, the adaptive-quality tier wired at boot
326
- (`$genex-threejs-adaptive-quality`): tier-capped pixel ratio, tier shadow
327
- budget, the runtime governor in the loop, and generated skybox/texture
328
- loads routed through their rungs;
329
- - when physics or controllers are in play, a fixed-timestep loop: per-frame
330
- work (platforms, enter/exit, controller updates) runs inside the physics
331
- world's before-step hook, then the world steps — never in the render loop;
332
- - browser evidence showing the canvas renders, moves, and responds to input.
51
+ | eye adaptation, tone mapping, output color, LUT grading, and proven static grain | `$genex-threejs-exposure-color-grading` |
52
+ | fixed-view screenshots, input direction, facing, temporal and budget evidence | `$genex-threejs-visual-validation` |
53
+ | a static generated GLB for a concrete prop, vehicle, building, or non-rigged object | `$genex-ai-model` |
54
+ | generated surface or terrain texture with real-world UV scale | `$genex-ai-texture` |
55
+ | environment-only 360° sky | `$genex-ai-skybox` |
56
+ | poster, sign, sprite, decal, reference sheet, or other 2D art | `$genex-ai-image` |
57
+ | in-world motion art or another requested video | `$genex-ai-video` |
58
+ | sound effect, one looping music bed, or a short spoken line | `$genex-ai-sfx`, `$genex-ai-music`, or `$genex-ai-voice` |
59
+ | requested UI/HUD/menu/interface work, or the later UI milestone of a complete-game request | `$genex-threejs-game-ui` |
60
+ | cinematic menu/title/pause/victory/defeat/lobby/credits video treatment | `$genex-ai-menu` |
61
+ | cohesive art-directed HUD sprite set with matched frames, masks, and icons | `$genex-ai-hud` |
62
+ | the game works but feels flat, floaty, or unresponsive: input response, camera, impacts, cooldowns, difficulty, fail/retry | `$genex-threejs-game-feel` |
63
+ | realtime multiplayer: movement sync, shared ball/NPC, host-run scores/enemies, shots/emotes, persistence | `$genex-threejs-multiplayer` |
64
+ | player identity, sign-in, guests, saves/progress, per-player state, shared persistent world, leaderboards—mandatory for every game | `$genex-threejs-embed-auth` |
65
+
66
+ ## Request-sized execution
67
+
68
+ ### Focused work
69
+
70
+ Load only the owning row or rows, preserve the current architecture, implement
71
+ the requested result, and run its relevant check. UI work routes directly to
72
+ UI; movement routes directly to movement; publishing routes directly to the
73
+ existing publish flow. Do not add a concept, unrelated asset batch, full-game
74
+ module plan, or critic loop.
75
+
76
+ ### Step by step
77
+
78
+ Make the selected part `Now:` and preserve the final requested destination plus
79
+ other unfinished promises under Open commitments. A small playable slice is a
80
+ milestone, never silent permission to replace the destination.
81
+
82
+ ### Whole coordinated build
83
+
84
+ Choose milestones and workstreams from the actual request. Independent streams
85
+ may run in parallel; dependencies remain serial. The stable game foundations
86
+ still route to their protected owners:
87
+
88
+ 1. `$genex-threejs-embed-auth` before boot code:
89
+ `initEmbed(...)` plus the correct `waitForPlayer()` gate.
90
+ 2. `$genex-threejs-adaptive-quality` at boot: device tier, capped pixel ratio,
91
+ runtime governor, and generated-asset rung loaders.
92
+ 3. `$genex-threejs-touch-controls` when a mobile recipe fits.
93
+ 4. `$genex-threejs-multiplayer` before any networking code whenever 2+ players
94
+ share a world.
95
+
96
+ Then build the requested gameplay and content in dependency order. Schedule
97
+ UI/HUD/menu at an appropriate later milestone only when the requested complete
98
+ outcome includes them. There is no startup game/UI concept gate.
99
+
100
+ ## Content and world promises without cookbook machinery
101
+
102
+ For a broad/full-game content-shaped request, record only promises actually
103
+ present in the request or essential to the stated genre. Make each promise
104
+ countable or otherwise observable before choosing the paid asset batch.
105
+
106
+ - A clear detailed request becomes commitments and starts; it does not trigger
107
+ a fixed questionnaire.
108
+ - Step-by-step changes `Now:`, not the requested destination.
109
+ - Never lower a final content target silently. Ask one scope question only
110
+ when a real reduction needs the player's decision.
111
+ - A focused request updates only its touched item; unrelated commitments stay
112
+ as memory, not blockers.
113
+ - A requested large/open world records request-derived scale, terrain/ground,
114
+ boundaries, and locations. Never silently reinterpret it as one small flat
115
+ plane hidden by fog, and never impose fixed kilometer, chunk, biome, or POI
116
+ defaults.
117
+ - Generated assets support commitments; asset availability does not decide
118
+ how much game the player receives.
119
+
120
+ Open commitments prevent a false “the full requested game is complete” claim.
121
+ They do not block an explicit preview or publish request: run the protected
122
+ flow and state what remains.
123
+
124
+ ## Reference-driven procedural assets
125
+
126
+ Use `$genex-threejs-procedural-assets` only for explicitly requested editable,
127
+ parameterized code-built objects or simple environment pieces. Do not trigger
128
+ it merely because an image exists, and never use it for player bodies, rigged
129
+ characters/creatures, or animation.
130
+
131
+ - Prefer a supplied reference. A private attachment stays local unless the
132
+ player explicitly permits upload, publication, or commit.
133
+ - If a reference is part of the requested work but absent, use the existing
134
+ `npx genex image` lane unchanged. Record that paid image as a normal Assets
135
+ row, separate from the code-built object.
136
+ - Its output is a local TypeScript factory returning `THREE.Group`, with named
137
+ parts and intentional parameters/seed. Add pivots, sockets, collider
138
+ metadata, or destruction groups only when gameplay needs them.
139
+ - Compare one reference-matched view and one off-axis/in-game-scale view.
140
+ Correct meaningful mismatches and stop at the requested fidelity.
141
+ - Consume the game's existing renderer, camera, lighting, post, physics,
142
+ adaptive-quality, and animation authority. Never create competing systems.
143
+
144
+ Use the local status flow exactly:
145
+
146
+ `proposed planned → building (blockout | detail | material | runtime)
147
+ landed (<local TypeScript path>) wired`
148
+
149
+ ## Protected lane handoffs
150
+
151
+ ### UI, HUD, menu, and FAL
152
+
153
+ Enter this lane only for a direct UI/HUD/menu request, a relevant visible UI
154
+ problem, or the later interface milestone of a complete-game request. Once
155
+ invoked, `$genex-threejs-game-ui`, `$genex-ai-hud`, `$genex-ai-menu`,
156
+ `$genex-ai-image`, and `$genex-ai-video` retain their existing Stage-1/Stage-2
157
+ prompts, FAL calls, credits/checkpoints, retries, extraction, masks, wiring,
158
+ markers, nudges, preflights, and approval behavior. Keep `HUD lane:`,
159
+ `Menu video:`, and every HUD pipeline stage ID/path current in `DESIGN.md`.
160
+
161
+ The absence of generated HUD/menu/concept art alone never interrupts unrelated
162
+ focused work.
163
+
164
+ ### Character, creature, and animation
165
+
166
+ The character lane retains its full approval chain. Inspect any user-named
167
+ references, generate exactly three neutral-A-pose concepts, and do not start
168
+ Image-to-3D before the applicable candidate decision. Preserve and show the
169
+ high-detail pre-rig model from four sides with measured face count; the
170
+ separate approved 10,000-face triangle remesh is what gets rigged and
171
+ animated. Never freeze/correct Meshy limb rotations; only horizontal root/hip
172
+ translation may be normalized for Rapier.
173
+
174
+ Search the catalog first. A missing verb uses
175
+ `genex character animate <id> "<verb>"` or the creature equivalent, with the
176
+ existing free motion plan before paid work, route selection, source/clip
177
+ validation, locomotion bindings, manifests, controller authority, and runtime
178
+ playback unchanged. `$genex-threejs-procedural-animation` remains the
179
+ non-biped/prop-motion fallback.
180
+
181
+ ### Optimization and mobile
182
+
183
+ `$genex-threejs-adaptive-quality` and `$genex-threejs-touch-controls` retain
184
+ their existing tier detection, runtime governor, DPR/shadow/post budgets,
185
+ generated-asset rungs and fallbacks, mobile preflight/readiness, and touch
186
+ input behavior. Do not hard-code competing quality or mobile systems.
187
+
188
+ ## Parallel work and the optional fresh critic
189
+
190
+ Whole coordinated mode may fan independent request-derived workstreams out to
191
+ sub-agents. One writer owns each disjoint file set; the director integrates
192
+ shared boot, loop, and netcode files. Focused work skips fan-out unless the
193
+ request itself has independently useful parts.
194
+
195
+ For a substantial judgeable result, a fresh critic may inspect the real game,
196
+ rendered pixels, supplied reference, or test output—not a builder summary. It
197
+ returns the single largest meaningful gap; the builder may correct it and ask
198
+ for another fresh look. Stop when requested acceptance is reached, gains are
199
+ immaterial, the player redirects, or time/compute budget is spent. No fixed
200
+ round count, critic ledger, progress site, or automatic paid retry.
201
+
202
+ A critic can identify a protected-lane issue but cannot bypass or rewrite the
203
+ owning lane. Follow-up uses the same approval, credit, checkpoint, retry, and
204
+ verification behavior.
205
+
206
+ ## Acceptance
207
+
208
+ - **Focused request:** done means its observable requested result works and the
209
+ relevant owning-skill evidence exists. It does not require unrelated
210
+ full-game floors.
211
+ - **Step:** done means that milestone reached preview; the final outcome and
212
+ open commitments remain truthful.
213
+ - **Whole coordinated result:** done means the requested outcome and relevant
214
+ commitments are present and reachable, with the invoked lanes' own checks
215
+ satisfied.
216
+
217
+ For moving controls, verify labeled direction. When physics/controllers are
218
+ used, keep per-frame work inside the physics world's before-step hook, then
219
+ step the world—never duplicate simulation in the render loop. Browser evidence
220
+ must show the relevant canvas result renders, moves, and responds.
333
221
 
334
222
  ## Publish and multiplayer awareness
335
223
 
336
- **Publishing IS calling it done.** Before `npx genex publish`, every completion
337
- gate above must pass sprite HUD wired (or the recorded CSS lane finished),
338
- the menu video playing (or its recorded still fallback), the logotype placed,
339
- Escape pause working, branded loader
340
- with its key art, fonts loaded, renderer baseline + one built post effect
341
- (tier-aware), the adaptive-quality tier wired at boot, world dressing placed
342
- or validly waived, and the content contract's countables present or
343
- explicitly re-scoped by the user. `genex preview`/`publish` print a mobile
344
- preflight (estimated phone GPU memory vs budget) treat a warning there as a
345
- gate item too. If any is still
346
- pending, say which and publish only after an explicit go-ahead.
347
-
348
- Do not invent unavailable Genex service APIs. When preparing a game for Genex
349
- publishing or multiplayer, inspect the project first. Prefer clean boundaries:
350
-
351
- - renderer and scene setup isolated from transport/auth code;
352
- - deterministic spawn and simulation seeds;
353
- - serializable player/session state;
354
- - explicit asset loading paths;
355
- - one clear start function for local preview and hosted launch.
356
-
357
- **Multiplayer is mandatory routing.** If the game has 2+ players sharing a world,
358
- load `$genex-threejs-multiplayer` **before writing any networking code** — it is not
359
- optional. The `@genex-ai/multiplayer` relay syncs `me`/`shared`/`objects`; the **SDK
360
- auto-smooths remote players AND shared objects** for you (do not write your own
361
- interpolation). It gives you server-enforced primitives `objects` (one owner per ball/
362
- NPC, claimed on contact) and a room `host` (single writer of scores, single simulator of
363
- enemies). That skill covers the rules that keep it smooth (draw `state` directly, render
364
- yourself and objects you own from a local object, quaternion rotation, `stateRaw` for
365
- hit-tests), the per-genre recipes (sports/ball, shooter, co-op), config wiring, and the
366
- persistent-world API. Reconnection is built into the SDK (render `reconnecting`/
367
- `reconnected`, never rebuild it). **Pushable/ownable bodies** (a ball, a box, a prop) use
368
- claim-on-touch + a Rapier proxy the soft handoff glides the ownership change; only a genuine
369
- **simultaneous** contest (two players pushing one crate against each other sumo, tug-of-war)
370
- uses the host-authoritative pattern (`inputs` + `onHostTick`). Both are in that skill's
371
- host-physics reference.
372
- Choose the net model from player experience: one ongoing drop-in world uses `connect()`; a fresh
373
- bounded match/mission with quorum, fair start, teams, backfill, or parallel sessions uses
374
- `matchmake()`. Infer this when the brief is clear. Ask one experience-level question only when both
375
- are genuinely plausible — never ask the user to select an SDK API or preset. For either model, a
376
- Play/Online button is the first relay contact; immediate `connect()` + spawn is valid only when
377
- loading the game already means joining the always-online world and there is no fake Play screen.
378
- Before handoff, run the multiplayer skill's netcode feel gate with two distinct identities.
379
- Use only the APIs that skill documents — do not invent transport methods.
224
+ An explicit preview or publish request proceeds directly through the existing
225
+ protected command flow; do not restart design discovery. Preserve every
226
+ preflight, mobile report, source upload, live-pointer, remix, marker, and
227
+ approval behavior. State open commitments and warnings plainly, then follow
228
+ the player's explicit direction.
229
+
230
+ Do not invent unavailable Genex service APIs. Keep renderer/scene setup
231
+ isolated from transport/auth code, spawn/simulation seeds deterministic, state
232
+ serializable, asset paths explicit, and one clear start function for local
233
+ preview and hosted launch.
234
+
235
+ **Multiplayer is mandatory routing.** If the game has 2+ players sharing a
236
+ world, load `$genex-threejs-multiplayer` **before writing any networking
237
+ code**—it is not optional. The `@genex-ai/multiplayer` relay syncs
238
+ `me`/`shared`/`objects`; the **SDK auto-smooths remote players AND shared
239
+ objects** for you (do not write your own interpolation). It gives
240
+ server-enforced primitives—`objects` (one owner per ball/NPC, claimed on
241
+ contact) and a room `host` (single writer of scores, single simulator of
242
+ enemies). Draw `state` directly, render yourself and owned objects from local
243
+ state, use quaternion rotation, and reserve `stateRaw` for hit-tests.
244
+ Reconnection is built into the SDK (`reconnecting`/`reconnected`; never
245
+ rebuild it).
246
+
247
+ Pushable/ownable bodies use claim-on-touch plus a Rapier proxy; only a genuine
248
+ simultaneous contest uses the host-authoritative `inputs` + `onHostTick`
249
+ pattern. Choose the net model from player experience: one ongoing drop-in
250
+ world uses `connect()`; a fresh bounded match/mission with quorum, fair start,
251
+ teams, backfill, or parallel sessions uses `matchmake()`. Infer this when the
252
+ brief is clear. Ask one experience-level question only when both are genuinely
253
+ plausible—never ask the player to select an SDK API or preset.
254
+
255
+ When a Play/Online button exists, it is the first relay contact. Immediate
256
+ `connect()` + spawn is valid only when loading already means joining the
257
+ always-online world and no fake Play screen exists. Before handoff, run the
258
+ multiplayer skill's netcode feel gate with two distinct identities. Use only
259
+ the APIs that skill documents.